Skip to content

Commit

Permalink
Merge branch 'stable/2.4.x' of github.com:sehmaschine/django-grappell…
Browse files Browse the repository at this point in the history
…i into stable/2.4.x
  • Loading branch information
sehmaschine committed Jun 3, 2013
2 parents ba75243 + 12112ea commit 95558ba
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 69 deletions.
15 changes: 1 addition & 14 deletions grappelli/templates/admin/auth/user/change_password.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
{% extends "admin/base_site.html" %}
{% load url from future %}
{% load i18n admin_modify %} {# 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 %}
<ul class="grp-horizontal-list">
Expand Down
54 changes: 53 additions & 1 deletion grappelli/templates/admin/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@
<!-- Grappelli Minified -->
<script src="{% static "grappelli/js/grappelli.min.js" %}" type="text/javascript"></script>
{% endif %}
<script type="text/javascript" charset="utf-8">
(function($) {
$(document).ready(function() {
$("#grp-navigation .grp-collapse").grp_collapsible();
});
})(grp.jQuery);
</script>
{% endblock %}
<!-- EXTRAHEAD -->
{% block extrahead %}{% endblock %}
Expand All @@ -63,7 +70,52 @@
{% if not is_popup %}

<!-- NAVIGATION -->
{% include "admin/includes_grappelli/header.html" %}
<div id="grp-navigation">
<h1 id="grp-admin-title">{% if grappelli_admin_title %}{{ grappelli_admin_title }}{% else %}{% get_admin_title %}{% endif %}</h1>
{% if user.is_authenticated and user.is_staff %}
<ul id="grp-user-tools">
<!-- Userlinks -->
{% block userlinks %}
<!-- Username -->
<li class="grp-user-options-container grp-collapse grp-closed">
<a href="javascript://" class="user-options-handler grp-collapse-handler">{% filter force_escape %}{% firstof user.first_name user.username user.get_short_name user.get_username %}{% endfilter %}</a>
<ul class="grp-user-options">
<!-- Change Password -->
{% if user.has_usable_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>
{% endif %}
<!-- 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>
<!-- 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 %}
<!-- Nav-Global -->
{% block nav-global %}{% endblock %}
</div>

<!-- CONTEXT NAVIGATION -->
<div id="grp-context-navigation">
Expand Down
52 changes: 26 additions & 26 deletions grappelli/templates/admin/includes_grappelli/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,32 @@
<h1 id="grp-admin-title">{% if grappelli_admin_title %}{{ grappelli_admin_title }}{% else %}{% get_admin_title %}{% endif %}</h1>
{% if user.is_authenticated and user.is_staff %}
<ul id="grp-user-tools">
<!-- Username -->
<li class="grp-user-options-container grp-collapse grp-closed">
<a href="javascript://" class="user-options-handler grp-collapse-handler">{% filter force_escape %}{% firstof user.first_name user.username user.get_short_name user.get_username %}{% endfilter %}</a>
<ul class="grp-user-options">
<!-- Change Password -->
{% if user.has_usable_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>
{% endif %}
<!-- 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 %}
<!-- Username -->
<li class="grp-user-options-container grp-collapse grp-closed">
<a href="javascript://" class="user-options-handler grp-collapse-handler">{% filter force_escape %}{% firstof user.first_name user.username user.get_short_name user.get_username %}{% endfilter %}</a>
<ul class="grp-user-options">
<!-- Change Password -->
{% if user.has_usable_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>
{% endif %}
<!-- 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>
<!-- JS tests -->
{% url 'test-index' as testindexurl %}
{% if testindexurl %}
Expand All @@ -43,8 +43,8 @@ <h1 id="grp-admin-title">{% if grappelli_admin_title %}{{ grappelli_admin_title
{% endblock %}
</ul>
{% endif %}
{% block nav-global %}
{% endblock %}
<!-- Nav-Global -->
{% block nav-global %}{% endblock %}
</div>

<script type="text/javascript" charset="utf-8">
Expand Down
15 changes: 0 additions & 15 deletions grappelli/templates/registration/password_change_done.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,6 @@
{% load url from future %}
{% 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 %}
<ul class="grp-horizontal-list">
<li><a href="../../">{% trans 'Home' %}</a></li>
Expand Down
14 changes: 1 addition & 13 deletions grappelli/templates/registration/password_change_form.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
{% extends "admin/base_site.html" %}
{% load url from future %}
{% 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 %}
<ul class="grp-horizontal-list">
<li><a href="../">{% trans "Home" %}</a></li>
Expand Down

0 comments on commit 95558ba

Please sign in to comment.