Skip to content

Commit

Permalink
Merge branch 'master' into stable/3.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
sehmaschine committed Dec 14, 2023
2 parents 187fc6b + c114163 commit 0c0f263
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ http://www.grappelliproject.com
Documentation
-------------

http://readthedocs.org/docs/django-grappelli/
https://django-grappelli.readthedocs.io/en/latest/

Releases
--------
Expand Down
8 changes: 8 additions & 0 deletions grappelli/sass/partials/library/_reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,14 @@ table {
border-spacing: 0;
}

caption,
th,
td {
text-align: left;
font-weight: normal;
vertical-align: middle;
}

/* change border colour to suit your needs */
hr {
display: block;
Expand Down
19 changes: 18 additions & 1 deletion grappelli/sass/screen.scss
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,28 @@ h1#grp-admin-title {
border-right: 0;
}

a {
a,
button {
display: block;
@include grp-padding($grp-padding-size $grp-padding-size);
@include ellipsis;
}

form button {
margin: 0 0 2px 0 !important;
width: auto;
height: auto;
color: lighten($grp-link-color, 10);
@extend .grp-font-size;
font-weight: bold;
outline: 0;
border: 0;
background: transparent;

&:hover {
color: #fff;
}
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion grappelli/static/grappelli/stylesheets/rtl.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion grappelli/static/grappelli/stylesheets/screen.css

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion grappelli/templates/admin/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,13 @@ <h1 id="grp-admin-title">
<li><a href="{% url 'admin:password_change' %}" class="grp-change-password">{% trans 'Change password' %}</a></li>
{% endif %}
<!-- Logout -->
<li><a href="{% url 'admin:logout' %}" class="grp-logout">{% trans 'Log out' %}</a></li>
<li>
<form id="logout-form" method="post"
action="{% url 'admin:logout' %}">
{% csrf_token %}
<button type="submit">{% translate 'Log out' %}</button>
</form>
</li>
<!-- Switch -->
{% switch_user_dropdown %}
</ul>
Expand Down
2 changes: 1 addition & 1 deletion grappelli/templates/admin/change_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
<ul>
<li><a href="{% url 'admin:index' %}">{% trans "Home" %}</a></li>
<li><a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a></li>
<li>{% if has_change_permission %}
<li>{% if has_view_permission %}
{% url opts|admin_urlname:'changelist' as changelist_url %}
<a href="{% add_preserved_filters changelist_url %}">{{ opts.verbose_name_plural|capfirst }}</a>{% else %}{{ opts.verbose_name_plural|capfirst }}
{% endif %}</li>
Expand Down
8 changes: 4 additions & 4 deletions grappelli/templates/admin/includes/fieldset.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
{% if fieldset.name %}<h2 class="grp-collapse-handler">{{ fieldset.name }}</h2>{% endif %}
{% if fieldset.description %}<div class="grp-row"><p class="grp-description">{{ fieldset.description|safe }}</p></div>{% endif %}
{% for line in fieldset %}
<div class="form-row grp-row grp-cells-{{ line.fields|length }}{% if not line.fields|length_is:"1" %} grp-cells{% else %}{% if line.errors %} grp-errors{% endif %}{% endif %}{% if not line.has_visible_field %} grp-row-hidden{% endif %}{% for field in line %} {{ field.field.name }}{% endfor %} ">
<div class="form-row grp-row grp-cells-{{ line.fields|length }}{% if not line.fields|length == 1 %} grp-cells{% else %}{% if line.errors %} grp-errors{% endif %}{% endif %}{% if not line.has_visible_field %} grp-row-hidden{% endif %}{% for field in line %} {{ field.field.name }}{% endfor %} ">
{% for field in line %}
{% if line.fields|length_is:"1" %}
{% if line.fields|length == 1 %}
<div class="field-box l-2c-fluid l-d-4">
{% else %}
<div class="field-box grp-cell l-2c-fluid l-d-4 {{ field.field.name }}{% if field.field.errors %} grp-errors{% endif %}">
Expand All @@ -24,8 +24,8 @@
{{ 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 line.fields|length == 1 %}{{ line.errors }}{% endif %}
{% if not line.fields|length == 1 and not field.is_readonly %}{{ field.field.errors }}{% endif %}
{% if field.field.help_text %}
<p class="grp-help">{{ field.field.help_text|safe }}</p>
{% endif %}
Expand Down
8 changes: 4 additions & 4 deletions grappelli/templates/admin/includes/fieldset_inline.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
{% if fieldset.name %}<h4 class="grp-collapse-handler">{{ fieldset.name }}</h4>{% endif %}
{% if fieldset.description %}<div class="grp-row"><p class="grp-description">{{ fieldset.description|safe }}</p></div>{% endif %}
{% for line in fieldset %}
<div class="form-row grp-row grp-cells-{{ line.fields|length }}{% if not line.fields|length_is:"1" %} grp-cells{% else %}{% if line.errors %} grp-errors{% endif %}{% endif %}{% if not line.has_visible_field %} grp-row-hidden{% endif %}{% for field in line %} {{ field.field.name }}{% endfor %}">
<div class="form-row grp-row grp-cells-{{ line.fields|length }}{% if not line.fields|length == 1 %} grp-cells{% else %}{% if line.errors %} grp-errors{% endif %}{% endif %}{% if not line.has_visible_field %} grp-row-hidden{% endif %}{% for field in line %} {{ field.field.name }}{% endfor %}">
{% for field in line %}
{% if line.fields|length_is:"1" %}
{% if line.fields|length == 1 %}
<div class="field-box l-2c-fluid l-d-4">
{% else %}
<div class="field-box grp-cell l-2c-fluid l-d-4 {{ field.field.name }}{% if field.field.errors %} grp-errors{% endif %}">
Expand All @@ -24,8 +24,8 @@
{{ 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 line.fields|length == 1 %}{{ line.errors }}{% endif %}
{% if not line.fields|length == 1 and not field.is_readonly %}{{ field.field.errors }}{% endif %}
{% if field.field.help_text %}
<p class="grp-help">{{ field.field.help_text|safe }}</p>
{% endif %}
Expand Down

0 comments on commit 0c0f263

Please sign in to comment.