99 lines
3.4 KiB
XML
99 lines
3.4 KiB
XML
<html i18n:domain="loops">
|
|
|
|
|
|
<metal:input define-macro="filter_allstates">
|
|
<input type="checkbox" name="filter.states" value="all" id="filter-states"
|
|
onclick="submit()"
|
|
tal:attributes="checked python:
|
|
request.form.get('filter.states') == 'all'" />
|
|
<label for="filter-states"
|
|
i18n:translate="">Show all</label>
|
|
</metal:input>
|
|
|
|
|
|
<metal:query define-macro="query">
|
|
<div>
|
|
<form method="post">
|
|
<input type="hidden" name="search_submitted" value="yes" />
|
|
<h1 i18n:translate="">Select Objects by State</h1>
|
|
<br />
|
|
<table class="listing"
|
|
tal:define="defs item/rcStatesDefinitions">
|
|
<tr>
|
|
<th i18n:translate="">Object Type</th>
|
|
<th i18n:translate="">Workflow</th>
|
|
<th i18n:translate="">States</th>
|
|
</tr>
|
|
<tal:def repeat="deftype defs">
|
|
<tr tal:repeat="def defs/?deftype">
|
|
<td valign="top">
|
|
<span tal:condition="repeat/def/start"
|
|
tal:content="deftype"
|
|
i18n:translate="" />
|
|
</td>
|
|
<td valign="top"
|
|
tal:content="def/name"
|
|
i18n:translate=""></td>
|
|
<td>
|
|
<tal:states repeat="state def/states">
|
|
<tal:state define="name string:state.$deftype.${def/name};
|
|
value state/name">
|
|
<input type="checkbox"
|
|
tal:attributes="name string:$name:list;
|
|
value value;
|
|
checked python:
|
|
value in item.selectedStates.get(name, ());
|
|
id string:$name.$value"
|
|
/> <label tal:content="state/title"
|
|
i18n:translate=""
|
|
tal:attributes="for string:$name.$value" />
|
|
|
|
</tal:state>
|
|
</tal:states>
|
|
</td>
|
|
</tr>
|
|
</tal:def>
|
|
</table>
|
|
<input type="submit" name="button.search" value="Search" class="submit"
|
|
i18n:attributes="value" />
|
|
<tal:results condition="request/search_submitted|nothing">
|
|
<input type="hidden" name="form.action"
|
|
tal:attributes="value item/form_action" />
|
|
<h2 i18n:translate="">Search results</h2>
|
|
<metal:results use-macro="item/search_macros/results" />
|
|
<metal:actions use-macro="item/search_macros/actions" />
|
|
</tal:results>
|
|
</form>
|
|
</div>
|
|
</metal:query>
|
|
|
|
|
|
<!-- portlets -->
|
|
|
|
<metal:actions define-macro="portlet_states">
|
|
<div tal:repeat="stf macro/stfs">
|
|
<div tal:condition="python:len(macro.stfs) > 1">
|
|
<span i18n:translate="">Workflow</span>
|
|
<span i18n:translate=""
|
|
tal:content="stf/statesDefinition" />
|
|
</div>
|
|
<div>
|
|
<b i18n:translate="">State</b>:
|
|
<span i18n:translate=""
|
|
tal:content="stf/state" />
|
|
</div>
|
|
<div>
|
|
<div><b i18n:translate="">Available Transitions</b>:</div>
|
|
<ul>
|
|
<li tal:repeat="action stf/getAvailableTransitionsForUser">
|
|
<a i18n:translate=""
|
|
tal:attributes="href string:change_state.html"
|
|
tal:content="action/title" />
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</metal:actions>
|
|
|
|
|
|
</html>
|