From 244509e3eb4058a3aff505e3836d43d64b08fe7d Mon Sep 17 00:00:00 2001 From: Arun yadav Date: Sat, 19 May 2012 15:15:51 +0530 Subject: Difference generation between versions done partly, list of differences generated. --- gstudio/templates/gstudio/base.html | 7 +- gstudio/templates/gstudio/display.html | 19 ++--- gstudio/templates/gstudio/version_diff.html | 120 +++++++++++++++------------- 3 files changed, 80 insertions(+), 66 deletions(-) (limited to 'gstudio/templates') diff --git a/gstudio/templates/gstudio/base.html b/gstudio/templates/gstudio/base.html index 435a653..bf84918 100644 --- a/gstudio/templates/gstudio/base.html +++ b/gstudio/templates/gstudio/base.html @@ -45,9 +45,14 @@

{% trans "Versions" %}

+ {% for sid in object.ref.get_ssid %} - {{ object.title }}{{ object.id }}{{ sid }}
+ + + {{ object.title }} {{ object.id }}.{{ forloop.counter }}
+ {% endfor %} +
diff --git a/gstudio/templates/gstudio/display.html b/gstudio/templates/gstudio/display.html index 67d9fff..184b58d 100644 --- a/gstudio/templates/gstudio/display.html +++ b/gstudio/templates/gstudio/display.html @@ -493,10 +493,9 @@ $(function() {

{% block content %} {% block nodetype-content %}

- {{ ver_dict.title }} + {{ ver_dict.title }} {{ nt.id }}.{{ cnt }}

-
{% with nt.html_content|safe as object_content %} Name:{{ ver_dict.title }}
{% if ver_dict.altnames %} @@ -547,19 +546,21 @@ $(function() { } - +
- {% for sid in nt.get_ssid reversed %} + + + + {% for sid in nt.get_ssid %} + {% ifnotequal forloop.counter cnt %} - {% endfor %} -
{{ nt.id }}.{{ cnt }}
- {{ nt.id }}.{{ sid }} - {{ nt.id }}.{{ sid }} -
+ {{ nt.id }}.{{ forloop.counter }} + {% endifnotequal %} + {% endfor %} diff --git a/gstudio/templates/gstudio/version_diff.html b/gstudio/templates/gstudio/version_diff.html index ee5e305..a640f07 100644 --- a/gstudio/templates/gstudio/version_diff.html +++ b/gstudio/templates/gstudio/version_diff.html @@ -111,32 +111,32 @@ {{ ver_new.title }} - {% block content56 %}{% for each in diffs1 %} - {% autoescape off %} - {{ each }}
- {% endautoescape %}{% endfor %} {% endblock %} + + + + - - - - - - - - - - - - + {% with nt1.html_content|safe as object_content %}
+ Name:{{ ver_new.title }}
+ {% if ver_new.altnames %} + Alternate names:{{ ver_new.altnames }} +
+ {% endif %} + {% if ver_new.plural %} + Plural Name:{{ ver_new.plural }}
+ {% endif %} + + Content:{{ ver_new.content }}
+ - - - - - - - - + {% if nt1.get_rendered_nbh.authors %}Authors: + {% endif %} + {% for author in nt1.authors.all %} + + + {% if not forloop.last %}, {% endif %} + {% endfor %}
{% endwith %} {% endblock %} {% endblock %} @@ -149,33 +149,41 @@

{{ ver_old.title }} -

- {% block content85 %}{% for each in diffs %} - {% autoescape off %} - {{ each }}
- {% endautoescape %}{% endfor %} {% endblock %} - - - - - - - - - - - - - + + + + + +
+ {% with nt1.html_content|safe as object_content %} + Name:{% autoescape off %} + {{ diffs.0 }} + {% endautoescape %}
+ {% if ver_old.altnames %} + Alternate names: {% autoescape off %} + {{ diffs.1 }} + {% endautoescape %} +
+ {% endif %} + {% if ver_old.plural %} + Plural Name: {% autoescape off %} + {{ diffs.2 }} + {% endautoescape %}
+ {% endif %} + + Content: {% autoescape off %} + {{ diffs.3 }} + {% endautoescape %}
+ - - - - - - - - + {% if nt1.get_rendered_nbh.authors %}Authors: + {% endif %} + {% for author in nt1.authors.all %} + + + {% if not forloop.last %}, {% endif %} + {% endfor %}
{% endwith %} {% endblock %} {% endblock %} @@ -192,12 +200,12 @@ -Difference between Selected Versions -{% block content5 %}{% for each in diffs %} - {% autoescape off %} - {{ each }}
- {% endautoescape %}{% endfor %} {% endblock %}
- + + + + + + -- cgit v1.1