collection-crud/templates/header.html.twig

51 lines
1.6 KiB
Twig

<h1>Camera Collection CRUD</h1>
<div class="top-bar">
<div class="top-bar-left">
<ul class="menu">
<li class="menu-text">Camera Collection</li>
<li class="{{ route starts with 'camera_' ? 'is-active' }}">
<a href="{{ path('camera_index') }}">Cameras</a>
</li>
<li class="{{ route starts with 'flash_' ? 'is-active' }}">
<a href="{{ path('flash_index') }}">Flashes</a>
</li>
<li class="{{ route starts with 'lens_' ? 'is-active' }}">
<a href="{{ path('lens_index') }}">Lenses</a>
</li>
</ul>
<ul class="menu">
<li class="menu-text">Previously Owned</li>
<li class="{{ route starts with 'previously-owned-camera' ? 'is-active' }}">
<a href="{{ path('previously-owned-camera_index') }}">Cameras</a>
</li>
<li class="{{ route starts with 'previously-owned-flash' ? 'is-active' }}">
<a href="{{ path('previously-owned-flash_index') }}">Flashes</a>
</li>
<li class="{{ route starts with 'previously-owned-lens' ? 'is-active' }}">
<a href="{{ path('previously-owned-lens_index') }}">Lenses</a>
</li>
</ul>
<ul class="menu">
<li class="menu-text">Meta</li>
<li class="{{ route starts with 'film_' ? 'is-active' }}">
<a href="{{ path('film_index') }}">Film</a>
</li>
<li class="{{ route starts with 'camera-type_' ? 'is-active' }}">
<a href="{{ path('camera-type_index') }}">Camera Types</a>
</li>
</ul>
</div>
</div>
{% for message in app.flashes('notice') %}
<div class="small callout flash-notice">
{{ message }}
</div>
{% endfor %}
{% for message in app.flashes('error') %}
<div class="small callout alert flash-error">
{{ message }}
</div>
{% endfor %}