tiki-user_tasks_list.tpl 8.79 KB
Newer Older
1
{*Smarty template*}
2 3 4

{* start ************ Task list ***************}
<form action="tiki-user_tasks.php" method="post">
5
	<table class="formcolor">
6
		<tr>
pkdille's avatar
pkdille committed
7
			<td colspan="6">
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
				<div align="right">
					{tr}Tasks per page{/tr}
					<select name="tasks_maxRecords">
					<option value="-1" {if $prefs.tasks_maxRecords eq -1} selected="selected"{/if}>{tr}All{/tr}</option>
					<option value="2" {if $prefs.tasks_maxRecords eq 2} selected="selected"{/if}>2</option>
					<option value="5" {if $prefs.tasks_maxRecords eq 5} selected="selected"{/if}>5</option>
					<option value="10" {if $prefs.tasks_maxRecords eq 10} selected="selected"{/if}>10</option>
					<option value="20" {if $prefs.tasks_maxRecords eq 20} selected="selected"{/if}>20</option>
					<option value="30" {if $prefs.tasks_maxRecords eq 30} selected="selected"{/if}>30</option>
					<option value="40" {if $prefs.tasks_maxRecords eq 40} selected="selected"{/if}>40</option>
					<option value="50" {if $prefs.tasks_maxRecords eq 50} selected="selected"{/if}>50</option>
					</select>
				</div>
			</td>
		</tr>
		<tr>
			<th style="text-align:right;" >&nbsp;</th>
			<th><a href="tiki-user_tasks.php?offset={$offset}&amp;sort_mode={if $sort_mode eq 'title_desc'}title_asc{else}title_desc{/if}">{tr}Title{/tr}</a></th>
			<th><a href="tiki-user_tasks.php?offset={$offset}&amp;sort_mode={if $sort_mode eq 'start_desc'}start_asc{else}start_desc{/if}">{tr}Start{/tr}</a></th>
			<th><a href="tiki-user_tasks.php?offset={$offset}&amp;sort_mode={if $sort_mode eq 'end_desc'}end_asc{else}end_desc{/if}">{tr}End{/tr}</a></th>
			<th style="text-align:right;">
				<a href="tiki-user_tasks.php?offset={$offset}&amp;sort_mode={if $sort_mode eq 'priority_desc'}priority_asc{else}priority_desc{/if}">
					{tr}Priority{/tr}
				</a>
			</th>
			<th style="text-align:right;">
				<a href="tiki-user_tasks.php?offset={$offset}&amp;sort_mode={if $sort_mode eq 'percentage_desc'}percentage_asc{else}percentage_desc{/if}">
					{tr}Completed{/tr}
				</a>
			</th>
		</tr>
39

40 41 42
		{section name=task_i loop=$tasklist}
			<tr>
				<td class="prio{$tasklist[task_i].priority}">
43
					<input {if $tasklist[task_i].disabled} disabled = "disabled" {/if} type="checkbox" name="task[{$tasklist[task_i].taskId}]">
44
					{if $tasklist[task_i].deleted}
45
						{if $tasklist[task_i].creator ne $user}
lindonb's avatar
lindonb committed
46
							{icon name='remove' class='tips' title=":{tr}Deleted{/tr}"}
47
						{else}
lindonb's avatar
lindonb committed
48
							{icon name='trash' class='tips' title=":{tr}In the trash{/tr}"}
49 50
						{/if}
					{/if}
51
					{if (($tasklist[task_i].creator eq $tasklist[task_i].user) and ($tasklist[task_i].user eq $user))}
52 53
						{*private task*}
					{else}
54
						{if ($tasklist[task_i].user eq $user)}
55
							{*received task*}
lindonb's avatar
lindonb committed
56
							{icon name='login' title="{tr}Task received{/tr}"}
57
							{if (($tasklist[task_i].accepted_creator eq 'n') or ($tasklist[task_i].accepted_user eq 'n'))}
lindonb's avatar
lindonb committed
58
								{icon name='remove' class='tips' title=":{tr}Rejected by a user{/tr}"}
