57 lines
1.8 KiB
HTML
57 lines
1.8 KiB
HTML
{% extends "authorized.html" %}
|
|
{% block title %}User Profile{% endblock %}
|
|
{% block center %}
|
|
{% if my_wishlist %}
|
|
<h1>My Wishlist</h1>
|
|
{% else %}
|
|
<h1>{{ user.given_name }} Wishlist</h1>
|
|
{% endif %}
|
|
<br/>
|
|
<h2>List</h2>
|
|
{% if my_wishlist %}
|
|
<a href="/userwishlist/add/{{ user.id }}">Add</a>
|
|
{% endif %}
|
|
<div class="table-responsive overflow-auto">
|
|
<table class="table table-striped table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">Item</th>
|
|
<th scope="col">Link</th>
|
|
<th scope="col">State</th>
|
|
<th scope="col">Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for user_wishlist_item in user_wishlist_items %}
|
|
<tr>
|
|
{% if my_wishlist %}
|
|
<td><a href="/userwishlist/edit/{{ user_wishlist_item.id }}">{{ user_wishlist_item.item }}</a></td>
|
|
{% else %}
|
|
<td>{{ user_wishlist_item.item }}</td>
|
|
{% endif %}
|
|
<td><a href="{{ user_wishlist_item.item_url }}">URL</a></td>
|
|
{% if user_wishlist_item.received_at > 0 %}
|
|
<td>Got it!</td>
|
|
{% else %}
|
|
<td>Not yet!</td>
|
|
{% endif %}
|
|
{% if my_wishlist %}
|
|
{% if user_wishlist_item.received_at > 0 %}
|
|
<td>Got it!</td>
|
|
{% else %}
|
|
<td><a href="/userwishlist/received/{{ user_wishlist_item.id }}">Received</a></td>
|
|
{% endif %}
|
|
{% else %}
|
|
{% if user_wishlist_item.purchased_by > 0 %}
|
|
<td>Purchased</td>
|
|
{% else %}
|
|
<td><a href="/userwishlist/bought/{{ user_wishlist_item.id }}">Bought</a></td>
|
|
{% endif %}
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endblock center %}
|