diff options
author | labadmin <labadmin@labadmin-P5E-Deluxe.(none)> | 2012-04-11 18:17:25 +0530 |
---|---|---|
committer | labadmin <labadmin@labadmin-P5E-Deluxe.(none)> | 2012-04-11 18:17:25 +0530 |
commit | 4d2412db1b99a1b430d308e3c7c49a31aac4026d (patch) | |
tree | 90c6da3f19a3770649dc05e3386aacde3a98fde4 /gstudio/templates | |
parent | 9539983c6e85c0888c32ab2d5ea1036ae755ffd9 (diff) | |
download | gnowsys-4d2412db1b99a1b430d308e3c7c49a31aac4026d.tar.gz |
Added count function in models of gstudio to count node data.Skeleton and css files changed to readjust dynamically with the data count
Diffstat (limited to 'gstudio/templates')
-rw-r--r-- | gstudio/templates/gstudio/nodetype_detail.html | 96 | ||||
-rw-r--r-- | gstudio/templates/gstudio/skeleton.html | 74 |
2 files changed, 129 insertions, 41 deletions
diff --git a/gstudio/templates/gstudio/nodetype_detail.html b/gstudio/templates/gstudio/nodetype_detail.html index 34ac7e2..b69c404 100644 --- a/gstudio/templates/gstudio/nodetype_detail.html +++ b/gstudio/templates/gstudio/nodetype_detail.html @@ -38,7 +38,7 @@ <a href="{{ object.get_absolute_url }}" title="{{ object.title }}" rel="bookmark"> {{ object.title }} </a> - <a href="{{ object.ref.get_edit_url }}" target="_blank" >[edit]</a> + <a href="{{ object.ref.get_edit_url }}" target="_blank" title = "edit">[edit]</a> </h2> {% with object.html_content|safe as object_content %} @@ -57,7 +57,7 @@ {% if object.get_rendered_nbh.type_of %} <b> Type of:<nbsp></b> {% for typekey,typevalue in object.get_rendered_nbh.type_of.items %} - <a href="{{typevalue}}">{{typekey}}</a>; + <a href="{{typevalue}}" title = "{{typekey}}">{{typekey}}</a>; {% endfor %}<br/> {% endif %} @@ -67,7 +67,7 @@ <b> Member of Metatypes:<nbsp></b> {% for mkey,mvalue in object.get_rendered_nbh.member_of_metatypes.items %} - <a href="{{mvalue}}">{{mkey}}</a>; + <a href="{{mvalue}}" title = "{{mkey}}">{{mkey}}</a>; {% endfor %}<br/> {% endif %} @@ -76,7 +76,7 @@ {% if object.get_rendered_nbh.contains_subtypes %} <b> Contains SubTypes:<nbsp></b> {% for stkey,stvalue in object.get_rendered_nbh.contains_subtypes.items %} - <a href="{{stvalue}}">{{stkey}}</a>; + <a href="{{stvalue}}" title = "{{stkey}}">{{stkey}}</a>; {% endfor %}<br/> {% endif %} @@ -86,7 +86,7 @@ <b>Contains Members:<nbsp></b> {% for mkey,mvalue in object.get_rendered_nbh.contains_members.items %} - <a href="{{mvalue}}">{{mkey}}</a>; + <a href="{{mvalue}}" title = "{{mkey}}">{{mkey}}</a>; {% endfor %}<br/> {% endif %} @@ -114,7 +114,7 @@ <b>Prior nodes:<nbsp></b> {% for mkey,mvalue in object.get_rendered_nbh.priornodes.items %} - <a href="{{mvalue}}">{{mkey}}</a>; + <a href="{{mvalue}}" title = "{{mkey}}">{{mkey}}</a>; {% endfor %}<br/> {% endif %} @@ -123,7 +123,7 @@ <b>Posterior nodes:<nbsp></b> {% for mkey,mvalue in object.get_rendered_nbh.posteriornodes.items %} - <a href="{{mvalue}}">{{mkey}}</a>; + <a href="{{mvalue}}" title = "{{mkey}}">{{mkey}}</a>; {% endfor %}<br/> {% endif %} @@ -133,7 +133,7 @@ {% for relkey,relvalue in object.get_rendered_nbh.relations.items %} <b>{{relkey}}:<nbsp></b> {% for relk, relv in relvalue.items %} - <a href="{{relv}}">{{relk}}</a>; + <a href="{{relv}}" title = "{{relk}}">{{relk}}</a>; {% endfor %}<br/> {% endfor %} {% endif %} @@ -155,7 +155,7 @@ <b>Left roles:<nbsp> </b> {% for lrkey,lrvalue in object.get_rendered_nbh.leftroles.items %} - <a href="{{lrvalue}}">{{lrkey}}</a>; + <a href="{{lrvalue}}" title = "{{lrkey}}">{{lrkey}}</a>; {% endfor %} <br/> {% endif %} @@ -164,7 +164,7 @@ <b>Right roles:<nbsp> </b> {% for rrkey,rrvalue in object.get_rendered_nbh.rightroles.items %} - <a href="{{rrvalue}}">{{rrkey}}</a>; + <a href="{{rrvalue}}" title = "{{rrkey}}">{{rrkey}}</a>; {% endfor %} <br/> {% endif %} @@ -175,13 +175,75 @@ <b>Subjecttype of:<nbsp> </b> {% for atkey,atvalue in object.get_rendered_nbh.ats.items %} - <a href="{{atvalue}}">{{atkey}}</a>; + <a href="{{atvalue}}" title = "{{atkey}}">{{atkey}}</a>; {% endfor %} <br/> {% endif %} {% if object.content %} <b>Content:<nbsp></b>{{object_content}} {% endif %} + + <script type="text/javascript" > + var s = 0 + var i + {% if object.get_rendered_nbh.count_plural %} + var i = parseInt({{ object.get_rendered_nbh.count_plural }}) + s = parseInt(s + i) + {% endif %} + {% if object.get_rendered_nbh.count_altnames %} + i = parseInt({{ object.get_rendered_nbh.count_altnames }}) + s = parseInt(s + i) + {% endif %} + {% if object.get_rendered_nbh.count_type_of %} + i = parseInt({{ object.get_rendered_nbh.count_type_of }}) + s = s + i + {% endif %} + {% if object.get_rendered_nbh.count_member_of_metatypes %} + i = parseInt({{ object.get_rendered_nbh.count_member_of_metatypes }}) + s = parseInt(s + i) + {% endif %} + {% if object.get_rendered_nbh.count_member_of_metatypes %} + i = parseInt({{ object.get_rendered_nbh.count_member_of_metatypes }}) + s = parseInt(s + i) + {% endif %} + {% if object.get_rendered_nbh.count_contains_members %} + var b = parseInt({{ object.get_rendered_nbh.count_contains_members }}) + s = parseInt(s + i) + {% endif %} + /* {% if object.get_rendered_nbh.count_siblings %} + i = parseInt({{ object.get_rendered_nbh.count_siblings }}) + s = parseInt(s + i) + {% endif %}*/ + {% if object.get_rendered_nbh.count_priornodes %} + i = parseInt({{ object.get_rendered_nbh.count_priornodes }}) + s = parseInt(s + i) + {% endif %} + {% if object.get_rendered_nbh.count_posteriornodes %} + i = parseInt({{ object.get_rendered_nbh.count_posteriornodes }}) + s = parseInt(s + i) + {% endif %} + {% if object.get_rendered_nbh.count_relations %} + i = parseInt({{ object.get_rendered_nbh.count_relations }}) + s = parseInt(s + i) + {% endif %} + {% if object.get_rendered_nbh.count_attributes %} + i = parseInt({{ object.get_rendered_nbh.count_attributes }}) + s = parseInt(s + i) + {% endif %} + {% if object.get_rendered_nbh.count_leftroles %} + i = parseInt({{ object.get_rendered_nbh.count_leftroles }}) + s = parseInt(s + i) + {% endif %} + {% if object.get_rendered_nbh.count_rightroles %} + i = parseInt({{ object.get_rendered_nbh.count_rightroles }}) + s = parseInt(s + i) + {% endif %} + if ( s > 0) + { + s = parseInt(s) + //alert(s) + } + </script> @@ -198,7 +260,7 @@ <div class="nodetype-next"> <h5>{% trans "Posterior node" %}</h5> {% for items in object.posteriornodes.all %} - <a href="{{ items.get_absolute_url }}"> {{ items.title }}</a>; + <a href="{{ items.get_absolute_url }}" title = "{{ items.title }}"> {{ items.title }}</a>; {% endfor %} </div> {% endif %} @@ -208,7 +270,7 @@ <div class="nodetype-next"> <h5>{% trans "Prior node" %}</h5> {% for items in object.priornodes.all %} - <a href="{{ items.get_absolute_url }}"> {{ items.title }}</a>; + <a href="{{ items.get_absolute_url }}" title = "{{ items.title }}"> {{ items.title }}</a>; {% endfor %} </div> {% endif %} @@ -242,7 +304,7 @@ <div class="comment-body span-13 last"> <div class="comment-author span-13 last"> {% if comment.url %} - <a href="{{ comment.url }}" class="fn url">{{ comment.user_name }}</a> + <a href="{{ comment.url }}" class="fn url" title = "{{ comment.user_name }}">{{ comment.user_name }}</a> {% else %} {{ comment.user_name }} {% endif %} @@ -279,7 +341,7 @@ <li id="pingback_{{ pingback.pk }}" class="pingback {% cycle box1,box2 %} span-15 last"> <div class="pingback-body span-15 last"> <div class="pingback-author span-15 last"> - <a href="{{ pingback.url }}">{{ pingback.user_name }}</a> + <a href="{{ pingback.url }}" title = "{{ pingback.user_name }}">{{ pingback.user_name }}</a> {% trans "on" %} {{ pingback.submit_date|date:"SHORT_DATETIME_FORMAT" }} </div> <div class="span-15 last"> @@ -312,7 +374,7 @@ <li id="trackback_{{ trackback.pk }}" class="trackback {% cycle box1,box2 %} span-15 last"> <div class="trackback-body span-15 last"> <div class="trackback-author span-15 last"> - <a href="{{ trackback.url }}">{{ trackback.user_name }}</a> + <a href="{{ trackback.url }}" title = "{{ trackback.user_name }}">{{ trackback.user_name }}</a> {% trans "on" %} {{ trackback.submit_date|date:"SHORT_DATETIME_FORMAT" }} </div> <div class="span-15 last"> @@ -327,7 +389,7 @@ {% endif %} {% if object.pingback_enabled %} <p> - <a href="{% url gstudio_nodetype_trackback object.pk %}" rel="trackback"> + <a href="{% url gstudio_nodetype_trackback object.pk %}" rel="trackback" title = "Trackback URL"> {% trans "Trackback URL" %}</a> </p> {% endif %} diff --git a/gstudio/templates/gstudio/skeleton.html b/gstudio/templates/gstudio/skeleton.html index da7591a..1fcf9cc 100644 --- a/gstudio/templates/gstudio/skeleton.html +++ b/gstudio/templates/gstudio/skeleton.html @@ -124,8 +124,7 @@ {% block script %}{% endblock %} <title>Gnowledge Studio - {% block title %}{% endblock %}</title> </head> <body id="gstudio"> - <div class="body" > - <div class="content"> + <!-- <div id="relation_type" class="ui-buttonset"> <span>Relation type:</span> @@ -134,8 +133,26 @@ <input value="hashtags" type="radio" id="hashtags" name="radio"/><label for="hashtags">Shared interests</label> </div> --> + + + + + + + {% include "gstudio/_header.html" %} + <div id="breadcrumbs" class="span-24 last"> + / {% block breadcrumbs %}{% endblock %} + </div> + <div id="body" class="span-24 last"> + <div id="content" class="hfeed span-16 border"> + {% block content %} <h3>The content block need to be overrided!</h3> + {% endblock %} + </div> + + + <div id="graphcss"> <div id="chart"> - <svg width="960" height="700" style="opacity: 1; "> + </div> <script type="text/javascript" src="/static/gstudio/js/jquery.min.js" ></script> <script type="text/javascript" src="/static/gstudio/js/jquery-ui.js" ></script> @@ -147,11 +164,28 @@ Javascript for Object type force graph --> + <script type="text/javascript" > - - var w = 700, - h = 300, - fill = d3.scale.category20(); + //alert(s) + //if ( parseInt(s) > 0 ){ + var a = 25 * s; + + if ( a > 700 ) + { + var w = 700; + } + else + { + var w = a; + } + + var h = 24 * s, + // } +// else{ + // var w = 700, + // h = 300, + // } + fill = d3.scale.category20(); var vis = d3.select("#chart") .append("svg:svg") @@ -496,34 +530,26 @@ $(function fgraph(gid) { </script> - </div> - </div> - <div> - {% include "gstudio/_header.html" %} - <div id="breadcrumbs" class="span-24 last"> - / {% block breadcrumbs %}{% endblock %} - </div> - <div id="body" class="span-24 last"> - <div id="content" class="hfeed span-16 border"> - {% block content %} <h3>The content block need to be overrided!</h3> - {% endblock %} </div> <div id="sidebar"> {% block sidebar %} {% endblock %} </div> + <div id="footer" class="span-24 last"> - <p> + <p> + <a rel="license" - href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative - Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png"/></a> All material is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a> unless mentioned otherwise. + href="http://creativecommons.org/licenses/by-sa/3.0/" title="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative + Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png"/></a> All material is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/" title = "http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a> unless mentioned otherwise. <br/> - Powered by <a href="http://www.djangoproject.com">Django</a> - and <a href="http://github.com/gnowgi/django-gstudio">Gstudio + Powered by <a href="http://www.djangoproject.com" title="https://www.djangoproject.com/">Django</a> + and <a href="https://github.com/gnowgi/gnowsys-studio" title="https://github.com/gnowgi/gnowsys-studio">Gstudio {{ GSTUDIO_VERSION }}</a>. </p> </div> - + + </body> </html> |