Reformated the code.

This commit is contained in:
Tim Schumacher 2014-07-19 09:26:54 +02:00
parent 92a21d3b69
commit 6f0b6eabef
3 changed files with 13 additions and 8 deletions

View file

@ -1,25 +1,31 @@
<div class="ui column">
<div class="ui segment event box">
<h2 class="ui dividing header segment green inverted"><a href="{{ path('_show', { 'slug': entity.slug }) }}">{{ entity.summary }}</a>
<h2 class="ui dividing header segment green inverted"><a
href="{{ path('_show', { 'slug': entity.slug }) }}">{{ entity.summary }}</a>
</h2>
<p class="edit">
<a href="{{ path('_edit', {'slug' : entity.slug }) }}"><i class="circular icon edit green inverted link"></i>Bearbeiten</a>
<a href="{{ path('_edit', {'slug' : entity.slug }) }}"><i
class="circular icon edit green inverted link"></i>Bearbeiten</a>
</p>
<p class="startdate ">
<i class="circular icon calendar green inverted link" title="Wann?" data-content="Wann?"></i>{{ entity.startdate.format('Y-m-d H:i') }}
<i class="circular icon calendar green inverted link" title="Wann?"
data-content="Wann?"></i>{{ entity.startdate.format('Y-m-d H:i') }}
</p>
{% if entity.location is not null %}
<p class="location">
<a href="{{ path('location_show', {'slug' : entity.location.slug }) }}"><i class="circular icon map marker green inverted link" title="Wo?" data-content="Wo?"></i>{{ entity.location.name }}</a>
<a href="{{ path('location_show', {'slug' : entity.location.slug }) }}"><i
class="circular icon map marker green inverted link" title="Wo?"
data-content="Wo?"></i>{{ entity.location.name }}</a>
</p>
{% endif %}
{% if entity.tags|length > 0 %}
<ul class="tags">
{% for tag in entity.tags %}
<li class="tag"><a href="{{ path('tag_show',{'slug' : tag.slug }) }}"><i class="circular icon tag green inverted link"></i>{{ tag.name }}</a></li>
<li class="tag"><a href="{{ path('tag_show',{'slug' : tag.slug }) }}"><i
class="circular icon tag green inverted link"></i>{{ tag.name }}</a></li>
{% endfor %}
</ul>
{% endif %}
@ -37,6 +43,5 @@
{% else %}
<p>{{ entity.description|markdown }}</p>
{% endif %}
</div>
</div>

View file

@ -1,4 +1,4 @@
<form method="post" action="{% if entity.id > 0 %}{{ path('_update',{'slug':entity.slug}) }}{% else %}{{ path('_create') }}{% endif %}">
<form method="post" action="{% if entity.id|default(0) > 0 %}{{ path('_update',{'slug':entity.slug}) }}{% else %}{{ path('_create') }}{% endif %}">
<div class="ui form segment">
<div class="field">
<label class="control-label required" for="event_startdate">Startdatum</label>

View file

@ -18,6 +18,6 @@
{% block body -%}
<div class="ui one column page grid">
{{ include('CalciferBundle:Event:event_box.html.twig') }}
{{ include('CalciferBundle:Event:event_box.html.twig',{'entity' : entity}) }}
</div>
{% endblock %}