forked from atdt/marcel
-
Notifications
You must be signed in to change notification settings - Fork 2
/
wish_detail.html
53 lines (50 loc) · 1.52 KB
/
wish_detail.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{% extends 'base.html' %}
{% load gravatar %}
{% block extracss %}
<link rel="stylesheet" href="/static/css/compose.css">
{% endblock %}
{% block content %}
<div style="padding-top:200px;padding-bottom:10px;">
<h1>Wish: {{ wish.title }}</h1>
</div>
<div style="display:inline-block;">
<img src="{{ wish.picture }}" width=100px height=100px>
</div>
<div style="display:inline-block;padding-left:20px;">
<div>
<h2><p>
{% gravatar wish.user.user 40 %}
<a href="{{ wish.user.get_absolute_url }}">{{ wish.user.user.username }}</a> is looking for
<strong>{{ wish.title }}</strong>
</p></h2>
</div>
<div>
<h3><p>{{ wish.description }}</p></h3>
</div>
</div>
<p>
{% if user == wish.user.user %}
<p>
You posted this! <a href="{{ wish.get_absolute_url }}/update">Edit</a>
</p>
<p>
{% if wish.status_name == 'Active' %}
<strong><a href="fulfill/{{ wish.pk }}">Mark fulfilled!</a></strong>
{% else %}
<strong>{{ wish.status_name }}</strong>
{% endif %}
</p>
{# TODO: Show messages for this wish? #}
{% else %}
{% if user.is_authenticated %}
<form method="post">
{% csrf_token %}
<textarea rows="4" cols="55" name="body"></textarea>
<input type="submit" value="Send">
</form>
{% else %}
<a href="{% url openid-login %}">Log in</a> to send a message about this item!
{% endif %}
{% endif %}
</p>
{% endblock %}