diff options
author | Ankita <ankita@ankita-Inspiron-N5010.(none)> | 2012-07-03 12:42:57 -0400 |
---|---|---|
committer | Ankita <ankita@ankita-Inspiron-N5010.(none)> | 2012-07-03 12:42:57 -0400 |
commit | ef3793b349be5744d6ef98a034f0c009159ed85b (patch) | |
tree | 04a873d770c330ce97eef3e78d43edb2d619d1a3 /gstudio/templates/gstudio | |
parent | e5c470536ee2d3571817b1a60f6b910f17a33f31 (diff) | |
parent | 471a772b4d2e1430a3a119593e8694c4af2c951a (diff) | |
download | gnowsys-ef3793b349be5744d6ef98a034f0c009159ed85b.tar.gz |
Merge branch 'master' of https://github.com/gnowgi/gnowsys-studio
Conflicts:
django_gstudio.egg-info/PKG-INFO
django_gstudio.egg-info/requires.txt
Diffstat (limited to 'gstudio/templates/gstudio')
-rw-r--r-- | gstudio/templates/gstudio/_header.html | 26 | ||||
-rw-r--r-- | gstudio/templates/gstudio/base.html | 4 | ||||
-rw-r--r-- | gstudio/templates/gstudio/display.html | 563 | ||||
-rw-r--r-- | gstudio/templates/gstudio/home.html | 147 | ||||
-rw-r--r-- | gstudio/templates/gstudio/more.html | 241 | ||||
-rw-r--r-- | gstudio/templates/gstudio/nodetype_detail.html | 104 | ||||
-rw-r--r-- | gstudio/templates/gstudio/skeleton.html | 262 | ||||
-rw-r--r-- | gstudio/templates/gstudio/tags/breadcrumbs.html | 17 | ||||
-rw-r--r-- | gstudio/templates/gstudio/version_base.html | 5 | ||||
-rw-r--r-- | gstudio/templates/gstudio/version_diff.html | 337 |
10 files changed, 1237 insertions, 469 deletions
diff --git a/gstudio/templates/gstudio/_header.html b/gstudio/templates/gstudio/_header.html index 2e05c8c..4a913e9 100644 --- a/gstudio/templates/gstudio/_header.html +++ b/gstudio/templates/gstudio/_header.html @@ -6,15 +6,17 @@ <div class="branding"> Gnowledge Studio </div> <!-- Title --> - <div class="admin-title"> {% if grappelli_admin_title %}{{ + <div class="admin-title"> + <a href="/" title="Home">Home</a> + | {% if grappelli_admin_title %}{{ grappelli_admin_title }}{% else %}{% get_admin_title %}{% endif %} - | <a href="/">Home</a> - | <a href="{{ get_absolute_url }}/objects">objects</a> + + | <a href="{{ get_absolute_url }}/objects" title="Objects">Objects</a> {% if user.is_authenticated %} {% if user.is_staff %} - | <a href="{{ get_absolute_url }}/admin">Admin Dashboard</a> + | <a href="{{ get_absolute_url }}/admin" title="Admin Dashboard">Admin Dashboard</a> {% endif %} {% endif %} @@ -26,18 +28,18 @@ <ul id="user-tools"> <!-- Username --> <li class="user-options-container collapse closed"> - <a href="javascript://" class="user-options-handler collapse-handler">{% firstof user.first_name user.username %}</a> + <a href="javascript://" class="user-options-handler collapse-handler" title="{% firstof user.first_name user.username %}">{% firstof user.first_name user.username %}</a> <ul class="user-options"> <!-- Change Password --> {% url admin:password_change as password_change_url %} {% if password_change_url %} - <li><a href="{{ password_change_url }}"> + <li><a href="{{ password_change_url }}" title="Change Password"> {% else %} <li><a href="{{ root_path }}password_change/"> {% endif %} {% trans 'Change password' %}</a></li> <!-- Logout --> - <li><a href="{{get_absoulute_url}}/accounts/logout/"> + <li><a href="{{get_absoulute_url}}/accounts/logout/" title="Log out"> {% trans 'Log out' %}</a></li> </ul> @@ -47,20 +49,20 @@ <!-- JS tests --> {% url test-index as testindexurl %} {% if testindexurl %} - <li><a href="{{ testindexurl }}">{% trans 'Tests' %}</a></li> + <li><a href="{{ testindexurl }}" title="Tests">{% trans 'Tests' %}</a></li> {% endif %} <!-- Documentation --> {% url django-admindocs-docroot as docsroot %} {% if docsroot %} - <li><a href="{{ docsroot }}">{% trans 'Documentation' %}</a></li> + <li><a href="{{ docsroot }}" title="Documentation">{% trans 'Documentation' %}</a></li> {% endif %} - <li><a href="http://github.com/gnowgi/django-gstudio">Code</a></li> + <li><a href="http://github.com/gnowgi/django-gstudio" title="Code">Code</a></li> {% endblock %} </ul> {% else %} <ul id="user-tools"> - <li><a href="{{root_path}}/accounts/login">{% trans 'Login' %}</a></li> - <li>Not registered ? <a href="{{root_path}}/accounts/register">{% trans 'Register' %}</a></li> + <li><a href="{{root_path}}/accounts/login" title="Login">{% trans 'Login' %}</a></li> + <li>Not registered ? <a href="{{root_path}}/accounts/register" title="Register">{% trans 'Register' %}</a></li> </ul> diff --git a/gstudio/templates/gstudio/base.html b/gstudio/templates/gstudio/base.html index f1c4aa1..f359472 100644 --- a/gstudio/templates/gstudio/base.html +++ b/gstudio/templates/gstudio/base.html @@ -1,7 +1,7 @@ {% extends "gstudio/skeleton.html" %} -{% load gstudio_tags i18n %} -{% load objectapp_tags i18n %} +{% load objectapp_tags i18n %} +{% load gstudio_tags i18n %} {% block meta %} <meta name="generator" content="Objectapp {{ OBJECTAPP_VERSION }}" /> {% endblock %} diff --git a/gstudio/templates/gstudio/display.html b/gstudio/templates/gstudio/display.html index 184b58d..90b5b27 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> @@ -120,9 +118,9 @@ <link rel="pingback" href="/xmlrpc/" /> <link rel="shortcut icon" href="{{ STATIC_URL }}gstudio/img/favicon.ico" /> <link rel="home" href="{% url gstudio_nodetype_archive_index %}" /> - <link rel="stylesheet" type="text/css" media="screen, projection" href="{{ STATIC_URL }}gstudio/css/grappelli_skin_default.css" /> + <link rel="stylesheet" type="text/css" media="screen, projection" href="{{ STATIC_URL }}gstudio/css/screen.css" /> - <link rel="stylesheet" type="text/css" media="screen, projection" href="{{ STATIC_URL }}gstudio/css/screen_gstudio.css" /> + <link rel="stylesheet" type="text/css" media="print" href="{{ STATIC_URL }}gstudio/css/print.css" /> <!--[if lt IE 8]> <link rel="stylesheet" type="text/css" media="screen, projection" href="{{ STATIC_URL }}gstudio/css/ie.css" /> @@ -155,206 +153,61 @@ Javascript for Object type force graph --> <script type="text/javascript" > +function init(a,b) +{ - var w = 700, - h = 300, - fill = d3.scale.category20(); - - var vis = d3.select("#chart") - .append("svg:svg") - .attr("width", w) - .attr("height", h); - - vis.append("svg:g").attr("class", "edges"); - vis.append("svg:g").attr("class", "nodes"); - -$(function() { - $.ajax({ - url: '/nodetypes/graphs/version_graph_json/{{ ssid }}', - //crossDomain: true, - dataType: 'json', - success : function(json) { - - //var node = NID.objects.get(slug='{{ slug }}'); - var force; - - // this contains all the nodes as a dict with _id as the key - - var nodes_by_id = _.reduce(json.node_metadata, function(acc, n) { - acc[n._id] = n; + + nodes_by_id = _.reduce(a, function(acc, n) { + acc[n._id] = n; return acc; }, {}); - var member_of = _(json.member_of).chain().map(function(e) { - e.source = nodes_by_id[e.from]; - e.target = nodes_by_id[e.to]; - e.type = 'member_of'; - return e; - }).filter(function(e){ - return nodes_by_id[e.from] && nodes_by_id[e.to] - }).value(); - - - var contains_subtypes = _(json.contains_subtypes).chain().map(function(e) { - e.source = nodes_by_id[e.from]; - e.target = nodes_by_id[e.to]; - e.type = 'contains_subtypes'; - return e; - }).filter(function(e){ - return nodes_by_id[e.from] && nodes_by_id[e.to] - }).value(); - - var contains_members = _(json.contains_members).chain().map(function(e) { - e.source = nodes_by_id[e.from]; - e.target = nodes_by_id[e.to]; - e.type = 'contains_members'; - return e; - }).filter(function(e){ - return nodes_by_id[e.from] && nodes_by_id[e.to] - }).value(); - - - var left_subjecttype_of = _(json.left_subjecttype_of).chain().map(function(e) { - e.source = nodes_by_id[e.from]; - e.target = nodes_by_id[e.to]; - e.type = 'left_subjecttype_of'; - return e; - }).filter(function(e){ - return nodes_by_id[e.from] && nodes_by_id[e.to] - }).value(); - - - var subjecttype_of = _(json.subjecttype_of).chain().map(function(e) { - e.source = nodes_by_id[e.from]; - e.target = nodes_by_id[e.to]; - e.type = 'subjecttype_of'; - return e; - }).filter(function(e){ - return nodes_by_id[e.from] && nodes_by_id[e.to] - }).value(); - - var plural = _(json.plural).chain().map(function(e) { - e.source = nodes_by_id[e.from]; - e.target = nodes_by_id[e.to]; - e.type = 'plural'; - return e; - }).filter(function(e){ - return nodes_by_id[e.from] && nodes_by_id[e.to] - }).value(); - - - var altnames = _(json.altnames).chain().map(function(e) { - e.source = nodes_by_id[e.from]; - e.target = nodes_by_id[e.to]; - e.type = 'altnames'; - return e; - }).filter(function(e){ - return nodes_by_id[e.from] && nodes_by_id[e.to] - }).value(); - - var content = _(json.content).chain().map(function(e) { - e.source = nodes_by_id[e.from]; - e.target = nodes_by_id[e.to]; - e.type = 'content'; - return e; - }).filter(function(e){ - return nodes_by_id[e.from] && nodes_by_id[e.to] - }).value(); - - var contains_members = _(json.contains_members).chain().map(function(e) { - e.source = nodes_by_id[e.from]; - e.target = nodes_by_id[e.to]; - e.type = 'contains_members'; - return e; - }).filter(function(e){ - return nodes_by_id[e.from] && nodes_by_id[e.to] - }).value(); - - - - var type_of = _(json.type_of).chain().map(function(e) { - e.source = nodes_by_id[e.from]; - e.target = nodes_by_id[e.to]; - e.type = 'type_of'; - return e; - }).filter(function(e){ - return nodes_by_id[e.from] && nodes_by_id[e.to] - }).value(); - - - var right_subjecttype_of = _(json.right_subjecttype_of).chain().map(function(e) { - e.source = nodes_by_id[e.from]; - e.target = nodes_by_id[e.to]; - e.type = 'right_subjecttype_of'; - return e; - }).filter(function(e){ - return nodes_by_id[e.from] && nodes_by_id[e.to] - }).value(); - - - var follows_edges = _(json.is_followed_by).chain().map(function(e) { - e.source = nodes_by_id[e.from]; - e.target = nodes_by_id[e.to]; - e.type = 'follows_edges'; - return e; - }).filter(function(e){ - return nodes_by_id[e.from] && nodes_by_id[e.to] - }).value(); - - - - var prior_nodes = _(json.prior_nodes).chain().map(function(e) { + all_edges=new Array(); + //this contains all the links between the nodes + all_edges =_(b).chain().map(function(e) { e.source = nodes_by_id[e.from]; e.target = nodes_by_id[e.to]; - e.type = 'prior_node'; + //`e.type = nodes_by_id[e.type] return e; }).filter(function(e){ - return nodes_by_id[e.from] && nodes_by_id[e.to] - }).value(); + return nodes_by_id[e.from] && nodes_by_id[e.to]&& e.type!="title" && e.type!="content" && e.type!="authors" + }).value(); + +$(function fgraph() { - var posterior_nodes = _(json.posterior_nodes).chain().map(function(e) { - e.source = nodes_by_id[e.from]; - e.target = nodes_by_id[e.to]; - e.type = 'posterior_node'; - return e; - }).filter(function(e){ - return nodes_by_id[e.from] && nodes_by_id[e.to] - }).value(); +$.getJSON('/nodetypes/graphs/version_graph_json/{{ ssid }}', function (json1) { + metadata=json1.node_metadata; + relations=json1.relations; + + init(metadata,relations); + load({{ssid}}) }); - var mentions_edges = _(json.is_mentioned_by).chain().map(function(e) { - e.source = nodes_by_id[e.from]; - e.target = nodes_by_id[e.to]; - e.type = 'mentions_edges'; - return e; - }).filter(function(e){ - return nodes_by_id[e.from] && nodes_by_id[e.to] - }).value(); - + +function load(key) +{ + var w = 700, + h = 500, + fill = d3.scale.category20(); + + var vis = d3.select("#chart") + .append("svg:svg") + .attr("width", w) + .attr("height", h); + vis.append("svg:g").attr("class", "edges"); + vis.append("svg:g").attr("class", "nodes"); + - nodes_by_id[{{ nt.id }}].x = w/2.0; - nodes_by_id[{{ nt.id }}].y = h/2.0; + + nodes_by_id[{{nt.id}}].x = w/2.0; + 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.concat(contains_members); - all_edges.concat(contains_subtypes); - all_edges.concat(mentions_edges); - - - 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; - */ - var force = d3.layout.force() - .linkStrength(0.5) - .charge(-2000) + var force = d3.layout.force() + .linkStrength(0.3) + .charge(-5000) .friction(0.7) .gravity(0.7) - .linkDistance(13) + .linkDistance(10) .nodes([]) .links([]) .size([w, h]) @@ -372,7 +225,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; }, []); @@ -380,9 +233,10 @@ $(function() { force.links(edges); force.start(); - link = d3.select("#chart g.edges").selectAll("line.link") + link = d3.select("#chart g.edges").selectAll("line.link").select(this.arrowhead) .data(edges, function(e){return e.from + "-" + e.to + "-" + e.type}); + link.enter().append("svg:line") .attr("class", "link") .style("stroke-width", 2 /* function(d) { @@ -390,7 +244,7 @@ $(function() { } */ ) .attr("x1", function(d) { return d.source.x; - }) + }) .attr("y1", function(d) { return d.source.y; }) @@ -403,43 +257,80 @@ $(function() { .attr("text", function(d) { return d.type; }) + .attr("marker-end", "url(#arrowhead)"); - .append("a") - .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("xlink:href",function(d){return d.url;}) - .call(force.drag); - - - - - new_g.append("svg:circle") - .attr("cx", function(d) { return d.x - w/2.0 + 15; }) - .attr("cy", function(d) { return d.y - h/2.0 + 15; }) - .attr("r", function(d) { if (d._id=={{ nt.id }}) return 8; else if (isNaN(d._id) || (d._id)<0) return 1; else return 7 }) - .style("fill", function color(d) { if (d._id=={{ nt.id }}) return "red"; else if (isNaN(d._id) || (d._id)<0) return "white" ; else return "green"}); + - - 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"}) +var new_g = node.enter().append("svg:a") + .attr("class", function(d) { var e=(d._id).charAt(0); if (d._id=={{nt.id}}) return "mainnode"; else if (e=="-") return "nodetext"; else if (isNaN(d._id)) return "relnode" ; else return "node"; }) + + .call(force.drag); -// .attr("style",function text(d) { if (isNaN(d._id)) return "font-size:9.00pt;fill:#333;" ; else return "font-size:9.00pt;fill:black;"}) + new_g.append("svg:marker") + .attr("id", "arrowhead") + .attr("viewBox","0 0 10 10") + .attr("refX","20") + .attr("refY","5") + .attr("markerUnits","strokeWidth") + .attr("markerWidth","9") + .attr("markerHeight","5") + .attr("orient","auto") + .append("svg:path") + .attr("d","M 0 0 L 10 5 L 0 10 z") + .attr("fill", "#6D6666"); + + + + text1 = new_g.append("svg:text") + .attr("class",function(d) {var e=(d._id).charAt(0); if (d._id=={{nt.id}}) return "mainnode";else if (e=="-") return "nodetext"; else if (isNaN(d._id)) return "relnode"; else return "node"; }) + .attr("y", 20) + .attr("x", 25) + .attr("dy", ".35em") + .attr("text-anchor","middle") + .text(function(d) { return d.screen_name; - }); + }); - node.exit().remove(); + bbox = text1.node().getBBox(); + console.log(bbox); + - + new_g.filter(function(d) { return (d._id).charAt(0)=="-"; }).append("svg:rect") + .attr("x",bbox.x-22) + .attr("y", bbox.y) + .attr("width", function(d) {var ttx=d.screen_name ; return (ttx.length+bbox.width+40)}) + .attr("height", bbox.height) + .call(force.drag) + .style("fill-opacity", ".1") + .style("stroke", "#000") + .style("stroke-width","1px" ); + +new_g.filter(function(d) { return (d._id)>0;}).append("svg:ellipse") + .attr("cx", bbox.x+25) + .attr("cy", bbox.y+13) + .call(force.drag) + .attr("rx",function(d) {var ttx=d.screen_name ; return (ttx.length + 40)}) + .attr("ry",13) + .style("fill-opacity", ".2") + .style("stroke", "#666") + .style("stroke-width", "1.5px") + .style("fill", function(d) {if (d.refType=="Objecttype") return "blue"; else if(d.refType=="Gbobject") return "red"; else return "none"}); + + + + + + node.exit().remove(); + + + force.on("tick", function() { @@ -462,27 +353,19 @@ $(function() { .duration(1000) .style("opacity", 1); - /* $('input#follows').change(function(){ - update(all_edges); - }); - */ + - /* $('input#mentions').change(function(){ - update(all_edges); - }); */ - } - }); - -// $("#relation_type").buttonset(); - -// $('input#mentions').change(function(){console.log(this)}); -// $('input#follows').change(function(){console.log(this)}); + + } }); -</script> +</script> </div> </div> + + + <div> {% include "gstudio/_header.html" %} <div id="breadcrumbs" class="span-24 last"> @@ -493,81 +376,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 +571,8 @@ $(function() { {{ GSTUDIO_VERSION }}</a>. </p> </div> - </div> + </div> </div> </body> </html> - - - - - diff --git a/gstudio/templates/gstudio/home.html b/gstudio/templates/gstudio/home.html new file mode 100644 index 0000000..1268922 --- /dev/null +++ b/gstudio/templates/gstudio/home.html @@ -0,0 +1,147 @@ +{% load objectapp_tags i18n %} +{% load gstudio_tags i18n %} + +{% load adminmedia grp_tags %} +<!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> + <style type="text/css"> + .searchbutton{ + font-family: Arial,sans-serif; + font-size: 22px; + font-weight: bold; + vertical-align: top; + } + #homebody{ + height:100%; + background: #B3B3B3; + + } + #header { + background: none repeat scroll 0 0 #2B3959; + border-bottom: 1px solid #E9E9F3; + color: white; + margin-bottom: 1em; + } + #header a:hover, #header a:active{ + color: red; + } + + #main { + margin-top: 70px; + } + + #searchtext{ + margin-left:25%; + margin-top:10% + } + #searchidbutton{ + margin-left:39%; + margin-top:2%; + } + + #author{ + margin-left: 75%; + } + + .bottom h3 { + background-color: #C4EBF4; + padding: 0.5em; + font-size: 1em; + line-height: 1; + margin-bottom: 1em; + border-radius: 15px 15px 15px 15px; + color: #176691; + font-weight: normal; + } + + .bottom{ + margin-top:9%; + margin-left:11%; + } + .authors { + width: 20%; + position:absolute; + margin-left: 3%; + } + + .recentsnodetype{ + width:22%; + position:absolute; + margin-left:24%; + } + + + .comments{ + width:22%; + position:absolute; + margin-left:47%; + } + } + </style> + + <script src="http://code.jquery.com/jquery-latest.js"></script> + <script type="text/javascript" > + + + $(window).load(function() { + $(".searchbutton").css({"background": "#F5F5F5" ,"width":"109px" , "height":"30px" , "-moz-box-sizing":"border-box", "margin-left":"45%", "padding":"4px 13px 29px 16px" , "color": "black" , "border":"1px solid #AAAAAA" }); + + + + }); + + + </script> + + <link href="{% admin_media_prefix %}css/base.css" rel="stylesheet" type="text/css" /> + + <script src="{% admin_media_prefix %}jquery/jquery-1.6.2.min.js" type="text/javascript"></script> + + <script src="{% admin_media_prefix %}jquery/ui/js/jquery-ui-1.8.15.custom.min.js" type="text/javascript"></script> + <!-- Grappelli Main JS --> + <script src="{% admin_media_prefix %}js/grappelli/grappelli.js" type="text/javascript"></script> + <!-- Grappelli jQuery Plugins, Widgets --> + + <script src="{% admin_media_prefix %}js/grappelli/jquery.grp_collapsible.js" type="text/javascript"></script> + <link rel="shortcut icon" href="/static/gstudio/img/favicon.ico" /> + + <title>Gnowledge Studio</title> + </head> + <body id="homebody"> + + + <div id="header" > + {% include "gstudio/_header.html" %} + </div> + + <div id="main"> + <center><font size="23" color="#4d659e"><b>{{ site }}</b></font></center> + <form action="{% url gstudio_nodetype_search %}" method="get"> + <input id="searchtext" class="classtext" type="text" value="{{ pattern }}" name="pattern" onfocus="this.value=''" style="border: 5; padding: 0pt; margin: 0pt; height: 30px; width: 40%; margin-left:30%; margin-bottom:18px; margin-top:4%" /> + <input class="searchbutton" type="submit" value="Search" title="Search" /> + + <a href="{% url gstudio_nodetype_latest_feed %}" class="feeds" title="Rssfeed"><img src="/static/gstudio/img/rss.png" alt="?" width="20" height="" /></a> + </form> + </div><br/><br/><br/> +<link rel="stylesheet" type="text/css" media="screen, projection" href="/static/gstudio/css/screen.css" /> +<center><p style = " font-size : 19px ; color : #4d659e"><b>Let us collaboratively construct semantic knowledge networks with a special focus on education.<a href="/more/"><font color="red">more</font></a></b></p></center> + <div class="bottom"> + <div class="authors"> + <h3>{% trans "Recents Authors" %}</h3> + {% get_authors %} + </div> + +<div class="recentsnodetype"> +<h3>{% trans "Recent Nodes" %}</h3> +{% get_recent_nodetypes %} +</div> +<div class="comments"> + <h3>{% trans "Recent Comments" %}</h3> + {% get_recent_comments 5 %} +</div> + </div> + + </body> +</html> + diff --git a/gstudio/templates/gstudio/more.html b/gstudio/templates/gstudio/more.html new file mode 100644 index 0000000..3b4f034 --- /dev/null +++ b/gstudio/templates/gstudio/more.html @@ -0,0 +1,241 @@ +{% load objectapp_tags i18n %} +{% load gstudio_tags i18n %} + +{% load adminmedia grp_tags %} +<!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> + + <style type="text/css"> + #more_body{ + background: #B3B3B3; + } + #header { + background: none repeat scroll 0 0 #2B3959; + border-bottom: 1px solid #E9E9F3; + color: white; + margin-bottom: 1em; + } + #header a:hover, #header a:active{ + color: red; + } + + + #portal-footer { + background-color: #FFE9E8; + border-bottom: 1px solid #FF0026; + border-top: 1px solid #FF0026; + float: none; + line-height: 1.2em; + margin: 2em -19px 1em; + padding: 0.5em 0 1em; + text-align: center; + } + </style> + + </head> + <body dir="ltr" id = "more_body" class="section-front-page template-document_view"> + + <link href="{% admin_media_prefix %}css/base.css" rel="stylesheet" type="text/css" /> + <script src="{% admin_media_prefix %}jquery/jquery-1.6.2.min.js" type="text/javascript"></script> + <script src="{% admin_media_prefix %}jquery/ui/js/jquery-ui-1.8.15.custom.min.js" type="text/javascript"></script> + <!-- Grappelli Main JS --> + <script src="{% admin_media_prefix %}js/grappelli/grappelli.js" type="text/javascript"></script> + <!-- Grappelli jQuery Plugins, Widgets --> + <script src="{% admin_media_prefix %}js/grappelli/jquery.grp_collapsible.js" type="text/javascript"></script> + <link rel="shortcut icon" href="/static/gstudio/img/favicon.ico" /> + <div id="header" > + {% include "gstudio/_header.html" %} + </div> + <link type="text/css" rel="stylesheet" href="more.css"> + <table id="portal-columns"> + <tbody> + <tr> + + <h1 class="documentFirstHeading"> + <center><span id="parent-fieldname-title" class=""><font size="23px"> + Welcome to Gnowledge Network! </font> + </span></center> + </h1><br/><br/><br/> + <h2><font size="6px">Introduction </font></h2><br/> + <ul><li>This site is based on a simple idea that we + can build collaboratively a road map of knowledge by specifying the + prerequisites of concepts, activities, experiences and statements. The resulting road map can be used as a scaffolding to describe each node network by linking the node to other nodes in terms of relations and attributes. + <br/> + </li> + <li>Look at <a href="http://atlas.gnowledge.org/Data/display/12675_depmap.svg" class="external-link">this map to get an idea of a dependency map based on prerequisites.</a></li> + <li>Look at this one to get an idea of how a node can be described as a map (Link required??). <br></li> + <li>You will agree that such maps will be very useful to teachers and + students. Over a period of time, with your collaboration, we can build a + complete roadmap of all knowledge which will help to generate a non-linear curriculum framework.</li> + <li>Read <a href="http://atlas.gnowledge.org/help">Help Document</a> to begin contributing.</li> + </ul> + <br/><br/><br/> + + <h2><font size="6px">What you can do?</font></h2><br/> + <ul><li>You can specify the prerequisites for any concept or an activity + at this site. Or view the existing prerequisites that are already + defined by the community. <br> + </li> + <li>We simply add a concept as a + node (if it does not exist already) and specify a semantic dependency + (meaning dependency) relation between one node and another.</li> + <li>Ask yourself the following set of questions:</li> + <ul><li>To understand a concept what do you expect the learner must already know?</li> + <li>To understand a concept what do you expect the learner must do?</li> + <li>To impart a skill what what other activities the learner must do?</li><li>To impart a skill what other concepts the learner must already know?</li></ul> + </ul> + <p>Answers to these questions can be specified in this community portal by establishing links between concepts and activities.</p> + <br/><br/><br/> + <h2><font size="6px">What we will get out of this?</font></h2><br/> + <ul><li>a globally useful resource for teachers and students to know the learning track (learning path) for any concept or skill. <br></li> + <li>teachers and authors of textbooks can use these maps to prepare course materials or sequence their curriculum.</li> + <li>students get to know what they need to know in order to learn something.</li><li>researchers can use the data for analyzing the properties of knowledge structures.<br></li> + <li>a network of concepts and activities that can be used, modified, published and shared by the entire community.</li><li>a visual map of knowledge and a road map for learning and teaching.</li> + <li>a knowledge base that can be used to profile different domains of knowledge.</li><li>the + resulting map will show us, as it were, the 'cities' (on which we + depend on most), 'towns' (on which we depend but not as much as the + cities), 'villages' (on which we depend least), continents (domains that + contain inter-related cities, towns and villages), etc. <br></li><li>a sequence to automatically guide learners in a machine guided online tutoring system, for example.</li> + <li>a + network analysis linking the number of nodes and links, plots, + analyses, statistics, distribution properties etc. (very soon as the + data set increases, we will publish the results on this site. You can access the data dumps (sans privacy information) very soon, so that you can analyze the data yourself.)<br></li> + <li>and we are sure it will have many other uses as well. If you foresee some please discuss with us in the list community@gnowledge.org. Or write or upload a document in the sandbox fodler (follow the link) and send us an email in the list.<br></li></ul> + <br/><br/><br/> + <h2><font size="6px">Yes! You do not have to write essays here.</font></h2><br/> + <ul><li>We can get all the above mentioned goodies without writing any + essays or do so much of research. We do not define concepts either! Just + ask yourself the questions mentioned above and provide the answer if + you have them. We simply make the dependency relations explicit for all + concepts that all of us know. Soon we will be able to do this in all + languages of the world (Our software developers are working on this.).</li></ul> + <br/><br/><br/> + <h2><font size="6px">So, how to get it going? </font></h2><br/> + <ol><li>Join as a member. Use the join link on the right corner of the site.<br></li> + <li>Use the 'Login' link if you are already a member.<br></li> + <li>Search for a concept or activity using the search form present on the right side of the header or the "<a href="http://localhost:8081/depmap/viewall?val=1">view or edit</a>" + link. (We started this site recently and data set is very small, so + don't be surprised if your favorite concepts and activities are not + found here.)<br></li> + <li>Add a non-existing node. By default it will be + taken as a concept, but if you want it to be an activity, use the check + box. If a node already exists, you will see a message: "Object already + exists". Then you can visit that node and then decide what more you can + do. <br></li> + <li>Then add appropriate dependency links. For adding + dependency link, click on the "Add" button below the relation names + "Depends on" or its inverse name "Required for".</li> + <li>If you think + that the existing relation is not accurate, you can remove the link + using the "Delete" tab. Or discuss in the mailing list on the issue and + resolve the conflict.<br></li> + <li>Remember! You cannot add a relation + unless a concept node already exists. So, if you don't find the node + you are looking for, add one and link it.<br></li> + <li>Remember, all of + us are making only one single map collaboratively. All contributions + are recorded against your login name with date and time of contribution. + <br></li> + <li>Please see below the ownership and license information to know who owns the data made by you.</li></ol> + + <br/><br/><br/> + <h2><font size="6px">Spread the word around the world! </font></h2><br/> + <ul><li>Well! The site is meant for you. We made this simplest web + application so that the whole world gets the benefit. The outcome of + this simplest exercise will be a very useful semantic dependency map for + learning and teaching any topic. The knowledge base built on this site + is available for every one. For making the maps in other languages we + have to only add translations to each node. We will soon add this + function to have the map in all languages. However, if you want to add + concepts in your own language, you can build them right away, and may + add the translation links latter when the feature is made available.<br></li></ul> + <br/><br/><br/> + <h2><font size="6px">License</font></h2><br/> + The network and the content produced is published under <a href="http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License" class="external-link">Creative Commons Attribution ShareAlike 3.0</a> + <p> </p> + <ul><li> What does this license imply?</li> + <ul><li>you have the freedom to use the maps for any purpose.</li> + <li>you can make modifications to them.<br></li><li>you + can distribute or publish or sell them provided you grant the same + freedoms to others as well, i.e., release them again under the terms of + the same license. Please write to us if you have any query on your rights to use them. + </li></ul> + </ul> + <br/><br/><br/> + <h2><font size="6px">We are slowly adding more features!</font></h2><br/> + <p>After depMap (dependency map) we will soon have other kinds of maps as follows:</p> + <ul><li>typeMap (what is a type of what, what is a sub-type of what) for taxonomy<br></li> + <li>partMap (what is a part of what, and what consists of what) for part-whole relation<br></li> + <li>reactionMap (what is a product of what, and what is a reactant of what) for how matter changes<br></li> + <li>causeMap (what is a cause of what, and what is an effect of what) for cause-effect map<br></li> + <li>testsMap (what is a preTest and what is a postTest of each node in the map) for assessment<br></li> + <li>and so on. If you have another good suggestion tell us, we will try to add that in future. So, write to us or upload your suggestion in the sandbox (you need to register to do this.).<br></li></ul> + <br/><br/><br/> + <h2><font size="6px">Tell us if you have any feedback!</font></h2><br/> + <ul><li>We will make improvements to the user interface to make the + process easy. If you have good ideas you can tell us, or if you have + skills or willing to contribute you can collaborate in building the + software of this portal as well. If you know how to help us build the site, you are welcome. Send us + a patch and if it works and gels with the rest of the site your + contribution will be in.<br></li></ul> + <blockquote> + <blockquote>join the room glab@conference.jabber.org to talk to other developers.</blockquote> + </blockquote> + <ul><li> + <div id="text-6"> + <ul><li> + join the mailing list atlas-dev@gnowledge.org at + <a href="http://gnowledge.org/cgi-bin/mailman/listinfo/atlas-dev">http://gnowledge.org/cgi-bin/mailman/listinfo/atlas-dev</a> + </li> + <li> + see our code at svn co <a href="https://svn.gnowledge.org/svn/repo/labcode/atlasv2/atlas">https://svn.gnowledge.org/svn/repo/labcode/atlasv2/atlas</a></li></ul> + </div> + <p>The site uses <a href="http://www.gnu.org/software/gnowsys/" class="external-link">GNOWSYS (Gnowledge Networking and Organizing System)</a> + as a backend. GNOWSYS uses gnowql (gnowledge query library) as API. + Some documentation about how you can learn gnowql is available <a href="http://lab.gnowledge.org/Software/gnowsys_rc1/documentation-of-new-gnowql" class="external-link">here</a>.</p> + </li><li>Use the 'contact' link above to write to us. If you have any feature request, we will try to add the feature. </li><li><a href="http://gnowledge.org/cgi-bin/mailman/listinfo/community" class="external-link">Join the mailing list here </a> to be in touch with other contributors where you can<br></li> + <ul><li>discuss with them pertaining to the activities on this portal<br></li><li>resolve conflicts if any</li><li>schedule periodic online workshops though collaborative online conferences</li><li>share your experiences <br></li><li>and so on.</li></ul> + </ul> + This site is made and maintained by the <a href="http://trac.gnowledge.org/trac">gnowledge.org lab</a> of Homi Bhabha Centre for Science Educatioin, TIFR.<a href="http://localhost:8081/depmap/" class="external-link"><br></a> + <p> </p> + + + + + </tr> + </tbody> + </table> + + <div id="portal-footer"> + + <p>A project of <a href="http://www.hbcse.tifr.res.in" target="_blank">Homi Bhabha Centre for Science Education</a>, + <a href="http://www.tifr.res.in" target="_blank">TIFR</a><br> + <!--Plone and its visual design is Copyright 2000 - 2006 by Alexander Limi, Alan Runyan, Vidar Andersen.--> + + </p> + + <p> + All text is available under the terms of the <a href="http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License" class="external-link">Creative Commons Attribution ShareAlike 3.0</a>. + </p> + + <p> + <a href="http://atlas.gnowledge.org/dedication" target="_blank">Dedication</a>,<a href="http://atlas.gnowledge.org/credits" target="_blank">Credits</a> and <a href="http://atlas.gnowledge.org/source" target="_blank">Source</a> + </p> + </div> + + + <div > + <ul> + <li><center> + <a href="http://atlas.gnowledge.org/softwares"><img src="/static/gstudio/img/community.png" /></a></center> + </li> + </ul> + + + </div> + + + </body> + </html> + diff --git a/gstudio/templates/gstudio/nodetype_detail.html b/gstudio/templates/gstudio/nodetype_detail.html index 7947e58..ee7cfcb 100644 --- a/gstudio/templates/gstudio/nodetype_detail.html +++ b/gstudio/templates/gstudio/nodetype_detail.html @@ -41,9 +41,24 @@ <a href="{{ object.ref.get_edit_url }}" target="_blank" title = "edit">[edit]</a> </h2> - {% with object.html_content|safe as object_content %} - +<div class="History"> + + + <table border="1" cellspacing="0"> + + {% for sid in object.ref.get_ssid %} + + + <a href="{{ object.get_version_url }}{{ sid }}/{{ forloop.counter }}" title= "{{ object.title }} {{ object.id }}.{{ forloop.counter }}" style="color:#FFA500"><b>+</b></a> + + {% endfor %} + </table> + +</div> + {% with object.html_content|safe as object_content %} +<!-- Neighbourhood listing starts --> +<!--Name,Plural Name , Alternate Name ,Type of --> <b>Name:<nbsp></b> {{ object.title }} <br/> {% if object.get_rendered_nbh.plural %} @@ -61,7 +76,7 @@ {% endfor %}<br/> {% endif %} - +<!-- Member of metatypes --> {% if object.get_rendered_nbh.member_of_metatypes %} @@ -72,7 +87,7 @@ {% endif %} - +<!-- Subtypes --> {% if object.get_rendered_nbh.contains_subtypes %} <b> Contains SubTypes:<nbsp></b> {% for stkey,stvalue in object.get_rendered_nbh.contains_subtypes.items %} @@ -80,7 +95,7 @@ {% endfor %}<br/> {% endif %} - +<!-- Members --> {% if object.get_rendered_nbh.contains_members %} @@ -90,7 +105,7 @@ {% endfor %}<br/> {% endif %} - +<!-- Authors --> {% if object.get_rendered_nbh.authors %} @@ -107,7 +122,7 @@ </span>{% if not forloop.last %}, {% endif %} {% endfor %} <br/> - +<!-- Prior nodes --> {% if object.get_rendered_nbh.priornodes %} @@ -117,7 +132,7 @@ <a href="{{mvalue}}" title = "{{mkey}}">{{mkey}}</a>; {% endfor %}<br/> {% endif %} - +<!-- Posterior nodes --> {% if object.get_rendered_nbh.posteriornodes %} @@ -126,7 +141,7 @@ <a href="{{mvalue}}" title = "{{mkey}}">{{mkey}}</a>; {% endfor %}<br/> {% endif %} - +<!-- Relations --> {% if object.get_rendered_nbh.relations %} @@ -137,18 +152,25 @@ {% endfor %}<br/> {% endfor %} {% endif %} - +<!-- Attributes --> {% if object.get_rendered_nbh.attributes %} {% for atkey,atvalue in object.get_rendered_nbh.attributes.items %} {% if atvalue %} <b>{{atkey}}:<nbsp> </b> {% for atr in atvalue %} - {{atr}}; + + {% for urlkey,urlvalue in object.get_edit_url_for_ats.items %} + + {% ifequal atr urlvalue %} + {{atr}}<a href="{{ urlkey}}" title = "edit">[edit]</a> ; + {% endifequal %} + {% endfor %} {% endfor %} <br/> {% endif %} {% endfor %} {% endif %} +<!-- Left roles --> {% if object.get_rendered_nbh.leftroles %} @@ -158,7 +180,7 @@ <a href="{{lrvalue}}" title = "{{lrkey}}">{{lrkey}}</a>; {% endfor %} <br/> {% endif %} - +<!-- Right roles --> {% if object.get_rendered_nbh.rightroles %} <b>Right roles:<nbsp> </b> @@ -167,7 +189,7 @@ <a href="{{rrvalue}}" title = "{{rrkey}}">{{rrkey}}</a>; {% endfor %} <br/> {% endif %} - +<!-- Attributes --> {% if object.get_rendered_nbh.ats %} @@ -178,11 +200,34 @@ <a href="{{atvalue}}" title = "{{atkey}}">{{atkey}}</a>; {% endfor %} <br/> {% endif %} - - {% if object.content %} - <b>Content:<nbsp></b>{{object_content}} - {% endif %} + + + +<!-- Content --> + {% if object.content %} + <b> + Content:<nbsp> + <input type="button" id="editdata" value="Edit Content"/><ndsp><nbsp> + <input type="hidden" id="objectid" value="{{object.id}}"/> + <input type="hidden" id="title" value="{{object.title}}"/> + <input type="hidden" id="orgcontent" value="{{object.content_org}}"/> + </b> + {{object_content}}<br/> + + {% else %} + <b> + Content:<nbsp> <input type="button"id="editdata" value="Edit Content"/><ndsp><nbsp> + <input type="hidden" id="objectid" value="{{object.id}}"/> + + <input type="hidden" id="title" value="{{object.title}}"/> + <input type="hidden" id="orgcontent" value="{{object.content_org}}"/> + </b> + {{object_content}}<br/> + + {% endif %} + +<!-- Neighbourhood Listing ends --> <script type="text/javascript" > var s = 0 var i @@ -250,21 +295,38 @@ {% endblock %} <!-- Dynamic form begins --> +{% if user.is_authenticated %} <p> {% if object.reftype == 'Objecttype' %} -<b>Add Attributes:</b> +<b>Add Attribute for: </b> +{% for key,value in object.get_at_url_add.items %} +<a href="/{{value}}" onclick="return showAddAnotherPopup(this);"> {{key}} </a><nbsp>;<br/> +{% endfor %} +</p> +<p> +<b>Add Attributes:(</b> +<a href="/admin/gstudio/attribute +/add" class="add-another" id="add_id_{{ field }}" onclick="return showAddAnotherPopup(this);"> +<img width="10" height="10" alt="Add Another" src="/static/grappelli/img/admin/icon_addlink.gif"> +</a> +<b>)</b> {% for i in object.getat %} <a href="{{ get_absolute_url }}/objects/dynamicAttribute/save/{{ i }}/{{ object.title }}">{{ i }}</a><nbsp>; {% endfor %} </p> <p> -<b>Add Relations: </b> +<b>Add Relations:(</b> +<a href="/admin/gstudio/relation +/add" class="add-another" id="add_id_{{ field }}" onclick="return showAddAnotherPopup(this);"> +<img width="10" height="10" alt="Add Another" src="/static/grappelli/img/admin/icon_addlink.gif"> +</a> +<b>)</b> {% for i in object.getrt %} <a href="{{ get_absolute_url }}/objects/dynamicRelation/displaymem/{{ i }}/{{ object.title }}">{{ i }}</a><nbsp>; {% endfor %} {% endif %} - +{% endif %} </p> <!-- Dyanic form ends --> <div class="nodetype-content"> @@ -306,6 +368,8 @@ {% endif %} </div> {% endblock %} +<br/> + {% block nodetype-comments %} <div id="comments" class="span-16 last"> diff --git a/gstudio/templates/gstudio/skeleton.html b/gstudio/templates/gstudio/skeleton.html index eba5e28..c99bab9 100644 --- a/gstudio/templates/gstudio/skeleton.html +++ b/gstudio/templates/gstudio/skeleton.html @@ -16,7 +16,7 @@ .mainnode{ font: 15px sans-serif; - fill:"black"; + fill:black; border-width: 1px; font-weight:bold; border-color: gray; @@ -89,15 +89,39 @@ <script src="{% admin_media_prefix %}js/grappelli/jquery.grp_autocomplete_fk.js" type="text/javascript"></script> <script src="{% admin_media_prefix %}js/grappelli/jquery.grp_autocomplete_m2m.js" type="text/javascript"></script> <script src="{% admin_media_prefix %}js/grappelli/jquery.grp_autocomplete_generic.js" type="text/javascript"></script> - <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/jquery-ui-timepicker-0.2.9/include/jquery-1.5.1.min.js"></script> - <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/jquery-ui-timepicker-0.2.9/include/jquery.ui.core.min.js"></script> - <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/jquery-ui-timepicker-0.2.9/include/jquery.ui.widget.min.js"></script> - <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/jquery-ui-timepicker-0.2.9/include/jquery.ui.tabs.min.js"></script> - <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/jquery-ui-timepicker-0.2.9/include/jquery.ui.position.min.js"></script> - - <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/jquery.ui.timepicker.js"></script> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> + <!-- Gnowmacs css, js --> + + <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/Gnowmacs/test/dl/js/thelib.js"></script> + <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/Gnowmacs/src/js/jquery-1.7.1.min.js"></script> + <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/Gnowmacs/src/js/jquery-ui-1.8.18.custom.min.js"></script> + + <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}gstudio/js/Gnowmacs/test/dl/css/default.css" /> + <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}gstudio/js/Gnowmacs/src/css/ymacs.css" /> + + + <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/Gnowmacs/src/js/jquery.ui.gnowmacs.js"></script> + <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/Gnowmacs/src/js/ymacs.js"></script> + <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/Gnowmacs/src/js/ymacs-keyboard.js"></script> + <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/Gnowmacs/src/js/ymacs-regexp.js"></script> + <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/Gnowmacs/src/js/ymacs-frame.js"></script> + <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/Gnowmacs/src/js/ymacs-textprop.js"></script> + <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/Gnowmacs/src/js/ymacs-exception.js"></script> + <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/Gnowmacs/src/js/ymacs-interactive.js"></script> + <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/Gnowmacs/src/js/ymacs-buffer.js"></script> + <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/Gnowmacs/src/js/ymacs-marker.js"></script> + <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/Gnowmacs/src/js/ymacs-commands.js"></script> + <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/Gnowmacs/src/js/ymacs-commands-utils.js"></script> + <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/Gnowmacs/src/js/ymacs-keymap.js"></script> + <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/Gnowmacs/src/js/ymacs-keymap-isearch.js"></script> + <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/Gnowmacs/src/js/ymacs-minibuffer.js"></script> + <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/Gnowmacs/src/js/ymacs-tokenizer.js"></script> + <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/Gnowmacs/src/js/ymacs-mode-paren-match.js"></script> + <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/Gnowmacs/src/js/gnowmacs.js"></script> + <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/Gnowmacs/src/js/savedata.js"></script> + <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/Gnowmacs/src/js/ymacs-keymap-emacs.js"></script> + <script src="{{STATIC_URL}}gstudio/js/gstudio.js" type="text/javascript"></script> <!-- EXTRAHEAD --> {% block extrahead %}{% endblock %} @@ -114,9 +138,9 @@ <link rel="pingback" href="/xmlrpc/" /> <link rel="shortcut icon" href="{{ STATIC_URL }}gstudio/img/favicon.ico" /> <link rel="home" href="{% url gstudio_nodetype_archive_index %}" /> - <link rel="stylesheet" type="text/css" media="screen, projection" href="{{ STATIC_URL }}gstudio/css/grappelli_skin_default.css" /> + <link rel="stylesheet" type="text/css" media="screen, projection" href="{{ STATIC_URL }}gstudio/css/screen.css" /> - <link rel="stylesheet" type="text/css" media="screen, projection" href="{{ STATIC_URL }}gstudio/css/screen_gstudio.css" /> + <link rel="stylesheet" type="text/css" media="print" href="{{ STATIC_URL }}gstudio/css/print.css" /> <!--[if lt IE 8]> <link rel="stylesheet" type="text/css" media="screen, projection" href="{{ STATIC_URL }}gstudio/css/ie.css" /> @@ -141,7 +165,7 @@ {% include "gstudio/_header.html" %} - <div id="breadcrumbs" class="span-24 last"> + <div id="breadcrumbs" class=""> / {% block breadcrumbs %}{% endblock %} </div> <div id="body" class="span-24 last"> @@ -150,7 +174,9 @@ {% endblock %} </div> - + <div id="gnoweditor"> + </div> + <div id="graphcss"> <div id="chart"> @@ -178,8 +204,8 @@ function init(a,b) { + - nodes_by_id = _.reduce(a, function(acc, n) { acc[n._id] = n; return acc; @@ -198,16 +224,19 @@ function init(a,b) return nodes_by_id[e.from] && nodes_by_id[e.to]&& e.type!="title" && e.type!="content" }).value(); - + } $(function fgraph() { - +neighbour_node= new Array(); +clicked_node=new Array(); +prev_node=new Array(); +neighbour_node= neighbour_node.concat({{object.id}}); $.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}}) }); @@ -338,29 +367,128 @@ function load(key) .attr("fill", "#6D6666"); - -$(window).bind('keydown',function(event){ - if(17==event.keyCode){ - new_g.on("click",function(d){ - if(d._id>0 && d.expanded=="false") - { - d3.select("#amazingViz").remove(); - d.expanded="true"; - $.getJSON('/nodetypes/graphs/graph_json/' + d._id , function (json2) { - new_metadata=json2.node_metadata; - new_relations=json2.relations; - new_relnset=json2.relset - metadata=_.union(new_metadata,metadata); - relations=_.union(new_relations,relations); - init(metadata,relations); - load(d._id) - }) +$(window).bind('keydown',function(event) { + if(event.keyCode==17){ + + new_g.on("click",function(d){ + + + + + if(d._id>0 && d.expanded=="true" && d._id!= {{object.id}}) + { + + $.getJSON('/nodetypes/graphs/graph_json/' + d._id , function (json2) { + new_metadata=json2.node_metadata; + + }); + + _.filter(new_metadata, function(e){if(e._id>0) + { + clicked_node=clicked_node.concat(e._id) ; + } + }); + + + index = _.indexOf(neighbour_node , d._id); + prev_node=neighbour_node.slice(0,index); + + neighbour_node = _.difference(neighbour_node,clicked_node) ; + + neighbour_node= neighbour_node.concat(prev_node); + neighbour_node = _.uniq(neighbour_node); + metadata=[] + relations=[] + metadata1=[] + relations1=[] + for(i=0;i<(neighbour_node.length);i++) + { + + d3.select("#amazingViz").remove(); + g=neighbour_node[i] + + + + $.ajax({ + async:false, + url:'/nodetypes/graphs/graph_json/' + g , + datatype:'json', + success:function (json2) { + new_metadata=json2.node_metadata; + new_relations=json2.relations; + metadata=_.union(new_metadata,metadata); + + relations=_.union(new_relations,relations); + relations= check_Relationtype(metadata,relations); + }}); + } - - }); + _.each(metadata, function(m){ + + for(i=0;i<neighbour_node.length;i++) + { + if(m._id==neighbour_node[i]) + {m.expanded="true";} + else + {m.expanded="false";} + } + + + }); + + init(metadata,relations); + load({{object.id}}) ; -} + + + } + + + + + else if(d._id>0 && d._id!= {{object.id}}) + { + + neighbour_node =neighbour_node.concat(d._id); + + d3.select("#amazingViz").remove(); + + $.ajax({ + async:false, + url:'/nodetypes/graphs/graph_json/' + d._id , + datatype:'json', + success:function (json2) { + + new_metadata=json2.node_metadata; + new_relations=json2.relations; + + metadata=_.union(new_metadata,metadata); + relations=_.union(new_relations,relations); + relations= check_Relationtype(metadata,relations); + _.each(metadata, function(m){ + + for(i=0;i<neighbour_node.length;i++) + { + if(m._id==neighbour_node[i]) + m.expanded="true"; + } + }); + + + }}); + console.log(metadata); + init(metadata,relations); + load({{object.id}}); + + + + + } }); +} + +}); + @@ -370,37 +498,27 @@ $(window).bind('keydown',function(event){ }); - /*new_g.append("svg:ellipse") - .attr("cx", function(d) { return d.x - w/2.0 +15; }) - .attr("cy", function(d) { return d.y - h/2.0 +15 ; }) - .call(force.drag) - .attr("rx", function(d) { return ((d.screen_name).length) +10 }) - .attr("ry", function(d) { if (d._id==key) return 8; else if (isNaN(d._id) || (d._id)<0) return 1; else return 7 }); - //.style("fill", function color(d) { if (d._id==key) return "red"; else if (isNaN(d._id) || (d._id)<0) return "white" ; else return "green"});*/ - - + - var text1 = new_g.append("svg:text") + text1 = new_g.append("svg:text") .attr("class",function(d) {var e=(d._id).charAt(0); if (d._id==key) return "mainnode";else if (e=="-") return "nodetext"; else if (isNaN(d._id)) return "relnode"; else return "node"; }) .attr("y", 20) .attr("x", 25) .attr("dy", ".35em") .attr("text-anchor","middle") - // .attr("style",function text(d) { if ((d._id)>0) return "font-size:9.00pt;fill:blue;" ; else return "font-size:9.00pt;fill:black;"}) - + .text(function(d) { return d.screen_name; }); - var bbox = text1.node().getBBox(); - + bbox = text1.node().getBBox(); + console.log(bbox); new_g.filter(function(d) { return (d._id).charAt(0)=="-"; }).append("svg:rect") - .attr("x",bbox.x-22 - ) + .attr("x",bbox.x-22) .attr("y", bbox.y) .attr("width", function(d) {var ttx=d.screen_name ; return (ttx.length+bbox.width+40)}) .attr("height", bbox.height) @@ -423,7 +541,7 @@ $(window).bind('keydown',function(event){ .style("fill-opacity", ".2") .style("stroke", "#666") .style("stroke-width", "1.5px") - .style("fill", function color(d) {var e=(d._id).charAt(0); if (d.expanded=="true") return "red"; else return "none"}); + .style("fill", function(d) {if ((d.expanded=="true" && d.refType=="Objecttype") ||(d._id=={{object.id}}) ) return "blue"; else if(d.expanded=="true" && d.refType=="Gbobject") return "red"; else return "none"}); @@ -462,17 +580,43 @@ $(window).bind('keydown',function(event){ } +function check_Relationtype(metadata,relations) +{ + + + _.each(metadata,function(d){ + if (d.refType=="Relationtype") + { + a=d.inverse; + if (d.flag==1) + { + relations= _.reject(relations,function(e) + { + return e.type==a + }); + } + else if (d.flag==0) + { + relations= _.reject(relations,function(e) + { + return e.type==d.screen_name + }); + } + } + + }); +return relations; + + +} + }); -//fgraph({{object.id}}); </script> </div> - <div id="sidebar"> - {% block sidebar %} - {% endblock %} - </div> + </div> <div id="footer"> @@ -488,6 +632,6 @@ $(window).bind('keydown',function(event){ </p> </div> - </div> + </body> </html> diff --git a/gstudio/templates/gstudio/tags/breadcrumbs.html b/gstudio/templates/gstudio/tags/breadcrumbs.html index 57f9ad9..0a33b7b 100644 --- a/gstudio/templates/gstudio/tags/breadcrumbs.html +++ b/gstudio/templates/gstudio/tags/breadcrumbs.html @@ -1,3 +1,6 @@ + +{% load gstudio_tags i18n %} +{% get_tags as nodetype_tags %} {% for crumb in breadcrumbs %} {% if not forloop.last %} {% if crumb.name %} @@ -7,3 +10,17 @@ {{ crumb.name }} {% endif %} {% endfor %} + +<div class="breadcrumbsearch"> + <form method="get" id="searchform" action="{% url nodes_search %}"> + <p> + <input type="text" value="{% trans "Keywords..." %}" name="pattern" id="searchbox" onfocus="this.value=''" /> + <input type="submit" class="submitbutton" value="OK" /> + <a title="{% trans 'You can use - to exclude words or phrases, "double quotes" for exact phrases and the AND/OR boolean operators combined with parenthesis for complex searchs.' %}"> + <img src="/static/objectapp/img/help.png" alt="?" width="14" height="14" /> + + <a href="{% url gstudio_nodetype_latest_feed %}" class="feeds" title="Rssfeed"><img src="/static/gstudio/img/rss.png" alt="?" width="20" height="" /></a> + </a> + </p> + </form> +</div> diff --git a/gstudio/templates/gstudio/version_base.html b/gstudio/templates/gstudio/version_base.html index 15ee3a8..d0795f3 100644 --- a/gstudio/templates/gstudio/version_base.html +++ b/gstudio/templates/gstudio/version_base.html @@ -1,7 +1,6 @@ {% extends "gstudio/skeleton.html" %} -{% load gstudio_tags i18n %} {% load objectapp_tags i18n %} - +{% load gstudio_tags i18n %} {% block meta %} <meta name="generator" content="Objectapp {{ OBJECTAPP_VERSION }}" /> {% endblock %} @@ -21,7 +20,7 @@ {% block sidebar %} <img src="{{ STATIC_URL }}objectapp/img/rss.png" alt="?" width="20" height="" /> - <a href="{% url objectapp_gbobject_latest_feed %}" class="feeds"><h4>Rssfeed</h4></a> + <a href="{% url gstudio_nodetype_latest_feed %}" class="feeds"><h4>Rssfeed of latest nodetypes</h4></a> <div class="search"> <h3>{% trans "Search" %}</h3> diff --git a/gstudio/templates/gstudio/version_diff.html b/gstudio/templates/gstudio/version_diff.html index a640f07..843c3ad 100644 --- a/gstudio/templates/gstudio/version_diff.html +++ b/gstudio/templates/gstudio/version_diff.html @@ -83,9 +83,9 @@ <link rel="pingback" href="/xmlrpc/" /> <link rel="shortcut icon" href="{{ STATIC_URL }}gstudio/img/favicon.ico" /> <link rel="home" href="{% url gstudio_nodetype_archive_index %}" /> - <link rel="stylesheet" type="text/css" media="screen, projection" href="{{ STATIC_URL }}gstudio/css/grappelli_skin_default.css" /> + <link rel="stylesheet" type="text/css" media="screen, projection" href="{{ STATIC_URL }}gstudio/css/screen.css" /> - <link rel="stylesheet" type="text/css" media="screen, projection" href="{{ STATIC_URL }}gstudio/css/screen_gstudio.css" /> + <link rel="stylesheet" type="text/css" media="print" href="{{ STATIC_URL }}gstudio/css/print.css" /> {% block link %}{% endblock %} {% block script %}{% endblock %} <title>Gnowledge Studio - {% block title %}{% endblock %}</title> @@ -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 %} + {% 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 %} - - <b> Content:<nbsp></b> {% autoescape off %} - {{ diffs.3 }} + {% 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> |