[gen] Field.indexed, instead of being a Boolean, can be a str, to represent the name of a Zope Index. This way, it is possible to bypass the standard Appy choice for index types, ie for Computed fields whose content may produce any type of value; added missing translation labels in the macro displaying object's history; added default fields Tool.dateFormat and Tool.hourFormat that give application-wide default formats for dates with/without hour; added a table in Config->Users that shows the connected users and the date/time of their last access to the app; added the missing search macro for a Computed field.
This commit is contained in:
parent
21ffa7b46d
commit
699cc8346b
8 changed files with 95 additions and 21 deletions
|
@ -72,10 +72,10 @@
|
|||
<metal:nav use-macro="context/ui/navigate/macros/appyNavigate"/>
|
||||
<table width="100%" class="history">
|
||||
<tr>
|
||||
<th tal:attributes="align dleft">Action</th>
|
||||
<th tal:attributes="align dleft">By</th>
|
||||
<th tal:attributes="align dleft">Date</th>
|
||||
<th tal:attributes="align dleft">Comment</th>
|
||||
<th tal:attributes="align dleft" tal:content="python: _('object_action')"></th>
|
||||
<th tal:attributes="align dleft" tal:content="python: _('object_author')"></th>
|
||||
<th tal:attributes="align dleft" tal:content="python: _('action_date')"></th>
|
||||
<th tal:attributes="align dleft" tal:content="python: _('action_comment')"></th>
|
||||
</tr>
|
||||
<tal:event repeat="event objs">
|
||||
<tr tal:define="odd repeat/event/odd;
|
||||
|
@ -86,7 +86,8 @@
|
|||
<td tal:condition="isDataChange" tal:content="python: _('data_change')"></td>
|
||||
<td tal:condition="not: isDataChange"
|
||||
tal:content="python: _(contextObj.getWorkflowLabel(event['action']))"/>
|
||||
<td tal:define="actorid python:event.get('actor');" tal:content="actorid"/>
|
||||
<td tal:define="actorid python:event.get('actor')"
|
||||
tal:content="python: tool.getUserName(actorid)"/>
|
||||
<td tal:content="event/time"/>
|
||||
<td tal:condition="not: isDataChange">
|
||||
<tal:c condition="rhComments"
|
||||
|
@ -202,17 +203,17 @@
|
|||
tal:attributes="src python:test(historyExpanded, 'ui/collapse.gif', 'ui/expand.gif');
|
||||
align dleft"
|
||||
id="appyHistory_img"/>
|
||||
<span>History</span> ||
|
||||
<span tal:replace="python: _('object_history')"></span> ||
|
||||
</tal:accessHistory>
|
||||
|
||||
<tal:comment replace="nothing">Show document creator</tal:comment>
|
||||
<span class="by" tal:condition="creator">
|
||||
<span>by <span tal:replace="creator"/>
|
||||
—
|
||||
</span>
|
||||
<span class="by" tal:condition="python: creator != 'Anonymous User'">
|
||||
<tal:by replace="python: _('object_created_by')"/>
|
||||
<tal:creator replace="python: tool.getUserName(creator)"/> —
|
||||
</span>
|
||||
<tal:comment replace="nothing">Show creation date</tal:comment>
|
||||
<span tal:replace="python:contextObj.created"></span>
|
||||
<tal:by replace="python: _('object_created_on')"/>
|
||||
<span tal:replace="python: tool.formatDate(contextObj.created, withHour=True)"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tal:comment replace="nothing">Object history</tal:comment>
|
||||
|
|
|
@ -34,4 +34,9 @@
|
|||
</metal:cell>
|
||||
|
||||
<tal:comment replace="nothing">Search macro for a Computed.</tal:comment>
|
||||
<metal:search define-macro="search"></metal:search>
|
||||
<metal:search define-macro="search">
|
||||
<label tal:attributes="for widgetName" tal:content="python: _(widget['labelId'])"></label><br>
|
||||
<input type="text" tal:define="maxChars python: test(widget['maxChars'], widget['maxChars'], '')"
|
||||
tal:attributes="name python: '%s*string' % widgetName;
|
||||
maxlength maxChars"/>
|
||||
</metal:search>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue