diff options
author | Arun yadav <arunkumar5587@gmail.com> | 2012-05-18 16:37:44 +0530 |
---|---|---|
committer | Arun yadav <arunkumar5587@gmail.com> | 2012-05-18 16:37:44 +0530 |
commit | 431f589903ea3f03678a3c20acfd478ae4c15805 (patch) | |
tree | edcfe264a8afaf6b2e8b1d21e7d0c9f08a050d79 /gstudio/templates | |
parent | 4d4df37a9f858d5fc2dc342d06d30b87031000d8 (diff) | |
download | gnowsys-431f589903ea3f03678a3c20acfd478ae4c15805.tar.gz |
templates and views for history, with colour diff v1
Diffstat (limited to 'gstudio/templates')
-rw-r--r-- | gstudio/templates/gstudio/base.html | 10 | ||||
-rw-r--r-- | gstudio/templates/gstudio/display.html | 35 | ||||
-rw-r--r-- | gstudio/templates/gstudio/version_diff.html | 103 |
3 files changed, 92 insertions, 56 deletions
diff --git a/gstudio/templates/gstudio/base.html b/gstudio/templates/gstudio/base.html index d0363f3..435a653 100644 --- a/gstudio/templates/gstudio/base.html +++ b/gstudio/templates/gstudio/base.html @@ -42,16 +42,10 @@ </div> --> <div class="History"> - <!-- <script type="text/javascript"> --> - <!-- function go_to_loc(sid) --> - <!-- { --> - <!-- window.location.href = "{{ object.get_version_url }}"+sid --> - <!-- } --> - - <!-- </script> --> + <h3>{% trans "Versions" %}</h3> <table border="1" cellspacing="0"> - {% for sid in object.get_ssid reversed %} + {% for sid in object.ref.get_ssid %} <a href="{{ object.get_version_url }}{{ sid }}">{{ object.title }}{{ object.id }}{{ sid }}</a><br> {% endfor %} </div> diff --git a/gstudio/templates/gstudio/display.html b/gstudio/templates/gstudio/display.html index f2053a6e..67d9fff 100644 --- a/gstudio/templates/gstudio/display.html +++ b/gstudio/templates/gstudio/display.html @@ -523,28 +523,39 @@ $(function() { {% block sidebar %} <div class="History"> + + <h3>{% trans "Versions" %}</h3> <script type="text/javascript"> - <!-- function go_to_loc(sid) --> - <!-- { --> - - <!-- window.location.href = "{{ nt.get_version_url }}"+sid --> - + function go_to_loc(sid) + { + + <!-- var len=document.history.group2.length --> + <!-- for(var i=0;i<len;i++) --> + <!-- { --> + <!-- var r=window.document.history.group2[i] --> + <!-- if(sid==r.) --> + <!-- { --> + <!-- r.disabled="false" --> + <!-- } --> + <!-- else --> + <!-- { --> + <!-- r.enabled="true" --> + <!-- } --> + <!-- } --> - <!-- } --> - - <!-- </script> --> - <h3>{% trans "Versions" %}</h3> + } + </script> - <form action="/nodetypes/display/showhistory/" > + <form name="history" action="/nodetypes/display/showhistory/" > <table cellspacing="0" border="2"> {% for sid in nt.get_ssid reversed %} <tr> <td> - <input type="radio" name="group1" value="{{ sid }}"><a href="{{ nt.get_version_url }}{{ sid }}">{{ nt.id }}.{{ sid }}</a></input> + <input type="radio" name="group1" value="{{ sid }}" onclick="go_to_loc('{{ sid }}')" ><a href="{{ nt.get_version_url }}{{ sid }}">{{ nt.id }}.{{ sid }}</a></input> </td> <td> - <input type="radio" name="group2" value="{{ sid }}">{{ nt.id }}.{{ sid }}</input> + <input type="radio" id="{{ sid }}"name="group2" value="{{ sid }}" >{{ nt.id }}.{{ sid }}</input> </td> {% endfor %} diff --git a/gstudio/templates/gstudio/version_diff.html b/gstudio/templates/gstudio/version_diff.html index 8130574..ee5e305 100644 --- a/gstudio/templates/gstudio/version_diff.html +++ b/gstudio/templates/gstudio/version_diff.html @@ -111,24 +111,32 @@ <a href="{{ nt1.get_absolute_url }}" title="{{ nt1.title }}" rel="bookmark">{{ ver_new.title }} </a> </h2> - <br> - {% with nt1.html_content|safe as object_content %} - <b>Name:<nbsp></b>{{ ver_new.title }}<br/> - {% if ver_new.altnames %} - <b> Alternate names:<nbsp></b> {{ diffs }} - <br/> - {% endif %} - {% if ver_new.plural %} - <b> Plural Name:<nbsp></b>{{ ver_new.plural }} <br/> - {% endif %} - {% if nt1.get_rendered_nbh.authors %}<b>Authors: <nbsp> </b> - {% endif %} - {% for author in nt1.authors.all %} - <span class="vcard author"> - <a href="{% url gstudio_author_detail author %}" class="fn nickname url" rel="author" - title="{% blocktrans with author as author %}Show {{ author }} nodetypes{% endblocktrans %}">{{ author }}</a> - </span>{% if not forloop.last %}, {% endif %} - {% endfor %} <br/> + {% block content56 %}{% for each in diffs1 %} + {% autoescape off %} + {{ each }}<br> + {% endautoescape %}{% endfor %} {% endblock %} + <!-- <br> --> + <!-- {% with nt1.html_content|safe as object_content %} --> + <!-- <b>Name:<nbsp></b>{{ ver_new.title }}<br/> --> + <!-- {% if ver_new.altnames %} --> + <!-- <b> Alternate names:<nbsp></b>{{ ver_new.altnames }} --> + <!-- <br/> --> + <!-- {% endif %} --> + <!-- {% if ver_new.plural %} --> + <!-- <b> Plural Name:<nbsp></b>{{ ver_new.plural }} <br/> --> + <!-- {% endif %} --> + <!-- {% if ver_new.content %} --> + <!-- <b> Content:<nbsp></b>{{ ver_new.content }} <br/> --> + <!-- {% endif %} --> + + <!-- {% if nt1.get_rendered_nbh.authors %}<b>Authors: <nbsp> </b> --> + <!-- {% endif %} --> + <!-- {% for author in nt1.authors.all %} --> + <!-- <span class="vcard author"> --> + <!-- <a href="{% url gstudio_author_detail author %}" class="fn nickname url" rel="author" --> + <!-- title="{% blocktrans with author as author %}Show {{ author }} nodetypes{% endblocktrans %}">{{ author }}</a> --> + <!-- </span>{% if not forloop.last %}, {% endif %} --> + <!-- {% endfor %} <br/> --> {% endwith %} {% endblock %} {% endblock %} @@ -142,30 +150,53 @@ <a href="{{ nt1.get_absolute_url }}" title="{{ nt1.title }}" rel="bookmark">{{ ver_old.title }} </a> </h2> - <br> - {% with nt1.html_content|safe as object_content %} - <b>Name:<nbsp></b>{{ ver_old.title }}<br/> - {% if ver_old.altnames %} - <b> Alternate names:<nbsp></b>{{ ver_old.altnames}} - <br/> - {% endif %} - {% if ver_old.plural %} - <b> Plural Name:<nbsp></b>{{ ver_old.plural }} <br/> - {% endif %} - {% if nt1.get_rendered_nbh.authors %}<b>Authors: <nbsp> </b> - {% endif %} - {% for author in nt1.authors.all %} - <span class="vcard author"> - <a href="{% url gstudio_author_detail author %}" class="fn nickname url" rel="author" - title="{% blocktrans with author as author %}Show {{ author }} nodetypes{% endblocktrans %}">{{ author }}</a> - </span>{% if not forloop.last %}, {% endif %} - {% endfor %} <br/> + {% block content85 %}{% for each in diffs %} + {% autoescape off %} + {{ each }}<br> + {% endautoescape %}{% endfor %} {% endblock %} + <!-- <br> --> + <!-- {% with nt1.html_content|safe as object_content %} --> + <!-- <b>Name:<nbsp></b>{{ ver_old.title }}<br/> --> + <!-- {% if ver_old.altnames %} --> + <!-- <b> Alternate names:<nbsp></b>{{ ver_old.altnames}} --> + <!-- <br/> --> + <!-- {% endif %} --> + <!-- {% if ver_old.plural %} --> + <!-- <b> Plural Name:<nbsp></b>{{ ver_old.plural }} <br/> --> + <!-- {% endif %} --> + <!-- {% if ver_old.content %} --> + <!-- <b> Content:<nbsp></b>{{ ver_old.content }} <br/> --> + <!-- {% endif %} --> + + <!-- {% if nt1.get_rendered_nbh.authors %}<b>Authors: <nbsp> </b> --> + <!-- {% endif %} --> + <!-- {% for author in nt1.authors.all %} --> + <!-- <span class="vcard author"> --> + <!-- <a href="{% url gstudio_author_detail author %}" class="fn nickname url" rel="author" --> + <!-- title="{% blocktrans with author as author %}Show {{ author }} nodetypes{% endblocktrans %}">{{ author }}</a> --> + <!-- </span>{% if not forloop.last %}, {% endif %} --> + <!-- {% endfor %} <br/> --> {% endwith %} {% endblock %} {% endblock %} </td> + +<!-- <th><b><i><br><u>Difference between Selected Versions</u></b></i><br><br> --> +<!-- {% block content6 %}{% for each in diffs %} --> +<!-- {% autoescape off %} --> +<!-- {{ each }}<br> --> +<!-- {% endautoescape %}{% endfor %} {% endblock %} --> +<!-- </th> --> + </tr> +<tr><td><input type="button" value="Merge"></input><input type="button" value="RollBack"></input></td> +<td><input type="button" value="Merge"></input><input type="button" value="RollBack"></input></td> </tr> +<tr><th><b><i>Difference between Selected Versions<b><i><th><tr> +<tr><td><b>{% block content5 %}{% for each in diffs %} + {% autoescape off %} + {{ each }}<br> + {% endautoescape %}{% endfor %} {% endblock %} </b> </td></tr> </table> |