configmgr: visual improvements (warning icons for newbies and links to each documentation page)
darcs-hash:20090312222853-f7d6d-6ad28d7747ed0a72e4f8952eb1cec606e9b6d322.gz
This commit is contained in:
parent
e9177a1922
commit
7ed33b2abb
|
@ -16,6 +16,7 @@ define('CM_KEYMARKER','____'); // used for settings with multiple dim
|
|||
|
||||
define('PLUGIN_SELF',dirname(__FILE__).'/');
|
||||
define('PLUGIN_METADATA',PLUGIN_SELF.'settings/config.metadata.php');
|
||||
if(!defined('DOKU_PLUGIN_IMAGES')) define('DOKU_PLUGIN_IMAGES',DOKU_BASE.'lib/plugins/config/images/');
|
||||
|
||||
require_once(PLUGIN_SELF.'settings/config.class.php'); // main configuration class and generic settings classes
|
||||
require_once(PLUGIN_SELF.'settings/extra.class.php'); // settings classes specific to these settings
|
||||
|
@ -151,11 +152,12 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin {
|
|||
|
||||
$class = $setting->is_default() ? ' class="default"' : ($setting->is_protected() ? ' class="protected"' : '');
|
||||
$error = $setting->error() ? ' class="value error"' : ' class="value"';
|
||||
$icon = $setting->caution() ? '<img src="'.DOKU_PLUGIN_IMAGES.$setting->caution().'.png" alt="'.$setting->caution().'" title="'.$this->getLang($setting->caution()).'" />' : '';
|
||||
|
||||
ptln(' <tr'.$class.'>');
|
||||
ptln(' <td class="label">');
|
||||
ptln(' <span class="outkey">'.$setting->_out_key(true).'</span>');
|
||||
ptln(' '.$label);
|
||||
ptln(' <span class="outkey">'.$setting->_out_key(true, true).'</span>');
|
||||
ptln(' '.$label.$icon);
|
||||
ptln(' </td>');
|
||||
ptln(' <td'.$error.'>'.$input.'</td>');
|
||||
ptln(' </tr>');
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 701 B |
Binary file not shown.
After Width: | Height: | Size: 749 B |
Binary file not shown.
After Width: | Height: | Size: 666 B |
|
@ -17,7 +17,10 @@ $lang['updated'] = 'Einstellungen erfolgreich gespeichert.';
|
|||
$lang['nochoice'] = '(keine Auswahlmöglichkeiten vorhanden)';
|
||||
$lang['locked'] = 'Die Konfigurationsdatei kann nicht geändert werden, wenn dies unbeabsichtigt ist
|
||||
<br />überprüfen Sie, dass die Dateiberechtigungen korrekt gesetzt sind.';
|
||||
$lang['_configuration_manager'] = 'Konfiguration';
|
||||
$lang['danger'] = 'Gefahr: Die Änderung dieser Option könnte erheblichen Schaden anrichten.';
|
||||
$lang['warning'] = 'Warnunng: Die Änderung dieser Option könnte unbeabsichtigtes Verhalten hervorrufen.';
|
||||
$lang['security'] = 'Sicherheitswarnung: Die Änderung dieser Option könnte ein Sicherheitsrisiko darstellen.';
|
||||
$lang['_configuration_manager']= 'Konfiguration';
|
||||
$lang['_header_dokuwiki'] = 'DokuWiki-Konfiguration';
|
||||
$lang['_header_plugin'] = 'Plugin-Konfiguration';
|
||||
$lang['_header_template'] = 'Template-Konfiguration';
|
||||
|
|
|
@ -17,6 +17,10 @@ $lang['nochoice'] = '(no other choices available)';
|
|||
$lang['locked'] = 'The settings file can not be updated, if this is unintentional, <br />
|
||||
ensure the local settings file name and permissions are correct.';
|
||||
|
||||
$lang['danger'] = 'Danger: Changing this option could cause severe damage.';
|
||||
$lang['warning'] = 'Warning: Changing this option could cause unintended behaviour.';
|
||||
$lang['security'] = 'Security Warning: Changing this option could present a security risk.';
|
||||
|
||||
/* --- Config Setting Headers --- */
|
||||
$lang['_configuration_manager'] = 'Configuration Manager'; //same as heading in intro.txt
|
||||
$lang['_header_dokuwiki'] = 'DokuWiki Settings';
|
||||
|
|
|
@ -340,6 +340,12 @@ if (!class_exists('setting')) {
|
|||
var $_error = false; // only used by those classes which error check
|
||||
var $_input = NULL; // only used by those classes which error check
|
||||
|
||||
var $_cautionList = array(
|
||||
'basedir' => 'danger', 'baseurl' => 'danger', 'savedir' => 'danger', 'useacl' => 'danger', 'authtype' => 'danger', 'superuser' => 'danger', 'userewrite' => 'danger',
|
||||
'start' => 'warning', 'camelcase' => 'warning', 'deaccent' => 'warning', 'sepchar' => 'warning', 'compression' => 'warning', 'xsendfile' => 'warning', 'renderer_xhtml' => 'warning',
|
||||
'allowdebug' => 'security', 'htmlok' => 'security', 'phpok' => 'security', 'iexssprotect' => 'security', 'xmlrpc' => 'security'
|
||||
);
|
||||
|
||||
function setting($key, $params=NULL) {
|
||||
$this->_key = $key;
|
||||
|
||||
|
@ -439,9 +445,21 @@ if (!class_exists('setting')) {
|
|||
function is_default() { return !$this->is_protected() && is_null($this->_local); }
|
||||
function error() { return $this->_error; }
|
||||
|
||||
function _out_key($pretty=false) {
|
||||
function caution() {
|
||||
if (!array_key_exists($this->_key, $this->_cautionList)) return false;
|
||||
return $this->_cautionList[$this->_key];
|
||||
}
|
||||
|
||||
function _out_key($pretty=false,$url=false) {
|
||||
if($pretty){
|
||||
return str_replace(CM_KEYMARKER,"»",$this->_key);
|
||||
$out = str_replace(CM_KEYMARKER,"»",$this->_key);
|
||||
if ($url && !strstr($out,'»')) {//provide no urls for plugins, etc.
|
||||
if ($out == 'start') //one exception
|
||||
return '<a href="http://www.dokuwiki.org/config:startpage">'.$out.'</a>';
|
||||
else
|
||||
return '<a href="http://www.dokuwiki.org/config:'.$out.'">'.$out.'</a>';
|
||||
}
|
||||
return $out;
|
||||
}else{
|
||||
return str_replace(CM_KEYMARKER,"']['",$this->_key);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
}
|
||||
#config__manager fieldset td.value {
|
||||
/* fixed data column width */
|
||||
width: 30em;
|
||||
width: 31em;
|
||||
}
|
||||
|
||||
#config__manager td.label {
|
||||
|
@ -41,6 +41,12 @@
|
|||
#config__manager td.label label {
|
||||
clear: both;
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
#config__manager td.label img {
|
||||
padding: 0 10px;
|
||||
vertical-align: middle;
|
||||
float: right;
|
||||
}
|
||||
|
||||
#config__manager td.label span.outkey {
|
||||
|
@ -59,6 +65,9 @@
|
|||
#config__manager td input.edit {
|
||||
width: 30em;
|
||||
}
|
||||
#config__manager td .input {
|
||||
width: 30.8em;
|
||||
}
|
||||
#config__manager td select.edit { }
|
||||
#config__manager td textarea.edit {
|
||||
width: 27.5em;
|
||||
|
|
Loading…
Reference in New Issue