* @copyright Copyright (C) 2002-2005 Markus Westphal, * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ /** * Include parent class */ require_once("class.Bootstrap.php"); /** * Include class to preview documents */ require_once("SeedDMS/Preview.php"); /** * Class which outputs the html page for Categories view * * @category DMS * @package SeedDMS * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann * @copyright Copyright (C) 2002-2005 Markus Westphal, * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ class SeedDMS_View_Categories extends SeedDMS_Bootstrap_Style { function js() { /* {{{ */ $selcat = $this->params['selcategory']; header('Content-Type: application/javascript'); ?> $(document).ready( function() { $( "#selector" ).change(function() { $('div.ajax').trigger('update', {categoryid: $(this).val()}); }); }); printDeleteFolderButtonJs(); $this->printDeleteDocumentButtonJs(); } /* }}} */ function info() { /* {{{ */ $dms = $this->params['dms']; $selcat = $this->params['selcategory']; $cachedir = $this->params['cachedir']; $previewwidth = $this->params['previewWidthList']; $timeout = $this->params['timeout']; if($selcat) { $this->contentHeading(getMLText("category_info")); $c = $selcat->countDocumentsByCategory(); echo "\n"; echo "\n"; echo "
".getMLText('document_count')."".($c)."
"; $documents = $selcat->getDocumentsByCategory(10); if($documents) { print ""; print "\n\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n\n\n"; $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout); foreach($documents as $doc) { echo $this->documentListRow($doc, $previewer); } print "
".getMLText("name")."".getMLText("status")."".getMLText("action")."
"; } } } /* }}} */ function actionmenu() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; $selcat = $this->params['selcategory']; if($selcat && !$selcat->isUsed()) { ?>
formField( getMLText("name"), '' ); $this->formSubmit(" ".getMLText('save')); ?>
params['selcategory']; $this->showCategoryForm($selcat); } /* }}} */ function show() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; $categories = $this->params['categories']; $selcat = $this->params['selcategory']; $this->htmlAddHeader(''."\n", 'js'); $this->htmlStartPage(getMLText("admin_tools")); $this->globalNavigation(); $this->contentStart(); $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); $this->contentHeading(getMLText("global_document_categories")); ?>
getID()."\"" : "") ?>>
getID()."\"" : "") ?>>
getID()."\"" : "") ?>>
contentEnd(); $this->htmlEndPage(); } /* }}} */ } ?>