[gen] Added boolean param Config.userLink allowing to show/hide (show by default) the link, in the user strip, to go to the user page.
This commit is contained in:
parent
55c36a1123
commit
f3849d4f92
12 changed files with 16 additions and 47 deletions
|
@ -14,13 +14,10 @@ class UserWrapper(AbstractWrapper):
|
|||
layouts = summaryPageLayouts
|
||||
|
||||
# Display, in the user strip, links to the User instance of the logged user.
|
||||
pxUserLinks = Px('''
|
||||
pxUserLink = Px('''
|
||||
<td class="userStripText" align=":dright">
|
||||
<a href=":user.url"><img src=":url('user')"/>
|
||||
<span style="padding: 0 3px">:user.getTitle()</span></a>
|
||||
<!-- Page for modifying the password -->
|
||||
<a if="user.showPassword()" class="changePassword"
|
||||
href=":'%s/edit?page=passwords' % user.url">:_('change_password')</a>
|
||||
</td>''')
|
||||
|
||||
def isSpecial(self): return self.login in self.specialUsers
|
||||
|
|
|
@ -264,7 +264,7 @@ class AbstractWrapper(object):
|
|||
<a href=":tool.url + '/performLogout'" title=":_('app_logout')">
|
||||
<img src=":url('logout.gif')"/></a>
|
||||
</td>
|
||||
<x>:user.pxUserLinks</x>
|
||||
<x if="cfg.userLink">:user.pxUserLink</x>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
@ -450,7 +450,7 @@ class AbstractWrapper(object):
|
|||
# Shows the range of buttons (next, previous, save,...) and the workflow
|
||||
# transitions for a given object.
|
||||
pxButtons = Px('''
|
||||
<div class="objectButtons" style=":'float: %s' % dleft"
|
||||
<div class="objectButtons"
|
||||
var="previousPage=phaseObj.getPreviousPage(page)[0];
|
||||
nextPage=phaseObj.getNextPage(page)[0];
|
||||
isEdit=layoutType == 'edit';
|
||||
|
@ -543,14 +543,15 @@ class AbstractWrapper(object):
|
|||
<x var="targetObj=zobj; buttonsMode='normal'"
|
||||
if="mayAct and \
|
||||
targetObj.showTransitions(layoutType)">:obj.pxTransitions</x>
|
||||
</div>
|
||||
<!-- Fields (actions) defined with layout "buttons" -->
|
||||
<x if="layoutType != 'edit'">
|
||||
<div class="objectButtons" style=":'float: %s' % dleft"
|
||||
var="fields=zobj.getAppyTypes('buttons', page, type='Action');
|
||||
layoutType='view'" if="fields">
|
||||
<x for="field in fields">:field.pxRender</x></div>
|
||||
</x>''')
|
||||
|
||||
<!-- Fields (actions) defined with layout "buttons" -->
|
||||
<x if="layoutType != 'edit'"
|
||||
var2="fields=zobj.getAppyTypes('buttons', page, type='Action');
|
||||
layoutType='view'">
|
||||
<!-- Call pxView and not pxRender to avoid having a table -->
|
||||
<x for="field in fields" var2="name=field.name">:field.pxView</x>
|
||||
</x>
|
||||
</div>''')
|
||||
|
||||
# Displays the fields of a given page for a given object.
|
||||
pxFields = Px('''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue