[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
|
@ -31,7 +31,8 @@ class Action(Field):
|
||||||
label=_(field.labelId);
|
label=_(field.labelId);
|
||||||
descr=field.descrId and _(field.descrId) or None;
|
descr=field.descrId and _(field.descrId) or None;
|
||||||
buttonWidth=ztool.getButtonWidth(label)"
|
buttonWidth=ztool.getButtonWidth(label)"
|
||||||
id=":formId" action=":ztool.absolute_url() + '/do'">
|
id=":formId" action=":ztool.absolute_url() + '/do'"
|
||||||
|
style="display:inline">
|
||||||
<input type="hidden" name="action" value="ExecuteAction"/>
|
<input type="hidden" name="action" value="ExecuteAction"/>
|
||||||
<input type="hidden" name="objectUid" value=":zobj.id"/>
|
<input type="hidden" name="objectUid" value=":zobj.id"/>
|
||||||
<input type="hidden" name="fieldName" value=":name"/>
|
<input type="hidden" name="fieldName" value=":name"/>
|
||||||
|
|
|
@ -67,6 +67,8 @@ class Config:
|
||||||
# the browser-defined language will be used for choosing the language
|
# the browser-defined language will be used for choosing the language
|
||||||
# of returned pages.
|
# of returned pages.
|
||||||
languageSelector = False
|
languageSelector = False
|
||||||
|
# Show the link to the user profile in the user strip
|
||||||
|
userLink = True
|
||||||
# People having one of these roles will be able to create instances
|
# People having one of these roles will be able to create instances
|
||||||
# of classes defined in your application.
|
# of classes defined in your application.
|
||||||
defaultCreators = ['Manager']
|
defaultCreators = ['Manager']
|
||||||
|
|
|
@ -379,10 +379,6 @@ msgstr ""
|
||||||
msgid "app_home"
|
msgid "app_home"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. Default: "Change password"
|
|
||||||
msgid "change_password"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. Default: "This login is reserved."
|
#. Default: "This login is reserved."
|
||||||
msgid "login_reserved"
|
msgid "login_reserved"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
|
@ -379,10 +379,6 @@ msgstr "كلمة السر"
|
||||||
msgid "app_home"
|
msgid "app_home"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. Default: "Change password"
|
|
||||||
msgid "change_password"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. Default: "This login is reserved."
|
#. Default: "This login is reserved."
|
||||||
msgid "login_reserved"
|
msgid "login_reserved"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
|
@ -379,10 +379,6 @@ msgstr "Passwort"
|
||||||
msgid "app_home"
|
msgid "app_home"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. Default: "Change password"
|
|
||||||
msgid "change_password"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. Default: "This login is reserved."
|
#. Default: "This login is reserved."
|
||||||
msgid "login_reserved"
|
msgid "login_reserved"
|
||||||
msgstr "Dieses Login ist reserviert"
|
msgstr "Dieses Login ist reserviert"
|
||||||
|
|
|
@ -380,10 +380,6 @@ msgstr "Password"
|
||||||
msgid "app_home"
|
msgid "app_home"
|
||||||
msgstr "Home"
|
msgstr "Home"
|
||||||
|
|
||||||
#. Default: "Change password"
|
|
||||||
msgid "change_password"
|
|
||||||
msgstr "Change password"
|
|
||||||
|
|
||||||
#. Default: "This login is reserved."
|
#. Default: "This login is reserved."
|
||||||
msgid "login_reserved"
|
msgid "login_reserved"
|
||||||
msgstr "This login is reserved."
|
msgstr "This login is reserved."
|
||||||
|
|
|
@ -379,10 +379,6 @@ msgstr "Contraseña"
|
||||||
msgid "app_home"
|
msgid "app_home"
|
||||||
msgstr "volver a mi página principal"
|
msgstr "volver a mi página principal"
|
||||||
|
|
||||||
#. Default: "Change password"
|
|
||||||
msgid "change_password"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. Default: "This login is reserved."
|
#. Default: "This login is reserved."
|
||||||
msgid "login_reserved"
|
msgid "login_reserved"
|
||||||
msgstr "Este login está reservado."
|
msgstr "Este login está reservado."
|
||||||
|
|
|
@ -380,10 +380,6 @@ msgstr "Mot de passe"
|
||||||
msgid "app_home"
|
msgid "app_home"
|
||||||
msgstr "Revenir à ma page principale"
|
msgstr "Revenir à ma page principale"
|
||||||
|
|
||||||
#. Default: "Change password"
|
|
||||||
msgid "change_password"
|
|
||||||
msgstr "Changer le mot de passe"
|
|
||||||
|
|
||||||
#. Default: "This login is reserved."
|
#. Default: "This login is reserved."
|
||||||
msgid "login_reserved"
|
msgid "login_reserved"
|
||||||
msgstr "Ce login est réservé."
|
msgstr "Ce login est réservé."
|
||||||
|
|
|
@ -379,10 +379,6 @@ msgstr "Password"
|
||||||
msgid "app_home"
|
msgid "app_home"
|
||||||
msgstr "Ritorno alla pagina di partenza"
|
msgstr "Ritorno alla pagina di partenza"
|
||||||
|
|
||||||
#. Default: "Change password"
|
|
||||||
msgid "change_password"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. Default: "This login is reserved."
|
#. Default: "This login is reserved."
|
||||||
msgid "login_reserved"
|
msgid "login_reserved"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
|
@ -379,10 +379,6 @@ msgstr "Wachtwoord"
|
||||||
msgid "app_home"
|
msgid "app_home"
|
||||||
msgstr "Keer terug naar de hoofdpagina"
|
msgstr "Keer terug naar de hoofdpagina"
|
||||||
|
|
||||||
#. Default: "Change password"
|
|
||||||
msgid "change_password"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. Default: "This login is reserved."
|
#. Default: "This login is reserved."
|
||||||
msgid "login_reserved"
|
msgid "login_reserved"
|
||||||
msgstr "Dit login is voorbehouden"
|
msgstr "Dit login is voorbehouden"
|
||||||
|
|
|
@ -14,13 +14,10 @@ class UserWrapper(AbstractWrapper):
|
||||||
layouts = summaryPageLayouts
|
layouts = summaryPageLayouts
|
||||||
|
|
||||||
# Display, in the user strip, links to the User instance of the logged user.
|
# Display, in the user strip, links to the User instance of the logged user.
|
||||||
pxUserLinks = Px('''
|
pxUserLink = Px('''
|
||||||
<td class="userStripText" align=":dright">
|
<td class="userStripText" align=":dright">
|
||||||
<a href=":user.url"><img src=":url('user')"/>
|
<a href=":user.url"><img src=":url('user')"/>
|
||||||
<span style="padding: 0 3px">:user.getTitle()</span></a>
|
<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>''')
|
</td>''')
|
||||||
|
|
||||||
def isSpecial(self): return self.login in self.specialUsers
|
def isSpecial(self): return self.login in self.specialUsers
|
||||||
|
|
|
@ -264,7 +264,7 @@ class AbstractWrapper(object):
|
||||||
<a href=":tool.url + '/performLogout'" title=":_('app_logout')">
|
<a href=":tool.url + '/performLogout'" title=":_('app_logout')">
|
||||||
<img src=":url('logout.gif')"/></a>
|
<img src=":url('logout.gif')"/></a>
|
||||||
</td>
|
</td>
|
||||||
<x>:user.pxUserLinks</x>
|
<x if="cfg.userLink">:user.pxUserLink</x>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
@ -450,7 +450,7 @@ class AbstractWrapper(object):
|
||||||
# Shows the range of buttons (next, previous, save,...) and the workflow
|
# Shows the range of buttons (next, previous, save,...) and the workflow
|
||||||
# transitions for a given object.
|
# transitions for a given object.
|
||||||
pxButtons = Px('''
|
pxButtons = Px('''
|
||||||
<div class="objectButtons" style=":'float: %s' % dleft"
|
<div class="objectButtons"
|
||||||
var="previousPage=phaseObj.getPreviousPage(page)[0];
|
var="previousPage=phaseObj.getPreviousPage(page)[0];
|
||||||
nextPage=phaseObj.getNextPage(page)[0];
|
nextPage=phaseObj.getNextPage(page)[0];
|
||||||
isEdit=layoutType == 'edit';
|
isEdit=layoutType == 'edit';
|
||||||
|
@ -543,14 +543,15 @@ class AbstractWrapper(object):
|
||||||
<x var="targetObj=zobj; buttonsMode='normal'"
|
<x var="targetObj=zobj; buttonsMode='normal'"
|
||||||
if="mayAct and \
|
if="mayAct and \
|
||||||
targetObj.showTransitions(layoutType)">:obj.pxTransitions</x>
|
targetObj.showTransitions(layoutType)">:obj.pxTransitions</x>
|
||||||
</div>
|
|
||||||
<!-- Fields (actions) defined with layout "buttons" -->
|
<!-- Fields (actions) defined with layout "buttons" -->
|
||||||
<x if="layoutType != 'edit'">
|
<x if="layoutType != 'edit'"
|
||||||
<div class="objectButtons" style=":'float: %s' % dleft"
|
var2="fields=zobj.getAppyTypes('buttons', page, type='Action');
|
||||||
var="fields=zobj.getAppyTypes('buttons', page, type='Action');
|
layoutType='view'">
|
||||||
layoutType='view'" if="fields">
|
<!-- Call pxView and not pxRender to avoid having a table -->
|
||||||
<x for="field in fields">:field.pxRender</x></div>
|
<x for="field in fields" var2="name=field.name">:field.pxView</x>
|
||||||
</x>''')
|
</x>
|
||||||
|
</div>''')
|
||||||
|
|
||||||
# Displays the fields of a given page for a given object.
|
# Displays the fields of a given page for a given object.
|
||||||
pxFields = Px('''
|
pxFields = Px('''
|
||||||
|
|
Loading…
Reference in a new issue