summaryrefslogtreecommitdiff
path: root/demo/grappelli/templates
diff options
context:
space:
mode:
authorgnowgi <nagarjun@gnowledge.org>2012-03-15 16:19:20 +0530
committergnowgi <nagarjun@gnowledge.org>2012-03-15 16:19:20 +0530
commit7a4f561e851fdc7246d804c3abb6748b8a4199a6 (patch)
treed2afc3463fd49625a9be482012f5c3bfcf7c42b9 /demo/grappelli/templates
downloadgnowsys-7a4f561e851fdc7246d804c3abb6748b8a4199a6.tar.gz
master trunk of gnowsys-studio
Diffstat (limited to 'demo/grappelli/templates')
-rw-r--r--demo/grappelli/templates/.DS_Storebin0 -> 6148 bytes
-rw-r--r--demo/grappelli/templates/._.DS_Storebin0 -> 82 bytes
-rw-r--r--demo/grappelli/templates/admin/404.html13
-rw-r--r--demo/grappelli/templates/admin/500.html16
-rw-r--r--demo/grappelli/templates/admin/actions.html15
-rw-r--r--demo/grappelli/templates/admin/app_index.html40
-rw-r--r--demo/grappelli/templates/admin/auth/user/add_form.html36
-rw-r--r--demo/grappelli/templates/admin/auth/user/change_password.html68
-rw-r--r--demo/grappelli/templates/admin/base.html82
-rw-r--r--demo/grappelli/templates/admin/base_site.html10
-rw-r--r--demo/grappelli/templates/admin/change_form.html167
-rw-r--r--demo/grappelli/templates/admin/change_list.html215
-rw-r--r--demo/grappelli/templates/admin/change_list_results.html31
-rw-r--r--demo/grappelli/templates/admin/csv_export_selected_confirmation.html60
-rw-r--r--demo/grappelli/templates/admin/date_hierarchy.html13
-rw-r--r--demo/grappelli/templates/admin/delete_confirmation.html60
-rw-r--r--demo/grappelli/templates/admin/delete_selected_confirmation.html66
-rw-r--r--demo/grappelli/templates/admin/edit_inline/stacked.html231
-rw-r--r--demo/grappelli/templates/admin/edit_inline/tabular.html275
-rw-r--r--demo/grappelli/templates/admin/filter.html7
-rw-r--r--demo/grappelli/templates/admin/includes/fieldset.html33
-rw-r--r--demo/grappelli/templates/admin/includes/fieldset_inline.html33
-rw-r--r--demo/grappelli/templates/admin/includes_grappelli/header.html56
-rw-r--r--demo/grappelli/templates/admin/index.html61
-rw-r--r--demo/grappelli/templates/admin/invalid_setup.html12
-rw-r--r--demo/grappelli/templates/admin/login.html66
-rw-r--r--demo/grappelli/templates/admin/object_history.html51
-rw-r--r--demo/grappelli/templates/admin/pagination.html30
-rw-r--r--demo/grappelli/templates/admin/prepopulated_fields_js.html17
-rw-r--r--demo/grappelli/templates/admin/search_form.html20
-rw-r--r--demo/grappelli/templates/admin/submit_line.html10
-rw-r--r--demo/grappelli/templates/admin/template_validator.html34
-rw-r--r--demo/grappelli/templates/admin_doc/bookmarklets.html37
-rw-r--r--demo/grappelli/templates/admin_doc/index.html34
-rw-r--r--demo/grappelli/templates/admin_doc/missing_docutils.html14
-rw-r--r--demo/grappelli/templates/admin_doc/model_detail.html51
-rw-r--r--demo/grappelli/templates/admin_doc/model_index.html45
-rw-r--r--demo/grappelli/templates/admin_doc/template_detail.html21
-rw-r--r--demo/grappelli/templates/admin_doc/template_filter_index.html47
-rw-r--r--demo/grappelli/templates/admin_doc/template_tag_index.html48
-rw-r--r--demo/grappelli/templates/admin_doc/view_detail.html30
-rw-r--r--demo/grappelli/templates/admin_doc/view_index.html46
-rw-r--r--demo/grappelli/templates/registration/logged_out.html18
-rw-r--r--demo/grappelli/templates/registration/password_change_done.html24
-rw-r--r--demo/grappelli/templates/registration/password_change_form.html60
-rw-r--r--demo/grappelli/templates/registration/password_reset_complete.html12
-rw-r--r--demo/grappelli/templates/registration/password_reset_confirm.html23
-rw-r--r--demo/grappelli/templates/registration/password_reset_done.html11
-rw-r--r--demo/grappelli/templates/registration/password_reset_email.html15
-rw-r--r--demo/grappelli/templates/registration/password_reset_form.html15
50 files changed, 2379 insertions, 0 deletions
diff --git a/demo/grappelli/templates/.DS_Store b/demo/grappelli/templates/.DS_Store
new file mode 100644
index 0000000..f0fefb0
--- /dev/null
+++ b/demo/grappelli/templates/.DS_Store
Binary files differ
diff --git a/demo/grappelli/templates/._.DS_Store b/demo/grappelli/templates/._.DS_Store
new file mode 100644
index 0000000..460d887
--- /dev/null
+++ b/demo/grappelli/templates/._.DS_Store
Binary files differ
diff --git a/demo/grappelli/templates/admin/404.html b/demo/grappelli/templates/admin/404.html
new file mode 100644
index 0000000..10aeb75
--- /dev/null
+++ b/demo/grappelli/templates/admin/404.html
@@ -0,0 +1,13 @@
+{% extends "admin/base_site.html" %}
+
+<!-- LOADING -->
+{% load i18n %}
+
+<!-- TITLE -->
+{% block title %}{% trans "Page not found" %}{% endblock %}
+
+<!-- CONTENT -->
+{% block content %}
+<h2>{% trans "Page not found" %}</h2>
+<p>{% trans "We're sorry, but the requested page could not be found." %}</p>
+{% endblock %}
diff --git a/demo/grappelli/templates/admin/500.html b/demo/grappelli/templates/admin/500.html
new file mode 100644
index 0000000..e6fb34a
--- /dev/null
+++ b/demo/grappelli/templates/admin/500.html
@@ -0,0 +1,16 @@
+{% extends "admin/base_site.html" %}
+
+<!-- LOADING -->
+{% load i18n %}
+
+<!-- BREADCRUMBS -->
+{% block breadcrumbs %}<div id="breadcrumbs"><a href="/">{% trans "Home" %}</a> &rsaquo; {% trans "Server error" %}</div>{% endblock %}
+
+<!-- TITLE -->
+{% block title %}{% trans "Server error (500)" %}{% endblock %}
+
+<!-- CONTENT -->
+{% block content %}
+<h1>{% trans "Server Error <em>(500)</em>" %}</h1>
+<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>
+{% endblock %}
diff --git a/demo/grappelli/templates/admin/actions.html b/demo/grappelli/templates/admin/actions.html
new file mode 100644
index 0000000..7e9f8ea
--- /dev/null
+++ b/demo/grappelli/templates/admin/actions.html
@@ -0,0 +1,15 @@
+{% load i18n %}
+<div class="changelist-actions">
+ {% for field in action_form %}{{ field }}{% endfor %}
+ {% if actions_selection_counter %}
+ <script type="text/javascript">var _actions_icnt="{{ cl.result_list|length|default:"0" }}";</script>
+ <ul>
+ <li class="action-counter"><span class="action-counter">{{ selection_note }}</span></li>
+ {% if cl.result_count != cl.result_list|length %}
+ <li class="all"><span class="all">{{ selection_note_all }}</span></li>
+ <li class="question"><a href="javascript:;" title="{% trans "Click here to select the objects across all pages" %}">{% blocktrans with cl.result_count as total_count %}Select all {{ total_count }} {{ module_name }}{% endblocktrans %}</a></li>
+ <li class="clear-selection"><a href="javascript://" class="clear">{% trans "Clear selection" %}</a></li>
+ {% endif %}
+ </ul>
+ {% endif %}
+</div>
diff --git a/demo/grappelli/templates/admin/app_index.html b/demo/grappelli/templates/admin/app_index.html
new file mode 100644
index 0000000..1c6a6b7
--- /dev/null
+++ b/demo/grappelli/templates/admin/app_index.html
@@ -0,0 +1,40 @@
+{% extends "admin/index.html" %}
+{% load i18n grp_tags %}
+
+{% block javascripts %}
+ {{ block.super }}
+{% endblock %}
+
+{% if not is_popup %}
+ {% block breadcrumbs %}
+ <div id="breadcrumbs">
+ <a href="../">{% trans "Home" %}</a> &rsaquo;
+ {% for app in app_list %}
+ {% blocktrans with app.name as name %}{{ name }}{% endblocktrans %}
+ {% endfor %}
+ </div>
+ {% endblock %}
+{% endif %}
+
+{% block content %}
+ <div class="container-grid">
+ <div class="column span-12" id="apps_init">
+ {% if app_list %}
+ {% for app in app_list %}
+ <div class="module" id="app_{{ app.name|lower }}">
+ <h2>{% trans app.name %}</h2>
+ {% for model in app.models %}
+ <div class="row">
+ {% if model.perms.change %}<a href="{{ model.admin_url }}">{{ model.name }}</a>{% else %}<span>{{ model.name }}</span>{% endif %}
+ <ul class="actions">
+ <li class="add-link">{% if model.perms.add %}<a href="{{ model.admin_url }}add/">{% trans 'Add' %}</a>{% else %}&nbsp;{% endif %}</li>
+ <li class="change-link"> {% if model.perms.change %}<a href="{{ model.admin_url }}">{% trans 'Change' %}</a>{% else %}&nbsp;{% endif %}</li>
+ </ul>
+ </div>
+ {% endfor %}
+ </div>
+ {% endfor %}
+ {% endif %}
+ </div>
+ </div>
+{% endblock %}
diff --git a/demo/grappelli/templates/admin/auth/user/add_form.html b/demo/grappelli/templates/admin/auth/user/add_form.html
new file mode 100644
index 0000000..7431762
--- /dev/null
+++ b/demo/grappelli/templates/admin/auth/user/add_form.html
@@ -0,0 +1,36 @@
+{% extends "admin/change_form.html" %}
+{% load i18n %}
+
+{% comment %}
+{% block after_field_sets %}
+ <p>{% trans "First, enter a username and password. Then, you'll be able to edit more user options." %}</p>
+ <fieldset class="module aligned">
+ <div class="row">
+ {# TODO: get required class on label_tag #}
+ <div class="column span-4"><label for="id_username" class="required">{% trans 'Username' %}:</label></div>
+ <div class="column span-flexible">
+ {{ form.username }}
+ {{ form.username.errors }}
+ <p class="help">{{ form.username.help_text }}</p>
+ </div>
+ </div>
+ <div class="row">
+ {# TODO: get required class on label_tag #}
+ <div class="column span-4"><label for="id_password1" class="required">{% trans 'Password' %}:</label></div>
+ <div class="column span-flexible">
+ {{ form.password1 }}
+ {{ form.password1.errors }}
+ </div>
+ </div>
+ <div class="row">
+ {# TODO: get required class on label_tag #}
+ <div class="column span-4"><label for="id_password2" class="required">{% trans 'Password (again)' %}:</label></div>
+ <div class="column span-flexible">
+ {{ form.password2 }}
+ {{ form.password2.errors }}
+ <p class="help">{% trans 'Enter the same password as above, for verification.' %}</p>
+ </div>
+ </div>
+ </fieldset>
+{% endblock %}
+{% endcomment %}
diff --git a/demo/grappelli/templates/admin/auth/user/change_password.html b/demo/grappelli/templates/admin/auth/user/change_password.html
new file mode 100644
index 0000000..0a82cf7
--- /dev/null
+++ b/demo/grappelli/templates/admin/auth/user/change_password.html
@@ -0,0 +1,68 @@
+{% extends "admin/base_site.html" %}
+{% load i18n admin_modify adminmedia %} {# grp_csrf #}
+{% block userlinks %}
+{% url django-admindocs-docroot as docsroot %}
+ {% if docsroot %}
+ <li>
+ <a href="{{ docsroot }}">{% trans 'Documentation' %}</a>
+ </li>
+ {% endif %}
+ <li>
+ <a href="{{ root_path }}password_change/">{% trans 'Change password' %}</a>
+ </li>
+ <li>
+ <a href="{{ root_path }}logout/">{% trans 'Log out' %}</a>
+ </li>
+{% endblock %}
+{% block breadcrumbs %}
+ {% if not is_popup %}
+ <div id="breadcrumbs">
+ <a href="../../../../">{% trans "Home" %}</a> &rsaquo;
+ <a href="../../">{{ opts.verbose_name_plural|capfirst }}</a> &rsaquo;
+ <a href="../">{{ original|truncatewords:"18" }}</a> &rsaquo;
+ {% trans 'Change password' %}
+ </div>
+ {% endif %}
+{% endblock %}
+{% block title %}{% trans 'Password change' %}{% endblock %}
+{% block content-class %}content-grid{% endblock %}
+
+{% block content %}
+{# TODO: French translations alre all mixed up with change "MY" password form ... #}
+{#<h1>{% trans 'Password change' %}</h1>#}
+<div class="container-grid">
+ <div class="column span-12">
+ <p>{% blocktrans with original.username as username %}Enter a new password for the user <strong>{{ username }}</strong>.{% endblocktrans %}</p>
+ {% if form.errors %}
+ <p class="errornote">
+ {% blocktrans count form.errors.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
+ </p>
+ {% endif %}
+ <form action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% csrf_token %}{% block form_top %}{% endblock %}
+ {% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
+ <fieldset class="module">
+ <div class="row">
+ <div class="column span-4"><label for="id_new_password1" class="required">{% trans 'New password:' %}</label></div>
+ <div class="column span-flexible">
+ {{ form.password1 }}
+ {{ form.password1.errors }}
+ </div>
+ </div>
+ <div class="row">
+ <div class="column span-4"><label for="id_new_password2" class="required">{% trans 'Password (again)' %}</label></div>
+ <div class="column span-flexible">
+ {{ form.password2 }}
+ {{ form.password2.errors }}
+ <p class="help">{% trans 'Enter the same password as above, for verification.' %}</p>
+ </div>
+ </div>
+ </fieldset>
+ <div class="module submit-row">
+ <ul class="submit-row">
+ <li><input type="submit" value="{% trans 'Change password' %}" class="default" /></li>
+ </ul>
+ </div>
+ </form>
+ </div>
+</div>
+{% endblock %}
diff --git a/demo/grappelli/templates/admin/base.html b/demo/grappelli/templates/admin/base.html
new file mode 100644
index 0000000..48961f9
--- /dev/null
+++ b/demo/grappelli/templates/admin/base.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ LANGUAGE_CODE }}" xml:lang="{{ LANGUAGE_CODE }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
+{% load adminmedia i18n grp_tags %}
+<head>
+ <title>{% block title %}{% endblock %}</title>
+ {% 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>
+ {% endblock %}
+ <!-- EXTRAHEAD -->
+ {% block extrahead %}{% endblock %}
+</head>
+<body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}">
+ <div id="container">
+ <!-- HEADER -->
+ {% if not is_popup %}
+ {% include "admin/includes_grappelli/header.html" %}
+ <!-- BREADCRUMBS -->
+ {% block breadcrumbs %}
+ <div id="breadcrumbs"><a href="/">{% trans 'Home' %}</a>{% if title %} &rsaquo; {{ title }}{% endif %}</div>
+ {% endblock %}
+ {% endif %}
+ <!-- MESSAGES -->
+ {% if messages %}
+ <ul class="messagelist">
+ {% for message in messages %}
+ <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ <!-- CONTENT -->
+ <div id="content" class="{% block content-class %}{% endblock %}">
+ {% block pretitle %}{% endblock %}
+ {% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
+ {% block object-tools %}{% endblock %}
+ {% block content %}
+ {{ content }}
+ {% block filters %}{% endblock %}
+ {% endblock %}
+ <br class="clear" />
+ </div>
+ <!-- FOOTER -->
+ {% block footer %}<div id="footer"></div>{% endblock %}
+ </div>
+</body>
+</html> \ No newline at end of file
diff --git a/demo/grappelli/templates/admin/base_site.html b/demo/grappelli/templates/admin/base_site.html
new file mode 100644
index 0000000..2d052ac
--- /dev/null
+++ b/demo/grappelli/templates/admin/base_site.html
@@ -0,0 +1,10 @@
+{% extends "admin/base.html" %}
+{% load i18n grp_tags %}
+
+{% block title %}{{ title }} | {% trans 'Django site admin' %}{% endblock %}
+
+{% block branding %}
+ <h1 id="site-name">{% trans 'Django administration' %}</h1>
+{% endblock %}
+
+{% block nav-global %}{% endblock %}
diff --git a/demo/grappelli/templates/admin/change_form.html b/demo/grappelli/templates/admin/change_form.html
new file mode 100644
index 0000000..3670165
--- /dev/null
+++ b/demo/grappelli/templates/admin/change_form.html
@@ -0,0 +1,167 @@
+{% extends "admin/base_site.html" %}
+
+<!-- LOADING -->
+{% load i18n admin_modify adminmedia grp_tags %}
+
+<!-- STYLESHEETS -->
+{% block stylesheets %}
+ {{ block.super }}
+{% endblock %}
+
+<!-- JAVASCRIPTS -->
+{% block javascripts %}
+ {{ block.super }}
+ {% url admin:jsi18n as jsi18nurl %}
+ <script type="text/javascript" src="{{ jsi18nurl|default:'../../../jsi18n/' }}"></script>
+ <script src="{% admin_media_prefix %}js/grappelli/jquery.grp_inline.js" type="text/javascript"></script>
+ <script type="text/javascript" charset="utf-8">
+ (function($) {
+ $(document).ready(function() {
+ grappelli.initDateAndTimePicker();
+ $("div.container-flexible div.group").grp_collapsible_group();
+ $("div#content .collapse").grp_collapsible({
+ on_init: function(elem, options) {
+ // open collapse (and all collapse parents) in case of errors
+ if (elem.find("ul.errorlist").length > 0) {
+ elem.removeClass("closed")
+ .addClass("open");
+ elem.parents(".collapse")
+ .removeClass("closed")
+ .addClass("open");
+ }
+ }
+ });
+ var related_lookup_fields_fk = {% get_related_lookup_fields_fk adminform.model_admin %};
+ var related_lookup_fields_m2m = {% get_related_lookup_fields_m2m adminform.model_admin %};
+ var related_lookup_fields_generic = {% get_related_lookup_fields_generic adminform.model_admin %};
+ var autocomplete_fields_fk = {% get_autocomplete_lookup_fields_fk adminform.model_admin %};
+ var autocomplete_fields_m2m = {% get_autocomplete_lookup_fields_m2m adminform.model_admin %};
+ var autocomplete_fields_generic = {% get_autocomplete_lookup_fields_generic adminform.model_admin %};
+ $.each(related_lookup_fields_fk, function() {
+ $("#id_" + this).grp_related_fk({lookup_url:"{% url grp_related_lookup %}"});
+ });
+ $.each(related_lookup_fields_m2m, function() {
+ $("#id_" + this).grp_related_m2m({lookup_url:"{% url grp_m2m_lookup %}"});
+ });
+ $.each(related_lookup_fields_generic, function() {
+ var content_type = "#id_" + this[0],
+ object_id = "#id_" + this[1];
+ $(object_id).grp_related_generic({content_type:content_type, object_id:object_id, lookup_url:"{% url grp_related_lookup %}"});
+ });
+ $.each(autocomplete_fields_fk, function() {
+ $("#id_" + this).grp_autocomplete_fk({
+ lookup_url:"{% url grp_related_lookup %}",
+ autocomplete_lookup_url:"{% url grp_autocomplete_lookup %}"
+ });
+ });
+ $.each(autocomplete_fields_m2m, function() {
+ $("#id_" + this).grp_autocomplete_m2m({
+ lookup_url:"{% url grp_m2m_lookup %}",
+ autocomplete_lookup_url:"{% url grp_autocomplete_lookup %}"
+ });
+ });
+ $.each(autocomplete_fields_generic, function() {
+ var content_type = "#id_" + this[0],
+ object_id = "#id_" + this[1];
+ $(object_id).grp_autocomplete_generic({
+ content_type:content_type,
+ object_id:object_id,
+ lookup_url:"{% url grp_related_lookup %}",
+ autocomplete_lookup_url:"{% url grp_autocomplete_lookup %}"
+ });
+ });
+ });
+ })(django.jQuery);
+ </script>
+ {{ media }}
+{% endblock %}
+
+<!-- COLTYPE/BODYCLASS -->
+{% block bodyclass %}{{ opts.app_label }}-{{ opts.object_name.lower }} change-form{% endblock %}
+{% block content-class %}content-flexible{% endblock %}
+
+<!-- BREADCRUMBS -->
+{% block breadcrumbs %}
+ {% if not is_popup %}
+ <div id="breadcrumbs">
+ <a href="../../../">{% trans "Home" %}</a> &rsaquo;
+ <a href="../../">{% trans app_label|capfirst|escape %}</a> &rsaquo;
+ {% if has_change_permission %}<a href="../">{{ opts.verbose_name_plural|capfirst }}</a>{% else %}{{ opts.verbose_name_plural|capfirst }}{% endif %} &rsaquo;
+ {% if add %}{% trans "Add" %} {{ opts.verbose_name }}{% else %}{{ original|truncatewords:"18" }}{% endif %}
+ </div>
+ {% endif %}
+{% endblock %}
+
+<!-- OBJECT TOOLS -->
+{% block object-tools %}
+ {% if change %}
+ {% if not is_popup %}
+ <ul class="tools">
+ {% block object-tools-items %}
+ <li><a href="history/">{% trans "History" %}</a></li>
+ {% if has_absolute_url %}<li><a href="../../../r/{{ content_type_id }}/{{ object_id }}/" class="focus" target="_blank">{% trans "View on site" %}</a></li>{% endif%}
+ {% endblock %}
+ </ul>
+ {% endif %}
+ {% endif %}
+{% endblock %}
+
+<!-- CONTENT -->
+{% block content %}
+ <div class="container-flexible">
+ <div class="form-container">
+ <form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% csrf_token %}{% block form_top %}{% endblock %}
+ <div>
+ <!-- Popup Hidden Field -->
+ {% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
+
+ <!-- Submit-Row -->
+ {% if save_on_top %}{% submit_row %}{% endif %}
+
+ <!-- Errors -->
+ {% if errors %}
+ <p class="errornote">{% blocktrans count errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}</p>
+ <ul class="errorlist">{% for error in adminform.form.non_field_errors %}<li>{{ error }}</li>{% endfor %}</ul>
+ {% endif %}
+
+ <!-- Fieldsets -->
+ {% for fieldset in adminform %}
+ {% include "admin/includes/fieldset.html" %}
+ {% endfor %}
+
+ {% block after_field_sets %}{% endblock %}
+
+ <!-- Inlines -->
+ {% for inline_admin_formset in inline_admin_formsets %}
+ {% include inline_admin_formset.opts.template %}
+ {% endfor %}
+
+ {% block after_related_objects %}{% endblock %}
+
+ <!-- Submit-Row -->
+ {% submit_row %}
+
+ {% if adminform and add %}
+ {% block extrahead %}
+ <script type="text/javascript">
+ (function($){
+ $(function(){
+ try {
+ // focus on first form-field
+ $("#{{ adminform.first_field.auto_id }}, #{{ adminform.first_field.auto_id }}_0")
+ .eq(0).focus();
+ } catch(e) {}
+ });
+ }(django.jQuery));
+ </script>
+ {% endblock %}
+ {% endif %}
+
+ <!-- JS for prepopulated fields -->
+ {% prepopulated_fields_js %}
+
+ </div>
+ </form>
+ </div>
+ </div>
+{% endblock %}
diff --git a/demo/grappelli/templates/admin/change_list.html b/demo/grappelli/templates/admin/change_list.html
new file mode 100644
index 0000000..d6afc65
--- /dev/null
+++ b/demo/grappelli/templates/admin/change_list.html
@@ -0,0 +1,215 @@
+{% extends "admin/base_site.html" %}
+
+<!-- LOADING -->
+{% load adminmedia admin_list i18n grp_tags %}
+
+<!-- STYLESHEETS -->
+{% block stylesheets %}
+ {{ block.super }}
+ {{ media.css }}
+{% endblock %}
+
+<!-- JAVASCRIPTS -->
+{% block javascripts %}
+ {{ block.super }}
+ {% if cl.formset or action_form %}
+ {% url 'admin:jsi18n' as jsi18nurl %}
+ <script type="text/javascript" src="{{ jsi18nurl|default:'../../jsi18n/'}}"></script>
+ {% endif %}
+ {% if action_form %}
+ <script type="text/javascript" charset="utf-8">
+ (function($) {
+ $(document).ready(function() {
+ $("tr input.action-select").actions();
+ });
+ })(django.jQuery);
+ </script>
+ {% endif %}
+ {% if cl.formset %}
+ <script type="text/javascript" charset="utf-8">
+ (function($) {
+ $(document).ready(function() {
+ grappelli.initDateAndTimePicker();
+ var prefix = "form";
+ var related_lookup_fields_fk = {% get_related_lookup_fields_fk cl.model_admin %};
+ var related_lookup_fields_m2m = {% get_related_lookup_fields_m2m cl.model_admin %};
+ var related_lookup_fields_generic = {% get_related_lookup_fields_generic cl.model_admin %};
+ var autocomplete_fields_fk = {% get_autocomplete_lookup_fields_fk cl.model_admin %};
+ var autocomplete_fields_m2m = {% get_autocomplete_lookup_fields_m2m cl.model_admin %};
+ var autocomplete_fields_generic = {% get_autocomplete_lookup_fields_generic cl.model_admin %};
+ $.each(related_lookup_fields_fk, function() {
+ $("div.changelist-results")
+ .find("input[name^='" + prefix + "'][name$='" + this + "']")
+ .grp_related_fk({lookup_url:"{% url grp_related_lookup %}"});
+ });
+ $.each(related_lookup_fields_m2m, function() {
+ $("div.changelist-results")
+ .find("input[name^='" + prefix + "'][name$='" + this + "']")
+ .grp_related_m2m({lookup_url:"{% url grp_m2m_lookup %}"});
+ });
+ $.each(related_lookup_fields_generic, function() {
+ var content_type = this[0],
+ object_id = this[1];
+ $("div.changelist-results")
+ .find("input[name^='" + prefix + "'][name$='" + this[1] + "']")
+ .each(function() {
+ var ct_id = "#id_" + prefix + "-" + $(this).attr("id").split("-")[1] + "-" + content_type,
+ obj_id = "#id_" + prefix + "-" + $(this).attr("id").split("-")[1] + "-" + object_id;
+ $(this).grp_related_generic({content_type:ct_id, object_id:obj_id, lookup_url:"{% url grp_related_lookup %}"});
+ });
+ });
+ $.each(autocomplete_fields_fk, function() {
+ $("div.changelist-results")
+ .find("input[name^='" + prefix + "'][name$='" + this + "']")
+ .each(function() {
+ $(this).grp_autocomplete_fk({
+ lookup_url:"{% url grp_related_lookup %}",
+ autocomplete_lookup_url:"{% url grp_autocomplete_lookup %}"
+ });
+ });
+ });
+ $.each(autocomplete_fields_m2m, function() {
+ $("div.changelist-results")
+ .find("input[name^='" + prefix + "'][name$='" + this + "']")
+ .each(function() {
+ $(this).grp_autocomplete_m2m({
+ lookup_url:"{% url grp_m2m_lookup %}",
+ autocomplete_lookup_url:"{% url grp_autocomplete_lookup %}"
+ });
+ });
+ });
+ $.each(autocomplete_fields_generic, function() {
+ var content_type = this[0],
+ object_id = this[1];
+ $("div.changelist-results")
+ .find("input[name^='" + prefix + "'][name$='" + this[1] + "']")
+ .each(function() {
+ var i = $(this).attr("id").match(/-\d+-/);
+ if (i) {
+ var ct_id = "#id_" + prefix + i[0] + content_type,
+ obj_id = "#id_" + prefix + i[0] + object_id;
+ $(this).grp_autocomplete_generic({
+ content_type:ct_id,
+ object_id:obj_id,
+ lookup_url:"{% url grp_related_lookup %}",
+ autocomplete_lookup_url:"{% url grp_autocomplete_lookup %}"
+ });
+ }
+ });
+ });
+ });
+ })(django.jQuery);
+ </script>
+ {% endif %}
+ <script type="text/javascript" charset="utf-8">
+ (function($) {
+ $(document).ready(function() {
+ grappelli.initSearchbar();
+ grappelli.initFilter();
+ // HACK: add no-wrap to table-elements.
+ // should be solved with http://code.djangoproject.com/changeset/15658
+ // grappelli.initTableElements();
+ });
+ })(django.jQuery);
+ </script>
+ {{ media.js }}
+{% endblock %}
+
+<!-- COLTYPE/BODYCLASS-- >
+{% block bodyclass %}change-list{% endblock %}
+{% block content-class %}content-flexible{% endblock %}
+
+<!-- BREADCRUMBS -- >
+{% block breadcrumbs %}
+ {% if not is_popup %}
+ <div id="breadcrumbs">
+ <a href="../../">{% trans "Home" %}</a> &rsaquo;
+ <a href="../">{% trans app_label|capfirst|escape %}</a> &rsaquo;
+ {{ cl.opts.verbose_name_plural|capfirst }}
+ </div>
+ {% endif %}
+{% endblock %}
+
+<!-- CONTENT-TITLE -->
+{% block content_title %}
+ <h1>{{ cl.opts.verbose_name_plural|capfirst }}</h1>
+{% endblock %}
+
+<!-- OBJECT-TOOLS -->
+{% block object-tools %}
+ {% if has_add_permission %}
+ <ul class="tools">
+ {% block object-tools-items %}
+ <li><a href="add/{% if is_popup %}?_popup=1{% endif %}" class="add-handler focus">{% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %}</a></li>
+ {% endblock %}
+ </ul>
+ {% endif %}
+{% endblock %}
+
+<!-- CONTENT -->
+{% block content %}
+ {% if cl.search_fields or cl.has_filters or cl.date_hierarchy %}
+ <div class="module changelist-filters">
+ <!-- PAGINATION TOP -->
+ {% pagination cl %}
+ {% if cl.has_filters or cl.search_fields %}
+ <!-- FILTERS -->
+ {% if cl.has_filters %}
+ <div id="filters" class="module filter span-6">
+ <div class="pulldown-container">
+ <a href="javascript://" class="button toggle-filters">{% trans 'Filter' %}</a>
+ <div class="filter-pulldown">
+ {% for spec in cl.filter_specs %}{% admin_list_filter cl spec %}{% endfor %}
+ </div>
+ </div>
+ </div>
+ {% endif %}
+ <!-- SEARCH -->
+ {% if cl.search_fields %}
+ <div id="search" class="module search span-6">
+ {% block search %}{% search_form cl %}{% endblock %}
+ </div>
+ {% endif %}
+ {% endif %}
+ <br clear="all" />
+ </div>
+ <!-- DATE HIERARCHY -->
+ {% if cl.date_hierarchy %}
+ {% date_hierarchy cl %}
+ {% endif %}
+ {% endif %}
+ <form id="changelist-form" action="" method="post"{% if cl.formset.is_multipart %} enctype="multipart/form-data"{% endif %}>{% csrf_token %}
+ <div id="changelist" class="container-full{% if cl.list_editable %} editable{% endif %}" style="">
+ <!-- POPUP -->
+ {% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
+ <!-- ERRORS -->
+ {% if cl.formset.errors %}
+ <p class="errornote">
+ {% blocktrans count cl.formset.errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
+ </p>
+ {{ cl.formset.non_form_errors }}
+ {% endif %}
+ <!-- MANAGEMENT FORM -->
+ {% if cl.formset %}
+ {{ cl.formset.management_form }}
+ {% endif %}
+ <!-- CHANGELIST-RESULTS -->
+ {% block result_list %}
+ {% result_list cl %}
+ {% endblock %}
+ <!-- PAGINATION BOTTOM -->
+ {% pagination cl %}
+ </div><br clear="all" />
+ <!-- SUBMIT ROW -->
+ {% if cl.formset or action_form %}
+ <div id="submit" class="module footer">
+ {% if action_form %}{% admin_actions %}{% endif %}
+ {% if cl.formset %}
+ <ul class="submit-row">
+ <li class="submit-button-container"><input type="submit" class="default" name="_save" value="Save"/></li>
+ </ul>
+ {% endif %}
+ </div>
+ {% endif %}
+ </form>
+{% endblock %}
diff --git a/demo/grappelli/templates/admin/change_list_results.html b/demo/grappelli/templates/admin/change_list_results.html
new file mode 100644
index 0000000..5c90914
--- /dev/null
+++ b/demo/grappelli/templates/admin/change_list_results.html
@@ -0,0 +1,31 @@
+{% if result_hidden_fields %}
+ <div class="hiddenfields"> {# DIV for HTML validation #}
+ {% for item in result_hidden_fields %}{{ item }}{% endfor %}
+ </div>
+{% endif %}
+
+{% if results %}
+<div class="module changelist-results">
+ <table cellspacing="0">
+ <thead>
+ <tr>
+ {% for header in result_headers %}
+ <th class="{{ header.class_attrib|cut:'class='|cut:'"' }}{% if header.sortable %} sortable{% endif %}">
+ {% if header.sortable %}<a href="{{ header.url }}">{% endif %}
+ {{ header.text|capfirst }}
+ {% if header.sortable %}</a>{% endif %}
+ </th>
+ {% endfor %}
+ </tr>
+ </thead>
+ <tbody>
+ {% for result in results %}
+ {% if result.form.non_field_errors %}
+ <tr><td colspan="{{ result.row|length }}">{{ result.form.non_field_errors }}</td></tr>
+ {% endif %}
+ <tr class="{% cycle 'row1' 'row2' %}">{% for item in result %}{{ item }}{% endfor %}</tr>
+ {% endfor %}
+ </tbody>
+ </table>
+</div>
+{% endif %}
diff --git a/demo/grappelli/templates/admin/csv_export_selected_confirmation.html b/demo/grappelli/templates/admin/csv_export_selected_confirmation.html
new file mode 100644
index 0000000..873bd87
--- /dev/null
+++ b/demo/grappelli/templates/admin/csv_export_selected_confirmation.html
@@ -0,0 +1,60 @@
+{% extends "admin/base_site.html" %}
+
+<!-- LOADING -->
+{% load i18n %}
+
+<!-- BREADCRUMBS -->
+{% block breadcrumbs %}
+ <div id="breadcrumbs">
+ <a href="../../">{% trans "Home" %}</a> &rsaquo;
+ <a href="../">{{ app_label|capfirst }}</a> &rsaquo;
+ <a href="./">{{ opts.verbose_name_plural|capfirst }}</a> &rsaquo;
+ {% trans 'Export selection as CSV' %}
+ </div>
+{% endblock %}
+
+<!-- CONTENT -->
+{% block content %}
+ <script type="text/javascript" charset="utf-8">
+ (function($) {
+ $(document).ready(function() {
+ $("input").attr("autocomplete", "off");
+ $('#select_all').click(function(){
+ $("._fields").attr('checked', $(this).attr('checked'));
+ });
+ });
+ })(django.jQuery);
+ </script>
+ <div class="container-grid csv-export-confirmation">
+ <form action="" method="post">{% csrf_token %}
+ <fieldset class="module">
+ <h2>{% blocktrans %}Export following fields:{% endblocktrans %}</h2>
+ <div class="row">
+ <ul class="checkboxlist">
+ <li><label for="select_all"><input type="checkbox" name="select_all" value="" id="select_all" /> {% blocktrans %}Select all{% endblocktrans %}</label></li>
+ </ul>
+ </div>
+ <div class="row">
+ <ul class="checkboxlist">
+ {% for item in fields %}
+ <li>
+ <label for="id_{{ item.0 }}"><input type="checkbox" class="_fields" name="_fields" value="{{ item.0 }}" id="id_{{ item.0 }}"{% if item.0 in list_display %} checked="checked" {% endif %} /> {{ item.1 }}</label>
+ </li>
+ {% endfor %}
+ </ul>
+ </div>
+ </fieldset>
+ <div class="module footer">
+ {% for obj in queryset %}
+ <input type="hidden" name="{{ action_checkbox_name }}" value="{{ obj.pk }}" />
+ {% endfor %}
+ <input type="hidden" name="action" value="csv_export_selected" />
+ <input type="hidden" name="post" value="yes" />
+ <ul class="submit-row" {% if is_popup %}style="overflow: auto;"{% endif %}>
+ <li class="left cancel-button-container"><a href="../" class="cancel-link">{% trans "Back" %}</a></li>
+ <li class="submit-button-container"><input type="submit" value="{% trans "Export" %}" class="default" /></li>
+ </ul>
+ </div>
+ </form>
+ </div>
+{% endblock %} \ No newline at end of file
diff --git a/demo/grappelli/templates/admin/date_hierarchy.html b/demo/grappelli/templates/admin/date_hierarchy.html
new file mode 100644
index 0000000..25e3c6b
--- /dev/null
+++ b/demo/grappelli/templates/admin/date_hierarchy.html
@@ -0,0 +1,13 @@
+{% load i18n %}
+{% if show and choices %}
+ <div id="date-hierarchy" class="module date-hierarchy">
+ <div class="row">
+ <ul>
+ {% if back %}<li><a href="{{ back.link }}" class="date-hierarchy-back">{{ back.title }}</a></li>{% endif %}
+ {% for choice in choices %}
+ <li>{% if choice.link %}<a href="{{ choice.link }}">{{ choice.title }}</a>{% else %}<span>{{ choice.title }}</span>{% endif %}</li>
+ {% endfor %}
+ </ul><br clear="all" />
+ </div>
+ </div>
+{% endif %}
diff --git a/demo/grappelli/templates/admin/delete_confirmation.html b/demo/grappelli/templates/admin/delete_confirmation.html
new file mode 100644
index 0000000..44527f0
--- /dev/null
+++ b/demo/grappelli/templates/admin/delete_confirmation.html
@@ -0,0 +1,60 @@
+{% extends "admin/base_site.html" %}
+
+<!-- LOADING -->
+{% load i18n %}
+
+<!-- BREADCRUMBS -->
+{% block breadcrumbs %}
+ <div id="breadcrumbs">
+ <a href="../../../../">{% trans "Home" %}</a> &rsaquo;
+ <a href="../../../">{{ app_label|capfirst }}</a> &rsaquo;
+ <a href="../../">{{ opts.verbose_name_plural|capfirst }}</a> &rsaquo;
+ <a href="../">{{ object|truncatewords:"18" }}</a> &rsaquo;
+ {% trans 'Delete' %}
+ </div>
+{% endblock %}
+
+<!-- CONTENT -->
+{% block content %}
+ <div class="container-grid delete-confirmation">
+ {% if perms_lacking or protected %}
+ <div class="module">
+ {% if perms_lacking %}
+ <h2>{% blocktrans with object as escaped_object %}Deleting the {{ object_name }} '{{ escaped_object }}' would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktrans %}</h2>
+ <div class="row">
+ <ul class="rte">
+ {% for obj in perms_lacking %}
+ <li>{{ obj }}</li>
+ {% endfor %}
+ </ul>
+ </div>
+ {% endif %}
+ {% if protected %}
+ <h2>{% blocktrans with object as escaped_object %}Deleting the {{ object_name }} '{{ escaped_object }}' would require deleting the following protected related objects:{% endblocktrans %}</h2>
+ <div class="row">
+ <ul class="rte">
+ {% for obj in protected %}
+ <li>{{ obj }}</li>
+ {% endfor %}
+ </ul>
+ </div>
+ {% endif %}
+ </div>
+ {% else %}
+ <div class="module">
+ <h2>{% blocktrans with object as escaped_object %}Are you sure you want to delete the {{ object_name }} "{{ escaped_object }}"? All of the following related items will be deleted:{% endblocktrans %}</h2>
+ <div class="row">
+ <ul class="rte">{{ deleted_objects|unordered_list }}</ul>
+ </div>
+ </div>
+ <form action="" method="post">{% csrf_token %}
+ <div class="module footer">
+ <ul class="submit-row" {% if is_popup %}style="overflow: auto;"{% endif %}>
+ <li class="left cancel-button-container"><a href="../" class="cancel-link">{% trans "Cancel" %}</a></li>
+ <li class="submit-button-container"><input type="submit" value="{% trans "Yes, I'm sure" %}" class="default" /></li>
+ </ul><input type="hidden" name="post" value="yes" />
+ </div>
+ </form>
+ {% endif %}
+ </div>
+{% endblock %}
diff --git a/demo/grappelli/templates/admin/delete_selected_confirmation.html b/demo/grappelli/templates/admin/delete_selected_confirmation.html
new file mode 100644
index 0000000..b053b38
--- /dev/null
+++ b/demo/grappelli/templates/admin/delete_selected_confirmation.html
@@ -0,0 +1,66 @@
+{% extends "admin/base_site.html" %}
+
+<!-- LOADING -->
+{% load i18n l10n %}
+
+<!-- BREADCRUMBS -->
+{% block breadcrumbs %}
+ <div id="breadcrumbs">
+ <a href="../../">{% trans "Home" %}</a> &rsaquo;
+ <a href="../">{{ app_label|capfirst }}</a> &rsaquo;
+ <a href="./">{{ opts.verbose_name_plural|capfirst }}</a> &rsaquo;
+ {% trans 'Delete multiple objects' %}
+ </div>
+{% endblock %}
+
+<!-- CONTENT -->
+{% block content %}
+ <div class="container-grid delete-confirmation">
+ {% if perms_lacking or protected %}
+ <div class="module">
+ {% if perms_lacking %}
+ <h2>{% blocktrans %}Deleting the {{ objects_name }} would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktrans %}</h2>
+ <div class="row">
+ <ul class="rte">
+ {% for obj in perms_lacking %}
+ <li>{{ obj }}</li>
+ {% endfor %}
+ </ul>
+ </div>
+ {% endif %}
+ {% if protected %}
+ <h2>{% blocktrans %}Deleting the selected {{ objects_name }} would require deleting the following protected related objects:{% endblocktrans %}</h2>
+ <div class="row">
+ <ul class="rte">
+ {% for obj in protected %}
+ <li>{{ obj }}</li>
+ {% endfor %}
+ </ul>
+ </div>
+ {% endif %}
+ </div>
+ {% else %}
+ <div class="module">
+ <h2>{% blocktrans %}Are you sure you want to delete the selected {{ objects_name }} objects? All of the following objects and their related items will be deleted:{% endblocktrans %}</h2>
+ {% for deleteable_object in deletable_objects %}
+ <div class="row">
+ <ul class="rte">{{ deleteable_object|unordered_list }}</ul>
+ </div>
+ {% endfor %}
+ </div>
+ <form action="" method="post">{% csrf_token %}
+ <div class="module footer">
+ {% for obj in queryset %}
+ <input type="hidden" name="{{ action_checkbox_name }}" value="{{ obj.pk|unlocalize }}" />
+ {% endfor %}
+ <input type="hidden" name="action" value="delete_selected" />
+ <input type="hidden" name="post" value="yes" />
+ <ul class="submit-row" {% if is_popup %}style="overflow: auto;"{% endif %}>
+ <li class="left cancel-button-container"><a href="." class="cancel-link">{% trans "Cancel" %}</a></li>
+ <li class="submit-button-container"><input type="submit" value="{% trans "Yes, I'm sure" %}" class="default" /></li>
+ </ul><input type="hidden" name="post" value="yes" />
+ </div>
+ </form>
+ {% endif %}
+ </div>
+{% endblock %} \ No newline at end of file
diff --git a/demo/grappelli/templates/admin/edit_inline/stacked.html b/demo/grappelli/templates/admin/edit_inline/stacked.html
new file mode 100644
index 0000000..2567193
--- /dev/null
+++ b/demo/grappelli/templates/admin/edit_inline/stacked.html
@@ -0,0 +1,231 @@
+{% load i18n adminmedia grp_tags %}
+
+<!-- group -->
+<div class="group stacked {% if inline_admin_formset.opts.classes %} {{ inline_admin_formset.opts.classes|join:" " }}{% endif %}"
+ id="{{ inline_admin_formset.formset.prefix }}-group">
+ <h2 class="collapse-handler">{% if inline_admin_formset.opts.title %}{{ inline_admin_formset.opts.title }}{% else %}{{ inline_admin_formset.opts.verbose_name_plural|capfirst }}{% endif %}</h2>
+ <ul class="tools">
+ <li class="open-handler-container"><a href="javascript://" class="icon open-handler" title="{% trans 'Open All Items' %}"></a></li>
+ <li class="close-handler-container"><a href="javascript://" class="icon close-handler" title="{% trans 'Close All Items' %}"></a></li>
+ <li class="add-handler-container"><a href="javascript://" class="icon add-handler" title="{% trans 'Add Item' %}"> </a></li>
+ </ul>
+ {{ inline_admin_formset.formset.management_form }}
+ {{ inline_admin_formset.formset.non_form_errors }}
+ <!-- container -->
+ <div class="items">
+ {% with inline_admin_formset.opts.sortable_field_name|default:"" as sortable_field_name %}
+ {% for inline_admin_form in inline_admin_formset|formsetsort:sortable_field_name %}
+ <!-- element -->
+ <div class="module collapse closed{% if inline_admin_form.original or inline_admin_form.show_url %} has_original{% endif %}{% if forloop.last %} empty-form{% endif %}"
+ id="{{ inline_admin_formset.formset.prefix }}{% if forloop.last %}-empty{% else %}{{ forloop.counter0 }}{% endif %}">
+ <h3 class="collapse-handler">{{ inline_admin_formset.opts.verbose_name|title }}&nbsp;&nbsp;{% if inline_admin_form.original %}{{ inline_admin_form.original }}{% endif %}</h3>
+ <ul class="tools">
+ {% if inline_admin_form.show_url %}<li class="viewsite-link-container"><a href="../../../r/{{ inline_admin_form.original_content_type_id }}/{{ inline_admin_form.original.id }}/" class="icon viewsite-link" title="{% trans 'View on Site' %}" target="_blank"></a></li>{% endif %}
+ {% if inline_admin_formset.opts.sortable_field_name %}
+ <li class="drag-handler-container"><a href="javascript://" class="icon drag-handler" title="{% trans 'Move Item' %}"></a></li>
+ {% endif %}
+ {% if inline_admin_formset.formset.can_delete %}
+ {% if inline_admin_form.original %}
+ <li class="delete-handler-container">{{ inline_admin_form.deletion_field.field }}<a href="javascript://" class="icon delete-handler" title="{% trans 'Delete Item' %}"></a></li>
+ {% else %}
+ <li class="remove-handler-container">{{ inline_admin_form.deletion_field.field }}<a href="javascript://" class="icon remove-handler" title="{% trans 'Delete Item' %}"></a></li>
+ {% endif %}
+ {% endif %}
+ </ul>
+ {% if inline_admin_form.form.non_field_errors %}
+ <ul class="errorlist">
+ <li>{{ inline_admin_form.form.non_field_errors }}</li>
+ </ul>
+ {% endif %}
+ {% for fieldset in inline_admin_form %}
+ {% include "admin/includes/fieldset_inline.html" %}
+ {% endfor %}
+ {{ inline_admin_form.pk_field.field }}
+ {{ inline_admin_form.fk_field.field }}
+ </div>
+ {% endfor %}
+ {% endwith %}
+ {{ inline_admin_formset.extra_forms }}
+ </div>
+ <div class="module add-item">
+ <a href="javascript://" class="add-handler">{% blocktrans with inline_admin_formset.opts.verbose_name|title as verbose_name %}Add another {{ verbose_name }}{% endblocktrans %}</a>
+ <ul class="tools">
+ <li class="add-handler-container"><a href="javascript://" class="icon add-handler" title="{% trans 'Add Item' %}"> </a></li>
+ </ul><br clear="all" />
+ </div>
+</div>
+
+<script type="text/javascript">
+(function($) {
+ $(document).ready(function() {
+
+ var prefix = "{{ inline_admin_formset.formset.prefix }}";
+ var related_lookup_fields_fk = {% get_related_lookup_fields_fk inline_admin_formset.opts %};
+ var related_lookup_fields_m2m = {% get_related_lookup_fields_m2m inline_admin_formset.opts %};
+ var related_lookup_fields_generic = {% get_related_lookup_fields_generic inline_admin_formset.opts %};
+ var autocomplete_fields_fk = {% get_autocomplete_lookup_fields_fk inline_admin_formset.opts %};
+ var autocomplete_fields_m2m = {% get_autocomplete_lookup_fields_m2m inline_admin_formset.opts %};
+ var autocomplete_fields_generic = {% get_autocomplete_lookup_fields_generic inline_admin_formset.opts %};
+ $.each(related_lookup_fields_fk, function() {
+ $("#{{ inline_admin_formset.formset.prefix }}-group > div.items > div:not(.empty-form)")
+ .find("input[name^='" + prefix + "'][name$='" + this + "']")
+ .grp_related_fk({lookup_url:"{% url grp_related_lookup %}"});
+ });
+ $.each(related_lookup_fields_m2m, function() {
+ $("#{{ inline_admin_formset.formset.prefix }}-group > div.items > div:not(.empty-form)")
+ .find("input[name^='" + prefix + "'][name$='" + this + "']")
+ .grp_related_m2m({lookup_url:"{% url grp_m2m_lookup %}"});
+ });
+ $.each(related_lookup_fields_generic, function() {
+ var content_type = this[0],
+ object_id = this[1];
+ $("#{{ inline_admin_formset.formset.prefix }}-group > div.items > div:not(.empty-form)")
+ .find("input[name^='" + prefix + "'][name$='" + this[1] + "']")
+ .each(function() {
+ var i = $(this).attr("id").match(/-\d+-/);
+ if (i) {
+ var ct_id = "#id_" + prefix + i[0] + content_type,
+ obj_id = "#id_" + prefix + i[0] + object_id;
+ $(this).grp_related_generic({content_type:ct_id, object_id:obj_id, lookup_url:"{% url grp_related_lookup %}"});
+ }
+ });
+ });
+ $.each(autocomplete_fields_fk, function() {
+ $("#{{ inline_admin_formset.formset.prefix }}-group > div.items > div:not(.empty-form)")
+ .find("input[name^='" + prefix + "'][name$='" + this + "']")
+ .each(function() {
+ $(this).grp_autocomplete_fk({
+ lookup_url:"{% url grp_related_lookup %}",
+ autocomplete_lookup_url:"{% url grp_autocomplete_lookup %}"
+ });
+ });
+ });
+ $.each(autocomplete_fields_m2m, function() {
+ $("#{{ inline_admin_formset.formset.prefix }}-group > div.items > div:not(.empty-form)")
+ .find("input[name^='" + prefix + "'][name$='" + this + "']")
+ .each(function() {
+ $(this).grp_autocomplete_m2m({
+ lookup_url:"{% url grp_m2m_lookup %}",
+ autocomplete_lookup_url:"{% url grp_autocomplete_lookup %}"
+ });
+ });
+ });
+ $.each(autocomplete_fields_generic, function() {
+ var content_type = this[0],
+ object_id = this[1];
+ $("#{{ inline_admin_formset.formset.prefix }}-group > div.items > div:not(.empty-form)")
+ .find("input[name^='" + prefix + "'][name$='" + this[1] + "']")
+ .each(function() {
+ var i = $(this).attr("id").match(/-\d+-/);
+ if (i) {
+ var ct_id = "#id_" + prefix + i[0] + content_type,
+ obj_id = "#id_" + prefix + i[0] + object_id;
+ $(this).grp_autocomplete_generic({
+ content_type:ct_id,
+ object_id:obj_id,
+ lookup_url:"{% url grp_related_lookup %}",
+ autocomplete_lookup_url:"{% url grp_autocomplete_lookup %}"
+ });
+ }
+ });
+ });
+
+ $("#{{ inline_admin_formset.formset.prefix }}-group").grp_inline({
+ prefix: "{{ inline_admin_formset.formset.prefix }}",
+ onAfterRemoved: function(inline) {},
+ onAfterAdded: function(form) {
+ grappelli.reinitDateTimeFields(form);
+ grappelli.updateSelectFilter(form);
+ $.each(related_lookup_fields_fk, function() {
+ form.find("input[name^='" + prefix + "'][name$='" + this + "']")
+ .grp_related_fk({lookup_url:"{% url grp_related_lookup %}"});
+ });
+ $.each(related_lookup_fields_m2m, function() {
+ form.find("input[name^='" + prefix + "'][name$='" + this + "']")
+ .grp_related_m2m({lookup_url:"{% url grp_m2m_lookup %}"});
+ });
+ $.each(related_lookup_fields_generic, function() {
+ var content_type = this[0],
+ object_id = this[1];
+ form.find("input[name^='" + prefix + "'][name$='" + this[1] + "']")
+ .each(function() {
+ var i = $(this).attr("id").match(/-\d+-/);
+ if (i) {
+ var ct_id = "#id_" + prefix + i[0] + content_type,
+ obj_id = "#id_" + prefix + i[0] + object_id;
+ $(this).grp_related_generic({content_type:ct_id, object_id:obj_id, lookup_url:"{% url grp_related_lookup %}"});
+ }
+ });
+ });
+ $.each(autocomplete_fields_fk, function() {
+ form.find("input[name^='" + prefix + "'][name$='" + this + "']")
+ .each(function() {
+ $(this).grp_autocomplete_fk({
+ lookup_url:"{% url grp_related_lookup %}",
+ autocomplete_lookup_url:"{% url grp_autocomplete_lookup %}"
+ });
+ });
+ });
+ $.each(autocomplete_fields_m2m, function() {
+ form.find("input[name^='" + prefix + "'][name$='" + this + "']")
+ .each(function() {
+ $(this).grp_autocomplete_m2m({
+ lookup_url:"{% url grp_m2m_lookup %}",
+ autocomplete_lookup_url:"{% url grp_autocomplete_lookup %}"
+ });
+ });
+ });
+ $.each(autocomplete_fields_generic, function() {
+ var content_type = this[0],
+ object_id = this[1];
+ form.find("input[name^='" + prefix + "'][name$='" + this[1] + "']")
+ .each(function() {
+ var i = $(this).attr("id").match(/-\d+-/);
+ if (i) {
+ var ct_id = "#id_" + prefix + i[0] + content_type,
+ obj_id = "#id_" + prefix + i[0] + object_id;
+ $(this).grp_autocomplete_generic({
+ content_type:ct_id,
+ object_id:obj_id,
+ lookup_url:"{% url grp_related_lookup %}",
+ autocomplete_lookup_url:"{% url grp_autocomplete_lookup %}"
+ });
+ }
+ });
+ });
+ form.grp_collapsible();
+ form.find(".collapse").grp_collapsible();
+ }
+ });
+
+ {% if inline_admin_formset.opts.sortable_field_name %}
+ $("#{{ inline_admin_formset.formset.prefix }}-group > div.items").sortable({
+ handle: "a.drag-handler",
+ items: "div.dynamic-form",
+ axis: "y",
+ appendTo: 'body',
+ forceHelperSize: true,
+ placeholder: 'ui-sortable-placeholder',
+ forcePlaceholderSize: true,
+ containment: '#{{ inline_admin_formset.formset.prefix }}-group > div.items',
+ tolerance: 'pointer',
+ start: function(evt, ui) {
+ ui.placeholder.height(ui.item.height() + 12);
+ },
+ });
+ $("#{{ opts.module_name }}_form").bind("submit", function(){
+ var sortable_field_name = "{{ inline_admin_formset.opts.sortable_field_name }}";
+ var i = 0;
+ $("#{{ inline_admin_formset.formset.prefix }}-group").find("div.dynamic-form").each(function(){
+ var fields = $(this).find("fieldset :input[value]");
+ if (fields.serialize()) {
+ $(this).find("input[name$='"+sortable_field_name+"']").val(i);
+ i++;
+ }
+ });
+ });
+ {% endif %}
+
+ });
+})(django.jQuery);
+</script>
diff --git a/demo/grappelli/templates/admin/edit_inline/tabular.html b/demo/grappelli/templates/admin/edit_inline/tabular.html
new file mode 100644
index 0000000..7b0ac73
--- /dev/null
+++ b/demo/grappelli/templates/admin/edit_inline/tabular.html
@@ -0,0 +1,275 @@
+{% load i18n adminmedia grp_tags %}
+
+<!-- group -->
+<div class="group tabular{% if inline_admin_formset.opts.classes %} {{ inline_admin_formset.opts.classes|join:" " }}{% endif %}"
+ id="{{ inline_admin_formset.formset.prefix }}-group" >
+ <h2 class="collapse-handler">{% if inline_admin_formset.opts.title %}{{ inline_admin_formset.opts.title }}{% else %}{{ inline_admin_formset.opts.verbose_name_plural|capfirst }}{% endif %}</h2>
+ <ul class="tools">
+ <li class="add-handler-container"><a href="javascript://" class="icon add-handler" title="{% trans 'Add Another' %}"> </a></li>
+ </ul>
+ {{ inline_admin_formset.formset.management_form }}
+ {{ inline_admin_formset.formset.non_form_errors }}
+ <!-- container -->
+ <div class="module table">
+ <div class="module thead">
+ <div class="tr">
+ {% for field in inline_admin_formset.fields %}
+ {% if not field.widget.is_hidden %}
+ <div class="th {{ field.label|lower|slugify }}{% if field.required %} required{% endif %}">{{ field.label|capfirst }}</div>
+ {% endif %}
+ {% endfor %}
+ {% if inline_admin_formset.formset.can_delete %}<div class="th">&nbsp;</div>{% endif %}
+ </div>
+ </div>
+ {% with inline_admin_formset.opts.sortable_field_name|default:"" as sortable_field_name %}
+ {% for inline_admin_form in inline_admin_formset|formsetsort:sortable_field_name %}
+ <!-- element -->
+ <div class="module tbody{% if inline_admin_form.original or inline_admin_form.show_url %} has_original{% endif %}{% if forloop.last %} empty-form{% endif %}"
+ id="{{ inline_admin_formset.formset.prefix }}{% if not forloop.last %}{{ forloop.counter0 }}{% else %}-empty{% endif %}">
+ {% if inline_admin_form.form.non_field_errors %}
+ <ul class="errorlist"><li>{{ inline_admin_form.form.non_field_errors }}</li></ul>
+ {% endif %}
+ <h3 style="display: none;"><b>{{ inline_admin_formset.opts.verbose_name|title }} #{{ forloop.counter }}</b>&nbsp;&nbsp;{% if inline_admin_form.original %} {{ inline_admin_form.original }}{% endif %}</h3>
+ {% spaceless %}
+ {% for fieldset in inline_admin_form %}
+ {% for line in fieldset %}
+ {% for field in line %}
+ {% if field.field.is_hidden %} {{ field.field }} {% endif %}
+ {% endfor %}
+ {% endfor %}
+ {% endfor %}
+ {% endspaceless %}
+ <div class="tr">
+ {% for fieldset in inline_admin_form %}
+ {% for line in fieldset %}
+ {% for field in line %}
+ {% if not field.field.is_hidden %}
+ <div class="td {{ field.field.name }} {% if field.field.errors %} error{% endif %}">
+ {% if field.is_readonly %}
+ <p>{{ field.contents }}</p>
+ {% else %}
+ {{ field.field }}
+ {{ field.field.errors.as_ul }}
+ {% endif %}
+ {% if field.field.help_text %}<p class="help">{{ field.field.help_text }}</p>{% endif %}
+ </div>
+ {% endif %}
+ {% endfor %}
+ {% endfor %}
+ {% endfor %}
+ <div class="td tools">
+ {% spaceless %}
+ <ul class="tools">
+ {% if inline_admin_form.show_url %}<li class="viewsite-link-container"><a href="../../../r/{{ inline_admin_form.original_content_type_id }}/{{ inline_admin_form.original.id }}/" class="icon viewsite-link" title="{% trans 'View on Site' %}" target="_blank"> </a></li>{% endif %}
+ {% if inline_admin_formset.opts.sortable_field_name %}
+ <li class="drag-handler-container"><a href="javascript://" class="icon drag-handler" title="{% trans 'Move Item' %}"></a></li>
+ {% endif %}
+ {% if inline_admin_formset.formset.can_delete %}
+ <li class="delete-handler-container">{{ inline_admin_form.deletion_field.field }}<a href="javascript://" class="icon {% if inline_admin_form.original %}delete-handler{% else %}remove-handler{% endif %}" title="{% trans 'Remove' %}"> </a></li>
+ {% else %}
+ {% if inline_admin_form.original %}
+ <li class="delete-handler-container">&nbsp;</li>
+ {% else %}
+ <li class="delete-handler-container"><a href="javascript://" class="icon remove-handler" title="{% trans 'Remove' %}"> </a></li>
+ {% endif %}
+ {% endif %}
+ </ul>
+ {% endspaceless %}
+ </div>
+ {{ inline_admin_form.fk_field.field }}
+ {% if inline_admin_form.has_auto_field %}{{ inline_admin_form.pk_field.field }}{% endif %}
+ </div>
+ </div>
+ {% endfor %}
+ {% endwith %}
+ </div>
+ <div class="module add-item">
+ <a href="javascript://" class="add-handler">{% blocktrans with inline_admin_formset.opts.verbose_name|title as verbose_name %}Add another {{ verbose_name }}{% endblocktrans %}</a>
+ <ul class="tools">
+ <li class="add-handler-container"><a href="javascript://" class="icon add-handler" title="{% trans 'Add Item' %}"> </a></li>
+ </ul><br clear="all" />
+ </div>
+</div>
+
+<script type="text/javascript">
+(function($) {
+ $(document).ready(function($) {
+
+ var prefix = "{{ inline_admin_formset.formset.prefix }}";
+ var related_lookup_fields_fk = {% get_related_lookup_fields_fk inline_admin_formset.opts %};
+ var related_lookup_fields_m2m = {% get_related_lookup_fields_m2m inline_admin_formset.opts %};
+ var related_lookup_fields_generic = {% get_related_lookup_fields_generic inline_admin_formset.opts %};
+ var autocomplete_fields_fk = {% get_autocomplete_lookup_fields_fk inline_admin_formset.opts %};
+ var autocomplete_fields_m2m = {% get_autocomplete_lookup_fields_m2m inline_admin_formset.opts %};
+ var autocomplete_fields_generic = {% get_autocomplete_lookup_fields_generic inline_admin_formset.opts %};
+ $.each(related_lookup_fields_fk, function() {
+ $("#{{ inline_admin_formset.formset.prefix }}-group > div.table > div:not(.empty-form)")
+ .find("input[name^='" + prefix + "'][name$='" + this + "']")
+ .grp_related_fk({lookup_url:"{% url grp_related_lookup %}"});
+ });
+ $.each(related_lookup_fields_m2m, function() {
+ $("#{{ inline_admin_formset.formset.prefix }}-group > div.table > div:not(.empty-form)")
+ .find("input[name^='" + prefix + "'][name$='" + this + "']")
+ .grp_related_m2m({lookup_url:"{% url grp_m2m_lookup %}"});
+ });
+ $.each(related_lookup_fields_generic, function() {
+ var content_type = this[0],
+ object_id = this[1];
+ $("#{{ inline_admin_formset.formset.prefix }}-group > div.table > div:not(.empty-form)")
+ .find("input[name^='" + prefix + "'][name$='" + this[1] + "']")
+ .each(function() {
+ var i = $(this).attr("id").match(/-\d+-/);
+ if (i) {
+ var ct_id = "#id_" + prefix + i[0] + content_type,
+ obj_id = "#id_" + prefix + i[0] + object_id;
+ $(this).grp_related_generic({content_type:ct_id, object_id:obj_id, lookup_url:"{% url grp_related_lookup %}"});
+ }
+ });
+ });
+ $.each(autocomplete_fields_fk, function() {
+ $("#{{ inline_admin_formset.formset.prefix }}-group > div.table > div:not(.empty-form)")
+ .find("input[name^='" + prefix + "'][name$='" + this + "']")
+ .each(function() {
+ $(this).grp_autocomplete_fk({
+ lookup_url:"{% url grp_related_lookup %}",
+ autocomplete_lookup_url:"{% url grp_autocomplete_lookup %}"
+ });
+ });
+ });
+ $.each(autocomplete_fields_m2m, function() {
+ $("#{{ inline_admin_formset.formset.prefix }}-group > div.table > div:not(.empty-form)")
+ .find("input[name^='" + prefix + "'][name$='" + this + "']")
+ .each(function() {
+ $(this).grp_autocomplete_m2m({
+ lookup_url:"{% url grp_m2m_lookup %}",
+ autocomplete_lookup_url:"{% url grp_autocomplete_lookup %}"
+ });
+ });
+ });
+ $.each(autocomplete_fields_generic, function() {
+ var content_type = this[0],
+ object_id = this[1];
+ $("#{{ inline_admin_formset.formset.prefix }}-group > div.table > div:not(.empty-form)")
+ .find("input[name^='" + prefix + "'][name$='" + this[1] + "']")
+ .each(function() {
+ var i = $(this).attr("id").match(/-\d+-/);
+ if (i) {
+ var ct_id = "#id_" + prefix + i[0] + content_type,
+ obj_id = "#id_" + prefix + i[0] + object_id;
+ $(this).grp_autocomplete_generic({
+ content_type:ct_id,
+ object_id:obj_id,
+ lookup_url:"{% url grp_related_lookup %}",
+ autocomplete_lookup_url:"{% url grp_autocomplete_lookup %}"
+ });
+ }
+ });
+ });
+
+ $("#{{ inline_admin_formset.formset.prefix }}-group").grp_inline({
+ prefix: "{{ inline_admin_formset.formset.prefix }}",
+ onBeforeAdded: function(inline) {},
+ onAfterAdded: function(form) {
+ grappelli.reinitDateTimeFields(form);
+ grappelli.updateSelectFilter(form);
+ $.each(related_lookup_fields_fk, function() {
+ form.find("input[name^='" + prefix + "'][name$='" + this + "']")
+ .grp_related_fk({lookup_url:"{% url grp_related_lookup %}"});
+ });
+ $.each(related_lookup_fields_m2m, function() {
+ form.find("input[name^='" + prefix + "'][name$='" + this + "']")
+ .grp_related_m2m({lookup_url:"{% url grp_m2m_lookup %}"});
+ });
+ $.each(related_lookup_fields_generic, function() {
+ var content_type = this[0],
+ object_id = this[1];
+ form.find("input[name^='" + prefix + "'][name$='" + this[1] + "']")
+ .each(function() {
+ var i = $(this).attr("id").match(/-\d+-/);
+ if (i) {
+ var ct_id = "#id_" + prefix + i[0] + content_type,
+ obj_id = "#id_" + prefix + i[0] + object_id;
+ $(this).grp_related_generic({content_type:ct_id, object_id:obj_id, lookup_url:"{% url grp_related_lookup %}"});
+ }
+ });
+ });
+ $.each(autocomplete_fields_fk, function() {
+ form.find("input[name^='" + prefix + "'][name$='" + this + "']")
+ .each(function() {
+ $(this).grp_autocomplete_fk({
+ lookup_url:"{% url grp_related_lookup %}",
+ autocomplete_lookup_url:"{% url grp_autocomplete_lookup %}"
+ });
+ });
+ });
+ $.each(autocomplete_fields_m2m, function() {
+ form.find("input[name^='" + prefix + "'][name$='" + this + "']")
+ .each(function() {
+ $(this).grp_autocomplete_m2m({
+ lookup_url:"{% url grp_m2m_lookup %}",
+ autocomplete_lookup_url:"{% url grp_autocomplete_lookup %}"
+ });
+ });
+ });
+ $.each(autocomplete_fields_generic, function() {
+ var content_type = this[0],
+ object_id = this[1];
+ form.find("input[name^='" + prefix + "'][name$='" + this[1] + "']")
+ .each(function() {
+ var i = $(this).attr("id").match(/-\d+-/);
+ if (i) {
+ var ct_id = "#id_" + prefix + i[0] + content_type,
+ obj_id = "#id_" + prefix + i[0] + object_id;
+ $(this).grp_autocomplete_generic({
+ content_type:ct_id,
+ object_id:obj_id,
+ lookup_url:"{% url grp_related_lookup %}",
+ autocomplete_lookup_url:"{% url grp_autocomplete_lookup %}"
+ });
+ }
+ });
+ });
+ },
+ });
+
+ {% if inline_admin_formset.opts.sortable_field_name %}
+ $("#{{ inline_admin_formset.formset.prefix }}-group > div.table").sortable({
+ handle: "a.drag-handler",
+ items: "div.dynamic-form",
+ axis: "y",
+ appendTo: 'body',
+ forceHelperSize: true,
+ placeholder: 'ui-sortable-placeholder',
+ forcePlaceholderSize: true,
+ containment: '#{{ inline_admin_formset.formset.prefix }}-group > div.table',
+ tolerance: 'pointer',
+ start: function(evt, ui) {
+ var template = "<div class='tr'>",
+ len = ui.item.find("div.tr").children("div.td").length;
+ for (var i = 0; i < len; i++) {
+ template += "<div class='td' style='height:" + (ui.item.outerHeight() + 12 ) + "px'>&nbsp;</div>"
+ }
+ template += "</div>"
+ ui.placeholder.addClass("tbody module").append(template);
+ },
+ stop: function(evt, ui) {
+ // Toggle div.table twice to remove webkits border-spacing bug
+ $("#{{ inline_admin_formset.formset.prefix }}-group > div.table").toggle().toggle();
+ },
+ });
+ $("#{{ opts.module_name }}_form").bind("submit", function(){
+ var sortable_field_name = "{{ inline_admin_formset.opts.sortable_field_name }}";
+ var i = 0;
+ $("#{{ inline_admin_formset.formset.prefix }}-group").find("div.tbody.dynamic-form").each(function(){
+ var fields = $(this).find("div.td :input[value]");
+ if (fields.serialize()) {
+ $(this).find("input[name$='"+sortable_field_name+"']").val(i);
+ i++;
+ }
+ });
+ });
+ {% endif %}
+
+ });
+})(django.jQuery);
+</script>
diff --git a/demo/grappelli/templates/admin/filter.html b/demo/grappelli/templates/admin/filter.html
new file mode 100644
index 0000000..07756b6
--- /dev/null
+++ b/demo/grappelli/templates/admin/filter.html
@@ -0,0 +1,7 @@
+{% load i18n %}
+<div class="filter">
+ <label>{% blocktrans with title as filter_title %}{{ filter_title }}{% endblocktrans %}</label>
+ <select class="filter_choice">
+ {% for choice in choices %}<option value="{{ choice.query_string|iriencode }}"{% if choice.selected %} selected='selected'{% endif %}>{{ choice.display|safe }}</option>{% endfor %}
+ </select>
+</div> \ No newline at end of file
diff --git a/demo/grappelli/templates/admin/includes/fieldset.html b/demo/grappelli/templates/admin/includes/fieldset.html
new file mode 100644
index 0000000..4074adf
--- /dev/null
+++ b/demo/grappelli/templates/admin/includes/fieldset.html
@@ -0,0 +1,33 @@
+{% spaceless %}
+ <fieldset class="module {{ fieldset.classes }}">
+ {% if fieldset.name %}<h2 class="collapse-handler">{{ fieldset.name }}</h2>{% endif %}
+ {% if fieldset.description %}<div class="description">{{ fieldset.description|safe }}</div>{% endif %}
+ {% for line in fieldset %}
+ <div class="row cells-{{ line.fields|length }}{% if not line.fields|length_is:"1" %} cells{% else %}{% if line.errors %} errors{% endif %}{% endif %}{% for field in line %} {{ field.field.name }}{% endfor %} ">
+ {% for field in line %}
+ <div{% if not line.fields|length_is:"1" %} class="cell {{ field.field.name }}{% if field.field.errors %} error{% endif %}"{% endif %}>
+ {% if field.is_checkbox %}
+ <div class="column span-4">&nbsp;</div>
+ <div class="column span-flexible">
+ {{ field.field }}{{ field.label_tag }}
+ {% else %}
+ <div class="column span-4">{{ field.label_tag }}</div>
+ <div class="column span-flexible">
+ {% if field.is_readonly %}
+ <p class="readonly">{{ field.contents }}</p>
+ {% else %}
+ {{ field.field }}
+ {% endif %}
+ {% endif %}
+ {% if line.fields|length_is:'1' %}{{ line.errors }}{% endif %}
+ {% if not line.fields|length_is:'1' and not field.is_readonly %}{{ field.field.errors }}{% endif %}
+ {% if field.field.field.help_text %}
+ <p class="help">{{ field.field.field.help_text|safe }}</p>
+ {% endif %}
+ </div>
+ </div>
+ {% endfor %}
+ </div>
+ {% endfor %}
+ </fieldset>
+{% endspaceless %} \ No newline at end of file
diff --git a/demo/grappelli/templates/admin/includes/fieldset_inline.html b/demo/grappelli/templates/admin/includes/fieldset_inline.html
new file mode 100644
index 0000000..0103ed8
--- /dev/null
+++ b/demo/grappelli/templates/admin/includes/fieldset_inline.html
@@ -0,0 +1,33 @@
+{% spaceless %}
+ <fieldset class="module {{ fieldset.classes }}">
+ {% if fieldset.name %}<h4 class="collapse-handler">{{ fieldset.name }}</h4>{% endif %}
+ {% if fieldset.description %}<div class="description">{{ fieldset.description|safe }}</div>{% endif %}
+ {% for line in fieldset %}
+ <div class="row cells-{{ line.fields|length }}{% if not line.fields|length_is:"1" %} cells{% else %}{% if line.errors %} errors{% endif %}{% endif %}{% for field in line %} {{ field.field.name }}{% endfor %} ">
+ {% for field in line %}
+ <div{% if not line.fields|length_is:"1" %} class="cell {{ field.field.name }}{% if field.field.errors %} error{% endif %}"{% endif %}>
+ {% if field.is_checkbox %}
+ <div class="column span-4">&nbsp;</div>
+ <div class="column span-flexible">
+ {{ field.field }}{{ field.label_tag }}
+ {% else %}
+ <div class="column span-4">{{ field.label_tag }}</div>
+ <div class="column span-flexible">
+ {% if field.is_readonly %}
+ <p class="readonly">{{ field.contents }}</p>
+ {% else %}
+ {{ field.field }}
+ {% endif %}
+ {% endif %}
+ {% if line.fields|length_is:'1' %}{{ line.errors }}{% endif %}
+ {% if not line.fields|length_is:'1' and not field.is_readonly %}{{ field.field.errors }}{% endif %}
+ {% if field.field.field.help_text %}
+ <p class="help">{{ field.field.field.help_text|safe }}</p>
+ {% endif %}
+ </div>
+ </div>
+ {% endfor %}
+ </div>
+ {% endfor %}
+ </fieldset>
+{% endspaceless %} \ No newline at end of file
diff --git a/demo/grappelli/templates/admin/includes_grappelli/header.html b/demo/grappelli/templates/admin/includes_grappelli/header.html
new file mode 100644
index 0000000..fa79f9d
--- /dev/null
+++ b/demo/grappelli/templates/admin/includes_grappelli/header.html
@@ -0,0 +1,56 @@
+{% load i18n grp_tags %}
+
+<div id="header">
+ <div class="branding">&nbsp;</div>
+ <!-- Title -->
+ <div class="admin-title">{% if grappelli_admin_title %}{{ grappelli_admin_title }}{% else %}{% get_admin_title %}{% endif %}</div>
+ {% if user.is_authenticated and user.is_staff %}
+ <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 -->
+ {% url admin:logout as logout_url %}
+ {% if logout_url %}
+ <li><a href="{{ logout_url }}">
+ {% else %}
+ <li><a href="{{ root_path }}logout/">
+ {% endif %}
+ {% 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 %}
+ {% endblock %}
+ </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/demo/grappelli/templates/admin/index.html b/demo/grappelli/templates/admin/index.html
new file mode 100644
index 0000000..139c6c0
--- /dev/null
+++ b/demo/grappelli/templates/admin/index.html
@@ -0,0 +1,61 @@
+{% extends "admin/base_site.html" %}
+
+<!-- LOADING -->
+{% load i18n adminmedia grp_tags log %}
+
+<!-- JAVASCRIPTS -->
+{% block javascripts %}
+ {{ block.super }}
+{% endblock %}
+
+<!-- COLTYPE/BODYCLASS-- >
+{% block bodyclass %}dashboard{% endblock %}
+{% block content-class %}content-grid{% endblock %}
+
+<!-- BREADCRUMBS -->
+{% block breadcrumbs %}<div id="breadcrumbs">{% trans "Home" %}</div>{% endblock %}
+{% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
+
+<!-- CONTENT -->
+{% block content %}
+<div class="container-grid">
+ <div class="column span-12">
+ {% if app_list %}
+ {% for app in app_list %}
+ <div class="module" id="app_{{ app.name|lower }}">
+ <h2><a href="{{ app.app_url }}" class="section">{% trans app.name %}</a></h2>
+ {% for model in app.models %}
+ <div class="row">
+ {% if model.perms.change %}<a href="{{ model.admin_url }}">{{ model.name }}</a>{% else %}<span>{{ model.name }}</span>{% endif %}
+ <ul class="actions">
+ <li class="add-link">{% if model.perms.add %}<a href="{{ model.admin_url }}add/">{% trans 'Add' %}</a>{% else %}&nbsp;{% endif %}</li>
+ <li class="change-link"> {% if model.perms.change %}<a href="{{ model.admin_url }}">{% trans 'Change' %}</a>{% else %}&nbsp;{% endif %}</li>
+ </ul>
+ </div>
+ {% endfor %}
+ </div>
+ {% endfor %}
+ {% else %}
+ <p>{% trans "You don´t have permission to edit anything." %}</p>
+ {% endif %}
+ </div>
+ <div class="column span-6 last">
+ <div class="module actions" id="recent-actions-module">
+ <h2>{% trans 'Recent Actions' %}</h2>
+ <div class="module">
+ <h3>{% trans 'My Actions' %}</h3>
+ {% get_admin_log 10 as admin_log for_user user %}
+ {% if not admin_log %}
+ <p>{% trans 'None available' %}</p>
+ {% else %}
+ <ul>
+ {% for entry in admin_log %}
+ <li class="{% if entry.is_addition %}add-link{% endif %}{% if entry.is_change %}change-link{% endif %}{% if entry.is_deletion %}delete-link{% endif %}">{% if not entry.is_deletion %}<a href="{{ entry.get_admin_url }}">{% endif %}{{ entry.object_repr }}{% if not entry.is_deletion %}</a>{% endif %}<br /><span class="mini quiet">{% filter capfirst %}{% trans entry.content_type.name %}{% endfilter %}</span></li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ </div>
+ </div>
+ </div>
+</div>
+{% endblock %}
diff --git a/demo/grappelli/templates/admin/invalid_setup.html b/demo/grappelli/templates/admin/invalid_setup.html
new file mode 100644
index 0000000..f3e097e
--- /dev/null
+++ b/demo/grappelli/templates/admin/invalid_setup.html
@@ -0,0 +1,12 @@
+{% extends "admin/base_site.html" %}
+
+<!-- LOADING -->
+{% load i18n %}
+
+<!-- BREADCRUMBS -->
+{% block breadcrumbs %}<div id="breadcrumbs"><a href="../../">{% trans 'Home' %}</a> &rsaquo; {{ title }}</div>{% endblock %}
+
+<!-- CONTENT -->
+{% block content %}
+ <p>{% trans "Something's wrong with your database installation. Make sure the appropriate database tables have been created, and make sure the database is readable by the appropriate user." %}</p>
+{% endblock %}
diff --git a/demo/grappelli/templates/admin/login.html b/demo/grappelli/templates/admin/login.html
new file mode 100644
index 0000000..f4e5287
--- /dev/null
+++ b/demo/grappelli/templates/admin/login.html
@@ -0,0 +1,66 @@
+{% extends "admin/base_site.html" %}
+
+<!-- LOADING -->
+{% load i18n %} {# grp_csrf #}
+
+<!-- BODYCLASS -->
+{% block bodyclass %}login{% endblock %}
+{% block content-class %}content-flexible{% endblock %}
+{% block content_title %}{% endblock %}
+
+<!-- EXTRAHEAD-->
+{% block extrahead %}
+ <script type="text/javascript">
+ (function($) {
+ $(window).load(function(){ $('#id_username').focus(); });
+ })(django.jQuery);
+ </script>
+{% endblock %}
+
+<!-- BREADCRUMBS -->
+{% block breadcrumbs %}{% endblock %}
+
+<!-- CONTENT -->
+{% block content %}
+ <div class="container-flexible login">
+ <div class="column span-12 centered">
+ {% if form.errors and not form.non_field_errors and not form.this_is_the_login_form.errors %}
+ <p class="errornote">
+ {% blocktrans count form.errors.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
+ </p>
+ {% endif %}
+ {% if form.non_field_errors or form.this_is_the_login_form.errors %}
+ {% for error in form.non_field_errors|add:form.this_is_the_login_form.errors %}
+ <p class="errornote">{{ error }}</p>
+ {% endfor %}
+ {% endif %}
+ {% if error_message %}<p class="errornote login-errors">{{ error_message }}</p>{% endif %}
+ <form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
+ <fieldset class="module">
+ <div class="row">
+
+ <div class="column span-4"><label for="id_username" class="required">{% trans 'Username:' %}</label></div>
+ <div class="column span-8 last">
+ <input type="text" name="username" id="id_username" />
+ {% if not form.this_is_the_login_form.errors %}{{ form.username.errors }}{% endif %}
+ </div>
+ </div>
+ <div class="row">
+ <div class="column span-4"><label for="id_password" class="required">{% trans 'Password:' %}</label></div>
+ <div class="column span-8 last">
+ <input type="password" name="password" id="id_password" />
+ <input type="hidden" name="this_is_the_login_form" value="1" />
+ <input type="hidden" name="next" value="{{ next }}" />
+ {% if not form.this_is_the_login_form.errors %}{{ form.password.errors }}{% endif %}
+ </div>
+ </div>
+ </fieldset>
+ <div class="module submit-row">
+ <ul class="submit-row">
+ <li class="submit-button-container"><input type="submit" class="default" value="{% trans 'Log in' %}" /></li>
+ </ul>
+ </div>
+ </form>
+ </div>
+ </div>
+{% endblock %}
diff --git a/demo/grappelli/templates/admin/object_history.html b/demo/grappelli/templates/admin/object_history.html
new file mode 100644
index 0000000..1058fc9
--- /dev/null
+++ b/demo/grappelli/templates/admin/object_history.html
@@ -0,0 +1,51 @@
+{% extends "admin/base_site.html" %}
+
+<!-- LOADING -->
+{% load i18n %}
+
+<!-- BREADCRUMBS -->
+{% block breadcrumbs %}
+ <div id="breadcrumbs">
+ <a href="../../../../">{% trans 'Home' %}</a> &rsaquo;
+ <a href="../../../">{{ app_label|capfirst }}</a> &rsaquo;
+ <a href="../../">{{ module_name }}</a> &rsaquo;
+ <a href="../">{{ object|truncatewords:"18" }}</a> &rsaquo;
+ {% trans 'History' %}
+ </div>
+{% endblock %}
+
+<!-- CONTENT -->
+{% block content %}
+ <div class="container-grid object-history">
+ <div class="module">
+ {% if action_list %}
+ <table id="change-history">
+ <thead>
+ <tr>
+ <th scope="col">{% trans 'Date/time' %}</th>
+ <th scope="col">{% trans 'User' %}</th>
+ <th scope="col">{% trans 'Action' %}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for action in action_list %}
+ <tr>
+ <th scope="row">{{ action.action_time|date:_("DATETIME_FORMAT") }}</th>
+ <td>{{ action.user.username }}{% if action.user.get_full_name %} ({{ action.user.get_full_name }}){% endif %}</td>
+ <td>
+ {% ifequal forloop.counter 1 %}
+ {% trans "Created object" %}
+ {% else %}
+ {{ action.change_message }}
+ {% endifequal %}
+ </td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ {% else %}
+ <p>{% trans "This object doesn't have a change history. It probably wasn't added via this admin site." %}</p>
+ {% endif %}
+ </div>
+ </div>
+{% endblock %}
diff --git a/demo/grappelli/templates/admin/pagination.html b/demo/grappelli/templates/admin/pagination.html
new file mode 100644
index 0000000..ecd0859
--- /dev/null
+++ b/demo/grappelli/templates/admin/pagination.html
@@ -0,0 +1,30 @@
+{% load admin_list i18n %}
+
+{% spaceless %}
+ <div class="module pagination">
+ <ul class="pagination">
+ {% if cl.result_count != cl.full_result_count %}
+ <li class="results"><span>
+ {% blocktrans count cl.result_count as counter %}1 result{% plural %}{{ counter }} results{% endblocktrans %}
+ </span></li>
+ {% endif %}
+ <li class="results">
+ {% if cl.result_count != cl.full_result_count or cl.show_all %}
+ <a href="?{% if cl.is_popup %}pop=1{% endif %}" class="total">{% blocktrans with cl.full_result_count as full_result_count %}{{ full_result_count }} total{% endblocktrans %}</a>
+ {% else %}
+ <span>{% blocktrans with cl.full_result_count as full_result_count %}{{ full_result_count }} total{% endblocktrans %}</span>
+ {% endif %}
+ </li>
+ {% if pagination_required %}
+ {% for i in page_range %}
+ {% ifequal i "." %}
+ <li class="separator"><span>...</span></li>
+ {% else %}
+ <li>{% paginator_number cl i %}</li>
+ {% endifequal %}
+ {% endfor %}
+ {% endif %}
+ {% if show_all_url %}<li class="showall"><a href="{{ show_all_url }}">{% trans 'Show all' %}</a></li>{% endif %}
+ </ul><br clear="all" />
+ </div>
+{% endspaceless %} \ No newline at end of file
diff --git a/demo/grappelli/templates/admin/prepopulated_fields_js.html b/demo/grappelli/templates/admin/prepopulated_fields_js.html
new file mode 100644
index 0000000..7ab79e9
--- /dev/null
+++ b/demo/grappelli/templates/admin/prepopulated_fields_js.html
@@ -0,0 +1,17 @@
+<script type="text/javascript">
+ (function( $ ) {
+ {% for field in prepopulated_fields %}
+ $("#{{ field.field.auto_id }}").bind('change.grappelli', function() {
+ $(this).data('changed', true);
+ });
+ {% for dependency in field.dependencies %}
+ $("#{{ dependency.auto_id }}").bind('keyup.grappelli', function() {
+ var e = $("#{{ field.field.auto_id }}");
+ if (!e.data('changed')) {
+ e.val(URLify({% for innerdep in field.dependencies %}$("#{{ innerdep.auto_id }}").val(){% if not forloop.last %} + ' ' + {% endif %}{% endfor %}, {{ field.field.field.max_length|default_if_none:"50" }}));
+ }
+ });
+ {% endfor %}
+ {% endfor %}
+ })(django.jQuery);
+</script>
diff --git a/demo/grappelli/templates/admin/search_form.html b/demo/grappelli/templates/admin/search_form.html
new file mode 100644
index 0000000..48c4184
--- /dev/null
+++ b/demo/grappelli/templates/admin/search_form.html
@@ -0,0 +1,20 @@
+{% load adminmedia i18n grp_tags %}
+{% if cl.search_fields %}
+ {% comment %}{% get_search_fields_verbose cl.opts as search_fields_verbose %}{% endcomment %}
+ <!-- Search Form -->
+ <form id="changelist-search" action="" method="get">
+ <input type="text" name="{{ search_var }}" id="searchbar" value="{{ cl.query }}" />
+ <button type="submit" value="" class="search">&nbsp;</button>
+ {% for pair in cl.params.items %}
+ {% ifnotequal pair.0 search_var %}<input type="hidden" name="{{ pair.0 }}" value="{{ pair.1 }}"/>{% endifnotequal %}
+ {% endfor %}
+ {% comment %}
+ {% if search_fields_verbose and not cl.query %}
+ <div id="searchbar_tooltip" class="tooltip search-fields" style="display: none;">
+ <div class="tooltip-pointer">&nbsp;</div>
+ <div class="tooltip-content"><strong>{% trans 'Search' %}:</strong> {{ search_fields_verbose }}</div>
+ </div>
+ {% endif %}
+ {% endcomment %}
+ </form>
+{% endif %} \ No newline at end of file
diff --git a/demo/grappelli/templates/admin/submit_line.html b/demo/grappelli/templates/admin/submit_line.html
new file mode 100644
index 0000000..2fbef06
--- /dev/null
+++ b/demo/grappelli/templates/admin/submit_line.html
@@ -0,0 +1,10 @@
+{% load i18n %}
+<div class="module footer">
+ <ul class="submit-row">
+ {% if show_delete_link %}<li class="left delete-link-container"><a href="delete/" class="delete-link">{% trans "Delete" %}</a></li>{% endif %}
+ {% if show_save %}<li class="submit-button-container"><input type="submit" value="{% trans 'Save' %}" class="default" name="_save" {{ onclick_attrib }}/></li>{% endif %}
+ {% if show_save_as_new %}<li class="submit-button-container"><input type="submit" value="{% trans 'Save as new' %}" name="_saveasnew" {{ onclick_attrib }}/></li>{% endif %}
+ {% if show_save_and_add_another %}<li class="submit-button-container"><input type="submit" value="{% trans 'Save and add another' %}" name="_addanother" {{ onclick_attrib }} /></li>{% endif %}
+ {% if show_save_and_continue %}<li class="submit-button-container"><input type="submit" value="{% trans 'Save and continue editing' %}" name="_continue" {{ onclick_attrib }}/></li>{% endif %}
+ </ul><br clear="all" />
+</div>
diff --git a/demo/grappelli/templates/admin/template_validator.html b/demo/grappelli/templates/admin/template_validator.html
new file mode 100644
index 0000000..219c442
--- /dev/null
+++ b/demo/grappelli/templates/admin/template_validator.html
@@ -0,0 +1,34 @@
+{% extends "admin/base_site.html" %}
+
+{# load grp_csrf #}
+
+{% block content %}
+ <div id="content-main">
+ <form action="" method="post">{% csrf_token %}
+ {% if form.error_dict %}
+ <p class="errornote">Your template had {{ form.error_dict.items|length }} error{{ form.error_dict.items|pluralize }}:</p>
+ {% endif %}
+ <fieldset class="module aligned">
+ <div class="row{% if form.site.errors %} error{% endif %} required">
+ <div class="column span-4"><h4><label for="id_site" class="required">Site:</label></h4></div>
+ <div class="column span-flexible">
+ {{ form.site }}
+ {% if form.site.errors %}{{ form.site.html_error_list }}{% endif %}
+ </div>
+ </div>
+ <div class="row{% if form.template.errors %} error{% endif %} required">
+ <div class="column span-4"><h4><label for="id_template" class="required">Template:</label></h4></div>
+ <div class="column span-flexible">
+ {{ form.template }}
+ {% if form.template.errors %}{{ form.template.html_error_list }}{% endif %}
+ </div>
+ </div>
+ </fieldset>
+ <div class="submit-row">
+ <ul class="submit-row">
+ <li class="submit-button-container"><input type="submit" value="Check for errors" class="default" /></li>
+ </ul>
+ </div>
+ </form>
+ </div>
+{% endblock %}
diff --git a/demo/grappelli/templates/admin_doc/bookmarklets.html b/demo/grappelli/templates/admin_doc/bookmarklets.html
new file mode 100644
index 0000000..7eba0be
--- /dev/null
+++ b/demo/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/demo/grappelli/templates/admin_doc/index.html b/demo/grappelli/templates/admin_doc/index.html
new file mode 100644
index 0000000..0260106
--- /dev/null
+++ b/demo/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/demo/grappelli/templates/admin_doc/missing_docutils.html b/demo/grappelli/templates/admin_doc/missing_docutils.html
new file mode 100644
index 0000000..47488a2
--- /dev/null
+++ b/demo/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/demo/grappelli/templates/admin_doc/model_detail.html b/demo/grappelli/templates/admin_doc/model_detail.html
new file mode 100644
index 0000000..85593f0
--- /dev/null
+++ b/demo/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/demo/grappelli/templates/admin_doc/model_index.html b/demo/grappelli/templates/admin_doc/model_index.html
new file mode 100644
index 0000000..84a93f3
--- /dev/null
+++ b/demo/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/demo/grappelli/templates/admin_doc/template_detail.html b/demo/grappelli/templates/admin_doc/template_detail.html
new file mode 100644
index 0000000..52935dd
--- /dev/null
+++ b/demo/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/demo/grappelli/templates/admin_doc/template_filter_index.html b/demo/grappelli/templates/admin_doc/template_filter_index.html
new file mode 100644
index 0000000..434679b
--- /dev/null
+++ b/demo/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/demo/grappelli/templates/admin_doc/template_tag_index.html b/demo/grappelli/templates/admin_doc/template_tag_index.html
new file mode 100644
index 0000000..703b2b2
--- /dev/null
+++ b/demo/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/demo/grappelli/templates/admin_doc/view_detail.html b/demo/grappelli/templates/admin_doc/view_detail.html
new file mode 100644
index 0000000..900d3ed
--- /dev/null
+++ b/demo/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/demo/grappelli/templates/admin_doc/view_index.html b/demo/grappelli/templates/admin_doc/view_index.html
new file mode 100644
index 0000000..b3c941c
--- /dev/null
+++ b/demo/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 %}
+
+
diff --git a/demo/grappelli/templates/registration/logged_out.html b/demo/grappelli/templates/registration/logged_out.html
new file mode 100644
index 0000000..31e9db4
--- /dev/null
+++ b/demo/grappelli/templates/registration/logged_out.html
@@ -0,0 +1,18 @@
+{% extends "admin/base_site.html" %}
+{% load i18n %}
+{% block content-class %}content-flexible{% endblock %}
+
+{% block breadcrumbs %}{% comment %}<div id="breadcrumbs"><a href="../">{% trans 'Home' %}</a></div>{% endcomment %}{% endblock %}
+{% block content_title %}&nbsp;{% endblock %}
+
+{% block content %}
+ <div class="container-flexible logout">
+ <div class="column span-10 centered">
+ <h1>{{ title }}. <a href="../"><strong>{% trans 'Log in again' %}</strong></a></h1>
+ {% comment %}<div class="module">
+ <h2>{{ title }}, </h2>
+ <div class="row"><a href="../"><strong>{% trans 'Log in again' %}</strong></a></div>
+ </div>{% endcomment %}
+ </div>
+ </div>
+{% endblock %}
diff --git a/demo/grappelli/templates/registration/password_change_done.html b/demo/grappelli/templates/registration/password_change_done.html
new file mode 100644
index 0000000..bfd01ab
--- /dev/null
+++ b/demo/grappelli/templates/registration/password_change_done.html
@@ -0,0 +1,24 @@
+{% extends "admin/base_site.html" %}
+{% load i18n %}
+{% block userlinks %}
+ {% url django-admindocs-docroot as docsroot %}
+ {% if docsroot %}
+ <li>
+ <a href="{{ docsroot }}">{% trans 'Documentation' %}</a>
+ </li>
+ {% endif %}
+ <li>
+ <a href="{{ root_path }}password_change/">{% trans 'Change password' %}</a>
+ </li>
+ <li>
+ <a href="{{ root_path }}logout/">{% trans 'Log out' %}</a>
+ </li>
+{% endblock %}
+
+{% block breadcrumbs %}<div id="breadcrumbs"><a href="../../">{% trans 'Home' %}</a> &rsaquo; {% trans 'Password change' %}</div>{% endblock %}
+
+{% block title %}{% trans 'Password change successful' %}{% endblock %}
+{% block content %}
+ <h1>{% trans 'Password change successful' %}</h1>
+ <p>{% trans 'Your password was changed.' %}</p>
+{% endblock %}
diff --git a/demo/grappelli/templates/registration/password_change_form.html b/demo/grappelli/templates/registration/password_change_form.html
new file mode 100644
index 0000000..e4d175f
--- /dev/null
+++ b/demo/grappelli/templates/registration/password_change_form.html
@@ -0,0 +1,60 @@
+{% extends "admin/base_site.html" %}
+{% load i18n %} {# grp_csrf #}
+{% block userlinks %}
+{% url django-admindocs-docroot as docsroot %}{% if docsroot %}
+<li>
+ <a href="{{ docsroot }}">{% trans 'Documentation' %}</a>
+</li>
+{% endif %}
+<li>
+ <a href="{{ root_path }}password_change/">{% trans 'Change password' %}</a>
+</li>
+<li>
+ <a href="{{ root_path }}logout/">{% trans 'Log out' %}</a>
+</li>
+{% endblock %}
+{% block breadcrumbs %}<div id="breadcrumbs"><a href="../">{% trans 'Home' %}</a> &rsaquo; {% trans 'Password change' %}</div>{% endblock %}
+{% block title %}{% trans 'Password change' %}{% endblock %}
+{% block content-class %}content-grid{% endblock %}
+
+{% block content %}
+
+<h1>{% trans 'Password change' %}</h1>
+
+<div class="container-grid">
+ <div class="column span-12">
+ <p>{% trans "Please enter your old password, for securitys sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p>
+ <form action="" method="post">{% csrf_token %}
+ <fieldset class="module">
+ <div class="row">
+ <div class="column span-4"><label for="id_old_password" class="required">{% trans 'Old password:' %}</label></div>
+ <div class="column span-flexible">
+ {{ form.old_password }}
+ {{ form.old_password.errors }}
+ </div>
+ </div>
+ <div class="row">
+ <div class="column span-4"><label for="id_new_password1" class="required">{% trans 'New password:' %}</label></div>
+ <div class="column span-flexible">
+ {{ form.new_password1 }}
+ {{ form.new_password1.errors }}
+ </div>
+ </div>
+ <div class="row">
+ <div class="column span-4"><label for="id_new_password2" class="required">{% trans 'Confirm password:' %}</label></div>
+ <div class="column span-flexible">
+ {{ form.new_password2 }}
+ {{ form.new_password2.errors }}
+ </div>
+ </div>
+ </fieldset>
+ <div class="module submit-row">
+ <ul class="submit-row">
+ <li class="submit-button-container"><input type="submit" value="{% trans 'Change my password' %}" class="default" /></li>
+ </ul>
+ </div>
+ </form>
+ </div>
+</div>
+
+{% endblock %}
diff --git a/demo/grappelli/templates/registration/password_reset_complete.html b/demo/grappelli/templates/registration/password_reset_complete.html
new file mode 100644
index 0000000..5b14a54
--- /dev/null
+++ b/demo/grappelli/templates/registration/password_reset_complete.html
@@ -0,0 +1,12 @@
+{% extends "admin/base_site.html" %}
+{% load i18n %}
+
+{% block breadcrumbs %}<div id="breadcrumbs"><a href="../../">{% trans 'Home' %}</a> &rsaquo; {% trans 'Password reset' %}</div>{% endblock %}
+
+{% block title %}{% trans 'Password reset complete' %}{% endblock %}
+
+{% block content %}
+ <h1>{% trans 'Password reset complete' %}</h1>
+ <p>{% trans "Your password has been set. You may go ahead and log in now." %}</p>
+ <p><a href="{{ login_url }}">{% trans 'Log in' %}</a></p>
+{% endblock %} \ No newline at end of file
diff --git a/demo/grappelli/templates/registration/password_reset_confirm.html b/demo/grappelli/templates/registration/password_reset_confirm.html
new file mode 100644
index 0000000..6aad70f
--- /dev/null
+++ b/demo/grappelli/templates/registration/password_reset_confirm.html
@@ -0,0 +1,23 @@
+{% extends "admin/base_site.html" %}
+{% load i18n %} {# grp_csrf #}
+
+{% block breadcrumbs %}<div id="breadcrumbs"><a href="../">{% trans 'Home' %}</a> &rsaquo; {% trans 'Password reset confirmation' %}</div>{% endblock %}
+
+{% block title %}{% trans 'Password reset' %}{% endblock %}
+
+{% block content %}
+ {% if validlink %}
+ <h1>{% trans 'Enter new password' %}</h1>
+ <p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p>
+ <form action="" method="post">{% csrf_token %}
+ {{ form.new_password1.errors }}
+ <p class="aligned wide"><label for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}</p>
+ {{ form.new_password2.errors }}
+ <p class="aligned wide"><label for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }}</p>
+ <p><input type="submit" value="{% trans 'Change my password' %}" /></p>
+ </form>
+ {% else %}
+ <h1>{% trans 'Password reset unsuccessful' %}</h1>
+ <p>{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}
+ {% endif %}
+{% endblock %}
diff --git a/demo/grappelli/templates/registration/password_reset_done.html b/demo/grappelli/templates/registration/password_reset_done.html
new file mode 100644
index 0000000..a009281
--- /dev/null
+++ b/demo/grappelli/templates/registration/password_reset_done.html
@@ -0,0 +1,11 @@
+{% extends "admin/base_site.html" %}
+{% load i18n %}
+
+{% block breadcrumbs %}<div id="breadcrumbs"><a href="../">{% trans 'Home' %}</a> &rsaquo; {% trans 'Password reset' %}</div>{% endblock %}
+
+{% block title %}{% trans 'Password reset successful' %}{% endblock %}
+
+{% block content %}
+ <h1>{% trans 'Password reset successful' %}</h1>
+ <p>{% trans "We've e-mailed a new password to the e-mail address you submitted. You should be receiving it shortly." %}</p>
+{% endblock %}
diff --git a/demo/grappelli/templates/registration/password_reset_email.html b/demo/grappelli/templates/registration/password_reset_email.html
new file mode 100644
index 0000000..4e4bd6d
--- /dev/null
+++ b/demo/grappelli/templates/registration/password_reset_email.html
@@ -0,0 +1,15 @@
+{% load i18n %}{% autoescape off %}
+{% trans "You're receiving this e-mail because you requested a password reset" %}
+{% blocktrans %}for your user account at {{ site_name }}{% endblocktrans %}.
+
+{% trans "Please go to the following page and choose a new password:" %}
+{% block reset_link %}
+{{ protocol }}://{{ domain }}{% url django.contrib.auth.views.password_reset_confirm uidb36=uid, token=token %}
+{% endblock %}
+{% trans "Your username, in case you've forgotten:" %} {{ user.username }}
+
+{% trans "Thanks for using our site!" %}
+
+{% blocktrans %}The {{ site_name }} team{% endblocktrans %}
+
+{% endautoescape %}
diff --git a/demo/grappelli/templates/registration/password_reset_form.html b/demo/grappelli/templates/registration/password_reset_form.html
new file mode 100644
index 0000000..7933280
--- /dev/null
+++ b/demo/grappelli/templates/registration/password_reset_form.html
@@ -0,0 +1,15 @@
+{% extends "admin/base_site.html" %}
+{% load i18n %} {# grp_csrf #}
+
+{% block breadcrumbs %}<div id="breadcrumbs"><a href="../">{% trans 'Home' %}</a> &rsaquo; {% trans 'Password reset' %}</div>{% endblock %}
+
+{% block title %}{% trans "Password reset" %}{% endblock %}
+
+{% block content %}
+ <h1>{% trans "Password reset" %}</h1>
+ <p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll reset your password and e-mail the new one to you." %}</p>
+ <form action="" method="post">{% csrf_token %}
+ {% if form.email.errors %}{{ form.email.errors }}{% endif %}
+ <p><label for="id_email">{% trans 'E-mail address:' %}</label> {{ form.email }} <input type="submit" value="{% trans 'Reset my password' %}" /></p>
+ </form>
+{% endblock %}