PHP Classes

File: templates/admin/blog/index.html.twig

Recommend this page to a friend!
  Classes of Manolo Salsas  >  Symfony Create Bundle Skeleton  >  templates/admin/blog/index.html.twig  >  Download  
File: templates/admin/blog/index.html.twig
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Symfony Create Bundle Skeleton
Application to create reusable Symfony Bundles
Author: By
Last change:
Date: 2 years ago
Size: 2,246 bytes


Class file image Download
{% extends 'admin/layout.html.twig' %}

{% block body_id 'admin_post_index' %}

{% block main %}
    <h1>{{ 'title.post_list'|trans }}</h1>

    <table class="table table-striped table-middle-aligned">
                <th scope="col">{{ 'label.title'|trans }}</th>
                <th scope="col"><i class="fa fa-calendar" aria-hidden="true"></i> {{ 'label.published_at'|trans }}</th>
                <th scope="col" class="text-center"><i class="fa fa-cogs" aria-hidden="true"></i> {{ 'label.actions'|trans }}</th>
        {% for post in posts %}
                <td>{{ post.title }}</td>
                {# it's not mandatory to set the timezone in localizeddate(). This is done to
                   avoid errors when the 'intl' PHP extension is not available and the application
                   is forced to use the limited "intl polyfill", which only supports UTC and GMT #}
                <td>{{ post.publishedAt|format_datetime('medium', 'short', '', 'UTC') }}</td>
                <td class="text-right">
                    <div class="item-actions">
                        <a href="{{ path('admin_post_show', {id:}) }}" class="btn btn-sm btn-default">
                            <i class="fa fa-eye" aria-hidden="true"></i> {{ ''|trans }}

                        <a href="{{ path('admin_post_edit', {id:}) }}" class="btn btn-sm btn-primary">
                            <i class="fa fa-edit" aria-hidden="true"></i> {{ 'action.edit'|trans }}
        {% else %}
                <td colspan="4" align="center">{{ 'post.no_posts_found'|trans }}</td>
        {% endfor %}
{% endblock %}

{% block sidebar %}
    <div class="section actions">
        <a href="{{ path('admin_post_new') }}" class="btn btn-lg btn-block btn-success">
            <i class="fa fa-plus" aria-hidden="true"></i> {{ 'action.create_post'|trans }}

    {{ parent() }}

    {{ show_source_code(_self) }}
{% endblock %}
For more information send a message to info at phpclasses dot org.