summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorChad Kieffer <chad@2tbsp.com>2009-01-24 20:06:13 +0000
committerChad Kieffer <chad@2tbsp.com>2009-01-24 20:06:13 +0000
commit55cd2afde539842d54bd79fb7bdced37e5e53101 (patch)
treed98859e8e84864706124a89f1ee9b1dc1ebf7683 /core
parentcbff78daa8a642e1800916f92e43202857c3b677 (diff)
Admin theme style cleanup. Merged separate selected, available, unavailable into a single set of reusable classes. Applied alternating row bg colors. Removed inline CSS from admin views. Moved user admin css into admin_default theme style sheet.
Diffstat (limited to 'core')
-rw-r--r--core/controllers/admin_graphics.php1
-rw-r--r--core/views/admin_graphics.html.php12
-rw-r--r--core/views/admin_graphics_gd.html.php2
-rw-r--r--core/views/admin_graphics_graphicsmagick.html.php2
-rw-r--r--core/views/admin_graphics_imagemagick.html.php2
-rw-r--r--core/views/admin_maintenance.html.php6
-rw-r--r--core/views/admin_modules.html.php4
-rw-r--r--core/views/admin_themes.html.php144
8 files changed, 86 insertions, 87 deletions
diff --git a/core/controllers/admin_graphics.php b/core/controllers/admin_graphics.php
index fe71a222..f0855660 100644
--- a/core/controllers/admin_graphics.php
+++ b/core/controllers/admin_graphics.php
@@ -28,6 +28,7 @@ class Admin_Graphics_Controller extends Admin_Controller {
if ($id == $active) {
$view->content->active = new View("admin_graphics_$id.html");
$view->content->active->tk = $tk;
+ $view->content->active->is_active = true;
} else {
$v = new View("admin_graphics_$id.html");
$v->tk = $tk;
diff --git a/core/views/admin_graphics.html.php b/core/views/admin_graphics.html.php
index c5e32320..9cf54ccd 100644
--- a/core/views/admin_graphics.html.php
+++ b/core/views/admin_graphics.html.php
@@ -2,12 +2,12 @@
<script type="text/javascript">
$(document).ready(function() {
select_toolkit = function(el) {
- if (!$(this).hasClass("unavailable")) {
+ if (!$(this).hasClass("gUnavailable")) {
window.location = '<?= url::site("admin/graphics/choose/__TK__?csrf=" . access::csrf_token()) ?>'
.replace("__TK__", $(this).attr("id"));
}
};
- $("#gAvailableToolkits div.gBlock").click(select_toolkit);
+ $("#gAvailableToolkits .gBlock").click(select_toolkit);
});
</script>
@@ -17,12 +17,10 @@
<?= t("Gallery needs a graphics toolkit in order to manipulate your photos. Please choose one from the list below.") ?>
</p>
- <div id="gSelectedToolkit">
- <h2> <?= t("Active Toolkit") ?> </h2>
- <?= $active ?>
- </div>
+ <h2> <?= t("Active Toolkit") ?> </h2>
+ <?= $active ?>
- <div id="gAvailableToolkits">
+ <div class="gAvailable">
<h2> <?= t("Available Toolkits") ?> </h2>
<?= $available ?>
</div>
diff --git a/core/views/admin_graphics_gd.html.php b/core/views/admin_graphics_gd.html.php
index 8c645f4f..605e09ff 100644
--- a/core/views/admin_graphics_gd.html.php
+++ b/core/views/admin_graphics_gd.html.php
@@ -1,5 +1,5 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<div id="gd" class="gBlock <?= $tk->gd["GD Version"] ? "" : "unavailable" ?>">
+<div id="gd" class="gBlock<?= $is_active ? " gSelected" : "" ?><?= $tk->gd["GD Version"] ? "" : " gUnavailable" ?>">
<img class="logo" width="170" height="110" src="<?= url::file("core/images/gd.png"); ?>" alt="<? t("Visit the GD lib project site") ?>" />
<h3> <?= t("GD") ?> </h3>
<p>
diff --git a/core/views/admin_graphics_graphicsmagick.html.php b/core/views/admin_graphics_graphicsmagick.html.php
index bb4f906d..8196289e 100644
--- a/core/views/admin_graphics_graphicsmagick.html.php
+++ b/core/views/admin_graphics_graphicsmagick.html.php
@@ -1,5 +1,5 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<div id="graphicsmagick" class="gBlock <?= $tk->graphicsmagick ? "" : "unavailable" ?>">
+<div id="graphicsmagick" class="gBlock<?= $is_active ? " gSelected" : "" ?><?= $tk->graphicsmagick ? "" : " gUnavailable" ?>">
<h3> <?= t("GraphicsMagick") ?> </h3>
<img class="logo" width="107" height="76" src="<?= url::file("core/images/graphicsmagick.png"); ?>" alt="<? t("Visit the GraphicsMagick project site") ?>" />
<p>
diff --git a/core/views/admin_graphics_imagemagick.html.php b/core/views/admin_graphics_imagemagick.html.php
index 7898a8d1..1166ff71 100644
--- a/core/views/admin_graphics_imagemagick.html.php
+++ b/core/views/admin_graphics_imagemagick.html.php
@@ -1,5 +1,5 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<div id="imagemagick" class="gBlock <?= $tk->imagemagick ? "" : "unavailable" ?>">
+<div id="imagemagick" class="gBlock<?= $is_active ? " gSelected" : "" ?><?= $tk->imagemagick ? "" : " gUnavailable" ?>">
<h3> <?= t("ImageMagick") ?> </h3>
<img class="logo" width="114" height="118" src="<?= url::file("core/images/imagemagick.jpg"); ?>" alt="<? t("Visit the ImageMagick project site") ?>" />
<p>
diff --git a/core/views/admin_maintenance.html.php b/core/views/admin_maintenance.html.php
index b893ed0d..c2e28276 100644
--- a/core/views/admin_maintenance.html.php
+++ b/core/views/admin_maintenance.html.php
@@ -7,7 +7,7 @@
<div id="gAvailableTasks">
<h2> <?= t("Available Tasks") ?> </h2>
- <table style="width: 680px" border="1">
+ <table>
<tr>
<th>
<?= t("Name") ?>
@@ -41,7 +41,7 @@
<div id="gRunningTasks">
<h2> <?= t("Running Tasks") ?> </h2>
- <table style="width: 680px" border="1">
+ <table>
<tr>
<th>
<?= t("Last Updated") ?>
@@ -100,7 +100,7 @@
<div id="gFinishedTasks">
<h2> <?= t("Finished Tasks") ?> </h2>
- <table style="width: 680px" border="1">
+ <table>
<tr>
<th>
<?= t("Last Updated") ?>
diff --git a/core/views/admin_modules.html.php b/core/views/admin_modules.html.php
index 53af2116..fa303320 100644
--- a/core/views/admin_modules.html.php
+++ b/core/views/admin_modules.html.php
@@ -14,8 +14,9 @@
<th> <?= t("Version") ?> </th>
<th> <?= t("Description") ?> </th>
</tr>
+ <? $i = 0 ?>
<? foreach ($available as $module_name => $module_info): ?>
- <tr>
+ <tr class="<?= ($i % 2 == 0) ? "gEvenRow" : "gOddRow" ?>">
<? $data = array("name" => $module_name); ?>
<? if ($module_info->locked) $data["disabled"] = 1; ?>
<td> <?= form::checkbox($data, '1', module::is_installed($module_name)) ?> </td>
@@ -23,6 +24,7 @@
<td> <?= $module_info->version ?> </td>
<td> <?= t($module_info->description) ?> </td>
</tr>
+ <? $i++ ?>
<? endforeach ?>
</table>
<input type="submit" value="<?= t("Update") ?>"/>
diff --git a/core/views/admin_themes.html.php b/core/views/admin_themes.html.php
index 43328b3a..3bf246a4 100644
--- a/core/views/admin_themes.html.php
+++ b/core/views/admin_themes.html.php
@@ -7,85 +7,83 @@
}
</script>
-<div id="gAdminThemes">
- <h1> <?= t("Theme Administration") ?> </h1>
- <p>
- <?= t("Gallery allows you to choose a theme for browsing your Gallery, as well as a special theme for the administration interface. Click a theme to preview and activate it.") ?>
- </p>
+<h1> <?= t("Theme Administration") ?> </h1>
+<p>
+ <?= t("Gallery allows you to choose a theme for browsing your Gallery, as well as a special theme for the administration interface. Click a theme to preview and activate it.") ?>
+</p>
- <div id="gSiteTheme">
- <h2> <?= t("Gallery theme") ?> </h2>
- <div class="gBlock selected">
- <img src="<?= url::file("themes/{$site}/thumbnail.png") ?>"
- alt="<?= $themes[$active]->name ?>" />
- <h3> <?= $themes[$site]->name ?> </h3>
- <p>
- <?= $themes[$site]->description ?>
- </p>
+<div id="gSiteTheme">
+ <h2> <?= t("Gallery theme") ?> </h2>
+ <div class="gBlock gSelected">
+ <img src="<?= url::file("themes/{$site}/thumbnail.png") ?>"
+ alt="<?= $themes[$active]->name ?>" />
+ <h3> <?= $themes[$site]->name ?> </h3>
+ <p>
+ <?= $themes[$site]->description ?>
+ </p>
+ </div>
+
+ <h2> <?= t("Available Gallery themes") ?> </h2>
+ <div class="gAvailable">
+ <? $count = 0 ?>
+ <? foreach ($themes as $id => $info): ?>
+ <? if (!$info->site) continue ?>
+ <? if ($id == $site) continue ?>
+ <div class="gBlock">
+ <a href="<?= url::site("admin/themes/preview/site/$id") ?>" class="gDialogLink" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name)) ?>">
+ <img src="<?= url::file("themes/{$id}/thumbnail.png") ?>"
+ alt="<?= $info->name ?>" />
+ <h3> <?= $info->name ?> </h3>
+ <p>
+ <?= $info->description ?>
+ </p>
+ </a>
</div>
+ <? $count++ ?>
+ <? endforeach ?>
- <h2> <?= t("Available Gallery themes") ?> </h2>
- <div id="gAvailableSiteThemes">
- <? $count = 0 ?>
- <? foreach ($themes as $id => $info): ?>
- <? if (!$info->site) continue ?>
- <? if ($id == $site) continue ?>
- <div class="gBlock">
- <a href="<?= url::site("admin/themes/preview/site/$id") ?>" class="gDialogLink" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name)) ?>">
- <img src="<?= url::file("themes/{$id}/thumbnail.png") ?>"
- alt="<?= $info->name ?>" />
- <h3> <?= $info->name ?> </h3>
- <p>
- <?= $info->description ?>
- </p>
- </a>
- </div>
- <? $count++ ?>
- <? endforeach ?>
+ <? if (!$count): ?>
+ <p>
+ <?= t("There are no other site themes available.") ?>
+ </p>
+ <? endif ?>
+ </div>
+</div>
- <? if (!$count): ?>
- <p>
- <?= t("There are no other site themes available.") ?>
- </p>
- <? endif ?>
- </div>
+<div id="gAdminTheme">
+ <h2> <?= t("Admin theme") ?> </h2>
+ <div class="gBlock gSelected">
+ <img src="<?= url::file("themes/{$admin}/thumbnail.png") ?>"
+ alt="<?= $themes[$admin]->name ?>" />
+ <h3> <?= $themes[$admin]->name ?> </h3>
+ <p>
+ <?= $themes[$admin]->description ?>
+ </p>
</div>
- <div id="gAdminTheme">
- <h2> <?= t("Admin theme") ?> </h2>
- <div class="gBlock selected">
- <img src="<?= url::file("themes/{$admin}/thumbnail.png") ?>"
- alt="<?= $themes[$admin]->name ?>" />
- <h3> <?= $themes[$admin]->name ?> </h3>
- <p>
- <?= $themes[$admin]->description ?>
- </p>
+ <h2> <?= t("Available admin themes") ?> </h2>
+ <div class="gAvailable">
+ <? $count = 0 ?>
+ <? foreach ($themes as $id => $info): ?>
+ <? if (!$info->admin) continue ?>
+ <? if ($id == $admin) continue ?>
+ <div class="gBlock">
+ <a href="<?= url::site("admin/themes/preview/admin/$id") ?>" class="gDialogLink" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name)) ?>">
+ <img src="<?= url::file("themes/{$id}/thumbnail.png") ?>"
+ alt="<?= $info->name ?>" />
+ <h3> <?= $info->name ?> </h3>
+ <p>
+ <?= $info->description ?>
+ </p>
+ </a>
</div>
+ <? $count++ ?>
+ <? endforeach ?>
- <h2> <?= t("Available admin themes") ?> </h2>
- <div id="gAvailableAdminThemes">
- <? $count = 0 ?>
- <? foreach ($themes as $id => $info): ?>
- <? if (!$info->admin) continue ?>
- <? if ($id == $admin) continue ?>
- <div class="gBlock">
- <a href="<?= url::site("admin/themes/preview/admin/$id") ?>" class="gDialogLink" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name)) ?>">
- <img src="<?= url::file("themes/{$id}/thumbnail.png") ?>"
- alt="<?= $info->name ?>" />
- <h3> <?= $info->name ?> </h3>
- <p>
- <?= $info->description ?>
- </p>
- </a>
- </div>
- <? $count++ ?>
- <? endforeach ?>
-
- <? if (!$count): ?>
- <p>
- <?= t("There are no other admin themes available.") ?>
- </p>
- <? endif ?>
- </div>
+ <? if (!$count): ?>
+ <p>
+ <?= t("There are no other admin themes available.") ?>
+ </p>
+ <? endif ?>
</div>
-</div>
+</div> \ No newline at end of file