mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-23 14:28:45 +01:00
Add history and deleting protection for resources
This commit is contained in:
commit
022f9eb479
@ -633,6 +633,7 @@ class addressbook_ui extends addressbook_bo
|
||||
{
|
||||
$actions['undelete'] = array(
|
||||
'caption' => 'Un-delete',
|
||||
'icon' => 'revert',
|
||||
'group' => $group,
|
||||
'disableClass' => 'rowNoEdit',
|
||||
);
|
||||
|
@ -842,6 +842,7 @@ class calendar_uilist extends calendar_ui
|
||||
{
|
||||
$actions['undelete'] = array(
|
||||
'caption' => 'Un-delete',
|
||||
'icon' => 'revert',
|
||||
'hint' => 'Recover this event',
|
||||
'group' => $group,
|
||||
'enabled' => 'javaScript:nm_enableClass',
|
||||
|
@ -197,6 +197,7 @@ class bo_acl
|
||||
self::get_permissions($cat_id);
|
||||
}
|
||||
//echo "<p>".__METHOD__."($cat_id,$right) = ".self::$permissions[$cat_id]." & $right = ".(self::$permissions[$cat_id] & $right)."</p>\n";
|
||||
|
||||
return (boolean) (self::$permissions[$cat_id] & $right);
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
*/
|
||||
class resources_bo
|
||||
{
|
||||
const DELETED = 'deleted';
|
||||
const PICTURE_NAME = '.picture.jpg';
|
||||
var $resource_icons = '/resources/templates/default/images/resource_icons/';
|
||||
var $debug = 0;
|
||||
@ -48,6 +49,23 @@ class resources_bo
|
||||
// Accessories of a resource added when resource selected
|
||||
);
|
||||
|
||||
public static $field2label = array(
|
||||
'res_id' => 'Resource ID',
|
||||
'name' => 'name',
|
||||
'short_description' => 'short description',
|
||||
'cat_id' => 'Category',
|
||||
'quantity' => 'Quantity',
|
||||
'useable' => 'Useable',
|
||||
'location' => 'Location',
|
||||
'storage_info' => 'Storage',
|
||||
'bookable' => 'Bookable',
|
||||
'buyable' => 'Buyable',
|
||||
'prize' => 'Prize',
|
||||
'long_description' => 'Long description',
|
||||
'inventory_number' => 'inventory number',
|
||||
'accessory_of' => 'Accessory of'
|
||||
);
|
||||
|
||||
function __construct()
|
||||
{
|
||||
$this->so = new resources_so();
|
||||
@ -109,9 +127,18 @@ class resources_bo
|
||||
$join = $acc_join;
|
||||
$extra_cols[] = 'acc_count';
|
||||
break;
|
||||
case self::DELETED:
|
||||
$join = $acc_join;
|
||||
$extra_cols[] = 'acc_count';
|
||||
$filter[] = 'deleted IS NOT NULL';
|
||||
break;
|
||||
default:
|
||||
$filter['accessory_of'] = $query['filter2'];
|
||||
}
|
||||
if($query['filter2'] != self::DELETED)
|
||||
{
|
||||
$filter['deleted'] = null;
|
||||
}
|
||||
|
||||
if ($query['filter'])
|
||||
{
|
||||
@ -157,13 +184,20 @@ class resources_bo
|
||||
return $nr;
|
||||
}
|
||||
|
||||
$config = config::read('resources');
|
||||
foreach($rows as $num => &$resource)
|
||||
{
|
||||
if (!$this->acl->is_permitted($resource['cat_id'],EGW_ACL_EDIT))
|
||||
{
|
||||
$readonlys["edit[$resource[res_id]]"] = true;
|
||||
}
|
||||
if (!$this->acl->is_permitted($resource['cat_id'],EGW_ACL_DELETE))
|
||||
elseif($resource['deleted'])
|
||||
{
|
||||
$resource['class'] .= 'deleted ';
|
||||
}
|
||||
if (!$this->acl->is_permitted($resource['cat_id'],EGW_ACL_DELETE) ||
|
||||
($resource['deleted'] && !$GLOBALS['egw_info']['user']['apps']['admin'] && $config['history'] == 'history')
|
||||
)
|
||||
{
|
||||
$readonlys["delete[$resource[res_id]]"] = true;
|
||||
$resource['class'] .= 'no_delete ';
|
||||
@ -197,7 +231,7 @@ class resources_bo
|
||||
if($resource['acc_count'])
|
||||
{
|
||||
$resource['class'] .= 'hasAccessories ';
|
||||
$accessories = $this->get_acc_list($resource['res_id']);
|
||||
$accessories = $this->get_acc_list($resource['res_id'],$query['filter2']==self::DELETED);
|
||||
foreach($accessories as $acc_id => $acc_name)
|
||||
{
|
||||
$resource['accessories'][] = array('acc_id' => $acc_id, 'name' => $this->link_title($acc_id));
|
||||
@ -206,7 +240,14 @@ class resources_bo
|
||||
$resource['accessory_of_label'] = $this->link_title($resource['accessory_of']);
|
||||
}
|
||||
|
||||
$rows[$num]['picture_thumb'] = $this->get_picture($resource);
|
||||
if($resource['deleted'])
|
||||
{
|
||||
$rows[$num]['picture_thumb'] = 'deleted';
|
||||
}
|
||||
else
|
||||
{
|
||||
$rows[$num]['picture_thumb'] = $this->get_picture($resource);
|
||||
}
|
||||
$rows[$num]['admin'] = $this->acl->get_cat_admin($resource['cat_id']);
|
||||
}
|
||||
|
||||
@ -296,6 +337,12 @@ class resources_bo
|
||||
return $msg;
|
||||
}
|
||||
|
||||
// Check for restore of deleted, restore held links
|
||||
if($old && $old['deleted'] && !$resource['deleted'])
|
||||
{
|
||||
egw_link::restore('resources', $resource['res_id']);
|
||||
}
|
||||
|
||||
// delete old pictures
|
||||
if($resource['picture_src'] != 'own_src')
|
||||
{
|
||||
@ -312,6 +359,18 @@ class resources_bo
|
||||
if($resource['accessory_of'] != $old['accessory_of'])
|
||||
{
|
||||
egw_link::unlink(0,'resources',$resource['res_id'],'','resources',$old['accessory_of']);
|
||||
|
||||
// Check for resource changing to accessory - move its accessories to resource
|
||||
if($old['accessory_of'] == -1 && $accessories = $this->get_acc_list($resource['res_id']))
|
||||
{
|
||||
foreach($accessories as $accessory => $name)
|
||||
{
|
||||
egw_link::unlink(0,'resources',$accessory,'','resources',$resource['res_id']);
|
||||
$acc = $this->read($accessory);
|
||||
$acc['accessory_of'] = -1;
|
||||
$this->so->save($acc);
|
||||
}
|
||||
}
|
||||
}
|
||||
if($resource['accessory_of'] != -1)
|
||||
{
|
||||
@ -331,6 +390,17 @@ class resources_bo
|
||||
}
|
||||
|
||||
$res_id = $this->so->save($resource);
|
||||
|
||||
// History & notifications
|
||||
if (!is_object($this->tracking))
|
||||
{
|
||||
$this->tracking = new resources_tracking();
|
||||
}
|
||||
if ($this->tracking->track($resource,$old,$this->user) === false)
|
||||
{
|
||||
return implode(', ',$this->tracking->errors);
|
||||
}
|
||||
|
||||
return $res_id ? $res_id : lang('Something went wrong by saving resource');
|
||||
}
|
||||
|
||||
@ -347,10 +417,32 @@ class resources_bo
|
||||
return lang('You are not permitted to delete this resource!');
|
||||
}
|
||||
|
||||
if ($this->so->delete(array('res_id'=>$res_id)))
|
||||
// check if we only mark resources as deleted, or really delete them
|
||||
$old = $this->read($res_id);
|
||||
$config = config::read('resources');
|
||||
if ($config['history'] != '' && $old['deleted'] == null)
|
||||
{
|
||||
$old['deleted'] = time();
|
||||
$this->save($old);
|
||||
egw_link::unlink(0,'resources',$res_id,'','','',true);
|
||||
$accessories = $this->get_acc_list($res_id);
|
||||
foreach($accessories as $acc_id => $name)
|
||||
{
|
||||
// Don't purge already deleted accessories
|
||||
$acc = $this->read($acc_id);
|
||||
if(!$acc['deleted'])
|
||||
{
|
||||
$acc['deleted'] = time();
|
||||
$this->save($acc);
|
||||
egw_link::unlink(0,'resources',$acc_id,'','','',true);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
elseif ($this->so->delete(array('res_id'=>$res_id)))
|
||||
{
|
||||
$accessories = $this->get_acc_list($res_id, true);
|
||||
foreach($accessories as $acc_id => $name)
|
||||
{
|
||||
if($this->delete($acc_id))
|
||||
{
|
||||
@ -373,15 +465,20 @@ class resources_bo
|
||||
*
|
||||
* Cornelius Weiss <egw@von-und-zu-weiss.de>
|
||||
* @param int $res_id id of resource
|
||||
* @param boolean $deleted Include deleted accessories
|
||||
* @return array
|
||||
*/
|
||||
function get_acc_list($res_id)
|
||||
function get_acc_list($res_id,$deleted=false)
|
||||
{
|
||||
if($res_id < 1){return;}
|
||||
$data = $this->so->search('','res_id,name','','','','','',$start,array('accessory_of' => $res_id),'',$need_full_no_count=true);
|
||||
foreach($data as $num => $resource)
|
||||
{
|
||||
$acc_list[$resource['res_id']] = $resource['name'];
|
||||
$data = $this->so->search('','res_id,name,deleted','','','','','',$start,array('accessory_of' => $res_id),'',$need_full_no_count=true);
|
||||
$acc_list = array();
|
||||
if($data) {
|
||||
foreach($data as $num => $resource)
|
||||
{
|
||||
if($resource['deleted'] && !$deleted) continue;
|
||||
$acc_list[$resource['res_id']] = $resource['name'];
|
||||
}
|
||||
}
|
||||
return $acc_list;
|
||||
}
|
||||
|
@ -62,6 +62,7 @@ class resources_hooks
|
||||
if ($GLOBALS['egw_info']['user']['apps']['admin'] && $location != 'preferences')
|
||||
{
|
||||
$file = Array(
|
||||
'Site Configuration' => egw::link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname),
|
||||
'Global Categories' => egw::link('/index.php',array(
|
||||
'menuaction' => 'admin.admin_categories.index',
|
||||
'appname' => $appname,
|
||||
|
45
resources/inc/class.resources_tracking.inc.php
Normal file
45
resources/inc/class.resources_tracking.inc.php
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* Resources - history & notifications
|
||||
*
|
||||
* @author Nathan Gray
|
||||
* @copyright 2012 Nathan Gray
|
||||
* @package resources
|
||||
* @sub-package history
|
||||
* @see bo_tracking
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Resources - tracking object for history
|
||||
*/
|
||||
class resources_tracking extends bo_tracking
|
||||
{
|
||||
|
||||
|
||||
public function __construct() {
|
||||
$this->appname = 'resources';
|
||||
$this->id_field = 'res_id';
|
||||
|
||||
$this->field2history = array(
|
||||
'res_id' => 'res_id',
|
||||
'name' => 'name',
|
||||
'short_description' => 'short_description',
|
||||
'cat_id' => 'cat_id',
|
||||
'quantity' => 'quantity',
|
||||
'useable' => 'useable',
|
||||
'location' => 'location',
|
||||
'storage_info' => 'storage_info',
|
||||
'bookable' => 'bookable',
|
||||
'buyable' => 'buyable',
|
||||
'prize' => 'prize',
|
||||
'long_description' => 'long_description',
|
||||
'inventory_number' => 'inventory_number',
|
||||
'accessory_of' => 'accessory_of'
|
||||
);
|
||||
parent::__construct($this->appname);
|
||||
}
|
||||
}
|
@ -104,7 +104,7 @@ class resources_ui
|
||||
$msg = $content;
|
||||
}
|
||||
$content = array();
|
||||
$content['msg'] = $msg;
|
||||
$content['msg'] = $msg ? $msg : $_GET['msg'];
|
||||
|
||||
$content['nm']['header_left'] = 'resources.resource_select.header';
|
||||
$content['nm']['header_right'] = 'resources.show.nm_right';
|
||||
@ -128,6 +128,12 @@ class resources_ui
|
||||
$content['nm']['options-filter']= array(''=>lang('all categories'))+(array)$this->bo->acl->get_cats(EGW_ACL_READ);
|
||||
$content['nm']['options-filter2'] = resources_bo::$filter_options;
|
||||
|
||||
$config = config::read('resources');
|
||||
if($config['history'])
|
||||
{
|
||||
$content['nm']['options-filter2'][resources_bo::DELETED] = lang('Deleted');
|
||||
}
|
||||
|
||||
if($_GET['search']) {
|
||||
$content['nm']['search'] = $_GET['search'];
|
||||
}
|
||||
@ -269,6 +275,14 @@ class resources_ui
|
||||
'nm_action' => 'open_popup',
|
||||
'hideOnDisabled' => true
|
||||
),
|
||||
'restore' => array(
|
||||
'caption' => 'Un-delete',
|
||||
'icon' => 'revert',
|
||||
'enableClass' => 'deleted',
|
||||
'hideOnDisabled' => true,
|
||||
'nm_action' => 'open_popup',
|
||||
'group' => $group,
|
||||
)
|
||||
);
|
||||
return $actions;
|
||||
}
|
||||
@ -338,15 +352,56 @@ class resources_ui
|
||||
egw_framework::set_onload("egw_openWindowCentered2('".egw::link('/index.php',$url_params) ."','_blank');");
|
||||
$action_msg = lang('booked');
|
||||
break;
|
||||
case 'restore':
|
||||
$action_msg = lang('restored');
|
||||
foreach($checked as $n=>$id)
|
||||
{
|
||||
// Extra data
|
||||
if(!$id) continue;
|
||||
$resource = $this->bo->read($id);
|
||||
$resource['deleted'] = null;
|
||||
if($resource['accessory_of'] > 0)
|
||||
{
|
||||
/*
|
||||
If restoring an accessory, and parent is deleted, and not in
|
||||
the list of resources to be restored right now, un-parent
|
||||
*/
|
||||
$parent = $this->bo->read($resource['accessory_of']);
|
||||
$checked_key = array_search($parent['res_id'], $checked);
|
||||
if($checked_key === false && $parent['deleted'])
|
||||
{
|
||||
$resource['accessory_of'] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
$this->bo->save($resource);
|
||||
if($settings == 'accessories')
|
||||
{
|
||||
// Restore accessories too
|
||||
$accessories = $this->bo->get_acc_list($id,true);
|
||||
foreach($accessories as $acc_id => $name)
|
||||
{
|
||||
$acc = $this->bo->read($acc_id);
|
||||
$acc['deleted'] = null;
|
||||
$this->bo->save($acc);
|
||||
$restored_accessories++;
|
||||
}
|
||||
}
|
||||
$success++;
|
||||
}
|
||||
if($restored_accessories) $action_msg .= ", " . lang('%1 accessories restored',$restored_accessories);
|
||||
break;
|
||||
case 'delete':
|
||||
$action_msg = lang('deleted');
|
||||
$promoted_accessories = 0;
|
||||
foreach($checked as $n => &$id)
|
||||
{
|
||||
// Extra data
|
||||
if(!$id) continue;
|
||||
$resource = $this->bo->read($id);
|
||||
if($settings == 'promote')
|
||||
{
|
||||
// Handle a selected accessory
|
||||
$resource = $this->bo->read($id);
|
||||
if($resource['accessory_of'] > 0)
|
||||
{
|
||||
$resource['accessory_of'] = -1;
|
||||
@ -355,12 +410,14 @@ class resources_ui
|
||||
continue;
|
||||
}
|
||||
|
||||
// Make associated accessories into resources
|
||||
$accessories = $this->bo->get_acc_list($id);
|
||||
// Make associated accessories into resources - include deleted
|
||||
$accessories = $this->bo->get_acc_list($id,true);
|
||||
foreach($accessories as $acc_id => $name)
|
||||
{
|
||||
$acc = $this->bo->read($acc_id);
|
||||
$acc['accessory_of'] = -1;
|
||||
// Restore them if deleted
|
||||
$acc['deleted'] = null;
|
||||
$this->bo->save($acc);
|
||||
$promoted_accessories++;
|
||||
|
||||
@ -373,7 +430,8 @@ class resources_ui
|
||||
{
|
||||
// Remove checked accessories, deleting resource will remove them
|
||||
// We get an error if we try to delete them after they're gone
|
||||
$accessories = $this->bo->get_acc_list($id);
|
||||
$accessories = $this->bo->get_acc_list($id,$resource['deleted']);
|
||||
|
||||
foreach($accessories as $acc_id => $name)
|
||||
{
|
||||
$checked_key = array_search($acc_id, $checked);
|
||||
@ -424,23 +482,32 @@ class resources_ui
|
||||
// // links are already saved by eTemplate
|
||||
// unset($resource['link_to']['to_id']);
|
||||
// }
|
||||
if($content['res_id'])
|
||||
{
|
||||
$acc_count = count($this->bo->get_acc_list($content['res_id']));
|
||||
}
|
||||
$result = $this->bo->save($content);
|
||||
if(is_numeric($result))
|
||||
{
|
||||
$content['res_id'] = $result;
|
||||
if($acc_count && $content['accessory_of'] != -1)
|
||||
{
|
||||
// Resource with accessories changed into accessory
|
||||
if($acc_count) $msg = lang('%1 accessories now resources',$acc_count);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$content['msg'] = $result;
|
||||
$msg = $result;
|
||||
}
|
||||
break;
|
||||
case 'delete':
|
||||
unset($content['delete']);
|
||||
$content['msg'] = $this->bo->delete($content['res_id']);
|
||||
$msg = $this->bo->delete($content['res_id']);
|
||||
break;
|
||||
}
|
||||
$js = "opener.egw_refresh('".str_replace("'","\\'",$content['msg'])."','addressbook',{$content['res_id']});";
|
||||
if($button != 'apply' && !$content['msg'])
|
||||
$js = "opener.egw_refresh('".str_replace("'","\\'",$msg)."','resources',{$content['res_id']});";
|
||||
if($button != 'apply' && !$msg)
|
||||
{
|
||||
$js .= 'window.close();';
|
||||
echo "<html><body><script>$js</script></body></html>\n";
|
||||
@ -458,7 +525,6 @@ class resources_ui
|
||||
if (isset($nm_session_data['filter2']) && $nm_session_data['filter2'] > 0) $accessory_of = $nm_session_data['filter2'];
|
||||
if (isset($_GET['accessory_of'])) $accessory_of = $_GET['accessory_of'];
|
||||
$content = array('res_id' => $res_id);
|
||||
|
||||
if ($res_id > 0)
|
||||
{
|
||||
$content = $this->bo->read($res_id);
|
||||
@ -484,6 +550,10 @@ class resources_ui
|
||||
$content['cat_id'] = $nm_session_data['filter'];
|
||||
$content['bookable'] = true;
|
||||
}
|
||||
if($msg) {
|
||||
$content['msg'] = $msg;
|
||||
}
|
||||
|
||||
if ($_GET['msg']) $content['msg'] = strip_tags($_GET['msg']);
|
||||
|
||||
// some presetes
|
||||
@ -492,6 +562,19 @@ class resources_ui
|
||||
$content['useable'] = $content['useable'] ? $content['useable'] : 1;
|
||||
$content['accessory_of'] = $content['accessory_of'] ? $content['accessory_of'] : $accessory_of;
|
||||
|
||||
if($content['res_id'] && $content['accessory_of'] == -1)
|
||||
{
|
||||
$content['acc_count'] = count($this->bo->get_acc_list($content['res_id']));
|
||||
}
|
||||
$content['history'] = array(
|
||||
'id' => $res_id,
|
||||
'app' => 'resources',
|
||||
'status-widgets' => array(
|
||||
'accessory_of' => 'link-entry:resources'
|
||||
)
|
||||
);
|
||||
$sel_options['status'] = resources_bo::$field2label;
|
||||
|
||||
$sel_options['gen_src_list'] = $this->bo->get_genpicturelist();
|
||||
$sel_options['cat_id'] = $this->bo->acl->get_cats(EGW_ACL_ADD);
|
||||
$sel_options['cat_id'] = count($sel_options['cat_id']) == 1 ? $sel_options['cat_id'] :
|
||||
@ -512,15 +595,25 @@ class resources_ui
|
||||
{
|
||||
$read_only['__ALL__'] = true;
|
||||
}
|
||||
if(!$this->bo->acl->is_permitted($content['cat_id'],EGW_ACL_DELETE))
|
||||
$config = config::read('resources');
|
||||
if(!$this->bo->acl->is_permitted($content['cat_id'],EGW_ACL_DELETE) ||
|
||||
($content['deleted'] && !$GLOBALS['egw_info']['user']['apps']['admin'] && $config['history'] == 'history'))
|
||||
{
|
||||
$read_only['delete'] = true;
|
||||
}
|
||||
|
||||
// Can't make a resource with accessories an accessory
|
||||
$read_only['accessory_of'] = $content['acc_count'];
|
||||
if($read_only['accessory_of'])
|
||||
{
|
||||
$content['accessory_label'] = lang('Remove accessories before changing Accessory of');
|
||||
}
|
||||
|
||||
// Disable custom tab if there are no custom fields defined
|
||||
$read_only['tabs']['custom'] = !(config::get_customfields('resources',true));
|
||||
|
||||
$preserv = $content;
|
||||
|
||||
$this->tmpl->read('resources.edit');
|
||||
return $this->tmpl->exec('resources.resources_ui.edit',$content,$sel_options,$read_only,$preserv,2);
|
||||
}
|
||||
|
@ -16,22 +16,7 @@ class resources_wizard_export_csv extends importexport_wizard_basic_export_csv
|
||||
parent::__construct();
|
||||
|
||||
// Field mapping
|
||||
$this->export_fields = array(
|
||||
'res_id' => lang('Resource ID'),
|
||||
'name' => lang('name'),
|
||||
'short_description' => lang('short description'),
|
||||
'cat_id' => lang('Category'),
|
||||
'quantity' => lang('Quantity'),
|
||||
'useable' => lang('Useable'),
|
||||
'location' => lang('Location'),
|
||||
'storage_info' => lang('Storage'),
|
||||
'bookable' => lang('Bookable'),
|
||||
'buyable' => lang('Buyable'),
|
||||
'prize' => lang('Prize'),
|
||||
'long_description' => lang('Long description'),
|
||||
'inventory_number' => lang('inventory number'),
|
||||
'accessory_of' => lang('Accessory of')
|
||||
);
|
||||
$this->export_fields = resources_bo::$field2label;
|
||||
|
||||
// Fields deprecated, but still in DB
|
||||
unset($this->export_fields['buyable']);
|
||||
|
@ -29,3 +29,22 @@ $oProc->query("INSERT INTO {$resources_table_prefix} (name,cat_id,bookable,pictu
|
||||
$oProc->query("INSERT INTO {$resources_table_prefix} (name,cat_id,bookable,picture_src,accessory_of) VALUES ( 'Meeting room 2',$locations_cat_id,1,'cat_src',-1)");
|
||||
$res_id = $oProc->m_odb->get_last_insert_id($resources_table_prefix,'res_id');
|
||||
$oProc->query("INSERT INTO {$resources_table_prefix} (name,cat_id,bookable,picture_src,accessory_of) VALUES ( 'Fixed Beamer',$cat_id,0,'cat_src',$res_id)");
|
||||
|
||||
// Turn on history by default
|
||||
foreach(array(
|
||||
'history' => 'history',
|
||||
) as $name => $value)
|
||||
{
|
||||
$GLOBALS['egw_setup']->db->insert(
|
||||
$GLOBALS['egw_setup']->config_table,
|
||||
array(
|
||||
'config_app' => 'resources',
|
||||
'config_name' => $name,
|
||||
'config_value' => $value,
|
||||
),array(
|
||||
'config_app' => 'resources',
|
||||
'config_name' => $name,
|
||||
),__LINE__,__FILE__
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* EGroupware - eTemplates for Application resources
|
||||
* http://www.egroupware.org
|
||||
* generated by soetemplate::dump4setup() 2013-01-02 09:11
|
||||
* generated by soetemplate::dump4setup() 2013-01-09 10:15
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @package resources
|
||||
@ -18,7 +18,7 @@ $templ_data[] = array('name' => 'resources.add_buttons','template' => '','lang'
|
||||
|
||||
$templ_data[] = array('name' => 'resources.admin','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:8:"checkbox";s:5:"label";s:55:"Don\'t use vfs (this will need a symlink --> see README)";s:4:"name";s:12:"dont_use_vfs";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:4:"save";}i:2;a:3:{s:4:"type";s:6:"button";s:5:"label";s:6:"Cancel";s:4:"name";s:6:"cancel";}}}}s:4:"rows";i:2;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1109673054',);
|
||||
|
||||
$templ_data[] = array('name' => 'resources.edit','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:1:{s:1:"A";s:3:"700";}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";}}i:2;a:1:{s:1:"A";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:5:{s:4:"type";s:4:"text";s:5:"label";s:4:"Name";s:4:"name";s:4:"name";s:4:"help";s:16:"Name of resource";s:6:"needed";s:1:"1";}i:2;a:3:{s:4:"type";s:4:"text";s:5:"label";s:16:"Inventory number";s:4:"name";s:16:"inventory_number";}i:3;a:7:{s:4:"type";s:6:"select";s:5:"label";s:8:"Category";s:7:"no_lang";s:1:"1";s:4:"name";s:6:"cat_id";s:6:"needed";s:1:"1";s:4:"help";s:44:"Which category does this resource belong to?";s:5:"align";s:5:"right";}}}i:3;a:1:{s:1:"A";a:2:{s:4:"type";s:8:"template";s:4:"name";s:19:"resources.edit_tabs";}}i:4;a:1:{s:1:"A";a:2:{s:4:"type";s:8:"template";s:4:"name";s:22:"resources.edit_buttons";}}}s:4:"rows";i:4;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1353446670',);
|
||||
$templ_data[] = array('name' => 'resources.edit','template' => '','lang' => '','group' => '0','version' => '1.9.002','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:1:{s:1:"A";s:3:"700";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";s:4:"span";s:11:"all,message";}}i:2;a:1:{s:1:"A";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:5:{s:4:"type";s:4:"text";s:5:"label";s:4:"Name";s:4:"name";s:4:"name";s:4:"help";s:16:"Name of resource";s:6:"needed";s:1:"1";}i:2;a:3:{s:4:"type";s:4:"text";s:5:"label";s:16:"Inventory number";s:4:"name";s:16:"inventory_number";}i:3;a:7:{s:4:"type";s:6:"select";s:5:"label";s:8:"Category";s:7:"no_lang";s:1:"1";s:4:"name";s:6:"cat_id";s:6:"needed";s:1:"1";s:4:"help";s:44:"Which category does this resource belong to?";s:5:"align";s:5:"right";}}}i:3;a:1:{s:1:"A";a:2:{s:4:"type";s:8:"template";s:4:"name";s:19:"resources.edit_tabs";}}i:4;a:1:{s:1:"A";a:2:{s:4:"type";s:8:"template";s:4:"name";s:22:"resources.edit_buttons";}}}s:4:"rows";i:4;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1357664574',);
|
||||
|
||||
$templ_data[] = array('name' => 'resources.edit.accessories','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:9:"nextmatch";s:4:"name";s:2:"nm";s:4:"size";s:19:"resources.show.rows";}}}s:4:"rows";i:1;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1352913344',);
|
||||
|
||||
@ -36,13 +36,15 @@ $templ_data[] = array('name' => 'resources.edit_buttons','template' => '','lang'
|
||||
|
||||
$templ_data[] = array('name' => 'resources.edit_pictures','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:3:{s:2:"c1";s:3:"nmr";s:2:"c2";s:3:"nmr";s:2:"c3";s:3:"nmr";}i:1;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:26:"Use general resources icon";s:5:"align";s:5:"right";}s:1:"B";a:3:{s:4:"type";s:5:"radio";s:4:"size";s:7:"gen_src";s:4:"name";s:11:"picture_src";}s:1:"C";a:3:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:12:"gen_src_list";}}i:2;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:23:"Use the category\'s icon";s:5:"align";s:5:"right";}s:1:"B";a:3:{s:4:"type";s:5:"radio";s:4:"size";s:7:"cat_src";s:4:"name";s:11:"picture_src";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:3;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:15:"Use own picture";s:5:"align";s:5:"right";}s:1:"B";a:3:{s:4:"type";s:5:"radio";s:4:"size";s:7:"own_src";s:4:"name";s:11:"picture_src";}s:1:"C";a:2:{s:4:"type";s:4:"file";s:4:"name";s:8:"own_file";}}}s:4:"rows";i:3;s:4:"cols";i:3;}}','size' => '','style' => '','modified' => '1108638846',);
|
||||
|
||||
$templ_data[] = array('name' => 'resources.edit_tabs','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:3:{s:2:"c1";s:7:"row_off";s:1:"A";s:3:"700";s:2:"h2";s:4:"100%";}i:1;a:3:{s:1:"A";a:5:{s:4:"type";s:3:"tab";s:4:"span";s:3:"all";s:5:"label";s:40:"General|Description|Picture|Links|Custom";s:4:"name";s:39:"tabs=general|page|pictures|links|custom";s:4:"help";s:164:"General informations about resource|Informations about the location of resource|Prizeing information for booking or buying|Web-Page of resource|Pictures or resource";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:2;a:3:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:2;s:4:"cols";i:3;s:4:"size";s:4:",380";s:7:"options";a:1:{i:1;s:3:"380";}}}','size' => ',380','style' => '','modified' => '1116664222',);
|
||||
$templ_data[] = array('name' => 'resources.edit_tabs','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:3:{s:2:"c1";s:7:"row_off";s:1:"A";s:3:"700";s:2:"h2";s:4:"100%";}i:1;a:3:{s:1:"A";a:5:{s:4:"type";s:3:"tab";s:4:"span";s:3:"all";s:5:"label";s:48:"General|Description|Picture|Links|Custom|History";s:4:"name";s:47:"tabs=general|page|pictures|links|custom|history";s:4:"help";s:164:"General informations about resource|Informations about the location of resource|Prizeing information for booking or buying|Web-Page of resource|Pictures or resource";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:2;a:3:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:2;s:4:"cols";i:3;s:4:"size";s:4:",380";s:7:"options";a:1:{i:1;s:3:"380";}}}','size' => ',380','style' => '','modified' => '1116664222',);
|
||||
|
||||
$templ_data[] = array('name' => 'resources.edit_tabs.accessories','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:9:"nextmatch";s:4:"name";s:2:"nm";s:4:"size";s:19:"resources.show.rows";}}}s:4:"rows";i:1;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1109668181',);
|
||||
|
||||
$templ_data[] = array('name' => 'resources.edit_tabs.custom','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:1:{s:2:"c1";s:4:",top";}i:1;a:1:{s:1:"A";a:1:{s:4:"type";s:12:"customfields";}}i:2;a:1:{s:1:"A";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:2;s:4:"cols";i:1;s:4:"size";s:7:"700,380";s:7:"options";a:2:{i:0;s:3:"700";i:1;s:3:"380";}}}','size' => '700,380','style' => '','modified' => '1131988154',);
|
||||
|
||||
$templ_data[] = array('name' => 'resources.edit_tabs.general','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:10:{i:0;a:2:{s:1:"C";s:2:"10";s:2:"h9";s:4:"100%";}i:1;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:19:"Description (short)";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:6:"50,100";s:4:"name";s:17:"short_description";s:4:"help";s:29:"Short description of resource";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:29:"Short description of resource";}}i:2;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Location";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:6:"50,100";s:4:"name";s:8:"location";s:4:"help";s:20:"Location of resource";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:28:"Where to find this resource?";}}i:3;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:19:"Storage information";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:6:"50,100";s:4:"name";s:12:"storage_info";s:4:"help";s:25:"Information about storage";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:25:"Information about storage";}}i:4;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Quantity";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:4:"5,10";s:4:"name";s:8:"quantity";s:4:"help";s:20:"Quantity of resource";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:20:"Quantity of resource";}}i:5;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Useable";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:4:"5,10";s:4:"name";s:7:"useable";s:4:"help";s:29:"How many of them are useable?";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:38:"How many of the resources are useable?";}}i:6;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Bookable";}s:1:"B";a:3:{s:4:"type";s:8:"checkbox";s:4:"name";s:8:"bookable";s:4:"help";s:21:"Is resource bookable?";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:26:"Is this resource bookable?";}}i:7;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:12:"Accessory of";}s:1:"B";a:3:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:12:"accessory_of";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}i:8;a:4:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:7:"Buyable";s:8:"disabled";s:1:"1";}s:1:"B";a:4:{s:4:"type";s:8:"checkbox";s:4:"name";s:7:"buyable";s:4:"help";s:20:"Is resource buyable?";s:8:"disabled";s:1:"1";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:3:{s:4:"type";s:5:"label";s:5:"label";s:25:"Is this resource buyable?";s:8:"disabled";s:1:"1";}}i:9;a:4:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:9;s:4:"cols";i:4;s:4:"size";s:7:"700,380";s:7:"options";a:2:{i:0;s:3:"700";i:1;s:3:"380";}}}','size' => '700,380','style' => '','modified' => '1093597682',);
|
||||
$templ_data[] = array('name' => 'resources.edit_tabs.general','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:10:{i:0;a:2:{s:1:"C";s:2:"10";s:2:"h9";s:4:"100%";}i:1;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:19:"Description (short)";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:6:"50,100";s:4:"name";s:17:"short_description";s:4:"help";s:29:"Short description of resource";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:29:"Short description of resource";}}i:2;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Location";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:6:"50,100";s:4:"name";s:8:"location";s:4:"help";s:20:"Location of resource";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:28:"Where to find this resource?";}}i:3;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:19:"Storage information";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:6:"50,100";s:4:"name";s:12:"storage_info";s:4:"help";s:25:"Information about storage";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:25:"Information about storage";}}i:4;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Quantity";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:4:"5,10";s:4:"name";s:8:"quantity";s:4:"help";s:20:"Quantity of resource";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:20:"Quantity of resource";}}i:5;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Useable";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:4:"5,10";s:4:"name";s:7:"useable";s:4:"help";s:29:"How many of them are useable?";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:38:"How many of the resources are useable?";}}i:6;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Bookable";}s:1:"B";a:3:{s:4:"type";s:8:"checkbox";s:4:"name";s:8:"bookable";s:4:"help";s:21:"Is resource bookable?";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:26:"Is this resource bookable?";}}i:7;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:12:"Accessory of";}s:1:"B";a:3:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:12:"accessory_of";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:4:"name";s:15:"accessory_label";}}i:8;a:4:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:7:"Buyable";s:8:"disabled";s:1:"1";}s:1:"B";a:4:{s:4:"type";s:8:"checkbox";s:4:"name";s:7:"buyable";s:4:"help";s:20:"Is resource buyable?";s:8:"disabled";s:1:"1";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:3:{s:4:"type";s:5:"label";s:5:"label";s:25:"Is this resource buyable?";s:8:"disabled";s:1:"1";}}i:9;a:4:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:9;s:4:"cols";i:4;s:4:"size";s:7:"700,380";s:7:"options";a:2:{i:0;s:3:"700";i:1;s:3:"380";}}}','size' => '700,380','style' => '','modified' => '1093597682',);
|
||||
|
||||
$templ_data[] = array('name' => 'resources.edit_tabs.history','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:5:{s:4:"type";s:10:"historylog";s:4:"data";a:2:{i:0;a:1:{s:1:"A";s:4:"100%";}i:1;a:1:{s:1:"A";a:2:{s:4:"type";s:10:"historylog";s:4:"name";s:7:"history";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"name";s:7:"history";}}','size' => '','style' => '','modified' => '1355774114',);
|
||||
|
||||
$templ_data[] = array('name' => 'resources.edit_tabs.links','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:6:{i:0;a:7:{s:1:"A";s:3:"100";s:2:"c1";s:2:"th";s:2:"c2";s:3:"row";s:2:"c3";s:2:"th";s:2:"c4";s:11:"row_off,top";s:2:"h4";s:3:"164";s:2:"h5";s:4:"100%";}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:5:"label";s:16:"Create new links";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:3:{s:4:"type";s:7:"link-to";s:4:"span";s:3:"all";s:4:"name";s:7:"link_to";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:5:"label";s:14:"Existing links";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:4;a:2:{s:1:"A";a:3:{s:4:"type";s:9:"link-list";s:4:"span";s:3:"all";s:4:"name";s:7:"link_to";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:5;a:2:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:5;s:4:"cols";i:2;s:4:"size";s:7:"700,380";s:7:"options";a:2:{i:0;s:3:"700";i:1;s:3:"380";}}}','size' => '700,380','style' => '','modified' => '1109248913',);
|
||||
|
||||
@ -60,7 +62,7 @@ $templ_data[] = array('name' => 'resources.resource_select.row','template' => ''
|
||||
|
||||
$templ_data[] = array('name' => 'resources.resource_selectbox','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:1:{s:2:"c1";s:7:",bottom";}i:1;a:2:{s:1:"A";a:4:{s:4:"type";s:6:"select";s:4:"size";s:3:"14+";s:4:"name";s:9:"resources";s:7:"no_lang";s:1:"1";}s:1:"B";a:6:{s:4:"type";s:6:"button";s:7:"onclick";s:160:"window.open(egw::link(\'/index.php\',\'menuaction=resources.resources_ui.select\'),\'\',\'dependent=yes,width=600,height=450,scrollbars=yes,status=yes\'); return false;";s:5:"label";s:13:"Add resources";s:4:"size";s:6:"navbar";s:6:"needed";s:1:"1";s:4:"name";s:5:"popup";}}}s:4:"rows";i:1;s:4:"cols";i:2;}}','size' => '','style' => '','modified' => '1118520536',);
|
||||
|
||||
$templ_data[] = array('name' => 'resources.show','template' => '','lang' => '','group' => '0','version' => '1.9.003','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:7:{i:0;a:4:{s:1:"A";s:4:"100%";s:2:"h1";s:6:",!@msg";s:2:"h4";s:34:",!@nm[selectcols]=/legacy_actions/";s:2:"h2";s:2:",1";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"span";s:11:"all,message";s:4:"name";s:3:"msg";s:5:"align";s:6:"center";}}i:2;a:1:{s:1:"A";a:3:{s:4:"type";s:8:"template";s:5:"align";s:5:"right";s:4:"name";s:8:"nm_right";}}i:3;a:1:{s:1:"A";a:4:{s:4:"type";s:9:"nextmatch";s:4:"size";s:19:"resources.show.rows";s:7:"no_lang";s:1:"1";s:4:"name";s:2:"nm";}}i:4;a:1:{s:1:"A";a:6:{s:5:"align";s:5:"right";s:4:"span";s:3:"all";s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:5:{s:5:"label";s:13:"Select action";s:7:"onclick";s:184:"if (!egw_globalObjectManager.getObjectById(\'resources.show.rows\').executeActionImplementation(this, \'popup\')) alert(egw::lang(\'You need to select some entries first!\')); return false;;";s:4:"name";s:14:"legacy_actions";s:4:"type";s:10:"buttononly";s:4:"help";s:13:"Select action";}i:2;a:8:{s:5:"label";s:9:"Check all";s:6:"needed";s:1:"1";s:7:"onclick";s:95:"egw_globalObjectManager.getObjectById(\'resources.show.rows\').toggleAllSelected(); return false;";s:4:"name";s:9:"check_all";s:4:"type";s:6:"button";s:4:"size";s:9:"arrow_ltr";s:4:"help";s:9:"Check all";s:4:"span";s:14:",checkAllArrow";}}}i:5;a:1:{s:1:"A";a:3:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"1";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:3:"Add";s:7:"onclick";s:206:"window.open(egw::link(\'/index.php\',\'menuaction=resources.resources_ui.edit\'),\'\',\'dependent=yes,width=800,height=600,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false; return false;";s:4:"name";s:3:"add";}}}i:6;a:1:{s:1:"A";a:6:{s:5:"class";s:12:"action_popup";s:4:"name";s:12:"delete_popup";s:4:"type";s:3:"box";s:4:"size";s:1:"1";i:1;a:6:{s:5:"class";s:6:"prompt";s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:3:{s:4:"type";s:5:"label";s:5:"label";s:6:"Delete";s:4:"span";s:13:",promptheader";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:45:"Delete accessories of selected resources too?";}i:3;a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:4:{s:5:"label";s:28:"Yes - Delete accessories too";s:7:"onclick";s:36:"nm_submit_popup(this); return false;";s:4:"name";s:6:"delete";s:4:"type";s:6:"button";}i:2;a:4:{s:5:"label";s:24:"No - Make them resources";s:7:"onclick";s:75:"nm_popup_action.id = \'delete_promote\'; nm_submit_popup(this); return false;";s:4:"name";s:14:"delete_promote";s:4:"type";s:6:"button";}i:3;a:3:{s:5:"label";s:6:"Cancel";s:7:"onclick";s:35:"nm_hide_popup(this,\'delete_popup\');";s:4:"type";s:10:"buttononly";}}}s:4:"span";s:20:",action_popup prompt";}}}s:4:"rows";i:6;s:4:"cols";i:1;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '.image16 img {
|
||||
$templ_data[] = array('name' => 'resources.show','template' => '','lang' => '','group' => '0','version' => '1.9.003','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:8:{i:0;a:4:{s:1:"A";s:4:"100%";s:2:"h1";s:6:",!@msg";s:2:"h4";s:34:",!@nm[selectcols]=/legacy_actions/";s:2:"h2";s:2:",1";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"span";s:11:"all,message";s:4:"name";s:3:"msg";s:5:"align";s:6:"center";}}i:2;a:1:{s:1:"A";a:3:{s:4:"type";s:8:"template";s:5:"align";s:5:"right";s:4:"name";s:8:"nm_right";}}i:3;a:1:{s:1:"A";a:4:{s:4:"type";s:9:"nextmatch";s:4:"size";s:19:"resources.show.rows";s:7:"no_lang";s:1:"1";s:4:"name";s:2:"nm";}}i:4;a:1:{s:1:"A";a:6:{s:5:"align";s:5:"right";s:4:"span";s:3:"all";s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:5:{s:5:"label";s:13:"Select action";s:7:"onclick";s:184:"if (!egw_globalObjectManager.getObjectById(\'resources.show.rows\').executeActionImplementation(this, \'popup\')) alert(egw::lang(\'You need to select some entries first!\')); return false;;";s:4:"name";s:14:"legacy_actions";s:4:"type";s:10:"buttononly";s:4:"help";s:13:"Select action";}i:2;a:8:{s:5:"label";s:9:"Check all";s:6:"needed";s:1:"1";s:7:"onclick";s:95:"egw_globalObjectManager.getObjectById(\'resources.show.rows\').toggleAllSelected(); return false;";s:4:"name";s:9:"check_all";s:4:"type";s:6:"button";s:4:"size";s:9:"arrow_ltr";s:4:"help";s:9:"Check all";s:4:"span";s:14:",checkAllArrow";}}}i:5;a:1:{s:1:"A";a:3:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"1";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:3:"Add";s:7:"onclick";s:206:"window.open(egw::link(\'/index.php\',\'menuaction=resources.resources_ui.edit\'),\'\',\'dependent=yes,width=800,height=600,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false; return false;";s:4:"name";s:3:"add";}}}i:6;a:1:{s:1:"A";a:6:{s:5:"class";s:12:"action_popup";s:4:"name";s:12:"delete_popup";s:4:"type";s:3:"box";s:4:"size";s:1:"1";i:1;a:6:{s:5:"class";s:6:"prompt";s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:3:{s:4:"type";s:5:"label";s:5:"label";s:6:"Delete";s:4:"span";s:13:",promptheader";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:45:"Delete accessories of selected resources too?";}i:3;a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:4:{s:5:"label";s:28:"Yes - Delete accessories too";s:7:"onclick";s:36:"nm_submit_popup(this); return false;";s:4:"name";s:6:"delete";s:4:"type";s:6:"button";}i:2;a:4:{s:5:"label";s:24:"No - Make them resources";s:7:"onclick";s:75:"nm_popup_action.id = \'delete_promote\'; nm_submit_popup(this); return false;";s:4:"name";s:14:"delete_promote";s:4:"type";s:6:"button";}i:3;a:3:{s:5:"label";s:6:"Cancel";s:7:"onclick";s:35:"nm_hide_popup(this,\'delete_popup\');";s:4:"type";s:10:"buttononly";}}}s:4:"span";s:20:",action_popup prompt";}}i:7;a:1:{s:1:"A";a:6:{s:5:"class";s:12:"action_popup";s:4:"name";s:13:"restore_popup";s:4:"type";s:3:"box";s:4:"size";s:1:"1";i:1;a:6:{s:5:"class";s:6:"prompt";s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:3:{s:4:"type";s:5:"label";s:5:"label";s:9:"Un-delete";s:4:"span";s:13:",promptheader";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:48:"Un-delete accessories of selected resources too?";}i:3;a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:4:{s:5:"label";s:31:"Yes - Un-delete accessories too";s:7:"onclick";s:79:"nm_popup_action.id = \'restore_accessories\';nm_submit_popup(this); return false;";s:4:"name";s:19:"restore_accessories";s:4:"type";s:6:"button";}i:2;a:4:{s:5:"label";s:15:"No - Leave them";s:7:"onclick";s:68:"nm_popup_action.id = \'restore\'; nm_submit_popup(this); return false;";s:4:"name";s:7:"restore";s:4:"type";s:6:"button";}i:3;a:3:{s:5:"label";s:6:"Cancel";s:7:"onclick";s:36:"nm_hide_popup(this,\'restore_popup\');";s:4:"type";s:10:"buttononly";}}}s:4:"span";s:20:",action_popup prompt";}}}s:4:"rows";i:7;s:4:"cols";i:1;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '.image16 img {
|
||||
max-width: 16px;
|
||||
max-height: 16px;
|
||||
}
|
||||
|
@ -45,3 +45,4 @@ $setup_info['resources']['depends'][] = array( // cause eTemplates is not in the
|
||||
'appname' => 'etemplate',
|
||||
'versions' => Array('1.7','1.8','1.9')
|
||||
);
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
$phpgw_baseline = array(
|
||||
'egw_resources' => array(
|
||||
'fd' => array(
|
||||
'res_id' => array('type' => 'auto'),
|
||||
'res_id' => array('type' => 'auto','nullable' => False),
|
||||
'name' => array('type' => 'varchar','precision' => '100'),
|
||||
'short_description' => array('type' => 'varchar','precision' => '100'),
|
||||
'cat_id' => array('type' => 'int','precision' => '11','nullable' => False),
|
||||
|
@ -338,11 +338,11 @@ function resources_upgrade1_8()
|
||||
|
||||
function resources_upgrade1_9_001()
|
||||
{
|
||||
$GLOBALS['egw_setup']->oProc->AddColumn('egw_resources','deleted',array(
|
||||
'type' => 'int',
|
||||
'precision' => '8'
|
||||
));
|
||||
$GLOBALS['egw_setup']->oProc->AddColumn('egw_resources','deleted',array(
|
||||
'type' => 'int',
|
||||
'precision' => '8'
|
||||
));
|
||||
|
||||
return $GLOBALS['setup_info']['resources']['currentver'] = '1.9.002';
|
||||
return $GLOBALS['setup_info']['resources']['currentver'] = '1.9.002';
|
||||
}
|
||||
|
||||
|
42
resources/templates/default/config.tpl
Normal file
42
resources/templates/default/config.tpl
Normal file
@ -0,0 +1,42 @@
|
||||
<!-- 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"> <b>{title}</b></td>
|
||||
</tr>
|
||||
<!-- END header -->
|
||||
|
||||
<!-- BEGIN body -->
|
||||
<tr class="row_on">
|
||||
<tr class="th">
|
||||
<td colspan="2"> <b>{lang_History_logging}</b></td>
|
||||
</tr>
|
||||
<tr class="row_on">
|
||||
<td> {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">
|
||||
|
||||
</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 -->
|
@ -52,7 +52,7 @@
|
||||
<menupopup id="accessory_of" no_lang="1"/>
|
||||
</menulist>
|
||||
<description/>
|
||||
<description/>
|
||||
<description id="accessory_label"/>
|
||||
</row>
|
||||
<row>
|
||||
<description disabled="true" value="Buyable"/>
|
||||
@ -171,6 +171,9 @@
|
||||
</rows>
|
||||
</grid>
|
||||
</template>
|
||||
<template id="resources.edit_tabs.history" template="" lang="" group="0" version="">
|
||||
<historylog cols="1" id="history" rows="1"/>
|
||||
</template>
|
||||
<template id="resources.edit_tabs" template="" lang="" group="0" version="">
|
||||
<grid height="380">
|
||||
<columns>
|
||||
@ -187,6 +190,7 @@
|
||||
<tab id="pictures" label="Picture" statustext="Prizeing information for booking or buying"/>
|
||||
<tab id="links" label="Links" statustext="Web-Page of resource"/>
|
||||
<tab id="custom" label="Custom" statustext="Pictures or resource"/>
|
||||
<tab id="history" label="History"/>
|
||||
</tabs>
|
||||
<tabpanels>
|
||||
<template id="resources.edit_tabs.general"/>
|
||||
@ -194,6 +198,7 @@
|
||||
<template id="resources.edit_tabs.pictures"/>
|
||||
<template id="resources.edit_tabs.links"/>
|
||||
<template id="resources.edit_tabs.custom"/>
|
||||
<template id="resources.edit_tabs.history"/>
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
</row>
|
||||
@ -223,14 +228,14 @@
|
||||
</rows>
|
||||
</grid>
|
||||
</template>
|
||||
<template id="resources.edit" template="" lang="" group="0" version="1.9.001">
|
||||
<template id="resources.edit" template="" lang="" group="0" version="1.9.002">
|
||||
<grid>
|
||||
<columns>
|
||||
<column width="700"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<description id="msg" no_lang="1"/>
|
||||
<description id="msg" no_lang="1" span="all" class="message"/>
|
||||
</row>
|
||||
<row>
|
||||
<hbox>
|
||||
|
BIN
resources/templates/default/images/deleted.png
Normal file
BIN
resources/templates/default/images/deleted.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 295 B |
@ -154,6 +154,19 @@
|
||||
</vbox>
|
||||
</box>
|
||||
</row>
|
||||
<row>
|
||||
<box class="action_popup prompt" id="restore_popup">
|
||||
<vbox class="prompt">
|
||||
<description value="Un-delete" class="promptheader"/>
|
||||
<description value="Un-delete accessories of selected resources too?"/>
|
||||
<hbox>
|
||||
<button label="Yes - Un-delete accessories too" id="restore_accessories" onclick="nm_popup_action.id = 'restore_accessories';nm_submit_popup(this); return false;"/>
|
||||
<button label="No - Leave them" id="restore" onclick="nm_popup_action.id = 'restore'; nm_submit_popup(this); return false;"/>
|
||||
<buttononly label="Cancel" onclick="nm_hide_popup(this,'restore_popup');"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</box>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<styles>
|
||||
|
Loading…
Reference in New Issue
Block a user