Commit a80dc0d7 authored by Willard's avatar Willard

Restyle stall view

parent 26a75142
{% extends "base.html" %} {% block title %} {{stall.name}} {% endblock %} {% block content %}
<div class="dashboard-container">
<div class="dashboard-row">
<span style="font-size: 32pt; flex-grow: 2;">
{{stall.name}}
</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 class="dashboard-row">
<div class="list">
{% if dishes|length > 0 %} {% for dish in dishes %}
<div class="list-item">
<div class="list-image">
<img width="200px" height="200px" src="{{url_for('static', filename='uploads/'+dish.image_path)}}" alt="">
</div>
<div class="list-info">
<span class="list-name">{{dish.name}}</span>
<span class="list-price">Php{{dish.price}}</span>
<div>
<a href="{{ url_for('edit_dish', stall_id=stall.id, dish_id=dish.id) }}"><button class="list-button">Edit</button></a>
<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>
</form>
</div>
</div>
</div>
{% endfor %} {% endif %}
<div class="row">
<div class="col-md-4 col-md-offset-2">
<span style="font-size: 32pt; flex-grow: 2;">
{{stall.name}}
</span>
</div>
<div class="col-md-4 col-md-offset-1">
<a class="btn btn-primary btn-lg" href="{{ url_for('stalls') }}">Dashboard</a>
<a class="btn btn-default btn-lg" href="{{ url_for('new_dish', stall_id=stall.id) }}">Add Dish</a>
<a class="btn btn-default btn-lg" href="{{ url_for('edit_stall', stall_id=stall.id) }}">Edit Info</a>
</div>
</div>
<div class="dashboard-row">
<a href="{{ url_for('stalls') }}"><button class="link-button">Dashboard</button></a>
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
{% if dishes|length > 0 %}
<table class="table">
<tr>
<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}}')">
<button type="submit" class="btn btn-danger btn-lg">Delete</button></a>
</form>
</td>
</tr>
{% endfor %}
</table>
{% endif %}
</div>
</div>
</div>
{% 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