Mercurial > agora-palash
comparison templates/code.djhtml @ 106:17bc502c65a4
Update "code" page
Changed layout and added real data for the snippets list.
author | dellsystem <ilostwaldo@gmail.com> |
---|---|
date | Tue, 11 Sep 2012 18:06:01 -0400 |
parents | 64f69c85df71 |
children | 2bca07be6e51 |
comparison
equal
deleted
inserted
replaced
105:2602f54c018d | 106:17bc502c65a4 |
---|---|
2 | 2 |
3 {% block content %} | 3 {% block content %} |
4 | 4 |
5 <h1>Browse code submissions</h1> | 5 <h1>Browse code submissions</h1> |
6 | 6 |
7 <a class="pill" href="{% url snippet_new %}">Post a snippet</a> | 7 {% if not user.is_authenticated %} |
8 {% if user.is_authenticated %} | 8 <p class="hint"> |
9 <a class="pill" href="">Upload a single</a> | 9 Welcome to Agora. |
10 <a class="pill" href="">Upload a bundle</a> | 10 </p> |
11 {% else %} | |
12 <a class="pill" href="{% url auth_login %}">Login to upload singles/bundles</a> | |
13 {% endif %} | 11 {% endif %} |
14 | |
15 <br /> | |
16 <br /> | |
17 | 12 |
18 <div class="row"> | 13 <div class="row"> |
19 <div class="span3"> | 14 <div class="span3"> |
20 <h2 class="center-align"><a href="{% url snippet_explore %}">Snippets</a></h2> | 15 <h2 class="center-align">Snippets</h2> |
16 <a class="pill" href="{% url snippet_new %}"> | |
17 Post a snippet | |
18 </a> | |
19 {% if snippets %} | |
21 <ul> | 20 <ul> |
22 <li>test</li> | 21 {% for snippet in snippets %} |
23 <li>test</li> | 22 <li> |
24 <li>test</li> | 23 <a href="{{ snippet.get_absolute_url }}"> |
25 <li>test</li> | 24 <strong>{{ snippet.get_title }}</strong> |
25 </a> | |
26 by | |
27 {% if snippet.author %} | |
28 <a href="{{ snippet.author.get_absolute_url }}"> | |
29 {{ snippet.author }} | |
30 </a> | |
31 {% else %} | |
32 anonymous | |
33 {% endif %} | |
34 <br /> | |
35 {{ snippet.published }} | |
36 </li> | |
37 {% endfor %} | |
26 </ul> | 38 </ul> |
39 <p class="right-float"> | |
40 <a href="{% url snippet_explore %}">View more »</a> | |
41 </p> | |
42 {% else %} | |
43 <p>No one has yet created a snippet. | |
44 <a href="{% url new_snippet %}">Be the first!</a> | |
45 </p> | |
46 {% endif %} | |
27 </div><div class="span3"> | 47 </div><div class="span3"> |
28 <h2 class="center-align">Modules</h2> | 48 <h2 class="center-align">Modules</h2> |
49 {% if user.is_authenticated %} | |
50 <a class="pill" href="">Upload a modules</a> | |
51 {% else %} | |
52 <a class="pill" href="{% url auth_login %}"> | |
53 Login to upload modules | |
54 </a> | |
55 {% endif %} | |
56 {% if modules %} | |
29 <ul> | 57 <ul> |
30 <li>test</li> | 58 {% for module in modules %} |
31 <li>test</li> | 59 <li>{{ module }}</li> |
32 <li>test</li> | 60 {% endfor %} |
33 <li>test</li> | |
34 </ul> | 61 </ul> |
62 {% else %} | |
63 <p>This feature is not yet available.</p> | |
64 {% endif %} | |
35 </div><div class="span3"> | 65 </div><div class="span3"> |
36 <h2 class="center-align">Forge</h2> | 66 <h2 class="center-align">Forge</h2> |
67 {% if user.is_authenticated %} | |
68 <a class="pill" href="">Add a module to the forge</a> | |
69 {% else %} | |
70 <a class="pill" href="{% url auth_login %}"> | |
71 Login to add a module to the forge | |
72 </a> | |
73 {% endif %} | |
74 {% if forge %} | |
37 <ul> | 75 <ul> |
38 <li>test</li> | 76 {% for forge_module in forge %} |
39 <li>test</li> | 77 <li>{{ forge_module }}</li> |
40 <li>test</li> | 78 {% endfor %} |
41 <li>test</li> | |
42 </ul> | 79 </ul> |
80 {% else %} | |
81 <p>This feature is not yet available.</p> | |
82 {% endif %} | |
43 </div> | 83 </div> |
44 </div> | 84 </div> |
45 | 85 |
46 {% endblock %} | 86 {% endblock %} |