From 3a6f1bb43f49c071ea86944022e65b83fed0ad5d Mon Sep 17 00:00:00 2001 From: Arun yadav Date: Mon, 30 Apr 2012 12:53:23 +0530 Subject: urls,views and templates for history added.Models modified for the same --- gstudio/templates/gstudio/base.html | 27 ++ gstudio/templates/gstudio/display.html | 583 +++++++++++++++++++++++++++ gstudio/templates/gstudio/nodetype_list.html | 4 +- gstudio/templates/gstudio/version_base.html | 129 ++++++ 4 files changed, 742 insertions(+), 1 deletion(-) create mode 100644 gstudio/templates/gstudio/display.html create mode 100644 gstudio/templates/gstudio/version_base.html (limited to 'gstudio/templates') diff --git a/gstudio/templates/gstudio/base.html b/gstudio/templates/gstudio/base.html index 94a72eb..8625e13 100644 --- a/gstudio/templates/gstudio/base.html +++ b/gstudio/templates/gstudio/base.html @@ -41,6 +41,33 @@ {% get_objecttypes %} --> +
+ + + + + + + +

{% trans "Versions" %}

+ + {% for sid in object.get_ssid reversed %} + + + + +
+ {% endfor %} +
+ {{ object.id }}{{ sid }} + + {{ sid }} +
+
+ +
+
+

{% trans "Authors" %}

{% get_authors %} diff --git a/gstudio/templates/gstudio/display.html b/gstudio/templates/gstudio/display.html new file mode 100644 index 0000000..f4c2dfb --- /dev/null +++ b/gstudio/templates/gstudio/display.html @@ -0,0 +1,583 @@ + +{% load i18n comments gstudio_tags %} +{% load gstudio_tags i18n %} +{% get_tags as nodetype_tags %} +{% load adminmedia grp_tags %} + + + + + + + + + + {% block blockbots %} + + {% endblock %} + {% block stylesheets %} + + {% if LANGUAGE_BIDI %} + + {% endif %} + + + {% endblock %} + {% block extrastyle %}{% endblock %} + {% block javascripts %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% block extrahead %}{% endblock %} + + {% endblock %} + + + + + + + + {% block meta %}{% endblock %} + + + + + + + + + {% block link %}{% endblock %} + {% block script %}{% endblock %} Gnowledge Studio - {% block title %}{% endblock %} + + +
+
+ +
+ +
+ + + + + + + + +
+
+
+ {% include "gstudio/_header.html" %} + +
+
+

{% block content %} + {% block nodetype-content %} +

+ {{ ver_dict.title }} + +

+
+ {% with nt.html_content|safe as object_content %} + Name:{{ ver_dict.title }}
+ {% if ver_dict.altnames %} + Alternate names:{{ ver_dict.altnames}} +
+ {% endif %} + {% if ver_dict.plural %} + Plural Name:{{ ver_dict.plural }}
+ {% endif %} + {% if nt.get_rendered_nbh.authors %}Authors: + {% endif %} + {% for author in nt.authors.all %} + + + {% if not forloop.last %}, {% endif %} + {% endfor %}
+ {% endwith %} + {% endblock %} + {% endblock %} +
+ + + + + +
+
+ + + + + + + + diff --git a/gstudio/templates/gstudio/nodetype_list.html b/gstudio/templates/gstudio/nodetype_list.html index f4f75bd..ebaae5c 100644 --- a/gstudio/templates/gstudio/nodetype_list.html +++ b/gstudio/templates/gstudio/nodetype_list.html @@ -1,5 +1,7 @@ -{% extends "gstudio/base.html" %} +{% extends "gstudio/version_base.html" %} {% load i18n gstudio_tags %} +{% load i18n objectapp_tags %} + {% block meta-description %}{% trans "Latest nodetypes for" %} {% if metatype %}{% trans "the metatype" %} {{ metatype }}{% if metatype.description %}: {{ metatype.description|striptags|safe }}{% endif %}{% endif %}{% if tag %}{% trans "the tag" %} {{ tag }}{% endif %}{% if author %}{% trans "the author" %} {{ author }}{% endif %}{% if page_obj %}{% ifnotequal page_obj.number 1 %} {% trans "page" %} {{ page_obj.number }}{% endifnotequal %}{% endif %}{% endblock %} diff --git a/gstudio/templates/gstudio/version_base.html b/gstudio/templates/gstudio/version_base.html new file mode 100644 index 0000000..6972c9e --- /dev/null +++ b/gstudio/templates/gstudio/version_base.html @@ -0,0 +1,129 @@ +{% extends "gstudio/skeleton.html" %} +{% load gstudio_tags i18n %} +{% load objectapp_tags i18n %} + + {% block meta %} + +{% endblock %} + +{% block link %} + + + + + + +{% endblock %} + +{% block breadcrumbs %} + {% gstudio_breadcrumbs %} +{% endblock %} + +{% block sidebar %} + ? +

