Commit a80dc0d7 authored by Willard's avatar Willard

Restyle stall view

parent 26a75142
{% extends "base.html" %} {% block title %} {{stall.name}} {% endblock %} {% block content %} {% extends "base.html" %} {% block title %} {{stall.name}} {% endblock %} {% block content %}
<div class="dashboard-container"> <div class="row">
<div class="dashboard-row"> <div class="col-md-4 col-md-offset-2">
<span style="font-size: 32pt; flex-grow: 2;"> <span style="font-size: 32pt; flex-grow: 2;">
{{stall.name}} {{stall.name}}
</span> </span>
<a href="{{ url_for('new_dish', stall_id=stall.id) }}"><button class="link-button" style="flex-grow: 1;">Add Dish</button></a>
<a href="{{ url_for('edit_stall', stall_id=stall.id) }}"><button class="link-button" style="flex-grow: 1;">Edit Info</button></a>
</div> </div>
<div class="dashboard-row"> <div class="col-md-4 col-md-offset-1">
<div class="list"> <a class="btn btn-primary btn-lg" href="{{ url_for('stalls') }}">Dashboard</a>
{% if dishes|length > 0 %} {% for dish in dishes %} <a class="btn btn-default btn-lg" href="{{ url_for('new_dish', stall_id=stall.id) }}">Add Dish</a>
<div class="list-item"> <a class="btn btn-default btn-lg" href="{{ url_for('edit_stall', stall_id=stall.id) }}">Edit Info</a>
<div class="list-image"> </div>
<img width="200px" height="200px" src="{{url_for('static', filename='uploads/'+dish.image_path)}}" alt=""> </div>
</div> <div class="row">
<div class="list-info"> <div class="col-sm-8 col-sm-offset-2">
<span class="list-name">{{dish.name}}</span> {% if dishes|length > 0 %}
<span class="list-price">Php{{dish.price}}</span> <table class="table">
<div> <tr>
<a href="{{ url_for('edit_dish', stall_id=stall.id, dish_id=dish.id) }}"><button class="list-button">Edit</button></a> <th>Image</th><th>Name</th><th>Price</th><th>Controls</th>
</tr>
{% for dish in dishes %}
<tr>
<td><img width="160px" height="160px" src="{{url_for('static', filename='uploads/'+dish.image_path)}}" alt=""></td>
<td>{{dish.name}}</td>
<td>Php {{dish.price}}</td>
<td>
<form action="{{ url_for('delete_dish', stall_id=stall.id, dish_id=dish.id) }}" method="POST" onsubmit="return confirm('Are you sure you want to delete {{dish.name}}')"> <form action="{{ url_for('delete_dish', stall_id=stall.id, dish_id=dish.id) }}" method="POST" onsubmit="return confirm('Are you sure you want to delete {{dish.name}}')">
<button type="submit" class="list-button button-delete">Delete</button></a> <button type="submit" class="btn btn-danger btn-lg">Delete</button></a>
</form> </form>
</td>
</tr>
{% endfor %}
</table>
{% endif %}
</div> </div>
</div> </div>
</div>
{% endfor %} {% endif %}
</div>
</div>
<div class="dashboard-row">
<a href="{{ url_for('stalls') }}"><button class="link-button">Dashboard</button></a>
</div>
</div>
{% endblock %} {% endblock %}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment