use new et2 config

This commit is contained in:
Ralf Becker 2016-04-24 13:48:45 +00:00
parent 1742ebf6f1
commit 68e998c649
3 changed files with 58 additions and 72 deletions

View File

@ -5,7 +5,7 @@
* @link http://www.egroupware.org * @link http://www.egroupware.org
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de> * @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @package timesheet * @package timesheet
* @copyright (c) 2005-13 by Ralf Becker <RalfBecker-AT-outdoor-training.de> * @copyright (c) 2005-16 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$ * @version $Id$
*/ */
@ -36,6 +36,8 @@ class timesheet_hooks
*/ */
static function search_link($location) static function search_link($location)
{ {
unset($location); // not used, but required by function signature
return array( return array(
'query' => TIMESHEET_APP.'.timesheet_bo.link_query', 'query' => TIMESHEET_APP.'.timesheet_bo.link_query',
'title' => TIMESHEET_APP.'.timesheet_bo.link_title', 'title' => TIMESHEET_APP.'.timesheet_bo.link_title',
@ -123,7 +125,7 @@ class timesheet_hooks
if ($GLOBALS['egw_info']['user']['apps']['admin']) if ($GLOBALS['egw_info']['user']['apps']['admin'])
{ {
$file = Array( $file = Array(
'Site Configuration' => egw::link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname), 'Site Configuration' => egw::link('/index.php','menuaction=admin.admin_config.index&appname=' . $appname,'&ajax=true'),
'Custom fields' => egw::link('/index.php','menuaction=admin.customfields.index&appname='.$appname.'&use_private=1'), 'Custom fields' => egw::link('/index.php','menuaction=admin.customfields.index&appname='.$appname.'&use_private=1'),
'Global Categories' => egw::link('/index.php',array( 'Global Categories' => egw::link('/index.php',array(
'menuaction' => 'admin.admin_categories.index', 'menuaction' => 'admin.admin_categories.index',
@ -209,10 +211,11 @@ class timesheet_hooks
} }
catch (Exception $e) catch (Exception $e)
{ {
unset($e);
// permission error // permission error
continue; continue;
} }
if ($title = $definition->get_title()) if (($title = $definition->get_title()))
{ {
$options[$title] = $title; $options[$title] = $title;
} }
@ -242,6 +245,8 @@ class timesheet_hooks
*/ */
public static function acl_rights($params) public static function acl_rights($params)
{ {
unset($params); // not used, but required by function signature
return array( return array(
acl::READ => 'read', acl::READ => 'read',
acl::EDIT => 'edit', acl::EDIT => 'edit',
@ -257,6 +262,8 @@ class timesheet_hooks
*/ */
public static function categories($data) public static function categories($data)
{ {
unset($data); // not used, but required by function signature
return true; return true;
} }
} }

View File

@ -1,69 +0,0 @@
<!-- BEGIN header -->
<p style="text-align: center; color: {th_err};">{error}</p>
<form name=frm method="POST" action="{action_url}">
{hidden_vars}
<table border="0" align="left">
<tr class="th">
<td colspan="2">&nbsp;<b>{title}</b></td>
</tr>
<!-- END header -->
<!-- BEGIN body -->
<tr class="row_on">
<td>{lang_ProjectManager_integration}:</td>
<td>
<select name="newsettings[pm_integration]">
<option value="">{lang_Both:_allow_to_use_ProjectManager_and_free_project-names}</option>
<option value="none"{selected_pm_integration_none}>{lang_None:_use_only_free_project-names}</option>
<option value="full"{selected_pm_integration_full}>{lang_Full:_use_only_ProjectManager}</option>
</select>
</td>
</tr>
<tr class="row_on">
<td>{lang_Mode}:</td>
<td>
<select name="newsettings[ts_viewtype]">
<option value="normal"{selected_ts_viewtype_normal}>{lang_Regular}</option>
<option value="short"{selected_ts_viewtype_short}>{lang_Simple}</option>
</select>
</td>
</tr>
<tr class="row_on">
<td>{lang_Show_a_quantity_sum_(eg._to_sum_up_negative_overtime)}:</td>
<td>
<select name="newsettings[quantity_sum]">
<option value="">{lang_No}</option>
<option value="true"{selected_quantity_sum_true}>{lang_Yes}</option>
</select>
</td>
</tr>
<tr class="th">
<td colspan="2">&nbsp;<b>{lang_History_logging}</b></td>
</tr>
<tr class="row_on">
<td>&nbsp;{lang_Prevent_deleting}</td>
<td>
<select name="newsettings[history]">
<option value="">{lang_No}</option>
<option value="history"{selected_history_history}>{lang_Yes,_only_admins_can_purge_deleted_items}</option>
<option value="userpurge"{selected_history_userpurge}>{lang_Yes,_users_can_purge_their_deleted_items}</option>
</select>
</td>
</tr>
<!-- END body -->
<!-- BEGIN footer -->
<tr class="th">
<td colspan="2">
&nbsp;
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="submit" value="{lang_submit}">
<input type="submit" name="cancel" value="{lang_cancel}">
</td>
</tr>
</table>
</form>
<!-- END footer -->

View File

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE overlay PUBLIC "-//Stylite AG//eTemplate 2//EN" "http://www.egroupware.org/etemplate2.dtd">
<!-- $Id$ -->
<overlay>
<template id="timesheet.config" template="" lang="" group="0" version="16.1">
<grid width="100%" class="admin-config egwGridView_grid">
<columns>
<column width="60%"/>
<column/>
</columns>
<rows>
<row>
<description value="ProjectManager integration" label="%s:"/>
<select id="newsettings[pm_integration]">
<option value="">Both: allow to use ProjectManager and free project-names</option>
<option value="none">None: use only free project-names</option>
<option value="full">Full: use only ProjectManager</option>
</select>
</row>
<row>
<description value="Mode" label="%s:"/>
<select id="newsettings[ts_viewtype]">
<option value="normal">Regular</option>
<option value="short">Simple</option>
</select>
</row>
<row>
<description value="Show a quantity sum (eg. to sum up negative overtime)" label="%s:"/>
<select id="newsettings[quantity_sum]">
<option value="">No</option>
<option value="true">Yes</option>
</select>
</row>
<row>
<description value="History logging" span="all" class="subHeader"/>
</row>
<row>
<description value="Prevent deleting"/>
<select id="newsettings[history]">
<option value="">No</option>
<option value="history">Yes, only admins can purge deleted items</option>
<option value="userpurge">Yes, users can purge their deleted items</option>
</select>
</row>
</rows>
</grid>
</template>
</overlay>