summaryrefslogtreecommitdiff
path: root/modules/gallery/views
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/views')
-rw-r--r--modules/gallery/views/admin_graphics.html.php14
-rw-r--r--modules/gallery/views/admin_graphics_gd.html.php15
-rw-r--r--modules/gallery/views/admin_graphics_graphicsmagick.html.php10
-rw-r--r--modules/gallery/views/admin_graphics_imagemagick.html.php12
-rw-r--r--modules/gallery/views/admin_graphics_none.html.php2
5 files changed, 32 insertions, 21 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>
diff --git a/modules/gallery/views/admin_graphics_gd.html.php b/modules/gallery/views/admin_graphics_gd.html.php
index b77da8e3..aa9ee67c 100644
--- a/modules/gallery/views/admin_graphics_gd.html.php
+++ b/modules/gallery/views/admin_graphics_gd.html.php
@@ -1,23 +1,26 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<div id="gd" class="gBlock<?= $is_active ? " gSelected" : "" ?><?= $tk->gd["GD Version"] ? " gInstalledToolkit" : " gUnavailable" ?>">
+<div id="gd" class="gBlock<?= $is_active ? " gSelected" : "" ?><?= $tk->installed ? " gInstalledToolkit" : " gUnavailable" ?>">
<img class="logo" width="170" height="110" src="<?= url::file("modules/gallery/images/gd.png"); ?>" alt="<? t("Visit the GD lib project site") ?>" />
<h3> <?= t("GD") ?> </h3>
<p>
<?= t("The GD graphics library is an extension to PHP commonly installed most webservers. Please refer to the <a href=\"%url\">GD website</a> for more information.",
array("url" => "http://www.boutell.com/gd")) ?>
</p>
- <? if ($tk->gd["GD Version"] && function_exists('imagerotate')): ?>
+ <? if ($tk->installed && $tk->rotate): ?>
<p class="gSuccess">
- <?= t("You have GD version %version.", array("version" => $tk->gd["GD Version"])) ?>
+ <?= t("You have GD version %version.", array("version" => $tk->version)) ?>
</p>
<p>
<a class="gButtonLink ui-state-default ui-corner-all"><?= t("Activate GD") ?></a>
</p>
- <? elseif ($tk->gd["GD Version"]): ?>
+ <? elseif ($tk->installed): ?>
+
+ <? if ($tk->error): ?>
<p class="gWarning">
- <?= t("You have GD version %version, but it lacks image rotation.",
- array("version" => $tk->gd["GD Version"])) ?>
+ <?= $tk->error ?>
</p>
+ <? endif ?>
+
<p>
<a class="gButtonLink ui-state-default ui-corner-all"><?= t("Activate GD") ?></a>
</p>
diff --git a/modules/gallery/views/admin_graphics_graphicsmagick.html.php b/modules/gallery/views/admin_graphics_graphicsmagick.html.php
index e2cd0777..bf3ad339 100644
--- a/modules/gallery/views/admin_graphics_graphicsmagick.html.php
+++ b/modules/gallery/views/admin_graphics_graphicsmagick.html.php
@@ -1,21 +1,21 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<div id="graphicsmagick" class="gBlock<?= $is_active ? " gSelected" : "" ?><?= $tk->graphicsmagick ? " gInstalledToolkit" : " gUnavailable" ?>">
+<div id="graphicsmagick" class="gBlock<?= $is_active ? " gSelected" : "" ?><?= $tk->installed ? " gInstalledToolkit" : " gUnavailable" ?>">
<h3> <?= t("GraphicsMagick") ?> </h3>
<img class="logo" width="107" height="76" src="<?= url::file("modules/gallery/images/graphicsmagick.png"); ?>" alt="<? t("Visit the GraphicsMagick project site") ?>" />
<p>
<?= t("GraphicsMagick is a standalone graphics program available on most Linux systems. Please refer to the <a href=\"%url\">GraphicsMagick website</a> for more information.",
array("url" => "http://www.graphicsmagick.org")) ?>
</p>
- <? if ($tk->graphicsmagick): ?>
+ <? if ($tk->installed): ?>
<p class="gSuccess">
- <?= t("GraphicsMagick is available in %path", array("path" => $tk->graphicsmagick)) ?>
+ <?= t("GraphicsMagick version %version is available in %dir", array("version" => $tk->version, "dir" => $tk->dir)) ?>
</p>
<p>
<a class="gButtonLink ui-state-default ui-corner-all"><?= t("Activate Graphics Magic") ?></a>
</p>
<? else: ?>
- <p class="gInfo">
- <?= t("GraphicsMagick is not available on your system.") ?>
+ <p class="gWarning">
+ <?= $tk->error ?>
</p>
<? endif ?>
</div>
diff --git a/modules/gallery/views/admin_graphics_imagemagick.html.php b/modules/gallery/views/admin_graphics_imagemagick.html.php
index 081ddc15..b8f7ffb8 100644
--- a/modules/gallery/views/admin_graphics_imagemagick.html.php
+++ b/modules/gallery/views/admin_graphics_imagemagick.html.php
@@ -1,21 +1,21 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<div id="imagemagick" class="gBlock<?= $is_active ? " gSelected" : "" ?><?= $tk->imagemagick ? " gInstalledToolkit" : " gUnavailable" ?>">
+<div id="imagemagick" class="gBlock<?= $is_active ? " gSelected" : "" ?><?= $tk->installed ? " gInstalledToolkit" : " gUnavailable" ?>">
<h3> <?= t("ImageMagick") ?> </h3>
<img class="logo" width="114" height="118" src="<?= url::file("modules/gallery/images/imagemagick.jpg"); ?>" alt="<? t("Visit the ImageMagick project site") ?>" />
<p>
<?= t("ImageMagick is a standalone graphics program available on most Linux systems. Please refer to the <a href=\"%url\">ImageMagick website</a> for more information.",
array("url" => "http://www.imagemagick.org")) ?>
</p>
- <? if ($tk->imagemagick): ?>
+ <? if ($tk->installed): ?>
<p class="gSuccess">
- <?= t("ImageMagick is available in %path", array("path" => $tk->imagemagick)) ?>
+ <?= t("ImageMagick version %version is available in %dir", array("version" => $tk->version, "dir" => $tk->dir)) ?>
</p>
<p>
<a class="gButtonLink ui-state-default ui-corner-all"><?= t("Activate ImageMagick") ?></a>
</p>
- <? else: ?>
- <p class="gInfo">
- <?= t("ImageMagick is not available on your system.") ?>
+ <? elseif ($tk->error): ?>
+ <p class="gWarning">
+ <?= $tk->error ?>
</p>
<? endif ?>
</div>
diff --git a/modules/gallery/views/admin_graphics_none.html.php b/modules/gallery/views/admin_graphics_none.html.php
index 5306a70d..be2a580d 100644
--- a/modules/gallery/views/admin_graphics_none.html.php
+++ b/modules/gallery/views/admin_graphics_none.html.php
@@ -2,6 +2,6 @@
<div id="none" class="gBlock">
<h3 class="gWarning"> <?= t("No Active Toolkit") ?> </h3>
<p>
- <?= t("We were unable to detect a graphics program. You must install one of the toolkits below in order to many Gallery features.") ?>
+ <?= t("We were unable to detect a graphics program. You must install one of the toolkits below in order to use many Gallery features.") ?>
</p>
</div>