59 60
							{else}
								{if ($tasklist[task_i].accepted_user eq '')}
lindonb's avatar
lindonb committed
61
									{icon name='history' class='tips' title=":{tr}Waiting for me{/tr}"}
62
								{else}
63
									{if ($tasklist[task_i].accepted_creator eq 'y')}
lindonb's avatar
lindonb committed
64
										{icon name='ok' class='tips' title=":{tr}Accepted by task user and creator{/tr}"}
65
									{else}
lindonb's avatar
lindonb committed
66
										{icon name='user' class='tips' title=":{tr}Waiting for other user{/tr}"}
67 68 69
									{/if}
								{/if}
							{/if}
70
						{elseif ($tasklist[task_i].creator eq $user)}
71
							{*submitted task*}
lindonb's avatar
lindonb committed
72
							{icon name='logout' class='tips' title=":{tr}Task sent{/tr}"}
73
							{if (($tasklist[task_i].accepted_creator eq 'n') or ($tasklist[task_i].accepted_user eq 'n'))}
74
								<img src="{$img_not_accepted}" height="{$img_not_accepted_height}" width="{$img_not_accepted_width}" title="{tr}Not Accepted by One User{/tr}" alt="{tr}Not Accepted User{/tr}">
75 76 77
							{else}
								{if ($tasklist[task_i].accepted_user eq '')}
									{if ($tasklist[task_i].accepted_creator eq 'y')}
lindonb's avatar
lindonb committed
78
										{icon name='user' class='tips' title=":{tr}Waiting for other user{/tr}"}
79
									{else}
lindonb's avatar
lindonb committed
80
										{icon name='history' class='tips' title=":{tr}Waiting for me{/tr}"}
81 82 83
									{/if}
								{else}
									{if ($tasklist[task_i].accepted_creator eq 'y')}
lindonb's avatar
lindonb committed
84
										{icon name='ok' class='tips' title=":{tr}Accepted by task user and creator{/tr}"}
85
									{else}
lindonb's avatar
lindonb committed
86
										{icon name='history' class='tips' title=":{tr}Waiting for me{/tr}" }
87 88 89 90 91
									{/if}
								{/if}
							{/if}
						{else}
							{*shared task*}
lindonb's avatar
lindonb committed
92
							{icon name='group' class='tips' title=":{tr}Task shared by a group{/tr}"}
93 94 95 96 97 98 99
						{/if}
					{/if}
				</td>
				<td class="prio{$tasklist[task_i].priority}">
					<a {if $tasklist[task_i].status eq 'c'}style="text-decoration:line-through;"{/if} class="link" href="tiki-user_tasks.php?taskId={$tasklist[task_i].taskId}&amp;offset={$offset}&amp;sort_mode={$sort_mode}&amp;tiki_view_mode=view&amp;find={$find}">{$tasklist[task_i].title|escape}</a>
				</td>
				<td {if $tasklist[task_i].status eq 'c'}style="text-decoration:line-through;"{/if} class="prio{$tasklist[task_i].priority}">
100
					<div class="center-block">
101
						{$tasklist[task_i].start|tiki_short_date}&nbsp;[{$tasklist[task_i].start|tiki_short_time}]
102 103 104
					</div>
				</td>
				<td {if $tasklist[task_i].status eq 'c'}style="text-decoration:line-through;"{/if} class="prio{$tasklist[task_i].priority}">
105
					<div class="center-block">
106 107
						{$tasklist[task_i].end|tiki_short_date}&nbsp;[{$tasklist[task_i].end|tiki_short_time}]
					</div>
108 109 110 111 112
				</td>
				<td style="text-align:right;{if $tasklist[task_i].status eq 'c'}text-decoration:line-through;{/if}" class="prio{$tasklist[task_i].priority}">
					{$tasklist[task_i].priority}
				</td>
				<td style="text-align:right;{if $tasklist[task_i].status eq 'c'}text-decoration:line-through;{/if}" class="prio{$tasklist[task_i].priority}">
