[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 /**************************************************************************\ 3 * eGroupWare SiteMgr - Web Content Management * 4 * http://www.egroupware.org * 5 * Copyright (c) 2004 by RalfBecker@outdoor-training.de * 6 * -------------------------------------------- * 7 * This program is free software; you can redistribute it and/or modify it * 8 * under the terms of the GNU General Public License as published by the * 9 * Free Software Foundation; either version 2 of the License, or (at your * 10 * option) any later version. * 11 \**************************************************************************/ 12 13 /* $Id: edit_transform.inc.php 20295 2006-02-15 12:31:25Z $ */ 14 15 class edit_transform 16 { 17 function edit_transform() 18 { 19 if (!is_object($GLOBALS['egw']->html)) 20 { 21 $GLOBALS['egw']->html =& CreateObject('phpgwapi.html'); 22 } 23 $this->modulebo = &$GLOBALS['Common_BO']->modules; 24 $this->content_ui =& CreateObject('sitemgr.Content_UI'); 25 } 26 27 function apply_transform($title,$content,$block) 28 { 29 $class = $block->view == SITEMGR_VIEWABLE_ANONYMOUS ? 'editAnonymous' : 'edit'; 30 $frame = '<div class="'.$class.'"><div class="editIcons">'; 31 $frame .= '<span class="editIconText" title="'. 32 lang('Module: %1, Scope: %2, Contentarea: %3, Viewable: %4',$block->module_name, 33 $block->page_id ? lang('Page') : lang('Site wide'),$block->area, 34 $GLOBALS['Common_BO']->viewable[$block->view]). 35 '">'.$block->module_name."</span>\n"; 36 37 $frame .= $GLOBALS['objbo']->get_icons(array( 38 'up.button' => array(lang('Move block up (decrease sort order)').": $block->sort_order-1",'sort_order' => -1), 39 'down.button' => array(lang('Move block down (increase sort order)').": $block->sort_order+1",'sort_order' => 1), 40 'edit' => array(lang('Edit this block')), 41 'delete' => array(lang('Delete this block'),'confirm'=>lang('Do you realy want to delete this block?'),'deleteBlock' => $block->id), 42 ),array( 43 'menuaction' => 'sitemgr.Content_UI.manage', 44 'block_id' => $block->id 45 )); 46 $frame .= "</div>\n"; 47 return $frame . $content . '</div>'; 48 } 49 50 function area_transform($contentarea,$content,$page) 51 { 52 $frame = '<div class="editContentarea"><div class="editIcons">'; 53 //$frame .= $GLOBALS['egw']->html->image('sitemgr','question.button', 54 // lang('Contentarea').': '.$contentarea); 55 $frame .= '<span class="editIconText" title="'.lang('Contentarea').': '.$contentarea.'">'.$contentarea."</span>\n"; 56 57 $permittedmodules = $this->modulebo->getcascadingmodulepermissions($contentarea,$page->cat_id); 58 59 $link_data['menuaction'] = 'sitemgr.Content_UI.manage'; 60 if ($page->id || !$page->cat_id) 61 { 62 $link_data['page_id'] = intval($page->id); 63 } 64 else 65 { 66 $link_data['cat_id'] = $page->cat_id; 67 } 68 69 if ($permittedmodules) 70 { 71 $frame .= ' <select onchange="if (this.value > 0) window.open(\''.$GLOBALS['egw']->link('/index.php',$link_data).'&area='.$contentarea.'&add_block=\'+this.value,\'editwindow\',\'width=800,height=600,scrollbars=yes,resizable=yes\')">' . 72 '<option value="0">'.lang('Add block ...').'</option>'. 73 $this->content_ui->inputmoduleselect($permittedmodules) . 74 '</select>'; 75 } 76 $frame .= "</div>\n"; 77 return $frame . $content . '</div>'; 78 } 79 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |