Mercurial > agora
annotate templates/snippet/snippet_details.djhtml @ 196:134f726fd62c
Removed extrawhitespaces and moved comments template files to templates folder
author | Ahsan Ali Shahid <ahsan.ali.shahid@gmail.com> |
---|---|
date | Thu, 04 Jul 2013 15:45:50 +0500 |
parents | baf8776dc44d |
children | c2a1c8950db2 |
rev | line source |
---|---|
44
f697817182d1
Rename .html snippets to .djhtml
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
42
diff
changeset
|
1 {% extends "snippet/base.djhtml" %} |
42
ab608f27ecd5
Copy preliminary django-paste code for snippets along with mptt. Works clunkily. Still need to adapt it for Agora.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
2 {% load mptt_tags %} |
ab608f27ecd5
Copy preliminary django-paste code for snippets along with mptt. Works clunkily. Still need to adapt it for Agora.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
3 {% load i18n %} |
ab608f27ecd5
Copy preliminary django-paste code for snippets along with mptt. Works clunkily. Still need to adapt it for Agora.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
4 |
ab608f27ecd5
Copy preliminary django-paste code for snippets along with mptt. Works clunkily. Still need to adapt it for Agora.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
5 {% block extrahead %} |
46
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
6 {% if request.session.userprefs %} |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
7 <style type="text/css" media="all"> |
102
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
8 .highlight { |
46
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
9 {# FIXME: Thats stupid #} |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
10 {% ifnotequal request.session.userprefs.font_family "None" %} |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
11 font-family: {{ request.session.userprefs.font_family }} !important; |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
12 {% endifnotequal %} |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
13 {% ifnotequal request.session.userprefs.font_size "None" %} |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
14 font-size: {{ request.session.userprefs.font_size }}px !important; |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
15 {% endifnotequal %} |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
16 {% ifnotequal request.session.userprefs.line_height "None" %} |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
17 line-height: {{ request.session.userprefs.line_height }}px !important; |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
18 {% endifnotequal %} |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
19 } |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
20 </style> |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
21 {% endif %} |
42
ab608f27ecd5
Copy preliminary django-paste code for snippets along with mptt. Works clunkily. Still need to adapt it for Agora.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
22 {% endblock %} |
ab608f27ecd5
Copy preliminary django-paste code for snippets along with mptt. Works clunkily. Still need to adapt it for Agora.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
23 |
46
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
24 {% block title %} |
102
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
25 Viewing snippet — {{ snippet.get_title }} |
46
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
26 {% endblock title %} |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
27 |
42
ab608f27ecd5
Copy preliminary django-paste code for snippets along with mptt. Works clunkily. Still need to adapt it for Agora.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
28 {% block headline %} |
46
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
29 <h1> |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
30 {% trans "Snippet" %} #{{ snippet.pk }} |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
31 {% if snippet.parent_id %} |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
32 {% blocktrans with snippet.parent.get_absolute_url as parent_url and snippet.parent.id as parent_id %} |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
33 (Copy of <a href="{{ parent_url }}">snippet #{{ parent_id }}</a>) |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
34 {% endblocktrans %} |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
35 {% endif %} |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
36 <span class="date"> |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
37 {{ snippet.published|date:_("DATETIME_FORMAT") }} ({% trans "UTC" %}) |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
38 </span> |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
39 </h1> |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
40 {% endblock headline %} |
b7c1c22fdfe8
Format code for 80 columns, add some js to static/ dir
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
44
diff
changeset
|
41 |
42
ab608f27ecd5
Copy preliminary django-paste code for snippets along with mptt. Works clunkily. Still need to adapt it for Agora.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
42 {% load snippet_tags %} |
ab608f27ecd5
Copy preliminary django-paste code for snippets along with mptt. Works clunkily. Still need to adapt it for Agora.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
43 |
ab608f27ecd5
Copy preliminary django-paste code for snippets along with mptt. Works clunkily. Still need to adapt it for Agora.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
44 {% block content %} |
102
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
45 <div id="non-sidebar"> |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
46 <div id="diff"> |
48
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
47 </div> |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
48 |
102
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
49 <h1>{{ snippet.get_title }}</h1> |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
50 <div class="snippet-options"> |
148
f876cc7b7270
Clean up snippet view HTML slightly (minor edit)
dellsystem <ilostwaldo@gmail.com>
parents:
145
diff
changeset
|
51 <abbr title="{% trans "Time to live" %}"> |
f876cc7b7270
Clean up snippet view HTML slightly (minor edit)
dellsystem <ilostwaldo@gmail.com>
parents:
145
diff
changeset
|
52 TTL: |
48
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
53 </abbr> |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
54 {{ snippet.expires|timeuntil }} |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
55 — |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
56 {% if snippet.pk|in_list:request.session.snippet_list %} |
102
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
57 <a onclick="return confirm('{% trans "Really delete this snippet?" %}')" |
48
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
58 href="{% url snippet_delete snippet.secret_id %}"> |
102
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
59 Delete this snippet |
48
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
60 </a> |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
61 — |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
62 {% endif %} |
151
c7be7def8b57
Bundles! (basic functionality)
dellsystem <ilostwaldo@gmail.com>
parents:
148
diff
changeset
|
63 {% include "snippet/snippet_options.djhtml" %} |
52
349162d0ce19
Fundamental fixes in snippet templates
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
48
diff
changeset
|
64 <div> |
102
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
65 Author: |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
66 {% if snippet.author %} |
148
f876cc7b7270
Clean up snippet view HTML slightly (minor edit)
dellsystem <ilostwaldo@gmail.com>
parents:
145
diff
changeset
|
67 <a href="{{ snippet.author.get_absolute_url }}"> |
102
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
68 {{ snippet.author }} |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
69 </a> |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
70 {% else %} |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
71 anonymous |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
72 {% endif %} |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
73 — |
175
1be4e1229711
Show number of views on snippet details page
dellsystem <ilostwaldo@gmail.com>
parents:
151
diff
changeset
|
74 Language: {{ language }} |
1be4e1229711
Show number of views on snippet details page
dellsystem <ilostwaldo@gmail.com>
parents:
151
diff
changeset
|
75 — |
1be4e1229711
Show number of views on snippet details page
dellsystem <ilostwaldo@gmail.com>
parents:
151
diff
changeset
|
76 Number of views: {{ snippet.num_views }} |
52
349162d0ce19
Fundamental fixes in snippet templates
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
48
diff
changeset
|
77 </div> |
121
21f428087edd
Remove extra closing </div> tag
dellsystem <ilostwaldo@gmail.com>
parents:
120
diff
changeset
|
78 </div><!-- closes .snippet-options --> |
102
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
79 <br /> |
151
c7be7def8b57
Bundles! (basic functionality)
dellsystem <ilostwaldo@gmail.com>
parents:
148
diff
changeset
|
80 |
c7be7def8b57
Bundles! (basic functionality)
dellsystem <ilostwaldo@gmail.com>
parents:
148
diff
changeset
|
81 {% include "snippet/snippet_box.djhtml" with lines=snippet.content_splitted %} |
48
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
82 |
102
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
83 <br /> |
196
134f726fd62c
Removed extrawhitespaces and moved comments template files to templates folder
Ahsan Ali Shahid <ahsan.ali.shahid@gmail.com>
parents:
195
diff
changeset
|
84 <h2> Comments for this snippet: </h2>{% with snippet as object %}{% include "comments/rawcomment.html" %}{% endwith %}. |
48
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
85 |
102
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
86 <h2 id="revise">{% trans "Revise this snippet" %}</h2> |
42
ab608f27ecd5
Copy preliminary django-paste code for snippets along with mptt. Works clunkily. Still need to adapt it for Agora.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
87 |
102
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
88 {% include "snippet/snippet_form.djhtml" %} |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
89 </div><div id="sidebar"> |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
90 <h2>{% trans "History" %}</h2> |
189
683d41e124b7
Changed snippet template so that now anonymous user cannot see revision history. To see revision history you must login.
ahsanalishahid <ahsan.ali.shahid@gmail.com>
parents:
175
diff
changeset
|
91 {% if user.is_authenticated %} |
102
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
92 {% if no_descendants %} |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
93 <p>{% trans "This snippet has no children!" %}</p> |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
94 <p> |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
95 <a href="#revise"> |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
96 {% trans "Make one" %} » |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
97 </a> |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
98 </p> |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
99 {% else %} |
48
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
100 <form method="get" id="diffform" action="{% url snippet_diff %}"> |
145
ee999b9f33f5
Add horizontal scrollbar to snippet history box
dellsystem <ilostwaldo@gmail.com>
parents:
138
diff
changeset
|
101 <div id="snippet-history"> |
48
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
102 {% for tree_item,structure in tree|tree_info %} |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
103 {% if structure.new_level %} |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
104 <ul> |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
105 <li> |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
106 {% else %} |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
107 </li> |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
108 <li> |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
109 {% endif %} |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
110 <div> |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
111 <span class="diff"> |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
112 <input type="radio" name="a" |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
113 value="{{ tree_item.id }}" |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
114 {% ifequal tree_item.id snippet.parent_id %} |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
115 checked="checked" |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
116 {% endifequal %}/> |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
117 <input type="radio" |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
118 name="b" |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
119 value="{{ tree_item.id }}" |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
120 {% ifequal snippet tree_item %} |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
121 checked="checked" |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
122 {% endifequal %}/> |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
123 </span> |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
124 {% ifequal snippet tree_item %} |
102
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
125 <strong>{{ tree_item.get_title }}</strong> |
48
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
126 {% else %} |
102
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
127 <a href="{{ tree_item.get_absolute_url }}"> |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
128 {{ tree_item.get_title }} |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
129 </a> |
48
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
130 {% endifequal %} |
121
21f428087edd
Remove extra closing </div> tag
dellsystem <ilostwaldo@gmail.com>
parents:
120
diff
changeset
|
131 </div><!-- closes the div surrounding the .diff span --> |
48
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
132 {% for level in structure.closed_levels %} |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
133 </li> |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
134 </ul> |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
135 {% endfor %} |
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
136 {% endfor %} |
195
baf8776dc44d
added code for the integration of comment system into bundles and snippets.
ahsanalishahid <ahsan.ali.shahid@gmail.com>
parents:
189
diff
changeset
|
137 |
baf8776dc44d
added code for the integration of comment system into bundles and snippets.
ahsanalishahid <ahsan.ali.shahid@gmail.com>
parents:
189
diff
changeset
|
138 <div class="submit"> |
baf8776dc44d
added code for the integration of comment system into bundles and snippets.
ahsanalishahid <ahsan.ali.shahid@gmail.com>
parents:
189
diff
changeset
|
139 <input type="submit" value="{% trans "Compare" %}"/> |
baf8776dc44d
added code for the integration of comment system into bundles and snippets.
ahsanalishahid <ahsan.ali.shahid@gmail.com>
parents:
189
diff
changeset
|
140 |
baf8776dc44d
added code for the integration of comment system into bundles and snippets.
ahsanalishahid <ahsan.ali.shahid@gmail.com>
parents:
189
diff
changeset
|
141 |
baf8776dc44d
added code for the integration of comment system into bundles and snippets.
ahsanalishahid <ahsan.ali.shahid@gmail.com>
parents:
189
diff
changeset
|
142 </div><!-- closes the .tree div --> |
145
ee999b9f33f5
Add horizontal scrollbar to snippet history box
dellsystem <ilostwaldo@gmail.com>
parents:
138
diff
changeset
|
143 <br /> |
195
baf8776dc44d
added code for the integration of comment system into bundles and snippets.
ahsanalishahid <ahsan.ali.shahid@gmail.com>
parents:
189
diff
changeset
|
144 |
145
ee999b9f33f5
Add horizontal scrollbar to snippet history box
dellsystem <ilostwaldo@gmail.com>
parents:
138
diff
changeset
|
145 </div><!-- closes the .submit div --> |
48
329a9d17be88
Implement/fix js for snippets and make whiteboxes all same width
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
47
diff
changeset
|
146 </form> |
195
baf8776dc44d
added code for the integration of comment system into bundles and snippets.
ahsanalishahid <ahsan.ali.shahid@gmail.com>
parents:
189
diff
changeset
|
147 |
baf8776dc44d
added code for the integration of comment system into bundles and snippets.
ahsanalishahid <ahsan.ali.shahid@gmail.com>
parents:
189
diff
changeset
|
148 |
baf8776dc44d
added code for the integration of comment system into bundles and snippets.
ahsanalishahid <ahsan.ali.shahid@gmail.com>
parents:
189
diff
changeset
|
149 |
102
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
150 {% endif %} |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
151 <br /> |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
152 <h2>{% trans "Options" %}</h2> |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
153 <a href="{% url snippet_details_raw snippet.secret_id %}"> |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
154 {% trans "View raw" %} |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
155 </a> |
189
683d41e124b7
Changed snippet template so that now anonymous user cannot see revision history. To see revision history you must login.
ahsanalishahid <ahsan.ali.shahid@gmail.com>
parents:
175
diff
changeset
|
156 {% else %} |
683d41e124b7
Changed snippet template so that now anonymous user cannot see revision history. To see revision history you must login.
ahsanalishahid <ahsan.ali.shahid@gmail.com>
parents:
175
diff
changeset
|
157 <h4>{% trans "Login to see revision history" %}</h4> |
683d41e124b7
Changed snippet template so that now anonymous user cannot see revision history. To see revision history you must login.
ahsanalishahid <ahsan.ali.shahid@gmail.com>
parents:
175
diff
changeset
|
158 {% endif %} |
683d41e124b7
Changed snippet template so that now anonymous user cannot see revision history. To see revision history you must login.
ahsanalishahid <ahsan.ali.shahid@gmail.com>
parents:
175
diff
changeset
|
159 |
683d41e124b7
Changed snippet template so that now anonymous user cannot see revision history. To see revision history you must login.
ahsanalishahid <ahsan.ali.shahid@gmail.com>
parents:
175
diff
changeset
|
160 |
195
baf8776dc44d
added code for the integration of comment system into bundles and snippets.
ahsanalishahid <ahsan.ali.shahid@gmail.com>
parents:
189
diff
changeset
|
161 |
baf8776dc44d
added code for the integration of comment system into bundles and snippets.
ahsanalishahid <ahsan.ali.shahid@gmail.com>
parents:
189
diff
changeset
|
162 |
baf8776dc44d
added code for the integration of comment system into bundles and snippets.
ahsanalishahid <ahsan.ali.shahid@gmail.com>
parents:
189
diff
changeset
|
163 |
121
21f428087edd
Remove extra closing </div> tag
dellsystem <ilostwaldo@gmail.com>
parents:
120
diff
changeset
|
164 </div><!-- closes the .sidebar div --> |
102
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
55
diff
changeset
|
165 {% endblock %} |
42
ab608f27ecd5
Copy preliminary django-paste code for snippets along with mptt. Works clunkily. Still need to adapt it for Agora.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
166 |
195
baf8776dc44d
added code for the integration of comment system into bundles and snippets.
ahsanalishahid <ahsan.ali.shahid@gmail.com>
parents:
189
diff
changeset
|
167 |
baf8776dc44d
added code for the integration of comment system into bundles and snippets.
ahsanalishahid <ahsan.ali.shahid@gmail.com>
parents:
189
diff
changeset
|
168 |
baf8776dc44d
added code for the integration of comment system into bundles and snippets.
ahsanalishahid <ahsan.ali.shahid@gmail.com>
parents:
189
diff
changeset
|
169 |
baf8776dc44d
added code for the integration of comment system into bundles and snippets.
ahsanalishahid <ahsan.ali.shahid@gmail.com>
parents:
189
diff
changeset
|
170 |
baf8776dc44d
added code for the integration of comment system into bundles and snippets.
ahsanalishahid <ahsan.ali.shahid@gmail.com>
parents:
189
diff
changeset
|
171 |
42
ab608f27ecd5
Copy preliminary django-paste code for snippets along with mptt. Works clunkily. Still need to adapt it for Agora.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
172 {% block script_footer %} |
ab608f27ecd5
Copy preliminary django-paste code for snippets along with mptt. Works clunkily. Still need to adapt it for Agora.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
173 <script type="text/javascript"> |
47
139e4b8ffb17
Fix display of js code and copy-pastability of displayed code
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
46
diff
changeset
|
174 {%include "snippet/snippet_details.js" %} |
42
ab608f27ecd5
Copy preliminary django-paste code for snippets along with mptt. Works clunkily. Still need to adapt it for Agora.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
175 </script> |
196
134f726fd62c
Removed extrawhitespaces and moved comments template files to templates folder
Ahsan Ali Shahid <ahsan.ali.shahid@gmail.com>
parents:
195
diff
changeset
|
176 {% endblock script_footer %} |