diff --git a/tailbone_corepos/views/people.py b/tailbone_corepos/views/people.py index 8f85001..091a2e8 100644 --- a/tailbone_corepos/views/people.py +++ b/tailbone_corepos/views/people.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2023 Lance Edgar +# Copyright © 2010-2024 Lance Edgar # # This file is part of Rattail. # @@ -68,6 +68,18 @@ class PersonViewSupplement(ViewSupplement): return context + def get_context_for_member(self, member, context): + + if member.corepos_card_number: + app = self.get_rattail_app() + corepos = app.get_corepos_handler() + url = corepos.get_office_member_url(member.corepos_card_number) + if url: + context['external_links'].append({'label': "View in CORE Office", + 'url': url}) + + return context + def get_member_xref_buttons(self, person): buttons = OrderedDict() app = self.get_rattail_app()