diff options
author | Arun yadav <arunkumar5587@gmail.com> | 2012-05-30 19:01:12 +0530 |
---|---|---|
committer | Arun yadav <arunkumar5587@gmail.com> | 2012-05-30 19:01:12 +0530 |
commit | adb0662690f845be8524d68cf2aa9f57c10fac13 (patch) | |
tree | a051ac7dd45cdbdb4eeecf5f50d1819cdc119366 /gstudio/templates/gstudio | |
parent | 244509e3eb4058a3aff505e3836d43d64b08fe7d (diff) | |
download | gnowsys-adb0662690f845be8524d68cf2aa9f57c10fac13.tar.gz |
Full version control for OTs,Objects,ATs,RTs done.Merge and revert also done.Extra history field added in nbhood
Diffstat (limited to 'gstudio/templates/gstudio')
-rw-r--r-- | gstudio/templates/gstudio/display.html | 261 | ||||
-rw-r--r-- | gstudio/templates/gstudio/skeleton.html | 2 | ||||
-rw-r--r-- | gstudio/templates/gstudio/version_diff.html | 333 |
3 files changed, 434 insertions, 162 deletions
diff --git a/gstudio/templates/gstudio/display.html b/gstudio/templates/gstudio/display.html index 184b58de..9d48285d 100644 --- a/gstudio/templates/gstudio/display.html +++ b/gstudio/templates/gstudio/display.html @@ -1,4 +1,3 @@ - {% load i18n comments gstudio_tags %} {% load gstudio_tags i18n %} {% get_tags as nodetype_tags %} @@ -6,7 +5,6 @@ - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xml:lang="{{ LANGUAGE_CODE }}" lang="{{ LANGUAGE_CODE }}" version="-//W3C//DTD XHTML 1.1//EN" xmlns="http://www.w3.org/1999/xhtml"> <head> @@ -165,7 +163,7 @@ .attr("width", w) .attr("height", h); - vis.append("svg:g").attr("class", "edges"); + vis.append("svg:g").attr("class", "edges"); vis.append("svg:g").attr("class", "nodes"); $(function() { @@ -176,7 +174,7 @@ $(function() { success : function(json) { //var node = NID.objects.get(slug='{{ slug }}'); - var force; + var force; // this contains all the nodes as a dict with _id as the key @@ -336,18 +334,18 @@ $(function() { nodes_by_id[{{ nt.id }}].y = h/2.0; all_edges = new Array(); - all_edges = all_edges.concat(follows_edges, member_of, contains_members, contains_subtypes, mentions_edges, right_subjecttype_of, left_subjecttype_of, subjecttype_of, type_of,plural,altnames,contains_members,content, prior_nodes, posterior_nodes); - /* all_edges.concat(follows_edges); - all_edges.concat(member_of_metatype); + all_edges = all_edges.concat(follows_edges, member_of, contains_members, contains_subtypes, mentions_edges, right_subjecttype_of, left_subjecttype_of, subjecttype_of, type_of,plural,altnames,contains_members,content, prior_nodes, posterior_nodes); + /* all_edges.concat(follows_edges); + all_edges.concat(member_of_metatype); all_edges.concat(contains_members); - all_edges.concat(contains_subtypes); - all_edges.concat(mentions_edges); + all_edges.concat(contains_subtypes); + all_edges.concat(mentions_edges); - document.getElementById('debugbox1').value= follows_edges; //member_of_metatype + document.getElementById('debugbox1').value= follows_edges; //member_of_metatype document.getElementById('debugbox2').value= mentions_edges; - //document.getElementById('debugbox2').value= member_of_metatype; - document.getElementById('debugbox3').value= all_edges; + //document.getElementById('debugbox2').value= member_of_metatype; + document.getElementById('debugbox3').value= all_edges; */ var force = d3.layout.force() .linkStrength(0.5) @@ -372,7 +370,7 @@ $(function() { if(nodes_by_id[e.to] && !nodes_by_id[e.to].added){ nodes_by_id[e.to].added = true; acc.push(nodes_by_id[e.to]); - } + } return acc; }, []); @@ -390,7 +388,7 @@ $(function() { } */ ) .attr("x1", function(d) { return d.source.x; - }) + }) .attr("y1", function(d) { return d.source.y; }) @@ -405,13 +403,13 @@ $(function() { }) .append("a") - .text(function(d) { return d.type; }); + .text(function(d) { return d.type; }); - var node = d3.select("#chart g.nodes").selectAll("g.node").data(nodes); + var node = d3.select("#chart g.nodes").selectAll("g.node").data(nodes); var new_g = node.enter().append("svg:a") - .attr("class", function(d) { if (d._id=={{ nt.id }}) return "mainnode"; else if (isNaN(d._id)) return "relnode"; else if ((d._id)<0) return "nodetext"; else return "node"; }) + .attr("class", function(d) { if (d._id=={{ nt.id }}) return "mainnode"; else if (isNaN(d._id)) return "relnode"; else if ((d._id)<0) return "nodetext"; else return "node"; }) .attr("xlink:href",function(d){return d.url;}) .call(force.drag); @@ -428,14 +426,14 @@ $(function() { new_g.append("svg:text") .attr("class",function(d) { if (d._id=={{ nt.id }}) return "mainnode"; else if (isNaN(d._id)) return "relnode"; else if ((d._id)<0) return "nodetext"; else return "node"; }) .attr("dy", 20) - .attr("dx", 25) - .attr("text-anchor",function text(d) { if (isNaN(d._id) || (d._id)<0) return "middle" ; else return "left"}) + .attr("dx", 25) + .attr("text-anchor",function text(d) { if (isNaN(d._id) || (d._id)<0) return "middle" ; else return "left"}) -// .attr("style",function text(d) { if (isNaN(d._id)) return "font-size:9.00pt;fill:#333;" ; else return "font-size:9.00pt;fill:black;"}) +// .attr("style",function text(d) { if (isNaN(d._id)) return "font-size:9.00pt;fill:#333;" ; else return "font-size:9.00pt;fill:black;"}) .text(function(d) { return d.screen_name; - }); + }); node.exit().remove(); @@ -465,7 +463,7 @@ $(function() { /* $('input#follows').change(function(){ update(all_edges); }); - */ + */ /* $('input#mentions').change(function(){ update(all_edges); @@ -480,9 +478,12 @@ $(function() { }); -</script> +</script> </div> </div> + + + <div> {% include "gstudio/_header.html" %} <div id="breadcrumbs" class="span-24 last"> @@ -493,81 +494,186 @@ $(function() { <h3>{% block content %} {% block nodetype-content %} <h2 class="nodetype-title"> - <a href="{{ nt.get_absolute_url }}" title="{{ nt.title }}" rel="bookmark">{{ ver_dict.title }} {{ nt.id }}.{{ cnt }} + <a href="{{ nt.get_absolute_url }}" title="{{ nt.title }}" rel="bookmark">{{ ver_nbh_dict.title }} {{ nt.id }}.{{ version_no }} </a> + <a href="{{ nt.get_edit_url }}/history/{{ ssid }}" target="_blank" title = "edit">[edit]</a> </h2> - {% with nt.html_content|safe as object_content %} - <b>Name:<nbsp></b>{{ ver_dict.title }}<br/> - {% if ver_dict.altnames %} - <b> Alternate names:<nbsp></b>{{ ver_dict.altnames}} - <br/> - {% endif %} - {% if ver_dict.plural %} - <b> Plural Name:<nbsp></b>{{ ver_dict.plural }} <br/> - {% endif %} - {% if nt.get_rendered_nbh.authors %}<b>Authors: <nbsp> </b> - {% endif %} - {% for author in nt.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 %} + {% with nt.html_content|safe as object_content %} + <b>Name:<nbsp></b> {{ ver_nbh_dict.title }} <br/> + + {% if ver_nbh_dict.plural %} + <b> Plural Name:<nbsp></b> + {{ ver_nbh_dict.plural}} <br/> + {% endif %} + {% if ver_nbh_dict.altnames %} + <b> Alternate names:<nbsp></b> + {{ ver_nbh_dict.altnames}} <br/> + {% endif %} + {% if ver_nbh_dict.type_of %} + <b> Type of:<nbsp></b> + {% for typekey,typevalue in ver_nbh_dict.type_of.items %} + <a href="{{typevalue}}" title = "{{typekey}}">{{typekey}}</a>; + {% endfor %}<br/> + {% endif %} + + + {% if ver_nbh_dict.member_of_metatypes %} + + + <b> Member of Metatypes:<nbsp></b> + {% for mkey,mvalue in ver_nbh_dict.member_of_metatypes.items %} + <a href="{{mvalue}}" title = "{{mkey}}">{{mkey}}</a>; + {% endfor %}<br/> + {% endif %} + + + + {% if ver_nbh_dict.contains_subtypes %} + <b> Contains SubTypes:<nbsp></b> + {% for stkey,stvalue in ver_nbh_dict.contains_subtypes.items %} + <a href="{{stvalue}}" title = "{{stkey}}">{{stkey}}</a>; + {% endfor %}<br/> + {% endif %} + + + {% if ver_nbh_dict.contains_members %} + + + <b>Contains Members:<nbsp></b> + {% for mkey,mvalue in ver_nbh_dict.contains_members.items %} + <a href="{{mvalue}}" title = "{{mkey}}">{{mkey}}</a>; + {% endfor %}<br/> + {% endif %} + + + + + + + <b>Authors: <nbsp> </b> + + + + + {% for author in nt.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/> + + + + {% if ver_nbh_dict.priornodes %} + + + <b>Prior nodes:<nbsp></b> + {% for mkey,mvalue in ver_nbh_dict.priornodes.items %} + <a href="{{mvalue}}" title = "{{mkey}}">{{mkey}}</a>; + {% endfor %}<br/> + {% endif %} + + {% if ver_nbh_dict.posteriornodes %} + + + <b>Posterior nodes:<nbsp></b> + {% for mkey,mvalue in ver_nbh_dict.posteriornodes.items %} + <a href="{{mvalue}}" title = "{{mkey}}">{{mkey}}</a>; + {% endfor %}<br/> + {% endif %} + + {% if ver_nbh_dict.relations %} + + + {% for relkey,relvalue in ver_nbh_dict.relations.items %} + <b>{{relkey}}:<nbsp></b> + {% for relk, relv in relvalue.items %} + <a href="{{relv}}" title = "{{relk}}">{{relk}}</a>; + {% endfor %}<br/> + {% endfor %} + {% endif %} + + {% if ver_nbh_dict.attributes %} + + {% for atkey,atvalue in ver_nbh_dict.attributes.items %} + {% if atvalue %} + <b>{{atkey}}:<nbsp> </b> + {% for atr in atvalue %} + {{atr}}; + {% endfor %} <br/> + {% endif %} + {% endfor %} + {% endif %} + {% if ver_nbh_dict.leftroles %} + + + <b>Left roles:<nbsp> </b> + + {% for lrkey,lrvalue in ver_nbh_dict.leftroles.items %} + <a href="{{lrvalue}}" title = "{{lrkey}}">{{lrkey}}</a>; + {% endfor %} <br/> + {% endif %} + + {% if ver_nbh_dict.rightroles %} + + <b>Right roles:<nbsp> </b> + + {% for rrkey,rrvalue in ver_nbh_dict.rightroles.items %} + <a href="{{rrvalue}}" title = "{{rrkey}}">{{rrkey}}</a>; + {% endfor %} <br/> + {% endif %} + + + {% if ver_nbh_dict.ats %} + + + <b>Subjecttype of:<nbsp> </b> + + {% for atkey,atvalue in ver_nbh_dict.ats.items %} + <a href="{{atvalue}}" title = "{{atkey}}">{{atkey}}</a>; + {% endfor %} <br/> + {% endif %} + + + <b>Content:<nbsp></b>{{ ver_nbh_dict.content }} + + + {% endwith %} + {% endblock %} + {% endblock %} </div> <div id="sidebar"> {% block sidebar %} <div class="History"> - + <h3>{% trans "Versions" %}</h3> - <script type="text/javascript"> - 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> - <form name="history" action="/nodetypes/display/showhistory/{{ ssid }}" > + <form name="history" action="/nodetypes/display/compare_history/{{ ssid }}" > <table cellspacing="0" border="2"> <tr> - <td> <input type="radio" name="group1" value="{{ ssid }}" checked >{{ nt.id }}.{{ cnt }}</input></td> + <td> <input type="radio" name="group1" value="{{ ssid }}.{{ version_no }}" checked >{{ nt.id }}.{{ version_no }}</input></td> <td></td></tr> + {% for sid in nt.get_ssid %} - {% ifnotequal forloop.counter cnt %} + + {% if sid|stringformat:"s" != ssid|stringformat:"s" %} <tr> <td> </td> <td> - <input type="radio" id="{{ sid }}"name="group2" value="{{ sid }}" >{{ nt.id }}.{{ forloop.counter }}</input> - </td>{% endifnotequal %} - {% endfor %}</tr></table> + <input type="radio" id="{{ sid }}"name="group2" value="{{ sid }}.{{ forloop.counter }}" >{{ nt.id }}.{{ forloop.counter }}</input> + </td></tr>{% endif %} + {% endfor %}</table> <input type="submit" value="Compare" /> </form> - + </div> - + {% endblock %} </div> @@ -583,13 +689,8 @@ $(function() { {{ GSTUDIO_VERSION }}</a>. </p> </div> - </div> + </div> </div> </body> </html> - - - - - diff --git a/gstudio/templates/gstudio/skeleton.html b/gstudio/templates/gstudio/skeleton.html index 3b945f48..96a22875 100644 --- a/gstudio/templates/gstudio/skeleton.html +++ b/gstudio/templates/gstudio/skeleton.html @@ -207,7 +207,7 @@ $(function fgraph() { $.getJSON('/nodetypes/graphs/graph_json/' + {{object.id}}, function (json1) { metadata=json1.node_metadata; relations=json1.relations; - relnset=json1.relset + init(metadata,relations); load({{object.id}}) }); diff --git a/gstudio/templates/gstudio/version_diff.html b/gstudio/templates/gstudio/version_diff.html index a640f071..4a11ec2a 100644 --- a/gstudio/templates/gstudio/version_diff.html +++ b/gstudio/templates/gstudio/version_diff.html @@ -108,38 +108,154 @@ <h3>{% block content %} {% block nodetype-content %} <h2 class="nodetype-title"> - <a href="{{ nt1.get_absolute_url }}" title="{{ nt1.title }}" rel="bookmark">{{ ver_new.title }} + <a href="{{ nt.get_absolute_url }}" title="{{ nt.title }}" rel="bookmark">{{ ver_new_dict.title }} {{ nt.id }}.{{ version_no1 }} </a> </h2> - <!-- {% block content56 %}{% for each in diffs1 %} --> - <!-- {% autoescape off %} --> - <!-- {{ each }}<br> --> - <!-- {% endautoescape %}{% endfor %} {% endblock %} --> - <!-- <br> --> - {% with nt1.html_content|safe as object_content %}<br> - <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 %} - - <b> Content:<nbsp></b>{{ ver_new.content }} <br/> - + + {% with nt.html_content|safe as object_content %}<br> - {% 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 %} + <b>Name:<nbsp></b> {{ ver_new_nbh_dict.title }} <br/> + + {% if ver_new_nbh_dict.plural or ver_old_nbh_dict.plural %} + <b> Plural Name:<nbsp></b> + {{ ver_new_nbh_dict.plural}} <br/> + {% endif %} + {% if ver_new_nbh_dict.altnames or ver_old_nbh_dict.altnames%} + <b> Alternate names:<nbsp></b> + {{ ver_new_nbh_dict.altnames}} <br/> + {% endif %} + {% if ver_new_nbh_dict.type_of or ver_old_nbh_dict.type_of %} + <b> Type of:<nbsp></b> + {% for typekey,typevalue in ver_new_nbh_dict.type_of.items %} + <a href="{{typevalue}}" title = "{{typekey}}">{{typekey}}</a>; + {% endfor %}<br/> + {% endif %} + + + {% if ver_new_nbh_dict.member_of_metatypes or ver_old_nbh_dict.member_of_metatypes %} + + + <b> Member of Metatypes:<nbsp></b> + {% for mkey,mvalue in ver_new_nbh_dict.member_of_metatypes.items %} + <a href="{{mvalue}}" title = "{{mkey}}">{{mkey}}</a>; + {% endfor %}<br/> + {% endif %} + + + + {% if ver_new_nbh_dict.contains_subtypes or ver_old_nbh_dict.contains_subtypes %} + <b> Contains SubTypes:<nbsp></b> + {% for stkey,stvalue in ver_new_nbh_dict.items %} + <a href="{{stvalue}}" title = "{{stkey}}">{{stkey}}</a>; + {% endfor %}<br/> + {% endif %} + + + {% if ver_new_nbh_dict.contains_members or ver_old_nbh_dict.contains_members %} + + + <b>Contains Members:<nbsp></b> + {% for mkey,mvalue in ver_new_nbh_dict.contains_members.items %} + <a href="{{mvalue}}" title = "{{mkey}}">{{mkey}}</a>; + {% endfor %}<br/> + {% endif %} + + + + + + + <!-- <b>Authors: <nbsp> </b> --> + + + + + <!-- {% for author in nt.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/> --> + + + + {% if ver_new_nbh_dict.priornodes or ver_old_nbh_dict.priornodes %} + + + <b>Prior nodes:<nbsp></b> + {% for mkey,mvalue in ver_new_nbh_dict.items %} + <a href="{{mvalue}}" title = "{{mkey}}">{{mkey}}</a>; + {% endfor %}<br/> + {% endif %} + + {% if ver_new_nbh_dict.posteriornodes or ver_old_nbh_dict.posteriornodes %} + + + <b>Posterior nodes:<nbsp></b> + {% for mkey,mvalue in ver_new_nbh_dict.items %} + <a href="{{mvalue}}" title = "{{mkey}}">{{mkey}}</a>; + {% endfor %}<br/> + {% endif %} + + {% if ver_new_nbh_dict.relations or ver_old_nbh_dict.relations %} + + + {% for relkey,relvalue in ver_new_nbh_dict.relations.items %} + <b>{{relkey}}:<nbsp></b> + {% for relk, relv in relvalue.items %} + <a href="{{relv}}" title = "{{relk}}">{{relk}}</a>; + {% endfor %}<br/> + {% endfor %} + {% endif %} + + {% if ver_new_nbh_dict.attributes or ver_old_nbh_dict.attributes %} + + {% for atkey,atvalue in ver_new_nbh_dict.attributes.items %} + {% if atvalue %} + <b>{{atkey}}:<nbsp> </b> + {% for atr in atvalue %} + {{atr}}; + {% endfor %} <br/> + {% endif %} + {% endfor %} + {% endif %} + {% if ver_new_nbh_dict.leftroles or ver_old_nbh_dict.leftroles %} + + + <b>Left roles:<nbsp> </b> + + {% for lrkey,lrvalue in ver_new_nbh_dict.leftroles.items %} + <a href="{{lrvalue}}" title = "{{lrkey}}">{{lrkey}}</a>; + {% endfor %} <br/> + {% endif %} + + {% if ver_new_nbh_dict.rightroles or ver_old_nbh_dict.rightroles %} + + <b>Right roles:<nbsp> </b> + + {% for rrkey,rrvalue in ver_new_nbh_dict.rightroles.items %} + <a href="{{rrvalue}}" title = "{{rrkey}}">{{rrkey}}</a>; + {% endfor %} <br/> + {% endif %} + + + {% if ver_new_nbh_dict.ats or ver_old_nbh_dict.ats %} + + + <b>Subjecttype of:<nbsp> </b> + + {% for atkey,atvalue in ver_new_nbh_dict.ats.items %} + <a href="{{atvalue}}" title = "{{atkey}}">{{atkey}}</a>; + {% endfor %} <br/> + {% endif %} + + {% if ver_new_nbh_dict.content or ver_old_nbh_dict.content %} + <b>Content:<nbsp></b>{{ ver_new_nbh_dict.content }} + {% endif %} + + {% endwith %} + {% endblock %} + {% endblock %} </td> <td> @@ -147,71 +263,126 @@ <h3>{% block content1 %} {% block nodetype-content1 %} <h2 class="nodetype-title"> - <a href="{{ nt1.get_absolute_url }}" title="{{ nt1.title }}" rel="bookmark">{{ ver_old.title }} + <a href="{{ nt.get_absolute_url }}" title="{{ nt.title }}" rel="bookmark">{{ ver_old_dict.title }} {{ nt.id }}.{{ version_no2 }} </a> - </h2><!-- <b> --> - <!-- {% block content85 %}{% for each in diffs %} --> - <!-- {% autoescape off %} --> - <!-- {{ each }}<br> --> - <!-- {% endautoescape %}{% endfor %} {% endblock %}</b> --> - <br> - {% with nt1.html_content|safe as object_content %} + </h2> <br> + {% with nt.html_content|safe as object_content %} + <b>Name:<nbsp></b>{% autoescape off %} - {{ diffs.0 }} + {{ compare_dict.title }} {% endautoescape %}<br> - {% if ver_old.altnames %} + {% if ver_old_nbh_dict.plural or ver_new_nbh_dict.plural %} + <b> Plural Name:<nbsp></b> {% autoescape off %} + {{ compare_dict.plural }} + {% endautoescape %} <br/> + {% endif %} + {% if ver_old_nbh_dict.altnames or ver_new_nbh_dict.altnames %} <b> Alternate names:<nbsp></b> {% autoescape off %} - {{ diffs.1 }} + {{ compare_dict.altnames }} {% endautoescape %} <br/> {% endif %} - {% if ver_old.plural %} - <b> Plural Name:<nbsp></b> {% autoescape off %} - {{ diffs.2 }} - {% endautoescape %} <br/> + {% if ver_new_nbh_dict.type_of or ver_old_nbh_dict.type_of %} + <b> Type of:<nbsp></b> {% autoescape off %} + {{ compare_dict.type_of }} + {% endautoescape %} + <br/> {% endif %} - - <b> Content:<nbsp></b> {% autoescape off %} - {{ diffs.3 }} + {% if ver_new_nbh_dict.member_of_metatypes or ver_old_nbh_dict.member_of_metatypes %} + <b>Member of Metatypes:<nbsp></b> {% autoescape off %} + {{ compare_dict.member_of_metatypes }} + {% endautoescape %} + <br/> + {% endif %} + {% if ver_new_nbh_dict.contains_subtypes or ver_old_nbh_dict.contains_subtypes %} + <b>Contain subtypes:<nbsp></b> {% autoescape off %} + {{ compare_dict.contains_subtypes }} + {% endautoescape %} + <br/> + {% endif %} + + {% if ver_old_nbh_dict.contains_members or ver_new_nbh_dict.contains_members %} + <b>Contains Members:<nbsp></b>{% autoescape off %} + {{ compare_dict.contains_members }} {% endautoescape %} <br/> + {% endif %} + {% if ver_new_nbh_dict.priornodes or ver_old_nbh_dict.priornodes %} + <b>Prior nodes:<nbsp></b> {% autoescape off %} + {{ compare_dict.priornodes }} + {% endautoescape %}<br/> + + + {% endif %} + {% if ver_new_nbh_dict.posteriornodes or ver_old_nbh_dict.posteriornodes %} + <b>Posterior nodes:<nbsp></b> {% autoescape off %} + {{ compare_dict.posteriornodes }} + {% endautoescape %}<br/> + + + {% endif %} + + {% if ver_new_nbh_dict.relations or ver_old_nbh_dict.relations %} + {% for relkey,relvalue in compare_dict.relations.items %} + <b>{{relkey}}:<nbsp></b> + {% autoescape off %} + + + {{ relvalue }} + + + {% endautoescape %} + <br/> + {% endfor %} + {% endif %} + + {% if ver_new_nbh_dict.attributes or ver_old_nbh_dict.attributes %} + <b>Attributes:<nbsp></b> {% autoescape off %} + {{ compare_dict.attributes }} + {% endautoescape %}<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/> + + {% if ver_new_nbh_dict.leftroles or ver_old_nbh_dict.leftroles %} + <b>Left roles:<nbsp> </b> {% autoescape off %} + {{ compare_dict.leftroles }} + {% endautoescape %} + <br/> + {% endif %} + {% if ver_new_nbh_dict.rightroles or ver_old_nbh_dict.rightroles %} + <b>Right roles:<nbsp> </b> {% autoescape off %} + {{ compare_dict.rightroles }} + {% endautoescape %} + <br/> + {% endif %} + {% if ver_new_nbh_dict.ats or ver_old_nbh_dict.ats %} + + + <b>Subjecttype of:<nbsp> </b> {% autoescape off %} + {{ compare_dict.ats }} + {% endautoescape %}<br> + {% endif %} + {% if ver_new_nbh_dict.content or ver_old_nbh_dict.content %} + <b> Content:<nbsp></b> {% autoescape off %} + {{ compare_dict.content }} + {% endautoescape %} <br/> + {% endif %} {% 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> --> - - - - - - </body> +<br> +</td></tr> +<tr><td> +<form method="get" action="/nodetypes/display/merge/{{ ssid1 }}/{{ ssid2 }}"> +<input type="submit" value="Merge {{ nt.id }}.{{ version_no1 }} with {{ nt.id }}.{{ version_no2 }}" id="merge1" name="left" ></input></td> +<td><input type="submit" value="Merge {{ nt.id }}.{{ version_no2 }} with {{ nt.id }}.{{ version_no1 }}" id="merge2" name="right"></input></td></form> +</tr> +<tr><td> +<form method="get" action="/nodetypes/display/revert" > +<input type="submit" value="Revert" name="{{ ssid1 }}"></input></td> +<td><input type="submit" value="Revert" name="{{ ssid2 }}"></input></td> +</form></tr> +</table> +</body> </html> |