diff --git a/templates/admin/boat/index.html.tera b/templates/admin/boat/index.html.tera index 750c523..1878d8f 100644 --- a/templates/admin/boat/index.html.tera +++ b/templates/admin/boat/index.html.tera @@ -9,11 +9,9 @@

Boats

{{ boat::new() }} -
- {% for boat in boats %} - {{ boat::edit(boat=boat, uuid=loop.index) }} - {% endfor %} -
+ {% for boat in boats %} + {{ boat::edit(boat=boat, uuid=loop.index) }} + {% endfor %} diff --git a/templates/includes/forms/boat.html.tera b/templates/includes/forms/boat.html.tera index ac61476..93586e2 100644 --- a/templates/includes/forms/boat.html.tera +++ b/templates/includes/forms/boat.html.tera @@ -1,49 +1,67 @@ {% macro new() %} -
-
-

- Neues Boot hinzufügen -

- {{ macros::input(label="Name", name="name", type="text", required=true) }} - {{ macros::input(label="Anzahl Sitze", name="amount_seats", type="number", required=true, min=1) }} - {{ macros::input(label="Baujahr", name="year_built", type="number", min=1950, max=2050) }} - {{ macros::input(label="Bootsbauer", name="boatbuilder", type="text") }} - {{ macros::select(label="Standort", data=locations, name='location_id', selected_id=1) }} - {{ macros::select(label="Besitzer", data=users, name='owner', default="Verein") }} - {{ macros::checkbox(label="handgesteuert", name="default_shipmaster_only_steering")}} - {{ macros::checkbox(label="Skull", name="skull", checked=true)}} - {{ macros::checkbox(label="Externes Boot (anderer Verein)", name="external")}} -
-
- -
-
+
+

+ Neues Boot + + + {% include "includes/plus-icon" %} + Neues Boot anlegen + +

+ +
+
+ + +
+ +
{% endmacro new %} {% macro edit(boat, uuid) %} -
-
- -
{{ boat.name }}
-
- {{ macros::input(label='Name', name='name', type='text', value=boat.name) }} - {{ macros::input(label='Amount Seats', name='amount_seats', type='number', min=0, value=boat.amount_seats) }} - {{ macros::select(data=locations, label='Standort', name='location_id', selected_id=boat.location_id) }} - {{ macros::select(data=users, label='Besitzer', name='owner', selected_id=boat.owner, default="Vereinsboot") }} - {{ macros::input(label='Baujahr', name='year_built', type='number', min=1950, value=boat.year_built) }} - {{ macros::input(label='Bootsbauer', name='boatbuilder', type='text', value=boat.boatbuilder) }} - {{ macros::checkbox(label='default_shipmaster_only_steering', name='default_shipmaster_only_steering', id=uuid , checked=boat.default_shipmaster_only_steering) }} - {{ macros::checkbox(label='skull', name='skull', id=uuid , checked=boat.skull) }} - {{ macros::checkbox(label='external', name='external', id=uuid , checked=boat.external) }} -
-
-
- - {% include "includes/delete-icon" %} - Löschen - - -
-
+
+
+
+ +
{{ boat.name }}
+
+ {{ macros::input(label='Name', name='name', type='text', value=boat.name) }} + {{ macros::input(label='Plätze', name='amount_seats', type='number', min=0, value=boat.amount_seats) }} + {{ macros::select(data=locations, label='Standort', name='location_id', selected_id=boat.location_id) }} + {{ macros::select(data=users, label='Besitzer', name='owner', selected_id=boat.owner, default="Vereinsboot") }} + {{ macros::input(label='Baujahr', name='year_built', type='number', min=1950, value=boat.year_built) }} + {{ macros::input(label='Bootsbauer', name='boatbuilder', type='text', value=boat.boatbuilder) }} + {{ macros::checkbox(label='hangesteuert', name='default_shipmaster_only_steering', id=uuid , checked=boat.default_shipmaster_only_steering) }} + {{ macros::checkbox(label='Skull', name='skull', id=uuid , checked=boat.skull) }} + {{ macros::checkbox(label='Externes Boot', name='external', id=uuid , checked=boat.external) }} +
+
+ +
+
{% endmacro edit %} diff --git a/templates/includes/macros.html.tera b/templates/includes/macros.html.tera index 742a084..85555ec 100644 --- a/templates/includes/macros.html.tera +++ b/templates/includes/macros.html.tera @@ -80,7 +80,7 @@ {% if display == '' %} {% set display = ["name"] %} {% endif %} - {% if default %} {% endif %}