Add "view in CORE" button when viewing MemberInfo
This commit is contained in:
		
							parent
							
								
									dd5ece91ef
								
							
						
					
					
						commit
						1466ba4ea1
					
				
					 2 changed files with 10 additions and 0 deletions
				
			
		
							
								
								
									
										3
									
								
								tailbone_corepos/templates/core-pos/members/view.mako
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								tailbone_corepos/templates/core-pos/members/view.mako
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,3 @@
 | 
			
		|||
## -*- coding: utf-8; -*-
 | 
			
		||||
<%inherit file="/core-pos/master/view.mako" />
 | 
			
		||||
${parent.body()}
 | 
			
		||||
| 
						 | 
				
			
			@ -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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue