openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 9d3da08a8dc1c3a067f4a3a5d93e3677286f63f0
parent c70312571930f887cc5fc3082d3df25fc7d18d70
Author: dankert <devnull@localhost>
Date:   Wed,  4 Nov 2009 09:44:31 +0100

Im 'readonly'-Modus keine Editierknöpfe anzeigen.

Diffstat:
themes/default/include/html/button.inc.php | 8+++++++-
themes/default/include/html/window.inc.php | 4+++-
2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/themes/default/include/html/button.inc.php b/themes/default/include/html/button.inc.php @@ -3,6 +3,9 @@ if ($this->isEditable() && !$this->isEditMode()) $attr_text = 'MODE_EDIT'; $attr_type = 'submit'; + + if ( readonly() ) + $attr_type = ''; // Knopf nicht anzeigen #END-IF #IF-ATTR src# @@ -10,5 +13,8 @@ #ELSE $attr_src = ''; #END-IF -?><input type="<?php echo $attr_type ?>"<?php if(isset($attr_src)) { ?> src="<?php echo $image_dir.'icon_'.$attr_src.IMG_ICON_EXT ?>"<?php } ?> name="<?php echo $attr_value ?>" class="<?php echo $attr_class ?>" title="<?php echo lang($attr_text.'_DESC') ?>" value="&nbsp;&nbsp;&nbsp;&nbsp;<?php echo langHtml($attr_text) ?>&nbsp;&nbsp;&nbsp;&nbsp;" /><?php unset($attr_src) ?><?php + + if ( !empty($attr_type) ) { +?><input type="<?php echo $attr_type ?>"<?php if(isset($attr_src)) { ?> src="<?php echo $image_dir.'icon_'.$attr_src.IMG_ICON_EXT ?>"<?php } ?> name="<?php echo $attr_value ?>" class="<?php echo $attr_class ?>" title="<?php echo lang($attr_text.'_DESC') ?>" value="&nbsp;&nbsp;&nbsp;&nbsp;<?php echo langHtml($attr_text) ?>&nbsp;&nbsp;&nbsp;&nbsp;" /><?php unset($attr_src) +?><?php } ?> \ No newline at end of file diff --git a/themes/default/include/html/window.inc.php b/themes/default/include/html/window.inc.php @@ -37,7 +37,9 @@ if ($this->isEditable()) { ?> <?php if ($this->isEditMode()) { - ?><a href="<?php echo Html::url($actionName,$subActionName,$this->getRequestId() ) ?>" accesskey="1" title="<?php echo langHtml('MODE_EDIT_DESC') ?>" class="path" style="text-align:right;font-weight:bold;font-weight:bold;"><img src="<?php echo $image_dir ?>mode-edit.png" style="vertical-align:top; " border="0" /></a> <?php } else { + ?><a href="<?php echo Html::url($actionName,$subActionName,$this->getRequestId() ) ?>" accesskey="1" title="<?php echo langHtml('MODE_EDIT_DESC') ?>" class="path" style="text-align:right;font-weight:bold;font-weight:bold;"><img src="<?php echo $image_dir ?>mode-edit.png" style="vertical-align:top; " border="0" /></a> <?php } + elseif (readonly()) { + ?><img src="<?php echo $image_dir ?>readonly.png" style="vertical-align:top; " border="0" /> <?php } else { ?><a href="<?php echo Html::url($actionName,$subActionName,$this->getRequestId(),array('mode'=>'edit') ) ?>" accesskey="1" title="<?php echo langHtml('MODE_SHOW_DESC') ?>" class="path" style="text-align:right;font-weight:bold;font-weight:bold;"><img src="<?php echo $image_dir ?>readonly.png" style="vertical-align:top; " border="0" /></a> <?php } ?><?php }