summaryrefslogtreecommitdiff
path: root/app/lib/grappelli/templates/admin_doc
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2012-09-22 22:27:04 -0400
committerluxagraf <sng@luxagraf.net>2012-09-22 22:27:04 -0400
commitefb623af0bcb47d510501c282e1326b11343a29c (patch)
tree3a35fb19f5eba3b219c65277a5fb712cbe9604ac /app/lib/grappelli/templates/admin_doc
parent0b481fd7931c2ae20ca21f89a87f2ba6a6c01e10 (diff)
site reorg
Diffstat (limited to 'app/lib/grappelli/templates/admin_doc')
-rw-r--r--app/lib/grappelli/templates/admin_doc/bookmarklets.html37
-rw-r--r--app/lib/grappelli/templates/admin_doc/index.html34
-rw-r--r--app/lib/grappelli/templates/admin_doc/missing_docutils.html14
-rw-r--r--app/lib/grappelli/templates/admin_doc/model_detail.html51
-rw-r--r--app/lib/grappelli/templates/admin_doc/model_index.html45
-rw-r--r--app/lib/grappelli/templates/admin_doc/template_detail.html21
-rw-r--r--app/lib/grappelli/templates/admin_doc/template_filter_index.html47
-rw-r--r--app/lib/grappelli/templates/admin_doc/template_tag_index.html48
-rw-r--r--app/lib/grappelli/templates/admin_doc/view_detail.html30
-rw-r--r--app/lib/grappelli/templates/admin_doc/view_index.html46
10 files changed, 373 insertions, 0 deletions
diff --git a/app/lib/grappelli/templates/admin_doc/bookmarklets.html b/app/lib/grappelli/templates/admin_doc/bookmarklets.html
new file mode 100644
index 0000000..7eba0be
--- /dev/null
+++ b/app/lib/grappelli/templates/admin_doc/bookmarklets.html
@@ -0,0 +1,37 @@
+{% extends "admin/base_site.html" %}
+{% load adminmedia %}
+{% load i18n %}
+{% block bodyclass %}documentation{% endblock %}
+{% block content-class %}content-grid{% endblock %}
+{% block breadcrumbs %}{% load i18n %}<div id="breadcrumbs"><a href="../../">{% trans "Home" %}</a> &rsaquo; <a href="../">{% trans "Documentation" %}</a> &rsaquo; {% trans "Bookmarklets" %}</div>{% endblock %}
+{% block title %}{% trans "Documentation bookmarklets" %}{% endblock %}
+
+{% block content %}
+ <h1>{% trans "Bookmarklets" %}</h1>
+ <div class="container-grid rte">
+ {% blocktrans %}
+ <p>To install bookmarklets, drag the link to your bookmarks
+ toolbar, or right-click the link and add it to your bookmarks. Now you can
+ select the bookmarklet from any page in the site. Note that some of these
+ bookmarklets require you to be viewing the site from a computer designated
+ as "internal" (talk to your system administrator if you aren't sure if
+ your computer is "internal").</p>
+ {% endblocktrans %}
+ <div class="module">
+ <h2><a href="javascript:(function(){if(typeof ActiveXObject!='undefined'){x=new ActiveXObject('Microsoft.XMLHTTP')}else if(typeof XMLHttpRequest!='undefined'){x=new XMLHttpRequest()}else{return;}x.open('HEAD',location.href,false);x.send(null);try{view=x.getResponseHeader('x-view');}catch(e){alert('No view found for this page');return;}if(view=='undefined'){alert('No view found for this page');}document.location='{{ admin_url }}doc/views/'+view+'/';})()">{% trans "Documentation for this page" %}</a></h2>
+ <p>{% trans "Jumps you from any page to the documentation for the view that generates that page." %}</p>
+ </div>
+ <div class="module">
+ <h2><a href="javascript:(function(){if(typeof ActiveXObject!='undefined'){x=new ActiveXObject('Microsoft.XMLHTTP')}else if(typeof XMLHttpRequest!='undefined'){x=new XMLHttpRequest()}else{return;}x.open('GET',location.href,false);x.send(null);try{type=x.getResponseHeader('x-object-type');id=x.getResponseHeader('x-object-id');}catch(e){type='(none)';id='(none)';}d=document;b=d.body;e=d.createElement('div');e.id='xxxhhh';s=e.style;s.position='absolute';s.left='10px';s.top='10px';s.font='10px monospace';s.border='1px black solid';s.padding='4px';s.backgroundColor='#eee';e.appendChild(d.createTextNode('Type: '+type));e.appendChild(d.createElement('br'));e.appendChild(d.createTextNode('ID: '+id));e.appendChild(d.createElement('br'));l=d.createElement('a');l.href='#';l.onclick=function(){b.removeChild(e);};l.appendChild(d.createTextNode('[close]'));l.style.textDecoration='none';e.appendChild(l);b.appendChild(e);})();">{% trans "Show object ID" %}</a></h2>
+ <p>{% trans "Shows the content-type and unique ID for pages that represent a single object." %}</p>
+ </div>
+ <div class="module">
+ <h2><a href="javascript:(function(){if(typeof ActiveXObject!='undefined'){var x=new ActiveXObject('Microsoft.XMLHTTP')}else if(typeof XMLHttpRequest!='undefined'){var x=new XMLHttpRequest()}else{return;}x.open('GET',location.href,false);x.send(null);try{var type=x.getResponseHeader('x-object-type');var id=x.getResponseHeader('x-object-id');}catch(e){return;}document.location='{{ admin_url }}'+type.split('.').join('/')+'/'+id+'/';})()">{% trans "Edit this object (current window)" %}</a></h2>
+ <p>{% trans "Jumps to the admin page for pages that represent a single object." %}</p>
+ </div>
+ <div class="module">
+ <h2><a href="javascript:(function(){if(typeof ActiveXObject!='undefined'){var x=new ActiveXObject('Microsoft.XMLHTTP')}else if(typeof XMLHttpRequest!='undefined'){var x=new XMLHttpRequest()}else{return;}x.open('GET',location.href,false);x.send(null);try{var type=x.getResponseHeader('x-object-type');var id=x.getResponseHeader('x-object-id');}catch(e){return;}window.open('{{ admin_url }}'+type.split('.').join('/')+'/'+id+'/');})()">{% trans "Edit this object (new window)" %}</a></h2>
+ <p>{% trans "As above, but opens the admin page in a new window." %}</p>
+ </div>
+ </div>
+{% endblock %}
diff --git a/app/lib/grappelli/templates/admin_doc/index.html b/app/lib/grappelli/templates/admin_doc/index.html
new file mode 100644
index 0000000..0260106
--- /dev/null
+++ b/app/lib/grappelli/templates/admin_doc/index.html
@@ -0,0 +1,34 @@
+{% extends "admin/base_site.html" %}
+{% load adminmedia %}
+{% load i18n %}
+{% block bodyclass %}documentation{% endblock %}
+{% block content-class %}content-grid{% endblock %}
+{% block breadcrumbs %}<div id="breadcrumbs"><a href="{{ root_path }}">Home</a> &rsaquo; Documentation</div>{% endblock %}
+{% block title %}Documentation{% endblock %}
+
+{% block content %}
+ <h1>Documentation</h1>
+ <div class="container-grid rte">
+ <div class="module">
+ <h2><a href="tags/">Tags</a></h2>
+ <p>List of all the template tags and their functions.</p>
+ </div>
+ <div class="module">
+ <h2><a href="filters/">Filters</a></h2>
+ <p>Filters are actions which can be applied to variables in a template to alter the output.</p>
+ </div>
+ <div class="module">
+ <h2><a href="models/">Models</a></h2>
+ <p>Models are descriptions of all the objects in the system and their associated fields. Each model has a list of fields which can be accessed as template variables.</p>
+ </div>
+ <div class="module">
+ <h2><a href="views/">Views</a></h2>
+ <p>Each page on the public site is generated by a view. The view defines which template is used to generate the page and which objects are available to that template.</p>
+ </div>
+ <div class="module">
+ <h2><a href="bookmarklets/">Bookmarklets</a></h2>
+ <p>Tools for your browser to quickly access admin functionality.</p>
+ </div>
+ </div>
+{% endblock %}
+
diff --git a/app/lib/grappelli/templates/admin_doc/missing_docutils.html b/app/lib/grappelli/templates/admin_doc/missing_docutils.html
new file mode 100644
index 0000000..47488a2
--- /dev/null
+++ b/app/lib/grappelli/templates/admin_doc/missing_docutils.html
@@ -0,0 +1,14 @@
+{% extends "admin/base_site.html" %}
+{% load adminmedia %}
+{% load i18n %}
+{% block bodyclass %}documentation{% endblock %}
+{% block breadcrumbs %}<div id="breadcrumbs"><a href="../">Home</a> &rsaquo; Documentation</div>{% endblock %}
+{% block title %}Please install docutils{% endblock %}
+
+{% block content %}
+ <h1>Documentation</h1>
+ <div id="content-main">
+ <h3>The admin documentation system requires Python's <a href="http://docutils.sf.net/">docutils</a> library.</h3>
+ <p>Please ask your administrators to install <a href="http://docutils.sf.net/">docutils</a>.</p>
+ </div>
+{% endblock %}
diff --git a/app/lib/grappelli/templates/admin_doc/model_detail.html b/app/lib/grappelli/templates/admin_doc/model_detail.html
new file mode 100644
index 0000000..85593f0
--- /dev/null
+++ b/app/lib/grappelli/templates/admin_doc/model_detail.html
@@ -0,0 +1,51 @@
+{% extends "admin/base_site.html" %}
+{% load adminmedia %}
+{% load i18n %}
+{% block javascripts %}
+ {{ block.super }}
+ <script type="text/javascript">
+ (function($) {
+ $(document).ready(function(){
+ $('.rte .module').each(function(){
+ var childWidth = $('.rte .module').children("table").outerWidth();
+ $('.rte .module').css("width", childWidth);
+ });
+ });
+ })(django.jQuery);
+ </script>
+{% endblock %}
+{% block bodyclass %}documentation{% endblock %}
+{% block content-class %}content-grid{% endblock %}
+{% block breadcrumbs %}<div id="breadcrumbs"><a href="../../../">Home</a> &rsaquo; <a href="../../">Documentation</a> &rsaquo; <a href="../">Models</a> &rsaquo; {{ name }}</div>{% endblock %}
+
+{% block title %}Model: {{ name }}{% endblock %}
+
+{% block content %}
+ <h1>{{ summary }}</h1>
+ <div class="container-grid rte">
+ {% if description %}
+ <p>{% filter linebreaksbr %}{% trans description %}{% endfilter %}</p>
+ {% endif %}
+ <div class="module model">
+ <table class="model" style="width: auto">
+ <thead>
+ <tr>
+ <th>Field</th>
+ <th>Type</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for field in fields|dictsort:"name" %}
+ <tr>
+ <td class="nowrap focus">{{ field.name }}</td>
+ <td class="nowrap">{{ field.data_type }}</td>
+ <td>{{ field.verbose }}{% if field.help_text %} - {{ field.help_text|safe }}{% endif %}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ </div>
+ <a href="../" class="back">&lsaquo; Back to Models Documentation</a>
+ </div>
+{% endblock %}
diff --git a/app/lib/grappelli/templates/admin_doc/model_index.html b/app/lib/grappelli/templates/admin_doc/model_index.html
new file mode 100644
index 0000000..84a93f3
--- /dev/null
+++ b/app/lib/grappelli/templates/admin_doc/model_index.html
@@ -0,0 +1,45 @@
+{% extends "admin/base_site.html" %}
+{% load adminmedia %}
+{% load i18n %}
+{% block javascripts %}
+ {{ block.super }}
+ <script type="text/javascript" src="{% admin_media_prefix %}js/documentation.js"></script>
+{% endblock %}
+
+{% block bodyclass %}documentation model-index{% endblock %}
+{% block content-class %}content-grid{% endblock %}
+{% block breadcrumbs %}<div id="breadcrumbs"><a href="../../">Home</a> &rsaquo; <a href="../">Documentation</a> &rsaquo; Models</div>{% endblock %}
+
+{% block title %}Models{% endblock %}
+
+{% block content %}
+ <h1>Model documentation</h1>
+ {% regroup models by app_label as grouped_models %}
+ <div class="container-grid">
+ <div class="column span-6">
+ <div class="module table-of-contents">
+ <h2>Model groups</h2>
+ <ul>
+ {% regroup models by app_label as grouped_models %}
+ {% for group in grouped_models %}
+ <li><a href="#app-{{ group.grouper }}">{{ group.grouper|capfirst }}</a></li>
+ {% endfor %}
+ </ul>
+ </div>
+ </div>
+ <div class="column span-18 last rte">
+ {% for group in grouped_models %}
+ <div class="module">
+ <h2 id="app-{{ group.grouper }}">{{ group.grouper|capfirst }}</h2>
+ <table>
+ {% for model in group.list %}
+ <tr>
+ <th><a href="{{ model.app_label }}.{{ model.object_name.lower }}/">{{ model.object_name }}</a></th>
+ </tr>
+ {% endfor %}
+ </table>
+ </div>
+ {% endfor %}
+ </div>
+ </div>
+{% endblock %} \ No newline at end of file
diff --git a/app/lib/grappelli/templates/admin_doc/template_detail.html b/app/lib/grappelli/templates/admin_doc/template_detail.html
new file mode 100644
index 0000000..52935dd
--- /dev/null
+++ b/app/lib/grappelli/templates/admin_doc/template_detail.html
@@ -0,0 +1,21 @@
+{% extends "admin/base_site.html" %}
+{% load adminmedia %}
+{% load i18n %}
+{% block bodyclass %}documentation{% endblock %}
+{% block breadcrumbs %}<div id="breadcrumbs"><a href="../../../">Home</a> &rsaquo; <a href="../../">Documentation</a> &rsaquo; Templates &rsaquo; {{ name }}</div>{% endblock %}
+
+{% block title %}Template: {{ name }}{% endblock %}
+
+{% block content %}
+ <h1>Template: "{{ name }}"</h1>
+ {% regroup templates|dictsort:"site_id" by site as templates_by_site %}
+ {% for group in templates_by_site %}
+ <h2>Search path for template "{{ name }}" on {{ group.grouper }}:</h2>
+ <ol>
+ {% for template in group.list|dictsort:"order" %}
+ <li><code>{{ template.file }}</code>{% if not template.exists %} <em>(does not exist)</em>{% endif %}</li>
+ {% endfor %}
+ </ol>
+ {% endfor %}
+ <p class="small"><a href="../../">&lsaquo; Back to Documentation</a></p>
+{% endblock %}
diff --git a/app/lib/grappelli/templates/admin_doc/template_filter_index.html b/app/lib/grappelli/templates/admin_doc/template_filter_index.html
new file mode 100644
index 0000000..434679b
--- /dev/null
+++ b/app/lib/grappelli/templates/admin_doc/template_filter_index.html
@@ -0,0 +1,47 @@
+{% extends "admin/base_site.html" %}
+{% load adminmedia %}
+{% load i18n %}
+{% block javascripts %}
+ {{ block.super }}
+ <script type="text/javascript" src="{% admin_media_prefix %}js/documentation.js"></script>
+{% endblock %}
+{% block bodyclass %}documentation{% endblock %}
+{% block content-class %}content-grid{% endblock %}
+{% block breadcrumbs %}<div id="breadcrumbs"><a href="../../">Home</a> &rsaquo; <a href="../">Documentation</a> &rsaquo; filters</div>{% endblock %}
+{% block title %}Template filters{% endblock %}
+
+{% block content %}
+ <h1>Template filter documentation</h1>
+ <div class="container-grid">
+ <div class="column span-6">
+ {% regroup filters|dictsort:"library" by library as filter_libraries %}
+ {% for library in filter_libraries %}
+ <div class="module table-of-contents">
+ <h2>{% firstof library.grouper "Built-in filters" %}</h2>
+ <ul>
+ {% for filter in library.list|dictsort:"name" %}
+ <li><a href="#{{ filter.name }}">{{ filter.name }}</a></li>
+ {% endfor %}
+ </ul>
+ </div>
+ {% endfor %}
+ </div>
+ <div class="column span-18 last rte">
+ {% regroup filters|dictsort:"library" by library as filter_libraries %}
+ {% for library in filter_libraries %}
+ <div class="group collapsible open">
+ <h2 class="collapsible-handler">{% firstof library.grouper "Built-in filters" %}</h2>
+ {% if library.grouper %}<p>To use these filters, put <code>{% templatetag openblock %} load {{ library.grouper }} {% templatetag closeblock %}</code> in your template before using the filter.</p>{% endif %}
+ {% for filter in library.list|dictsort:"name" %}
+ <div class="module">
+ <h3 id="{{ filter.name }}">{{ filter.name }}</h3>
+ <p>{{ filter.title }}</p>
+ <p>{{ filter.body }}</p>
+ </div>
+ {% endfor %}
+ </div>
+ {% endfor %}
+ </div>
+ </div>
+{% endblock %}
+
diff --git a/app/lib/grappelli/templates/admin_doc/template_tag_index.html b/app/lib/grappelli/templates/admin_doc/template_tag_index.html
new file mode 100644
index 0000000..703b2b2
--- /dev/null
+++ b/app/lib/grappelli/templates/admin_doc/template_tag_index.html
@@ -0,0 +1,48 @@
+{% extends "admin/base_site.html" %}
+{% load adminmedia %}
+{% load i18n %}
+{% block javascripts %}
+ {{ block.super }}
+ <script type="text/javascript" src="{% admin_media_prefix %}js/documentation.js"></script>
+{% endblock %}
+{% block bodyclass %}documentation{% endblock %}
+{% block content-class %}content-grid{% endblock %}
+{% block breadcrumbs %}<div id="breadcrumbs"><a href="../../">Home</a> &rsaquo; <a href="../">Documentation</a> &rsaquo; Tags</div>{% endblock %}
+{% block title %}Template tags{% endblock %}
+
+{% block content %}
+ <h1>Template tag documentation</h1>
+ <div class="container-grid">
+ <div class="column span-6">
+ {% regroup tags|dictsort:"library" by library as tag_libraries %}
+ {% for library in tag_libraries %}
+ <div class="module table-of-contents">
+ <h2>{% firstof library.grouper "Built-in tags" %}</h2>
+ <ul>
+ {% for tag in library.list|dictsort:"name" %}
+ <li><a href="#{{ tag.name }}">{{ tag.name }}</a></li>
+ {% endfor %}
+ </ul>
+ </div>
+ {% endfor %}
+ </div>
+ <div class="column span-18 last rte">
+ {% regroup tags|dictsort:"library" by library as tag_libraries %}
+ {% for library in tag_libraries %}
+ <div class="group collapsible open">
+ <h2 class="collapsible-handler">{% firstof library.grouper "Built-in tags" %}</h2>
+ {% if library.grouper %}<p class="small quiet">To use these tags, put <code>{% templatetag openblock %} load {{ library.grouper }} {% templatetag closeblock %}</code> in your template before using the tag.</p>{% endif %}
+ {% for tag in library.list|dictsort:"name" %}
+ <div class="module">
+ <h3 id="{{ tag.name }}">{{ tag.name }}</h3>
+ <h4>{{ tag.title }}</h4>
+ <p>{{ tag.body }}</p>
+ </div>
+ {% endfor %}
+ </div>
+ {% endfor %}
+ </div>
+ </div>
+{% endblock %}
+
+
diff --git a/app/lib/grappelli/templates/admin_doc/view_detail.html b/app/lib/grappelli/templates/admin_doc/view_detail.html
new file mode 100644
index 0000000..900d3ed
--- /dev/null
+++ b/app/lib/grappelli/templates/admin_doc/view_detail.html
@@ -0,0 +1,30 @@
+{% extends "admin/base_site.html" %}
+{% load adminmedia %}
+{% load i18n %}
+{% block bodyclass %}documentation{% endblock %}
+{% block content-class %}content-grid{% endblock %}
+{% block breadcrumbs %}<div id="breadcrumbs"><a href="../../../">Home</a> &rsaquo; <a href="../../">Documentation</a> &rsaquo; <a href="../">Views</a> &rsaquo; {{ name }}</div>{% endblock %}
+{% block title %}View: {{ name }}{% endblock %}
+
+{% block content %}
+ <h1>{{ name }}</h1>
+ <div class="container-grid rte">
+ <div class="module">
+ <h2>{{ summary }}</h2>
+ <p>{{ body }}</p>
+ {% if meta.Context %}
+ <div class="module">
+ <h3>Context:</h3>
+ <p>{{ meta.Context }}</p>
+ </div>
+ {% endif %}
+ {% if meta.Templates %}
+ <div class="module">
+ <h3>Templates:</h3>
+ <p>{{ meta.Templates }}</p>
+ </div>
+ {% endif %}
+ </div>
+ <a href="../" class="back">&lsaquo; Back to Views Documentation</a>
+ </div>
+{% endblock %}
diff --git a/app/lib/grappelli/templates/admin_doc/view_index.html b/app/lib/grappelli/templates/admin_doc/view_index.html
new file mode 100644
index 0000000..b3c941c
--- /dev/null
+++ b/app/lib/grappelli/templates/admin_doc/view_index.html
@@ -0,0 +1,46 @@
+{% extends "admin/base_site.html" %}
+{% load adminmedia %}
+{% load i18n %}
+{% block javascripts %}
+ {{ block.super }}
+ <script type="text/javascript" src="{% admin_media_prefix %}js/documentation.js"></script>
+{% endblock %}
+{% block bodyclass %}documentation{% endblock %}
+{% block content-class %}content-grid{% endblock %}
+{% block breadcrumbs %}<div id="breadcrumbs"><a href="../../">Home</a> &rsaquo; <a href="../">Documentation</a> &rsaquo; Views</div>{% endblock %}
+{% block title %}Views{% endblock %}
+
+{% block content %}
+ <h1>View documentation</h1>
+ {% regroup views|dictsort:"site_id" by site as views_by_site %}
+ <div class="container-grid">
+ <div class="column span-6">
+ <div class="module table-of-contents">
+ <h2>Jump to site</h2>
+ <ul>
+ {% for site_views in views_by_site %}
+ <li><a href="#site{{ site_views.grouper.id }}">{{ site_views.grouper.name }}</a></li>
+ {% endfor %}
+ </ul>
+ </div>
+ </div>
+ <div class="column span-18 last rte">
+ {% for site_views in views_by_site %}
+ <div class="group">
+ <h2 id="site{{ site_views.grouper.id }}">Views by URL on {{ site_views.grouper.name }}</h2>
+ {% for view in site_views.list|dictsort:"url" %}
+ {% ifchanged %}
+ <div class="module">
+ <h3><a href="{{ view.module }}.{{ view.name }}/">{{ view.url }}</a></h3>
+ <p class="small quiet">View function: {{ view.module }}.{{ view.name }}</p>
+ <p>{{ view.title }}</p>
+ </div>
+ {% endifchanged %}
+ {% endfor %}
+ </div>
+ {% endfor %}
+ </div>
+ </div>
+{% endblock %}
+
+