forked from Ruderverein-Donau-Linz/rowt
		
	Merge pull request 'show 'no reservations' if no reservations :-)' (#336) from reservations into staging
Reviewed-on: Ruderverein-Donau-Linz/rowt#336
This commit is contained in:
		@@ -1,28 +1,28 @@
 | 
			
		||||
{% macro boatreservation() %}
 | 
			
		||||
    {% if reservations %}
 | 
			
		||||
        <div class="bg-white dark:bg-primary-900 rounded-md shadow pb-2 mt-3">
 | 
			
		||||
            <h2 class="h2">Reservierungen ({{ reservations | length }})</h2>
 | 
			
		||||
            <div class="grid grid-cols-1 gap-3 mb-3 w-full">
 | 
			
		||||
                {% for reservation in reservations %}
 | 
			
		||||
                    <div class="pt-2 px-3 border-t text-primary-900 dark:text-white">
 | 
			
		||||
                        <strong class="block">
 | 
			
		||||
                            {{ reservation.start_date | date(format="%d.%m.%Y") }}
 | 
			
		||||
                            {% if reservation.end_date != reservation.start_date %}
 | 
			
		||||
                                -
 | 
			
		||||
                                {{ reservation.end_date | date(format="%d.%m.%Y") }}
 | 
			
		||||
                            {% endif %}
 | 
			
		||||
                            <small>({{ reservation.time_desc }})</small>
 | 
			
		||||
                        </strong>
 | 
			
		||||
                        <span class="block">
 | 
			
		||||
                            {{ reservation.boat.name }}
 | 
			
		||||
                            <small>({{ reservation.user_applicant.name }})</small>
 | 
			
		||||
                        </span>
 | 
			
		||||
                        <span class="text-sm italic">{{ reservation.usage }}</span>
 | 
			
		||||
                    </div>
 | 
			
		||||
                {% endfor %}
 | 
			
		||||
            </div>
 | 
			
		||||
    <div class="bg-white dark:bg-primary-900 rounded-md shadow pb-2 mt-3">
 | 
			
		||||
        <h2 class="h2">Reservierungen ({{ reservations | length }})</h2>
 | 
			
		||||
        <div class="grid grid-cols-1 gap-3 mb-3 w-full">
 | 
			
		||||
            {% for reservation in reservations %}
 | 
			
		||||
                <div class="pt-2 px-3 border-t text-primary-900 dark:text-white">
 | 
			
		||||
                    <strong class="block">
 | 
			
		||||
                        {{ reservation.start_date | date(format="%d.%m.%Y") }}
 | 
			
		||||
                        {% if reservation.end_date != reservation.start_date %}
 | 
			
		||||
                            -
 | 
			
		||||
                            {{ reservation.end_date | date(format="%d.%m.%Y") }}
 | 
			
		||||
                        {% endif %}
 | 
			
		||||
                        <small>({{ reservation.time_desc }})</small>
 | 
			
		||||
                    </strong>
 | 
			
		||||
                    <span class="block">
 | 
			
		||||
                        {{ reservation.boat.name }}
 | 
			
		||||
                        <small>({{ reservation.user_applicant.name }})</small>
 | 
			
		||||
                    </span>
 | 
			
		||||
                    <span class="text-sm italic">{{ reservation.usage }}</span>
 | 
			
		||||
                </div>
 | 
			
		||||
            {% else %}
 | 
			
		||||
                <p class="p-3 text-center text-black dark:text-white">Keine Reservierung</p>
 | 
			
		||||
            {% endfor %}
 | 
			
		||||
        </div>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    </div>
 | 
			
		||||
{% endmacro boatreservation %}
 | 
			
		||||
{% macro header(loggedin_user) %}
 | 
			
		||||
    <header class="bg-primary-900 text-white flex justify-center p-3 fixed w-full z-10">
 | 
			
		||||
 
 | 
			
		||||
@@ -16,12 +16,12 @@
 | 
			
		||||
                    <div>{{ log::show_boats(only_ones=false) }}</div>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="md:col-span-3 bg-white dark:bg-primary-900 rounded-md shadow">
 | 
			
		||||
            <div class="lg:col-span-3 bg-white dark:bg-primary-900 rounded-md shadow">
 | 
			
		||||
                <h2 class="h2">Neue Ausfahrt</h2>
 | 
			
		||||
                <div class="p-3">{{ log::new(only_ones=false, shipmaster=-1) }}</div>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div>
 | 
			
		||||
                <div class="bg-white dark:bg-primary-900 rounded-md shadow">
 | 
			
		||||
                <div class="bg-white dark:bg-primary-900 rounded-md shadow pb-2">
 | 
			
		||||
                    <h2 class="h2">Am Wasser</h2>
 | 
			
		||||
                    <div>
 | 
			
		||||
                        {% if on_water | length > 0 %}
 | 
			
		||||
 
 | 
			
		||||
@@ -11,7 +11,7 @@
 | 
			
		||||
                    <div>{{ log::show_boats(only_ones=false) }}</div>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="md:col-span-3 bg-white dark:bg-primary-900 rounded-md shadow">
 | 
			
		||||
            <div class="lg:col-span-3 bg-white dark:bg-primary-900 rounded-md shadow">
 | 
			
		||||
                <h2 class="h2">Neue Ausfahrt</h2>
 | 
			
		||||
                <div class="p-3">{{ log::new(shipmaster=loggedin_user.id) }}</div>
 | 
			
		||||
            </div>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user