diff options
Diffstat (limited to 'lib/grappelli/templates/admin/_grappelli')
4 files changed, 188 insertions, 0 deletions
diff --git a/lib/grappelli/templates/admin/_grappelli/app_index.html b/lib/grappelli/templates/admin/_grappelli/app_index.html new file mode 100644 index 0000000..e9cb806 --- /dev/null +++ b/lib/grappelli/templates/admin/_grappelli/app_index.html @@ -0,0 +1,40 @@ +{% extends "admin/_grappelli/index.html" %} + +<!-- LOADING --> +{% load i18n grp_tags %} + +<!-- BREADCRUMBS --> +{% if not is_popup %} + {% block breadcrumbs %} + <div id="breadcrumbs"> + <a href="../">{% trans "Home" %}</a> › + {% for app in app_list %} + {% blocktrans with app.name as name %}{{ name }}{% endblocktrans %} + {% endfor %} + </div> + {% endblock %} +{% endif %} + +<!-- CONTENT --> +{% 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 %} {% endif %}</li> + <li class="change-link"> {% if model.perms.change %}<a href="{{ model.admin_url }}">{% trans 'Change' %}</a>{% else %} {% endif %}</li> + </ul> + </div> + {% endfor %} + </div> + {% endfor %} + {% endif %} + </div> + </div> +{% endblock %} diff --git a/lib/grappelli/templates/admin/_grappelli/base.html b/lib/grappelli/templates/admin/_grappelli/base.html new file mode 100644 index 0000000..16676b9 --- /dev/null +++ b/lib/grappelli/templates/admin/_grappelli/base.html @@ -0,0 +1,78 @@ +<!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 %}> +<head> + <title>{% block title %}{% endblock %}</title> + {% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %} + + <!-- LOADING --> + {% load adminmedia i18n grp_tags %} + + <!-- STYLESHEETS --> + {% block stylesheets %} + <link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/base.css" /> + {% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% admin_media_prefix %}css/rtl.css{% endblock %}" />{% endif %} + <link rel="stylesheet" href="{% admin_media_prefix %}jquery/ui/css/custom-theme/jquery-ui-1.8.custom.css" type="text/css" media="screen" title="no title" charset="utf-8"> + <link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/jquery-ui-grappelli-extensions.css" /> + {% endblock %} + {% block extrastyle %}{% endblock %} + + <!-- JAVASCRIPTS --> + {% block javascripts %} + <script type="text/javascript"> + // GLOBALS + var ADMIN_URL = "{% url admin:index %}",{# ugly hack to prevent tests from failing #} + MODEL_URL_ARRAY = {% get_content_types %}, + DATE_FORMAT = "{% get_date_format %}", + TIME_FORMAT = "{% get_time_format %}", + DATETIME_FORMAT = "{% get_datetime_format %}"; + </script> + <script type="text/javascript" src="{% admin_media_prefix %}jquery/jquery-1.4.2.min.js"></script> + <script type="text/javascript" src="{% admin_media_prefix %}jquery/ui/js/jquery-ui-1.8.custom.min.js"></script> + <script type="text/javascript" src="{% admin_media_prefix %}js/grappelli.init.js"></script> + <script type="text/javascript" src="{% admin_media_prefix %}js/grappelli.timepicker.js"></script> + <script type="text/javascript" src="{% admin_media_prefix %}js/grappelli.RelatedObjectLookups.js"></script> + <script type="text/javascript" src="{% admin_media_prefix %}js/grappelli.min.js"></script> + {% endblock %} + + {% 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 %} › {{ 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> + diff --git a/lib/grappelli/templates/admin/_grappelli/base_site.html b/lib/grappelli/templates/admin/_grappelli/base_site.html new file mode 100644 index 0000000..1f94985 --- /dev/null +++ b/lib/grappelli/templates/admin/_grappelli/base_site.html @@ -0,0 +1,9 @@ +{% extends "admin/_grappelli/base.html" %} + +<!-- LOADING --> +{% load i18n grp_tags %} + +<!-- TITLE/BRANDING/NAV --> +{% block title %}{{ title }} | {% grappelli_admin_title %}{% endblock %} +{% block branding %}<h1 id="site-name">{% grappelli_admin_title %}</h1>{% endblock %} +{% block nav-global %}{% endblock %} diff --git a/lib/grappelli/templates/admin/_grappelli/index.html b/lib/grappelli/templates/admin/_grappelli/index.html new file mode 100644 index 0000000..8dedd3d --- /dev/null +++ b/lib/grappelli/templates/admin/_grappelli/index.html @@ -0,0 +1,61 @@ +{% extends "admin/_grappelli/base_site.html" %} + +<!-- LOADING --> +{% load i18n adminmedia grp_tags %} + +<!-- STYLES & SCRIPTS --> +{% 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 %} + +<!-- 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 %} {% endif %}</li> + <li class="change-link"> {% if model.perms.change %}<a href="{{ model.admin_url }}">{% trans 'Change' %}</a>{% else %} {% 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> + {% load log %} + {% 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 %} |