* @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"); /** * Class which outputs the html page for DefaultKeywords 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_DefaultKeywords extends SeedDMS_Theme_Style { function js() { /* {{{ */ header('Content-Type: application/javascript; charset=UTF-8'); parent::jsTranslations(array('js_form_error', 'js_form_errors')); ?> function runValidation() { $("#form").validate({ rules: { name: { required: true }, }, messages: { name: "", } }); $(".formk").validate({ rules: { keywords: { required: true }, }, messages: { keywords: "", } }); $(".formn").validate({ rules: { keywords: { required: true }, }, messages: { keywords: "", } }); } $(document).ready( function() { $( "#selector" ).change(function() { $('div.ajax').trigger('update', {categoryid: $(this).val()}); }); }); params['dms']; $user = $this->params['user']; $selcategory = $this->params['selcategory']; if($selcategory && $selcategory->getId() > 0) { ?>
formSubmit(' '.getMLText('rm_default_keyword_category'),'','','danger');?>
params['dms']; $user = $this->params['user']; $category = $this->params['selcategory']; $this->showKeywordForm($category, $user); } /* }}} */ function showKeywordForm($category, $user) { /* {{{ */ if(!$category) { ?>
contentContainerStart(); $this->formField( getMLText("name"), array( 'element'=>'input', 'type'=>'text', 'name'=>'name', 'value'=>'' ) ); $this->contentContainerEnd(); $this->formSubmit(" ".getMLText('new_default_keyword_category')); ?>
getOwner(); if ((!$user->isAdmin()) && ($owner->getID() != $user->getID())) return; ?>
contentContainerStart(); $this->formField( getMLText("name"), array( 'element'=>'input', 'type'=>'text', 'name'=>'name', 'value'=>($category ? htmlspecialchars($category->getName()) : '') ) ); $this->contentContainerEnd(); $this->formSubmit(" ".getMLText('save')); ?>
contentHeading(getMLText("default_keywords")); // $this->contentContainerStart(); ?> getKeywordLists(); if (count($lists) == 0) print getMLText("no_default_keywords"); else foreach ($lists as $list) { ?>
"> ">
">

  formSubmit(' '.getMLText('new_default_keywords'),'','','primary');?>
contentContainerEnd(); } } /* }}} */ function show() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; $categories = $this->params['categories']; $selcategory = $this->params['selcategory']; $this->htmlAddHeader(''."\n", 'js'); $this->htmlAddHeader(''."\n", 'js'); $this->htmlStartPage(getMLText("admin_tools")); $this->globalNavigation(); $this->contentStart(); $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); $this->contentHeading(getMLText("global_default_keywords")); $this->rowStart(); $this->columnStart(4); ?>
getOwner(); if ($user->isAdmin() || ($owner->getID() == $user->getID())) $options[] = array($category->getID(), htmlspecialchars($category->getName()), $selcategory && $category->getID()==$selcategory->getID(), array(array('data-subtitle', $category->countKeywordLists().' '.getMLText('keywords')))); } $this->formField( null, //getMLText("selection"), array( 'element'=>'select', 'id'=>'selector', 'class'=>'chzn-select', 'options'=>$options, 'placeholder'=>getMLText('choose_category'), ) ); ?>
getId()."\"" : "") ?>>
columnEnd(); $this->columnStart(8); ?>
getId()."\"" : "") ?>>
columnEnd(); $this->rowEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ } ?>