Rssfeed

+ + + +
+ + + + + + + + + + + + + + + + + + +
+

{% trans "Authors" %}

+ {% get_authors %} +
+
+

{% trans "Calendar" %}

+ {% get_calendar_gbobjects %} +
+
+

{% trans "Tags" %}

+ {% get_tag_cloud %} +
+
+

{% trans "Recent gbobjects" %}

+ {% get_recent_gbobjects 5 %} +
+
+

{% trans "Recent comments" %}

+ {% get_recent_comments 5 %} +
+
+

{% trans "Recent linkbacks" %}

+ {% get_recent_linkbacks 5 %} +
+
+

{% trans "Random gbobjects" %}

+ {% get_random_gbobjects 5 %} +
+
+

{% trans "Popular gbobjects" %}

+ {% get_popular_gbobjects 5 %} +
+
+

{% trans "Archives" %}

+ {% get_archives_gbobjects_tree %} +
+{% if user.is_authenticated %} +
+

{% trans "Tools" %}

+ +
+{% endif %} +{% endblock %} + + -- cgit v1.1 From 7e02e008009c476c831d7dcda78db9bc22beb42e Mon Sep 17 00:00:00 2001 From: Arun yadav Date: Wed, 9 May 2012 15:15:55 +0530 Subject: Added views ,templates and some version related properties in models.py --- gstudio/templates/gstudio/base.html | 13 +- gstudio/templates/gstudio/display.html | 12 +- gstudio/templates/gstudio/version_diff.html | 180 ++++++++++++++++++++++++++++ 3 files changed, 187 insertions(+), 18 deletions(-) create mode 100644 gstudio/templates/gstudio/version_diff.html (limited to 'gstudio/templates') diff --git a/gstudio/templates/gstudio/base.html b/gstudio/templates/gstudio/base.html index 8625e13..20b010d 100644 --- a/gstudio/templates/gstudio/base.html +++ b/gstudio/templates/gstudio/base.html @@ -52,19 +52,8 @@

{% trans "Versions" %}

{% for sid in object.get_ssid reversed %} - - - - -
+ {{ object.title }}{{ object.id }}{{ sid }}
{% endfor %} -
- {{ object.id }}{{ sid }} - - {{ sid }} -
-
-

