From 1466ba4ea13f9642132d2ef022baf8238ec09ac4 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 2 Aug 2021 09:21:52 -0500 Subject: [PATCH] Add "view in CORE" button when viewing MemberInfo --- tailbone_corepos/templates/core-pos/members/view.mako | 3 +++ tailbone_corepos/views/corepos/members.py | 7 +++++++ 2 files changed, 10 insertions(+) create mode 100644 tailbone_corepos/templates/core-pos/members/view.mako diff --git a/tailbone_corepos/templates/core-pos/members/view.mako b/tailbone_corepos/templates/core-pos/members/view.mako new file mode 100644 index 0000000..848510a --- /dev/null +++ b/tailbone_corepos/templates/core-pos/members/view.mako @@ -0,0 +1,3 @@ +## -*- coding: utf-8; -*- +<%inherit file="/core-pos/master/view.mako" /> +${parent.body()} diff --git a/tailbone_corepos/views/corepos/members.py b/tailbone_corepos/views/corepos/members.py index 9134e2b..aecd529 100644 --- a/tailbone_corepos/views/corepos/members.py +++ b/tailbone_corepos/views/corepos/members.py @@ -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)