| author | reno |
| Fri, 11 Dec 2009 12:03:51 +0100 | |
| changeset 59 | 8a2d933209aa |
| parent 24 | c8a95e540b79 |
| child 62 | 381538cb3a8b |
| permissions | -rw-r--r-- |
| 0 | 1 |
{% extends "site/layout/base_text.html" %} |
2 |
{% load com %} |
|
3 |
{% load i18n %} |
|
4 |
{% load local_perms %} |
|
5 |
{% block main %} |
|
6 |
||
7 |
{% get_local_text_perm request text can_edit_text as can_edit_text %} |
|
8 |
||
9 |
<script type="text/javascript"> |
|
10 |
<!-- |
|
11 |
tb_conf['current_tab'] = 'history'; |
|
12 |
--> |
|
13 |
</script> |
|
14 |
||
15 |
<script type="text/javascript"> |
|
16 |
<!-- |
|
17 |
$(function() { |
|
18 |
$(".arrow").bind("mouseenter", function(e){ |
|
19 |
$(this).attr('src','{{ MEDIA_URL }}img/arrow_w_red.png'); |
|
20 |
}); |
|
21 |
|
|
22 |
$(".arrow").bind("mouseout", function(e){ |
|
23 |
$(this).attr('src','{{ MEDIA_URL }}img/arrow_w_blue.png'); |
|
24 |
}); |
|
25 |
|
|
26 |
$(".ver_span").bind("mouseenter", function(e){ |
|
27 |
$(this).removeClass('version_item').addClass('version_item-selected'); |
|
28 |
}); |
|
29 |
|
|
30 |
$(".ver_span").bind("mouseout", function(e){ |
|
31 |
$(this).removeClass('version_item-selected').addClass('version_item'); |
|
32 |
}); |
|
33 |
}); |
|
34 |
--> |
|
35 |
</script> |
|
36 |
||
37 |
<div id="text_history" class="tab-meta"> |
|
38 |
<h2>{% blocktrans %}Versions:{% endblocktrans %}</h2> |
|
39 |
||
40 |
<span id="text_history_timeline"> |
|
41 |
{% for v1, v2, color in paired_versions %} |
|
| 21 | 42 |
<a href="{% url text-history-version text.key v1.version_number %}" title="{% blocktrans with v1.version_number as v1number %}version #{{ v1number }}{% endblocktrans %}{% if v1.name %} {% blocktrans with v1.name as v1name %}by {{ v1name }}{% endblocktrans %}{% endif %}{% if v1.note %} / {{ v1.note }}{% endif %} ({% blocktrans with v1.created|local_date as v1created %}created {{ v1created }}{% endblocktrans %})"> |
| 0 | 43 |
<span id={{ v1_id }} |
44 |
style="background: {{ color }};" |
|
45 |
class="ver_span {% choice_string v1_id v1.id version_item-selected or v1.id v2_id version_item-selected version_item %}">{{ forloop.counter }}</span></a> |
|
46 |
||
47 |
{% if v2 %} |
|
48 |
<span class="{% choice_string v2_nid v2.version_number diff_item-selected diff_item %}"> |
|
49 |
<!-- <a href="{% url text-history-compare text.key v1.version_number v2.version_number %}" title="diff between {{ forloop.counter }} and following ">→</a>--> |
|
50 |
<a href="{% url text-history-compare text.key v1.version_number v2.version_number %}" title="{% blocktrans with v1.version_number as v1number and v2.version_number as v2number %}differences between version #{{ v1number }} and #{{ v2number }}{% endblocktrans %}"><span style="vertical-align:middle;" > |
|
51 |
<img class="arrow" |
|
52 |
id="arrow_{{ v1.version_number }}" |
|
53 |
src="{{ MEDIA_URL }}img/arrow_w_blue.png"/></span></a> |
|
54 |
</span> |
|
55 |
{% endif %} |
|
56 |
{% endfor %} |
|
57 |
</span> |
|
58 |
||
59 |
<h2>{% blocktrans %}Authors:{% endblocktrans %}</h2> |
|
60 |
{% for author,color in author_colors %} |
|
61 |
<span style="background: {{ color }};">{{ author }}</span> |
|
62 |
{% empty %} |
|
63 |
<a href="{% url text-authors text.key %}">{% blocktrans %}authors{% endblocktrans %}</a> |
|
64 |
{% endfor %} |
|
65 |
||
66 |
{% if can_edit_text %} |
|
67 |
<h2>{% blocktrans %}Actions:{% endblocktrans %}</h2> |
|
68 |
<form action="{% url text-revert text.key v1_nid %}" method="POST" >{% blocktrans %}Revert to version #{{ v1_nid }}:{% endblocktrans %}<input name="revert" type="submit" value="Revert"/></form> |
|
69 |
{% endif %} |
|
70 |
||
71 |
{% if v2_nid %} |
|
72 |
<h2>{% blocktrans with v1_nid as v1_nid and v1_nid as v1_nid %}Differences between version #{{ v1_nid }} and version #{{ v2_nid }}:{% endblocktrans %}</h2> |
|
73 |
{% else %} |
|
74 |
<h2>{% blocktrans with version1.created|local_date:tz as date and v1_nid as version_number and version1.title as title %}Version #{{ version_number }} entitled "{{ title }}" and created on {{ date }}:{% endblocktrans %}</h2> |
|
75 |
{% endif %} |
|
76 |
{% autoescape off %} |
|
77 |
||
78 |
{% if v2_nid %} |
|
79 |
<br /> |
|
80 |
<table class="diff" width="100%"> |
|
81 |
<tr> |
|
82 |
<td class="diff-head" width="45%"> |
|
83 |
{% blocktrans with v1_nid as version_number and version1.title as title %}{{ title }} / version #{{ version_number }}{% endblocktrans %} |
|
84 |
<br/> |
|
85 |
{% blocktrans with version1.created|local_date:tz as date %}created {{ date }}{% endblocktrans %} |
|
86 |
</td> |
|
87 |
<td width="10%"></td> |
|
88 |
<td class="diff-head" width="45%"> |
|
89 |
{% blocktrans with v2_nid as version_number and version2.title as title %}{{ title }} / version #{{ version_number }}{% endblocktrans %} |
|
90 |
<br/> |
|
91 |
{% blocktrans with version2.created|local_date:tz as date %}created {{ date }}{% endblocktrans %} |
|
92 |
||
93 |
</td> |
|
94 |
</tr> |
|
95 |
</table> |
|
96 |
{% endif %} |
|
97 |
||
98 |
{{ content }} |
|
|
59
8a2d933209aa
BUG FIX : in text history tab text view frame now expands to maximum
reno
parents:
24
diff
changeset
|
99 |
<div id="autoexpand_text_view_frame_container"> |
| 24 | 100 |
{{ embed_code }} |
|
59
8a2d933209aa
BUG FIX : in text history tab text view frame now expands to maximum
reno
parents:
24
diff
changeset
|
101 |
</div> |
| 24 | 102 |
|
| 0 | 103 |
{% endautoescape %} |
104 |
</div> |
|
105 |
{% endblock %} |