diff --git a/src/onegov/org/layout.py b/src/onegov/org/layout.py index 9943c2cd9a..196256e6e6 100644 --- a/src/onegov/org/layout.py +++ b/src/onegov/org/layout.py @@ -2616,6 +2616,7 @@ def editbar_links(self): ) def links(): + qr_link = None if self.request.is_admin: yield Link( text=_("Configure"), @@ -2636,6 +2637,12 @@ def links(): attrs={'class': 'import-link'} ) + qr_link = QrCodeLink( + text=_("QR"), + url=self.request.link(self.model), + attrs={'class': 'qr-code-link'} + ) + if self.request.is_admin: yield Link( text=_("Delete"), @@ -2682,6 +2689,8 @@ def links(): if not self.request.is_logged_in: yield export_link + if qr_link: + yield qr_link return list(links()) def get_pub_link(self, text, filter=None, toggle_active=True): diff --git a/src/onegov/town6/layout.py b/src/onegov/town6/layout.py index 5d2dde4e2a..3aadd2f27b 100644 --- a/src/onegov/town6/layout.py +++ b/src/onegov/town6/layout.py @@ -2200,7 +2200,7 @@ def editbar_links(self): ) def links(): - + qr_link = None if self.request.is_admin: yield Link( text=_("Configure"), @@ -2221,6 +2221,12 @@ def links(): attrs={'class': 'import-link'} ) + qr_link = QrCodeLink( + text=_("QR"), + url=self.request.link(self.model), + attrs={'class': 'qr-code-link'} + ) + if self.request.is_admin: yield Link( text=_("Delete"), @@ -2263,6 +2269,8 @@ def links(): ) ] ) + if qr_link: + yield qr_link return list(links())