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/gstudio/display.html | |
parent | 4d4df37a9f858d5fc2dc342d06d30b87031000d8 (diff) | |
download | gnowsys-431f589903ea3f03678a3c20acfd478ae4c15805.tar.gz |
templates and views for history, with colour diff v1
Diffstat (limited to 'gstudio/templates/gstudio/display.html')
-rw-r--r-- | gstudio/templates/gstudio/display.html | 35 |
1 files changed, 23 insertions, 12 deletions
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 %} <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 %} |