Skip to content

Commit

Permalink
Added related pages links
Browse files Browse the repository at this point in the history
(Closes #229)
  • Loading branch information
rafaelurben committed Nov 28, 2023
1 parent 1761bd3 commit 6bee101
Show file tree
Hide file tree
Showing 16 changed files with 103 additions and 34 deletions.
2 changes: 1 addition & 1 deletion kmuhelper/static/admin/kmuhelper/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ul.messagelist li:not(:last-child) {
/* Additional app index style */

#pageinfo {
padding: 0 10px;
padding-bottom: 10px;
}

#pageinfo a {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ <h1>Willkommen in der KMUHelper App!</h1>
<a href="{% url 'admin:app_list' app_label='kmuhelper' %}" target="_top">Adminbereichs</a>
eine vereinfachte Ansicht, welche auf bestimmte Arbeitsschritte abgestimmt ist.
</p>
<br>
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ <h1>Willkommen bei KMUHelper E-Mails!</h1>
Mit dem KMUHelper E-Mail-Modul kannst du ganz einfach E-Mails erstellen und versenden.
Die Hauptfunktionen befinden sich im <a href="{% url 'admin:app_list' app_label='kmuhelper' %}">Adminbereich</a>.
</p>
<br>
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@
{% comment %} Load the changelist save on top script {% endcomment %}
<script src="{% static 'admin/kmuhelper/js/changelist_saveontop.js' %}"></script>
{% endblock %}

{% block pageinfo %}
<p id="pageinfo">
<b>Verwandte Seiten:</b> <a href="{% url 'admin:kmuhelper_supply_changelist' %}">Admin: Lieferungen</a>
</p>
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,10 @@
<script src="{% static 'admin/kmuhelper/js/changelist_saveontop.js' %}"></script>
{% endblock %}

{% block pageinfo %}
<p id="pageinfo">
<b>Verwandte Seiten:</b> <a href="{% url 'admin:kmuhelper_order_changelist' %}">Admin: Bestellungen</a>
</p>
{% endblock %}

{% block unpaid_orders %}{% endblock %}
1 change: 0 additions & 1 deletion kmuhelper/templates/admin/kmuhelper/app_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ <h1>Willkommen im KMUHelper Adminbereich!</h1>
in der <a href="{% url 'kmuhelper:app-index' %}">KMUHelper&nbsp;App</a> sowie
in den <a href="{% url 'kmuhelper:settings' %}">Einstellungen</a>.
</p>
<br>
{% endblock %}

{% if "old_design" in request.GET or "old" in request.GET %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,10 @@
<script src="{% static 'admin/kmuhelper/js/changelist_saveontop.js' %}"></script>
{% endblock %}

{% block pageinfo %}
<p id="pageinfo">
<b>Verwandte Seiten:</b> <a href="{% url 'admin:kmuhelper_order_changelist' %}">Admin: Bestellungen</a>
</p>
{% endblock %}

{% block unpaid_orders %}{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

{% load static %}

{% block pageinfo %}
<p id="pageinfo">
<b>Verwandte Seiten:</b> <a href="{% url 'admin:kmuhelper_product_changelist' %}">Admin: Produkte</a>
</p>
{% endblock %}

{% block extrahead %}
{{ block.super }}

Expand Down
6 changes: 6 additions & 0 deletions kmuhelper/templates/admin/kmuhelper/app_todo/change_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

{% load static %}

{% block pageinfo %}
<p id="pageinfo">
<b>Verwandte Seiten:</b> <a href="{% url 'admin:kmuhelper_note_changelist' %}">Admin: Notizen</a>
</p>
{% endblock %}

{% block extrahead %}
{{ block.super }}

Expand Down
7 changes: 7 additions & 0 deletions kmuhelper/templates/admin/kmuhelper/change_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,10 @@
{% comment %} Load the beforeunload script {% endcomment %}
<script src="{% static 'admin/kmuhelper/js/beforeunload.js' %}" type="text/javascript"></script>
{% endblock %}

{% block content %}
{% block pageinfo %}
{% endblock %}

{{ block.super }}
{% endblock %}
7 changes: 7 additions & 0 deletions kmuhelper/templates/admin/kmuhelper/note/change_list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% extends 'admin/kmuhelper/change_list.html' %}

{% block pageinfo %}
<p id="pageinfo">
<b>Verwandte Seiten:</b> <a href="{% url 'admin:kmuhelper_app_todo_changelist' %}">App: ToDo-Liste</a>
</p>
{% endblock %}
60 changes: 30 additions & 30 deletions kmuhelper/templates/admin/kmuhelper/order/change_list.html
Original file line number Diff line number Diff line change
@@ -1,33 +1,9 @@
{% extends 'admin/kmuhelper/change_list.html' %}

{% block object-tools-items %}
<!-- SweetAlert -->
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<script>
function laden() {
swal({
title: "Bitte warten...",
text: "Dieser Prozess kann unter Umständen etwas dauern.\n\nBitte versuche nicht, diesen Prozess abzubrechen!\n\nFalls du eine Fehlermeldung erhältst, lade bitte die Seite neu!\n\n(Dies könnte je nach Menge auch mehrmals der Fall sein.)",
icon: "info",
buttons: false,
closeOnClickOutside: false,
closeOnEsc: false
});
};
</script>

{% load kmuhelper_tags %}
{% kmuhelper_woocommerce_connected as woocommerce_is_connected %}
{% if woocommerce_is_connected and perms.kmuhelper.add_order %}
<li>
<a onclick="laden();" href="{% url 'kmuhelper:wc-import-orders' %}" class="addlink">Bestellungen von
WooCommerce importieren</a>
</li>
{% endif %}
{{ block.super }}
{% endblock %}

{% block content %}
{% block pageinfo %}
<p id="pageinfo">
<b>Verwandte Seiten:</b> <a href="{% url 'admin:kmuhelper_app_shipping_changelist' %}">App: Warenausgang</a>, <a href="{% url 'admin:kmuhelper_app_incomingpayments_changelist' %}">App: Zahlungseingang</a>
</p>

{% block unpaid_orders %}
<table>
Expand Down Expand Up @@ -73,7 +49,31 @@
</script>

{% endblock %}
{% endblock %}

{{ block.super }}
{% block object-tools-items %}
<!-- SweetAlert -->
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<script>
function laden() {
swal({
title: "Bitte warten...",
text: "Dieser Prozess kann unter Umständen etwas dauern.\n\nBitte versuche nicht, diesen Prozess abzubrechen!\n\nFalls du eine Fehlermeldung erhältst, lade bitte die Seite neu!\n\n(Dies könnte je nach Menge auch mehrmals der Fall sein.)",
icon: "info",
buttons: false,
closeOnClickOutside: false,
closeOnEsc: false
});
};
</script>

{% endblock %}
{% load kmuhelper_tags %}
{% kmuhelper_woocommerce_connected as woocommerce_is_connected %}
{% if woocommerce_is_connected and perms.kmuhelper.add_order %}
<li>
<a onclick="laden();" href="{% url 'kmuhelper:wc-import-orders' %}" class="addlink">Bestellungen von
WooCommerce importieren</a>
</li>
{% endif %}
{{ block.super }}
{% endblock %}
7 changes: 7 additions & 0 deletions kmuhelper/templates/admin/kmuhelper/product/change_list.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{% extends 'admin/kmuhelper/change_list.html' %}

{% block pageinfo %}
<p id="pageinfo">
<b>Verwandte Seiten:</b> <a href="{% url 'admin:kmuhelper_app_stock_changelist' %}">App: Lagerbestand</a>,
<a href="{% url 'admin:kmuhelper_productcategory_changelist' %}">Admin: Produktkategoriem</a>
</p>
{% endblock %}

{% block object-tools-items %}
<!-- SweetAlert -->
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{% extends 'admin/kmuhelper/change_list.html' %}

{% block pageinfo %}
<p id="pageinfo">
<b>Verwandte Seiten:</b> <a href="{% url 'admin:kmuhelper_product_changelist' %}">Admin: Produktkategorien</a>
</p>
{% endblock %}

{% block object-tools-items %}
<!-- SweetAlert -->
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
Expand Down
7 changes: 7 additions & 0 deletions kmuhelper/templates/admin/kmuhelper/supplier/change_list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% extends 'admin/kmuhelper/change_list.html' %}

{% block pageinfo %}
<p id="pageinfo">
<b>Verwandte Seiten:</b> <a href="{% url 'admin:kmuhelper_supply_changelist' %}">Admin: Lieferungen</a>
</p>
{% endblock %}
8 changes: 8 additions & 0 deletions kmuhelper/templates/admin/kmuhelper/supply/change_list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{% extends 'admin/kmuhelper/change_list.html' %}

{% block pageinfo %}
<p id="pageinfo">
<b>Verwandte Seiten:</b> <a href="{% url 'admin:kmuhelper_app_arrival_changelist' %}">App: Wareneingang</a>,
<a href="{% url 'admin:kmuhelper_supplier_changelist' %}">Admin: Lieferanten</a>
</p>
{% endblock %}

0 comments on commit 6bee101

Please sign in to comment.