pluwum/shopping-list

View on GitHub
app/templates/shopping_lists.html

Summary

Maintainability
Test Coverage
{% extends "base/authenticated.html" %}
{% block title %}Shopping Lists{% endblock %}
{% block body %}
<!-- main content goes here !-->
<div class="page-header">
<h1> Here's Your Shopping lists </h1>
</div>
<div class="row">
<div class="col-md-12">
{% if my_lists|length > 0 %}
<table class="table table-striped">
<tr>
<th>#</th>
<th>Name</th>
<th>Description</th>
<th>Actions</th>
</tr>
 
{% for my_list in my_lists %}
<tr>
<td>{{ loop.index}}</td>
<td>{{ my_list.name }}</td>
<td>{{ my_list.description }} </td>
<td>
<a href="/list/{{loop.index0}}" class="btn btn-primary">View</a>
<a href="/list/edit/{{loop.index0}}" class="btn btn-info">Edit</a>
<a href="/list/delete/{{loop.index0}}" class="btn btn-danger">Delete</a>
</td>
</tr>
 
{% endfor %}
</table>
{% else %}
<div class="alert alert-success">
<strong>Opps! </strong> You have no Shopping Lists at the moment :-(. To create one, click <a href="/list/create">here</a>
</div>
{% endif %}
</div>
</div>
{% endblock %}