diff options
author | gnowgi <nagarjun@gnowledge.org> | 2012-03-15 16:19:20 +0530 |
---|---|---|
committer | gnowgi <nagarjun@gnowledge.org> | 2012-03-15 16:19:20 +0530 |
commit | 7a4f561e851fdc7246d804c3abb6748b8a4199a6 (patch) | |
tree | d2afc3463fd49625a9be482012f5c3bfcf7c42b9 /gstudio/templates/gstudio | |
download | gnowsys-7a4f561e851fdc7246d804c3abb6748b8a4199a6.tar.gz |
master trunk of gnowsys-studio
Diffstat (limited to 'gstudio/templates/gstudio')
52 files changed, 3000 insertions, 0 deletions
diff --git a/gstudio/templates/gstudio/_header.html b/gstudio/templates/gstudio/_header.html new file mode 100644 index 0000000..5106179 --- /dev/null +++ b/gstudio/templates/gstudio/_header.html @@ -0,0 +1,79 @@ +{% load i18n grp_tags %} + +<div id="header"> + + <div class="branding"> Gnowledge Studio </div> + + <!-- Title --> + <div class="admin-title"> {% if grappelli_admin_title %}{{ + grappelli_admin_title }}{% else %}{% get_admin_title %}{% endif %} + | <a href="/">Home</a> + | <a href="{{ get_absolute_url }}/objects">objects</a> + {% if user.is_authenticated %} + {% if user.is_staff%} + | <a href="{{ get_absolute_url }}/admin">Admin Dashboard</a> + {% else %} + | <a href="{{ get_absolute_url }}/gstudio/userdashboard">My Dashboard</a> + {% endif %} + {% endif %} + + + </div> + + {% if user.is_authenticated %} + <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> + <ul class="user-options"> + <!-- Change Password --> + {% url admin:password_change as password_change_url %} + {% if password_change_url %} + <li><a href="{{ password_change_url }}"> + {% else %} + <li><a href="{{ root_path }}password_change/"> + {% endif %} + {% trans 'Change password' %}</a></li> + <!-- Logout --> + <li><a href="{{get_absoulute_url}}/accounts/logout/"> + {% trans 'Log out' %}</a></li> + + </ul> + </li> + <!-- Userlinks --> + {% block userlinks %} + <!-- JS tests --> + {% url test-index as testindexurl %} + {% if testindexurl %} + <li><a href="{{ testindexurl }}">{% trans 'Tests' %}</a></li> + {% endif %} + <!-- Documentation --> + {% url django-admindocs-docroot as docsroot %} + {% if docsroot %} + <li><a href="{{ docsroot }}">{% trans 'Documentation' %}</a></li> + {% endif %} + <li><a href="http://github.com/gnowgi/django-gstudio">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> + </ul> + + + + + {% endif %} + {% block nav-global %} + {% endblock %} +</div> + +<script type="text/javascript" charset="utf-8"> + (function($) { + $(document).ready(function() { + $("div#header .collapse").grp_collapsible(); + }); + })(django.jQuery); +</script> + diff --git a/gstudio/templates/gstudio/_narrative_detail.html b/gstudio/templates/gstudio/_narrative_detail.html new file mode 100644 index 0000000..53e62ea --- /dev/null +++ b/gstudio/templates/gstudio/_narrative_detail.html @@ -0,0 +1,200 @@ + + </p><p> + + + {% if object.get_rendered_nbh.plural %} + <b> Its plural form is:<nbsp></b> + {{object.get_rendered_nbh.plural}};<nbsp> + {% endif %} + {% if object.get_rendered_nbh.altnames %} + <b> It is known by other names:<nbsp></b> + {{object.get_rendered_nbh.altnames}} ;<nbsp> + {% endif %} + + {% if object.get_rendered_nbh.member_of_metatypes %} + + {% if object.get_rendered_nbh.type_of %} + <b> is a kind of:<nbsp></b> + {% for typekey,typevalue in object.get_rendered_nbh.type_of.items %} + <a href="{{typevalue}}">{{typekey}}</a>; + {% endfor %};<nbsp> + {% endif %} + + <b> member of metatype/s:<nbsp></b> + {% for mkey,mvalue in object.get_rendered_nbh.member_of_metatypes.items %} + <a href="{{mvalue}}">{{mkey}}</a>; + {% endfor %};<nbsp> + {% endif %} + + {% 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>; + {% endfor %};<nbsp> + {% endif %} + + + {% if object.get_rendered_nbh.contains_members %} + + + <b>has members:<nbsp></b> + {% for mkey,mvalue in object.get_rendered_nbh.contains_members.items %} + <a href="{{mvalue}}">{{mkey}}</a>; + {% endfor %};<nbsp> + {% endif %} + + + + + {% if object.get_rendered_nbh.relations %} + + + {% 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>; + {% endfor %};<nbsp> + {% endfor %} + {% endif %} + + {% if object.get_rendered_nbh.attributes %} + + + + <b>It has some more properties: <nbsp> </b> + + {% for items in object.get_rendered_nbh.attributes.items %} + {{items}}; + {% endfor %} ;<nbsp> + {% endif %} + + + {% if object.get_rendered_nbh.leftroles %} + + + + <b>it is used as a subject-type for the relation: <nbsp> </b> + + {% for lrkey,lrvalue in object.get_rendered_nbh.leftroles.items %} + <a href="{{lrvalue}}">{{lrkey}}</a>; + {% endfor %} ;<nbsp> + {% endif %} + + + {% if object.get_rendered_nbh.rightroles %} + + <b>it is used as an object in the predicate position for the relation: <nbsp> </b> + + {% for rrkey,rrvalue in object.get_rendered_nbh.rightroles.items %} + <a href="{{rrvalue}}">{{rrkey}}</a>; + {% endfor %} ;<nbsp> + {% endif %} + + + {% if object.get_rendered_nbh.ats %} + + + <b>it is subject-type for the property: <nbsp> </b> + + {% for atkey,atvalue in object.get_rendered_nbh.ats.items %} + <a href="{{atvalue}}">{{atkey}}</a>; + {% endfor %} ;<nbsp> + {% endif %} + +</p><p> + {% if object.get_rendered_nbh.priornodes %} + + + <b>It has prerequisites:<nbsp></b> + {% for mkey,mvalue in object.get_rendered_nbh.priornodes.items %} + <a href="{{mvalue}}">{{mkey}}</a>; + {% endfor %};<nbsp> + {% endif %} + + {% if object.get_rendered_nbh.posteriornodes %} + + + <b>It is a prerequisite for:<nbsp></b> + {% for mkey,mvalue in object.get_rendered_nbh.posteriornodes.items %} + <a href="{{mvalue}}">{{mkey}}</a>; + {% endfor %};<nbsp> + {% endif %} + + + + + </p> + + <div class="nodetype-body span-16 last"> + {% if object.image %} + <div class="nodetype-image"> + <p> + <a href="{{ object.get_absolute_url }}" rel="bookmark"> + <img src="{{ object.image.url }}" alt="{{ object.title }}" class="left" /> + </a> + </p> + </div> + {% endif %} + <div class="nodetype-content"> + <br> + {{ object_content }} + </div> + + + + </div> + + + <div class="nodetype-footer"> + <p class="nodetype-tags span-16 last"> + <strong>{% trans "Tags" %}</strong> : + {% tags_for_object object as tag_list %} + {% for tag in tag_list %} + <a href="{% url gstudio_tag_detail tag %}" + title="Tag {{ tag }}" rel="tag">{{ tag }}</a> + {% empty %} + <span>{% trans "No tags" %}</span> + {% endfor %} + </p> + + <p class="nodetype-shorturl span-16 last"> + <strong>{% trans "Short url" %}</strong> : + <a href="{{ object.short_url }}" title="{{ object.title }}" rel="shortlink"> + {{ object.short_url }} + </a> + </p> + + <p class="nodetype-comments span-16 last"> + <strong>{% trans "Discussions" %}</strong> : + {% with object.comments.count as comment_count %} + {% if comment_count %} + <a href="{{ object.get_absolute_url }}#comments" title="{{ object.title }}"> + {% blocktrans count comment_count as comment_count %}{{ comment_count }} comment{% plural %}{{ comment_count }} comments{% endblocktrans %} + </a> + {% else %} + {% if object.comments_are_open %} + {% trans "No comments yet." %} + <a href="{{ object.get_absolute_url }}#comments" title="{{ object.title }}"> + {% trans "Discuss the relations or raise any issues with the representation!" %} + </a> + {% else %} + {% trans "Comments are closed." %} + {% endif %} + {% endif %} + {% endwith %} + {% with object.pingbacks.count as pingback_count %} + {% if pingback_count %} + , <a href="{{ object.get_absolute_url }}#pingbacks" title="{{ object.title }}"> + {% blocktrans count pingback_count as pingback_count %}{{ pingback_count }} pingback{% plural %}{{ pingback_count }} pingbacks{% endblocktrans %} + </a> + {% endif %} + {% endwith %} + {% with object.trackbacks.count as trackback_count %} + {% if trackback_count %} + , <a href="{{ object.get_absolute_url }}#trackbacks" title="{{ object.title }}"> + {% blocktrans count trackback_count as trackback_count %}{{ trackback_count }} trackback{% plural %}{{ trackback_count }} trackbacks{% endblocktrans %} + </a> + {% endif %} + {% endwith %} + </p> + </div> diff --git a/gstudio/templates/gstudio/_nodetype_detail.html b/gstudio/templates/gstudio/_nodetype_detail.html new file mode 100644 index 0000000..7f56f40 --- /dev/null +++ b/gstudio/templates/gstudio/_nodetype_detail.html @@ -0,0 +1,32 @@ +{% load tagging_tags comments i18n %} +<div id="nodetype-{{ object.pk }}" class="hnodetype{% if object.featured %} featured{% endif %} span-16 last"> + <div class="nodetype-header span-16 last"> + <h2 class="nodetype-title"> + <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> + + </h2> + + <p class="nodetype-info"> + + + {% if object.authors.count %} + {% trans "Contributed by" %} + {% for author in object.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 %} + {% trans "on" %} + {% else %} + {% trans "Contributed by" %} + {% endif %} + <abbr class="published" title="{{ object.creation_date|date:"c" }}Z">{{ object.creation_date|date:"DATE_FORMAT" }}</abbr> + + + +</div> +</div> diff --git a/gstudio/templates/gstudio/_nodetype_neighbourhood.html b/gstudio/templates/gstudio/_nodetype_neighbourhood.html new file mode 100644 index 0000000..9941b86 --- /dev/null +++ b/gstudio/templates/gstudio/_nodetype_neighbourhood.html @@ -0,0 +1,18 @@ +{% load tagging_tags comments i18n %} + +{% block neighbourhood %} + + {% for key,value in object.get_nbh.items %} + + <p> <b>{{key}}:</b> + {% if key == 'title'%} + {{value}} + {% endif %} + {% for key,value in value.items %} + {{value}}, + {% endfor %} + </p> + + + {% endfor %} +{% endblock %} diff --git a/gstudio/templates/gstudio/_subtype_detail.html b/gstudio/templates/gstudio/_subtype_detail.html new file mode 100644 index 0000000..e77ced8 --- /dev/null +++ b/gstudio/templates/gstudio/_subtype_detail.html @@ -0,0 +1 @@ +nothing as yet diff --git a/gstudio/templates/gstudio/attributetype_detail.html b/gstudio/templates/gstudio/attributetype_detail.html new file mode 100644 index 0000000..a09f561 --- /dev/null +++ b/gstudio/templates/gstudio/attributetype_detail.html @@ -0,0 +1,281 @@ +{% extends "gstudio/base.html" %} +{% load i18n comments gstudio_tags %} + +{% block title %}{{ object.title }}{% endblock %} + +{% block meta-description %}{% if object.excerpt %}{{ object.excerpt|striptags }}{% else %}{{ object.content|striptags|truncatewords:100 }}{% endif %}{% endblock %} + +{% block meta-keywords %}{% if object.tags %}{{ object.tags }}{% else %}{{ block.super }}{% endif %}{% endblock %} + + +{% block link %} + {{ block.super }} + {% with object.previous_attributetype as previous_attributetype %}{% if previous_attributetype %} + <link rel="prev" title="{{ previous_attributetype.title }}" href="{{ previous_attributetype.get_absolute_url }}" /> + {% endif %}{% endwith %} + {% with object.next_attributetype as next_attributetype %}{% if next_attributetype %} + <link rel="next" title="{{ next_attributetype.title }}" href="{{ next_attributetype.get_absolute_url }}" /> + {% endif %}{% endwith %} + <link rel="shortlink" href="{{ object.short_url }}" /> + <link rel="canonical" href="{{ object.get_absolute_url }}" /> + {% with year=object.creation_date|date:"Y" month=object.creation_date|date:"m" day=object.creation_date|date:"d" %} + <link rel="alternate" type="application/rss+xml" title="{% trans "RSS Feed of discussions on" %} '{{ object.title }}'" + href="{% url gstudio_attributetype_discussion_feed year month day object.slug %}" /> + <link rel="alternate" type="application/rss+xml" title="{% trans "RSS Feed of comments on" %} '{{ object.title }}'" + href="{% url gstudio_attributetype_comment_feed year month day object.slug %}" /> + <link rel="alternate" type="application/rss+xml" title="{% trans "RSS Feed of pingbacks on" %} '{{ object.title }}'" + href="{% url gstudio_attributetype_pingback_feed year month day object.slug %}" /> + <link rel="alternate" type="application/rss+xml" title="{% trans "RSS Feed of trackbacks on" %} '{{ object.title }}'" + href="{% url gstudio_attributetype_trackback_feed year month day object.slug %}" /> + {% endwith %} +{% endblock %} + + +{% block content %} + + +{% block attributetype-content %} + {% with object.html_content|safe as object_content %} + + + <b>Test successful : </b> {{ object.title }} <br/> + + {% for key,value in object.get_rendered_nbh.items %} + + {% if value %} + {% if key == "altnames" %} + <b> Alternate names :<nbsp></b> + {{value}} <br/> + {% endif %} + {% if key == "plural" %} + <b> Plural Name :<nbsp></b> + {{value}} <br/> + {% endif %} + {% if key == "type_of" %} + <b> Type of :<nbsp></b> + {{value}} <br/> + {% endif %} + {% if key == "contains_subtypes" %} + <b> SubTypes :<nbsp></b> + {{value}} <br/> + {% endif %} + {% if key == "siblings" %} + {% if value %} + <b>Siblings: <nbsp> </b> + {% endif %} + {% for sibkey,sibvalue in value.items %} + <a href="{{sibvalue}}">{{sibkey}}</a>; + {% endfor %} <br/> + {% endif %} + {% if key == "member_of_metatypes" %} + <b> Member of Metatypes :<nbsp></b> + {% for mkey,mvalue in value.items %} + <a href="{{mvalue}}">{{mkey}}</a>; + {% endfor %}<br/> + {% endif %} + {% if key == "contains_members" %} + <b>Contains Member objects :<nbsp></b> + {% for mkey,mvalue in value.items %} + <a href="{{mvalue}}">{{mkey}}</a>; + {% endfor %}<br/> + {% endif %} + {% if key == "leftroles" %} + <b>Left role of Relation types :<nbsp></b> + {% for lftkey, lftvalue in value.items %} + <a href="{{lftvalue}}">{{lftkey}}</a>; + {% endfor %}<br/> + {% endif %} + {% if key == "rightroles" %} + <b>Right role of Relation types :<nbsp></b> + {% for rghtkey, rghtvalue in value.items %} + <a href="{{rghtvalue}}">{{rghtkey}}</a>; + {% endfor %}<br/> + {% endif %} + {% if key == "posteriornodes" %} + <b>Posterior nodes :<nbsp></b> + {% for mkey,mvalue in value.items %} + <a href="{{mvalue}}">{{mkey}}</a>; + {% endfor %}<br/> + {% endif %} + {% if key == "priornodes" %} + <b>Priornodes :<nbsp></b> + {% for mkey,mvalue in value.items %} + <a href="{{mvalue}}">{{mkey}}</a>; + {% endfor %}<br/> + {% endif %} + + + + {% endif %} + {% endfor %} + + + + {% endwith %} + {% endblock %} + + + +{% block attributetype-widgets %} +<div class="attributetype-widgets span-16 last"> {% with object.next_attributetype as next_attributetype %} + {% if object.posteriornodes.all %} + <div class="attributetype-next"> + <h5>{% trans "Posterior node" %}</h5> + {% for items in object.posteriornodes.all %} + <a href="{{ items.get_absolute_url }}"> {{ items.title }}</a>; + {% endfor %} + </div> + {% endif %} + {% endwith %} + <!-- {% with object.previous_attributetype as previous_attributetype %} --> + {% if object.priornodes.all %} + <div class="attributetype-next"> + <h5>{% trans "Prior node" %}</h5> + {% for items in object.priornodes.all %} + <a href="{{ items.get_absolute_url }}"> {{ items.title }}</a>; + {% endfor %} + </div> + {% endif %} + {% endwith %} + {% if object.related_published %} + <div class="attributetype-related"> + <h5>{% trans "Related node types" %}</h5> + <ul> + {% for attributetype in object.related_published %} + <li> + <a href="{{ attributetype.get_absolute_url }}" title="{{ attributetype.title }}" rel="bookmark">{{ attributetype.title }}</a> + </li> + {% endfor %} + </ul> + </div> + {% endif %} +</div> +{% endblock %} + +{% block attributetype-comments %} +<div id="comments" class="span-16 last"> + <h5>{% trans "Comments" %}</h5> + {% with object.comments as comment_list %} + {% if comment_list.count %} + <ol id="comment-list" class="span-15 last"> + {% for comment in comment_list %} + <li id="comment_{{ comment.pk }}" class="comment vcard {% cycle box1,box2 %}{% if comment.user in object.authors.all %} post-author{% endif %} span-15 last"> + <div class="span-2"> + <img src="{% get_gravatar comment.email 60 "G" %}" class="gravatar photo" alt="{{ comment.user_name }}"/> + </div> + <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> + {% else %} + {{ comment.user_name }} + {% endif %} + {% trans "on" %} {{ comment.submit_date|date:"SHORT_DATETIME_FORMAT" }} + </div> + <div class="span-13 last"> + {{ comment.comment|linebreaks }} + </div> + </div> + </li> + {% endfor %} + </ol> + {% if not object.comments_are_open %} + <p>{% trans "Comments are closed." %}</p> + {% endif %} + {% else %} + {% if object.comments_are_open %} + <p>{% trans "No comments yet." %}</p> + {% else %} + <p>{% trans "Comments are closed." %}</p> + {% endif %} + {% endif %} + {% endwith %} +</div> +{% endblock %} + +{% block attributetype-pingbacks %} +<div id="pingbacks" class="span-16 last"> + <h5>{% trans "Pingbacks" %}</h5> + {% with object.pingbacks as pingback_list %} + {% if pingback_list.count %} + <ol id="pingback-list" class="span-15 last"> + {% for pingback in pingback_list %} + <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> + {% trans "on" %} {{ pingback.submit_date|date:"SHORT_DATETIME_FORMAT" }} + </div> + <div class="span-15 last"> + <cite> + {{ pingback.comment }} + </cite> + </div> + </div> + </li> + {% endfor %} + </ol> + {% endif %} + {% if object.pingback_enabled %} + <p>{% trans "Pingbacks are open." %}</p> + {% else %} + <p>{% trans "Pingbacks are closed." %}</p> + {% endif %} + {% endwith %} +</div> +{% endblock %} + +{% block attributetype-trackbacks %} +{% with object.trackbacks as trackback_list %} +{% if trackback_list.count or object.pingback_enabled %} +<div id="trackbacks" class="span-16 last"> + <h5>{% trans "Trackbacks" %}</h5> + {% if trackback_list.count %} + <ol id="trackback-list" class="span-15 last"> + {% for trackback in trackback_list %} + <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> + {% trans "on" %} {{ trackback.submit_date|date:"SHORT_DATETIME_FORMAT" }} + </div> + <div class="span-15 last"> + <cite> + {{ trackback.comment }} + </cite> + </div> + </div> + </li> + {% endfor %} + </ol> + {% endif %} + {% if object.pingback_enabled %} + <p> + <a href="{% url gstudio_attributetype_trackback object.pk %}" rel="trackback"> + {% trans "Trackback URL" %}</a> + </p> + {% endif %} +</div> +{% endif %} +{% endwith %} +{% endblock %} + +{% block attributetype-comments-form %} +{% if object.comments_are_open %} +<div class="commentForm span-16 last"> + {% render_comment_form for object %} +</div> +{% endif %} +{% endblock %} + +{% endblock %} + +{% block admin_tools %} +{% if perms.gstudio.change_attributetype %} +<li> + <a href="{% url admin:gstudio_objecttype_change object.pk %}" title="{% trans "Edit the attributetype" %}"> + {% trans "Edit the node type" %} + </a> +</li> +{% endif %} +{% endblock %} diff --git a/gstudio/templates/gstudio/author/nodetype_list.html b/gstudio/templates/gstudio/author/nodetype_list.html new file mode 100644 index 0000000..54b8914 --- /dev/null +++ b/gstudio/templates/gstudio/author/nodetype_list.html @@ -0,0 +1 @@ +{% extends "gstudio/nodetype_list.html" %} diff --git a/gstudio/templates/gstudio/author_list.html b/gstudio/templates/gstudio/author_list.html new file mode 100644 index 0000000..2fd0295 --- /dev/null +++ b/gstudio/templates/gstudio/author_list.html @@ -0,0 +1,27 @@ +{% extends "gstudio/base.html" %} +{% load i18n %} + +{% block meta-description %}{% trans "Author list" %}{% endblock %} + +{% block title %}{% trans "Authors" %}{% endblock %} + +{% block content %} +<h2>{% trans "Author list" %}</h2> +<div> + <ul> + {% for object in object_list %} + <li class="vcard"> + <a href="{% url gstudio_author_detail object.username %}" + title="{{ object.username }}" class="fn nickname url"> + {{ object.username }} + </a> + {% blocktrans count object.nodetypes_published.count as nodetype_count %}{{ nodetype_count }} nodetype{% plural %}{{ nodetype_count }} nodetypes{% endblocktrans %} + </li> + {% empty %} + <li> + {% trans "No authors yet." %} + </li> + {% endfor %} + </ul> +</div> +{% endblock %} diff --git a/gstudio/templates/gstudio/base.html b/gstudio/templates/gstudio/base.html new file mode 100644 index 0000000..1d8898b --- /dev/null +++ b/gstudio/templates/gstudio/base.html @@ -0,0 +1,107 @@ +{% extends "gstudio/skeleton.html" %} +{% load objectapp_tags i18n %} + + {% block meta %} + <meta name="generator" content="Objectapp {{ OBJECTAPP_VERSION }}" /> +{% endblock %} + +{% block link %} + <link rel="index" href="{% url objectapp_gbobject_archive_index %}" /> + <link rel="EditURI" type="application/rsd+xml" href="{% url objectapp_rsd %}" /> + <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="{% url objectapp_wlwmanifest %}" /> + <link rel="search" type="application/opensearchdescription+xml" title="Objectapp's Blog" href="{% url objectapp_opensearch %}" /> + <link rel="alternate" type="application/rss+xml" title="{% trans "RSS Feed of latest gbobjects" %}" href="{% url objectapp_gbobject_latest_feed %}" /> + {% get_archives_gbobjects "objectapp/tags/archives_gbobjects_link.html" %} +{% endblock %} + +{% block breadcrumbs %} + {% objectapp_breadcrumbs %} +{% endblock %} + +{% 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> + +<div class="search"> + <h3>{% trans "Search" %}</h3> + <form method="get" id="searchform" action="{% url objectapp_gbobject_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_URL }}objectapp/img/help.png" alt="?" width="14" height="14" /> + </a> + </p> + </form> +</div> +<div class="objecttypes"> + <h3>{% trans "Objecttypes" %}</h3> + {% get_objecttypes %} +</div> +<div class="authors"> + <h3>{% trans "Authors" %}</h3> + {% get_authors %} +</div> +<div class="calendar"> + <h3>{% trans "Calendar" %}</h3> + {% get_calendar_gbobjects %} +</div> +<div class="tags"> + <h3>{% trans "Tags" %}</h3> + {% get_tag_cloud %} +</div> +<div class="recents"> + <h3>{% trans "Recent gbobjects" %}</h3> + {% get_recent_gbobjects 5 %} +</div> +<div class="comments"> + <h3>{% trans "Recent comments" %}</h3> + {% get_recent_comments 5 %} +</div> +<div class="linkbacks"> + <h3>{% trans "Recent linkbacks" %}</h3> + {% get_recent_linkbacks 5 %} +</div> +<div class="randoms"> + <h3>{% trans "Random gbobjects" %}</h3> + {% get_random_gbobjects 5 %} +</div> +<div class="populars"> + <h3>{% trans "Popular gbobjects" %}</h3> + {% get_popular_gbobjects 5 %} +</div> +<div class="archives"> + <h3>{% trans "Archives" %}</h3> + {% get_archives_gbobjects_tree %} +</div> +{% if user.is_authenticated %} +<div class="tools"> + <h3>{% trans "Tools" %}</h3> + <ul> + {% if perms.objectapp %} + <li> + <a href="{% url admin:app_list "objectapp" %}" title="{% trans "Dashboard" %}"> + {% trans "Dashboard" %} + </a> + </li> + {% endif %} + {% if perms.objectapp.add_gbobject %} + <li> + <a href="{% url admin:objectapp_gbobject_add %}" title="{% trans "Post an gbobject" %}"> + {% trans "Post an gbobject" %} + </a> + </li> + {% endif %} + {% block admin_tools %} + {% endblock %} + <li> + <a href="{% url admin:logout %}" title="{% trans "Log out" %}"> + {% trans "Log out" %} + </a> + </li> + </ul> +</div> +{% endif %} +{% endblock %} + + diff --git a/gstudio/templates/gstudio/cms/nodetype_detail.html b/gstudio/templates/gstudio/cms/nodetype_detail.html new file mode 100644 index 0000000..70bd8df --- /dev/null +++ b/gstudio/templates/gstudio/cms/nodetype_detail.html @@ -0,0 +1,8 @@ +{% load i18n %} +{% for nodetype in nodetypes %} + {% with object=nodetype object_content=nodetype.html_content|truncatewords_html:100|safe %} + {% include "gstudio/_nodetype_detail.html" %} + {% endwith %} +{% empty %} + <p class="notice">{% trans "No node types yet." %}</p> +{% endfor %} diff --git a/gstudio/templates/gstudio/cms/nodetype_list.html b/gstudio/templates/gstudio/cms/nodetype_list.html new file mode 100644 index 0000000..5b7806b --- /dev/null +++ b/gstudio/templates/gstudio/cms/nodetype_list.html @@ -0,0 +1,12 @@ +{% load i18n %} +<ul> + {% for nodetype in nodetypes %} + <li> + <a href="{{ nodetype.get_absolute_url }}" title="{{ nodetype.title }}" rel="bookmark">{{ nodetype.title }}</a> + </li> + {% empty %} + <li> + {% trans "No nodetypes yet." %} + </li> + {% endfor %} +</ul> diff --git a/gstudio/templates/gstudio/cms/random_nodetypes.html b/gstudio/templates/gstudio/cms/random_nodetypes.html new file mode 100644 index 0000000..a3ae25c --- /dev/null +++ b/gstudio/templates/gstudio/cms/random_nodetypes.html @@ -0,0 +1,4 @@ +{% load gstudio_tags %} + +{% get_random_nodetypes number_of_nodetypes template_to_render %} + diff --git a/gstudio/templates/gstudio/graph1.html b/gstudio/templates/gstudio/graph1.html new file mode 100644 index 0000000..587b703 --- /dev/null +++ b/gstudio/templates/gstudio/graph1.html @@ -0,0 +1,347 @@ +<!DOCTYPE html> +<html> +<head> + <meta http-equiv="content-type" content="text/html;charset=utf-8"> + <title>Objecttype Force-Directed Graph</title> + + <link rel="stylesheet" href="/static/gstudio/css/jquery-ui.css" type="text/css" media="all"> + + <style type="text/css"> + .link { + stroke : #ccc; + } + + .nodetext { + pointer-events : none; + font : 10px sans-serif; + } + + .node { + border-width : 1px; + border-color : gray; + } + body { + background-color:white; + } + + #chart { + height: 90%; + margin: 0 auto; + width: 90%; + } + + svg { + margin-left: 10%; + margin-right: 10%; + display: block; + position:absolute; + } + + + </style> + + +</head> + + +<body marginwidth="0" marginheight="0"> +<div class="body" > + <div class="content"> + + <!-- + <div id="relation_type" class="ui-buttonset"> + <span>Relation type:</span> + <input checked="checked" value="follows" type="radio" id="follows" name="radio" class="ui-helper-hidden-accessible"><label for="follows" class="ui-button ui-widget ui-state-default ui-button-text-only ui-corner-left" aria-pressed="false" role="button" aria-disabled="false"><span class="ui-button-text">Followers</span></label> + <input value="mentions" type="radio" id="mentions" name="radio" class="ui-helper-hidden-accessible"><label for="mentions" aria-pressed="true" class="ui-button ui-widget ui-state-default ui-button-text-only ui-corner-right ui-state-active" role="button" aria-disabled="false"><span class="ui-button-text">Mentions</span></label> + <input value="hashtags" type="radio" id="hashtags" name="radio"/><label for="hashtags">Shared interests</label> + </div> + --> + <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> + + <script type="text/javascript" src="/static/gstudio/js/underscore.js" ></script> + + <script type="text/javascript" src="/static/gstudio/js/d3.js"></script> + <script type="text/javascript" src="/static/gstudio/js/d3.layout.js"></script> + <script type="text/javascript" src="/static/gstudio/js/d3.geom.js"></script> +<!-- <script type="text/javascript" src="/static/gstudio/js/force.js"></script> + +Javascript for Object type force graph +--> + <script type="text/javascript" > + + var w = 960, + h = 700, + 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: '/gstudio/graphs/graph_json/{{ node_id }}' , + //crossDomain: true, + dataType: 'json', + success : function(json) { + + 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; + return acc; + }, {}); + + var member_of_metatype = _(json.member_of_metatype).chain().map(function(e) { + e.source = nodes_by_id[e.from]; + e.target = nodes_by_id[e.to]; + e.type = 'member_of_metatype'; + 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 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 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(); + + + nodes_by_id[{{ node_id }}].x = w/2.0; + nodes_by_id[{{ node_id }}].y = h/2.0; + + all_edges = new Array(); + all_edges = all_edges.concat(follows_edges, member_of_metatype, contains_members, contains_subtypes, mentions_edges, right_subjecttype_of, left_subjecttype_of, subjecttype_of, type_of); + /* 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) + .friction(0.7) + .gravity(0.7) + .linkDistance(50) + .nodes([]) + .links([]) + .size([w, h]) + .start(); + + function update(edges){ + // for each func + _.each(nodes_by_id, function(n){n.added = false}); + // reduce the nodes list to have only those nodes for a given rel. + nodes = _.reduce(edges, function(acc, e) { + if(nodes_by_id[e.from] && !nodes_by_id[e.from].added){ + nodes_by_id[e.from].added = true; + acc.push(nodes_by_id[e.from]); + } + 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; + }, []); + + force.nodes(nodes); + force.links(edges); + force.start(); + + link = d3.select("#chart g.edges").selectAll("line.link") + .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) { + return Math.sqrt(d.value); + } */ ) + .attr("x1", function(d) { + return d.source.x; + }) + .attr("y1", function(d) { + return d.source.y; + }) + .attr("x2", function(d) { + return d.target.x; + }) + .attr("y2", function(d) { + return d.target.y; + }) + .append("a") + .text(function(d) { return d.type; }); + + + var node = d3.select("#chart g.nodes").selectAll("g.node").data(nodes); + + var new_g = node.enter().append("svg:g") + .attr("class", "node") + .call(force.drag); + + /* new_g.append("svg:image").attr('xlink:href', + function(d) { + return d.profile_image_url; + }).attr('height', 32).attr('width', 32); + */ + + 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", 7) + .style("fill", "steelblue"); + /* + new_g.append("svg:circle") + .attr("fill", "steelblue") + .attr("text-anchor", "middle") + .text(function(d) { + return d.screen_name; + }); + */ + new_g.append("svg:text") + .attr("dy", 20) + .attr("dx", 25) + + /* .attr("text-anchor", "middle") */ + .text(function(d) { + return d.screen_name; + }); + + node.exit().remove(); + + + force.on("tick", function() { + + var x_center = $("#chart").width() / 2; + var y_center = $("#chart").height() / 2; + + link.attr("x1", function(d) { return d.source.x; }) + .attr("y1", function(d) { return d.source.y; }) + .attr("x2", function(d) { return d.target.x; }) + .attr("y2", function(d) { return d.target.y; }); + + node.attr("transform", function(d) { return "translate(" + (d.x-16) + "," + (d.y-16) + ")"; }); + + }); + } + + update(all_edges); + vis.style("opacity", 1e-6) + .transition() + .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> + + </div> + +</div> + +</body> +</html> diff --git a/gstudio/templates/gstudio/login.html b/gstudio/templates/gstudio/login.html new file mode 100644 index 0000000..690d0be --- /dev/null +++ b/gstudio/templates/gstudio/login.html @@ -0,0 +1,40 @@ +{% extends "gstudio/base.html" %} +{% load i18n %} + +{% block title %}{% trans "Login required" %}{% endblock %} + +{% block content %} +<h2>{% trans "Login required" %} </a> </h2> + +<div class="nodetype_login"> + {% if form.errors %} + <p class="error"> + {% trans "Your username and password didn't match. Please try again." %} + </p> + {% endif %} + <p> + {% trans "You need to be connected to view this nodetype." %} + </p> + + <form method="post" action="."> + {% csrf_token %} + <table> + <tr> + <td>{{ form.username.label_tag }}</td> + <td>{{ form.username }}</td> + </tr> + <tr> + <td>{{ form.password.label_tag }}</td> + <td>{{ form.password }}</td> + </tr> + <tr> + <td colspan="2"> + <input type="hidden" name="next" value="." /> + <input type="submit" value="{% trans "Login" %}" /> + </td> + </tr> + </table> + </form> +</div> +{% endblock %} + diff --git a/gstudio/templates/gstudio/metatype/nodetype_list.html b/gstudio/templates/gstudio/metatype/nodetype_list.html new file mode 100644 index 0000000..54b8914 --- /dev/null +++ b/gstudio/templates/gstudio/metatype/nodetype_list.html @@ -0,0 +1 @@ +{% extends "gstudio/nodetype_list.html" %} diff --git a/gstudio/templates/gstudio/metatype_list.html b/gstudio/templates/gstudio/metatype_list.html new file mode 100644 index 0000000..bff3842 --- /dev/null +++ b/gstudio/templates/gstudio/metatype_list.html @@ -0,0 +1,25 @@ +{% extends "gstudio/base.html" %} +{% load i18n mptt_tags %} + +{% block meta-description %}{% trans "Metatype list" %}{% endblock %} + +{% block title %}{% trans "Metatypes" %}{% endblock %} + +{% block content %} +<h2>{% trans "Metatype list" %}</h2> +<div> + {% for object, structure in object_list|tree_info %} + {% if structure.new_level %}<ul><li>{% else %}</li><li>{% endif %} + <a href="{{ object.get_absolute_url }}" title="{{ object }}">{{ object }}</a> + {% blocktrans count object.nodetypes_published.count as nodetype_count %}{{ nodetype_count }} nodetype{% plural %}{{ nodetype_count }} nodetypes{% endblocktrans %} + {% if object.description %}<br />{{ object.description|striptags|safe }}{% endif %} + {% for level in structure.closed_levels %}</li></ul>{% endfor %} + {% empty %} + <ul> + <li> + {% trans "No metatypes yet." %} + </li> + </ul> + {% endfor %} +</div> +{% endblock %} diff --git a/gstudio/templates/gstudio/nodetype_archive.html b/gstudio/templates/gstudio/nodetype_archive.html new file mode 100644 index 0000000..2054cc4 --- /dev/null +++ b/gstudio/templates/gstudio/nodetype_archive.html @@ -0,0 +1,30 @@ +{% extends "gstudio/nodetype_list.html" %} +{% load i18n gstudio_tags %} + +{% block meta-description %}{% trans "Latest nodetypes" %}{% endblock %} + +{% block link %} + {{ block.super }} + <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}gstudio/css/slider.css" /> +{% endblock %} + +{% block script %} + {{ block.super }} + <script type="text/javascript" src="{{ STATIC_URL }}gstudio/js/jquery.js"></script> + <script type="text/javascript" src="{{ STATIC_URL }}gstudio/js/jquery.ui.js"></script> + <script type="text/javascript"> + $(document).ready(function(){ + $("#slider").tabs({ fx:{ opacity: "toggle"}}).tabs("rotate", 5000, true); + $("#slider").hover( + function() { $("#slider").tabs("rotate", 0, true); }, + function() { $("#slider").tabs("rotate", 5000, true); }); + }); + </script> +{% endblock %} + +{% block title %}{% trans "Latest nodetypes" %}{% endblock %} + +{% block content %} +{% get_featured_nodetypes 5 "gstudio/tags/slider_nodetypes.html" %} +{{ block.super }} +{% endblock %} diff --git a/gstudio/templates/gstudio/nodetype_archive_day.html b/gstudio/templates/gstudio/nodetype_archive_day.html new file mode 100644 index 0000000..d95391f --- /dev/null +++ b/gstudio/templates/gstudio/nodetype_archive_day.html @@ -0,0 +1,23 @@ +{% extends "gstudio/nodetype_list.html" %} +{% load i18n %} + +{% block meta-description %}{% trans "Archives" %} {{ day|date:"DATE_FORMAT" }}{% endblock %} + +{% block title %}{% trans "Archives" %} {{ day|date:"DATE_FORMAT" }}{% endblock %} + +{% block content %} +<h1>{% trans "Archives" %} {{ day|date:"DATE_FORMAT" }}</h1> + +{{ block.super }} + +<!--<ul> + <li> + <a href="{% url gstudio_nodetype_archive_day previous_day|date:"Y" previous_day|date:"m" previous_day|date:"d" %}" rel="archives">{{ previous_day|date:"DATE_FORMAT" }}</a> + </li> + {% if next_day %} + <li> + <a href="{% url gstudio_nodetype_archive_day next_day|date:"Y" next_day|date:"m" next_day|date:"d" %}" rel="archives">{{ next_day|date:"DATE_FORMAT" }}</a> + </li> + {% endif %} +</ul>--> +{% endblock %} diff --git a/gstudio/templates/gstudio/nodetype_archive_month.html b/gstudio/templates/gstudio/nodetype_archive_month.html new file mode 100644 index 0000000..e09d0d7 --- /dev/null +++ b/gstudio/templates/gstudio/nodetype_archive_month.html @@ -0,0 +1,31 @@ +{% extends "gstudio/nodetype_list.html" %} +{% load i18n %} + +{% block meta-description %}{% trans "Archives" %} {{ month|date:"YEAR_MONTH_FORMAT" }}{% endblock %} + +{% block title %}{% trans "Archives" %} {{ month|date:"YEAR_MONTH_FORMAT" }}{% endblock %} + +{% block content %} +<h1>{% trans "Archives" %} {{ month|date:"YEAR_MONTH_FORMAT" }}</h1> + +{{ block.super }} + +<h2>{% trans "Daily archives" %}</h2> +<ul> + {% for date in date_list %} + <li> + <a href="{% url gstudio_nodetype_archive_day date|date:"Y" date|date:"m" date|date:"d" %}" rel="archives">{{ date|date:"DATE_FORMAT" }}</a> + </li> + {% endfor %} +</ul> +<!--<ul> + <li> + <a href="{% url gstudio_nodetype_archive_month previous_month|date:"Y" previous_month|date:"m" %}" rel="archives">{{ previous_month|date:"YEAR_MONTH_FORMAT" }}</a> + </li> + {% if next_month %} + <li> + <a href="{% url gstudio_nodetype_archive_month next_month|date:"Y" next_month|date:"m" %}" rel="archives">{{ next_month|date:"YEAR_MONTH_FORMAT" }}</a> + </li> + {% endif %} +</ul>--> +{% endblock %} diff --git a/gstudio/templates/gstudio/nodetype_archive_year.html b/gstudio/templates/gstudio/nodetype_archive_year.html new file mode 100644 index 0000000..62e3cf9 --- /dev/null +++ b/gstudio/templates/gstudio/nodetype_archive_year.html @@ -0,0 +1,21 @@ +{% extends "gstudio/nodetype_list.html" %} +{% load i18n %} + +{% block meta-description %}{% trans "Archives" %} {{ year }}{% endblock %} + +{% block title %}{% trans "Archives" %} {{ year }}{% endblock %} + +{% block content %} +<h1>{% trans "Archives" %} {{ year }}</h1> + +{{ block.super }} + +<h2>{% trans "Monthly archives" %}</h2> +<ul> + {% for date in date_list %} + <li> + <a href="{% url gstudio_nodetype_archive_month year date|date:"m" %}" rel="archives">{{ date|date:"YEAR_MONTH_FORMAT" }}</a> + </li> + {% endfor %} +</ul> +{% endblock %} diff --git a/gstudio/templates/gstudio/nodetype_detail.html b/gstudio/templates/gstudio/nodetype_detail.html new file mode 100644 index 0000000..774b688 --- /dev/null +++ b/gstudio/templates/gstudio/nodetype_detail.html @@ -0,0 +1,357 @@ +{% extends "gstudio/base.html" %} +{% load i18n comments gstudio_tags %} + +{% block title %}{{ object.title }}{% endblock %} + +{% block meta-description %}{% if object.excerpt %}{{ object.excerpt|striptags }}{% else %}{{ object.content|striptags|truncatewords:100 }}{% endif %}{% endblock %} + +{% block meta-keywords %}{% if object.tags %}{{ object.tags }}{% else %}{{ block.super }}{% endif %}{% endblock %} + + +{% block link %} + {{ block.super }} + {% with object.previous_nodetype as previous_nodetype %}{% if previous_nodetype %} + <link rel="prev" title="{{ previous_nodetype.title }}" href="{{ previous_nodetype.get_absolute_url }}" /> + {% endif %}{% endwith %} + {% with object.next_nodetype as next_nodetype %}{% if next_nodetype %} + <link rel="next" title="{{ next_nodetype.title }}" href="{{ next_nodetype.get_absolute_url }}" /> + {% endif %}{% endwith %} + <link rel="shortlink" href="{{ object.short_url }}" /> + <link rel="canonical" href="{{ object.get_absolute_url }}" /> + {% with year=object.creation_date|date:"Y" month=object.creation_date|date:"m" day=object.creation_date|date:"d" %} + <link rel="alternate" type="application/rss+xml" title="{% trans "RSS Feed of discussions on" %} '{{ object.title }}'" + href="{% url gstudio_nodetype_discussion_feed year month day object.slug %}" /> + <link rel="alternate" type="application/rss+xml" title="{% trans "RSS Feed of comments on" %} '{{ object.title }}'" + href="{% url gstudio_nodetype_comment_feed year month day object.slug %}" /> + <link rel="alternate" type="application/rss+xml" title="{% trans "RSS Feed of pingbacks on" %} '{{ object.title }}'" + href="{% url gstudio_nodetype_pingback_feed year month day object.slug %}" /> + <link rel="alternate" type="application/rss+xml" title="{% trans "RSS Feed of trackbacks on" %} '{{ object.title }}'" + href="{% url gstudio_nodetype_trackback_feed year month day object.slug %}" /> + {% endwith %} +{% endblock %} + + +{% block content %} + + +{% block nodetype-content %} + {% with object.html_content|safe as object_content %} + + + <b>Name:<nbsp></b> {{ object.title }} <br/> + + {% if object.get_rendered_nbh.plural %} + <b> Plural Name:<nbsp></b> + {{object.get_rendered_nbh.plural}} <br/> + {% endif %} + {% if object.get_rendered_nbh.altnames %} + <b> Alternate names:<nbsp></b> + {{object.get_rendered_nbh.altnames}} <br/> + {% endif %} + {% 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>; + {% endfor %}<br/> + {% endif %} + + + {% if object.get_rendered_nbh.member_of_metatypes %} + + + <b> Member of Metatypes:<nbsp></b> + {% for mkey,mvalue in object.get_rendered_nbh.member_of_metatypes.items %} + <a href="{{mvalue}}">{{mkey}}</a>; + {% endfor %}<br/> + {% endif %} + + + + {% 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>; + {% endfor %}<br/> + {% endif %} + + + {% if object.get_rendered_nbh.contains_members %} + + + <b>Contains Members:<nbsp></b> + {% for mkey,mvalue in object.get_rendered_nbh.contains_members.items %} + <a href="{{mvalue}}">{{mkey}}</a>; + {% endfor %}<br/> + {% endif %} + + + {% if object.get_rendered_nbh.authors %} + + + + <b>Authors: <nbsp> </b> + + + {% endif %} + + {% for author in object.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 object.get_rendered_nbh.siblings %} + + + <b>Siblings:<nbsp> </b> + + {% for sibkey,sibvalue in object.get_rendered_nbh.siblings.items %} + {{sibkey}}; + <!-- + <a href="{{sibvalue}}">{{sibkey}}</a>; + --> + {% endfor %} <br/> + {% endif %} + + {% if object.get_rendered_nbh.priornodes %} + + + <b>Priornodes:<nbsp></b> + {% for mkey,mvalue in object.get_rendered_nbh.priornodes.items %} + <a href="{{mvalue}}">{{mkey}}</a>; + {% endfor %}<br/> + {% endif %} + + {% if object.get_rendered_nbh.posteriornodes %} + + + <b>Posterior nodes:<nbsp></b> + {% for mkey,mvalue in object.get_rendered_nbh.posteriornodes.items %} + <a href="{{mvalue}}">{{mkey}}</a>; + {% endfor %}<br/> + {% endif %} + + {% if object.get_rendered_nbh.relations %} + + + {% 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>; + {% endfor %}<br/> + {% endfor %} + {% endif %} + + {% if object.get_rendered_nbh.attributes %} + + + + <b>Attributes:<nbsp> </b> + + {% for items in object.get_rendered_nbh.attributes.items %} + {{items}}; + {% endfor %} <br/> + {% endif %} + {% if object.get_rendered_nbh.leftroles %} + + + <b>Left roles:<nbsp> </b> + + {% for lrkey,lrvalue in object.get_rendered_nbh.leftroles.items %} + <a href="{{lrvalue}}">{{lrkey}}</a>; + {% endfor %} <br/> + {% endif %} + + {% if object.get_rendered_nbh.rightroles %} + + <b>Right roles:<nbsp> </b> + + {% for rrkey,rrvalue in object.get_rendered_nbh.rightroles.items %} + <a href="{{rrvalue}}">{{rrkey}}</a>; + {% endfor %} <br/> + {% endif %} + + + {% if object.get_rendered_nbh.ats %} + + + <b>Attribute Types:<nbsp> </b> + + {% for atkey,atvalue in object.get_rendered_nbh.ats.items %} + <a href="{{atvalue}}">{{atkey}}</a>; + {% endfor %} <br/> + {% endif %} + + + + + + {% endwith %} + {% endblock %} + + + +{% block nodetype-widgets %} +<div class="nodetype-widgets span-16 last"> {% with object.next_nodetype as next_nodetype %} + {% if object.posteriornodes.all %} + <div class="nodetype-next"> + <h5>{% trans "Posterior node" %}</h5> + {% for items in object.posteriornodes.all %} + <a href="{{ items.get_absolute_url }}"> {{ items.title }}</a>; + {% endfor %} + </div> + {% endif %} + {% endwith %} + <!-- {% with object.previous_nodetype as previous_nodetype %} --> + {% if object.priornodes.all %} + <div class="nodetype-next"> + <h5>{% trans "Prior node" %}</h5> + {% for items in object.priornodes.all %} + <a href="{{ items.get_absolute_url }}"> {{ items.title }}</a>; + {% endfor %} + </div> + {% endif %} + {% endwith %} + {% if object.related_published %} + <div class="nodetype-related"> + <h5>{% trans "Related node types" %}</h5> + <ul> + {% for nodetype in object.related_published %} + <li> + <a href="{{ nodetype.get_absolute_url }}" title="{{ nodetype.title }}" rel="bookmark">{{ nodetype.title }}</a> + </li> + {% endfor %} + </ul> + </div> + {% endif %} +</div> +{% endblock %} + +{% block nodetype-comments %} +<div id="comments" class="span-16 last"> + <h5>{% trans "Comments" %}</h5> + {% with object.comments as comment_list %} + {% if comment_list.count %} + <ol id="comment-list" class="span-15 last"> + {% for comment in comment_list %} + <li id="comment_{{ comment.pk }}" class="comment vcard {% cycle box1,box2 %}{% if comment.user in object.authors.all %} post-author{% endif %} span-15 last"> + <div class="span-2"> + <img src="{% get_gravatar comment.email 60 "G" %}" class="gravatar photo" alt="{{ comment.user_name }}"/> + </div> + <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> + {% else %} + {{ comment.user_name }} + {% endif %} + {% trans "on" %} {{ comment.submit_date|date:"SHORT_DATETIME_FORMAT" }} + </div> + <div class="span-13 last"> + {{ comment.comment|linebreaks }} + </div> + </div> + </li> + {% endfor %} + </ol> + {% if not object.comments_are_open %} + <p>{% trans "Comments are closed." %}</p> + {% endif %} + {% else %} + {% if object.comments_are_open %} + <p>{% trans "No comments yet." %}</p> + {% else %} + <p>{% trans "Comments are closed." %}</p> + {% endif %} + {% endif %} + {% endwith %} +</div> +{% endblock %} + +{% block nodetype-pingbacks %} +<div id="pingbacks" class="span-16 last"> + <h5>{% trans "Pingbacks" %}</h5> + {% with object.pingbacks as pingback_list %} + {% if pingback_list.count %} + <ol id="pingback-list" class="span-15 last"> + {% for pingback in pingback_list %} + <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> + {% trans "on" %} {{ pingback.submit_date|date:"SHORT_DATETIME_FORMAT" }} + </div> + <div class="span-15 last"> + <cite> + {{ pingback.comment }} + </cite> + </div> + </div> + </li> + {% endfor %} + </ol> + {% endif %} + {% if object.pingback_enabled %} + <p>{% trans "Pingbacks are open." %}</p> + {% else %} + <p>{% trans "Pingbacks are closed." %}</p> + {% endif %} + {% endwith %} +</div> +{% endblock %} + +{% block nodetype-trackbacks %} +{% with object.trackbacks as trackback_list %} +{% if trackback_list.count or object.pingback_enabled %} +<div id="trackbacks" class="span-16 last"> + <h5>{% trans "Trackbacks" %}</h5> + {% if trackback_list.count %} + <ol id="trackback-list" class="span-15 last"> + {% for trackback in trackback_list %} + <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> + {% trans "on" %} {{ trackback.submit_date|date:"SHORT_DATETIME_FORMAT" }} + </div> + <div class="span-15 last"> + <cite> + {{ trackback.comment }} + </cite> + </div> + </div> + </li> + {% endfor %} + </ol> + {% endif %} + {% if object.pingback_enabled %} + <p> + <a href="{% url gstudio_nodetype_trackback object.pk %}" rel="trackback"> + {% trans "Trackback URL" %}</a> + </p> + {% endif %} +</div> +{% endif %} +{% endwith %} +{% endblock %} + +{% block nodetype-comments-form %} +{% if object.comments_are_open %} +<div class="commentForm span-16 last"> + {% render_comment_form for object %} +</div> +{% endif %} +{% endblock %} + +{% endblock %} + +{% block admin_tools %} +{% if perms.gstudio.change_nodetype %} +<li> + <a href="{% url admin:gstudio_objecttype_change object.pk %}" title="{% trans "Edit the nodetype" %}"> + {% trans "Edit the node type" %} + </a> +</li> +{% endif %} +{% endblock %} diff --git a/gstudio/templates/gstudio/nodetype_list.html b/gstudio/templates/gstudio/nodetype_list.html new file mode 100644 index 0000000..f4f75bd --- /dev/null +++ b/gstudio/templates/gstudio/nodetype_list.html @@ -0,0 +1,143 @@ +{% extends "gstudio/base.html" %} +{% load i18n gstudio_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 %} + +{% block link %} + {{ block.super }} + {% if metatype %} + <link rel="alternate" type="application/rss+xml" title="{% trans "RSS Feed" %} {{ metatype.title }}" href="{% url gstudio_metatype_feed metatype.tree_path %}" /> + {% endif %} + {% if tag %} + <link rel="alternate" type="application/rss+xml" title="{% trans "RSS Feed" %} {{ tag.name }}" href="{% url gstudio_tag_feed tag.name %}" /> + {% endif %} + {% if author %} + <link rel="alternate" type="application/rss+xml" title="{% trans "RSS Feed" %} {{ author.username }}" href="{% url gstudio_author_feed author.username %}" /> + {% endif %} +{% endblock %} + +{% block title %}{% trans "Latest nodetypes" %} {% if metatype %}| {% trans "Metatype" %} {{ metatype }}{% endif %}{% if tag %}| {% trans "Tag" %} {{ tag }}{% endif %}{% if author %}| {% trans "Author" %} {{ author }}{% endif %}{% if page_obj %}{% ifnotequal page_obj.number 1 %} | {% trans "Page" %} {{ page_obj.number }}{% endifnotequal %}{% endif %}{% endblock %} + +{% block content %} +{% if metatype %} +<h3>{{ metatype.title }}</h3> +<h5>{{ metatype.composed_sentence }}</h5> + + <b>Name: </b> {{ metatype.title }} <br/> + + {% if metatype.altnames %} + <b>Alternate names: </b> + {% endif %} + {{ metatype.altnames }} <br/> + + {% if object.plural %} + <b>Plural Name: </b> {{ metatype.plural }} <br/> + {% endif %} + + {% if object.parent %} + <b>Type of: </b> + <a href="{{ metatype.parent.get_absolute_url }}"> {{ metatype.parent.title }}</a> <br/> + {% endif %} + + {% if metatype.get_children %} + <b>SubTypes: </b> + {% for items in metatype.get_children %} + <a href="{{ items.get_absolute_url }}"> {{ items.title }}</a>; + {% endfor %} <br/> + {% endif %} + + {% if metatype.get_siblings %} + <b>Siblings: </b> + {% for items in metatype.get_siblings %} + <a href="{{ items.get_absolute_url }}"> {{ items.title }}</a>; + {% endfor %} <br/> + {% endif %} + + {% if metatype.metatypes.all %} + <b>Member of Metatypes: </b> + {% for items in metatype.metatypes.all %} + <a href="{{ items.get_absolute_url }}"> {{ items.title }}</a>; + {% endfor %} <br/> + {% endif %} + + {% if metatype.nodetypes.all %} + <b>Contains member node types: </b> + {% for items in metatype.nodetypes.all %} + <a href="{{ items.get_absolute_url }}"> {{ items.title }}</a>; + {% endfor %} <br/> + {% endif %} + + {% if metatype.subjecttypeLeft_gbnodetype.all %} + <b>Left role of relation types: </b> + {% for items in metatype.subjecttypeLeft_gbnodetype.all %} + <a href="{{ items.get_absolute_url }}"> {{ items.title }}</a>; + {% endfor %} <br/> + {% endif %} + + {% if metatype.subjecttypeRight_gbnodetype.all %} + <b>Right role of relation types: </b> + {% for items in metatype.subjecttypeRight_gbnodetype.all %} + <a href="{{ items.get_absolute_url }}"> {{ items.title }}</a>; + {% endfor %} <br/> + {% endif %} + + {% if metatype.subjecttype_GbnodeType.all %} + <b>As domain of attribute types: </b> + {% for items in metatype.subjecttype_GbnodeType.all %} + <a href="{{ items.get_absolute_url }}"> {{ items.title }}</a>; + {% endfor %} <br/> + {% endif %} + + + + +{% if metatype.description %} +<p>{{ metatype.description|striptags|safe }}</p> +{% endif %} +{% endif %} + +{% if tag %} +<h1>{% trans "Tag" %} : {{ tag }}</h1> +{% endif %} + +{% if author %} +<h1>{% blocktrans with author.username as author %}Nodetypes by {{ author }}{% endblocktrans %}</h1> +{% endif %} + +{% for object in object_list %} + {% with object.html_content|truncatewords_html:100|safe as object_content %} + {% include "gstudio/_nodetype_detail.html" %} + {% endwith %} +{% empty %} + <p class="notice">{% trans "No nodes in the network yet. Login and construct a network!" %}</p> +{% endfor %} + +{% if is_paginated %} + {% gstudio_pagination page_obj %} +{% endif %} +{% endblock %} + +{% block admin_tools %} + {% if metatype and perms.gstudio.change_metatype %} + <li> + <a href="{% url admin:gstudio_metatype_change metatype.pk %}" title="{% trans "Edit the metatype" %}"> + {% trans "Edit the metatype" %} + </a> + </li> + {% endif %} + {% if tag and perms.tagging.change_tag %} + <li> + <a href="{% url admin:tagging_tag_change tag.pk %}" title="{% trans "Edit the tag" %}"> + {% trans "Edit the tag" %} + </a> + </li> + {% endif %} + {% if author and perms.auth.change_user %} + <li> + <a href="{% url admin:auth_user_change author.pk %}" title="{% trans "Edit the author" %}"> + {% trans "Edit the author" %} + </a> + </li> + {% endif %} +{% endblock %} + diff --git a/gstudio/templates/gstudio/nodetype_search.html b/gstudio/templates/gstudio/nodetype_search.html new file mode 100644 index 0000000..7fbc53d --- /dev/null +++ b/gstudio/templates/gstudio/nodetype_search.html @@ -0,0 +1,49 @@ +{% extends "gstudio/nodetype_list.html" %} +{% load i18n gstudio_tags %} + +{% block title %}{% trans "Search results for" %} {% if pattern %}'{{ pattern }}'{% endif %}{% if page_obj %}{% ifnotequal page_obj.number 1 %} | {% trans "Page" %} {{ page_obj.number }}{% endifnotequal %}{% endif %}{% endblock %} + +{% block meta-description %}{% trans "Search results for" %} {% if pattern %}'{{ pattern }}'{% endif %}{% if page_obj %}{% ifnotequal page_obj.number 1 %} {% trans "page" %} {{ page_obj.number }}{% endifnotequal %}{% endif %}{% endblock %} + +{% block link %} + {{ block.super }} + <link rel="alternate" type="application/rss+xml" title="{% trans "RSS Feed of search result of" %} '{{ pattern }}'" href="{% url gstudio_nodetype_search_feed %}?pattern={{ pattern }}" /> +{% endblock %} + +{% block content %} +<h1>{% trans "Search results for" %} {% if pattern %}'{{ pattern }}'{% endif %}</h1> + +{% if error %} +<p class="error">{{ error }}</p> +{% endif %} + +{% if object_list %} +<p class="success"> + {% blocktrans count paginator.count as nodetype_count %}{{ nodetype_count }} nodetype found{% plural %}{{ nodetype_count }} nodetypes found{% endblocktrans %} +</p> +{% endif %} + +{% for object in object_list %} + {% with object.html_content|truncatewords_html:100|safe as object_content %} + {% include "gstudio/_nodetype_detail.html" %} + {% endwith %} +{% empty %} +<p class="notice">{% trans "Nothing found." %}</p> +{% endfor %} + +<div class="search"> + <form method="get" id="main_searchform" action="{% url gstudio_nodetype_search %}"> + <p> + <input type="text" value="{{ pattern }}" name="pattern" id="main_searchbox" /> + <input type="submit" id="button" 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_URL }}gstudio/img/help.png" alt="?" width="14" height="14" /> + </a> + </p> + </form> +</div> + +{% if is_paginated %} + {% gstudio_pagination page_obj %} +{% endif %} +{% endblock %} diff --git a/gstudio/templates/gstudio/nodetype_trackback.xml b/gstudio/templates/gstudio/nodetype_trackback.xml new file mode 100644 index 0000000..66dbbb7 --- /dev/null +++ b/gstudio/templates/gstudio/nodetype_trackback.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<response> + {% if not error %} + <error>0</error> + {% else %} + <error>1</error> + <message>{{ error }}</message> + {% endif %} +</response> diff --git a/gstudio/templates/gstudio/opensearch.xml b/gstudio/templates/gstudio/opensearch.xml new file mode 100644 index 0000000..d0d1af2 --- /dev/null +++ b/gstudio/templates/gstudio/opensearch.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +{% load gstudio_tags %} +{% get_tags as nodetype_tags %} +<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" + xmlns:moz="http://www.mozilla.org/2006/browser/search/"> + <ShortName>{{ site.name }}</ShortName> + <LongName>{{ site.name }} - web search</LongName> + <Description>Make a search on {{ site.name }}.</Description> + <Attribution>{{ copyright }}</Attribution> + <Tags>{{ nodetype_tags|slice:":15"|join:" " }}</Tags> + <Url type="text/html" template="{{ protocol }}://{{ site.domain }}{% url gstudio_nodetype_search %}?pattern={searchTerms}" /> + <Url type="application/{{ feeds_format }}+xml" template="{{ protocol }}://{{ site.domain }}{% url gstudio_nodetype_search_feed %}?pattern={searchTerms}" /> + <Url type="application/opensearchdescription+xml" rel="self" template="{{ protocol }}://{{ site.domain }}{% url gstudio_opensearch %}"/> + <Image height="16" width="16" type="image/vnd.microsoft.icon">{{ STATIC_URL }}gstudio/img/favicon.ico</Image> + <Query role="example" searchTerms="{{ nodetype_tags.0 }}" /> + <Developer>gnowgi</Developer> + <Contact>nagarjun@gnowledge.org</Contact> + <SyndicationRight>open</SyndicationRight> + <AdultContent>false</AdultContent> + <Language>{{ LANGUAGE_CODE }}</Language> + <OutputEncoding>UTF-8</OutputEncoding> + <InputEncoding>UTF-8</InputEncoding> + <moz:SearchForm>{{ protocol }}://{{ site.domain }}/</moz:SearchForm> +</OpenSearchDescription> diff --git a/gstudio/templates/gstudio/password.html b/gstudio/templates/gstudio/password.html new file mode 100644 index 0000000..a5d0d82 --- /dev/null +++ b/gstudio/templates/gstudio/password.html @@ -0,0 +1,35 @@ +{% extends "gstudio/base.html" %} +{% load i18n %} + +{% block title %}{% trans "Password required" %}{% endblock %} + +{% block content %} +<h2>{% trans "Password required" %}</h2> + +<div class="nodetype_password"> + {% if error %} + <p class="error"> + {% trans "The password provided is not valid. Please try again." %} + </p> + {% endif %} + <p> + {% trans "You need to provide a password to view this nodetype." %} + </p> + + <form method="post" action="."> + {% csrf_token %} + <table> + <tr> + <td><label for="id_password">{% trans "Password" %}</label></td> + <td><input name="password" id="id_password" type="password" /></td> + </tr> + <tr> + <td colspan="2"> + <input type="submit" value="{% trans "Valid" %}" /> + </td> + </tr> + </table> + </form> +</div> +{% endblock %} + diff --git a/gstudio/templates/gstudio/rsd.xml b/gstudio/templates/gstudio/rsd.xml new file mode 100644 index 0000000..a2df0dd --- /dev/null +++ b/gstudio/templates/gstudio/rsd.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" ?> +<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd"> + <service> + <engineName>Django Blog Gstudio {{ GSTUDIO_VERSION }}</engineName> + <engineLink>http://github.com/gnowgi/django-gstudio</engineLink> + <homePageLink>{{ protocol }}://{{ site.domain }}/</homePageLink> + <apis> + <api name="MetaWeblog" preferred="true" apiLink="{{ protocol }}://{{ site.domain }}/xmlrpc/" blogID="{{ site.id }}"> + <settings> + <docs>http://www.xmlrpc.com/metaWeblogApi</docs> + <notes>MetaWeblog API support + Blogger API partial support</notes> + </settings> + </api> + </apis> + </service> +</rsd> diff --git a/gstudio/templates/gstudio/sitemap.html b/gstudio/templates/gstudio/sitemap.html new file mode 100644 index 0000000..05edac9 --- /dev/null +++ b/gstudio/templates/gstudio/sitemap.html @@ -0,0 +1,70 @@ +{% extends "gstudio/base.html" %} +{% load i18n gstudio_tags mptt_tags %} + +{% block title %}{% trans "Sitemap" %}{% endblock %} + +{% block content %} +<h2>{% trans "Sitemap" %}</h2> + +<div class="nodetypesbymetatypes"> + <h3>{% trans "Nodetypes per metatypes" %}</h3> + {% for metatype in metatypes %} + <h4>{{ metatype }}</h4> + <ul> + {% for nodetype in metatype.nodetypes_published.all %} + <li> + <a href="{{ nodetype.get_absolute_url }}" title="{{ nodetype.title }}" rel="bookmark">{{ nodetype.title }}</a> + {% with nodetype.comments.count as comment_count %} + - {{ comment_count }} {% trans "comment" %}{{ comment_count|pluralize }} + {% endwith %} + </li> + {% empty %} + <li> + {% trans "No nodetypes yet." %} + </li> + {% endfor %} + </ul> + {% endfor %} +</div> + +<div class="allnodetypes"> + <h3>{% trans "All the nodetypes" %}</h3> + <ul> + {% for nodetype in nodetypes %} + <li> + <a href="{{ nodetype.get_absolute_url }}" title="{{ nodetype.title }}" rel="bookmark">{{ nodetype.title }}</a> + - {{ nodetype.creation_date|date:"SHORT_DATE_FORMAT" }} + {% with nodetype.comments.count as comment_count %} + - {{ comment_count }} {% trans "comment" %}{{ comment_count|pluralize }} + {% endwith %} + </li> + {% empty %} + <li> + {% trans "No nodetypes yet." %} + </li> + {% endfor %} + </ul> +</div> + +<div class="metatypes"> + <h3>{% trans "Metatypes" %}</h3> + {% for metatype, structure in metatypes|tree_info %} + {% if structure.new_level %}<ul><li>{% else %}</li><li>{% endif %} + <a href="{{ metatype.get_absolute_url }}" title="{{ metatype.title }}">{{ metatype.title }}</a> + - + {% blocktrans count metatype.nodetypes_published.count as nodetype_count %}{{ nodetype_count }} nodetype{% plural %}{{ nodetype_count }} nodetypes{% endblocktrans %} + {% for level in structure.closed_levels %}</li></ul>{% endfor %} + {% empty %} + <ul> + <li> + {% trans "No metatypes yet." %} + </li> + </ul> + {% endfor %} +</div> + +<div class="montharchives"> + <h3>{% trans "Monthly archives" %}</h3> + {% get_archives_nodetypes %} +</div> +{% endblock %} diff --git a/gstudio/templates/gstudio/skeleton.html b/gstudio/templates/gstudio/skeleton.html new file mode 100644 index 0000000..a54988b --- /dev/null +++ b/gstudio/templates/gstudio/skeleton.html @@ -0,0 +1,451 @@ +{% load gstudio_tags i18n %} +{% get_tags as nodetype_tags %} +{% 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"> + .link { + stroke: #ccc; + } + .nodetext { + pointer-events: none; + font: 10px sans-serif; + } + .node { + border-width: 1px; + border-color: gray; + } + body { + background-color: white; + } + #chart { + height: 90%; + margin: 0 auto; + width: 90%; + display: block; + } + svg { + margin-left: 10%; + margin-right: 10%; + display: block; + position: absolute; + } + + </style> + <!-- the header lines from grappelli --> + {% block blockbots %} + <meta name="robots" content="NONE,NOARCHIVE" /> + {% endblock %} <!-- STYLESHEETS --> + {% block stylesheets %} + <link href="{% admin_media_prefix %}css/base.css" rel="stylesheet" type="text/css" /> + {% if LANGUAGE_BIDI %} + <link href="{% block stylesheet_rtl %}{% admin_media_prefix %}css/rtl.css{% endblock %}" rel="stylesheet" type="text/css" /> + {% endif %} + <link href="{% admin_media_prefix %}jquery/ui/css/custom-theme/jquery-ui-1.8.custom.css" rel="stylesheet" type="text/css" media="screen" title="no title" charset="utf-8" /> + <link href="{% admin_media_prefix %}css/jquery-ui-grappelli-extensions.css" rel="stylesheet" type="text/css" /> + {% endblock %} <!-- EXTRASTYLES --> + {% block extrastyle %}{% endblock %} <!-- JAVASCRIPTS --> + {% block javascripts %} + <script type="text/javascript"> + // GLOBALS + var grappelli = {}, + // TODO: klemens: drop ADMIN_URL + ADMIN_URL = "{% url admin:index %}", + MODEL_URL_ARRAY = {% get_content_types %}, DATE_FORMAT = "{% get_date_format %}", TIME_FORMAT = "{% get_time_format %}", DATETIME_FORMAT = "{% get_datetime_format %}"; + </script> + <!-- jQuery, jQuery-UI --> + <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> + <script src="{% admin_media_prefix %}js/grappelli/jquery.grp_collapsible_group.js" type="text/javascript"></script> + <script src="{% admin_media_prefix %}js/grappelli/jquery.grp_timepicker.js" type="text/javascript"></script> + <script src="{% admin_media_prefix %}js/grappelli/jquery.grp_related_fk.js" type="text/javascript"></script> + <script src="{% admin_media_prefix %}js/grappelli/jquery.grp_related_m2m.js" type="text/javascript"></script> + <script src="{% admin_media_prefix %}js/grappelli/jquery.grp_related_generic.js" type="text/javascript"></script> + <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> + <script src="{{STATIC_URL}}gstudio/js/gstudio.js" type="text/javascript"></script> + <!-- EXTRAHEAD --> + {% block extrahead %}{% endblock %} + + {% endblock %} <!-- the header lines from gstudio --> + <meta http-equiv="content-type" content="text/html; charset=utf-8" /> + <meta http-equiv="cache-control" content="public" /> + <meta name="robots" content="follow, all" /> + <meta name="language" content="{{ LANGUAGE_CODE }}" /> + <meta name="description" content="{% block meta-description %}Demonstration of the Gstudio Blog application.{% endblock %}" /> + <meta name="keywords" content="{% block meta-keywords %}django, blog, gstudio, {{ nodetype_tags|join:", "}}{% endblock %}" /> + <meta name="author" content="gnowgi" /> + {% block meta %}{% endblock %} + <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" /> + <![endif]--> + {% block link %}{% endblock %} + {% 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> + <input checked="checked" value="follows" type="radio" id="follows" name="radio" class="ui-helper-hidden-accessible"><label for="follows" class="ui-button ui-widget ui-state-default ui-button-text-only ui-corner-left" aria-pressed="false" role="button" aria-disabled="false"><span class="ui-button-text">Followers</span></label> + <input value="mentions" type="radio" id="mentions" name="radio" class="ui-helper-hidden-accessible"><label for="mentions" aria-pressed="true" class="ui-button ui-widget ui-state-default ui-button-text-only ui-corner-right ui-state-active" role="button" aria-disabled="false"><span class="ui-button-text">Mentions</span></label> + <input value="hashtags" type="radio" id="hashtags" name="radio"/><label for="hashtags">Shared interests</label> + </div> + --> + <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> + <script type="text/javascript" src="/static/gstudio/js/underscore.js" ></script> + <script type="text/javascript" src="/static/gstudio/js/d3.js"></script> + <script type="text/javascript" src="/static/gstudio/js/d3.layout.js"></script> + <script type="text/javascript" src="/static/gstudio/js/d3.geom.js"></script> + <!-- <script type="text/javascript" src="/static/gstudio/js/force.js"></script> + + Javascript for Object type force graph + --> + <script type="text/javascript" > + +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: '/gstudio/graphs/graph_json/{{ object.id }}', +//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; +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 authors = _(json.authors).chain().map(function(e) { +e.source = nodes_by_id[e.from]; +e.target = nodes_by_id[e.to]; +e.type = 'authors'; +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 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(); + +nodes_by_id[{{ object.id }}].x = w/2.0; +nodes_by_id[{{ object.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,authors,content); +/* 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) +.friction(0.7) +.gravity(0.7) +.linkDistance(10) +.nodes([]) +.links([]) +.size([w, h]) +.start(); + +function update(edges){ +// for each func +_.each(nodes_by_id, function(n){n.added = false}); +// reduce the nodes list to have only those nodes for a given rel. +nodes = _.reduce(edges, function(acc, e) { +if(nodes_by_id[e.from] && !nodes_by_id[e.from].added){ +nodes_by_id[e.from].added = true; +acc.push(nodes_by_id[e.from]); +} +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; +}, []); + +force.nodes(nodes); +force.links(edges); +force.start(); + +link = d3.select("#chart g.edges").selectAll("line.link") +.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) { +return Math.sqrt(d.value); +} */ ) +.attr("x1", function(d) { +return d.source.x; +}) + +.attr("y1", function(d) { +return d.source.y; +}) +.attr("x2", function(d) { +return d.target.x; +}) +.attr("y2", function(d) { +return d.target.y; +}) +.append("a") +.text(function(d) { return d.type; }); + +var node = d3.select("#chart g.nodes").selectAll("g.node").data(nodes); + +var new_g = node.enter().append("svg:g") +.attr("class", "node") +.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", 7) +.style("fill", function color(d) { if (d._id=={{ object.id }}) return "red"; else if (d._id== "a1" || d._id== "a2" || d._id== "a3" ) return "steelblue" ; else return "yellow"}); + +new_g.append("svg:text") +.attr("dy", 20) +.attr("dx", 25) + +/* .attr("text-anchor", "middle") */ +.text(function(d) { +return d.screen_name; +}); + +node.exit().remove(); + +force.on("tick", function() { + +var x_center = $("#chart").width() / 2; +var y_center = $("#chart").height() / 2; + +link.attr("x1", function(d) { return d.source.x; }) +.attr("y1", function(d) { return d.source.y; }) +.attr("x2", function(d) { return d.target.x; }) +.attr("y2", function(d) { return d.target.y; }); + +node.attr("transform", function(d) { return "translate(" + (d.x-16) + "," + (d.y-16) + ")"; }); + +}); +} + +update(all_edges); +vis.style("opacity", 1e-6) +.transition() +.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> + </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> + <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. + <br/> + Powered by <a href="http://www.djangoproject.com">Django</a> + and <a href="http://github.com/gnowgi/django-gstudio">Gstudio + {{ GSTUDIO_VERSION }}</a>. + </p> + </div> + + </body> +</html> diff --git a/gstudio/templates/gstudio/tag/nodetype_list.html b/gstudio/templates/gstudio/tag/nodetype_list.html new file mode 100644 index 0000000..54b8914 --- /dev/null +++ b/gstudio/templates/gstudio/tag/nodetype_list.html @@ -0,0 +1 @@ +{% extends "gstudio/nodetype_list.html" %} diff --git a/gstudio/templates/gstudio/tag_list.html b/gstudio/templates/gstudio/tag_list.html new file mode 100644 index 0000000..eeac3ea --- /dev/null +++ b/gstudio/templates/gstudio/tag_list.html @@ -0,0 +1,24 @@ +{% extends "gstudio/base.html" %} +{% load i18n %} + +{% block meta-description %}{% trans "Tag list" %}{% endblock %} + +{% block title %}{% trans "Tags" %}{% endblock %} + +{% block content %} +<h2>{% trans "Tag list" %}</h2> +<div> + <ul> + {% for object in object_list %} + <li> + <a href="{% url gstudio_tag_detail object %}" title="{{ object }}">{{ object }}</a> + {% blocktrans count object.count as nodetype_count %}{{ nodetype_count }} nodetype{% plural %}{{ nodetype_count }} nodetypes{% endblocktrans %} + </li> + {% empty %} + <li> + {% trans "No tags yet." %} + </li> + {% endfor %} + </ul> +</div> +{% endblock %} diff --git a/gstudio/templates/gstudio/tags/archives_nodetypes.html b/gstudio/templates/gstudio/tags/archives_nodetypes.html new file mode 100644 index 0000000..2863693 --- /dev/null +++ b/gstudio/templates/gstudio/tags/archives_nodetypes.html @@ -0,0 +1,15 @@ +{% load i18n %} +<ul> + {% for date in archives %} + <li> + <a title="{% trans "Archives" %} {{ date|date:"YEAR_MONTH_FORMAT" }}" rel="archives" + href="{% url gstudio_nodetype_archive_month date|date:"Y" date|date:"m" %}"> + {{ date|date:"YEAR_MONTH_FORMAT" }} + </a> + </li> + {% empty %} + <li> + {% trans "No archives yet." %} + </li> + {% endfor %} +</ul> diff --git a/gstudio/templates/gstudio/tags/archives_nodetypes_link.html b/gstudio/templates/gstudio/tags/archives_nodetypes_link.html new file mode 100644 index 0000000..f82ec8e --- /dev/null +++ b/gstudio/templates/gstudio/tags/archives_nodetypes_link.html @@ -0,0 +1,3 @@ +{% load i18n %} +{% for date in archives %}<link rel="archives" title="{% trans "Archives" %} {{ date|date:"YEAR_MONTH_FORMAT" }}" href="{% url gstudio_nodetype_archive_month date|date:"Y" date|date:"m" %}" /> +{% endfor %} diff --git a/gstudio/templates/gstudio/tags/archives_nodetypes_tree.html b/gstudio/templates/gstudio/tags/archives_nodetypes_tree.html new file mode 100644 index 0000000..a1eee55 --- /dev/null +++ b/gstudio/templates/gstudio/tags/archives_nodetypes_tree.html @@ -0,0 +1,43 @@ +{% load i18n %} + +{% regroup archives by year as year_list %} +<ul> + {% for year in year_list %} + <li> + <a title="{% trans "Archives" %} {{ year.grouper }}" rel="archives" + href="{% url gstudio_nodetype_archive_year year.grouper %}">{{ year.grouper }}</a> + {% regroup year.list by month as month_list %} + <ul> + {% for month in month_list %} + <li> + {% with month.list.0 as month_date %} + <a title="{% trans "Archives" %} {{ month_date|date:"YEAR_MONTH_FORMAT" }}" rel="archives" + href="{% url gstudio_nodetype_archive_month month_date|date:"Y" month_date|date:"m" %}"> + {{ month_date|date:"F" }} + </a> + {% endwith %} + {% regroup month.list by day as day_list %} + <ul> + {% for day in day_list %} + <li> + {% with day.list.0 as day_date %} + <a title="{% trans "Archives" %} {{ day_date|date:"DATE_FORMAT" }}" rel="archives" + href="{% url gstudio_nodetype_archive_day day_date|date:"Y" day_date|date:"m" day_date|date:"d" %}"> + {{ day_date|date:"MONTH_DAY_FORMAT" }} + </a> + {% endwith %} + </li> + {% endfor %} + </ul> + </li> + {% endfor %} + </ul> + </li> + {% empty %} + <li> + {% trans "No archives yet." %} + </li> + {% endfor %} +</ul> + + diff --git a/gstudio/templates/gstudio/tags/authors.html b/gstudio/templates/gstudio/tags/authors.html new file mode 100644 index 0000000..1ce1af2 --- /dev/null +++ b/gstudio/templates/gstudio/tags/authors.html @@ -0,0 +1,15 @@ +{% load i18n %} + +<ul> + {% for author in authors %} + <li class="vcard"> + <a href="{% url gstudio_author_detail author.username %}" + title="{{ author.username }}" class="fn nickname url">{{ author.username }}</a> + {% blocktrans count author.nodetypes_published.count as nodetype_count %}{{ nodetype_count }} nodetype{% plural %}{{ nodetype_count }} nodetypes{% endblocktrans %} + </li> + {% empty %} + <li> + {% trans "No authors yet." %} + </li> + {% endfor %} +</ul> diff --git a/gstudio/templates/gstudio/tags/breadcrumbs.html b/gstudio/templates/gstudio/tags/breadcrumbs.html new file mode 100644 index 0000000..c7a5361 --- /dev/null +++ b/gstudio/templates/gstudio/tags/breadcrumbs.html @@ -0,0 +1,7 @@ +{% for crumb in breadcrumbs %} +{% if not forloop.last %} +<a href="{{ crumb.url }}" title="{{ crumb.name }}">{{ crumb.name }}</a> {{ separator }} +{% else %} + {{ crumb.name }} +{% endif %} +{% endfor %} diff --git a/gstudio/templates/gstudio/tags/calendar.html b/gstudio/templates/gstudio/tags/calendar.html new file mode 100644 index 0000000..bf6e999 --- /dev/null +++ b/gstudio/templates/gstudio/tags/calendar.html @@ -0,0 +1,17 @@ +{{ calendar|safe }} +<div class="month-navigation"> + <div class="month-previous"> + {% if previous_month %} + <a href="{% url gstudio_nodetype_archive_month previous_month|date:"Y" previous_month|date:"m" %}"> + << {{ previous_month|date:"YEAR_MONTH_FORMAT" }} + </a> + {% endif %} + </div> + <div class="month-next"> + {% if next_month %} + <a href="{% url gstudio_nodetype_archive_month next_month|date:"Y" next_month|date:"m" %}"> + {{ next_month|date:"YEAR_MONTH_FORMAT" }} >> + </a> + {% endif %} + </div> +</div> diff --git a/gstudio/templates/gstudio/tags/dummy.html b/gstudio/templates/gstudio/tags/dummy.html new file mode 100644 index 0000000..f04fcf5 --- /dev/null +++ b/gstudio/templates/gstudio/tags/dummy.html @@ -0,0 +1 @@ +{% extends template %} diff --git a/gstudio/templates/gstudio/tags/featured_nodetypes.html b/gstudio/templates/gstudio/tags/featured_nodetypes.html new file mode 100644 index 0000000..5b7806b --- /dev/null +++ b/gstudio/templates/gstudio/tags/featured_nodetypes.html @@ -0,0 +1,12 @@ +{% load i18n %} +<ul> + {% for nodetype in nodetypes %} + <li> + <a href="{{ nodetype.get_absolute_url }}" title="{{ nodetype.title }}" rel="bookmark">{{ nodetype.title }}</a> + </li> + {% empty %} + <li> + {% trans "No nodetypes yet." %} + </li> + {% endfor %} +</ul> diff --git a/gstudio/templates/gstudio/tags/metatypes.html b/gstudio/templates/gstudio/tags/metatypes.html new file mode 100644 index 0000000..745dce0 --- /dev/null +++ b/gstudio/templates/gstudio/tags/metatypes.html @@ -0,0 +1,16 @@ +{% load i18n mptt_tags %} + +{% for metatype, structure in metatypes|tree_info %} + {% if structure.new_level %}<ul><li>{% else %}</li><li>{% endif %} + <a href="{{ metatype.get_absolute_url }}" title="{{ metatype.title }}">{{ metatype.title }}</a> + {% blocktrans count metatype.nodetypes_published.count as nodetype_count %}{{ nodetype_count }} nodetype{% plural %}{{ nodetype_count }} nodetypes{% endblocktrans %} + {% for level in structure.closed_levels %}</li></ul>{% endfor %} + {% empty %} +<ul> + <li> + {% trans "No metatypes yet." %} + </li> +</ul> +{% endfor %} + + diff --git a/gstudio/templates/gstudio/tags/nodetypes.html b/gstudio/templates/gstudio/tags/nodetypes.html new file mode 100644 index 0000000..722c201 --- /dev/null +++ b/gstudio/templates/gstudio/tags/nodetypes.html @@ -0,0 +1,16 @@ +{% load i18n mptt_tags %} + +{% for nodetype, structure in nodetypes|tree_info %} + {% if structure.new_level %}<ul><li>{% else %}</li><li>{% endif %} + <a href="{{ nodetype.get_absolute_url }}" title="{{ nodetype.title }}">{{ nodetype.title }}</a> + {% blocktrans count nodetypes.gbobjects_published.count as gbobjects_count %}{{ gbobjects_count }} gbobject{% plural %}{{ gbobjects_count }} gbobjects{% endblocktrans %} + + {% empty %} +<ul> + <li> + {% trans "No subtypes yet." %} + </li> +</ul> +{% endfor %} + + diff --git a/gstudio/templates/gstudio/tags/pagination.html b/gstudio/templates/gstudio/tags/pagination.html new file mode 100644 index 0000000..ac54a75 --- /dev/null +++ b/gstudio/templates/gstudio/tags/pagination.html @@ -0,0 +1,59 @@ +{% load i18n %} +<div class="paginator span-16 last"> + <span class="index"> + {% blocktrans with page.number as current_page and page.paginator.num_pages as total_page %}Page {{ current_page }} of {{ total_page }}{% endblocktrans %} + </span> + + {% if page.has_previous %} + <span class="previous"> + <a href="?page={{ page.previous_page_number }}{{ GET_string }}" + title="{% trans "More recent node types" %}">«</a> + </span> + {% endif %} + + {% for page_number in begin %} + <span class="page {% ifequal page.number page_number %}current{% endifequal %}"> + {% ifequal page.number page_number %} + <strong>{{ page_number }}</strong> + {% else %} + <a href="?page={{ page_number }}{{ GET_string }}" + title="{% trans "Nodetypes page" %} {{ page_number }}">{{ page_number }}</a> + {% endifequal%} + </span> + {% endfor %} + + {% if middle %} + <span class="ellipsis">…</span> + {% for page_number in middle %} + <span class="page {% ifequal page.number page_number %}current{% endifequal %}"> + {% ifequal page.number page_number %} + <strong>{{ page_number }}</strong> + {% else %} + <a href="?page={{ page_number }}{{ GET_string }}" + title="{% trans "Nodetypes page" %} {{ page_number }}">{{ page_number }}</a> + {% endifequal%} + </span> + {% endfor %} + {% endif %} + + {% if end %} + <span class="ellipsis">…</span> + {% for page_number in end %} + <span class="page {% ifequal page.number page_number %}current{% endifequal %}"> + {% ifequal page.number page_number %} + <strong>{{ page_number }}</strong> + {% else %} + <a href="?page={{ page_number }}{{ GET_string }}" + title="{% trans "Nodetypes page" %} {{ page_number }}">{{ page_number }}</a> + {% endifequal%} + </span> + {% endfor %} + {% endif %} + + {% if page.has_next %} + <span class="next"> + <a href="?page={{ page.next_page_number }}{{ GET_string }}" + title="{% trans "More old nodetypes" %}">»</a> + </span> + {% endif %} +</div> diff --git a/gstudio/templates/gstudio/tags/popular_nodetypes.html b/gstudio/templates/gstudio/tags/popular_nodetypes.html new file mode 100644 index 0000000..2b3112b --- /dev/null +++ b/gstudio/templates/gstudio/tags/popular_nodetypes.html @@ -0,0 +1,16 @@ +{% load i18n %} +<ul> + {% for nodetype in nodetypes %} + <li> + <a href="{{ nodetype.get_absolute_url }}" title="{{ nodetype.title }}" rel="bookmark">{{ nodetype.title }}</a> + <br /> + {% with nodetype.comments.count as comment_count %} + <a href="{{ nodetype.get_absolute_url }}#comments" title="{{ nodetype.title }}">{{ comment_count }} {% trans "comment" %}{{ comment_count|pluralize }}</a> + {% endwith %} + </li> + {% empty %} + <li> + {% trans "No nodetypes yet." %} + </li> + {% endfor %} +</ul> diff --git a/gstudio/templates/gstudio/tags/random_nodetypes.html b/gstudio/templates/gstudio/tags/random_nodetypes.html new file mode 100644 index 0000000..5b7806b --- /dev/null +++ b/gstudio/templates/gstudio/tags/random_nodetypes.html @@ -0,0 +1,12 @@ +{% load i18n %} +<ul> + {% for nodetype in nodetypes %} + <li> + <a href="{{ nodetype.get_absolute_url }}" title="{{ nodetype.title }}" rel="bookmark">{{ nodetype.title }}</a> + </li> + {% empty %} + <li> + {% trans "No nodetypes yet." %} + </li> + {% endfor %} +</ul> diff --git a/gstudio/templates/gstudio/tags/recent_comments.html b/gstudio/templates/gstudio/tags/recent_comments.html new file mode 100644 index 0000000..9e87c6f --- /dev/null +++ b/gstudio/templates/gstudio/tags/recent_comments.html @@ -0,0 +1,20 @@ +{% load i18n %} + +<ul> + {% for comment in comments %} + <li> + {% with comment.content_object as nodetype %} + {{ comment.user_name }} {% trans "on" %} + <a href="{{ nodetype.get_absolute_url }}#comment_{{ comment.pk }}" + title="{% trans "Comment on" %} {{ nodetype.title }}"> + {{ nodetype.title }} + </a> + {% endwith %} + </li> + {% empty %} + <li> + {% trans "No comments yet." %} + </li> + {% endfor %} +</ul> + diff --git a/gstudio/templates/gstudio/tags/recent_linkbacks.html b/gstudio/templates/gstudio/tags/recent_linkbacks.html new file mode 100644 index 0000000..382e53c --- /dev/null +++ b/gstudio/templates/gstudio/tags/recent_linkbacks.html @@ -0,0 +1,21 @@ +{% load i18n %} + +<ul> + {% for linkback in linkbacks %} + <li> + {% with linkback.content_object as nodetype %} + <a href="{{ linkback.url }}">{{ linkback.user_name }}</a> + {% trans "in" %} + <a href="{{ nodetype.get_absolute_url }}#{{ linkback.flags.all.0.flag }}_{{ linkback.pk }}" + title="{% trans "Linkback on" %} {{ nodetype.title }}"> + {{ nodetype.title }} + </a> + {% endwith %} + </li> + {% empty %} + <li> + {% trans "No linkbacks yet." %} + </li> + {% endfor %} +</ul> + diff --git a/gstudio/templates/gstudio/tags/recent_nodetypes.html b/gstudio/templates/gstudio/tags/recent_nodetypes.html new file mode 100644 index 0000000..0b1bb0a --- /dev/null +++ b/gstudio/templates/gstudio/tags/recent_nodetypes.html @@ -0,0 +1,20 @@ + +{% load i18n mptt_tags %} + +{% for nodetype, structure in nodetypes|tree_info %} +{% if structure.new_level %} +<ul> + <li>{% else %}</li> + <li>{% endif %} + <a href="{{ nodetype.get_absolute_url }}" title="{{ nodetype.title }}">{{ nodetype.title }}</a> + {% for level in structure.closed_levels %} + </li> +</ul>{% endfor %} +{% empty %} +<ul> + <li> + {% trans "No subtypes yet." %} + </li> +</ul> +{% endfor %} + diff --git a/gstudio/templates/gstudio/tags/similar_nodetypes.html b/gstudio/templates/gstudio/tags/similar_nodetypes.html new file mode 100644 index 0000000..7e933e0 --- /dev/null +++ b/gstudio/templates/gstudio/tags/similar_nodetypes.html @@ -0,0 +1,12 @@ +{% load i18n %} +<ul> + {% for nodetype in nodetypes %} + <li> + <a href="{{ nodetype.get_absolute_url }}" title="{{ nodetype.title }}" rel="bookmark">{{ nodetype.title }}</a> + </li> + {% empty %} + <li> + {% trans "No similar nodetypes." %} + </li> + {% endfor %} +</ul> diff --git a/gstudio/templates/gstudio/tags/slider_nodetypes.html b/gstudio/templates/gstudio/tags/slider_nodetypes.html new file mode 100644 index 0000000..ccc161a --- /dev/null +++ b/gstudio/templates/gstudio/tags/slider_nodetypes.html @@ -0,0 +1,27 @@ +{% if nodetypes %} +<div id="slider"> + <ul class="ui-tabs-nav"> + {% for nodetype in nodetypes %} + <li class="ui-tabs-nav-item{% if forloop.first %} ui-tabs-selected{% endif %}" + id="nav-slider-{{ forloop.counter }}"> + <a href="#nodetype-slider-{{ forloop.counter }}"> + <img src="{% if nodetype.image %}{{ nodetype.image.url }}{% endif %}" alt="{{ nodetype.title }}" /> + <span>{{ nodetype.title }}</span> + </a> + </li> + {% endfor %} + </ul> + + {% for nodetype in nodetypes %} + <div id="nodetype-slider-{{ forloop.counter }}" class="ui-tabs-panel"> + <img src="{% if nodetype.image %}{{ nodetype.image.url }}{% endif %}" alt="{{ nodetype.title }}" /> + <div class="panel_info"> + <h2> + <a href="{{ nodetype.get_absolute_url }}" rel="bookmark">{{ nodetype.title }}</a> + </h2> + {{ nodetype.excerpt|linebreaks|truncatewords_html:20 }} + </div> + </div> + {% endfor %} +</div> +{% endif %} diff --git a/gstudio/templates/gstudio/tags/tag_cloud.html b/gstudio/templates/gstudio/tags/tag_cloud.html new file mode 100644 index 0000000..a18a004 --- /dev/null +++ b/gstudio/templates/gstudio/tags/tag_cloud.html @@ -0,0 +1,13 @@ +{% load i18n %} + +<div> + <ul> + {% for tag in tags %} + <li> + <a href="{% url gstudio_tag_detail tag.name %}" + title="{% blocktrans count tag.count as nodetype_count %}{{ nodetype_count }} nodetype{% plural %}{{ nodetype_count }} nodetypes{% endblocktrans %}" + class="tag_{{ tag.font_size }}">{{ tag }}</a> + </li> + {% endfor %} + </ul> +</div> diff --git a/gstudio/templates/gstudio/wlwmanifest.xml b/gstudio/templates/gstudio/wlwmanifest.xml new file mode 100644 index 0000000..73fd1c2 --- /dev/null +++ b/gstudio/templates/gstudio/wlwmanifest.xml @@ -0,0 +1,63 @@ +{% load i18n %}<?xml version="1.0" encoding="utf-8" ?> +<manifest xmlns="http://schemas.microsoft.com/wlw/manifest/weblog"> + <options> + <!-- http://msdn.microsoft.com/en-us/library/bb463260.aspx --> + <clientType>Metaweblog</clientType> + <supportsPostAsDraft>Yes</supportsPostAsDraft> + <supportsFileUpload>Yes</supportsFileUpload> + <supportsExtendedNodetypes>No</supportsExtendedNodetypes> + <supportsCustomDate>Yes</supportsCustomDate> + <supportsMetatypes>Yes</supportsMetatypes> + <supportsMetatypesInline>Yes</supportsMetatypesInline> + <supportsMultipleMetatypes>Yes</supportsMultipleMetatypes> + <supportsHierarchicalMetatypes>Yes</supportsHierarchicalMetatypes> + <supportsNewMetatypes>Yes</supportsNewMetatypes> + <supportsNewMetatypesInline>Yes</supportsNewMetatypesInline> + <supportsKeywords>Yes</supportsKeywords> + <supportsCommentPolicy>Yes</supportsCommentPolicy> + <supportsPingPolicy>Yes</supportsPingPolicy> + <supportsAuthor>Yes</supportsAuthor> + <supportsSlug>Yes</supportsSlug> + <supportsPassword>Yes</supportsPassword> + <supportsExcerpt>Yes</supportsExcerpt> + <supportsTrackbacks>No</supportsTrackbacks> + <supportsPages>No</supportsPages> + <supportsPageParent>No</supportsPageParent> + <supportsPageOrder>No</supportsPageOrder> + <supportsEmptyTitles>No</supportsEmptyTitles> + <requiresHtmlTitles>No</requiresHtmlTitles> + <requiresXHTML>No</requiresXHTML> + <supportsScripts>Yes</supportsScripts> + <supportsEmbeds>Yes</supportsEmbeds> + <characterSet>UTF-8</characterSet> + <maxMetatypeNameLength>50</maxMetatypeNameLength> + </options> + + <weblog> + <serviceName>{{ site.name }} Blog</serviceName> + <imageUrl>{{ STATIC_URL }}gstudio/img/wlw/gstudio.png</imageUrl> + <watermarkImageUrl>{{ STATIC_URL }}gstudio/img/wlw/watermark.png</watermarkImageUrl> + <homepageLinkText>{% trans "View site" %}</homepageLinkText> + <adminLinkText>{% trans "Admin. site" %}</adminLinkText> + <adminUrl><![CDATA[ + {blog-homepage-url}{% url admin:index %} + ]]></adminUrl> + <postEditingUrl><![CDATA[ + {blog-homepage-url}{% url admin:gstudio_nodetype_changelist %}{post-id}/ + ]]></postEditingUrl> + </weblog> + + <buttons> + <button> + <id>0</id> + <text>{% trans "Manage comments" %}</text> + <imageUrl>{{ STATIC_URL }}gstudio/img/wlw/comments.png</imageUrl> + <clickUrl><![CDATA[ + {blog-homepage-url}{% url admin:comments_comment_changelist %} + ]]></clickUrl> + </button> + </buttons>--> + + <!-- Add views section --> +</manifest> + diff --git a/gstudio/templates/gstudio/wxr.xml b/gstudio/templates/gstudio/wxr.xml new file mode 100644 index 0000000..557eb0d --- /dev/null +++ b/gstudio/templates/gstudio/wxr.xml @@ -0,0 +1,125 @@ +<?xml version="1.0" encoding="UTF-8"?> +{% load tagging_tags %} +<!-- This is a WordPress eXtended RSS file generated by Gstudio {{ version }} as an export of your blog. --> +<!-- It contains information about your blog's posts, comments, and metatypes. --> +<!-- You may use this file to transfer that content from one site to another. --> +<!-- This file is not intended to serve as a complete backup of your blog. --> + +<!-- generator="Gstudio/{{ version }}" created="{% now "Y-m-d H:i" %}"--> +<rss version="2.0" + xmlns:excerpt="http://wordpress.org/export/1.0/excerpt/" + xmlns:content="http://purl.org/rss/1.0/modules/content/" + xmlns:wfw="http://wellformedweb.org/CommentAPI/" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:wp="http://wordpress.org/export/1.0/"> + <channel> + <title>{{ site.name }}</title> + <link>{{ site_url }}</link> + <description>{{ description }}</description> + <pubDate>{% now "r" %}</pubDate> + <generator>Gstudio {{ version }}</generator> + <language>{{ language }}</language> + <wp:wxr_version>1.0</wp:wxr_version> + <wp:base_site_url>{{ site_url }}</wp:base_site_url> + <wp:base_blog_url>{{ site_url }}{% url gstudio_nodetype_archive_index %}</wp:base_blog_url> + {% for metatype in metatypes %} + <wp:metatype> + <wp:metatype_nicename>{{ metatype.slug }}</wp:metatype_nicename> + <wp:metatype_parent>{{ metatype.parent.title }}</wp:metatype_parent> + <wp:cat_name><![CDATA[{{ metatype.title }}]]></wp:cat_name> + <wp:metatype_description><![CDATA[{{ metatype.description }}]]></wp:metatype_description> + </wp:metatype> + {% endfor %}{% for tag in tags %} + <wp:tag> + <wp:tag_slug>{{ tag.name }}</wp:tag_slug> + <wp:tag_name><![CDATA[{{ tag.name }}]]></wp:tag_name> + </wp:tag> + {% endfor %}{% for nodetype in nodetypes %} + <item> + <title>{{ nodetype.title }}</title> + <link>{{ site_url }}{{ nodetype.get_absolute_url }}</link> + <pubDate>{{ nodetype.publication_date|date:"r" }}</pubDate> + <dc:creator><![CDATA[{{ nodetype.authors.all.0 }}]]></dc:creator> + {% for metatype in nodetype.metatypes.all %} + <metatype domain="metatype" nicename="{{ metatype.slug }}"><![CDATA[{{ metatype.title }}]]></metatype> + {% endfor %}{% tags_for_object nodetype as tag_list %}{% for tag in tag_list %} + <metatype domain="tag" nicename="{{ tag }}"><![CDATA[{{ tag }}]]></metatype> + {% endfor %} + <guid isPermaLink="true">{{ site_url }}{{ nodetype.get_absolute_url }}</guid> + <description></description> + <content:encoded><![CDATA[{{ nodetype.html_content|safe }}]]></content:encoded> + <excerpt:encoded><![CDATA[{{ nodetype.excerpt }}]]></excerpt:encoded> + <wp:post_id>{{ nodetype.pk }}</wp:post_id> + <wp:post_date>{{ nodetype.publication_date|date:"Y-m-d H:i:s"}}</wp:post_date> + <wp:post_date_gmt>0000-00-00 00:00:00</wp:post_date_gmt> + <wp:comment_status>{% if nodetype.comment_enabled %}open{% else %}closed{% endif %}</wp:comment_status> + <wp:ping_status>{% if nodetype.pingback_enabled %}open{% else %}closed{% endif %}</wp:ping_status> + <wp:post_name>{{ nodetype.slug }}</wp:post_name> + <wp:status>{% if nodetype.is_visible %}{% if nodetype.login_required %}private{% else %}publish{% endif %}{% else %}draft{% endif %}</wp:status> + <wp:post_parent>0</wp:post_parent> + <wp:menu_order>0</wp:menu_order> + <wp:post_type>post</wp:post_type> + <wp:post_password>{{ nodetype.password }}</wp:post_password> + <wp:is_sticky>{{ nodetype.featured|yesno:"1,0" }}</wp:is_sticky> + <wp:postmeta> + <wp:meta_key>_last_update</wp:meta_key> + <wp:meta_value><![CDATA[{{ nodetype.last_update|date:"c"}}]]></wp:meta_value> + </wp:postmeta> + <wp:postmeta> + <wp:meta_key>_start_publication</wp:meta_key> + <wp:meta_value><![CDATA[{{ nodetype.start_publication|date:"c"}}]]></wp:meta_value> + </wp:postmeta> + <wp:postmeta> + <wp:meta_key>_end_publication</wp:meta_key> + <wp:meta_value><![CDATA[{{ nodetype.end_publication|date:"c"}}]]></wp:meta_value> + </wp:postmeta> + {% for comment in nodetype.comments %} + <wp:comment> + <wp:comment_id>{{ comment.id }}</wp:comment_id> + <wp:comment_author><![CDATA[{{ comment.userinfo.name }}]]></wp:comment_author> + <wp:comment_author_email>{{ comment.userinfo.email }}</wp:comment_author_email> + <wp:comment_author_url>{{ comment.userinfo.url }}</wp:comment_author_url> + <wp:comment_author_IP>{{ comment.ip_address }}</wp:comment_author_IP> + <wp:comment_date>{{ comment.submit_date|date:"Y-m-d H:i:s" }}</wp:comment_date> + <wp:comment_date_gmt>{{ comment.submit_date|date:"Y-m-d H:i:s" }}</wp:comment_date_gmt> + <wp:comment_content><![CDATA[{{ comment.comment }}]]></wp:comment_content> + <wp:comment_approved>1</wp:comment_approved> + <wp:comment_type></wp:comment_type> + <wp:comment_parent>0</wp:comment_parent> + <wp:comment_user_id>0</wp:comment_user_id> + </wp:comment> + {% endfor %}{% for comment in nodetype.pingbacks %} + <wp:comment> + <wp:comment_id>{{ comment.id }}</wp:comment_id> + <wp:comment_author><![CDATA[{{ comment.userinfo.name }}]]></wp:comment_author> + <wp:comment_author_email>{{ comment.userinfo.email }}</wp:comment_author_email> + <wp:comment_author_url>{{ comment.userinfo.url }}</wp:comment_author_url> + <wp:comment_author_IP>{{ comment.ip_address }}</wp:comment_author_IP> + <wp:comment_date>{{ comment.submit_date|date:"Y-m-d H:i:s" }}</wp:comment_date> + <wp:comment_date_gmt>{{ comment.submit_date|date:"Y-m-d H:i:s" }}</wp:comment_date_gmt> + <wp:comment_content><![CDATA[{{ comment.comment }}]]></wp:comment_content> + <wp:comment_approved>1</wp:comment_approved> + <wp:comment_type>pingback</wp:comment_type> + <wp:comment_parent>0</wp:comment_parent> + <wp:comment_user_id>0</wp:comment_user_id> + </wp:comment> + {% endfor %}{% for comment in nodetype.trackbacks %} + <wp:comment> + <wp:comment_id>{{ comment.id }}</wp:comment_id> + <wp:comment_author><![CDATA[{{ comment.userinfo.name }}]]></wp:comment_author> + <wp:comment_author_email>{{ comment.userinfo.email }}</wp:comment_author_email> + <wp:comment_author_url>{{ comment.userinfo.url }}</wp:comment_author_url> + <wp:comment_author_IP>{{ comment.ip_address }}</wp:comment_author_IP> + <wp:comment_date>{{ comment.submit_date|date:"Y-m-d H:i:s" }}</wp:comment_date> + <wp:comment_date_gmt>{{ comment.submit_date|date:"Y-m-d H:i:s" }}</wp:comment_date_gmt> + <wp:comment_content><![CDATA[{{ comment.comment }}]]></wp:comment_content> + <wp:comment_approved>1</wp:comment_approved> + <wp:comment_type>trackback</wp:comment_type> + <wp:comment_parent>0</wp:comment_parent> + <wp:comment_user_id>0</wp:comment_user_id> + </wp:comment> + {% endfor %} + </item> + {% endfor %} + </channel> +</rss> |