misc: add style to edit links

This commit is contained in:
Chris Tactic 2024-11-07 12:54:01 +01:00
parent c102cf936e
commit 129360f89d
4 changed files with 11 additions and 8 deletions

View File

@ -7,13 +7,11 @@
{% endblock %}
{% block page-form-actions %}
<a class="button secondary" href="{% url 'episode-list' parent_slug=object.slug %}">{% trans "Episodes" %}</a>
&nbsp;
<a class="button secondary" href="{% url 'program-add-episode' object.pk %}">{% trans "New episode" %}</a>
<a class="button secondary withmargin" href="{% url 'episode-list' parent_slug=object.slug %}">{% trans "Episodes" %}</a>
<a class="button secondary withmargin" href="{% url 'program-add-episode' object.pk %}">{% trans "New episode" %}</a>
{% if object and object.pk and request.user.is_superuser %}
&nbsp;
<button type="button"
class="button secondary"
class="button secondary withmargin"
@click="$refs['group-users-modal'].open({id: {{ object.editors_group_id }}, name: '{{ object.editors_group.name }}' })">{% translate "Editors" %}</button>
{{ block.super }}

View File

@ -13,14 +13,14 @@
{% with request.resolver_match.view_name as view_name %}
&nbsp;
{% if request.path != object.get_absolute_url %}
<a href="{% url view_name|detail_view page.slug %}" target="_self" title="{% translate 'View' %} {{ page }}">
<a href="{% url view_name|detail_view page.slug %}" target="_self" title="{% translate 'View' %} {{ page }}" class="button secondary withmargin">
<span class="icon">
<i class="fa-regular fa-eye"></i>
</span>
<span>{% translate 'View' %} </span>
</a>
{% elif can_edit %}
<a href="{% url view_name|edit_view page.pk %}" target="_self" title="{% translate 'Edit' %} {{ page }}">
<a href="{% url view_name|edit_view page.pk %}" target="_self" title="{% translate 'Edit' %} {{ page }}" class="button secondary withmargin">
<span class="icon">
<i class="fa-solid fa-pencil"></i>
</span>

View File

@ -509,6 +509,11 @@ a.nav-item:hover {
color: #738EF2 !important;
}
.withmargin {
margin-bottom: 5px;
margin-right: 5px;
}
@media screen and (max-width: 1224px) {
.grid.list-emissions:not(.list-home) > .list-item {width: calc(33% - 2rem) !important;;}
}

View File

@ -56,7 +56,7 @@ Styling related context:
<div class="actions">
{% block actions %}
{% if admin and object.edit_url_name %}
<a href="{% url object.edit_url_name pk=object.pk %}" target="_self">{% translate "Edit" %}</a>
<a href="{% url object.edit_url_name pk=object.pk %}" target="_self" class="button secondary withmargin">{% translate "Edit" %}</a>
{% endif %}
{% endblock %}
</div>