mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 12:36:45 +00:00
added version identifier
This commit is contained in:
parent
ef858f7701
commit
e7237d13ae
@ -258,6 +258,7 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin):
|
||||
|
||||
AUTHOR = None
|
||||
PUBLISH_DATE = None
|
||||
VERSION = None
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
@ -304,6 +305,12 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin):
|
||||
name = _('No date found')
|
||||
return name
|
||||
|
||||
@property
|
||||
def version(self):
|
||||
"""returns version of plugin"""
|
||||
name = getattr(self, 'VERSION', None)
|
||||
return name
|
||||
|
||||
# mixins
|
||||
def mixin(self, key):
|
||||
"""check if mixin is registered"""
|
||||
|
@ -20,6 +20,7 @@
|
||||
<th>{% trans "Name" %}</th>
|
||||
<th>{% trans "Author" %}</th>
|
||||
<th>{% trans "Date" %}</th>
|
||||
<th>{% trans "Version" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@ -48,6 +49,7 @@
|
||||
</td>
|
||||
<td>{{ plugin.author }}</td>
|
||||
<td>{{ plugin.pub_date }}</td>
|
||||
<td>{{ plugin.version }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
Loading…
x
Reference in New Issue
Block a user