comparison templates/profile/user.djhtml @ 152:9294cf4097d8

Show contributions (bundles, snippets) on profile
author dellsystem <ilostwaldo@gmail.com>
date Mon, 15 Oct 2012 00:58:54 -0400
parents 5ab229c9d348
children
comparison
equal deleted inserted replaced
151:c7be7def8b57 152:9294cf4097d8
4 Viewing profile: {{ profile.user }} 4 Viewing profile: {{ profile.user }}
5 {% endblock %} 5 {% endblock %}
6 6
7 7
8 {% block content %} 8 {% block content %}
9 <div id="non-sidebar">
9 10
10 <h1>{{ profile.user }}'s profile</h1> 11 <h1>{{ profile.user }}'s profile</h1>
11 12
12 <dl> 13 <dl>
13 {% if profile.user.first_name or profile.user.last_name %} 14 {% if profile.user.first_name or profile.user.last_name %}
31 {% if profile.blurb %} 32 {% if profile.blurb %}
32 <h2>About {{ name }}</h2> 33 <h2>About {{ name }}</h2>
33 34
34 <p>{{ profile.blurb }}</p> 35 <p>{{ profile.blurb }}</p>
35 {% endif %} 36 {% endif %}
37 </div><div id="sidebar">
38 <h2>Contributions</h2>
39
40 <h3><a href="{% url bundle_new %}">Bundles</a></h3>
41 {% if bundles %}
42 <ul>
43 {% for bundle in bundles %}
44 <li><a href="{{ bundle.get_absolute_url }}">{{ bundle }}</a></li>
45 {% endfor %}
46 </ul>
47 {% else %}
48 <p>{{ name }} does not have any bundles.</p>
49 {% endif %}
50
51 <h3><a href="{% url snippet_new %}">Snippets</a></h3>
52 {% if snippets %}
53 <ul>
54 {% for snippet in snippets %}
55 <li><a href="{{ snippet.get_absolute_url }}">{{ snippet }}</a></li>
56 {% endfor %}
57 </ul>
58 {% else %}
59 <p>{{ name }} does not have any snippets.</p>
60 {% endif %}
61 </div>
36 {% endblock %} 62 {% endblock %}
37
38 {% block content-related %}
39 {% if bundles or snippets %}
40 <div id="info">
41 <h3>
42 Contributions by {{name}}
43 </h3>
44 <div class="whitebox">
45 {% if bundles %}
46 <h5>
47 Bundles
48 </h5>
49 <ul>
50 {% for b in bundles %}
51 <li>
52 <a href="{% url agora.apps.bundle.views.detail profile.user b %}">
53 {{b.name}}
54 </a>
55 </li>
56 {% endfor %}
57 </ul>
58 {% endif %}
59 {% if snippets %}
60 <h5>
61 Snippets
62 </h5>
63 <ul>
64 {% for s in snippets %}
65 <li><a href="{% url snippet_details s %}">
66 {% if s.title %}
67 {{s.title}}
68 {% else %}
69 Snippet #{{s.pk}}
70 {% endif %}
71 </a></li>
72 {% endfor %}
73 </ul>
74 {% endif %}
75 </div>
76 </div>
77 {% endif %}
78 {% endblock content-related %}