* @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_Theme_Style { function js() { /* {{{ */ $selcat = $this->params['selcategory']; header('Content-Type: application/javascript; charset=UTF-8'); parent::jsTranslations(array('cancel', 'splash_move_document', 'confirm_move_document', 'move_document', 'confirm_transfer_link_document', 'transfer_content', 'link_document', 'splash_move_folder', 'confirm_move_folder', 'move_folder')); ?> $(document).ready( function() { $( "#selector" ).change(function() { $('div.ajax').trigger('update', {categoryid: $(this).val()}); window.history.pushState({"html":"","pageTitle":""},"", '../out/out.Categories.php?categoryid=' + $(this).val()); }); }); printDeleteFolderButtonJs(); $this->printDeleteDocumentButtonJs(); $this->printClickDocumentJs(); } /* }}} */ function info() { /* {{{ */ $dms = $this->params['dms']; $selcat = $this->params['selcategory']; $cachedir = $this->params['cachedir']; $previewwidth = $this->params['previewWidthList']; $timeout = $this->params['timeout']; $xsendfile = $this->params['xsendfile']; 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 $this->folderListHeader(); print "\n"; $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile); foreach($documents as $doc) { echo $this->documentListRow($doc, $previewer); } print ""; } } } /* }}} */ function actionmenu() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; $selcat = $this->params['selcategory']; if($selcat && !$selcat->isUsed()) { ?>
formSubmit(' '.getMLText('rm_document_category'),'','','danger');?>
contentContainerStart(); $this->formField( getMLText("name"), array( 'element'=>'input', 'type'=>'text', 'name'=>'name', 'value'=>($category ? htmlspecialchars($category->getName()) : '') ) ); $this->contentContainerEnd(); $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->htmlStartPage(getMLText("admin_tools")); $this->globalNavigation(); $this->contentStart(); $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); $this->contentHeading(getMLText("global_document_categories")); $this->rowStart(); $this->columnStart(6); ?>
getID(), htmlspecialchars($category->getName()), $selcat && $category->getID()==$selcat->getID(), array(array('data-subtitle', $category->countDocumentsByCategory().' '.getMLText('documents')))); } $this->formField( null, //getMLText("selection"), array( 'element'=>'select', 'id'=>'selector', 'class'=>'chzn-select', 'options'=>$options, 'placeholder'=>getMLText('choose_category'), ) ); ?>
getID()."\"" : "") ?>>
getID()."\"" : "") ?>>
columnEnd(); $this->columnStart(6); ?>
getID()."\"" : "") ?>>
columnEnd(); $this->rowEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ }