mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 13:05:42 +00:00
[FR] Slack notifications & notification method updates (#4114)
* [FR] Slack notification Add slack sending method Fixes #3843 * Add global panel with notification methods * add plugin information * fix plugin lookup and link * Add settings content mixin * Add instructions for Slack setup * fix rendering of custom settings content
This commit is contained in:
@ -0,0 +1,6 @@
|
||||
{% load plugin_extras %}
|
||||
|
||||
{% plugin_settings_content plugin_key as plugin_settings_content %}
|
||||
{% if plugin_settings_content %}
|
||||
{{ plugin_settings_content|safe }}
|
||||
{% endif %}
|
54
InvenTree/templates/InvenTree/settings/notifications.html
Normal file
54
InvenTree/templates/InvenTree/settings/notifications.html
Normal file
@ -0,0 +1,54 @@
|
||||
{% extends "panel.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load inventree_extras %}
|
||||
{% load plugin_extras %}
|
||||
|
||||
{% block label %}global-notifications{% endblock label %}
|
||||
|
||||
{% block heading %}{% trans "Global Notification Settings" %}{% endblock heading %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class='row'>
|
||||
<table class='table table-striped table-condensed'>
|
||||
<thead>
|
||||
<th></th>
|
||||
<th>{% trans "Name" %}</th>
|
||||
<th>{% trans "Slug" %}</th>
|
||||
<th>{% trans "Description" %}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% notification_list as methods %}
|
||||
{% for method in methods %}
|
||||
<tr>
|
||||
<td>{% if method.icon %}<span class="fas {{ method.icon }}"></span>{% endif %}</td>
|
||||
<td>
|
||||
{{ method.name }}
|
||||
{% if method.plugin %}
|
||||
<a class='sidebar-selector' id='select-plugin-{{method.plugin.slug}}' data-bs-parent="#sidebar">
|
||||
<span class='badge bg-dark badge-right rounded-pill'>{{ method.plugin.slug }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ method.slug }}</td>
|
||||
<td>{{ method.description }}</td>
|
||||
</tr>
|
||||
{% if method.setting %}
|
||||
<tr>
|
||||
<td colspan="1"></td>
|
||||
<td colspan="3">
|
||||
<table class='table table-condensed'>
|
||||
<tbody>
|
||||
{% include "InvenTree/settings/setting.html" with key=method.setting plugin=method.plugin %}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
@ -148,4 +148,6 @@
|
||||
{% include 'InvenTree/settings/mixins/urls.html' %}
|
||||
{% endif %}
|
||||
|
||||
{% include 'InvenTree/settings/mixins/settings_content.html' %}
|
||||
|
||||
{% endblock %}
|
||||
|
@ -32,6 +32,7 @@
|
||||
{% include "InvenTree/settings/global.html" %}
|
||||
{% include "InvenTree/settings/login.html" %}
|
||||
{% include "InvenTree/settings/barcode.html" %}
|
||||
{% include "InvenTree/settings/notifications.html" %}
|
||||
{% include "InvenTree/settings/label.html" %}
|
||||
{% include "InvenTree/settings/report.html" %}
|
||||
{% include "InvenTree/settings/part.html" %}
|
||||
|
@ -32,6 +32,8 @@
|
||||
{% include "sidebar_item.html" with label='login' text=text icon="fa-fingerprint" %}
|
||||
{% trans "Barcode Support" as text %}
|
||||
{% include "sidebar_item.html" with label='barcodes' text=text icon="fa-qrcode" %}
|
||||
{% trans "Notifications" as text %}
|
||||
{% include "sidebar_item.html" with label='global-notifications' text=text icon="fa-bell" %}
|
||||
{% trans "Pricing" as text %}
|
||||
{% include "sidebar_item.html" with label='pricing' text=text icon="fa-dollar-sign" %}
|
||||
{% trans "Label Printing" as text %}
|
||||
|
Reference in New Issue
Block a user