{% extends "base.html" %} {% load i18n %} {% load inventree_extras %} {% block breadcrumb_list %} {% endblock %} {% block page_title %} {% inventree_title %} | {% trans "Notifications" %} {% endblock %} {% block sidebar %} {% include "InvenTree/notifications/sidebar.html" %} {% endblock %} {% block content %} {% include "InvenTree/notifications/inbox.html" %} {% include "InvenTree/notifications/history.html" %} {% endblock %} {% block js_ready %} {{ block.super }} function loadNotificationTable(table, options={}) { var params = options.params || {}; var read = typeof(params.read) === 'undefined' ? true : params.read; $(table).inventreeTable({ url: options.url, name: options.name, groupBy: false, search: true, queryParams: { ordering: 'age', read: read, }, paginationVAlign: 'bottom', formatNoMatches: options.no_matches, columns: [ { field: 'pk', title: '{% trans "ID" %}', visible: false, switchable: false, }, { field: 'age', title: '{% trans "Age" %}', sortable: 'true', formatter: function(value, row) { return row.age_human } }, { field: 'category', title: '{% trans "Category" %}', sortable: 'true', }, { field: 'target', title: '{% trans "Item" %}', sortable: 'true', formatter: function(value, row, index, field) { if (value == null) { return ''; } var html = `${value.model}: ${value.name}`; if (value.link ) {html = `${html}`;} return html; } }, { field: 'name', title: '{% trans "Name" %}', }, { field: 'message', title: '{% trans "Message" %}', }, { formatter: function(value, row, index, field) { var bRead = ""; var html = "