diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 6494d85eb..a004f88ad 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -49,6 +49,86 @@ class SeedDMS_View_Settings extends SeedDMS_Bootstrap_Style { } } /* }}} */ + /** + * Place arbitrary html in a headline + * + * @param string $text html code to be shown as headline + */ + protected function showRawConfigHeadline($text) { /* {{{ */ +?> + +showRawConfigHeadline(htmlspecialchars(getMLText($title))); + } /* }}} */ + + /** + * Show a text input configuration option + * + * @param string $title title of the option + * @param string $name name of html input field + */ + protected function showConfigText($title, $name) { /* {{{ */ + $settings = $this->params['settings']; +?> + "> + : + showTextField($name, $settings->{"_".$name}); ?> + +params['settings']; +?> + "> + : + {"_".$name}) echo "checked" ?> /> + +params['settings']; + $isass = count(array_filter(array_keys($values), 'is_string')) > 0; +// var_dump($values); +// echo $isass ? 'asso' : 'indexed'; +?> + "> + : + + + +$value) { + $optval = trim($isass ? $i : $value); + echo ''; + } +?> + + + +_configFilePath)) { - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - + --> +showConfigHeadline('settings_Display'); ?> +showConfigText('settings_siteName', 'siteName'); ?> +showConfigText('settings_footNote', 'footNote'); ?> +showConfigCheckbox('settings_printDisclaimer', 'printDisclaimer'); ?> +showConfigOption('settings_available_languages', 'availablelanguages', getAvailableLanguages(), true, true); ?> +showConfigOption('settings_language', 'language', getAvailableLanguages(), false, true); ?> +showConfigOption('settings_theme', 'theme', UI::getStyles(), false, false); ?> +showConfigText('settings_previewWidthList', 'previewWidthList'); ?> +showConfigText('settings_previewWidthMenuList', 'previewWidthMenuList'); ?> +showConfigText('settings_previewWidthDropFolderList', 'previewWidthDropFolderList'); ?> +showConfigText('settings_previewWidthDetail', 'previewWidthDetail'); ?> +showConfigCheckbox('settings_showFullPreview', 'showFullPreview'); ?> +showConfigCheckbox('settings_convertToPdf', 'convertToPdf'); ?> +showConfigText('settings_maxItemsPerPage', 'maxItemsPerPage'); ?> +showConfigText('settings_incItemsPerPage', 'incItemsPerPage'); ?> - - "> - - - +showConfigHeadline('settings_Edition'); ?> +showConfigCheckbox('settings_strictFormCheck', 'strictFormCheck'); ?> "> @@ -232,174 +228,45 @@ if(!is_writeable($settings->_configFilePath)) { - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - "> - - - "> - - +showConfigCheckbox('settings_enableConverting', 'enableConverting'); ?> +showConfigCheckbox('settings_enableEmail', 'enableEmail'); ?> +showConfigCheckbox('settings_enableUsersView', 'enableUsersView'); ?> +showConfigCheckbox('settings_enableFullSearch', 'enableFullSearch'); ?> +showConfigText('settings_maxSizeForFullText', 'maxSizeForFullText'); ?> +showConfigOption('settings_fullSearchEngine', 'fullSearchEngine', array('lucene'=>'settings_fullSearchEngine_vallucene', 'sqlitefts'=>'settings_fullSearchEngine_valsqlitefts'), false, true); ?> +showConfigOption('settings_defaultSearchMethod', 'defaultSearchMethod', array('database'=>'settings_defaultSearchMethod_valdatabase', 'fulltext'=>'settings_defaultSearchMethod_valfulltext'), false, true); ?> +showConfigCheckbox('settings_showSingleSearchHit', 'showSingleSearchHit'); ?> +showConfigText('settings_stopWordsFile', 'stopWordsFile'); ?> +showConfigCheckbox('settings_enableClipboard', 'enableClipboard'); ?> +showConfigCheckbox('settings_enableMenuTasks', 'enableMenuTasks'); ?> +showConfigCheckbox('settings_enableDropFolderList', 'enableDropFolderList'); ?> +showConfigCheckbox('settings_enableSessionList', 'enableSessionList'); ?> +showConfigCheckbox('settings_enableDropUpload', 'enableDropUpload'); ?> +showConfigCheckbox('settings_enableMultiUpload', 'enableMultiUpload'); ?> +showConfigCheckbox('settings_enableFolderTree', 'enableFolderTree'); ?> +showConfigOption('settings_expandFolderTree', 'expandFolderTree', array(' 0'=>'settings_expandFolderTree_val0', ' 1'=>'settings_expandFolderTree_val1', ' 2'=>'settings_expandFolderTree_val2'), false, true); ?> +showConfigCheckbox('settings_enableRecursiveCount', 'enableRecursiveCount'); ?> +showConfigText('settings_maxRecursiveCount', 'maxRecursiveCount'); ?> +showConfigCheckbox('settings_enableLanguageSelector', 'enableLanguageSelector'); ?> +showConfigCheckbox('settings_enableHelp', 'enableHelp'); ?> +showConfigCheckbox('settings_enableThemeSelector', 'enableThemeSelector'); ?> +showConfigOption('settings_sortUsersInList', 'sortUsersInList', array(' '=>'settings_sortUsersInList_val_login', 'fullname'=>'settings_sortUsersInList_val_fullname'), false, true); ?> +showConfigOption('settings_sortFoldersDefault', 'sortFoldersDefault', array('u'=>'settings_sortFoldersDefault_val_unsorted', 's'=>'settings_sortFoldersDefault_val_sequence', 'n'=>'settings_sortFoldersDefault_val_name'), false, true); ?> +showConfigOption('settings_defaultDocPosition', 'defaultDocPosition', array('end'=>'settings_defaultDocPosition_val_end', 'start'=>'settings_defaultDocPosition_val_start'), false, true); ?> - - "> - - - +showConfigHeadline('settings_webdav'); ?> +showConfigCheckbox('settings_enableWebdavReplaceDoc', 'enableWebdavReplaceDoc'); ?> - - "> - - - - "> - - - "> - - +showConfigHeadline('settings_Calendar'); ?> +showConfigCheckbox('settings_enableCalendar', 'enableCalendar'); ?> +showConfigOption('settings_calendarDefaultView', 'calendarDefaultView', array('w'=>'week_view', 'm'=>'month_view', 'y'=>'year_view'), false, true); ?> +showConfigOption('settings_firstDayOfWeek', 'firstDayOfWeek', array(' 0'=>'sunday', ' 1'=>'monday', ' 2'=>'tuesday', ' 3'=>'wednesday', ' 4'=>'thursday', ' 5'=>'friday', ' 6'=>'saturday'), false, true); ?>
:showTextField('siteName', $settings->_siteName); ?>
:showTextField("footNote", $settings->_footNote); ?>
:_printDisclaimer) echo "checked" ?> />
: - -
: - -
: - -
:showTextField("previewWidthList", $settings->_previewWidthList); ?>
:showTextField("previewWidthMenuList", $settings->_previewWidthMenuList); ?>
:showTextField("previewWidthDropFolderList", $settings->_previewWidthDropFolderList); ?>
:showTextField("previewWidthDetail", $settings->_previewWidthDetail); ?>
:_showFullPreview) echo "checked" ?> />
:_convertToPdf) echo "checked" ?> />
:showTextField("maxItemsPerPage", $settings->_maxItemsPerPage); ?>
:showTextField("incItemsPerPage", $settings->_incItemsPerPage); ?>
:_strictFormCheck) echo "checked" ?> />
: showTextField("viewOnlineFileTypes", $settings->getViewOnlineFileTypesToString()); ?>: showTextField("editOnlineFileTypes", $settings->getEditOnlineFileTypesToString()); ?>
:_enableConverting) echo "checked" ?> />
:_enableEmail) echo "checked" ?> />
:_enableUsersView) echo "checked" ?> />
:_enableFullSearch) echo "checked" ?> />
:showTextField("maxSizeForFullText", $settings->_maxSizeForFullText); ?>
: - -
: - -
:_showSingleSearchHit) echo "checked" ?> />
:showTextField("stopWordsFile", $settings->_stopWordsFile); ?>
:_enableClipboard) echo "checked" ?> />
:_enableMenuTasks) echo "checked" ?> />
:_enableDropFolderList) echo "checked" ?> />
:_enableSessionList) echo "checked" ?> />
:_enableDropUpload) echo "checked" ?> />
:_enableMultiUpload) echo "checked" ?> />
:_enableFolderTree) echo "checked" ?> />
: - -
:_enableRecursiveCount) echo "checked" ?> />
:showTextField("maxRecursiveCount", $settings->_maxRecursiveCount); ?>
:_enableLanguageSelector) echo "checked" ?> />
:_enableHelp) echo "checked" ?> />
:_enableThemeSelector) echo "checked" ?> />
: - -
: - -
: - -
:_enableWebdavReplaceDoc) echo "checked" ?> />
:_enableCalendar) echo "checked" ?> />
: - -
: - -
contentContainerEnd(); ?> @@ -410,175 +277,53 @@ if(!is_writeable($settings->_configFilePath)) { - - "> - : - showTextField("rootDir", $settings->_rootDir); ?> - - "> - : - showTextField("httpRoot", $settings->_httpRoot); ?> - - "> - : - showTextField("contentDir", $settings->_contentDir); ?> - - "> - : - showTextField("backupDir", $settings->_backupDir); ?> - - "> - : - showTextField("cacheDir", $settings->_cacheDir); ?> - - "> - : - showTextField("stagingDir", $settings->_stagingDir); ?> - - "> - : - showTextField("luceneDir", $settings->_luceneDir); ?> - - "> - : - showTextField("dropFolderDir", $settings->_dropFolderDir); ?> - - "> - : - showTextField("repositoryUrl", $settings->_repositoryUrl); ?> - - "> - : - _logFileEnable) echo "checked" ?> /> - - "> - : - - - - "> - : - _enableLargeFileUpload) echo "checked" ?> /> - - "> - : - showTextField("partitionSize", $settings->_partitionSize); ?> - - "> - : - showTextField("maxUploadSize", $settings->_maxUploadSize); ?> - +showConfigHeadline('settings_Server'); ?> +showConfigText('settings_rootDir', 'rootDir'); ?> +showConfigText('settings_httpRoot', 'httpRoot'); ?> +showConfigText('settings_contentDir', 'contentDir'); ?> +showConfigText('settings_backupDir', 'backupDir'); ?> +showConfigText('settings_cacheDir', 'cacheDir'); ?> +showConfigText('settings_stagingDir', 'stagingDir'); ?> +showConfigText('settings_luceneDir', 'luceneDir'); ?> +showConfigText('settings_dropFolderDir', 'dropFolderDir'); ?> +showConfigText('settings_repositoryUrl', 'repositoryUrl'); ?> +showConfigCheckbox('settings_logFileEnable', 'logFileEnable'); ?> +showConfigOption('settings_logFileRotation', 'logFileRotation', array('h'=>'hourly', 'd'=>'daily', 'm'=>'monthly'), false, true); ?> +showConfigCheckbox('settings_enableLargeFileUpload', 'enableLargeFileUpload'); ?> +showConfigText('settings_partitionSize', 'partitionSize'); ?> +showConfigText('settings_maxUploadSize', 'maxUploadSize'); ?> - - "> - : - _enableGuestLogin) echo "checked" ?> /> - - "> - : - _enableGuestAutoLogin) echo "checked" ?> /> - - "> - : - _restricted) echo "checked" ?> /> - - "> - : - _enableUserImage) echo "checked" ?> /> - - "> - : - _disableSelfEdit) echo "checked" ?> /> - - "> - : - _enablePasswordForgotten) echo "checked" ?> /> - - "> - : - showTextField("passwordStrength", $settings->_passwordStrength); ?> - - "> - : - - - - - "> - : - showTextField("passwordExpiration", $settings->_passwordExpiration); ?> - - "> - : - showTextField("passwordHistory", $settings->_passwordHistory); ?> - - "> - : - showTextField("loginFailure", $settings->_loginFailure); ?> - - "> - : - showTextField("autoLoginUser", $settings->_autoLoginUser); ?> - - "> - : - showTextField("quota", $settings->_quota); ?> - - "> - : - showTextField("undelUserIds", $settings->_undelUserIds); ?> - - "> - : - showTextField("encryptionKey", $settings->_encryptionKey); ?> - - "> - : - showTextField("cookieLifetime", $settings->_cookieLifetime); ?> - - "> - : - - - - +showConfigHeadline('settings_Authentication'); ?> +showConfigCheckbox('settings_enableGuestLogin', 'enableGuestLogin'); ?> +showConfigCheckbox('settings_enableGuestAutoLogin', 'enableGuestAutoLogin'); ?> +showConfigCheckbox('settings_restricted', 'restricted'); ?> +showConfigCheckbox('settings_enableUserImage', 'enableUserImage'); ?> +showConfigCheckbox('settings_disableSelfEdit', 'disableSelfEdit'); ?> +showConfigCheckbox('settings_enablePasswordForgotten', 'enablePasswordForgotten'); ?> +showConfigText('settings_passwordStrength', 'passwordStrength'); ?> +showConfigOption('settings_passwordStrengthAlgorithm', 'passwordStrengthAlgorithm', array('simple'=>'settings_passwordStrengthAlgorithm_valsimple', 'advanced'=>'settings_passwordStrengthAlgorithm_valadvanced'), false, true); ?> +showConfigText('settings_passwordExpiration', 'passwordExpiration'); ?> +showConfigText('settings_passwordHistory', 'passwordHistory'); ?> +showConfigText('settings_loginFailure', 'loginFailure'); ?> +showConfigText('settings_autoLoginUser', 'autoLoginUser'); ?> +showConfigText('settings_quota', 'quota'); ?> +showConfigText('settings_undelUserIds', 'undelUserIds'); ?> +showConfigText('settings_encryptionKey', 'encryptionKey'); ?> +showConfigText('settings_cookieLifetime', 'cookieLifetime'); ?> +showConfigOption('settings_defaultAccessDocs', 'defaultAccessDocs', array(' 0'=>'inherited', ' '.M_NONE=>'access_mode_none', ' '.M_READ=>'access_mode_read', ' '.M_READWRITE=>'access_mode_readwrite'), false, true); ?> - - "> - : - showTextField("dbDriver", $settings->_dbDriver); ?> - - "> - : - showTextField("dbHostname", $settings->_dbHostname); ?> - - "> - : - showTextField("dbDatabase", $settings->_dbDatabase); ?> - - "> - : - showTextField("dbUser", $settings->_dbUser); ?> - +showConfigHeadline('settings_Database'); ?> +showConfigText('settings_dbDriver', 'dbDriver'); ?> +showConfigText('settings_dbHostname', 'dbHostname'); ?> +showConfigText('settings_dbDatabase', 'dbDatabase'); ?> +showConfigText('settings_dbUser', 'dbUser'); ?> "> : showTextField("dbPass", $settings->_dbPass, 'password'); ?> @@ -587,23 +332,11 @@ if(!is_writeable($settings->_configFilePath)) { - - "> - : - showTextField("smtpServer", $settings->_smtpServer); ?> - - "> - : - showTextField("smtpPort", $settings->_smtpPort); ?> - - "> - : - showTextField("smtpSendFrom", $settings->_smtpSendFrom); ?> - - "> - : - showTextField("smtpUser", $settings->_smtpUser); ?> - +showConfigHeadline('settings_SMTP'); ?> +showConfigText('settings_smtpServer', 'smtpServer'); ?> +showConfigText('settings_smtpPort', 'smtpPort'); ?> +showConfigText('settings_smtpSendFrom', 'smtpSendFrom'); ?> +showConfigText('settings_smtpUser', 'smtpUser'); ?> "> : @@ -619,159 +352,61 @@ if(!is_writeable($settings->_configFilePath)) { - - "> - : - showTextField("siteDefaultPage", $settings->_siteDefaultPage); ?> - - "> - : - showTextField("rootFolderID", $settings->_rootFolderID); ?> - - "> - : - _titleDisplayHack) echo "checked" ?> /> - - "> - : - _showMissingTranslations) echo "checked" ?> /> - +showConfigHeadline('settings_Display'); ?> +showConfigText('settings_siteDefaultPage', 'siteDefaultPage'); ?> +showConfigText('settings_rootFolderID', 'rootFolderID'); ?> +showConfigCheckbox('settings_titleDisplayHack', 'titleDisplayHack'); ?> +showConfigCheckbox('settings_showMissingTranslations', 'showMissingTranslations'); ?> - - "> - : - showTextField("guestID", $settings->_guestID); ?> - - "> - : - showTextField("adminIP", $settings->_adminIP); ?> - +showConfigHeadline('settings_Authentication'); ?> +showConfigText('settings_guestID', 'guestID'); ?> +showConfigText('settings_adminIP', 'adminIP'); ?> - - "> - : - - - - - "> - : - showTextField("versioningFileName", $settings->_versioningFileName); ?> - - "> - : - showTextField("presetExpirationDate", $settings->_presetExpirationDate); ?> - - "> - : - _allowReviewerOnly) echo "checked" ?> /> - - "> - : - _enableAdminRevApp) echo "checked" ?> /> - - "> - : - _enableOwnerRevApp) echo "checked" ?> /> - - "> - : - _enableSelfRevApp) echo "checked" ?> /> - - "> - : - _enableUpdateRevApp) echo "checked" ?> /> - - "> - : - _enableVersionDeletion) echo "checked" ?> /> - - "> - : - _enableVersionModification) echo "checked" ?> /> - - "> - : - _enableDuplicateDocNames) echo "checked" ?> /> - - "> - : - _overrideMimeType) echo "checked" ?> /> - - "> - : - _removeFromDropFolder) echo "checked" ?> /> - +showConfigHeadline('settings_Edition'); ?> +showConfigOption('settings_workflowMode', 'workflowMode', array('traditional'=>'settings_workflowMode_valtraditional', 'traditional_only_approval'=>'settings_workflowMode_valtraditional_only_approval', 'advanced'=>'settings_workflowMode_valadvanced'), false, true); ?> +showConfigText('settings_versioningFileName', 'versioningFileName'); ?> +showConfigText('settings_presetExpirationDate', 'presetExpirationDate'); ?> +showConfigCheckbox('settings_allowReviewerOnly', 'allowReviewerOnly'); ?> +showConfigCheckbox('settings_enableAdminRevApp', 'enableAdminRevApp'); ?> +showConfigCheckbox('settings_enableOwnerRevApp', 'enableOwnerRevApp'); ?> +showConfigCheckbox('settings_enableSelfRevApp', 'enableSelfRevApp'); ?> +showConfigCheckbox('settings_enableUpdateRevApp', 'enableUpdateRevApp'); ?> +showConfigCheckbox('settings_enableVersionDeletion', 'enableVersionDeletion'); ?> +showConfigCheckbox('settings_enableVersionModification', 'enableVersionModification'); ?> +showConfigCheckbox('settings_enableDuplicateDocNames', 'enableDuplicateDocNames'); ?> +showConfigCheckbox('settings_overrideMimeType', 'overrideMimeType'); ?> +showConfigCheckbox('settings_removeFromDropFolder', 'removeFromDropFolder'); ?> - - "> - : - _enableOwnerNotification) echo "checked" ?> /> - - "> - : - _enableNotificationAppRev) echo "checked" ?> /> - - "> - : - _enableNotificationWorkflow) echo "checked" ?> /> - +showConfigHeadline('settings_Notification'); ?> +showConfigCheckbox('settings_enableOwnerNotification', 'enableOwnerNotification'); ?> +showConfigCheckbox('settings_enableNotificationAppRev', 'enableNotificationAppRev'); ?> +showConfigCheckbox('settings_enableNotificationWorkflow', 'enableNotificationWorkflow'); ?> - - "> - : - showTextField("coreDir", $settings->_coreDir); ?> - - "> - : - showTextField("luceneClassDir", $settings->_luceneClassDir); ?> - - "> - : - showTextField("extraPath", $settings->_extraPath); ?> - - "> - : - showTextField("contentOffsetDir", $settings->_contentOffsetDir); ?> - - "> - : - showTextField("maxDirID", $settings->_maxDirID); ?> - - "> - : - showTextField("updateNotifyTime", $settings->_updateNotifyTime); ?> - - "> - : - showTextField("maxExecutionTime", $settings->_maxExecutionTime); ?> - - "> - : - showTextField("cmdTimeout", $settings->_cmdTimeout); ?> - +showConfigHeadline('settings_Server'); ?> +showConfigText('settings_coreDir', 'coreDir'); ?> +showConfigText('settings_luceneClassDir', 'luceneClassDir'); ?> +showConfigText('settings_extraPath', 'extraPath'); ?> +showConfigText('settings_contentOffsetDir', 'contentOffsetDir'); ?> +showConfigText('settings_maxDirID', 'maxDirID'); ?> +showConfigText('settings_updateNotifyTime', 'updateNotifyTime'); ?> +showConfigText('settings_maxExecutionTime', 'maxExecutionTime'); ?> +showConfigText('settings_cmdTimeout', 'cmdTimeout'); ?> - -showConfigHeadline($target."_converters"); if(!empty($settings->_converters[$target])) { foreach($settings->_converters[$target] as $mimetype=>$cmd) { ?> @@ -801,11 +436,9 @@ if(!is_writeable($settings->_configFilePath)) { -- SETTINGS - ADVANCED - DISPLAY --> $extconf) { -?> - -$conf) { + foreach($GLOBALS['EXT_CONF'] as $extname=>$extconf) { + $this->showRawConfigHeadline("".$extconf['title']); + foreach($extconf['config'] as $confkey=>$conf) { ?> :