diff --git a/gstudio/templates/gstudio/display.html b/gstudio/templates/gstudio/display.html index f4c2dfb..f2053a6e 100644 --- a/gstudio/templates/gstudio/display.html +++ b/gstudio/templates/gstudio/display.html @@ -523,9 +523,9 @@ $(function() { {% block sidebar %}
- + --> +

{% trans "Versions" %}

-
+ {% for sid in nt.get_ssid reversed %} @@ -544,10 +544,10 @@ $(function() { {{ nt.id }}.{{ sid }} {% endfor %} - +
- {{ sid }} + {{ nt.id }}.{{ sid }}
diff --git a/gstudio/templates/gstudio/version_diff.html b/gstudio/templates/gstudio/version_diff.html new file mode 100644 index 0000000..8130574 --- /dev/null +++ b/gstudio/templates/gstudio/version_diff.html @@ -0,0 +1,180 @@ + +{% load i18n comments gstudio_tags %} +{% load gstudio_tags i18n %} +{% get_tags as nodetype_tags %} +{% load adminmedia grp_tags %} + + +{% load gstudio_tags i18n %} +{% get_tags as nodetype_tags %} +{% load adminmedia grp_tags %} + + + + + {% block blockbots %} + + {% endblock %} + {% block stylesheets %} + + {% if LANGUAGE_BIDI %} + + {% endif %} + + + {% endblock %} + {% block extrastyle %}{% endblock %} + {% block javascripts %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% block extrahead %}{% endblock %} + + {% endblock %} + + + + + + + + {% block meta %}{% endblock %} + + + + + + + + {% block link %}{% endblock %} + {% block script %}{% endblock %} Gnowledge Studio - {% block title %}{% endblock %} + + + + + + + + + {% include "gstudio/_header.html" %} + + + + + + +
+ +

{% block content %} + {% block nodetype-content %} +

+ {{ ver_new.title }} + +

+
+ {% with nt1.html_content|safe as object_content %} + Name:{{ ver_new.title }}
+ {% if ver_new.altnames %} + Alternate names: {{ diffs }} +
+ {% endif %} + {% if ver_new.plural %} + Plural Name:{{ ver_new.plural }}
+ {% endif %} + {% if nt1.get_rendered_nbh.authors %}Authors: + {% endif %} + {% for author in nt1.authors.all %} + + + {% if not forloop.last %}, {% endif %} + {% endfor %}
+ {% endwith %} + {% endblock %} + {% endblock %} + +
+ +

{% block content1 %} + {% block nodetype-content1 %} +

+ {{ ver_old.title }} + +

+
+ {% with nt1.html_content|safe as object_content %} + Name:{{ ver_old.title }}
+ {% if ver_old.altnames %} + Alternate names:{{ ver_old.altnames}} +
+ {% endif %} + {% if ver_old.plural %} + Plural Name:{{ ver_old.plural }}
+ {% endif %} + {% if nt1.get_rendered_nbh.authors %}Authors: + {% endif %} + {% for author in nt1.authors.all %} + + + {% if not forloop.last %}, {% endif %} + {% endfor %}
+ {% endwith %} + {% endblock %} + {% endblock %} + +
+ + + + + + + + + + + -- cgit v1.1 From b0876ed40794df47dc60e94edfd4901cc7312236 Mon Sep 17 00:00:00 2001 From: Kabir Date: Thu, 17 May 2012 15:43:14 +0530 Subject: My dashboard removed from the header template --- gstudio/templates/gstudio/_header.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gstudio/templates') diff --git a/gstudio/templates/gstudio/_header.html b/gstudio/templates/gstudio/_header.html index 23d4d43..2e05c8c 100644 --- a/gstudio/templates/gstudio/_header.html +++ b/gstudio/templates/gstudio/_header.html @@ -12,7 +12,7 @@ | objects {% if user.is_authenticated %} - | My Dashboard + {% if user.is_staff %} | Admin Dashboard -- cgit v1.1 From 431f589903ea3f03678a3c20acfd478ae4c15805 Mon Sep 17 00:00:00 2001 From: Arun yadav Date: Fri, 18 May 2012 16:37:44 +0530 Subject: templates and views for history, with colour diff v1 --- gstudio/templates/gstudio/base.html | 10 +-- gstudio/templates/gstudio/display.html | 35 ++++++---- gstudio/templates/gstudio/version_diff.html | 103 ++++++++++++++++++---------- 3 files changed, 92 insertions(+), 56 deletions(-) (limited to 'gstudio/templates') diff --git a/gstudio/templates/gstudio/base.html b/gstudio/templates/gstudio/base.html index d0363f3..435a653 100644 --- a/gstudio/templates/gstudio/base.html +++ b/gstudio/templates/gstudio/base.html @@ -42,16 +42,10 @@
-->
- - - - - - - +

{% trans "Versions" %}

- {% for sid in object.get_ssid reversed %} + {% for sid in object.ref.get_ssid %} {{ object.title }}{{ object.id }}{{ sid }}
{% endfor %} diff --git a/gstudio/templates/gstudio/display.html b/gstudio/templates/gstudio/display.html index f2053a6e..67d9fff 100644 --- a/gstudio/templates/gstudio/display.html +++ b/gstudio/templates/gstudio/display.html @@ -523,28 +523,39 @@ $(function() { {% block sidebar %}
+ +

{% trans "Versions" %}

--> -

{% trans "Versions" %}

+ } + -
+
{% for sid in nt.get_ssid reversed %} {% endfor %} diff --git a/gstudio/templates/gstudio/version_diff.html b/gstudio/templates/gstudio/version_diff.html index 8130574..ee5e305 100644 --- a/gstudio/templates/gstudio/version_diff.html +++ b/gstudio/templates/gstudio/version_diff.html @@ -111,24 +111,32 @@ {{ ver_new.title }} -
- {% with nt1.html_content|safe as object_content %} - Name:{{ ver_new.title }}
- {% if ver_new.altnames %} - Alternate names: {{ diffs }} -
- {% endif %} - {% if ver_new.plural %} - Plural Name:{{ ver_new.plural }}
- {% endif %} - {% if nt1.get_rendered_nbh.authors %}Authors: - {% endif %} - {% for author in nt1.authors.all %} - - - {% if not forloop.last %}, {% endif %} - {% endfor %}
+ {% block content56 %}{% for each in diffs1 %} + {% autoescape off %} + {{ each }}
+ {% endautoescape %}{% endfor %} {% endblock %} + + + + + + + + + + + + + + + + + + + + + + {% endwith %} {% endblock %} {% endblock %} @@ -142,30 +150,53 @@ {{ ver_old.title }} -
- {% with nt1.html_content|safe as object_content %} - Name:{{ ver_old.title }}
- {% if ver_old.altnames %} - Alternate names:{{ ver_old.altnames}} -
- {% endif %} - {% if ver_old.plural %} - Plural Name:{{ ver_old.plural }}
- {% endif %} - {% if nt1.get_rendered_nbh.authors %}Authors: - {% endif %} - {% for author in nt1.authors.all %} - - - {% if not forloop.last %}, {% endif %} - {% endfor %}
+ {% block content85 %}{% for each in diffs %} + {% autoescape off %} + {{ each }}
+ {% endautoescape %}{% endfor %} {% endblock %} + + + + + + + + + + + + + + + + + + + + + + {% endwith %} {% endblock %} {% endblock %} + + + + + + + + + + + +
- {{ nt.id }}.{{ sid }} + {{ nt.id }}.{{ sid }} - {{ nt.id }}.{{ sid }} + {{ nt.id }}.{{ sid }}
Difference between Selected Versions
{% block content5 %}{% for each in diffs %} + {% autoescape off %} + {{ each }}
+ {% endautoescape %}{% endfor %} {% endblock %}
-- cgit v1.1 From 244509e3eb4058a3aff505e3836d43d64b08fe7d Mon Sep 17 00:00:00 2001 From: Arun yadav Date: Sat, 19 May 2012 15:15:51 +0530 Subject: Difference generation between versions done partly, list of differences generated. --- gstudio/templates/gstudio/base.html | 7 +- gstudio/templates/gstudio/display.html | 19 ++--- gstudio/templates/gstudio/version_diff.html | 120 +++++++++++++++------------- 3 files changed, 80 insertions(+), 66 deletions(-) (limited to 'gstudio/templates') diff --git a/gstudio/templates/gstudio/base.html b/gstudio/templates/gstudio/base.html index 435a653..bf84918 100644 --- a/gstudio/templates/gstudio/base.html +++ b/gstudio/templates/gstudio/base.html @@ -45,9 +45,14 @@

{% trans "Versions" %}

+ {% for sid in object.ref.get_ssid %} - {{ object.title }}{{ object.id }}{{ sid }}
+ + + {{ object.title }} {{ object.id }}.{{ forloop.counter }}
+ {% endfor %} +
diff --git a/gstudio/templates/gstudio/display.html b/gstudio/templates/gstudio/display.html index 67d9fff..184b58d 100644 --- a/gstudio/templates/gstudio/display.html +++ b/gstudio/templates/gstudio/display.html @@ -493,10 +493,9 @@ $(function() {

{% block content %} {% block nodetype-content %}

- {{ ver_dict.title }} + {{ ver_dict.title }} {{ nt.id }}.{{ cnt }}

-
{% with nt.html_content|safe as object_content %} Name:{{ ver_dict.title }}
{% if ver_dict.altnames %} @@ -547,19 +546,21 @@ $(function() { } - +
- {% for sid in nt.get_ssid reversed %} + + + + {% for sid in nt.get_ssid %} + {% ifnotequal forloop.counter cnt %} - {% endfor %} -
{{ nt.id }}.{{ cnt }}
- {{ nt.id }}.{{ sid }} - {{ nt.id }}.{{ sid }} -
+ {{ nt.id }}.{{ forloop.counter }} + {% endifnotequal %} + {% endfor %} diff --git a/gstudio/templates/gstudio/version_diff.html b/gstudio/templates/gstudio/version_diff.html index ee5e305..a640f07 100644 --- a/gstudio/templates/gstudio/version_diff.html +++ b/gstudio/templates/gstudio/version_diff.html @@ -111,32 +111,32 @@ {{ ver_new.title }} - {% block content56 %}{% for each in diffs1 %} - {% autoescape off %} - {{ each }}
- {% endautoescape %}{% endfor %} {% endblock %} + + + + - - - - - - - - - - - - + {% with nt1.html_content|safe as object_content %}
+ Name:{{ ver_new.title }}
+ {% if ver_new.altnames %} + Alternate names:{{ ver_new.altnames }} +
+ {% endif %} + {% if ver_new.plural %} + Plural Name:{{ ver_new.plural }}
+ {% endif %} + + Content:{{ ver_new.content }}
+ - - - - - - - - + {% if nt1.get_rendered_nbh.authors %}Authors: + {% endif %} + {% for author in nt1.authors.all %} + + + {% if not forloop.last %}, {% endif %} + {% endfor %}
{% endwith %} {% endblock %} {% endblock %} @@ -149,33 +149,41 @@

{{ ver_old.title }} -

- {% block content85 %}{% for each in diffs %} - {% autoescape off %} - {{ each }}
- {% endautoescape %}{% endfor %} {% endblock %} - - - - - - - - - - - - - + + + + + +
+ {% with nt1.html_content|safe as object_content %} + Name:{% autoescape off %} + {{ diffs.0 }} + {% endautoescape %}
+ {% if ver_old.altnames %} + Alternate names: {% autoescape off %} + {{ diffs.1 }} + {% endautoescape %} +
+ {% endif %} + {% if ver_old.plural %} + Plural Name: {% autoescape off %} + {{ diffs.2 }} + {% endautoescape %}
+ {% endif %} + + Content: {% autoescape off %} + {{ diffs.3 }} + {% endautoescape %}
+ - - - - - - - - + {% if nt1.get_rendered_nbh.authors %}Authors: + {% endif %} + {% for author in nt1.authors.all %} + + + {% if not forloop.last %}, {% endif %} + {% endfor %}
{% endwith %} {% endblock %} {% endblock %} @@ -192,12 +200,12 @@ -Difference between Selected Versions -{% block content5 %}{% for each in diffs %} - {% autoescape off %} - {{ each }}
- {% endautoescape %}{% endfor %} {% endblock %}
- + + + + + + -- cgit v1.1 From 8de5902b25d8d0447dcc07b75bd4fb94c9d558f1 Mon Sep 17 00:00:00 2001 From: Dhiru Date: Mon, 21 May 2012 18:25:26 +0530 Subject: changes done in file to increase height of canvas and rssfeed tooltip and readjust the place of footer --- gstudio/templates/gstudio/base.html | 5 +++-- gstudio/templates/gstudio/skeleton.html | 6 +++--- gstudio/templates/gstudio/version_base.html | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'gstudio/templates') diff --git a/gstudio/templates/gstudio/base.html b/gstudio/templates/gstudio/base.html index bf84918..f1c4aa1 100644 --- a/gstudio/templates/gstudio/base.html +++ b/gstudio/templates/gstudio/base.html @@ -20,8 +20,8 @@ {% endblock %} {% block sidebar %} - ? -

Rssfeed

+ + ?
diff --git a/gstudio/templates/gstudio/skeleton.html b/gstudio/templates/gstudio/skeleton.html index 3b945f4..eba5e28 100644 --- a/gstudio/templates/gstudio/skeleton.html +++ b/gstudio/templates/gstudio/skeleton.html @@ -219,12 +219,12 @@ function load(key) var a = 50 * s; var w = 700; var p = 100 + "%"; - var h = 600; - var q = 3 * s + 35 + "%"; + var h = 620; + var q = 3 * s + 75 + "%"; }else{ var w = 700; var p = 100 + "%"; - var h = 600; + var h = 620; var q = 110 + "%"; } fill = d3.scale.category20(); diff --git a/gstudio/templates/gstudio/version_base.html b/gstudio/templates/gstudio/version_base.html index 6972c9e..15ee3a8 100644 --- a/gstudio/templates/gstudio/version_base.html +++ b/gstudio/templates/gstudio/version_base.html @@ -57,8 +57,8 @@ - - +
+

{% trans "Authors" %}

-- cgit v1.1