Add render_person_profile() method to MasterView
				
					
				
			This commit is contained in:
		
							parent
							
								
									9566a882b5
								
							
						
					
					
						commit
						8470126918
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -897,6 +897,14 @@ class MasterView(View):
 | 
			
		|||
        url = self.request.route_url('people.view', uuid=person.uuid)
 | 
			
		||||
        return tags.link_to(text, url)
 | 
			
		||||
 | 
			
		||||
    def render_person_profile(self, obj, field):
 | 
			
		||||
        person = getattr(obj, field)
 | 
			
		||||
        if not person:
 | 
			
		||||
            return ""
 | 
			
		||||
        text = six.text_type(person)
 | 
			
		||||
        url = self.request.route_url('people.view_profile', uuid=person.uuid)
 | 
			
		||||
        return tags.link_to(text, url)
 | 
			
		||||
 | 
			
		||||
    def render_user(self, obj, field):
 | 
			
		||||
        user = getattr(obj, field)
 | 
			
		||||
        if not user:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue