//CHECKS user has row edition clearance
if (!$cms_user->hasAdminClearance(CLEARANCE_ADMINISTRATION_TEMPLATES)) {
    //rows
    CMS_grandFather::raiseError('User has no rights on rows editions');
    $view->setActionMessage($cms_language->getMessage(MESSAGE_ERROR_NO_RIGHTS_FOR_ROWS));
    $view->show();
}
//usefull vars
$recordsPerPage = CMS_session::getRecordsPerPage();
//
// Search Panel
//
$searchPanel = '';
// Keywords
$searchPanel .= "{\n\tfieldLabel:\t\t'{$cms_language->getJSMessage(MESSAGE_PAGE_BY_NAME_DESCRIPTION)}',\n\txtype:\t\t\t'textfield',\n\tname: \t\t\t'keyword',\n\tvalue:\t\t\t'',\n\tminLength:\t\t3,\n\tanchor:\t\t\t'-20px',\n\tvalidateOnBlur:\tfalse,\n\tlisteners:\t\t{\n\t\t'valid':{\n\t\t\tfn: \t\t\trowWindow.search, \n\t\t\toptions:\t\t{buffer:300}\n\t\t},\n\t\t'invalid':{\n\t\t\tfn: function(field, event) {\n\t\t\t\tif (!isNaN(parseInt(field.getValue()))) {\n\t\t\t\t\tfield.clearInvalid();\n\t\t\t\t\tfield.fireEvent('valid', field);\n\t\t\t\t} else if (!field.getValue()) {\n\t\t\t\t\tfield.clearInvalid();\n\t\t\t\t}\n\t\t\t}, \n\t\t\toptions:\t\t{buffer:300}\n\t\t}\n\t}\n},";
$allGroups = CMS_rowsCatalog::getAllGroups();
natcasesort($allGroups);
if ($allGroups) {
    $columns = sizeof($allGroups) < 2 ? sizeof($allGroups) : 2;
    $searchPanel .= "{\n\t\txtype: \t\t'checkboxgroup',\n\t\tfieldLabel: '{$cms_language->getJSMessage(MESSAGE_PAGE_GROUPS)}',\n\t\tcolumns: \t{$columns},\n\t\titems: [";
    foreach ($allGroups as $aGroup) {
        $searchPanel .= "{boxLabel: '{$aGroup}', inputValue:'{$aGroup}', name: 'groups[]', listeners: {'check':rowWindow.search}},";
    }
    //remove last comma from groups
    $searchPanel = io::substr($searchPanel, 0, -1);
    $searchPanel .= "\n\t\t]\n\t},";
}
$modules = CMS_modulesCatalog::getAll();
if (sizeof($modules) > 1) {
    $modulesDatas = array();
    $modulesDatas['module'] = array(array('id' => 0, 'label' => '-'));
Exemple #2
0
 /**
  * Reset all profile clearances
  *
  * @return boolean
  * @access public
  */
 function resetClearances()
 {
     //admin clearance
     $this->_adminClearance = 0;
     // Initiate Stack objects
     $this->_pageClearances = new CMS_stack();
     $this->_validationClearances = new CMS_stack();
     $this->_validationClearances->setValuesByAtom(1);
     $this->_moduleClearances = new CMS_stack();
     $this->_templateGroupsDenied = CMS_pageTemplatesCatalog::getAllGroups(true);
     $this->_rowGroupsDenied = CMS_rowsCatalog::getAllGroups(true);
     // Categories clearance only
     $this->_moduleCategoriesClearances = new CMS_moduleCategoriesClearances();
     return true;
 }