299 lines
12 KiB
XML
299 lines
12 KiB
XML
<html i18n:domain="loops">
|
|
<!-- $Id$ -->
|
|
|
|
|
|
<!-- listings -->
|
|
|
|
<metal:work define-macro="workitems"
|
|
tal:define="work nocall:item/workItems"
|
|
tal:condition="work/listWorkItems|nothing">
|
|
<br />
|
|
<h2 i18n:translate="">Work Items</h2>
|
|
<metal:workitems define-macro="workitems_listing"
|
|
tal:define="work nocall:work|nocall:view/workItems;">
|
|
<table class="listing">
|
|
<tr>
|
|
<tal:colheader repeat="column work/allColumns">
|
|
<th tal:condition="python: column in work.columns"
|
|
tal:content="column"
|
|
i18n:translate="">Task</th>
|
|
</tal:colheader>
|
|
</tr>
|
|
<tal:workitem tal:repeat="row work/listWorkItems">
|
|
<tr tal:condition="row/monthChanged">
|
|
<td class="headline"
|
|
tal:attributes="colspan python: len(work.columns)"
|
|
tal:content="row/month">2009-01</td></tr>
|
|
<tr tal:define="wiType row/workItemType"
|
|
tal:attributes="class wiType/indicator|nothing">
|
|
<td class="nowrap center"
|
|
tal:define="today python: row.isToday and ' today' or ''"
|
|
tal:attributes="title row/weekDay;
|
|
class string:nowrap center$today"
|
|
i18n:attributes="title"
|
|
tal:content="row/day">2007-03-30</td>
|
|
<td class="nowrap center" tal:content="row/start">17:30</td>
|
|
<td class="nowrap center" tal:content="row/end">20:00</td>
|
|
<td class="nowrap center" tal:content="row/duration">2:30</td>
|
|
<td tal:condition="python: 'Task' in work.columns">
|
|
<a tal:attributes="href row/objectData/url"
|
|
tal:content="row/objectData/title">Task</a></td>
|
|
<td tal:condition="python: 'User' in work.columns">
|
|
<a tal:attributes="href row/user/url"
|
|
tal:content="row/user/title">John</a></td>
|
|
<td tal:content="row/track/title"
|
|
tal:attributes="title row/descriptionPlain">Title</td>
|
|
<td class="nowrap">
|
|
<tal:actions repeat="action row/actions">
|
|
<metal:action use-macro="action/macro" />
|
|
</tal:actions>
|
|
</td>
|
|
</tr>
|
|
</tal:workitem>
|
|
</table>
|
|
</metal:workitems>
|
|
</metal:work>
|
|
|
|
|
|
<metal:work define-macro="workitems_query"
|
|
tal:define="work nocall:item">
|
|
<br />
|
|
<metal:block use-macro="view/concept_macros/concepttitle" />
|
|
<metal:workitems use-macro="item/work_macros/workitems_listing" />
|
|
</metal:work>
|
|
|
|
|
|
<!-- forms -->
|
|
|
|
<metal:block define-macro="create_workitem">
|
|
<form method="post" id="addWorkitem_form" class="dialog"
|
|
xx_dojoType="dijit.form.Form"
|
|
tal:define="workItemTypes view/workItemTypes;
|
|
workItemType view/workItemType">
|
|
<input type="hidden" name="form.action" value="create_workitem" />
|
|
<input type="hidden" name="id"
|
|
tal:attributes="value request/form/id|nothing" />
|
|
<div class="heading" i18n:translate="">Add Work Item</div>
|
|
<div>
|
|
<tal:type condition="view/showTypes">
|
|
<label i18n:translate="" for="types">Work Item Type</label>
|
|
<select name="workItemType" id="types">
|
|
<option tal:repeat="type workItemTypes"
|
|
tal:attributes="value type/name;
|
|
selected python:
|
|
type.name == workItemType.name"
|
|
tal:content="type/title"
|
|
i18n:translate="" />
|
|
</select>
|
|
</tal:type>
|
|
<tal:type condition="not:view/showTypes">
|
|
<input type="hidden" name="workItemType"
|
|
tal:attributes="value python:workItemTypes[0].name" />
|
|
</tal:type>
|
|
<label i18n:translate="" for="title">Title</label>
|
|
<div>
|
|
<input name="title" id="title" style="width: 60em"
|
|
dojoType="dijit.form.ValidationTextBox" required
|
|
tal:attributes="value view/title" /></div>
|
|
</div>
|
|
<div>
|
|
<label i18n:translate="" for="description">Description</label>
|
|
<div>
|
|
<textarea name="description" cols="80" rows="4" id="description"
|
|
dojoType="dijit.form.SimpleTextarea" style="width: 60em"
|
|
tal:content="view/description"></textarea></div>
|
|
</div>
|
|
<div>
|
|
<label i18n:translate="" for="action">Action</label>
|
|
<select name="workitem.action" id="action"
|
|
onChange="showIfIn(this, [['move', 'target_task'],
|
|
['delegate', 'target_party']])">
|
|
<option tal:repeat="action view/actions"
|
|
tal:attributes="value action/name"
|
|
tal:content="action/title"
|
|
i18n:translate="" />
|
|
</select>
|
|
<span id="target_party" style="display: none">
|
|
<label i18n:translate="delegate_to_party" for="input_party"
|
|
style="display: inline">to</label>
|
|
<span dojoType="dojox.data.QueryReadStore" jsId="party_search_store"
|
|
tal:define="types view/getTypesParamsForFilteringSelect"
|
|
tal:attributes="url string:listConceptsForComboBox.js$types;" >
|
|
</span>
|
|
<input dojoType="dijit.form.FilteringSelect"
|
|
autoComplete="False" labelAttr="label" searchDelay="400"
|
|
name="party" id="input_party"
|
|
store="party_search_store" />
|
|
</span>
|
|
<span id="target_task" style="display: none"
|
|
tal:condition="not:view/followUpTask">
|
|
<label i18n:translate="move_to_task" for="input_task"
|
|
style="display: inline">to</label>
|
|
<span dojoType="dojox.data.QueryReadStore" jsId="task_search_store"
|
|
tal:define="types python:
|
|
view.getTypesParamsForFilteringSelect(view.taskTypes)"
|
|
tal:attributes="url string:listConceptsForComboBox.js$types;" >
|
|
</span>
|
|
<input dojoType="dijit.form.FilteringSelect"
|
|
autoComplete="False" labelAttr="label" searchDelay="400"
|
|
name="task" id="input_task"
|
|
store="task_search_store" />
|
|
</span>
|
|
<span id="target_task" style="display: none"
|
|
tal:condition="view/followUpTask">
|
|
<label i18n:translate="move_to_task" for="input_task"
|
|
style="display: inline">to</label>
|
|
<span tal:content="view/followUpTask/title" />
|
|
<input type="hidden" name="task" id="input_task"
|
|
tal:attributes="value python:
|
|
view.getUidForObject(view.followUpTask)" />
|
|
</span>
|
|
</div>
|
|
<div>
|
|
<div id="deadline"
|
|
tal:condition="python:'deadline' in workItemType.fields">
|
|
<label i18n:translate="" for="deadline-input">Deadline</label>
|
|
<div id="deadline-input">
|
|
<input type="text" name="deadline" style="width: 8em"
|
|
dojoType="dijit.form.DateTextBox"
|
|
tal:attributes="value view/deadline" /></div>
|
|
</div>
|
|
<div id="start-end"
|
|
tal:condition="python:'start-end' in workItemType.fields">
|
|
<label i18n:translate="" for="start-end-input">Start - End</label>
|
|
<div id="start-end-input">
|
|
<input type="text" name="start_date" style="width: 8em"
|
|
dojoType="dijit.form.DateTextBox"
|
|
tal:attributes="value view/date" />
|
|
<input type="text" name="start_time" style="width: 6em"
|
|
dojoType="dijit.form.TimeTextBox"
|
|
tal:attributes="value view/startTime" /> -
|
|
<input type="text" name="end_time" style="width: 6em"
|
|
dojoType="dijit.form.TimeTextBox"
|
|
tal:attributes="value view/endTime" /></div>
|
|
</div>
|
|
<div id="duration-effort"
|
|
tal:condition="python:
|
|
'duration-effort' in workItemType.fields">
|
|
<label i18n:translate=""
|
|
for="duration-effort-input">Duration / Effort (hh:mm)</label>
|
|
<div id="duration-effort-input">
|
|
<input type="text" name="duration" style="width: 5em"
|
|
dojoType="dijit.form.ValidationTextBox"
|
|
regexp="-{0,1}[0-9]{1,2}(:[0-5][0-9]){0,1}"
|
|
tal:attributes="value view/duration" /> /
|
|
<input type="text" name="effort" style="width: 5em"
|
|
dojoType="dijit.form.ValidationTextBox"
|
|
regexp="-{0,1}[0-9]{1,2}(:[0-5][0-9]){0,1}"
|
|
tal:attributes="value view/effort" /></div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<label i18n:translate="" for="comment">Comment</label>
|
|
<div>
|
|
<textarea name="comment" cols="80" rows="4" id="comment"
|
|
dojoType="dijit.form.SimpleTextarea"
|
|
style="width: 60em"
|
|
tal:content="view/comment"></textarea></div>
|
|
</div>
|
|
<div class="buttons">
|
|
<input value="Save" type="submit"
|
|
i18n:attributes="value">
|
|
<input type="button" value="Cancel"
|
|
onClick="return closeDialog(false)"
|
|
i18n:attributes="value"></div>
|
|
</form>
|
|
</metal:block>
|
|
|
|
|
|
<metal:info define-macro="workitem_info"
|
|
tal:define="item nocall:view/track">
|
|
<table class="object_info" width="400"
|
|
tal:define="state item/track/getStateObject">
|
|
<tr>
|
|
<td colspan="2"><h2 i18n:translate="">Work Item Information</h2><br /></td>
|
|
</tr>
|
|
<tr>
|
|
<td><span i18n:translate="">Title</span>:</td>
|
|
<td tal:content="item/track/title"></td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><span i18n:translate="">Description</span>:</td>
|
|
<td tal:content="structure item/descriptionFormatted"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><span i18n:translate="">Party</span>:</td>
|
|
<td tal:content="item/user/title"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><span i18n:translate="">Task</span>:</td>
|
|
<td tal:content="item/object/title"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><span i18n:translate="">Deadline</span>:</td>
|
|
<td tal:content="item/deadline"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><span i18n:translate="">Start - End</span>:</td>
|
|
<td><span tal:content="item/startDay" />
|
|
<span tal:content="item/start" /> -
|
|
<span tal:content="item/end" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td><span i18n:translate="">Duration/Effort</span>:</td>
|
|
<td><span tal:content="item/duration" /> /
|
|
<span tal:content="item/effort" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><span i18n:translate="">Comment</span>:</td>
|
|
<td tal:content="item/track/comment"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><span i18n:translate="">State</span>:</td>
|
|
<td i18n:translate=""
|
|
tal:content="state/title"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><span i18n:translate="">Created</span>:</td>
|
|
<td><span tal:content="item/created" />
|
|
(<span tal:content="python:
|
|
item.getUserForUserName(item.track.creator)['title']" />)</td>
|
|
</tr>
|
|
<tr tal:condition="python:state.name in ('delegated', 'delegated_x')">
|
|
<td><span i18n:translate="">Delegated to</span>:</td>
|
|
<td><a tal:define="party python:view.getObjectForUid(item.targetWorkItem.party)"
|
|
tal:attributes="href python:view.getUrlForTarget(party)"
|
|
tal:content="party/title" /></td>
|
|
</tr>
|
|
<tr tal:condition="python:state.name in ('moved', 'moved_x') and
|
|
item.targetWorkItem is not None">
|
|
<td><span i18n:translate="">Moved To</span>:</td>
|
|
<td><a tal:define="task python:view.getObjectForUid(item.targetWorkItem.taskId)"
|
|
tal:attributes="href python:view.getUrlForTarget(task)"
|
|
tal:content="task/title" /></td>
|
|
</tr>
|
|
<tr tal:define="source item/sourceWorkItem;
|
|
isDelegated python:source and source.state in ('delegated', 'delegated_x')"
|
|
tal:condition="source">
|
|
<td>
|
|
<span tal:condition="isDelegated"
|
|
i18n:translate="">Delegated by</span>
|
|
<span tal:condition="not:isDelegated"
|
|
i18n:translate="">Moved From</span>:
|
|
</td>
|
|
<td><a tal:define="objId python:isDelegated and source.party or source.taskId;
|
|
obj python:view.getObjectForUid(objId)"
|
|
tal:attributes="href python:view.getUrlForTarget(obj)"
|
|
tal:content="obj/title" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2"><br />
|
|
<input type="button" value="Close" onclick="closeDialog()"
|
|
i18n:attributes="value" />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</metal:info>
|
|
|
|
|
|
</html>
|