* move edit link to a different column in order to free up horizontal space on mobile
* fix missing manager name on mobile/users page when co-manager is logged in
<tr>
<td width="40%" class="tableHeader">{$i18n.label.person_name}</td>
<td width="40%" class="tableHeader">{$i18n.label.address}</td>
- <td class="tableHeader">{$i18n.label.edit}</td>
</tr>
{foreach $active_clients as $client}
<tr valign="top" bgcolor="{cycle values="#f5f5f5,#dedee5"}">
- <td>{$client.name|escape:'html'}</td>
+ <td><a href="client_edit.php?id={$client.id}">{$client.name|escape:'html'}</a></td>
<td>{$client.address|escape:'html'}</td>
- <td><a href="client_edit.php?id={$client.id}">{$i18n.label.edit}</a></td>
</tr>
{/foreach}
</table>
<tr>
<td width="40%" class="tableHeader">{$i18n.label.person_name}</td>
<td width="40%" class="tableHeader">{$i18n.label.address}</td>
- <td class="tableHeader">{$i18n.label.edit}</td>
</tr>
{foreach $inactive_clients as $client}
<tr valign="top" bgcolor="{cycle values="#f5f5f5,#dedee5"}">
- <td>{$client.name|escape:'html'}</td>
+ <td><a href="client_edit.php?id={$client.id}">{$client.name|escape:'html'}</a></td>
<td>{$client.address|escape:'html'}</td>
- <td><a href="client_edit.php?id={$client.id}">{$i18n.label.edit}</a></td>
</tr>
{/foreach}
</table>
{/if}
<td class="tableHeader">{$i18n.label.item}</td>
<td width="5%" class="tableHeaderCentered">{$i18n.label.cost}</td>
- <td width="5%" class="tableHeader">{$i18n.label.edit}</td>
</tr>
{foreach $expense_items as $item}
<tr bgcolor="{cycle values="#f5f5f5,#ccccce"}">
{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
<td valign='top'>{$item.project|escape:'html'}</td>
{/if}
- <td valign='top'>{$item.item|escape:'html'}</td>
+ <td valign='top'>{if $item.invoice_id} {$item.item|escape:'html'} {else}<a href='expense_edit.php?id={$item.id}'>{$item.item|escape:'html'}</a>{/if}</td>
<td valign='top' align='right'>{$item.cost}</td>
- <td valign='top' align='center'>{if $item.invoice_id} {else}<a href='expense_edit.php?id={$item.id}'>{$i18n.label.edit}</a>{/if}</td>
</tr>
{/foreach}
</table>
<tr>
<td width="35%" class="tableHeader">{$i18n.label.thing_name}</td>
<td width="35%" class="tableHeader">{$i18n.label.description}</td>
- <td class="tableHeader">{$i18n.label.edit}</td>
</tr>
{if $active_projects}
{foreach $active_projects as $project}
<tr bgcolor="{cycle values="#f5f5f5,#dedee5"}">
- <td>{$project.name|escape:'html'}</td>
+ <td><a href="project_edit.php?id={$project.id}">{$project.name|escape:'html'}</a></td>
<td>{$project.description|escape:'html'}</td>
- <td><a href="project_edit.php?id={$project.id}">{$i18n.label.edit}</a></td>
</tr>
{/foreach}
{/if}
<tr>
<td width="35%" class="tableHeader">{$i18n.label.thing_name}</td>
<td width="35%" class="tableHeader">{$i18n.label.description}</td>
- <td class="tableHeader">{$i18n.label.edit}</td>
</tr>
{foreach $inactive_projects as $project}
<tr bgcolor="{cycle values="#f5f5f5,#dedee5"}">
- <td>{$project.name|escape:'html'}</td>
+ <td><a href="project_edit.php?id={$project.id}">{$project.name|escape:'html'}</a></td>
<td>{$project.description|escape:'html'}</td>
- <td><a href="project_edit.php?id={$project.id}">{$i18n.label.edit}</a></td>
</tr>
{/foreach}
</table>
<tr>
<td width="35%" class="tableHeader">{$i18n.label.thing_name}</td>
<td width="35%" class="tableHeader">{$i18n.label.description}</td>
- <td class="tableHeader">{$i18n.label.edit}</td>
</tr>
{if $active_tasks}
{foreach $active_tasks as $task}
<tr bgcolor="{cycle values="#f5f5f5,#dedee5"}">
- <td>{$task.name|escape:'html'}</td>
+ <td><a href="task_edit.php?id={$task.id}">{$task.name|escape:'html'}</a></td>
<td>{$task.description|escape:'html'}</td>
- <td><a href="task_edit.php?id={$task.id}">{$i18n.label.edit}</a></td>
</tr>
{/foreach}
{/if}
<tr>
<td width="35%" class="tableHeader">{$i18n.label.thing_name}</td>
<td width="35%" class="tableHeader">{$i18n.label.description}</td>
- <td class="tableHeader">{$i18n.label.edit}</td>
</tr>
{foreach $inactive_tasks as $task}
<tr bgcolor="{cycle values="#f5f5f5,#dedee5"}">
- <td>{$task.name|escape:'html'}</td>
+ <td><a href="task_edit.php?id={$task.id}">{$task.name|escape:'html'}</a></td>
<td>{$task.description|escape:'html'}</td>
- <td><a href="task_edit.php?id={$task.id}">{$i18n.label.edit}</a></td>
</tr>
{/foreach}
</table>
<td width="35%" class="tableHeader">{$i18n.label.person_name}</td>
<td width="35%" class="tableHeader">{$i18n.label.login}</td>
<td width="10%" class="tableHeader">{$i18n.form.users.role}</td>
- <td width="10%" class="tableHeader">{$i18n.label.edit}</td>
</tr>
{if $active_users}
{foreach $active_users as $u}
<tr bgcolor="{cycle values="#f5f5f5,#dedee5"}">
- <td>{$u.name|escape:'html'}</td>
+ <td>
+ {if $user->isManager()}
+ <a href="user_edit.php?id={$u.id}">{$u.name|escape:'html'}</a>
+ {else}
+ {if ($user->id == $u.id) || ($smarty.const.ROLE_CLIENT == $u.role) || ($smarty.const.ROLE_USER == $u.role)}
+ <a href="user_edit.php?id={$u.id}">{$u.name|escape:'html'}</a>
+ {else}
+ {$u.name|escape:'html'}
+ {/if}
+ {/if}
+ </td>
<td>{$u.login|escape:'html'}</td>
{if $smarty.const.ROLE_MANAGER == $u.role}
<td>{$i18n.form.users.manager}</td>
<td>{$i18n.label.client}</td>
{elseif $smarty.const.ROLE_USER == $u.role}
<td>{$i18n.label.user}</td>
- {/if}
- {if $user->isManager()}
- <!-- Manager can edit everybody. -->
- <td><a href="user_edit.php?id={$u.id}">{$i18n.label.edit}</a></td>
- {else}
- <!-- Comanager can edit self and clients or users but not manager and other comanagers. -->
- <td>{if ($user->id == $u.id) || ($smarty.const.ROLE_CLIENT == $u.role) || ($smarty.const.ROLE_USER == $u.role)}<a href="user_edit.php?id={$u.id}">{$i18n.label.edit}</a>{/if}</td>
{/if}
</tr>
{/foreach}
<td width="35%" class="tableHeader">{$i18n.label.login}</td>
<td width="10%" class="tableHeader">{$i18n.form.users.role}</td>
<td width="10%" class="tableHeader">{$i18n.label.edit}</td>
- <td width="10%" class="tableHeader">{$i18n.label.delete}</td>
</tr>
{foreach $inactive_users as $u}
<tr bgcolor="{cycle values="#f5f5f5,#dedee5"}">
- <td>{$u.name|escape:'html'}</td>
+ <td>
+ {if $user->isManager()}
+ <a href="user_edit.php?id={$u.id}">{$u.name|escape:'html'}</a>
+ {else}
+ {if ($user->id == $u.id) || ($smarty.const.ROLE_CLIENT == $u.role) || ($smarty.const.ROLE_USER == $u.role)}<a href="user_edit.php?id={$u.id}">{$u.name|escape:'html'}</a>{/if}
+ {/if}
+ </td>
<td>{$u.login|escape:'html'}</td>
{if $smarty.const.ROLE_MANAGER == $u.role}
<td>{$i18n.form.users.manager}</td>
{if $user->isManager()}
<!-- Manager can edit everybody. -->
<td><a href="user_edit.php?id={$u.id}">{$i18n.label.edit}</a></td>
- <td>{if $smarty.const.ROLE_MANAGER != $u.role || $can_delete_manager}<a href="user_delete.php?id={$u.id}">{$i18n.label.delete}</a>{/if}</td>
{else}
<!-- Comanager can edit self and clients or users but not manager and other comanagers. -->
<td>{if ($user->id == $u.id) || ($smarty.const.ROLE_CLIENT == $u.role) || ($smarty.const.ROLE_USER == $u.role)}<a href="user_edit.php?id={$u.id}">{$i18n.label.edit}</a>{/if}</td>
- <td>{if ($user->id == $u.id) || ($smarty.const.ROLE_CLIENT == $u.role) || ($smarty.const.ROLE_USER == $u.role)}<a href="user_delete.php?id={$u.id}">{$i18n.label.delete}</a>{/if}</td>
{/if}
</tr>
{/foreach}