fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [11483] add custom docs


From: Sigurd Nes
Subject: [Fmsystem-commits] [11483] add custom docs
Date: Sun, 24 Nov 2013 19:54:41 +0000

Revision: 11483
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11483
Author:   sigurdne
Date:     2013-11-24 19:54:40 +0000 (Sun, 24 Nov 2013)
Log Message:
-----------
add custom docs

Modified Paths:
--------------
    trunk/manual/inc/hook_help.inc.php
    trunk/manual/inc/hook_sidebox_menu.inc.php
    trunk/manual/setup/setup.inc.php
    trunk/manual/setup/tables_update.inc.php

Added Paths:
-----------
    trunk/manual/inc/class.bodocuments.inc.php
    trunk/manual/inc/class.cat_hooks.inc.php
    trunk/manual/inc/class.menu.inc.php
    trunk/manual/inc/class.uidocuments.inc.php
    trunk/manual/js/
    trunk/manual/js/portico/
    trunk/manual/js/portico/documents.add.js
    trunk/manual/setup/default_records.inc.php
    trunk/manual/templates/base/config.tpl
    trunk/manual/templates/base/documents_add.xsl

Property Changed:
----------------
    trunk/manual/help/EN/home.php
    trunk/manual/help/EN/overview.php
    trunk/manual/inc/class.help.inc.php
    trunk/manual/inc/class.help_helper.inc.php
    trunk/manual/inc/class.uimanual.inc.php
    trunk/manual/inc/class.uisupport.inc.php
    trunk/manual/inc/hook_help.inc.php
    trunk/manual/inc/hook_sidebox_menu.inc.php
    trunk/manual/index.php
    trunk/manual/setup/setup.inc.php
    trunk/manual/setup/tables_update.inc.php
    trunk/manual/templates/base/app_data.xsl
    trunk/manual/templates/base/help.tpl
    trunk/manual/templates/base/help.xsl
    trunk/manual/templates/base/help_data.xsl
    trunk/manual/templates/base/odt2html.xsl
    trunk/manual/templates/base/odt2xhtml.xsl
    trunk/manual/templates/base/support.xsl
    trunk/manual/templates/base/sxw2xhtml.xsl


Property changes on: trunk/manual/help/EN/home.php
___________________________________________________________________
Modified: svn:keywords
   - Id
   + Revision Author Id


Property changes on: trunk/manual/help/EN/overview.php
___________________________________________________________________
Modified: svn:keywords
   - Id
   + Revision Author Id

Added: trunk/manual/inc/class.bodocuments.inc.php
===================================================================
--- trunk/manual/inc/class.bodocuments.inc.php                          (rev 0)
+++ trunk/manual/inc/class.bodocuments.inc.php  2013-11-24 19:54:40 UTC (rev 
11483)
@@ -0,0 +1,106 @@
+<?php
+       /**
+       * phpGroupWare - manual
+       *
+       * @author Sigurd Nes <address@hidden>
+       * @copyright Copyright (C) 2012 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * This file is part of phpGroupWare.
+       *
+       * phpGroupWare is free software; you can redistribute it and/or modify
+       * it under the terms of the GNU General Public License as published by
+       * the Free Software Foundation; either version 2 of the License, or
+       * (at your option) any later version.
+       *
+       * phpGroupWare is distributed in the hope that it will be useful,
+       * but WITHOUT ANY WARRANTY; without even the implied warranty of
+       * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+       * GNU General Public License for more details.
+       *
+       * You should have received a copy of the GNU General Public License
+       * along with phpGroupWare; if not, write to the Free Software
+       * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 
 USA
+       *
+       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+       * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
+       * @package property
+       * @subpackage admin
+       * @version $Id$
+       */
+
+       /**
+        * Description
+        * @package manual
+        */
+
+       class manual_bodocuments
+       {
+               var $start;
+               var $query;
+               var $filter;
+               var $sort;
+               var $order;
+               var $cat_id;
+               var $location_info = array();
+               var $appname;
+               var $allrows;
+               public $acl_location = '.documents';
+
+               var $public_functions = array
+               (
+                       'addfiles'              => true
+               );
+
+               function __construct()
+               {
+
+               }
+
+               public function addfiles()
+               {
+                       $GLOBALS['phpgw_info']['flags']['xslt_app'] = false;
+                       $GLOBALS['phpgw_info']['flags']['noframework'] = true;
+                       $GLOBALS['phpgw_info']['flags']['nofooter'] = true;
+
+                       $acl                    = & $GLOBALS['phpgw']->acl;
+                       $acl_add                = 
$acl->check($this->acl_location, PHPGW_ACL_ADD, 'manual');
+                       $acl_edit               = 
$acl->check($this->acl_location, PHPGW_ACL_EDIT, 'manual');
+                       $cat_id                 = phpgw::get_var('id', 'int');
+                       $check                  = phpgw::get_var('check', 
'bool');
+                       $fileuploader   = CreateObject('property.fileuploader');
+
+                       if(!$acl_add && !$acl_edit)
+                       {
+                               $GLOBALS['phpgw']->common->phpgw_exit();
+                       }
+
+                       if(!$cat_id)
+                       {
+                               $GLOBALS['phpgw']->common->phpgw_exit();
+                       }
+
+                       $test = false;
+
+                       if ($test)
+                       {
+                               if (!empty($_FILES))
+                               {
+                                       $tempFile = 
$_FILES['Filedata']['tmp_name'];
+                                       $targetPath = 
"{$GLOBALS['phpgw_info']['server']['temp_dir']}/";
+                                       $targetFile =  
str_replace('//','/',$targetPath) . $_FILES['Filedata']['name'];
+                                       
move_uploaded_file($tempFile,$targetFile);
+                                       echo 
str_replace($GLOBALS['phpgw_info']['server']['temp_dir'],'',$targetFile);
+                               }
+                               $GLOBALS['phpgw']->common->phpgw_exit();
+                       }
+       
+                       if($check)
+                       {
+                               $fileuploader->check($cat_id, '/manual');
+                       }
+                       else
+                       {
+                               $fileuploader->upload($cat_id, '/manual');
+                       }
+               }
+
+       }


