Compare commits
5 Commits
306eb20257
...
7cdf44b901
Author | SHA1 | Date | |
---|---|---|---|
7cdf44b901 | |||
dff7b1cf8c | |||
f55d747034 | |||
37ecf9875b | |||
f8401c76e3 |
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -70,10 +70,10 @@ Usefull context:
|
|||
{% translate "Admin" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if user.is_authenticated %}
|
||||
<a class="nav-item" href="{% url "profile" %}" target="new">
|
||||
{% translate "Profile" %}
|
||||
</a>
|
||||
{% if user.is_authenticated %}
|
||||
<a class="nav-item" href="{% url "logout" %}" title="{% translate "Disconnect" %}"
|
||||
aria-label="{% translate "Disconnect" %}">
|
||||
<i class="fa fa-power-off"></i>
|
||||
|
|
|
@ -4,15 +4,19 @@
|
|||
{% if user.is_authenticated and can_edit %}
|
||||
{% with request.resolver_match.view_name as view_name %}
|
||||
|
||||
{% if view_name in 'program-edit,bla' %}
|
||||
<!--
|
||||
<a href="{% url 'program-detail' page.slug %}" target="_self">
|
||||
<span title="{% translate 'View' %} {{ page }}">{% translate 'View' %} 👁 </span>
|
||||
{% if view_name in 'page-edit,program-edit,episode-edit' %}
|
||||
<a href="{% url view_name|detail_view page.slug %}" target="_self">
|
||||
<small>
|
||||
<span title="{% translate 'View' %} {{ page }}">{% translate 'View' %} </span>
|
||||
<i class="fa-regular fa-eye"></i>
|
||||
</small>
|
||||
</a>
|
||||
-->
|
||||
{% else %}
|
||||
<a href="{% url view_name|edit_view page.pk %}" target="_self">
|
||||
<span title="{% translate 'Edit' %} {{ page }}">{% translate 'Edit' %} 🖉 </span>
|
||||
<small>
|
||||
<span title="{% translate 'Edit' %} {{ page }}">{% translate 'Edit' %} </span>
|
||||
<i class="fa-solid fa-pencil"></i>
|
||||
</small>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
<br/>
|
||||
<input type="submit" value="Update" class="button is-success">
|
||||
|
||||
<hr>
|
||||
|
||||
{% include "aircox/playlist_inline.html" %}
|
||||
|
||||
<input type="submit" value="Update" class="button is-success">
|
||||
|
|
|
@ -139,3 +139,8 @@ def do_verbose_name(obj, plural=False):
|
|||
@register.filter(name="edit_view")
|
||||
def do_edit_view(obj):
|
||||
return "%s-edit" % obj.split("-")[0]
|
||||
|
||||
|
||||
@register.filter(name="detail_view")
|
||||
def do_detail_view(obj):
|
||||
return "%s-detail" % obj.split("-")[0]
|
||||
|
|
Loading…
Reference in New Issue
Block a user