summaryrefslogtreecommitdiff
path: root/modules/gallery/views/admin_graphics.html.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-08-08 20:31:16 -0700
committerBharat Mediratta <bharat@menalto.com>2009-08-08 20:31:16 -0700
commitc9f5000e65f66b3342f2cc6e2e9623eac72ff223 (patch)
tree8547b552d4db1b80bbcee8d0dd8c026451f2cb71 /modules/gallery/views/admin_graphics.html.php
parente4fb6959aff3d688db9821eadd0d24006c9c77d6 (diff)
Improve the graphics toolkit detection code so that properly
identifies situations where its restricted by open_basedir. We now track more informatoin about the toolkit including the version and any errors we encountered while doing the detection so that we can provide more info downstream. This makes graphics::detect_toolkits() a little heavier, but that's ok because it should not be called very often. In the process, refactor the controller and view hierarchy so that it's a little more straightforward in the code. Fixes ticket #616.
Diffstat (limited to 'modules/gallery/views/admin_graphics.html.php')
-rw-r--r--modules/gallery/views/admin_graphics.html.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/modules/gallery/views/admin_graphics.html.php b/modules/gallery/views/admin_graphics.html.php
index 08374471..c4a2f5c6 100644
--- a/modules/gallery/views/admin_graphics.html.php
+++ b/modules/gallery/views/admin_graphics.html.php
@@ -9,8 +9,8 @@
};
$("#gAdminGraphics div.gAvailable .gBlock").click(select_toolkit);
});
-
</script>
+
<div id="gAdminGraphics">
<h1> <?= t("Graphics Settings") ?> </h1>
<p>
@@ -18,11 +18,19 @@
</p>
<h2> <?= t("Active Toolkit") ?> </h2>
- <?= $active ?>
+ <? if ($active == "none"): ?>
+ <?= new View("admin_graphics_none.html") ?>
+ <? else: ?>
+ <?= new View("admin_graphics_$active.html", array("tk" => $tk->$active, "is_active" => true)) ?>
+ <? endif ?>
<div class="gAvailable">
<h2> <?= t("Available Toolkits") ?> </h2>
- <?= $available ?>
+ <? foreach (array_keys((array)$tk) as $id): ?>
+ <? if ($id != $active): ?>
+ <?= new View("admin_graphics_$id.html", array("tk" => $tk->$id, "is_active" => false)) ?>
+ <? endif ?>
+ <? endforeach ?>
</div>
</div>