mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 23:43:17 +01:00
Disable kanban column if user does not have access to kanban
This commit is contained in:
parent
e6f142c7a4
commit
a61323f98c
@ -280,7 +280,17 @@ class addressbook_ui extends addressbook_bo
|
||||
if ($_GET['search']) {
|
||||
$content['nm']['search'] = $_GET['search'];
|
||||
}
|
||||
if (isset($typeselection)) $content['nm']['col_filter']['tid'] = $typeselection;
|
||||
if(isset($typeselection))
|
||||
{
|
||||
$content['nm']['col_filter']['tid'] = $typeselection;
|
||||
}
|
||||
|
||||
// disable kanban column if we have no kanban
|
||||
if(empty($GLOBALS['egw_info']['user']['apps']['kanban']))
|
||||
{
|
||||
$content['nm']['no_kanban'] = true;
|
||||
}
|
||||
|
||||
// save the tid for use in creating new addressbook entrys via UI. Current tid is to be used as type of new entrys
|
||||
//error_log(__METHOD__.__LINE__.' '.$content['nm']['col_filter']['tid']);
|
||||
Api\Cache::setSession('addressbook','active_tid',$content['nm']['col_filter']['tid']);
|
||||
|
@ -16,7 +16,7 @@
|
||||
<column width="180"/>
|
||||
<column width="40"/>
|
||||
<column width="80" disabled="@no_customfields"/>
|
||||
<column width="120"/>
|
||||
<column width="120" disabled="@no_kanban"/>
|
||||
<column width="60%" minWidth="100"/>
|
||||
<column width="80" disabled="@no_distribution_list"/>
|
||||
<column width="80"/>
|
||||
|
@ -410,17 +410,27 @@ class filemanager_ui
|
||||
$content['nm']['actions'] = static::get_actions();
|
||||
$content['nm']['home_dir'] = static::get_home_dir();
|
||||
$content['nm']['view'] = $GLOBALS['egw_info']['user']['preferences']['filemanager']['nm_view'];
|
||||
$content['nm']['placeholder_actions'] = array('mkdir','paste','share','file_drop_mail','file_drop_move','file_drop_copy','file_drop_symlink');
|
||||
$content['nm']['placeholder_actions'] = array('mkdir', 'paste', 'share', 'file_drop_mail', 'file_drop_move',
|
||||
'file_drop_copy', 'file_drop_symlink');
|
||||
|
||||
if (isset($_GET['msg'])) $msg = $_GET['msg'];
|
||||
// disable kanban column if we have no kanban
|
||||
if(empty($GLOBALS['egw_info']['user']['apps']['kanban']))
|
||||
{
|
||||
$content['nm']['no_kanban'] = true;
|
||||
}
|
||||
|
||||
if(isset($_GET['msg']))
|
||||
{
|
||||
$msg = $_GET['msg'];
|
||||
}
|
||||
|
||||
// Blank favorite set via GET needs special handling for path
|
||||
if (isset($_GET['favorite']) && $_GET['favorite'] == 'blank')
|
||||
if(isset($_GET['favorite']) && $_GET['favorite'] == 'blank')
|
||||
{
|
||||
$content['nm']['path'] = static::get_home_dir();
|
||||
}
|
||||
// switch to projectmanager folders
|
||||
if (isset($_GET['pm_id']))
|
||||
if(isset($_GET['pm_id']))
|
||||
{
|
||||
$_GET['path'] = '/apps/projectmanager'.((int)$_GET['pm_id'] ? '/'.(int)$_GET['pm_id'] : '');
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
<column width="100"/>
|
||||
<column width="30%"/>
|
||||
<column width="20%"/>
|
||||
<column width="120"/>
|
||||
<column width="120" disabled="@no_kanban"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row class="th">
|
||||
|
@ -998,16 +998,24 @@ class infolog_ui
|
||||
$readonlys['cancel'] = $action != 'sp';
|
||||
|
||||
$this->tmpl->read('infolog.index');
|
||||
$values['nm']['disable_autorefresh'] = true; // we have push
|
||||
$values['nm']['disable_autorefresh'] = true; // we have push
|
||||
|
||||
// disable kanban column if we have no kanban
|
||||
if(empty($GLOBALS['egw_info']['user']['apps']['kanban']))
|
||||
{
|
||||
$values['nm']['no_kanban'] = true;
|
||||
}
|
||||
|
||||
$values['nm']['options-filter'] = $this->filters;
|
||||
$values['nm']['get_rows'] = 'infolog.infolog_ui.get_rows';
|
||||
$values['nm']['add_on_top_sort_field'] = 'info_datemodified';
|
||||
$values['nm']['options-filter2'] = (in_array($this->prefs['show_links'],array('all','no_describtion')) ? array() : array(
|
||||
'' => 'default',
|
||||
)) + array(
|
||||
'no_describtion' => 'no details',
|
||||
'all' => 'details',
|
||||
);
|
||||
$values['nm']['options-filter2'] = (in_array($this->prefs['show_links'], array('all',
|
||||
'no_describtion')) ? array() : array(
|
||||
'' => 'default',
|
||||
)) + array(
|
||||
'no_describtion' => 'no details',
|
||||
'all' => 'details',
|
||||
);
|
||||
|
||||
//apply infolog_filter_change javascript method (hide/show of date filter form) over onchange filter
|
||||
$values['nm']['filter_onchange'] = "app.infolog.filter_change();";
|
||||
@ -1016,7 +1024,7 @@ class infolog_ui
|
||||
$values['nm']['filter2_onchange'] = "return app.infolog.filter2_change(ev, widget)";
|
||||
|
||||
// disable favories dropdown button, if not running as infolog
|
||||
if ($called_as && $called_as != 'infolog')
|
||||
if($called_as && $called_as != 'infolog')
|
||||
{
|
||||
$values['nm']['favorites'] = false;
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
<column width="120"/>
|
||||
<column width="45%"/>
|
||||
<column width="15%" disabled="@no_customfields"/>
|
||||
<column width="120"/>
|
||||
<column width="120" disabled="@no_kanban"/>
|
||||
<column/>
|
||||
<column width="120"/>
|
||||
<column/>
|
||||
|
@ -140,16 +140,23 @@ class resources_ui
|
||||
$content['nm']['options-filter2'][resources_bo::DELETED] = lang('Deleted');
|
||||
}
|
||||
|
||||
if($_GET['search']) {
|
||||
if($_GET['search'])
|
||||
{
|
||||
$content['nm']['search'] = $_GET['search'];
|
||||
}
|
||||
if($_GET['view_accs_of'])
|
||||
{
|
||||
$content['nm']['filter2'] = (int)$_GET['view_accs_of'];
|
||||
}
|
||||
$content['nm']['actions'] = $this->get_actions();
|
||||
$content['nm']['actions'] = $this->get_actions();
|
||||
$content['nm']['placeholder_actions'] = array('add');
|
||||
|
||||
// disable kanban column if we have no kanban
|
||||
if(empty($GLOBALS['egw_info']['user']['apps']['kanban']))
|
||||
{
|
||||
$content['nm']['no_kanban'] = true;
|
||||
}
|
||||
|
||||
// check if user is permitted to add resources
|
||||
// If they can't read any categories, they won't be able to save it
|
||||
if(!$this->bo->acl->get_cats(Acl::ADD) || !$this->bo->acl->get_cats(Acl::READ))
|
||||
@ -159,7 +166,7 @@ class resources_ui
|
||||
$no_button['back'] = true;
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('resources');
|
||||
|
||||
Framework::includeJS('.','resources','resources');
|
||||
Framework::includeJS('.', 'resources', 'resources');
|
||||
|
||||
if($content['nm']['filter2'] > 0)
|
||||
{
|
||||
|
@ -12,7 +12,7 @@
|
||||
<column width="15%"/>
|
||||
<column width="15%"/>
|
||||
<column width="15%" disabled="@no_customfields"/>
|
||||
<column width="120"/>
|
||||
<column width="120" disabled="@no_kanban"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row class="th">
|
||||
|
@ -1015,17 +1015,26 @@ class timesheet_ui extends timesheet_bo
|
||||
{
|
||||
$content['nm']['col_filter']['linked'] = array(
|
||||
'app' => $_GET['link_app'],
|
||||
'id' => $_GET['link_id']
|
||||
'id' => $_GET['link_id']
|
||||
);
|
||||
}
|
||||
// disable kanban column if we have no kanban
|
||||
if(empty($GLOBALS['egw_info']['user']['apps']['kanban']))
|
||||
{
|
||||
$content['nm']['no_kanban'] = true;
|
||||
}
|
||||
$read_grants = $this->grant_list(Acl::READ);
|
||||
$content['nm']['no_owner_col'] = count($read_grants) == 1;
|
||||
if ($GLOBALS['egw_info']['user']['preferences']['timesheet']['nextmatch-timesheet.index.rows']) $content['nm']['selectcols'] = $GLOBALS['egw_info']['user']['preferences']['timesheet']['nextmatch-timesheet.index.rows'];
|
||||
if($GLOBALS['egw_info']['user']['preferences']['timesheet']['nextmatch-timesheet.index.rows'])
|
||||
{
|
||||
$content['nm']['selectcols'] = $GLOBALS['egw_info']['user']['preferences']['timesheet']['nextmatch-timesheet.index.rows'];
|
||||
}
|
||||
$sel_options = array(
|
||||
'ts_owner' => $read_grants,
|
||||
'pm_id' => array(lang('No project')),
|
||||
'cat_id' => array(array('value' => '', 'label' => lang('all categories')), array('value' => 0, 'label'=>lang('None'))),
|
||||
'ts_status' => $this->status_labels+array(lang('No status')),
|
||||
'ts_owner' => $read_grants,
|
||||
'pm_id' => array(lang('No project')),
|
||||
'cat_id' => array(array('value' => '', 'label' => lang('all categories')),
|
||||
array('value' => 0, 'label' => lang('None'))),
|
||||
'ts_status' => $this->status_labels + array(lang('No status')),
|
||||
);
|
||||
if($this->config_data['history'])
|
||||
{
|
||||
|
@ -27,7 +27,7 @@
|
||||
<column width="50"/>
|
||||
<column width="10%" disabled="@no_ts_status"/>
|
||||
<column width="15%"/>
|
||||
<column width="120"/>
|
||||
<column width="120" disabled="@no_kanban"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row class="th">
|
||||
|
Loading…
Reference in New Issue
Block a user