113 114
					<select {if $tasklist[task_i].disabled} disabled = "disabled" {/if} name="task_perc[{$tasklist[task_i].taskId}]">
						<option value="w" {if $tasklist[task_i].percentage_null} selected = "selected" {/if}>{tr}Waiting{/tr}</option>
115 116 117
						{section name=zz loop=$percs}
							<option value="{$percs[zz]|escape}" {if $tasklist[task_i].percentage eq $percs[zz] and !$tasklist[task_i].percentage_null} selected = "selected" {/if} >
								{$percs[zz]}%
118
							</option>
119 120 121 122 123 124 125 126 127 128
						{/section}
					</select>
				</td>
			</tr>
		{sectionelse}
			<tr>
				<td class="odd" colspan="6">{tr}No tasks entered{/tr}</td>
			</tr>
		{/section}
		<tr>
129
			<td colspan="3" style="text-align:left; vertical-align:bottom;">
lindonb's avatar
lindonb committed
130
				{icon name='ok' class='tips' title=":{tr}Select{/tr}" style="margin-bottom:8px; margin-left:5px"}
131 132 133 134 135 136 137
				<select name="action" style="vertical-align:bottom;">
					<option value="" >{tr}Select One{/tr}</option>
					<option value="waiting_marked" >{tr}Waiting{/tr}</option>
					<option value="open_marked" >{tr}Open{/tr}</option>
					<option value="complete_marked" >{tr}Completed{/tr}</option>
					<option value="move_marked_to_trash">{tr}Trash{/tr}</option>
					<option value="remove_marked_from_trash">{tr}Undo Trash{/tr}</option>
138
				</select>
139
				<input type="submit" class="btn btn-primary btn-sm" name="update_tasks" value="{tr}Go{/tr}" style="vertical-align:bottom;">
140
			</td>
141
			<td colspan="3" style="text-align:right;">
142
				<input type="submit" class="btn btn-primary btn-sm" name="update_percentage" value="{tr}Go{/tr}" style="vertical-align:bottom;">
lindonb's avatar
lindonb committed
143
				{icon name='next' class='tips' title="{tr}Go{/tr}" style="margin-bottom:8px; margin-right:8px"}
144 145 146
			</td>
		</tr>
		<tr>
147
			<td colspan="6" style="text-align:center;">
148
				&nbsp;&nbsp;{tr}Show:{/tr}
149 150 151 152 153 154 155 156 157 158 159 160
				&nbsp;<input name="show_private" {if $show_private} checked="checked" {/if} type="checkbox">{tr}Private{/tr}
				{if $tiki_p_tasks_receive eq 'y'}&nbsp;<input name="show_received" {if $show_received} checked="checked" {/if} type="checkbox">{tr}Received{/tr}{/if}
				{if $tiki_p_tasks_send eq 'y'}&nbsp;<input name="show_submitted" {if $show_submitted} checked="checked" {/if} type="checkbox">{tr}Submitted{/tr}{/if}
				{if $tiki_p_tasks_receive eq 'y' or $tiki_p_tasks_send eq 'y'}&nbsp;<input name="show_shared" {if $show_shared} checked="checked" {/if} type="checkbox">{tr}Shared{/tr}{/if}
				&nbsp;&nbsp;&nbsp;&nbsp;
				&nbsp;<input name="show_trash" {if $show_trash} checked="checked" {/if} type="checkbox">{tr}Trash{/tr}
				&nbsp;<input name="show_completed" {if $show_completed} checked="checked" {/if} type="checkbox">{tr}Completed{/tr}
				{if ($admin_mode)}
					&nbsp;&nbsp;
					<a class="highlight" >
					<input name="show_admin" {if $show_admin} checked="checked" {/if} type="checkbox" />{tr}All Shared Tasks{/tr}</a>
				{/if}
161 162 163
			</td>
		</tr>
		<tr>
164
			<td colspan="6" style="text-align:center;">
165
				<input type="submit" class="btn btn-info btn-sm" name="reload" value="{tr}Reload{/tr}">
166 167 168
			</td>
		</tr>
	</table>
169
</form>
170

171
{pagination_links cant=$cant step=$maxRecords offset=$offset}{/pagination_links}
172
{* end ************ Task list ***************}