mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-03 22:55:43 +00:00 
			
		
		
		
	publishing date for integration plugins
This commit is contained in:
		@@ -257,6 +257,7 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin):
 | 
				
			|||||||
    PLUGIN_SLUG = None
 | 
					    PLUGIN_SLUG = None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    AUTHOR = None
 | 
					    AUTHOR = None
 | 
				
			||||||
 | 
					    PUBLISH_DATE = None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self):
 | 
					    def __init__(self):
 | 
				
			||||||
        super().__init__()
 | 
					        super().__init__()
 | 
				
			||||||
@@ -293,6 +294,16 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin):
 | 
				
			|||||||
            name = _('No author found')
 | 
					            name = _('No author found')
 | 
				
			||||||
        return name
 | 
					        return name
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @property
 | 
				
			||||||
 | 
					    def pub_date(self):
 | 
				
			||||||
 | 
					        """returns publishing date of plugin - either from plugin settings or git"""
 | 
				
			||||||
 | 
					        name = getattr(self, 'PUBLISH_DATE', None)
 | 
				
			||||||
 | 
					        if not name:
 | 
				
			||||||
 | 
					            name = self.commit.get('date')
 | 
				
			||||||
 | 
					        if not name:
 | 
				
			||||||
 | 
					            name = _('No date found')
 | 
				
			||||||
 | 
					        return name
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # mixins
 | 
					    # mixins
 | 
				
			||||||
    def mixin(self, key):
 | 
					    def mixin(self, key):
 | 
				
			||||||
        """check if mixin is registered"""
 | 
					        """check if mixin is registered"""
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -47,7 +47,7 @@
 | 
				
			|||||||
                {% endif %}
 | 
					                {% endif %}
 | 
				
			||||||
            </td>
 | 
					            </td>
 | 
				
			||||||
            <td>{{ plugin.author }}</td>
 | 
					            <td>{{ plugin.author }}</td>
 | 
				
			||||||
            <td>{{plugin.commit.date}}</td>
 | 
					            <td>{{ plugin.pub_date }}</td>
 | 
				
			||||||
        </tr>
 | 
					        </tr>
 | 
				
			||||||
        {% endfor %}
 | 
					        {% endfor %}
 | 
				
			||||||
    </tbody>
 | 
					    </tbody>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user