Add "view in CORE" button when viewing MemberInfo

This commit is contained in:
Lance Edgar 2021-08-02 09:21:52 -05:00
parent dd5ece91ef
commit 1466ba4ea1
2 changed files with 10 additions and 0 deletions

View file

@ -0,0 +1,3 @@
## -*- coding: utf-8; -*-
<%inherit file="/core-pos/master/view.mako" />
${parent.body()}

View file

@ -26,6 +26,8 @@ CORE-POS member views
from corepos.db.office_op import model as corepos
from rattail_corepos.config import core_office_customer_account_url
from webhelpers2.html import HTML, tags
from .master import CoreOfficeMasterView
@ -159,6 +161,11 @@ class MemberView(CoreOfficeMasterView):
items.append(HTML.tag('li', c=[link]))
return HTML.tag('ul', c=items)
def core_office_object_url(self, office_url, member):
return core_office_customer_account_url(self.rattail_config,
member.card_number,
office_url=office_url)
def includeme(config):
MemberTypeView.defaults(config)