add/clarify status message when editing is not allowed via status; use check_statusForEditRights in controlling the edit state in edit mode as well

This commit is contained in:
Klaus Leithoff 2011-11-10 08:45:44 +00:00
parent d9a824efa2
commit ad6cf1d8ae
3 changed files with 6 additions and 9 deletions

View File

@ -85,16 +85,13 @@ class timesheet_ui extends timesheet_bo
$referer = preg_match('/menuaction=([^&]+)/',$_SERVER['HTTP_REFERER'],$matches) ? $matches[1] : $referer = preg_match('/menuaction=([^&]+)/',$_SERVER['HTTP_REFERER'],$matches) ? $matches[1] :
(strpos($_SERVER['HTTP_REFERER'],'/infolog/index.php') !== false ? 'infolog.infolog_ui.index' : TIMESHEET_APP.'.timesheet_ui.index'); (strpos($_SERVER['HTTP_REFERER'],'/infolog/index.php') !== false ? 'infolog.infolog_ui.index' : TIMESHEET_APP.'.timesheet_ui.index');
if (!isset($GLOBALS['egw_info']['user']['apps']['admin']) && $this->data['ts_status']) if (!$this->check_statusForEditRights($this->data))
{
if ($this->status_labels_config[$this->data['ts_status']]['admin'])
{ {
$view = true; //only admin can edit with this status $view = true; //only admin can edit with this status
$only_admin_edit = true; $only_admin_edit = true;
$msg = lang('only Admin can edit this status'); $msg = lang('only Admin can edit this status');
} }
} }
}
else else
{ {
//echo "<p>ts_start=$content[ts_start], start_time=$content[start_time], end_time=$content[end_time], ts_duration=$content[ts_duration], ts_quantity=$content[ts_quantity]</p>\n"; //echo "<p>ts_start=$content[ts_start], start_time=$content[start_time], end_time=$content[end_time], ts_duration=$content[ts_duration], ts_quantity=$content[ts_quantity]</p>\n";

View File

@ -84,7 +84,7 @@ no status timesheet de Kein Status
none: use only free project-names admin de Keine: verwende nur freie Projektnamen none: use only free project-names admin de Keine: verwende nur freie Projektnamen
number of row for a multiline inputfield or line of a multi-select-box timesheet de Anzahl von Reihen für ein Mehrzeiliges Textfeld oder einer Mehrfachauswahlbox number of row for a multiline inputfield or line of a multi-select-box timesheet de Anzahl von Reihen für ein Mehrzeiliges Textfeld oder einer Mehrfachauswahlbox
only admin timesheet de nur Admin only admin timesheet de nur Admin
only admin can edit this status timesheet de nur Admins dürfen diesen Status bearbeiten only admin can edit this status timesheet de nur Admins dürfen Stundenzettel mit diesen Status bearbeiten
or endtime timesheet de oder Endzeit or endtime timesheet de oder Endzeit
order timesheet de Reihenfolge order timesheet de Reihenfolge
parent timesheet de Übergeordnet parent timesheet de Übergeordnet

View File

@ -72,7 +72,7 @@ no status timesheet en No status
none: use only free project-names admin en None: use only free project names none: use only free project-names admin en None: use only free project names
number of row for a multiline inputfield or line of a multi-select-box timesheet en Number of row for a multi-line input field or line of a multi select box number of row for a multiline inputfield or line of a multi-select-box timesheet en Number of row for a multi-line input field or line of a multi select box
only admin timesheet en Only admin only admin timesheet en Only admin
only admin can edit this status timesheet en Only admin can edit this status only admin can edit this status timesheet en Only admins can edit timesheets with this status
or endtime timesheet en or end time or endtime timesheet en or end time
order timesheet en Order order timesheet en Order
parent timesheet en Parent parent timesheet en Parent