klein0r/affiliate-dashboard

View on GitHub
src/AffiliateDashboardBundle/Resources/views/Blogpost/show.html.twig

Summary

Maintainability
Test Coverage
{% extends 'base.html.twig' %}

{% block body %}
    <div class="page-header">
        <h1>{% trans %}Blogpost{% endtrans %}</h1>
    </div>

    <table class="table table-hover table-condensed">
        <tbody>
            <tr>
                <th>{% trans %}Title{% endtrans %}</th>
                <td>{{ blogpost.title }}</td>
            </tr>
            <tr>
                <th>{% trans %}Published at{% endtrans %}</th>
                <td>{% if blogpost.publishedAt %}{{ blogpost.publishedAt|localizeddate('medium', 'none') }}{% endif %}</td>
            </tr>
            <tr>
                <th>{% trans %}Url{% endtrans %}</th>
                <td>{{ blogpost.url }}</td>
            </tr>
            <tr>
                <th>{% trans %}Tag{% endtrans %}</th>
                <td>{{ blogpost.affiliateTag.name }}</td>
            </tr>
        </tbody>
    </table>

    <p>
        <a href="{{ path('blogpost_edit', { 'id': blogpost.id }) }}" class="btn btn-primary">{% trans %}edit{% endtrans %}</a>
    </p>

    <p>
        {{ form_start(delete_form) }}
        <input type="submit" value="{% trans %}delete{% endtrans %}" class="btn btn-danger">
        {{ form_end(delete_form) }}
    </p>

    <p>
        <a type="button" class="btn btn-default btn-xs" href="{{ path('blogpost_index') }}">{% trans %}back to the list{% endtrans %}</a>
    </p>
{% endblock %}