Property changes on: trunk/manual/inc/class.bodocuments.inc.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Added: trunk/manual/inc/class.cat_hooks.inc.php
===================================================================
--- trunk/manual/inc/class.cat_hooks.inc.php                            (rev 0)
+++ trunk/manual/inc/class.cat_hooks.inc.php    2013-11-24 19:54:40 UTC (rev 
11483)
@@ -0,0 +1,170 @@
+<?php
+       /**
+       * phpGroupWare - property: a Facilities Management System.
+       *
+       * @author Sigurd Nes <address@hidden>
+       * @copyright Copyright (C) 2003,2004,2005,2006,2007 Free Software 
Foundation, Inc. http://www.fsf.org/
+       * This file is part of phpGroupWare.
+       *
+       * phpGroupWare is free software; you can redistribute it and/or modify
+       * it under the terms of the GNU General Public License as published by
+       * the Free Software Foundation; either version 2 of the License, or
+       * (at your option) any later version.
+       *
+       * phpGroupWare is distributed in the hope that it will be useful,
+       * but WITHOUT ANY WARRANTY; without even the implied warranty of
+       * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+       * GNU General Public License for more details.
+       *
+       * You should have received a copy of the GNU General Public License
+       * along with phpGroupWare; if not, write to the Free Software
+       * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 
 USA
+       *
+       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+       * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
+       * @package property
+       * @subpackage entity
+       * @version $Id$
+       */
+
+       /**
+       * hook management for categories
+       * @package property
+       */
+       class manual_cat_hooks
+       {
+               private $basedir;
+               private $fakebase;
+
+               function __construct()
+               {
+                       $fakebase = '/manual';
+                       $this->vfs     = CreateObject('phpgwapi.vfs');
+                       $this->basedir = $this->vfs->basedir;
+                       $this->fakebase = $fakebase;
+                       $this->vfs->fakebase = $this->fakebase;
+
+                       if(!$this->vfs->file_exists(array(
+                               'string' => $this->fakebase,
+                               'relatives' => array(RELATIVE_NONE)
+                       )))
+                       {
+                               if 
(!$this->create_document_dir($this->fakebase))
+                               {
+                                       throw new Exception("unable to create 
{$this->fakebase}");
+                               }
+                       }
+               }
+
+
+               /**
+                * Handle a new category being added, create location to hold 
ACL-data
+                */
+               function cat_add($data)
+               {
+                       if ( isset($data['cat_owner']) && $data['cat_owner'] != 
-1 )
+                       {
+                               return false; //nothing needed to be done, we 
only care about global cats
+                       }
+                       if($data['location_id'])
+                       {
+                               $dir = "{$this->fakebase}/{$data['cat_id']}";
+                               if (!$this->create_document_dir($dir))
+                               {
+                                       throw new Exception("unable to create 
{$this->fakebase}");
+                               }
+                       }
+               }
+
+               /**
+                * Handle a category being deleted, remove the location 
+                */
+               function cat_delete($data)
+               {
+                       if ( isset($data['cat_owner']) && $data['cat_owner'] != 
-1 )
+                       {
+                               return false; //nothing needed to be done, we 
only care about global cats
+                       }
+                       if($data['location_id'])
+                       {
+                               $dir = "{$this->fakebase}/{$data['cat_id']}";
+
+                               $this->vfs->override_acl = 1;
+                               if(!$this->vfs->rm(array(
+                                       'string' => $dir,
+                                       'relatives' => array(
+                                               RELATIVE_NONE
+                                       )
+                               )))
+                               {
+                                       $message = lang('failed to remove 
directory') . ' :'. $dir;
+                                       phpgwapi_cache::message_set($message, 
'error');
+                               }
+                               else
+                               {
+                                       $message = lang('directory deleted') . 
' :'. $dir;
+                                       phpgwapi_cache::message_set($message, 
'message');
+                               }
+                               $this->vfs->override_acl = 0;
+                       }
+               }
+
+               /**
+                * Handle a category being edited, update the location info
+                */
+               function cat_edit($data)
+               {
+                       if ( isset($data['cat_owner']) && $data['cat_owner'] != 
-1 )
+                       {
+                               return false; //nothing needed to be done, we 
only care about global cats
+                       }
+
+//_debug_array($data);die();
+                       if($data['location_id'])
+                       {
+                               $dir = "{$this->fakebase}/{$data['cat_id']}";
+                               if(!$this->vfs->file_exists(array(
+                                       'string' => $dir,
+                                       'relatives' => array(RELATIVE_NONE)
+                               )))
+                               {
+                                       if (!$this->create_document_dir($dir))
+                                       {
+                                               throw new Exception("unable to 
create {$dir}");
+                                       }
+                               }
+                       }
+               }
+
+               /**
+                * Create catalog - starting with fakebase
+                *
+                * @param string $type part of path pointing to end target
+                *
+                * @return bool true on success.
+                */
+
+               private function create_document_dir($dir)
+               {
+                       $ok = false;
+                       $this->vfs->override_acl = 1;
+                       if(!$this->vfs->mkdir(array(
+                               'string' => $dir,
+                               'relatives' => array(
+                                       RELATIVE_NONE
+                               )
+                       )))
+                       {
+                               $message = lang('failed to create directory') . 
' :'. $dir;
+                               phpgwapi_cache::message_set($message, 'error');
+                       }
+                       else
+                       {
+                               $message = lang('directory created') . ' :'. 
$dir;
+                               phpgwapi_cache::message_set($message, 
'message');
+                               $ok = true;
+                       }
+                       $this->vfs->override_acl = 0;
+                       return $ok;
+               }
+       }


Property changes on: trunk/manual/inc/class.cat_hooks.inc.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id


Property changes on: trunk/manual/inc/class.help.inc.php
___________________________________________________________________
Modified: svn:keywords
   - Id
   + Revision Author Id


Property changes on: trunk/manual/inc/class.help_helper.inc.php
___________________________________________________________________
Modified: svn:keywords
   - Id
   + Revision Author Id

Added: trunk/manual/inc/class.menu.inc.php
===================================================================
--- trunk/manual/inc/class.menu.inc.php                         (rev 0)
+++ trunk/manual/inc/class.menu.inc.php 2013-11-24 19:54:40 UTC (rev 11483)
@@ -0,0 +1,110 @@
+<?php
+       /**
+        * Admin - Menus
+        *
+        * @author Dave Hall <address@hidden>
+        * @copyright Copyright (C) 2007 - 2008 Free Software Foundation, Inc. 
http://www.fsf.org/
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+        * @package addressbook
+        * @version $Id$
+        */
+
+       /*
+          This program is free software: you can redistribute it and/or modify
+          it under the terms of the GNU General Public License as published by
+          the Free Software Foundation, either version 2 of the License, or
+          (at your option) any later version.
+
+          This program is distributed in the hope that it will be useful,
+          but WITHOUT ANY WARRANTY; without even the implied warranty of
+          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+          GNU General Public License for more details.
+
+          You should have received a copy of the GNU General Public License
+          along with this program.  If not, see <http://www.gnu.org/licenses/>.
+        */
+
+
+       /**
+        * Menus
+        *
+        * @package admin
+        */
+       class manual_menu
+       {
+               /**
+                * Get the menus for admin
+                *
+                * @return array available menus for the current user
+                */
+               function get_menu()
+               {
+                       $menus = array();
+
+                       $menus['navbar'] = array
+                       (
+                               'manual'        => array
+                               (
+                                       'text'  => 
$GLOBALS['phpgw']->translation->translate('documents', array(), true),
+                                       'url'   => 
$GLOBALS['phpgw']->link('/index.php', 
+                                                               array
+                                                               (
+                                                                       
'menuaction'            => 'manual.uidocuments.index'
+                                                               )
+                                                       ),
+                                       'image' => array('hrm', 'navbar'),
+                                       'order' => -5,
+                                       'group' => 'systools'
+                               )
+                       );
+
+                       $menus['admin'] = array();
+
+                       if ( $GLOBALS['phpgw']->acl->check('run', 
phpgwapi_acl::READ, 'admin'))
+                       {
+                               $menus['admin'] = array
+                               (
+                                       'index' => array
+                                       (
+                                               'text'  => 
$GLOBALS['phpgw']->translation->translate('Categories', array(), true),
+                                               'url'   => 
$GLOBALS['phpgw']->link('/index.php', 
+                                                               array
+                                                               (
+                                                                       
'menuaction'            => 'admin.uicategories.index',
+                                                                       
'appname'                       => 'manual',
+                                                                       
'location'                      => '.documents',
+                                                                       
'global_cats'           => 'true',
+                                                                       
'menu_selection'        => 'admin::manual::index'
+                                                               )
+                                                       )
+                                       ),
+                                       'acl'   => array
+                                       (
+                                               'text'  => lang('Configure 
Access Permissions'),
+                                               'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'preferences.uiadmin_acl.list_acl', 'acl_app' => 'manual') )
+                                       )
+                               );
+                       }
+
+
+                       $menus['navigation'] =  array
+                       (
+                               'add' => array
+                               (
+                                       'text'  => lang('add'),
+                                       'url'   => 
$GLOBALS['phpgw']->link('/index.php', array( 'menuaction' => 
'manual.uidocuments.add' )),
+                                       'image' => array('property', 
'location_1'),
+                               ),
+                       );
+
+                       if ( 
isset($GLOBALS['phpgw_info']['user']['apps']['preferences']) )
+                       {
+                               $menus['preferences'] = array();
+                       }
+
+                       $menus['toolbar'] = array();
+
+
+                       return $menus;
+               }
+       }


Property changes on: trunk/manual/inc/class.menu.inc.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Added: trunk/manual/inc/class.uidocuments.inc.php
===================================================================
--- trunk/manual/inc/class.uidocuments.inc.php                          (rev 0)
+++ trunk/manual/inc/class.uidocuments.inc.php  2013-11-24 19:54:40 UTC (rev 
11483)
@@ -0,0 +1,661 @@
+<?php
+
+       /**
+        * phpGroupWare - property: a part of a Facilities Management System.
+        *
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 2012 Free Software Foundation, Inc. 
http://www.fsf.org/
+        * This file is part of phpGroupWare.
+        *
+        * phpGroupWare is free software; you can redistribute it and/or modify
+        * it under the terms of the GNU General Public License as published by
+        * the Free Software Foundation; either version 2 of the License, or
+        * (at your option) any later version.
+        *
+        * phpGroupWare is distributed in the hope that it will be useful,
+        * but WITHOUT ANY WARRANTY; without even the implied warranty of
+        * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+        * GNU General Public License for more details.
+        *
+        * You should have received a copy of the GNU General Public License
+        * along with phpGroupWare; if not, write to the Free Software
+        * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  
02110-1301  USA
+        *
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/
+        * @package property
+        * @subpackage logistic
+        * @version $Id$
+        */
+       phpgw::import_class('phpgwapi.uicommon');
+       phpgw::import_class('phpgwapi.jquery');
+
+       class manual_uidocuments extends phpgwapi_uicommon
+       {
+
+               private $bo;
+               private $receipt = array();
+               public $public_functions = array
+               (
+                       'query'                                         => true,
+                       'index'                                         => true,
+                       'view'                                          => true,
+                       'add'                                           => true,
+                       'edit'                                          => true,
+                       'save'                                          => true,
+                       'delete'                                        => true,
+                       'delete_imported_records'       => true,
+                       'get_vendors'                           => true,
+                       'get_users'                                     => true,
+                       'edit_survey_title'                     => true,
+                       'get_files'                                     => true,
+                       'get_request'                           => true,
+                       'get_summation'                         => true,
+                       'view_file'                                     => true,
+                       'import'                                        => true,
+                       'download'                                      => true
+               );
+
+               public function __construct()
+               {
+                       parent::__construct();
+
+                       $this->bo                                       = 
CreateObject('property.bocondition_survey');
+                       $this->bocommon                         = & 
$this->bo->bocommon;
+                       $this->acl                                      = & 
$GLOBALS['phpgw']->acl;
+                       $this->acl_location                     = '.documents';
+                       $this->acl_read                         = 
$this->acl->check($this->acl_location, PHPGW_ACL_READ, 'manual');
+                       $this->acl_add                          = 
$this->acl->check($this->acl_location, PHPGW_ACL_ADD, 'manual');
+                       $this->acl_edit                         = 
$this->acl->check($this->acl_location, PHPGW_ACL_EDIT, 'manual');
+                       $this->acl_delete                       = 
$this->acl->check($this->acl_location, PHPGW_ACL_DELETE, 'manual');
+                       $this->acl_manage                       = 
$this->acl->check($this->acl_location, 16, 'manual');
+
+                       $GLOBALS['phpgw_info']['flags']['menu_selection'] = 
"manual";
+               }
+
+
+               public function download()
+               {
+                       if(!$this->acl_read)
+                       {
+                               $this->bocommon->no_access();
+                               return;
+                       }
+
+                       $values = $this->query();
+
+                       $descr = array();
+                       $columns = array();
+                       $columns[]      = 'id';
+                       $columns[]      = 'title';
+                       $columns[]      = 'descr';
+                       $columns[]      = 'address';
+                       $columns[]      = 'cnt';
+
+                       foreach($columns as $_column)
+                       {
+                               $descr[] = lang(str_replace('_', ' ', 
$_column));
+                       }
+
+                       $this->bocommon->download($values,$columns,$descr);
+
+               }
+
+
+               public function index()
+               {
+                       if(!$this->acl_read)
+                       {
+                               $this->bocommon->no_access();
+                               return;
+                       }
+
+                       if (phpgw::get_var('phpgw_return_as') == 'json')
+                       {
+                               return $this->query();
+                       }
+
+                       self::add_javascript('phpgwapi', 'yahoo', 
'datatable.js');
+                       phpgwapi_yui::load_widget('datatable');
+                       phpgwapi_yui::load_widget('paginator');
+
+                       $categories = $this->_get_categories();
+
+
+                       $data = array(
+                               'datatable_name'        => lang('condition 
survey'),
+                               'form' => array(
+                                       'toolbar' => array(
+                                               'item' => array(
+                                                       array('type' => 
'filter',
+                                                               'name' => 
'cat_id',
+                                                               'text' => 
lang('category') . ':',
+                                                               'list' => 
$categories,
+                                                       ),
+                                                       array('type' => 'text',
+                                                               'text' => 
lang('search'),
+                                                               'name' => 
'query'
+                                                       ),
+                                                       array(
+                                                               'type' => 
'submit',
+                                                               'name' => 
'search',
+                                                               'value' => 
lang('Search')
+                                                       ),
+                                                       array(
+                                                               'type' => 
'link',
+                                                               'value' => 
lang('new'),
+                                                               'href' => 
self::link(array('menuaction' => 'property.uicondition_survey.add')),
+                                                               'class' => 
'new_item'
+                                                       ),
+                                                       array(
+                                                               'type' => 
'link',
+                                                               'value' => 
lang('download'),
+                                                               'href' => 
'javascript:window.open("'. self::link(array('menuaction' => 
'property.uicondition_survey.download', 'export' => true, 'allrows' => true)) . 
'","window")',
+                                                               'class' => 
'new_item'
+                                                       ),
+                                                       array(
+                                                               'type' => 
'link',
+                                                               'value' => 
$_SESSION['allrows'] ? lang('Show only active') : lang('Show all'),
+                                                               'href' => 
self::link(array('menuaction' => 'property.uicondition_survey.index', 'allrows' 
=> true))
+                                                       ),
+
+                                               ),
+                                       ),
+                               ),
+                               'datatable' => array(
+                                       'source' => 
self::link(array('menuaction' => 'property.uicondition_survey.index', 
'phpgw_return_as' => 'json')),
+                                       'editor_action' => 
'property.uicondition_survey.edit_survey_title',
+                                       'field' => array(
+                                               array(
+                                                       'key' => 'id',
+                                                       'label' => lang('ID'),
+                                                       'sortable' => true,
+                                                       'formatter' => 
'YAHOO.portico.formatLink'
+                                               ),
+               /*                              array(
+                                                       'key' => 'title',
+                                                       'label' => 
lang('title'),
+                                                       'sortable' => true,
+                                                       'editor' => 'new 
YAHOO.widget.TextboxCellEditor({disableBtns:false})'
+                                               ),
+                                               array(
+                                                       'key' => 'descr',
+                                                       'label' => 
lang('description'),
+                                                       'sortable' => false,
+                                               ),*/
+                                               array(
+                                                       'key' => 'address',
+                                                       'label' => 
lang('buildingname'),
+                                                       'sortable' => true
+                                               ),
+                                               array(
+                                                       'key' => 'vendor',
+                                                       'label' => 
lang('vendor'),
+                                                       'sortable' => true
+                                               ),
+                                               array(
+                                                       'key' => 'year',
+                                                       'label' => lang('year'),
+                                                       'sortable' => true,
+                                               ),
+                                               array(
+                                                       'key' => 'multiplier',
+                                                       'label' => 
lang('multiplier'),
+                                                       'sortable' => false,
+                                               ),
+                                               array(
+                                                       'key' => 'cnt',
+                                                       'label' => 
lang('count'),
+                                                       'sortable' => false,
+                                               ),
+                                               array(
+                                                       'key' => 'link',
+                                                       'hidden' => true
+                                               )
+                                       )
+                               ),
+                       );
+
+                       $parameters = array
+                               (
+                                       'parameter' => array
+                                       (
+                                               array
+                                               (
+                                                       'name'          => 'id',
+                                                       'source'        => 'id'
+                                               ),
+                                       )
+                               );
+
+                       $data['datatable']['actions'][] = array
+                                       (
+                                               'my_name'               => 
'view_survey',
+                                               'text'                  => 
lang('view'),
+                                               'action'                => 
$GLOBALS['phpgw']->link('/index.php',array
+                                               (
+                                                       'menuaction'    => 
'property.uicondition_survey.view'
+                                               )),
+                                               'parameters'    => 
json_encode($parameters)
+                                       );
+
+                       $data['datatable']['actions'][] = array
+                                       (
+                                               'my_name'               => 
'edit_survey',
+                                               'text'                  => 
lang('edit'),
+                                               'action'                => 
$GLOBALS['phpgw']->link('/index.php',array
+                                               (
+                                                       'menuaction'    => 
'property.uicondition_survey.edit'
+                                               )),
+                                               'parameters'    => 
json_encode($parameters)
+                                       );
+
+                       $data['datatable']['actions'][] = array
+                                       (
+                                               'my_name'               => 
'import_survey',
+                                               'text'                  => 
lang('import'),
+                                               'action'                => 
$GLOBALS['phpgw']->link('/index.php',array
+                                               (
+                                                       'menuaction'    => 
'property.uicondition_survey.import'
+                                               )),
+                                               'parameters'    => 
json_encode($parameters)
+                                       );
+
+
+                       if($GLOBALS['phpgw']->acl->check('.admin', 
PHPGW_ACL_DELETE, 'property'))
+                       {
+                               $data['datatable']['actions'][] = array
+                                       (
+                                               'my_name'               => 
'delete_imported_records',
+                                               'text'                  => 
lang('delete imported records'),
+                                               'confirm_msg'   => lang('do you 
really want to delete this entry') . '?',
+                                               'action'                => 
$GLOBALS['phpgw']->link('/index.php',array
+                                               (
+                                                       'menuaction'    => 
'property.uicondition_survey.delete_imported_records'
+                                               )),
+                                               'parameters'    => 
json_encode($parameters)
+                                       );
+                       }
+
+                       if($GLOBALS['phpgw']->acl->check('.admin', 
PHPGW_ACL_DELETE, 'property'))
+                       {
+                               $data['datatable']['actions'][] = array
+                                       (
+                                               'my_name'               => 
'delete_survey',
+                                               'text'                  => 
lang('delete'),
+                                               'confirm_msg'   => lang('do you 
really want to delete this entry') . '?',
+                                               'action'                => 
$GLOBALS['phpgw']->link('/index.php',array
+                                               (
+                                                       'menuaction'    => 
'property.uicondition_survey.delete'
+                                               )),
+                                               'parameters'    => 
json_encode($parameters)
+                                       );
+                       }
+
+                       self::render_template_xsl('datatable_common', $data);
+               }
+
+
+               public function query()
+               {
+                       $params = array(
+                               'start' => phpgw::get_var('startIndex', 'int', 
'REQUEST', 0),
+                               'results' => phpgw::get_var('results', 'int', 
'REQUEST', 0),
+                               'query' => phpgw::get_var('query'),
+                               'sort' => phpgw::get_var('sort'),
+                               'dir' => phpgw::get_var('dir'),
+                               'cat_id' => phpgw::get_var('cat_id', 'int', 
'REQUEST', 0),
+                               'allrows' => phpgw::get_var('allrows', 'bool')
+                       );
+
+                       $result_objects = array();
+                       $result_count = 0;
+
+                       $values = $this->bo->read($params);
+                       if ( phpgw::get_var('export', 'bool'))
+                       {
+                               return $values;
+                       }
+
+                       $result_data = array('results' => $values);
+
+                       $result_data['total_records'] = 
$this->bo->total_records;
+                       $result_data['start'] = $params['start'];
+                       $result_data['sort'] = $params['sort'];
+                       $result_data['dir'] = $params['dir'];
+
+                       array_walk(     $result_data['results'], array($this, 
'_add_links'), "property.uicondition_survey.view" );
+
+                       return $this->yui_results($result_data);
+               }
+
+
+               public function view()
+               {
+                       if(!$this->acl_read)
+                       {
+                               $this->bocommon->no_access();
+                               return;
+                       }
+                       $this->edit(null, $mode = 'view');
+               }
+
+               public function add()
+               {
+                       $GLOBALS['phpgw_info']['flags']['menu_selection'] = 
"manual::add";
+                       $this->edit();
+               }
+
+               /**
+               * Prepare data for view and edit - depending on mode
+               *
+               * @param int    $cat_id  type of documents
+               * @param string $mode    edit or view
+               *
+               * @return void
+               */
+
+               public function edit($cat_id = 0, $mode = 'edit')
+               {
+                       if(!$cat_id)
+                       {
+                               $cat_id = phpgw::get_var('cat_id', 'int');
+                       }
+
+                       if(!$this->acl_add && !$this->acl_edit)
+                       {
+                               
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=> 
'manual.uidocuments.view', 'cat_id'=> $cat_id));
+                       }
+
+                       if($mode == 'view')
+                       {
+                               if( !$this->acl_read)
+                               {
+                                       $this->bocommon->no_access();
+                                       return;
+                               }
+                       }
+                       else
+                       {
+                               if(!$this->acl_add && !$this->acl_edit)
+                               {
+                                       $this->bocommon->no_access();
+                                       return;
+                               }
+                       }
+
+
+                       $categories = $this->_get_categories($cat_id);
+
+
+                       $msgbox_data = 
$this->bocommon->msgbox_data($this->receipt);
+
+                       $file_def = array
+                       (
+                               array('key' => 
'file_name','label'=>lang('Filename'),'sortable'=>false,'resizeable'=>true),
+                               array('key' => 
'delete_file','label'=>lang('Delete 
file'),'sortable'=>false,'resizeable'=>true),
+                       );
+
+
+                       $datatable_def = array();
+                       $datatable_def[] = array
+                       (
+                               'container'             => 
'datatable-container_0',
+                               'requestUrl'    => 
json_encode(self::link(array('menuaction' => 'manual.uidocuments.get_files', 
'cat_id' => $cat_id,'phpgw_return_as'=>'json'))),
+                               'ColumnDefs'    => $file_def,
+
+                       );
+
+                       $data = array
+                       (
+                               'datatable_def'                                 
=> $datatable_def,
+                               'msgbox_data'                                   
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
+                               'categories'                                    
=> array('options' => $categories),
+                               'editable'                                      
        => $mode == 'edit',
+                               'multiple_uploader'                             
=> $mode == 'edit' ? true : '',
+                       );
+
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('property') . '::' . lang('condition survey');
+
+                       if($mode == 'edit')
+                       {
+                               phpgwapi_jquery::load_widget('core');
+                               self::add_javascript('phpgwapi', 'yui3', 
'yui/yui-min.js');
+                               self::add_javascript('phpgwapi', 'yui3', 
'gallery-formvalidator/gallery-formvalidator-min.js');
+                               
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yui3/gallery-formvalidator/validatorCss.css');
+                       }
+
+                       self::add_javascript('manual', 'portico', 
'documents.add.js');
+
+                       self::add_javascript('phpgwapi', 'tinybox2', 
'packed.js');
+                       
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/tinybox2/style.css');
+
+//                     $GLOBALS['phpgw_info']['server']['no_jscombine'] = true;
+
+                       self::render_template_xsl(array('documents_add'), 
$data);
+               }
+
+
+               /**
+               * Saves an entry to the database for new/edit - redirects to 
view
+               *
+               * @param int  $id  entity id - no id means 'new'
+               *
+               * @return void
+               */
+
+               public function save()
+               {
+                       $cat_id = phpgw::get_var('cat_id', 'int');
+
+                       if( !$cat_id )
+                       {
+                               $this->edit();
+                       }
+                       else
+                       {
+                               try
+                               {
+                                       $this->_handle_files($cat_id);
+                               }
+
+                               catch(Exception $e)
+                               {
+                                       if ( $e )
+                                       {
+                                               
phpgwapi_cache::message_set($e->getMessage(), 'error'); 
+                                               $this->edit( $values );
+                                               return;
+                                       }
+                               }
+
+                               phpgwapi_cache::message_set('ok!', 'message'); 
+                               $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'manual.uidocuments.edit', 'cat_id' => $cat_id));
+                       }
+               }
+
+               /**
+               * Fetch a list of files to be displayed in view/edit
+               *
+               * @param int  $id  entity id
+               *
+               * @return array $ResultSet json resultset
+               */
+
+               public function get_files()
+               {
+                       $cat_id         = phpgw::get_var('cat_id', 'int', 
'REQUEST');
+
+                       if( !$this->acl_read)
+                       {
+                               return;
+                       }
+
+                       $link_file_data = array
+                       (
+                               'menuaction'    => 
'manual.uidocuments.view_file',
+                               'cat_id'                => $cat_id
+                       );
+
+
+                       $link_view_file = self::link($link_file_data);
+
+                       $vfs = CreateObject('phpgwapi.vfs');
+                       $vfs->override_acl = 1;
+
+                       $files = $vfs->ls(array(
+                               'string' => "/manual/{$cat_id}",
+                               'relatives' => array(RELATIVE_NONE)));
+
+                       $vfs->override_acl = 0;
+
+
+//------ Start pagination
+
+                       $start = phpgw::get_var('startIndex', 'int', 'REQUEST', 
0);
+                       $total_records = count($files);
+
+                       $num_rows = 
isset($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']) && 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] ? (int) 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] : 15;
+
+                       if($allrows)
+                       {
+                               $out = $files;
+                       }
+                       else
+                       {
+                       //      $page = ceil( ( $start / $total_records ) * 
($total_records/ $num_rows) );
+                               $page = ceil( ( $start / $num_rows) );
+                               $files_part = array_chunk($files, $num_rows);
+                               $out = $files_part[$page];
+                       }
+
+//------ End pagination
+
+
+                       $lang_view = lang('click to view file');
+                       $lang_delete = lang('click to delete file');
+
+                       $values = array();
+                       foreach($out as $_entry )
+                       {
+                               $values[] = array
+                               (
+                                       'file_name' => "<a 
href='{$link_view_file}&amp;file_name={$_entry['name']}' target='_blank' 
title='{$lang_view}'>{$_entry['name']}</a>",
+                                       'delete_file' => "<input 
type='checkbox' name='file_action[]' value='{$_entry['name']}' 
title='$lang_delete'>",
+                               );
+                       }
+
+                       $data = array(
+                                'ResultSet' => array(
+                                       'totalResultsAvailable' => 
$total_records,
+                                       'startIndex' => $start,
+                                       'sortKey' => 'type', 
+                                       'sortDir' => "ASC", 
+                                       'Result' => $values,
+                                       'pageSize' => $num_rows,
+                                       'activePage' => floor($start / 
$num_rows) + 1
+                               )
+                       );
+                       return $data;
+
+               }
+
+
+
+               /**
+               * Dowloads a single file to the browser
+               *
+               * @param int  $id  entity id
+               *
+               * @return file
+               */
+
+               function view_file()
+               {
+                       if(!$this->acl_read)
+                       {
+                               return lang('no access');
+                       }
+
+                       $bofiles        = CreateObject('property.bofiles', 
'/manual');
+
+                       $cat_id         = phpgw::get_var('cat_id', 'int', 
'REQUEST');
+                       $file_name      = 
html_entity_decode(urldecode(phpgw::get_var('file_name')));
+                       $file           = 
"{$bofiles->fakebase}/{$cat_id}/{$file_name}";
+
+                       $bofiles->view_file('',$file);
+               }
+
+
+               /**
+               * Store and / or delete files related to an entity
+               *
+               * @param int  $cat_id  entity id
+               *
+               * @return void
+               */
+               private function _handle_files($cat_id)
+               {
+                       $cat_id = (int)$cat_id;
+                       if(!$cat_id)
+                       {
+                               throw new 
Exception('uidocuments::_handle_files() - missing cat_id');
+                       }
+                       $bofiles        = CreateObject('property.bofiles', 
'/manual');
+
+                       if(isset($_POST['file_action']) && 
is_array($_POST['file_action']))
+                       {
+                               $bofiles->delete_file("/{$cat_id}/", 
array('file_action' => $_POST['file_action']));
+                       }
+                       $file_name=str_replace(' ','_',$_FILES['file']['name']);
+
+                       if($file_name)
+                       {
+                               if(!is_file($_FILES['file']['tmp_name']))
+                               {
+                                       
phpgwapi_cache::message_set(lang('Failed to upload file !'), 'error');
+                                       return;
+                               }
+
+                               $to_file = 
"{$bofiles->fakebase}/{$cat_id}/{$file_name}";
+                               if($bofiles->vfs->file_exists(array(
+                                       'string' => $to_file,
+                                       'relatives' => Array(RELATIVE_NONE)
+                               )))
+                               {
+                                       phpgwapi_cache::message_set(lang('This 
file already exists !'), 'error'); 
+                               }
+                               else
+                               {
+               //                      $bofiles->create_document_dir($cat_id);
+                                       $bofiles->vfs->override_acl = 1;
+
+                                       if(!$bofiles->vfs->cp (array (
+                                               'from'  => 
$_FILES['file']['tmp_name'],
+                                               'to'    => $to_file,
+                                               'relatives'     => array 
(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL))))
+                                       {
+                                               
phpgwapi_cache::message_set(lang('Failed to upload file !'), 'error'); 
+                                       }
+                                       $bofiles->vfs->override_acl = 0;
+                               }
+                       }
+               }
+
+
+               private function _get_categories($selected = 0)
+               {
+                       $cats   = CreateObject('phpgwapi.categories', -1, 
'manual', $this->acl_location);
+                       $cats->supress_info     = true;
+                       $categories = 
$cats->formatted_xslt_list(array('format'=>'filter','selected' => 
$selected,'globals' => true,'use_acl' => $this->_category_acl));
+                       $default_value = array ('cat_id'=>'','name'=> lang('no 
category'));
+                       array_unshift ($categories['cat_list'],$default_value);
+
+                       foreach ($categories['cat_list'] as & $_category)
+                       {
+                               $_category['id'] = $_category['cat_id'];
+                       }
+
+                       return $categories['cat_list'];
+               }
+       }


Property changes on: trunk/manual/inc/class.uidocuments.inc.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id


Property changes on: trunk/manual/inc/class.uimanual.inc.php
___________________________________________________________________
Modified: svn:keywords
   - Id
   + Revision Author Id


Property changes on: trunk/manual/inc/class.uisupport.inc.php
___________________________________________________________________
Modified: svn:keywords
   - Id Revision
   + Revision Author Id

Modified: trunk/manual/inc/hook_help.inc.php
===================================================================
--- trunk/manual/inc/hook_help.inc.php  2013-11-21 20:18:35 UTC (rev 11482)
+++ trunk/manual/inc/hook_help.inc.php  2013-11-24 19:54:40 UTC (rev 11483)
@@ -33,4 +33,3 @@
        );
 
        $GLOBALS['phpgw']->help->draw();
-?>


Property changes on: trunk/manual/inc/hook_help.inc.php
___________________________________________________________________
Modified: svn:keywords
   - Id
   + Revision Author Id

Modified: trunk/manual/inc/hook_sidebox_menu.inc.php
===================================================================
--- trunk/manual/inc/hook_sidebox_menu.inc.php  2013-11-21 20:18:35 UTC (rev 
11482)
+++ trunk/manual/inc/hook_sidebox_menu.inc.php  2013-11-24 19:54:40 UTC (rev 
11483)
@@ -8,4 +8,3 @@
                        
display_sidebox($appname,$values['title'],$values['listbox'],$use_lang = false);
                }
        }
-?>


Property changes on: trunk/manual/inc/hook_sidebox_menu.inc.php
___________________________________________________________________
Modified: svn:keywords
   - Id
   + Revision Author Id


Property changes on: trunk/manual/index.php
___________________________________________________________________
Modified: svn:keywords
   - Id
   + Revision Author Id

Added: trunk/manual/js/portico/documents.add.js
===================================================================
--- trunk/manual/js/portico/documents.add.js                            (rev 0)
+++ trunk/manual/js/portico/documents.add.js    2013-11-24 19:54:40 UTC (rev 
11483)
@@ -0,0 +1,84 @@
+var cat_id = 0;
+var fileuploader_action;
+
+var arURLParts = strBaseURL.split('?');
+var comboBase = arURLParts[0] + 'phpgwapi/inc/yui-combo-master/combo.php?';
+
+YUI_config = {
+    //Don't combine the files
+    combine: true,
+    //Ignore things that are already loaded (in this process)
+    ignoreRegistered: false,
+    //Set the base path
+       comboBase: comboBase,
+    base: '',
+    //And the root
+    root: '',
+    //Require your deps
+    require: [ ]
+};
+
+
+YUI({
+}).use(
+       'gallery-formvalidator', 
+               function(Y) {   
+                Y.on("domready", function () {
+                   var form = new Y.Validator(
+                        {
+                            form:'form',
+                                                       checkOnSubmit:false,
+                            defaultIncorrectIndicatorCss:'validator',
+                            defaultCorrectIndicatorCss:'indicator',
+                            createCorrectIndicator:true,
+                            createIncorrectIndicator:true
+                        }
+                    );
+
+                });
+
+});
+
+       this.update_fileuploader_action = function()
+       {
+          cat_id = document.getElementById("cat_id").value;
+          fileuploader_action = {
+                       menuaction:'property.fileuploader.add',
+                       upload_target:'manual.bodocuments.addfiles',
+                       id: cat_id
+               };
+       //      console.log(fileuploader_action);
+               refresh_files();
+       }
+
+       this.fileuploader = function()
+       {
+               if(!fileuploader_action)
+               {
+                  cat_id = document.getElementById("cat_id").value;
+                  fileuploader_action = {
+                               menuaction:'property.fileuploader.add',
+                               upload_target:'manual.bodocuments.addfiles',
+                               id: cat_id
+                       };
+               }
+
+               var requestUrl = phpGWLink('index.php', fileuploader_action);
+               TINY.box.show({iframe:requestUrl, 
boxid:'frameless',width:750,height:450,fixed:false,maskid:'darkmask',maskopacity:40,
 mask:true, animate:true, close: true,closejs:function(){refresh_files()}});
+       }
+
+
+       function refresh_files()
+       {
+               var oArgs = {menuaction:'manual.uidocuments.get_files', 
cat_id:cat_id};
+               var strURL = phpGWLink('index.php', oArgs, true);
+               YAHOO.portico.updateinlineTableHelper('datatable-container_0', 
strURL);
+       }
+       
+       function lightbox_hide()
+       {
+               TINY.box.hide();
+               return true;
+       }
+
+


Property changes on: trunk/manual/js/portico/documents.add.js
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Added: trunk/manual/setup/default_records.inc.php
===================================================================
--- trunk/manual/setup/default_records.inc.php                          (rev 0)
+++ trunk/manual/setup/default_records.inc.php  2013-11-24 19:54:40 UTC (rev 
11483)
@@ -0,0 +1,11 @@
+<?php
+// clean up from previous install
+
+$GLOBALS['phpgw_setup']->oProc->query("SELECT app_id FROM phpgw_applications 
WHERE app_name = 'manual'");
+$GLOBALS['phpgw_setup']->oProc->next_record();
+$app_id = $GLOBALS['phpgw_setup']->oProc->f('app_id');
+
+$GLOBALS['phpgw_setup']->oProc->query("DELETE FROM phpgw_locations WHERE 
app_id = {$app_id} AND name != 'run'");
+
+
+$GLOBALS['phpgw']->locations->add('.documents', 'Documents', 'manual');


Property changes on: trunk/manual/setup/default_records.inc.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Modified: trunk/manual/setup/setup.inc.php
===================================================================
--- trunk/manual/setup/setup.inc.php    2013-11-21 20:18:35 UTC (rev 11482)
+++ trunk/manual/setup/setup.inc.php    2013-11-24 19:54:40 UTC (rev 11483)
@@ -2,7 +2,7 @@
        /**
        * Manual - User manual
        *
-       * @copyright Copyright (C) 2000-2002,2005 Free Software Foundation, 
Inc. http://www.fsf.org/
+       * @copyright Copyright (C) 2000-2002,2005,2013 Free Software 
Foundation, Inc. http://www.fsf.org/
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package manual
        * @subpackage setup
@@ -11,14 +11,21 @@
 
        // Basic information about this app
        $setup_info['manual']['name']      = 'manual';
-       $setup_info['manual']['version']   = '0.9.17.500';
+       $setup_info['manual']['version']   = '0.9.17.501';
        $setup_info['manual']['app_order'] = 5;
        $setup_info['manual']['enable']    = 1;
        $setup_info['manual']['app_group']      = 'accessories';
 
        // The hooks this app includes, needed for hooks registration
-       $setup_info['manual']['hooks'][] = 'help';
-       $setup_info['manual']['hooks'][] = 'sidebox_menu';
+       $setup_info['manual']['hooks'] = array
+       (
+               'help',
+               'sidebox_menu',
+               'menu'                  => 'manual.menu.get_menu',
+               'cat_add'               => 'manual.cat_hooks.cat_add',
+               'cat_edit'              => 'manual.cat_hooks.cat_edit',
+               'cat_delete'    => 'manual.cat_hooks.cat_delete'
+       );
 
        // Dependencies for this app to work
        $setup_info['manual']['depends'][] = array
@@ -26,4 +33,3 @@
                 'appname' => 'phpgwapi',
                 'versions' => Array('0.9.17', '0.9.18')
        );
-?>


Property changes on: trunk/manual/setup/setup.inc.php
___________________________________________________________________
Modified: svn:keywords
   - Id
   + Revision Author Id

Modified: trunk/manual/setup/tables_update.inc.php
===================================================================
--- trunk/manual/setup/tables_update.inc.php    2013-11-21 20:18:35 UTC (rev 
11482)
+++ trunk/manual/setup/tables_update.inc.php    2013-11-24 19:54:40 UTC (rev 
11483)
@@ -19,3 +19,12 @@
                return $GLOBALS['setup_info']['manual']['currentver'] = 
'0.9.17.500';
        }
 
+       $test[] = '0.9.17.500';
+       function manual_upgrade0_9_17_500()
+       {
+
+               $GLOBALS['phpgw']->locations->add('.documents', 'Documents', 
'manual');
+
+               return $GLOBALS['setup_info']['manual']['currentver'] = 
'0.9.17.501';
+       }
+


Property changes on: trunk/manual/setup/tables_update.inc.php
___________________________________________________________________
Modified: svn:keywords
   - Id
   + Revision Author Id


Property changes on: trunk/manual/templates/base/app_data.xsl
___________________________________________________________________
Modified: svn:keywords
   - Id
   + Revision Author Id

Added: trunk/manual/templates/base/config.tpl
===================================================================
--- trunk/manual/templates/base/config.tpl                              (rev 0)
+++ trunk/manual/templates/base/config.tpl      2013-11-24 19:54:40 UTC (rev 
11483)
@@ -0,0 +1,40 @@
+<!-- $Id$ -->
+<!-- BEGIN header -->
+<form method="POST" action="{action_url}">
+       <table border="0" align="center" width="85%">
+               <tr class="th">
+                       <td colspan="2"><font 
color="{th_text}">&nbsp;<b>{title}</b></font></td>
+               </tr>
+               <!-- END header -->
+               <!-- BEGIN body -->
+               <tr class="row_on">
+                       <td colspan="2">&nbsp;</td>
+               </tr>
+               <tr class="row_off">
+                       <td colspan="2">&nbsp;<b>{lang_manual} 
{lang_settings}</b></td>
+               </tr>
+               <tr class="row_off">
+                       <td>{lang_Use_ACL_for_document_types}.(not 
implementet)</td>
+                       <td>
+                               <select name="newsettings[acl_at_control_area]">
+                                       <option value="2" 
{selected_acl_at_control_area_2}>NO</option>
+                                       <option value="1" 
{selected_acl_at_control_area_1}>YES</option>
+                               </select>
+                       </td>
+               </tr>
+               <!-- END body -->
+               <!-- BEGIN footer -->
+               <tr class="th">
+                       <td colspan="2">
+                               &nbsp;
+                       </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 -->


Property changes on: trunk/manual/templates/base/config.tpl
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Added: trunk/manual/templates/base/documents_add.xsl
===================================================================
--- trunk/manual/templates/base/documents_add.xsl                               
(rev 0)
+++ trunk/manual/templates/base/documents_add.xsl       2013-11-24 19:54:40 UTC 
(rev 11483)
@@ -0,0 +1,213 @@
+<!-- $Id$ -->
+
+<func:function name="phpgw:conditional">
+       <xsl:param name="test"/>
+       <xsl:param name="true"/>
+       <xsl:param name="false"/>
+
+       <func:result>
+               <xsl:choose>
+                       <xsl:when test="$test">
+                       <xsl:value-of select="$true"/>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="$false"/>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </func:result>
+</func:function>
+
+       <!-- add / edit -->
+<xsl:template match="data" xmlns:formvalidator="http://www.w3.org/TR/html4/"; 
xmlns:php="http://php.net/xsl";>
+               <xsl:call-template name="yui_phpgw_i18n"/>
+
+               <div class="yui-navset" id="survey_edit_tabview">
+
+               <h1>
+                       <xsl:value-of select="php:function('lang', 
'documents')" />
+               </h1>
+
+
+               <xsl:variable name="action_url">
+                       <xsl:value-of select="php:function('get_phpgw_link', 
'/index.php', 'menuaction:manual.uidocuments.save')" />
+               </xsl:variable>
+
+                       <form name="form" id="form" action="{$action_url}" 
method="post" ENCTYPE="multipart/form-data">
+                       <dl>
+                                       <xsl:choose>
+                                               <xsl:when test="msgbox_data != 
''">
+                                                               <dt>
+                                                                       
<xsl:call-template name="msgbox"/>
+                                                               </dt>
+                                               </xsl:when>
+                                       </xsl:choose>
+                               </dl>
+
+                               <div class="yui-content">
+                               <div id="generic" class="content-wrp">
+
+                               <dl class="proplist-col">
+
+                                       <dt>
+                                               <label 
for="category"><xsl:value-of select="php:function('lang', 'category')" 
/></label>
+                                       </dt>
+                                       <dd>
+                                               <xsl:choose>
+                                                       <xsl:when 
test="editable = 1">
+                                                               <select 
id="cat_id" name="cat_id" onChange="update_fileuploader_action();" 
+                                                                       
formvalidator:FormField="yes"
+                                                                       
formvalidator:Type="SelectField">
+                                                                       
<xsl:apply-templates select="categories/options"/>
+                                                               </select>
+                                                       </xsl:when>
+                                                       <xsl:otherwise>
+                                                               <xsl:for-each 
select="categories/options">
+                                                                       <xsl:if 
test="selected = 'selected' or selected = 1">
+                                                                               
<xsl:value-of disable-output-escaping="yes" select="name"/>
+                                                                       
</xsl:if>
+                                                               </xsl:for-each>
+                                                       </xsl:otherwise>
+                                               </xsl:choose>
+                                       </dd>
+
+                               </dl>
+                       </div>
+
+                       <div id="documents">
+                               <xsl:call-template name="datasource-definition" 
/>
+
+                               <dl class="proplist-col">
+
+                                               <dt>
+                                                       <label><xsl:value-of 
select="php:function('lang', 'files')"/></label>
+                                               </dt>
+                                               <dd>
+                                                       <div 
style="clear:both;" id="datatable-container_0"></div>
+                                               </dd>
+
+                                       <xsl:choose>
+                                               <xsl:when test="editable = 1">
+                                                       <xsl:call-template 
name="file_upload"/>
+                                               </xsl:when>
+                                       </xsl:choose>
+                               </dl>
+                       </div>
+                       </div>
+                               <dl class="proplist-col">
+                                               <div class="form-buttons">
+                                                       <xsl:variable 
name="lang_cancel"><xsl:value-of select="php:function('lang', 'cancel')" 
/></xsl:variable>
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="editable = 1">
+                                                                       
<xsl:variable name="lang_save"><xsl:value-of select="php:function('lang', 
'save')" /></xsl:variable>
+                                                                       <input 
type="submit" name="save_project" value="{$lang_save}" title = "{$lang_save}" />
+                                                                       <input 
class="button" type="button" name="cancelButton" id ='cancelButton' 
value="{$lang_cancel}" title = "{$lang_cancel}" 
onClick="document.cancel_form.submit();"/>
+                                                               </xsl:when>
+                                                               <xsl:otherwise>
+                                                                       
<xsl:variable name="lang_edit"><xsl:value-of select="php:function('lang', 
'edit')" /></xsl:variable>
+                                                                       
<xsl:variable name="lang_new_survey"><xsl:value-of select="php:function('lang', 
'new')" /></xsl:variable>
+                                                                       <input 
type="button" name="edit_survey" value="{$lang_edit}" title = "{$lang_edit}"  
onClick="document.load_edit_form.submit();"/>
+                                                                       <input 
type="button" name="new_survey" value="{$lang_new_survey}" title = 
"{$lang_new_survey}" onClick="document.new_form.submit();"/>
+                                                                       <input 
class="button" type="button" name="cancelButton" id ='cancelButton' 
value="{$lang_cancel}" title = "{$lang_cancel}" 
onClick="document.cancel_form.submit();"/>
+                                                               </xsl:otherwise>
+                                                       </xsl:choose>
+                                               </div>
+                               </dl>
+                       </form>
+               </div>
+
+               <xsl:variable name="cancel_url">
+                       <xsl:value-of select="php:function('get_phpgw_link', 
'/index.php', 'menuaction:manual.uidocuments.index')" />
+               </xsl:variable>
+
+               <form name="cancel_form" id="cancel_form" 
action="{$cancel_url}" method="post">
+               </form>
+               <xsl:variable name="new_url">
+                       <xsl:value-of select="php:function('get_phpgw_link', 
'/index.php', 'menuaction:manual.uidocuments.add')" />
+               </xsl:variable>
+               <form name="new_form" id="new_form" action="{$new_url}" 
method="post">
+               </form>
+
+               <xsl:variable name="edit_params">
+                       <xsl:text>menuaction:manual.uidocuments.edit</xsl:text>
+               </xsl:variable>
+               <xsl:variable name="edit_url">
+                               <xsl:value-of 
select="php:function('get_phpgw_link', '/index.php', $edit_params )" />
+               </xsl:variable>
+
+               <form name="load_edit_form" id="load_edit_form" 
action="{$edit_url}" method="post">
+               </form>
+
+       </xsl:template>
+
+<xsl:template name="datasource-definition">
+       <script>
+               var columnDefs = [];
+               YAHOO.util.Event.onDOMReady(function(){
+                       <xsl:for-each select="datatable_def">
+                               columnDefs = [
+                                       <xsl:for-each select="ColumnDefs">
+                                       {
+                                               resizeable: true,
+                                               key: "<xsl:value-of 
select="key"/>",
+                                               <xsl:if test="label">
+                                               label: "<xsl:value-of 
select="label"/>",
+                                               </xsl:if>
+                                               sortable: <xsl:value-of 
select="phpgw:conditional(not(sortable = 0), 'true', 'false')"/>,
+                                               <xsl:if test="hidden">
+                                               hidden: true,
+                                               </xsl:if>
+                                               <xsl:if test="formatter">
+                                               formatter: <xsl:value-of 
select="formatter"/>,
+                                               </xsl:if>
+                                               <xsl:if test="editor">
+                                               editor: <xsl:value-of 
select="editor"/>,
+                                           </xsl:if>
+                                               className: "<xsl:value-of 
select="className"/>"
+                                       }<xsl:value-of 
select="phpgw:conditional(not(position() = last()), ',', '')"/>
+                               </xsl:for-each>
+                               ];
+                       
+                       YAHOO.portico.inlineTableHelper("<xsl:value-of 
select="container"/>", <xsl:value-of select="requestUrl"/>, columnDefs);
+               </xsl:for-each>
+
+       });
+  </script>
+
+</xsl:template>
+
+
+<xsl:template match="options">
+       <option value="{id}">
+               <xsl:if test="selected = 'selected' or selected = 1">
+                       <xsl:attribute name="selected" value="selected" />
+               </xsl:if>
+               <xsl:attribute name="title" value="description" />
+               <xsl:value-of disable-output-escaping="yes" select="name"/>
+       </option>
+</xsl:template>
+
+       <xsl:template xmlns:php="http://php.net/xsl"; name="file_upload">
+               <dt>
+                       <label><xsl:value-of select="php:function('lang', 
'upload file')"/></label>
+               </dt>
+               <dd>
+                       <input type="file" name="file" size="40">
+                               <xsl:attribute name="title">
+                                       <xsl:value-of 
select="php:function('lang', 'Select file to upload')"/>
+                               </xsl:attribute>
+                       </input>
+               </dd>
+               <xsl:choose>
+                       <xsl:when test="multiple_uploader!=''">
+                               <dt>
+                                       <label><a 
href="javascript:fileuploader()">
+                                               <xsl:attribute name="title">
+                                                       <xsl:value-of 
select="php:function('lang', 'upload multiple files')"/>
+                                               </xsl:attribute>
+                                               <xsl:value-of 
select="php:function('lang', 'upload multiple files')"/>
+                                       </a></label>
+                               </dt>
+                       </xsl:when>
+               </xsl:choose>
+       </xsl:template>
+


Property changes on: trunk/manual/templates/base/documents_add.xsl
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id


Property changes on: trunk/manual/templates/base/help.tpl
___________________________________________________________________
Modified: svn:keywords
   - Id
   + Revision Author Id


Property changes on: trunk/manual/templates/base/help.xsl
___________________________________________________________________
Modified: svn:keywords
   - Id
   + Revision Author Id


Property changes on: trunk/manual/templates/base/help_data.xsl
___________________________________________________________________
Modified: svn:keywords
   - Id
   + Revision Author Id


Property changes on: trunk/manual/templates/base/odt2html.xsl
___________________________________________________________________
Modified: svn:keywords
   - Id
   + Revision Author Id


Property changes on: trunk/manual/templates/base/odt2xhtml.xsl
___________________________________________________________________
Modified: svn:keywords
   - Id
   + Revision Author Id


Property changes on: trunk/manual/templates/base/support.xsl
___________________________________________________________________
Modified: svn:keywords
   - Id Revision
   + Revision Author Id


Property changes on: trunk/manual/templates/base/sxw2xhtml.xsl
___________________________________________________________________
Modified: svn:keywords
   - Id
   + Revision Author Id




reply via email to

[Prev in Thread] Current Thread [Next in Thread]