forked from extern/egroupware
work on multiselection actions in index dialog
This commit is contained in:
parent
74b50f5dea
commit
9cc02bf68b
@ -39,7 +39,7 @@ class bo_resources
|
||||
/**
|
||||
* get rows for resources list
|
||||
*
|
||||
* Cornelius Weiß <egw@von-und-zu-weiss.de>
|
||||
* Cornelius Weiss <egw@von-und-zu-weiss.de>
|
||||
*/
|
||||
function get_rows($query,&$rows,&$readonlys)
|
||||
{
|
||||
@ -107,7 +107,7 @@ class bo_resources
|
||||
/**
|
||||
* reads a resource exept binary datas
|
||||
*
|
||||
* Cornelius Weiß <egw@von-und-zu-weiss.de>
|
||||
* Cornelius Weiss <egw@von-und-zu-weiss.de>
|
||||
* @param int $id resource id
|
||||
* @return array with key => value or false if not found or allowed
|
||||
*/
|
||||
@ -125,7 +125,7 @@ class bo_resources
|
||||
/**
|
||||
* saves a resource. pictures are saved in vfs
|
||||
*
|
||||
* Cornelius Weiß <egw@von-und-zu-weiss.de>
|
||||
* Cornelius Weiss <egw@von-und-zu-weiss.de>
|
||||
* @param array $resource array with key => value of all needed datas
|
||||
* @return string msg if somthing went wrong; nothing if all right
|
||||
*/
|
||||
@ -213,7 +213,7 @@ class bo_resources
|
||||
/**
|
||||
* gets list of accessories for resource
|
||||
*
|
||||
* Cornelius Weiß <egw@von-und-zu-weiss.de>
|
||||
* Cornelius Weiss <egw@von-und-zu-weiss.de>
|
||||
* @param int $id id of resource
|
||||
* @return array
|
||||
*/
|
||||
@ -230,7 +230,7 @@ class bo_resources
|
||||
|
||||
/**
|
||||
* returns info about resource for calender
|
||||
* @author Cornelius Weiß <egw@von-und-zu-weiss.de>
|
||||
* @author Cornelius Weiß <egw@von-und-zu-weiss.de>
|
||||
* @param int/array $res_id single id or array $num => $res_id
|
||||
* @return array
|
||||
*/
|
||||
@ -258,7 +258,7 @@ class bo_resources
|
||||
|
||||
/**
|
||||
* returns status for a new calendar entry depending on resources ACL
|
||||
* @author Cornelius Weiß <egw@von-und-zu-weiss.de>
|
||||
* @author Cornelius Weiss <egw@von-und-zu-weiss.de>
|
||||
* @param int/array $res_id single id or array $num => $res_id
|
||||
* @return array
|
||||
*/
|
||||
@ -270,7 +270,7 @@ class bo_resources
|
||||
}
|
||||
|
||||
/**
|
||||
* @author Cornelius Weiß <egw@von-und-zu-weiss.de>
|
||||
* @author Cornelius Weiss <egw@von-und-zu-weiss.de>
|
||||
* query infolog for entries matching $pattern
|
||||
*
|
||||
*/
|
||||
@ -290,7 +290,7 @@ class bo_resources
|
||||
}
|
||||
|
||||
/**
|
||||
* @author Cornelius Weiß <egw@von-und-zu-weiss.de>
|
||||
* @author Cornelius Weiss <egw@von-und-zu-weiss.de>
|
||||
* get title for an infolog entry identified by $id
|
||||
*
|
||||
*/
|
||||
@ -307,7 +307,7 @@ class bo_resources
|
||||
/**
|
||||
* resizes and saves an pictures in vfs
|
||||
*
|
||||
* Cornelius Weiß <egw@von-und-zu-weiss.de>
|
||||
* Cornelius Weiss <egw@von-und-zu-weiss.de>
|
||||
* @param array $file array with key => value
|
||||
* @param int $resource_id
|
||||
* @return mixed string with msg if somthing went wrong; nothing if all right
|
||||
@ -411,7 +411,7 @@ class bo_resources
|
||||
|
||||
/**
|
||||
* get resource picture either from vfs or from symlink
|
||||
* Cornelius Weiß <egw@von-und-zu-weiss.de>
|
||||
* Cornelius Weiss <egw@von-und-zu-weiss.de>
|
||||
* @param int $id id of resource
|
||||
* @param bool $size false = thumb, true = full pic
|
||||
* @return string url of picture
|
||||
@ -449,7 +449,7 @@ class bo_resources
|
||||
* remove_picture
|
||||
* removes picture from vfs
|
||||
*
|
||||
* Cornelius Weiß <egw@von-und-zu-weiss.de>
|
||||
* Cornelius Weiss <egw@von-und-zu-weiss.de>
|
||||
* @param int $id id of resource
|
||||
* @return bool succsess or not
|
||||
*/
|
||||
@ -470,7 +470,7 @@ class bo_resources
|
||||
* get_genpicturelist
|
||||
* gets all pictures from 'generic picutres dir' in selectbox style for eTemplate
|
||||
*
|
||||
* Cornelius Weiß <egw@von-und-zu-weiss.de>
|
||||
* Cornelius Weiss <egw@von-und-zu-weiss.de>
|
||||
* @return array directory contens in eTemplates selectbox style
|
||||
*/
|
||||
function get_genpicturelist()
|
||||
|
@ -43,17 +43,33 @@ class ui_resources
|
||||
/**
|
||||
* main resources list.
|
||||
*
|
||||
* Cornelius Wei<EFBFBD> <egw@von-und-zu-weiss.de>
|
||||
* Cornelius Weiss <egw@von-und-zu-weiss.de>
|
||||
* @param array $content content from eTemplate callback
|
||||
*
|
||||
* FIXME don't translate cats in nextmach
|
||||
*/
|
||||
function index($content='')
|
||||
{
|
||||
// _debug_array($content);
|
||||
if (is_array($content))
|
||||
{//_debug_array($content);
|
||||
{
|
||||
$sessiondata = $content['nm'];
|
||||
|
||||
if (isset($content['back']))
|
||||
{
|
||||
unset($sessiondata['view_accs_of']);
|
||||
$GLOBALS['egw']->session->appsession('session_data','resources_index_nm',$sessiondata);
|
||||
return $this->index();
|
||||
}
|
||||
if (isset($content['btn_delete_selected']))
|
||||
{
|
||||
foreach($content['nm']['rows']['checkbox'] as $res_id)
|
||||
{
|
||||
$msg .= '<p>'. $this->bo->delete($res_id). '</p><br>';
|
||||
}
|
||||
return $this->index($msg);
|
||||
}
|
||||
|
||||
if (isset($content['nm']['rows']))
|
||||
{
|
||||
unset($sessiondata['rows']);
|
||||
@ -64,7 +80,7 @@ class ui_resources
|
||||
{
|
||||
case 'delete':
|
||||
list($id) = each($content['nm']['rows']['delete']);
|
||||
return $this->delete($id);
|
||||
return $this->index($this->bo->delete($id));
|
||||
case 'view_acc':
|
||||
list($id) = each($content['nm']['rows']['view_acc']);
|
||||
$sessiondata['view_accs_of'] = $id;
|
||||
@ -73,16 +89,12 @@ class ui_resources
|
||||
case 'buyable':
|
||||
}
|
||||
}
|
||||
if (isset($content['back']))
|
||||
{
|
||||
unset($sessiondata['view_accs_of']);
|
||||
$GLOBALS['egw']->session->appsession('session_data','resources_index_nm',$sessiondata);
|
||||
return $this->index();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg = $content;
|
||||
$content = array();
|
||||
$content['msg'] = $msg;
|
||||
$content['nm'] = $GLOBALS['egw']->session->appsession('session_data','resources_index_nm');
|
||||
}
|
||||
|
||||
@ -125,7 +137,7 @@ class ui_resources
|
||||
}
|
||||
|
||||
/**
|
||||
* @author Cornelius Wei<EFBFBD> <egw@von-und-zu-weiss.de>
|
||||
* @author Cornelius Weiss <egw@von-und-zu-weiss.de>
|
||||
* invokes add or edit dialog for resources
|
||||
*
|
||||
* @param $content Content from the eTemplate Exec call or id on inital call
|
||||
@ -149,7 +161,7 @@ class ui_resources
|
||||
if(isset($content['delete']))
|
||||
{
|
||||
unset($content['delete']);
|
||||
$content['msg'] = $this->delete($content['id']);
|
||||
$content['msg'] = $this->bo->delete($content['id']);
|
||||
}
|
||||
|
||||
if($content['msg'])
|
||||
@ -209,7 +221,7 @@ class ui_resources
|
||||
/**
|
||||
* adminsection of resources
|
||||
*
|
||||
* @author Cornelius Wei<EFBFBD> <egw@von-und-zu-weiss.de>
|
||||
* @author Cornelius Weiss <egw@von-und-zu-weiss.de>
|
||||
*/
|
||||
function admin($content='')
|
||||
{
|
||||
@ -406,14 +418,15 @@ class ui_resources
|
||||
}
|
||||
|
||||
/**
|
||||
* deletes a resource
|
||||
* deletes a resource (lets do this only in bo ok?)
|
||||
*
|
||||
* @param int $id resource id
|
||||
* @author Lukas Weiss <wnz.gh05t@users.sourceforge.net>
|
||||
*/
|
||||
function delete($id)
|
||||
/* function delete($id)
|
||||
{
|
||||
$this->bo->delete($id);
|
||||
return $this->index();
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user