Initial Build
This commit is contained in:
parent
71cd3acccd
commit
6c0d9a3f98
140 changed files with 9802 additions and 2403 deletions
42
templates/brain/post/create.html.twig
Normal file
42
templates/brain/post/create.html.twig
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{% extends 'brain/base.html.twig' %}
|
||||
|
||||
{% block title %}{{ action|capitalize}} Post{% endblock %}
|
||||
|
||||
{% block page_title %}<h1>Add New Post</h1>{% endblock %}
|
||||
|
||||
{# {% block actions%}Actions here{% endblock %} #}
|
||||
|
||||
{% block admin %}
|
||||
<section class="add-new--post">
|
||||
{{ form_start(form) }}
|
||||
<div class="form-errors">
|
||||
{{ form_errors(form) }}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
{{ form_row(form.title) }}
|
||||
</div>
|
||||
<div class="row">
|
||||
{{ form_row(form.date) }}
|
||||
</div>
|
||||
<div class="row">
|
||||
{{ form_row(form.text) }}
|
||||
</div>
|
||||
<div class="row">
|
||||
{{ form_row(form.category) }}
|
||||
</div>
|
||||
{# <div class="row">
|
||||
{{ form_row(form.tags) }}
|
||||
</div> #}
|
||||
<div class="row">
|
||||
{{ form_row(form.url) }}
|
||||
</div>
|
||||
<div class="row">
|
||||
{{ form_row(form.published) }}
|
||||
</div>
|
||||
<div class="row">
|
||||
{{ form_rest(form) }}
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
</section>
|
||||
{% endblock %}
|
||||
37
templates/brain/post/index.html.twig
Normal file
37
templates/brain/post/index.html.twig
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{% extends 'brain/base.html.twig' %}
|
||||
|
||||
{% block title %}Posts {% endblock %}
|
||||
|
||||
{% block page_title %}<h1>All Posts</h1>{% endblock %}
|
||||
|
||||
{# {% block actions%}Actions here{% endblock %} #}
|
||||
|
||||
{% block admin %}
|
||||
<div class="list">
|
||||
<h2><a href="/brain/post/new">New Post</a></h2>
|
||||
<table class="posts">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Title</td>
|
||||
<td>Date</td>
|
||||
<td>Category</td>
|
||||
<td>Edit</td>
|
||||
<td>View</td>
|
||||
<td>Published</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for post in posts %}
|
||||
<tr>
|
||||
<td>{{post.title}}</td>
|
||||
<td>{{post.getDate()|date('m/d/Y')}}</td>
|
||||
<td>{{post.category.getTitle()}}</td>
|
||||
<td><a href="/brain/post/edit/{{post.getId()}}">Edit</a></td>
|
||||
<td><a href="/words/{{post.getUrl()}}">View</a><td>
|
||||
<td>{{post.published == 1 ? 'Published' : 'Unpublished'}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue