From 431f589903ea3f03678a3c20acfd478ae4c15805 Mon Sep 17 00:00:00 2001 From: Arun yadav Date: Fri, 18 May 2012 16:37:44 +0530 Subject: templates and views for history, with colour diff v1 --- gstudio/templates/gstudio/base.html | 10 +-- gstudio/templates/gstudio/display.html | 35 ++++++---- gstudio/templates/gstudio/version_diff.html | 103 ++++++++++++++++++---------- 3 files changed, 92 insertions(+), 56 deletions(-) (limited to 'gstudio/templates') diff --git a/gstudio/templates/gstudio/base.html b/gstudio/templates/gstudio/base.html index d0363f3e..435a6539 100644 --- a/gstudio/templates/gstudio/base.html +++ b/gstudio/templates/gstudio/base.html @@ -42,16 +42,10 @@ -->
- - - - - - - +

{% trans "Versions" %}

- {% for sid in object.get_ssid reversed %} + {% for sid in object.ref.get_ssid %} {{ object.title }}{{ object.id }}{{ sid }}
{% endfor %} diff --git a/gstudio/templates/gstudio/display.html b/gstudio/templates/gstudio/display.html index f2053a6e..67d9fffb 100644 --- a/gstudio/templates/gstudio/display.html +++ b/gstudio/templates/gstudio/display.html @@ -523,28 +523,39 @@ $(function() { {% block sidebar %}
+ +

{% trans "Versions" %}

--> -

{% trans "Versions" %}

+ } + -
+
{% for sid in nt.get_ssid reversed %} {% endfor %} diff --git a/gstudio/templates/gstudio/version_diff.html b/gstudio/templates/gstudio/version_diff.html index 81305749..ee5e305c 100644 --- a/gstudio/templates/gstudio/version_diff.html +++ b/gstudio/templates/gstudio/version_diff.html @@ -111,24 +111,32 @@ {{ ver_new.title }} -
- {% with nt1.html_content|safe as object_content %} - Name:{{ ver_new.title }}
- {% if ver_new.altnames %} - Alternate names: {{ diffs }} -
- {% endif %} - {% if ver_new.plural %} - Plural Name:{{ ver_new.plural }}
- {% endif %} - {% if nt1.get_rendered_nbh.authors %}Authors: - {% endif %} - {% for author in nt1.authors.all %} - - - {% if not forloop.last %}, {% endif %} - {% endfor %}
+ {% block content56 %}{% for each in diffs1 %} + {% autoescape off %} + {{ each }}
+ {% endautoescape %}{% endfor %} {% endblock %} + + + + + + + + + + + + + + + + + + + + + + {% endwith %} {% endblock %} {% endblock %} @@ -142,30 +150,53 @@ {{ ver_old.title }} -
- {% with nt1.html_content|safe as object_content %} - Name:{{ ver_old.title }}
- {% if ver_old.altnames %} - Alternate names:{{ ver_old.altnames}} -
- {% endif %} - {% if ver_old.plural %} - Plural Name:{{ ver_old.plural }}
- {% endif %} - {% if nt1.get_rendered_nbh.authors %}Authors: - {% endif %} - {% for author in nt1.authors.all %} - - - {% if not forloop.last %}, {% endif %} - {% endfor %}
+ {% block content85 %}{% for each in diffs %} + {% autoescape off %} + {{ each }}
+ {% endautoescape %}{% endfor %} {% endblock %} + + + + + + + + + + + + + + + + + + + + + + {% endwith %} {% endblock %} {% endblock %} + + + + + + + + + + + +
- {{ nt.id }}.{{ sid }} + {{ nt.id }}.{{ sid }} - {{ nt.id }}.{{ sid }} + {{ nt.id }}.{{ sid }}
Difference between Selected Versions
{% block content5 %}{% for each in diffs %} + {% autoescape off %} + {{ each }}
+ {% endautoescape %}{% endfor %} {% endblock %}
-- cgit v1.2.3-70-g09d2