mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-20 12:58:46 +01:00
resources: allow to retrieve the elements of the resources sidebox calendar elements only and not as full html
This commit is contained in:
parent
a104512988
commit
0aaf531ec7
@ -479,7 +479,7 @@ class ui_resources
|
|||||||
* get data für calendar sidebox
|
* get data für calendar sidebox
|
||||||
*
|
*
|
||||||
* @author Lukas Weiss <wnz_gh05t@users.sourceforge.net>
|
* @author Lukas Weiss <wnz_gh05t@users.sourceforge.net>
|
||||||
* @param array $param with keys menuaction, owner and optional date
|
* @param array $param with keys menuaction, owner and optional date and return_array
|
||||||
* @return array with: label=>link or array with text
|
* @return array with: label=>link or array with text
|
||||||
*/
|
*/
|
||||||
function get_calendar_sidebox($param)
|
function get_calendar_sidebox($param)
|
||||||
@ -487,6 +487,12 @@ class ui_resources
|
|||||||
$cats = $this->bo->acl->get_cats(EGW_ACL_READ);
|
$cats = $this->bo->acl->get_cats(EGW_ACL_READ);
|
||||||
if (!$cats) return array();
|
if (!$cats) return array();
|
||||||
|
|
||||||
|
if(array_key_exists('return_array', $param))
|
||||||
|
{
|
||||||
|
$return_array = $param['return_array'];
|
||||||
|
unset($param['return_array']);
|
||||||
|
}
|
||||||
|
|
||||||
$owners = explode(',',$param['owner']);
|
$owners = explode(',',$param['owner']);
|
||||||
unset($param['owner']);
|
unset($param['owner']);
|
||||||
$res_cats = $selected = array();
|
$res_cats = $selected = array();
|
||||||
@ -529,6 +535,8 @@ class ui_resources
|
|||||||
$resources['r'.$data['res_id']] = $data['name'];
|
$resources['r'.$data['res_id']] = $data['name'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!isset($return_array))
|
||||||
|
{
|
||||||
$selectbox = html::select(
|
$selectbox = html::select(
|
||||||
'owner',
|
'owner',
|
||||||
$selected,
|
$selected,
|
||||||
@ -546,5 +554,10 @@ class ui_resources
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return array_merge($resources,$res_cats);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user