var $id = null; // User id.
var $team_id = null; // Team id.
var $role_id = null; // Role id.
+ var $role_name = null; // Role name.
var $rank = null; // User role rank.
var $client_id = null; // Client id for client user role.
var $behalf_id = null; // User id, on behalf of whom we are working.
$mdb2 = getConnection();
- $sql = "SELECT u.id, u.login, u.name, u.team_id, u.role_id, r.rank, r.rights, u.client_id, u.email, t.name as team_name,
+ $sql = "SELECT u.id, u.login, u.name, u.team_id, u.role_id, r.rank, r.name as role_name, r.rights, u.client_id, u.email, t.name as team_name,
t.currency, t.lang, t.decimal_mark, t.date_format, t.time_format, t.week_start,
t.tracking_mode, t.project_required, t.task_required, t.record_type,
t.bcc_email, t.plugins, t.config, t.lock_spec, t.workday_minutes, t.custom_logo
$this->id = $val['id'];
$this->team_id = $val['team_id'];
$this->role_id = $val['role_id'];
+ $this->role_name = $val['role_name'];
$this->rights = explode(',', $val['rights']);
$this->is_client = !in_array('track_own_time', $this->rights);
$this->rank = $val['rank'];
'form.teams.hint' => 'Create a new team by creating a new team manager account.<br>You can also import team data from an xml file from another Anuko Time Tracker server (no login collisions are allowed).',
// Profile form. See example at https://timetracker.anuko.com/profile_edit.php.
+'form.profile.swap_roles' => 'Swap roles',
'form.profile.12_hours' => '12 hours',
'form.profile.24_hours' => '24 hours',
'form.profile.show_holidays' => 'Show holidays',
'form.quota.hint' => 'If values are empty, quotas are calculated automatically based on workday hours and holidays.',
// Swap roles form. See example at https://timetracker.anuko.com/swap_roles.php.
+'form.swap.hint' => 'Demote yourself to a lower role by swapping roles with someone else. This cannot be undone.',
'form.swap.swap_with' => 'Swap roles with',
// Roles and rights. These strings are used in multiple places. Grouped here to provide consistent translations.
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.17.67.4146 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.17.68.4147 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
{$forms.swapForm.open}
<table cellspacing="4" cellpadding="7" border="0">
<table cellspacing="1" cellpadding="2" border="0">
+ <tr><td colspan="2">{$i18n.form.swap.hint}</td></tr
+ <tr><td> </td></tr>
<tr>
- <td align=""right">{$i18n.form.swap.swap_with}:</td>
+ <td align="right">{$i18n.form.swap.swap_with}:</td>
<td>{$forms.swapForm.swap_with.control}</td>
</tr>
<tr>
<td align="right">{$i18n.label.status}:</td>
<td>{$forms.userForm.status.control}</td>
</tr>
+{/if}
+{if $user->id == $user_id}
+ <tr>
+ <td align="right">{$i18n.form.users.role}:</td>
+ <td>{$user->role_name} {if $user->can('swap_roles')}<a href="swap_roles.php">{$i18n.form.profile.swap_roles}</a>{/if}</td>
+ </tr>
{/if}
<tr>
<td align="right">{$i18n.form.users.default_rate} (0{$user->decimal_mark}00):</td>