mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:42 +01:00
icon pic support
This commit is contained in:
parent
5a116ed264
commit
f8e33c8aef
@ -22,6 +22,7 @@ class bo_resources
|
||||
var $vfs_basedir = '/resources/';
|
||||
var $pictures_dir = '/resources/pictures/';
|
||||
var $thumbs_dir = '/resources/pictures/thumbs/';
|
||||
var $resource_icons = '/resources/templates/default/images/resource_icons/';
|
||||
|
||||
function bo_resources()
|
||||
{
|
||||
@ -29,10 +30,6 @@ class bo_resources
|
||||
$this->acl = CreateObject('resources.bo_acl');
|
||||
$this->cats = $this->acl->egw_cats;
|
||||
$this->vfs = CreateObject('phpgwapi.vfs');
|
||||
|
||||
// print_r($this->cats->return_single(33)); die();
|
||||
list($cat) = $this->cats->return_single(33);
|
||||
$cat['data'] = unserialize($cat['data']);
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -255,10 +252,14 @@ class bo_resources
|
||||
$picture = false /*$this->config->use_vfs*/ ? 'vfs:' : $GLOBALS['phpgw_info']['server']['webserver_url'];
|
||||
$picture .= $size ? $this->pictures_dir.$id.'.jpg' : $this->thumbs_dir.$id.'.jpg';
|
||||
break;
|
||||
case 'gen_src':
|
||||
case 'cat_src':
|
||||
list($picture) = $this->cats->return_single($this->so->get_value('cat_id',$id));
|
||||
$picture = unserialize($picture['data']);
|
||||
$picture = $GLOBALS['phpgw_info']['server']['webserver_url'].'/phpgwapi/images/'.$picture['icon'];
|
||||
break;
|
||||
case 'gen_src':
|
||||
default :
|
||||
$picture = 'generic.png';
|
||||
$picture = $GLOBALS['phpgw_info']['server']['webserver_url'].$this->resource_icons.'generic.png';
|
||||
}
|
||||
return $picture;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ class ui_resources
|
||||
*/
|
||||
function ui_resources()
|
||||
{
|
||||
// print_r($GLOBALS['phpgw']); die();
|
||||
// print_r($GLOBALS['phpgw_info']); die();
|
||||
$this->tmpl = CreateObject('etemplate.etemplate','resources.show');
|
||||
$this->bo = CreateObject('resources.bo_resources');
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
resources/templates/default/images/resource_icons/generic.xcf
Executable file
BIN
resources/templates/default/images/resource_icons/generic.xcf
Executable file
Binary file not shown.
Loading…
Reference in New Issue
Block a user