loops/organize/work/work_macros.pt
helmutm dddc43086d provide basic work delegation functionality
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3596 fd906abe-77d9-0310-91a1-e0d9ade77398
2009-10-20 17:16:30 +00:00

208 lines
8.1 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:attributes="class python:
(repeat['row'].odd() and 'even' or 'odd')">
<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"
dojoType="dijit.form.Form">
<input type="hidden" name="form.action" value="create_workitem" />
<!--<input type="hidden" name="workitem.action" value="finish" />-->
<input type="hidden" name="id"
tal:attributes="value request/form/id|nothing" />
<div class="heading" i18n:translate="">Add Work Item</div>
<div>
<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="showIf(this, 'delegate', 'party')">
<option tal:repeat="action view/actions"
tal:attributes="value action/name"
tal:content="action/title" />
</select>
<span id="party" style="display: none">&nbsp;
<label i18n:translate="" for="input_party"
style="display: inline">to</label>
<select name="party" id="input_party">
<option tal:repeat="cand view/candidates"
tal:attributes="value cand/name"
tal:content="cand/title" />
</select>
</span>
</div>
<div>
<label i18n:translate="" for="start-end">Start - End</label>
<div id="start-end">
<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>
<label i18n:translate=""
for="duration-effort">Duration / Effort (hh:mm)</label>
<div id="duration-effort">
<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>
<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"
onClick="return closeDialog(true)"
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">
<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="">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 tal:define="state item/track/getStateObject">
<td><span i18n:translate="">State</span>:</td>
<td 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>
<td colspan="2"><br />
<input type="button" value="Close" onclick="closeDialog()"
i18n:attributes="value" />
</td>
</tr>
</table>
</metal:info>
</html>