forked from extern/egroupware
* calendar: make configurable the number of users, until day- or weekview are consolidated; 5 is set as default
This commit is contained in:
parent
2b692f5830
commit
0cd5658ca1
@ -181,6 +181,12 @@ class calendar_bo
|
||||
*/
|
||||
public $require_acl_invite = false;
|
||||
|
||||
/**
|
||||
* if the number of selected users for a view exeeds this number a view is consolidated (5 is set as default)
|
||||
* @var int
|
||||
*/
|
||||
public $calview_no_consolidate = 5;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
@ -225,7 +231,7 @@ class calendar_bo
|
||||
//echo "registered resources="; _debug_array($this->resources);
|
||||
|
||||
$this->config = config::read('calendar'); // only used for horizont, regular calendar config is under phpgwapi
|
||||
|
||||
$this->calview_no_consolidate = ($GLOBALS['egw_info']['server']['calview_no_consolidate']?$GLOBALS['egw_info']['server']['calview_no_consolidate']:5);
|
||||
$this->require_acl_invite = $GLOBALS['egw_info']['server']['require_acl_invite'];
|
||||
|
||||
$this->categories = new categories($this->user,'calendar');
|
||||
|
@ -759,7 +759,7 @@ class calendar_uiviews extends calendar_ui
|
||||
$users = $this->search_params['users'];
|
||||
if (!is_array($users)) $users = array($users);
|
||||
|
||||
if (count($users) == 1 || count($users) > 5) // for more then 3 users, show all in one row
|
||||
if (count($users) == 1 || count($users) > $this->bo->calview_no_consolidate) // for more then X users, show all in one row
|
||||
{
|
||||
$content = $this->timeGridWidget($this->tagWholeDayOnTop($this->bo->search($search_params)),$this->cal_prefs['interval']);
|
||||
}
|
||||
@ -812,8 +812,8 @@ class calendar_uiviews extends calendar_ui
|
||||
$users = $this->search_params['users'];
|
||||
if (!is_array($users)) $users = array($users);
|
||||
|
||||
// for more then 5 users, show all in one row
|
||||
if (count($users) == 1 || count($users) > 5)
|
||||
// for more then X users, show all in one row
|
||||
if (count($users) == 1 || count($users) > $this->bo->calview_no_consolidate)
|
||||
{
|
||||
$dayEvents =& $this->bo->search($this->search_params);
|
||||
$owner = 0;
|
||||
|
@ -56,6 +56,10 @@
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row_off">
|
||||
<td>{lang_While_selecting_up_to_X_users_day-_and_weekview_is_not_consolidated_(5_is_used_when_not_set)}:</td>
|
||||
<td><input name="newsettings[calview_no_consolidate]" value="{value_calview_no_consolidate}" size="10"></td>
|
||||
</tr>
|
||||
<tr class="th">
|
||||
<td colspan="2"> <b>{lang_History_logging}</b></td>
|
||||
</tr>
|
||||
|
Loading…
Reference in New Issue
Block a user