$result = array();
$mdb2 = getConnection();
- $sql = "select id, name, rights from tt_roles where team_id = $team_id and status = 1 order by upper(name)";
+ $sql = "select id, name, description from tt_roles where team_id = $team_id and status = 1 order by upper(name)";
$res = $mdb2->query($sql);
$result = array();
if (!is_a($res, 'PEAR_Error')) {
$result = array();
$mdb2 = getConnection();
- $sql = "select id, name, rights from tt_roles
+ $sql = "select id, name, description from tt_roles
where team_id = $team_id and status = 0 order by upper(name)";
$res = $mdb2->query($sql);
$result = array();
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.17.29.4016 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.17.30.4017 | 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>
{/if}
<tr>
<td width="35%" class="tableHeader">{$i18n.label.thing_name}</td>
- <td width="35%" class="tableHeader">{$i18n.form.roles.rights}</td>
+ <td width="35%" class="tableHeader">{$i18n.label.description}</td>
<td class="tableHeader">{$i18n.label.edit}</td>
<td class="tableHeader">{$i18n.label.delete}</td>
</tr>
{foreach $active_roles as $role}
<tr bgcolor="{cycle values="#f5f5f5,#ffffff"}">
<td>{$role.name|escape}</td>
- <td>{$role.rights|escape}</td>
- <td><a href="task_edit.php?id={$task.id}">{$i18n.label.edit}</a></td>
- <td><a href="task_delete.php?id={$task.id}">{$i18n.label.delete}</a></td>
+ <td>{$role.description|escape}</td>
+ <td><a href="role_edit.php?id={$role.id}">{$i18n.label.edit}</a></td>
+ <td><a href="role_delete.php?id={$role.id}">{$i18n.label.delete}</a></td>
</tr>
{/foreach}
{/if}
<tr><td class="sectionHeaderNoBorder">{$i18n.form.roles.inactive_roles}</td></tr>
<tr>
<td width="35%" class="tableHeader">{$i18n.label.thing_name}</td>
- <td width="35%" class="tableHeader">{$i18n.form.roles.rights}</td>
+ <td width="35%" class="tableHeader">{$i18n.label.description}</td>
<td class="tableHeader">{$i18n.label.edit}</td>
<td class="tableHeader">{$i18n.label.delete}</td>
</tr>
<tr bgcolor="{cycle values="#f5f5f5,#ffffff"}">
<td>{$role.name|escape}</td>
<td>{$role.rights|escape}</td>
- <td><a href="task_edit.php?id={$task.id}">{$i18n.label.edit}</a></td>
- <td><a href="task_delete.php?id={$task.id}">{$i18n.label.delete}</a></td>
+ <td><a href="role_edit.php?id={$role.id}">{$i18n.label.edit}</a></td>
+ <td><a href="role_delete.php?id={$role.id}">{$i18n.label.delete}</a></td>
</tr>
{/foreach}
</table>
setChange("ALTER TABLE `tt_log` ADD `paid` tinyint(4) NULL default '0' AFTER `billable`");
}
- if ($_POST["convert11400to11728"]) {
+ if ($_POST["convert11400to11730"]) {
setChange("ALTER TABLE `tt_teams` DROP `address`");
setChange("ALTER TABLE `tt_fav_reports` ADD `report_spec` text default NULL AFTER `user_id`");
setChange("ALTER TABLE `tt_fav_reports` ADD `paid_status` tinyint(4) default NULL AFTER `invoice`");
setChange("ALTER TABLE `tt_tmp_refs` MODIFY `timestamp` timestamp default CURRENT_TIMESTAMP");
setChange("CREATE TABLE `tt_roles` (`id` int(11) NOT NULL auto_increment, `team_id` int(11) NOT NULL, `name` varchar(80) default NULL, `rank` int(11) default 0, `rights` text default NULL, `status` tinyint(4) default 1, PRIMARY KEY (`id`))");
setChange("create unique index role_idx on tt_roles(team_id, rank, status)");
+ setChange("ALTER TABLE `tt_roles` ADD `description` varchar(255) default NULL AFTER `name`");
}
if ($_POST["cleanup"]) {
<h2>DB Install</h2>
<table width="80%" border="1" cellpadding="10" cellspacing="0">
<tr>
- <td width="80%"><b>Create database structure (v1.17.28)</b>
+ <td width="80%"><b>Create database structure (v1.17.30)</b>
<br>(applies only to new installations, do not execute when updating)</br></td><td><input type="submit" name="crstructure" value="Create"></td>
</tr>
</table>
<td><input type="submit" name="convert1600to11400" value="Update"><br></td>
</tr>
<tr valign="top">
- <td>Update database structure (v1.14 to v1.17.28)</td>
- <td><input type="submit" name="convert11400to11728" value="Update"><br></td>
+ <td>Update database structure (v1.14 to v1.17.30)</td>
+ <td><input type="submit" name="convert11400to11730" value="Update"><br></td>
</tr>
</table>
# Structure for table tt_roles. This table stores customized team roles.
#
CREATE TABLE `tt_roles` (
- `id` int(11) NOT NULL auto_increment, # Role id. Identifies roles for all groups on the server.
- `team_id` int(11) NOT NULL, # Team id the role is defined for.
- `name` varchar(80) default NULL, # Role name - custom role name. In case we are editing a
- # predefined role (USER, etc.), we can rename the role here.
- `rank` int(11) default 0, # Role rank, an integer value between 0-324. Predefined role ranks:
- # USER - 4, CLIENT - 16, COMANAGER - 68, MANAGER - 324.
- # Rank is used to determine what "lesser roles" are in each group
- # for sutuations such as "manage_users".
- # It also identifies a role within a team (by its "rank").
- # Value of rank is to be used in role field in tt_users table,
- # just like standard roles now.
- `rights` text default NULL, # Comma-separated list of rights assigned to a role.
- # NULL here for predefined roles (4, 16, 68, 324 - manager)
- # means a hard-coded set of default access rights.
- `status` tinyint(4) default 1, # Role status.
+ `id` int(11) NOT NULL auto_increment, # Role id. Identifies roles for all groups on the server.
+ `team_id` int(11) NOT NULL, # Team id the role is defined for.
+ `name` varchar(80) default NULL, # Role name - custom role name. In case we are editing a
+ # predefined role (USER, etc.), we can rename the role here.
+ `description` varchar(255) default NULL, # Role description.
+ `rank` int(11) default 0, # Role rank, an integer value between 0-324. Predefined role ranks:
+ # USER - 4, CLIENT - 16, COMANAGER - 68, MANAGER - 324.
+ # Rank is used to determine what "lesser roles" are in each group
+ # for sutuations such as "manage_users".
+ # It also identifies a role within a team (by its "rank").
+ # Value of rank is to be used in role field in tt_users table,
+ # just like standard roles now.
+ `rights` text default NULL, # Comma-separated list of rights assigned to a role.
+ # NULL here for predefined roles (4, 16, 68, 324 - manager)
+ # means a hard-coded set of default access rights.
+ `status` tinyint(4) default 1, # Role status.
PRIMARY KEY (`id`)
);