Conflicts: app/__init__.py app/rollerverbrauch/templates/createPitStopForm.html app/rollerverbrauch/templates/newPitStopForm.html app/rollerverbrauch/templates/selectVehice.html app/rollerverbrauch/templates/selectVehicle.html app/templates/newPitStopForm.html app/templates/selectVehice.html
		
			
				
	
	
		
			67 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			67 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
{% extends "layout.html" %}
 | 
						|
 | 
						|
{% block body %}
 | 
						|
    <h3>Admin</h3>
 | 
						|
    <div class="panel panel-default">
 | 
						|
        <div class="panel-heading">Users</div>
 | 
						|
        <div class="panel-body">
 | 
						|
            We have {{ users|length }} users so far:
 | 
						|
            <ul>
 | 
						|
                {% for user in users %}
 | 
						|
                    <li>{{user.email}}</li>
 | 
						|
                {% endfor %}
 | 
						|
        </div>
 | 
						|
    </div>
 | 
						|
 | 
						|
    <div class="panel panel-default">
 | 
						|
        <div class="panel-heading">Consumables</div>
 | 
						|
        <div class="panel-body">
 | 
						|
            <a href="{{ url_for('create_consumable') }}" class="btn btn-primary " role="button">
 | 
						|
                <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> create
 | 
						|
            </a>
 | 
						|
        </div>
 | 
						|
        <table class="table table-striped table-bordered">
 | 
						|
            <tbody>
 | 
						|
                <tr>
 | 
						|
                    <th>
 | 
						|
                        Name
 | 
						|
                    </th>
 | 
						|
                    <th>
 | 
						|
                        Unit
 | 
						|
                    </th>
 | 
						|
                    <th>
 | 
						|
                        Used by
 | 
						|
                    </th>
 | 
						|
                    <th>
 | 
						|
                        Actions
 | 
						|
                    </th>
 | 
						|
                </tr>
 | 
						|
                {% for consumable in consumables %}
 | 
						|
                    <tr>
 | 
						|
                        <td>
 | 
						|
                            {{ consumable.name }}
 | 
						|
                        </td>
 | 
						|
                        <td>
 | 
						|
                            {{ consumable.unit }}
 | 
						|
                        </td>
 | 
						|
                        <td>
 | 
						|
                            {{ consumable.vehicles | length }} vehicles
 | 
						|
                        </td>
 | 
						|
                        <td>
 | 
						|
                            {% if not consumable.in_use %}
 | 
						|
                                <a href="{{ url_for('delete_consumable', cid=consumable.id) }}"  class="btn btn-primary btn-warning " role="button">
 | 
						|
                                    <span class="glyphicon glyphicon-trash" aria-hidden="true"></span> delete
 | 
						|
                                </a>
 | 
						|
                            {% endif %}
 | 
						|
                            <a href="{{ url_for('edit_consumable', cid=consumable.id) }}" class="btn btn-primary " role="button">
 | 
						|
                                <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> edit
 | 
						|
                            </a>
 | 
						|
                        </td>
 | 
						|
                    </tr>
 | 
						|
                {% endfor %}
 | 
						|
            </tbody>
 | 
						|
        </table>
 | 
						|
    </div>
 | 
						|
 | 
						|
{% endblock %}
 |