[icinga-checkins] icinga.org: icingaweb2-module-director/master: css/module: render disabled object preview as such

git at icinga.org git at icinga.org
Tue Feb 23 03:15:20 CET 2016


Module: icingaweb2-module-director
Branch: master
Commit: 990b7934f2d69b17f53460f72d734bb080a04a19
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=990b7934f2d69b17f53460f72d734bb080a04a19

Author: Thomas Gelf <thomas at gelf.net>
Date:   Mon Feb 22 14:39:47 2016 +0100

css/module: render disabled object preview as such

---

 application/views/scripts/object/show.phtml |    5 ++++-
 public/css/module.less                      |    4 ++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/application/views/scripts/object/show.phtml b/application/views/scripts/object/show.phtml
index f95ca7c..6611dd8 100644
--- a/application/views/scripts/object/show.phtml
+++ b/application/views/scripts/object/show.phtml
@@ -4,7 +4,10 @@
 </div>
 
 <div class="content">
-<pre><?= $this->escape($object) ?><?php if ($this->extraObjects): ?>
+<?php if ($object->disabled === 'y'): ?>
+<p class="error"><?= $this->translate('This object will not be deployed as it has been disabled') ?></p>
+<?php endif ?>
+<pre<?php if ($object->disabled === 'y'): ?> class="disabled"<?php endif ?>><?= $this->escape($object) ?><?php if ($this->extraObjects): ?>
 <?= implode('', $this->extraObjects) ?>
 <?php endif ?></pre>
 </div>
diff --git a/public/css/module.less b/public/css/module.less
index e2418b6..b01d98a 100644
--- a/public/css/module.less
+++ b/public/css/module.less
@@ -17,6 +17,10 @@ span.disabled {
   color: @gray-light;
 }
 
+pre.disabled {
+  color: @gray-light;
+}
+
 pre {
   background: none;
 }



More information about the icinga-checkins mailing list