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 | |
download | gnowsys-7a4f561e851fdc7246d804c3abb6748b8a4199a6.tar.gz |
master trunk of gnowsys-studio
Diffstat (limited to 'gstudio/templates')
116 files changed, 4319 insertions, 0 deletions
diff --git a/gstudio/templates/404.html b/gstudio/templates/404.html new file mode 100644 index 0000000..0a253b3 --- /dev/null +++ b/gstudio/templates/404.html @@ -0,0 +1,46 @@ +{% extends "gstudio/skeleton.html" %} +{% load i18n gstudio_tags %} + +{% block breadcrumbs %} + {% trans "Error 404" %} +{% endblock %} + +{% block title %}{% trans "Page not found" %}{% endblock %} + +{% block content %} +<h2>{% trans "Page not found" %}</h2> + +<p>{% trans "Sorry, but the requested page could not be found." %}</p> + +<h3>{% trans "Useful links" %}</h3> +<div class="links"> + <ul> + <li> + <a href="{% url gstudio_nodetype_archive_index %}" title="{% trans "Blog index" %}"> + {% trans "Blog index" %} + </a> + </li> + <li> + <a href="{% url gstudio_sitemap %}" title="{% trans "Sitemap" %}"> + {% trans "Sitemap" %} + </a> + </li> + </ul> +</div> + +<h3>{% trans "Recent node types" %}</h3> +<div class="recents"> + {% get_recent_nodetypes 5 %} +</div> + +<h3>{% trans "Search" %}</h3> +<div class="search"> + <form method="get" id="searchform" action="{% url gstudio_nodetype_search %}"> + <p> + <input type="text" value="{% trans "Keywords..." %}" name="pattern" id="searchbox" onfocus="this.value=''"/> + <input type="submit" class="submitbutton" value="OK" /> + </p> + </form> +</div> + +{% endblock %} diff --git a/gstudio/templates/500.html b/gstudio/templates/500.html new file mode 100644 index 0000000..bf0551a --- /dev/null +++ b/gstudio/templates/500.html @@ -0,0 +1,46 @@ +{% extends "gstudio/skeleton.html" %} +{% load i18n gstudio_tags %} + +{% block breadcrumbs %} + {% trans "Error 500" %} +{% endblock %} + +{% block title %}{% trans "Server error" %}{% endblock %} + +{% block content %} +<h2>{% trans "Server error" %}</h2> + +<p>{% trans "There's been an error. It's been reported to the site administrators via e-mail and should be fixed shortly. Thanks for your patience." %}</p> + +<h3>{% trans "Useful links" %}</h3> +<div class="links"> + <ul> + <li> + <a href="{% url gstudio_nodetype_archive_index %}" title="{% trans "Blog index" %}"> + {% trans "Blog index" %} + </a> + </li> + <li> + <a href="{% url gstudio_sitemap %}" title="{% trans "Sitemap" %}"> + {% trans "Sitemap" %} + </a> + </li> + </ul> +</div> + +<h3>{% trans "Recent node types" %}</h3> +<div class="recents"> + {% get_recent_nodetypes 5 %} +</div> + +<h3>{% trans "Search" %}</h3> +<div class="search"> + <form method="get" id="searchform" action="{% url gstudio_nodetype_search %}"> + <p> + <input type="text" value="{% trans "Keywords..." %}" name="pattern" id="searchbox" onfocus="this.value=''"/> + <input type="submit" class="submitbutton" value="OK" /> + </p> + </form> +</div> + +{% endblock %} diff --git a/gstudio/templates/admin/gstudio/app_index.html b/gstudio/templates/admin/gstudio/app_index.html new file mode 100644 index 0000000..3bd4171 --- /dev/null +++ b/gstudio/templates/admin/gstudio/app_index.html @@ -0,0 +1,41 @@ +{% extends "admin/app_index.html" %} +{% load i18n adminmedia %} + +{% block extrastyle %} +{{ block.super }} +<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}gstudio/css/jquery.autocomplete.css" /> +<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}gstudio/css/dashboard_gstudio.css" /> +{% endblock %} + +{% block extrahead %} +{{ block.super }} +<script type="text/javascript" src="{{ STATIC_URL }}gstudio/js/jquery.js"></script> +<script type="text/javascript" src="{{ STATIC_URL }}gstudio/js/jquery.masonry.js"></script> +<script type="text/javascript" src="{{ STATIC_URL }}gstudio/js/jquery.bgiframe.js"></script> +<script type="text/javascript" src="{{ STATIC_URL }}gstudio/js/jquery.autocomplete.js"></script> +<script type="text/javascript" src="{% url admin:gstudio_nodetype_autocomplete_tags %}"></script> +<script type="text/javascript"> +$(document).ready(function() { + $("#content-main").masonry({ + singleMode: true, itemSelector: ".module" + }); +}); +</script> +{% endblock %} + +{% block content %} +<div id="content-main"> + {% include "admin/gstudio/widgets/content_stats.html" %} + + {% include "admin/gstudio/widgets/quickpost.html" %} + + {% include "admin/gstudio/widgets/recent_comments.html" %} + + {% include "admin/gstudio/widgets/draft_nodetypes.html" %} + + {% include "admin/gstudio/widgets/recent_linkbacks.html" %} +</div> +{% endblock %} + + + diff --git a/gstudio/templates/admin/gstudio/nodetype/autocomplete_tags.js b/gstudio/templates/admin/gstudio/nodetype/autocomplete_tags.js new file mode 100644 index 0000000..8d318ae --- /dev/null +++ b/gstudio/templates/admin/gstudio/nodetype/autocomplete_tags.js @@ -0,0 +1,11 @@ +{% load tagging_tags %} + +$(document).ready(function() { + {% tags_for_model gstudio.Objecttype as objecttype_tags %} + var data = "{{ objecttype_tags|join:',' }}".split(","); + $("#id_tags").autocomplete(data, { + width: 150, max: 10, + multiple: true, multipleSeparator: ", ", + scroll: true, scrollHeight: 300, + matchContains: true, autoFill: true,}); +});
\ No newline at end of file diff --git a/gstudio/templates/admin/gstudio/nodetype/markitup.js b/gstudio/templates/admin/gstudio/nodetype/markitup.js new file mode 100644 index 0000000..543d49b --- /dev/null +++ b/gstudio/templates/admin/gstudio/nodetype/markitup.js @@ -0,0 +1,3 @@ +$(document).ready(function() { + $("#id_content").markItUp(mySettings); +}); diff --git a/gstudio/templates/admin/gstudio/nodetype/tinymce_textareas.js b/gstudio/templates/admin/gstudio/nodetype/tinymce_textareas.js new file mode 100644 index 0000000..51461c6 --- /dev/null +++ b/gstudio/templates/admin/gstudio/nodetype/tinymce_textareas.js @@ -0,0 +1,23 @@ +tinyMCE.init({ + mode: "exact", + elements: "id_content", + theme: "advanced", + skin : "o2k7", + skin_variant : "silver", + height: "250", + width: "800", + relative_urls: false, + language: "{{ language }}", + directionality: "{{ directionality }}", + spellchecker_languages : "{{ spellchecker_languages }}", + spellchecker_rpc_url : "{{ spellchecker_rpc_url }}", + theme_advanced_toolbar_location : "top", + theme_advanced_toolbar_align : "left", + theme_advanced_statusbar_location : "bottom", + theme_advanced_resizing : true, + plugins: "contextmenu,directionality,fullscreen,paste,preview,searchreplace,spellchecker,visualchars,wordcount", + paste_auto_cleanup_on_paste : true, + theme_advanced_buttons1 : "formatselect,fontsizeselect,|,undo,redo,|,cut,copy,paste,pastetext,pasteword,|,search,replace,|,visualchars,visualaid,cleanup,code,preview,fullscreen", + theme_advanced_buttons2 : "bold,italic,underline,strikethrough,|,forecolor,backcolor,removeformat,|,justifyleft,justifycenter,justifyright,justifyfull,|,sub,sup,|,bullist,numlist,|,outdent,indent,|,link,unlink,anchor,image,blockquote,hr,charmap,", + theme_advanced_buttons3 : "", + }); diff --git a/gstudio/templates/admin/gstudio/nodetype/wymeditor.js b/gstudio/templates/admin/gstudio/nodetype/wymeditor.js new file mode 100644 index 0000000..6cf8633 --- /dev/null +++ b/gstudio/templates/admin/gstudio/nodetype/wymeditor.js @@ -0,0 +1,10 @@ +$(document).ready(function() { + $("#id_content").wymeditor({ + skin: "django", lang: "{{ LANGUAGE_CODE }}", + stylesheet: "{{ STATIC_URL }}gstudio/css/wymeditor_styles.css", + updateSelector: "input:submit", updateEvent: "click", + postInit: function(wym) { + wym.hovertools(); + } + }); + }); diff --git a/gstudio/templates/admin/gstudio/widgets/ATquickpost.html b/gstudio/templates/admin/gstudio/widgets/ATquickpost.html new file mode 100644 index 0000000..025dc6e --- /dev/null +++ b/gstudio/templates/admin/gstudio/widgets/ATquickpost.html @@ -0,0 +1,59 @@ +{% load i18n %} +<div id="AT_quickpost" class="module"> + <form method="post" action="{% url gstudio_nodetype_quick_post %}"> + {% csrf_token %} + <table summary="{% trans "Quick publishing" %}"> + + + <tr><p class="help">All the fields are mandatory</p> + <th> + <label for="id_title" class="required">{% trans "Title" %}:</label> + </th> + <td> + <input name="title" class="vTextField" maxlength="255" id="id_title" type="text" /> + </td> + </tr> + + <tr> + <th> + <label for="id_slug" class="required">{% trans "Slug" %}:</label> + </th> + <td> + <input name="slug" class="vTextField" maxlength="255" id="id_slug" type="text" /> + </td> + </tr> + <tr> + <th> + <label for="id_status" class="required">{% trans "Status" %}:</label> + </th> + <td> + <input name="status" class="vTextField" maxlength="100" id="id_status" type="text" /> + </td> + </tr> + <tr> + <th> + <label for="id_content" class="required">{% trans "Content" %}:</label> + </th> + <td> + <textarea id="id_content" rows="7" name="content" class="vLargeTextField"></textarea> + </td> + </tr> + <tr> + <th> + <label for="id_tags">{% trans "Tags" %}:</label> + </th> + <td> + <input name="tags" class="vTextField" maxlength="255" id="id_tags" type="text" /> + </td> + </tr> + <tr> + <td colspan="2"> + <input type="submit" value="{% trans "Save as draft" %}" name="save_draft" class="button" /> + <input type="reset" value="{% trans "Reset" %}" class="button" /> + <input type="submit" value="{% trans "Publish" %}" class="default" name="save" /> + + </td> + </tr> + </table> + </form> +</div> diff --git a/gstudio/templates/admin/gstudio/widgets/OTquickpost.html b/gstudio/templates/admin/gstudio/widgets/OTquickpost.html new file mode 100644 index 0000000..da24e30 --- /dev/null +++ b/gstudio/templates/admin/gstudio/widgets/OTquickpost.html @@ -0,0 +1,58 @@ +{% load i18n %} +<div id="OTquickpost" class="module"> + <form method="post" action="{% url gstudio_nodetype_quick_post %}"> + {% csrf_token %} + <table summary="{% trans "Quick publishing" %}"> + + <tr><p class="help">All the fields are mandatory</p> + <th> + <label for="id_title" class="required">{% trans "Title" %}:</label> + </th> + <td> + <input name="title" class="vTextField" maxlength="255" id="id_title" type="text" /> + </td> + </tr> + + <tr> + <th> + <label for="id_slug" class="required">{% trans "Slug" %}:</label> + </th> + <td> + <input name="slug" class="vTextField" maxlength="255" id="id_slug" type="text" /> + </td> + </tr> + <tr> + <th> + <label for="id_status" class="required">{% trans "Status" %}:</label> + </th> + <td> + <input name="status" class="vTextField" maxlength="100" id="id_status" type="text" /> + </td> + </tr> + <tr> + <th> + <label for="id_content" class="required">{% trans "Content" %}:</label> + </th> + <td> + <textarea id="id_content" rows="7" name="content" class="vLargeTextField"></textarea> + </td> + </tr> + <tr> + <th> + <label for="id_tags">{% trans "Tags" %}:</label> + </th> + <td> + <input name="tags" class="vTextField" maxlength="255" id="id_tags" type="text" /> + </td> + </tr> + <tr> + <td colspan="2"> + <input type="submit" value="{% trans "Save as draft" %}" name="save_draft" class="button" /> + <input type="reset" value="{% trans "Reset" %}" class="button" /> + <input type="submit" value="{% trans "Publish" %}" class="default" name="save" /> + + </td> + </tr> + </table> + </form> +</div> diff --git a/gstudio/templates/admin/gstudio/widgets/_content_stats.html b/gstudio/templates/admin/gstudio/widgets/_content_stats.html new file mode 100644 index 0000000..90709fe --- /dev/null +++ b/gstudio/templates/admin/gstudio/widgets/_content_stats.html @@ -0,0 +1,146 @@ +{% load i18n %} + +<tr> + <th>{% trans "Contents" %}</th> + <th>{% trans "Discussions" %}</th> +</tr> + + + +<tr> + <td> + <a href="{% url admin:gstudio_objecttype_changelist %}"> + {% blocktrans %}{{ objecttypes }} objecttype{% endblocktrans %} + </a> + </td> + <td> + <a href="{% url admin:comments_comment_changelist %}?is_public__exact=1"> + {% blocktrans %}{{ comments }} comments{% endblocktrans %} + </a> + </td> + <td> + <ul class="actions"> + <li class="add-link"> + <a href="/admin/gstudio/objecttype/add/">Add</a> + </li> + </td> + <td> + <ul class="actions"> + <li class="change-link"> + <a href="/admin/gstudio/objecttype/">Change</a> + </li> + </ul> + </td> +</tr> + +<tr> + <td> + <a href="{% url admin:gstudio_objecttype_changelist %}"> + {% blocktrans %}{{ nodetypes }} nodetypes{% endblocktrans %} + </a> + </td> + <td> + <a href="{% url admin:comments_comment_changelist %}?is_public__exact=1"> + {% blocktrans %}{{ comments }} comments{% endblocktrans %} + </a> + </td> + <td> + <ul class="actions"> + <li class="add-link"> + <a href="/admin/comments/comment/add/">Add</a> + </li> + </td> + <td> + <ul class="actions"> + <li class="change-link"> + <a href="/admin/comments/comment/">Change</a> + </li> + </ul> + </td> +</tr> +<tr> + <td> + <a href="{% url admin:gstudio_metatype_changelist %}"> + {% blocktrans %}{{ metatypes }} metatypes{% endblocktrans %} + </a> + </td> + <td>{% blocktrans %}{{ pingbacks }} pingbacks{% endblocktrans %}</td> + + <td> + <ul class="actions"> + <li class="add-link"> + <a href="/admin/gstudio/metatype/add/">Add</a> + </li> + </td> + <td> + <ul class="actions"> + <li class="change-link"> + <a href="/admin/gstudio/metatype/">Change</a> + </li> + </ul> + </td> + + +</tr> + +<tr> + <td> + <a href="{% url admin:gstudio_attributetype_changelist %}"> + {% blocktrans %}{{ attributetype }} attributetype{% endblocktrans %} + </a> + </td> + + <td><a href="{% url admin:comments_comment_changelist %}?is_public__exact=1"> + {% blocktrans %}{{ comments }} comments{% endblocktrans %} + </a> + </td> + <td> + <ul class="actions"> + <li class="add-link"> + <a href="/admin/gstudio/attributetype/add/">Add</a> + </li> + </td> + <td> + <ul class="actions"> + <li class="change-link"> + <a href="/admin/gstudio/attributetype/">Change</a> + </li> + </ul> + </td> +</tr> + +<tr> + <td> + <a href="{% url admin:tagging_tag_changelist %}"> + {% blocktrans %}{{ tags }} tags{% endblocktrans %} + </a> + </td> + <td>{% blocktrans %}{{ trackbacks }} trackbacks{% endblocktrans %}</td> + + <td> + <ul class="actions"> + <li class="add-link"> + <a href="/admin/tagging/tag/add/">Add</a> + </li> + </td> + <td> + <ul class="actions"> + <li class="change-link"> + <a href="/admin/tagging/tag/">Change</a> + </li> + </ul> + </td> + +</tr> +<tr> + <td> + <a href="{% url admin:auth_user_changelist %}"> + {% blocktrans %}{{ authors }} authors{% endblocktrans %} + </a> + </td> + <td> + <a href="{% url admin:comments_comment_changelist %}?is_public__exact=0"> + {% blocktrans %}{{ rejects }} rejected{% endblocktrans %} + </a> + </td> + </tr> diff --git a/gstudio/templates/admin/gstudio/widgets/_draft_nodetypes.html b/gstudio/templates/admin/gstudio/widgets/_draft_nodetypes.html new file mode 100644 index 0000000..4be2308 --- /dev/null +++ b/gstudio/templates/admin/gstudio/widgets/_draft_nodetypes.html @@ -0,0 +1,37 @@ +{% load i18n gstudio_tags %} + +{% for nodetype in nodetypes %} +<tr> + <th> + <a href="{% url admin:gstudio_nodetype_change nodetype.pk %}" + title="{% trans "Edit the nodetype" %}"> + {{ nodetype.title }} + </a> + {% trans "on" %} + <abbr>{{ nodetype.creation_date|date:"DATE_FORMAT" }}</abbr> + {{ nodetype.html_content|truncatewords_html:20|safe }} + </th> + <td> + <a href="{{ nodetype.get_absolute_url }}" class="previewlink"> + {% trans "Preview" %} + </a> + </td> +</tr> +{% empty %} +<tr> + <th colspan="2"> + {% trans "No draft nodetypes." %} + </th> +</tr> +{% endfor %} + +{% if nodetypes %} +<tr> + <th colspan="2"> + <a href="{% url admin:gstudio_objecttype_changelist %}?status__exact=0" + title="{% trans "View all draft nodetypes" %}" class="managelink"> + {% trans "View all draft nodetypes" %} + </a> + </th> +</tr> +{% endif %} diff --git a/gstudio/templates/admin/gstudio/widgets/_recent_comments.html b/gstudio/templates/admin/gstudio/widgets/_recent_comments.html new file mode 100644 index 0000000..bb19910 --- /dev/null +++ b/gstudio/templates/admin/gstudio/widgets/_recent_comments.html @@ -0,0 +1,45 @@ +{% load i18n gstudio_tags %} + +{% for comment in comments %} +<tr> + <th> + <img src="{% get_gravatar comment.email 40 "G" %}" + class="gravatar photo" alt="{{ comment.user_name }}" /> + </th> + <td> + {% with comment.content_object as nodetype %} + <strong>{{ comment.user_name }}</strong> {% trans "in" %} + <strong> + <a href="{{ nodetype.get_absolute_url }}#comment_{{ comment.pk }}" + title="{% trans "Comment on" %} {{ nodetype.title }}"> + {{ nodetype.title }} + </a> + </strong> + {% endwith %} + {{ comment.comment|truncatewords:20|linebreaks }} + </td> + <td> + <a href="{% url admin:comments_comment_change comment.pk %}" + title="{% trans "Edit the comment" %}" class="changelink"> + {% trans "Edit" %} + </a> + </td> +</tr> +{% empty %} +<tr> + <th colspan="3"> + {% trans "No comments yet." %} + </th> +</tr> +{% endfor %} + +{% if comments %} +<tr> + <th colspan="3"> + <a href="{% url admin:comments_comment_changelist %}" + title="{% trans "Manage the comments" %}" class="managelink"> + {% trans "Manage the comments" %} + </a> + </th> +</tr> +{% endif %} diff --git a/gstudio/templates/admin/gstudio/widgets/_recent_linkbacks.html b/gstudio/templates/admin/gstudio/widgets/_recent_linkbacks.html new file mode 100644 index 0000000..57437da --- /dev/null +++ b/gstudio/templates/admin/gstudio/widgets/_recent_linkbacks.html @@ -0,0 +1,31 @@ +{% load i18n %} + +{% for linkback in linkbacks %} +<tr> + <th> + {% with linkback.content_object as nodetype %} + <a href="{{ linkback.url }}">{{ linkback.user_name }}</a> + {% trans "made a linkback on" %} + <a href="{{ nodetype.get_absolute_url }}#{{ linkback.flags.all.0.flag }}_{{ linkback.pk }}" + title="{{ nodetype.title }}"> + {{ nodetype.title }} + </a> + {% endwith %} + {{ linkback.comment|truncatewords:20|linebreaks }} + </th> + <td> + <a href="{% url admin:comments_comment_change linkback.pk %}" + title="{% trans "Edit the linkback" %}" class="changelink"> + {% trans "Edit" %} + </a> + </td> +</tr> +{% empty %} +<tr> + <th colspan="2"> + {% trans "No linkbacks yet." %} + </th> +</tr> +{% endfor %} + + diff --git a/gstudio/templates/admin/gstudio/widgets/base.html b/gstudio/templates/admin/gstudio/widgets/base.html new file mode 100644 index 0000000..d0790cd --- /dev/null +++ b/gstudio/templates/admin/gstudio/widgets/base.html @@ -0,0 +1,6 @@ +<div id="{% block module_id %}{% endblock %}" class="module"> + <table summary="{% block summary %}{% endblock %}"> + <caption>{% block title %}{% endblock %}</caption> + {% block content %}{% endblock %} + </table> +</div> diff --git a/gstudio/templates/admin/gstudio/widgets/content_stats.html b/gstudio/templates/admin/gstudio/widgets/content_stats.html new file mode 100644 index 0000000..6817b0b --- /dev/null +++ b/gstudio/templates/admin/gstudio/widgets/content_stats.html @@ -0,0 +1,12 @@ +{% extends "admin/gstudio/widgets/base.html" %} +{% load i18n gstudio_admin_tags %} + +{% block module_id %}contents{% endblock %} + +{% block summary %}{% trans "Today" %}{% endblock %} +{% block title %}{% trans "Today" %}{% endblock %} + +{% block content %} + {% get_content_stats %} +{% endblock %} + diff --git a/gstudio/templates/admin/gstudio/widgets/draft_nodetypes.html b/gstudio/templates/admin/gstudio/widgets/draft_nodetypes.html new file mode 100644 index 0000000..f43064b --- /dev/null +++ b/gstudio/templates/admin/gstudio/widgets/draft_nodetypes.html @@ -0,0 +1,12 @@ +{% extends "admin/gstudio/widgets/base.html" %} +{% load i18n gstudio_admin_tags %} + +{% block module_id %}drafts{% endblock %} + +{% block summary %}{% trans "Draft nodetypes" %}{% endblock %} +{% block title %}{% trans "Draft nodetypes" %}{% endblock %} + +{% block content %} + {% get_draft_nodetypes %} +{% endblock %} + diff --git a/gstudio/templates/admin/gstudio/widgets/quickpost.html b/gstudio/templates/admin/gstudio/widgets/quickpost.html new file mode 100644 index 0000000..9aff395 --- /dev/null +++ b/gstudio/templates/admin/gstudio/widgets/quickpost.html @@ -0,0 +1,14 @@ +{% load i18n %} +<div id="quickpost" class="module"> + <fieldset> + <legend>{% trans "Quick Publishing" %}</legend> + <select> + <option value="object type">OT</option> + <option value="attribute type">AT</option> + <option value="relation type">RT</option> + <option value="process type">PT</option> + <option value="system type">ST</option> + </select> + </fieldset> + +</div> diff --git a/gstudio/templates/admin/gstudio/widgets/recent_comments.html b/gstudio/templates/admin/gstudio/widgets/recent_comments.html new file mode 100644 index 0000000..5f42a27 --- /dev/null +++ b/gstudio/templates/admin/gstudio/widgets/recent_comments.html @@ -0,0 +1,12 @@ +{% extends "admin/gstudio/widgets/base.html" %} +{% load i18n gstudio_tags %} + +{% block module_id %}comments{% endblock %} + +{% block summary %}{% trans "Recent comments" %}{% endblock %} +{% block title %}{% trans "Recent comments" %}{% endblock %} + +{% block content %} + {% get_recent_comments 3 "admin/gstudio/widgets/_recent_comments.html" %} +{% endblock %} + diff --git a/gstudio/templates/admin/gstudio/widgets/recent_linkbacks.html b/gstudio/templates/admin/gstudio/widgets/recent_linkbacks.html new file mode 100644 index 0000000..721a286 --- /dev/null +++ b/gstudio/templates/admin/gstudio/widgets/recent_linkbacks.html @@ -0,0 +1,12 @@ +{% extends "admin/gstudio/widgets/base.html" %} +{% load i18n gstudio_tags %} + +{% block module_id %}linkbacks{% endblock %} + +{% block summary %}{% trans "Recent linkbacks" %}{% endblock %} +{% block title %}{% trans "Recent linkbacks" %}{% endblock %} + +{% block content %} + {% get_recent_linkbacks 5 "admin/gstudio/widgets/_recent_linkbacks.html" %} +{% endblock %} + diff --git a/gstudio/templates/base.html b/gstudio/templates/base.html new file mode 100644 index 0000000..9662a42 --- /dev/null +++ b/gstudio/templates/base.html @@ -0,0 +1,105 @@ +{% extends "gstudio/skeleton.html" %} +{% load gstudio_tags i18n %} + +{% block meta %} + <meta name="generator" content="Gstudio {{ GSTUDIO_VERSION }}" /> +{% endblock %} + +{% block link %} + <link rel="index" href="{% url gstudio_nodetype_archive_index %}" /> + <link rel="EditURI" type="application/rsd+xml" href="{% url gstudio_rsd %}" /> + <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="{% url gstudio_wlwmanifest %}" /> + <link rel="search" type="application/opensearchdescription+xml" title="Gnowledge Studio" href="{% url gstudio_opensearch %}" /> + <link rel="alternate" type="application/rss+xml" title="{% trans "RSS Feed of latest nodetypes" %}" href="{% url gstudio_nodetype_latest_feed %}" /> + {% get_archives_nodetypes "gstudio/tags/archives_nodetypes_link.html" %} +{% endblock %} + +{% block breadcrumbs %} + {% gstudio_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/comments/comment_authors_email.txt b/gstudio/templates/comments/comment_authors_email.txt new file mode 100644 index 0000000..e32c876 --- /dev/null +++ b/gstudio/templates/comments/comment_authors_email.txt @@ -0,0 +1,6 @@ +{% load i18n %}{% trans "Author" %}: {{ comment.userinfo.name }} {{ comment.userinfo.url }} + +{% trans "Comment" %}: +{{ comment.comment }} + +{% trans "View this comment" %}: {{ protocol }}://{{ site }}{{ content_object.get_absolute_url }}#comment_{{ comment.pk }} diff --git a/gstudio/templates/comments/comment_notification_email.txt b/gstudio/templates/comments/comment_notification_email.txt new file mode 100644 index 0000000..996166b --- /dev/null +++ b/gstudio/templates/comments/comment_notification_email.txt @@ -0,0 +1,14 @@ +{% load i18n %}{% trans "Author" %}: {{ comment.userinfo.name }} {{ comment.userinfo.url }} +{% trans "Email" %}: {{ comment.userinfo.email }} +{% trans "IP" %}: {{ comment.ip_address }} + +{% trans "Comment" %}: +{{ comment.comment }} + +{% trans "View this comment" %}: {{ protocol }}://{{ site }}{{ content_object.get_absolute_url }}#comment_{{ comment.pk }} + +{% trans "Flag this comment" %}: {{ protocol }}://{{ site }}{% url comments-flag comment.pk %} + +{% trans "Delete this comment" %}: {{ protocol }}://{{ site }}{% url comments-delete comment.pk %} + +{% trans "Approve this comment" %}: {{ protocol }}://{{ site }}{% url comments-approve comment.pk %} diff --git a/gstudio/templates/comments/comment_reply_email.txt b/gstudio/templates/comments/comment_reply_email.txt new file mode 100644 index 0000000..e32c876 --- /dev/null +++ b/gstudio/templates/comments/comment_reply_email.txt @@ -0,0 +1,6 @@ +{% load i18n %}{% trans "Author" %}: {{ comment.userinfo.name }} {{ comment.userinfo.url }} + +{% trans "Comment" %}: +{{ comment.comment }} + +{% trans "View this comment" %}: {{ protocol }}://{{ site }}{{ content_object.get_absolute_url }}#comment_{{ comment.pk }} diff --git a/gstudio/templates/comments/gstudio/nodetype/form.html b/gstudio/templates/comments/gstudio/nodetype/form.html new file mode 100644 index 0000000..8d5e27d --- /dev/null +++ b/gstudio/templates/comments/gstudio/nodetype/form.html @@ -0,0 +1,22 @@ +{% load comments i18n %} + +<form action="{% comment_form_target %}" method="post"> + {% csrf_token %} + <fieldset> + <input type="hidden" name="next" value="{% url gstudio_discussion_success %}"/> + <legend>{% trans "Post your comment" %}</legend> + {% for field in form %} + {% if field.is_hidden %}{{ field }}{% else %} + <div{% if field.errors %} class="error"{% endif %}{% ifequal field.name "honeypot" %} style="display:none;"{% endifequal %}> + {{ field.label_tag }} + {% if field.errors %}{{ field.errors }}{% else %}<br />{% endif %} + {{ field }} + </div> + {% endif %} + {% endfor %} + <p class="submit"> + <input type="submit" name="submit" class="submit-post" value="{% trans "Post" %}" /> + <input type="submit" name="preview" class="submit-preview" value="{% trans "Preview" %}" /> + </p> + </fieldset> +</form> diff --git a/gstudio/templates/comments/gstudio/nodetype/posted.html b/gstudio/templates/comments/gstudio/nodetype/posted.html new file mode 100644 index 0000000..f54134f --- /dev/null +++ b/gstudio/templates/comments/gstudio/nodetype/posted.html @@ -0,0 +1,13 @@ +{% extends "gstudio/base.html" %} +{% load i18n %} + +{% block title %}{% trans "Thanks for your comment" %}{% endblock %} + +{% block content %} +<h2>{% trans "Thanks for your comment" %}</h2> +<p> + <a href="{% url gstudio_nodetype_archive_index %}" title="{% trans "Return to nodetype list" %}"> + {% trans "Return to nodetype list" %} + </a> +</p> +{% endblock %} diff --git a/gstudio/templates/comments/gstudio_nodetype_preview.html b/gstudio/templates/comments/gstudio_nodetype_preview.html new file mode 100644 index 0000000..d360568 --- /dev/null +++ b/gstudio/templates/comments/gstudio_nodetype_preview.html @@ -0,0 +1,37 @@ +{% extends "gstudio/base.html" %} +{% load i18n gstudio_tags comments %} + +{% block title %}{% trans "Comment preview" %}{% endblock %} + +{% block content %} + {% if form.errors %} + <h2> + {% blocktrans count form.errors|length as errors %}Please correct following error.{% plural %}Please correct following errors.{% endblocktrans %} + </h2> + {% else %} + <h2>{% trans "Preview of the comment" %}</h2> + <ol id="comment-list" class="span-15 last"> + <li id="comment_preview" class="comment vcard {% cycle box1,box2 %} span-15 last"> + <div class="span-2"> + <img src="{% get_gravatar form.cleaned_data.email 60 "G" %}" class="gravatar photo" alt="form.cleaned_data.name" /> + </div> + <div class="comment-body span-13 last"> + <div class="comment-author span-13 last"> + {% if form.cleaned_data.url %} + <a href="{{ form.cleaned_data.url }}" class="fn url">{{ form.cleaned_data.name }}</a> + {% else %} + {{ form.cleaned_data.name }} + {% endif %} + {% trans "on" %} {% now "m/d/Y P" %} + </div> + <div class="span-13 last"> + {{ comment|linebreaks }} + </div> + </div> + </li> + </ol> + {% endif %} + <div class="commentForm span-16 last"> + {% include "comments/gstudio/nodetype/form.html" %} + </div> +{% endblock %} diff --git a/gstudio/templates/feeds/comment_description.html b/gstudio/templates/feeds/comment_description.html new file mode 100644 index 0000000..8141388 --- /dev/null +++ b/gstudio/templates/feeds/comment_description.html @@ -0,0 +1 @@ +{{ obj.comment }} diff --git a/gstudio/templates/feeds/comment_title.html b/gstudio/templates/feeds/comment_title.html new file mode 100644 index 0000000..f9ee8ab --- /dev/null +++ b/gstudio/templates/feeds/comment_title.html @@ -0,0 +1,2 @@ +{% load i18n %} +{{ obj.user_name }} {% trans "on" %} {{ obj.submit_date|date:"DATETIME_FORMAT" }} diff --git a/gstudio/templates/feeds/discussion_description.html b/gstudio/templates/feeds/discussion_description.html new file mode 100644 index 0000000..8141388 --- /dev/null +++ b/gstudio/templates/feeds/discussion_description.html @@ -0,0 +1 @@ +{{ obj.comment }} diff --git a/gstudio/templates/feeds/discussion_title.html b/gstudio/templates/feeds/discussion_title.html new file mode 100644 index 0000000..f9ee8ab --- /dev/null +++ b/gstudio/templates/feeds/discussion_title.html @@ -0,0 +1,2 @@ +{% load i18n %} +{{ obj.user_name }} {% trans "on" %} {{ obj.submit_date|date:"DATETIME_FORMAT" }} diff --git a/gstudio/templates/feeds/nodetype_description.html b/gstudio/templates/feeds/nodetype_description.html new file mode 100644 index 0000000..7afb28a --- /dev/null +++ b/gstudio/templates/feeds/nodetype_description.html @@ -0,0 +1 @@ +{{ obj.html_content|safe }} diff --git a/gstudio/templates/feeds/nodetype_title.html b/gstudio/templates/feeds/nodetype_title.html new file mode 100644 index 0000000..91b32ca --- /dev/null +++ b/gstudio/templates/feeds/nodetype_title.html @@ -0,0 +1 @@ +{{ obj.title|safe }} diff --git a/gstudio/templates/feeds/pingback_description.html b/gstudio/templates/feeds/pingback_description.html new file mode 100644 index 0000000..8141388 --- /dev/null +++ b/gstudio/templates/feeds/pingback_description.html @@ -0,0 +1 @@ +{{ obj.comment }} diff --git a/gstudio/templates/feeds/pingback_title.html b/gstudio/templates/feeds/pingback_title.html new file mode 100644 index 0000000..f9ee8ab --- /dev/null +++ b/gstudio/templates/feeds/pingback_title.html @@ -0,0 +1,2 @@ +{% load i18n %} +{{ obj.user_name }} {% trans "on" %} {{ obj.submit_date|date:"DATETIME_FORMAT" }} diff --git a/gstudio/templates/feeds/trackback_description.html b/gstudio/templates/feeds/trackback_description.html new file mode 100644 index 0000000..8141388 --- /dev/null +++ b/gstudio/templates/feeds/trackback_description.html @@ -0,0 +1 @@ +{{ obj.comment }} diff --git a/gstudio/templates/feeds/trackback_title.html b/gstudio/templates/feeds/trackback_title.html new file mode 100644 index 0000000..f9ee8ab --- /dev/null +++ b/gstudio/templates/feeds/trackback_title.html @@ -0,0 +1,2 @@ +{% load i18n %} +{{ obj.user_name }} {% trans "on" %} {{ obj.submit_date|date:"DATETIME_FORMAT" }} 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> diff --git a/gstudio/templates/gstudiodashboard/dashboard.html b/gstudio/templates/gstudiodashboard/dashboard.html new file mode 100644 index 0000000..d70c451 --- /dev/null +++ b/gstudio/templates/gstudiodashboard/dashboard.html @@ -0,0 +1,40 @@ +{% extends "gstudio/base.html" %} +{% load i18n %} + +{% block content %} + {% if user.is_authenticated %} + <h1>Welcome {% firstof user.first_name user.username %}</h1> + <h2>Gstudio</h2> + <ul> + <li><a href="{{get_absoulute_url}}/gstudio/add/metatype">{% trans 'Add Metatype' %}</a></li> + <li><a href="{{get_absoulute_url}}/gstudio/add/metatype">{% trans 'Add Metatype' %}</a></li> + <li><a href="{{get_absoulute_url}}/gstudio/add/objecttype">{% trans 'Add Object type' %}</a></li> + <li><a href="{{get_absoulute_url}}/gstudio/add/relationtype">{% trans 'Add Relation type' %}</a></li> + <li><a href="{{get_absoulute_url}}/gstudio/add/attributetype">{% trans 'Add Attribute Type' %}</a></li> + <li><a href="{{get_absoulute_url}}/gstudio/add/systemtype">{% trans 'Add System Type' %}</li> + <li><a href="{{get_absoulute_url}}/gstudio/add/processtype">{% trans 'Add Process Type' %}</li> + <li><a href="{{get_absoulute_url}}/gstudio/add/attribute">{% trans 'Add Attribute' %}</li> + <li><a href="{{get_absoulute_url}}/gstudio/add/relation">{% trans 'Add Relation' %}</li> + <li><a href="{{get_absoulute_url}}/gstudio/add/complement">{% trans 'Add Complement' %}</li> + <li><a href="{{get_absoulute_url}}/gstudio/add/intersection">{% trans 'Add Intersection' %}</li> + <li><a href="{{get_absoulute_url}}/gstudio/add/union">{% trans 'Add Union' %}</li> + </ul> + <h2>Objects</h2> + <ul> + <li><a href="{{get_absoulute_url}}/objects/add/gbobject">{% trans 'Add Object' %}</a></li> + <li><a href="{{get_absoulute_url}}/objects/add/system">{% trans 'Add System' %}</a></li> + <li><a href="{{get_absoulute_url}}/objects/add/process">{% trans 'Add Process' %}</a></li> + </ul> + + + {% else %} + <h2>Sorry either you are not logged in or dont have permission to view this content</h2> + <a href="{{get_absoulute_url}}/accounts/login">{% trans 'Login' %}</a><br> + <a href="{{get_absoulute_url}}/accounts/register">{% trans 'Register' %}</a><br> + {% endif %} + + + + + +{% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudioattributeform.html b/gstudio/templates/gstudioforms/gstudioattributeform.html new file mode 100644 index 0000000..6779ab5 --- /dev/null +++ b/gstudio/templates/gstudioforms/gstudioattributeform.html @@ -0,0 +1,21 @@ +{% extends "gstudio/base.html" %} +{% load i18n %} + +{% block content %} +<form method="post" action="."> +{% csrf_token %} +<h2>Form to add attributes</h2> +{% for field in formset %} + + {{ field.label_tag }}:{{ field }}<br> + {{field.help_text}}<br> + {{ field.errors }}<br> + + +{% endfor %} + + <input type="Submit" value="{% trans 'ADD' %}" /> + <input type="hidden" name="next" value="{{ next }}" /> +</form> + +{% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudioattributetypeform.html b/gstudio/templates/gstudioforms/gstudioattributetypeform.html new file mode 100644 index 0000000..7b5529f --- /dev/null +++ b/gstudio/templates/gstudioforms/gstudioattributetypeform.html @@ -0,0 +1,21 @@ +{% extends "gstudio/base.html" %} +{% load i18n %} + +{% block content %} +<form method="post" action="."> +{% csrf_token %} +<h2>Form to add Attributetypes</h2> +{% for field in formset %} + + {{ field.label_tag }}:{{ field }}<br> + {{field.help_text}}<br> + {{ field.errors }}<br> + + +{% endfor %} + + <input type="Submit" value="{% trans 'ADD' %}" /> + <input type="hidden" name="next" value="{{ next }}" /> +</form> + +{% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudiocomplementform.html b/gstudio/templates/gstudioforms/gstudiocomplementform.html new file mode 100644 index 0000000..4304d24 --- /dev/null +++ b/gstudio/templates/gstudioforms/gstudiocomplementform.html @@ -0,0 +1,21 @@ +{% extends "gstudio/base.html" %} +{% load i18n %} + +{% block content %} +<form method="post" action="."> +{% csrf_token %} +<h2>Form to add Complements</h2> +{% for field in formset %} + + {{ field.label_tag }}:{{ field }}<br> + {{field.help_text}}<br> + {{ field.errors }}<br> + + +{% endfor %} + + <input type="Submit" value="{% trans 'ADD' %}" /> + <input type="hidden" name="next" value="{{ next }}" /> +</form> + +{% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudiointersectionform.html b/gstudio/templates/gstudioforms/gstudiointersectionform.html new file mode 100644 index 0000000..71533ff --- /dev/null +++ b/gstudio/templates/gstudioforms/gstudiointersectionform.html @@ -0,0 +1,21 @@ +{% extends "gstudio/base.html" %} +{% load i18n %} + +{% block content %} +<form method="post" action="."> +{% csrf_token %} +<h2>Form to add Intersection</h2> +{% for field in formset %} + + {{ field.label_tag }}:{{ field }}<br> + {{field.help_text}}<br> + {{ field.errors }}<br> + + +{% endfor %} + + <input type="Submit" value="{% trans 'ADD' %}" /> + <input type="hidden" name="next" value="{{ next }}" /> +</form> + +{% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudiometatypeform.html b/gstudio/templates/gstudioforms/gstudiometatypeform.html new file mode 100644 index 0000000..b86b50e --- /dev/null +++ b/gstudio/templates/gstudioforms/gstudiometatypeform.html @@ -0,0 +1,22 @@ +{% extends "gstudio/base.html" %} +{% load i18n %} + +{% block content %} +<form method="post" action="."> +{% csrf_token %} +<h2>Form to add Metatypes</h2> +{% for field in formset %} + + {{ field.label_tag }}:{{ field }}<br> + {{field.help_text}}<br> + {{ field.errors }}<br> + + +{% endfor %} + + + <input type="Submit" value="{% trans 'ADD' %}" /> + <input type="hidden" name="next" value="{{ next }}" /> +</form> + +{% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudioobjecttypeform.html b/gstudio/templates/gstudioforms/gstudioobjecttypeform.html new file mode 100644 index 0000000..c4d8bcb --- /dev/null +++ b/gstudio/templates/gstudioforms/gstudioobjecttypeform.html @@ -0,0 +1,21 @@ +{% extends "gstudio/base.html" %} +{% load i18n %} + +{% block content %} +<form method="post" action="."> +{% csrf_token %} +<h2>Form to add Objecttypes</h2> +{% for field in formset %} + + {{ field.label_tag }}:{{ field }}<br> + {{field.help_text}}<br> + {{ field.errors }}<br> + + +{% endfor %} + + <input type="Submit" value="{% trans 'ADD' %}" /> + <input type="hidden" name="next" value="{{ next }}" /> +</form> + +{% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudioprocesstypeform.html b/gstudio/templates/gstudioforms/gstudioprocesstypeform.html new file mode 100644 index 0000000..0093959 --- /dev/null +++ b/gstudio/templates/gstudioforms/gstudioprocesstypeform.html @@ -0,0 +1,20 @@ +{% extends "gstudio/base.html" %} +{% load i18n %} + +{% block content %} +<form method="post" action="."> +{% csrf_token %} +<h2>Form to add Processtypes</h2> +{% for field in formset %} + + {{ field.label_tag }}:{{ field }}<br> + {{field.help_text}}<br> + {{ field.errors }}<br> + +{% endfor %} + + <input type="Submit" value="{% trans 'ADD' %}" /> + <input type="hidden" name="next" value="{{ next }}" /> +</form> + +{% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudiorelationform.html b/gstudio/templates/gstudioforms/gstudiorelationform.html new file mode 100644 index 0000000..b87d6a0 --- /dev/null +++ b/gstudio/templates/gstudioforms/gstudiorelationform.html @@ -0,0 +1,21 @@ +{% extends "gstudio/base.html" %} +{% load i18n %} + +{% block content %} +<form method="post" action="."> +{% csrf_token %} +<h2>Form to add Relations</h2> +{% for field in formset %} + + {{ field.label_tag }}:{{ field }}<br> + {{field.help_text}}<br> + {{ field.errors }}<br> + + +{% endfor %} + + <input type="Submit" value="{% trans 'ADD' %}" /> + <input type="hidden" name="next" value="{{ next }}" /> +</form> + +{% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudiorelationtypeform.html b/gstudio/templates/gstudioforms/gstudiorelationtypeform.html new file mode 100644 index 0000000..947e0e0 --- /dev/null +++ b/gstudio/templates/gstudioforms/gstudiorelationtypeform.html @@ -0,0 +1,20 @@ +{% extends "gstudio/base.html" %} +{% load i18n %} + +{% block content %} +<form method="post" action="."> +{% csrf_token %} +<h2>Form to add Relationtypes</h2> +{% for field in formset %} + + {{ field.label_tag }}:{{ field }}<br> + {{field.help_text}}<br> + {{ field.errors }}<br> + +{% endfor %} + + <input type="Submit" value="{% trans 'ADD' %}" /> + <input type="hidden" name="next" value="{{ next }}" /> +</form> + +{% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudiosystemtypeform.html b/gstudio/templates/gstudioforms/gstudiosystemtypeform.html new file mode 100644 index 0000000..c2238f1 --- /dev/null +++ b/gstudio/templates/gstudioforms/gstudiosystemtypeform.html @@ -0,0 +1,21 @@ +{% extends "gstudio/base.html" %} +{% load i18n %} + +{% block content %} +<form method="post" action="."> +{% csrf_token %} +<h2>Form to add Systemtypes</h2> +{% for field in formset %} + + {{ field.label_tag }}:{{ field }}<br> + {{field.help_text}}<br> + {{ field.errors }}<br> + + +{% endfor %} + + <input type="Submit" value="{% trans 'ADD' %}" /> + <input type="hidden" name="next" value="{{ next }}" /> +</form> + +{% endblock %} diff --git a/gstudio/templates/gstudioforms/gstudiounionform.html b/gstudio/templates/gstudioforms/gstudiounionform.html new file mode 100644 index 0000000..7d7ec4d --- /dev/null +++ b/gstudio/templates/gstudioforms/gstudiounionform.html @@ -0,0 +1,21 @@ +{% extends "gstudio/base.html" %} +{% load i18n %} + +{% block content %} +<form method="post" action="."> +{% csrf_token %} +<h2>Form to add unions</h2> +{% for field in formset %} + + {{ field.label_tag }}:{{ field }}<br> + {{field.help_text}}<br> + {{ field.errors }}<br> + + +{% endfor %} + + <input type="Submit" value="{% trans 'ADD' %}" /> + <input type="hidden" name="next" value="{{ next }}" /> +</form> + +{% endblock %} diff --git a/gstudio/templates/index.html b/gstudio/templates/index.html new file mode 100644 index 0000000..9a13184 --- /dev/null +++ b/gstudio/templates/index.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} +Index page +{% endblock %} diff --git a/gstudio/templates/registration/activate.html b/gstudio/templates/registration/activate.html new file mode 100644 index 0000000..e85121e --- /dev/null +++ b/gstudio/templates/registration/activate.html @@ -0,0 +1,18 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} + +{% if account %} + +<p>{% trans "Account successfully activated" %}</p> + +<p><a href="{% url auth_login %}">{% trans "Log in" %}</a></p> + +{% else %} + +<p>{% trans "Account activation failed" %}</p> + +{% endif %} + +{% endblock %} diff --git a/gstudio/templates/registration/activation_email.txt b/gstudio/templates/registration/activation_email.txt new file mode 100644 index 0000000..b300359 --- /dev/null +++ b/gstudio/templates/registration/activation_email.txt @@ -0,0 +1,6 @@ +{% load i18n %} +{% trans "Activate account at" %} {{ site.name }}: + +http://{{ site.domain }}{% url registration_activate activation_key %} + +{% blocktrans %}Link is valid for {{ expiration_days }} days.{% endblocktrans %} diff --git a/gstudio/templates/registration/activation_email_subject.txt b/gstudio/templates/registration/activation_email_subject.txt new file mode 100644 index 0000000..24f477c --- /dev/null +++ b/gstudio/templates/registration/activation_email_subject.txt @@ -0,0 +1 @@ +{% load i18n %}{% trans "Account activation on" %} {{ site.name }} diff --git a/gstudio/templates/registration/login.html b/gstudio/templates/registration/login.html new file mode 100644 index 0000000..4e0d763 --- /dev/null +++ b/gstudio/templates/registration/login.html @@ -0,0 +1,14 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} +<form method="post" action="."> +{% csrf_token %} {{ form.as_p }} + + <input type="submit" value="{% trans 'Log in' %}" /> + <input type="hidden" name="next" value="{{ next }}" /> +</form> + +<p>{% trans "Forgot password" %}? <a href="{% url auth_password_reset %}">{% trans "Reset it" %}</a>!</p> +<p>{% trans "Not member" %}? <a href="{% url registration_register %}">{% trans "Register" %}</a>!</p> +{% endblock %} diff --git a/gstudio/templates/registration/logout.html b/gstudio/templates/registration/logout.html new file mode 100644 index 0000000..fe17eba --- /dev/null +++ b/gstudio/templates/registration/logout.html @@ -0,0 +1,7 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} +<p>{% trans "Logged out" %}</p> + <a href="{{get_absoulute_url}}/accounts/login/">{% trans 'Login again' %}</a> +{% endblock %} diff --git a/gstudio/templates/registration/password_change_done.html b/gstudio/templates/registration/password_change_done.html new file mode 100644 index 0000000..659be0a --- /dev/null +++ b/gstudio/templates/registration/password_change_done.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} +<p>{% trans "Password changed" %}</p> +{% endblock %} diff --git a/gstudio/templates/registration/password_change_form.html b/gstudio/templates/registration/password_change_form.html new file mode 100644 index 0000000..a640aa6 --- /dev/null +++ b/gstudio/templates/registration/password_change_form.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} +<form method="post" action="."> +{% csrf_token %} {{ form.as_p }} + + <input type="submit" value="{% trans 'Submit' %}" /> +</form> +{% endblock %} diff --git a/gstudio/templates/registration/password_reset_complete.html b/gstudio/templates/registration/password_reset_complete.html new file mode 100644 index 0000000..ef3637c --- /dev/null +++ b/gstudio/templates/registration/password_reset_complete.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} + +<p>{% trans "Password reset successfully" %}</p> + +<p><a href="{% url auth_login %}">{% trans "Log in" %}</a></p> + +{% endblock %} diff --git a/gstudio/templates/registration/password_reset_confirm.html b/gstudio/templates/registration/password_reset_confirm.html new file mode 100644 index 0000000..3990f06 --- /dev/null +++ b/gstudio/templates/registration/password_reset_confirm.html @@ -0,0 +1,20 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} + +{% if validlink %} + +<form method="post" action="."> +{% csrf_token %} {{ form.as_p }} + + <input type="submit" value="{% trans 'Submit' %}" /> +</form> + +{% else %} + +<p>{% trans "Password reset failed" %}</p> + +{% endif %} + +{% endblock %} diff --git a/gstudio/templates/registration/password_reset_done.html b/gstudio/templates/registration/password_reset_done.html new file mode 100644 index 0000000..6057ccb --- /dev/null +++ b/gstudio/templates/registration/password_reset_done.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} +<p>{% trans "Email with password reset instructions has been sent." %}</p> +{% endblock %} diff --git a/gstudio/templates/registration/password_reset_email.html b/gstudio/templates/registration/password_reset_email.html new file mode 100644 index 0000000..a55c869 --- /dev/null +++ b/gstudio/templates/registration/password_reset_email.html @@ -0,0 +1,5 @@ +{% load i18n %} +{% blocktrans %}Reset password at {{ site_name }}{% endblocktrans %}: +{% block reset_link %} +{{ protocol }}://{{ domain }}{% url auth_password_reset_confirm uidb36=uid, token=token %} +{% endblock %} diff --git a/gstudio/templates/registration/password_reset_form.html b/gstudio/templates/registration/password_reset_form.html new file mode 100644 index 0000000..a640aa6 --- /dev/null +++ b/gstudio/templates/registration/password_reset_form.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} +<form method="post" action="."> +{% csrf_token %} {{ form.as_p }} + + <input type="submit" value="{% trans 'Submit' %}" /> +</form> +{% endblock %} diff --git a/gstudio/templates/registration/registration_complete.html b/gstudio/templates/registration/registration_complete.html new file mode 100644 index 0000000..3d3d950 --- /dev/null +++ b/gstudio/templates/registration/registration_complete.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} +<p>{% trans "You are now registered. Activation email sent." %}</p> +{% endblock %} diff --git a/gstudio/templates/registration/registration_form.html b/gstudio/templates/registration/registration_form.html new file mode 100644 index 0000000..a640aa6 --- /dev/null +++ b/gstudio/templates/registration/registration_form.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} +<form method="post" action="."> +{% csrf_token %} {{ form.as_p }} + + <input type="submit" value="{% trans 'Submit' %}" /> +</form> +{% endblock %} diff --git a/gstudio/templates/skeleton.html b/gstudio/templates/skeleton.html new file mode 100644 index 0000000..8261123 --- /dev/null +++ b/gstudio/templates/skeleton.html @@ -0,0 +1,73 @@ +{% load gstudio_tags i18n %} +{% get_tags as objecttype_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> + <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, {{ objecttype_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_objecttype_archive_index %}" /> + <link rel="stylesheet" type="text/css" media="screen, projection" href="{{ STATIC_URL }}gstudio/css/screen.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="container"> + + <blockquote> + <h3>A workspace for constructing and publishing knowledge networks.</h3> + </blockquote> + <div id="breadcrumbs" class="span-24 last"> + / {% block breadcrumbs %}{% endblock %} + </div> + </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" class="span-8 last"> + <div class="welcome"> + <h3>Welcome!</h3> + <p> + This application is an attempt to collaborative + framework for online construction and publication of + knowledge networks and ontologies. + </p> + <p> + Currently gnowledge studio provides support for + Metatypes, Objecttypes, Objects, Relationtypes, + Relations, Attributetypes, Attributes, Systemtypes, + Systems, Processtypes, and Processes. + + <a href="http://sbox.gnowledge.org/accounts/register">Register</a> + at this sandbox site to see the gnowledge studio. + </p> + </div> + {% block sidebar %} + {% endblock %} + </div> + </div> + <div id="footer" class="span-24 last"> + <p>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> + </div> + </body> +</html> + + |