Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Lastly, a new [release](https://github.com/MAKENTNU/web/releases) must be create


## Unreleased
Admin page shortcut in internal pages

### New features

Expand Down
6 changes: 6 additions & 0 deletions src/internal/templates/internal/header.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% extends 'web/header.html' %}
{% load i18n %}
{% load hosts %}
{% load permission_tags %}


{# Linking `web/header.css` and `web/header.js` is required when including this template #}
Expand Down Expand Up @@ -38,6 +39,11 @@
<a class="item" href="{% host_url 'index_page' host 'main' %}">
<div class="text">{% translate "Public pages" %}</div>
</a>
{% if user|can_view_admin_panel %}
<a class="item" href="{% host_url 'admin_panel' host 'main' %}">
<div class="text">{% translate "Administration" %}</div>
</a>
{% endif %}
{% if user.is_staff %}
<a class="item" href="{% host_url 'admin:index' host 'admin' %}">
<div class="text">{% translate "Django admin" %}</div>
Expand Down
Loading