[gen] added obj.mayEdit, an additional condition for editing an object (similar to mayDelete); bugfix: specifying a workflow for a User class crashed because, in installer.py, Appy took into account the standard workflow on this Class instead of the custom one.
This commit is contained in:
parent
e3b7f5364f
commit
0d7afb685f
9 changed files with 49 additions and 25 deletions
|
@ -285,7 +285,7 @@
|
|||
<img title="Edit" style="cursor:pointer"
|
||||
tal:attributes="onClick python: 'href: window.location=\'%s\'' % contextObj.getUrl(mode='edit', page=page);
|
||||
src string: $appUrl/ui/editBig.png"
|
||||
tal:condition="python: contextObj.allows('Modify portal content')"/>
|
||||
tal:condition="contextObj/mayEdit"/>
|
||||
</tal:edit>
|
||||
|
||||
<tal:refresh condition="contextObj/isDebug">
|
||||
|
|
|
@ -124,12 +124,12 @@
|
|||
<td>
|
||||
<a tal:define="navInfo python:'search.%s.%s.%d.%d' % (className, searchName, repeat['obj'].number()+startNumber, totalNumber);"
|
||||
tal:attributes="href python: obj.getUrl(mode='edit', page='main', nav=navInfo)"
|
||||
tal:condition="python: obj.allows('Modify portal content')">
|
||||
tal:condition="obj/mayEdit">
|
||||
<img title="Edit" tal:attributes="src string: $appUrl/ui/edit.gif"/>
|
||||
</a></td>
|
||||
<tal:comment replace="nothing">Delete the element</tal:comment>
|
||||
<td>
|
||||
<img tal:condition="python: obj.allows('Delete objects') and obj.mayDelete()"
|
||||
<img tal:condition="obj/mayDelete"
|
||||
title="Delete" style="cursor:pointer"
|
||||
tal:attributes="src string: $appUrl/ui/delete.png;
|
||||
onClick python:'onDeleteObject(\'%s\')' % obj.UID()"/>
|
||||
|
|
|
@ -143,7 +143,8 @@
|
|||
</td>
|
||||
<td align="right" class="userStripText" tal:define="userInfo tool/getUserLine">
|
||||
<span tal:content="python: userInfo[0]"></span>
|
||||
<a tal:attributes="href python: userInfo[1]">
|
||||
<a tal:condition="python: userInfo[1]"
|
||||
tal:attributes="href python: userInfo[1]">
|
||||
<img tal:attributes="src string: $appUrl/ui/edit.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
</tal:moveRef>
|
||||
</td>
|
||||
<tal:comment replace="nothing">Edit the element</tal:comment>
|
||||
<td tal:condition="python: obj.allows('Modify portal content') and not appyType['noForm']">
|
||||
<td tal:condition="python: not appyType['noForm'] and obj.mayEdit()">
|
||||
<a tal:define="navInfo python:'ref.%s.%s:%s.%d.%d' % (contextObj.UID(), fieldName, appyType['pageName'], repeat['obj'].number()+startNumber, totalNumber);"
|
||||
tal:attributes="href python: obj.getUrl(mode='edit', page='main', nav=navInfo)">
|
||||
<img title="Edit" tal:attributes="src string: $appUrl/ui/edit.gif"/>
|
||||
|
@ -48,7 +48,7 @@
|
|||
</td>
|
||||
<tal:comment replace="nothing">Delete the element</tal:comment>
|
||||
<td>
|
||||
<img tal:condition="python: not appyType['isBack'] and obj.allows('Delete objects') and obj.mayDelete()"
|
||||
<img tal:condition="python: not appyType['isBack'] and obj.mayDelete()"
|
||||
title="Delete" style="cursor:pointer"
|
||||
tal:attributes="src string: $appUrl/ui/delete.png;
|
||||
onClick python:'onDeleteObject(\'%s\')' % obj.UID()"/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue