Add tag support
This commit is contained in:
parent
ce10245c51
commit
ae440be40c
24 changed files with 475 additions and 15 deletions
23
templates/brain/taxonomy/create.html.twig
Normal file
23
templates/brain/taxonomy/create.html.twig
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{% extends 'brain/base.html.twig' %}
|
||||
|
||||
{% block title %}{{ action|capitalize }} {{ type }} {% endblock %}
|
||||
|
||||
{% block page_title %}<h1>Add New {{ type }}</h1>{% endblock %}
|
||||
|
||||
{# {% block actions%}Actions here{% endblock %} #}
|
||||
|
||||
{% block admin %}
|
||||
<section class="add-new--{{type|lower}}">
|
||||
{{ form_start(form) }}
|
||||
<div class="form-errors">
|
||||
{{ form_errors(form) }}
|
||||
</div>
|
||||
<div class="row">
|
||||
{{ form_row(form.title) }}
|
||||
</div>
|
||||
<div class="row">
|
||||
{{ form_rest(form) }}
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
</section>
|
||||
{% endblock %}
|
||||
27
templates/brain/taxonomy/index.html.twig
Normal file
27
templates/brain/taxonomy/index.html.twig
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{% extends 'brain/base.html.twig' %}
|
||||
|
||||
{% block title %}{{ type }} {% endblock %}
|
||||
|
||||
{% block page_title %}<h1>All {{ type }}</h1>{% endblock %}
|
||||
|
||||
{# {% block actions%}Actions here{% endblock %} #}
|
||||
|
||||
{% block admin %}
|
||||
<div class="list">
|
||||
<h2><a href="/brain/{{type|lower}}/new">New {{ type }}</a></h2>
|
||||
<table class="posts">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Title</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for term in taxonomy %}
|
||||
<tr>
|
||||
<td>{{term.title}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue