From 91ab6f161fa1e118418922fbf0a42f1924d7df0e Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Sun, 18 Oct 2009 18:01:42 -0600 Subject: Apply g-block and g-block-content, remove hover effect, alternate row color. --- .../gallery/views/admin_advanced_settings.html.php | 61 ++++++++++++---------- 1 file changed, 32 insertions(+), 29 deletions(-) (limited to 'modules/gallery') diff --git a/modules/gallery/views/admin_advanced_settings.html.php b/modules/gallery/views/admin_advanced_settings.html.php index 70ecd261..e3ae5f58 100644 --- a/modules/gallery/views/admin_advanced_settings.html.php +++ b/modules/gallery/views/admin_advanced_settings.html.php @@ -1,38 +1,41 @@ -
+

+
    -
  • - -
  • +
- - - - - - - - module_name == "gallery" && $var->name == "_cache") continue ?> - - - - - - -
module_name ?> name) ?> - module_name/" . html::clean($var->name)) ?>" - class="g-dialog-link" - title=" $var->name, "module_name" => $var->module_name))->for_html_attr() ?>"> - value): ?> - value) ?> - - - - -
+
+ + + + + + + + + module_name == "gallery" && $var->name == "_cache") continue ?> + "> + + + + + + +
module_name ?> name) ?> + module_name/" . html::clean($var->name)) ?>" + class="g-dialog-link" + title=" $var->name, "module_name" => $var->module_name))->for_html_attr() ?>"> + value): ?> + value) ?> + + + + +
+
-- cgit v1.2.3 From 5f56cbf997c12ab1aaf14403873fd9dfc33690ef Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Sun, 18 Oct 2009 20:22:10 -0600 Subject: Wrap all admin views in g-block and g-block content. This provides the means to visually separate the view's title and description from everything else. Primary admin view title should always be h1, and only one h1 per view. Removed some unused admin CSS id's. --- lib/gallery.common.css | 5 + modules/akismet/views/admin_akismet.html.php | 15 +- modules/comment/views/admin_comments.html.php | 305 ++++++++--------- modules/digibug/views/admin_digibug.html.php | 10 +- modules/g2_import/views/admin_g2_import.html.php | 142 ++++---- modules/gallery/controllers/admin_languages.php | 3 +- modules/gallery/views/admin_graphics.html.php | 30 +- modules/gallery/views/admin_languages.html.php | 187 ++++++----- modules/gallery/views/admin_maintenance.html.php | 368 +++++++++++---------- modules/gallery/views/admin_modules.html.php | 52 +-- modules/gallery/views/admin_sidebar.html.php | 43 +-- modules/gallery/views/admin_theme_options.html.php | 4 +- modules/gallery/views/admin_themes.html.php | 139 ++++---- modules/recaptcha/views/admin_recaptcha.html.php | 44 +-- modules/server_add/views/admin_server_add.html.php | 21 +- modules/tag/js/tag.js | 4 +- modules/tag/views/admin_tags.html.php | 83 ++--- modules/user/views/admin_users.html.php | 159 ++++----- modules/watermark/views/admin_watermarks.html.php | 58 ++-- themes/admin_wind/css/screen.css | 67 +--- 20 files changed, 871 insertions(+), 868 deletions(-) (limited to 'modules/gallery') diff --git a/lib/gallery.common.css b/lib/gallery.common.css index c574279c..a700c359 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -31,9 +31,11 @@ **********************************************************************/ .g-narrow { + width: 25%; } .g-wide { + width: 100%; } /** ******************************************************************* @@ -107,9 +109,12 @@ form .g-error { } .g-installed { + background-color: #eeeeee; } .g-default { + background-color: #c5dbec; + font-weight: bold; } .g-draggable, diff --git a/modules/akismet/views/admin_akismet.html.php b/modules/akismet/views/admin_akismet.html.php index 22c60c97..d273be5b 100644 --- a/modules/akismet/views/admin_akismet.html.php +++ b/modules/akismet/views/admin_akismet.html.php @@ -1,17 +1,18 @@ -
+

Wordpress.com API Key, which is also free. Your comments will be automatically relayed to Akismet.com where they'll be scanned for spam. Spam messages will be flagged accordingly and hidden from your vistors until you approve or delete them.", array("api_key_url" => "http://wordpress.com/api-keys", "akismet_url" => "http://akismet.com")) ?>

+
+ +
+ +
+ - -
- +
- - -
diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index 8f719f05..82e071a8 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -34,165 +34,168 @@ } -
+

- -
- -
+
+ +
+ +
- -

- - - - - - - - - -

+ +

+ + + + + + + + + +

- -
- - 0): ?> -

- -

- -

- spam): ?> - spam) ?> -

-

- "> - - - - + +

+ + 0): ?> +

+ +

-

-
- +

+ spam): ?> + spam) ?> +

+

+ "> + + + + + +

+
+ - -
-

- -

-
- + +
+

+ +

+
+ - - - - - - - $comment): ?> - "> - - + + + +
- - - - - -
- - " - class="g-avatar" - alt="author_name()) ?>" - width="40" - height="40" /> - -

author_name()) ?>

-
-
- item() ?> -
- - has_thumb()): ?> - <?= html::purify($item->title)->for_html_attr() ?>thumb_width, $item->thumb_height, 75) ?> - /> - - - - + + + + + + + $comment): ?> + "> + + - - - -
+ + + + + +
+ + " + class="g-avatar" + alt="author_name()) ?>" + width="40" + height="40" /> + +

author_name()) ?>

+
+ - -

created) ?>

- text)) ?> -
-
    - state != "unpublished"): ?> -
  • - - - - -
  • - - state != "published"): ?> -
  • - - - - -
  • - - state != "spam"): ?> -
  • - - - - -
  • - - -
  • - - - - -
  • -
-
+

created) ?>

+ text)) ?> +
+
    + state != "unpublished"): ?> +
  • + + + + +
  • + + state != "published"): ?> +
  • + + + + +
  • + + state != "spam"): ?> +
  • + + + + +
  • + + +
  • + + + + +
  • +
+
-
- +
+ +
+
diff --git a/modules/digibug/views/admin_digibug.html.php b/modules/digibug/views/admin_digibug.html.php index f75adc60..5d07eb68 100644 --- a/modules/digibug/views/admin_digibug.html.php +++ b/modules/digibug/views/admin_digibug.html.php @@ -1,18 +1,16 @@ -
-
- "> -

+
+ " alt="Digibug logo" class="g-right"/> +

+

-
-

register with Digibug and enter your Digibug id in the Advanced Settings page you can make money off of your photos!", array("signup_url" => "http://www.digibug.com/signup.php", diff --git a/modules/g2_import/views/admin_g2_import.html.php b/modules/g2_import/views/admin_g2_import.html.php index fd8ae63c..e1443aa7 100644 --- a/modules/g2_import/views/admin_g2_import.html.php +++ b/modules/g2_import/views/admin_g2_import.html.php @@ -1,94 +1,96 @@ -

+

-
-

-

- -

-
    -
  • - not imported. You will have to set them again manually (for now).") ?> -
  • -
  • - -
  • -
  • - -
  • -
  • - php_value eaccelerator.enable 0 in gallery3/.htaccess") ?> -
  • -
-
- - - -
-

-
    -
  • - g2_import::version())) ?> -
  • - -
  • - Using the same value will speed up your import.", - array("g2_pixels" => $g2_sizes["thumb"]["size"], - "g3_pixels" => $thumb_size, - "url" => html::mark_clean(url::site("admin/theme_options")))) ?> -
  • - - - -
  • - Using the same value will speed up your import.", - array("g2_pixels" => $g2_sizes["resize"]["size"], - "g3_pixels" => $resize_size, - "url" => html::mark_clean(url::site("admin/theme_options")))) ?> -
  • - -
- -
+
+
+

- +

  • - + not imported. You will have to set them again manually (for now).") ?>
  • - +
  • - +
  • - + php_value eaccelerator.enable 0 in gallery3/.htaccess") ?>
  • -
  • - +
+
+ + + +
+

+
    +
  • + g2_import::version())) ?>
  • -
  • - + +
  • + Using the same value will speed up your import.", + array("g2_pixels" => $g2_sizes["thumb"]["size"], + "g3_pixels" => $thumb_size, + "url" => html::mark_clean(url::site("admin/theme_options")))) ?>
  • -
  • - + + + +
  • + Using the same value will speed up your import.", + array("g2_pixels" => $g2_sizes["resize"]["size"], + "g3_pixels" => $resize_size, + "url" => html::mark_clean(url::site("admin/theme_options")))) ?>
  • +
-
-

- "> - - -

+
+

+ +

+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+ +

+ "> + + +

+
+
-
diff --git a/modules/gallery/controllers/admin_languages.php b/modules/gallery/controllers/admin_languages.php index 8af1dd85..ccc631c7 100644 --- a/modules/gallery/controllers/admin_languages.php +++ b/modules/gallery/controllers/admin_languages.php @@ -112,7 +112,8 @@ class Admin_Languages_Controller extends Admin_Controller { $server_link = l10n_client::server_api_key_url(); $group->input("api_key") ->label(empty($api_key) - ? t("This is a unique key that will allow you to send translations to the remote server. To get your API key go to %server-link.", + ? t("This is a unique key that will allow you to send translations to the remote + server. To get your API key go to %server-link.", array("server-link" => html::mark_clean(html::anchor($server_link)))) : t("API Key")) ->value($api_key) diff --git a/modules/gallery/views/admin_graphics.html.php b/modules/gallery/views/admin_graphics.html.php index 95d0618c..0f4c0dd8 100644 --- a/modules/gallery/views/admin_graphics.html.php +++ b/modules/gallery/views/admin_graphics.html.php @@ -12,26 +12,28 @@ }); -
+

-

- - - - $tk->$active, "is_active" => true)) ?> - - -
-

- - - $tk->$id, "is_active" => false)) ?> +
+

+ + + + $tk->$active, "is_active" => true)) ?> - + +
+

+ + + $tk->$id, "is_active" => false)) ?> + + +
diff --git a/modules/gallery/views/admin_languages.html.php b/modules/gallery/views/admin_languages.html.php index 74f48b76..311672de 100644 --- a/modules/gallery/views/admin_languages.html.php +++ b/modules/gallery/views/admin_languages.html.php @@ -1,103 +1,112 @@ -
-

-

- -

+ - - - for_html_attr() ?>" /> - +
+

- -
- -
-

-

- -

+
+

+

+ +

-

+
+
"> + + + + + + + + + $display_name): ?> + +
+ + + + + + + "> + + + + + + +
+ +
+ for_html_attr() ?>" /> +
+
+
-
- for_html_attr() ?>"> - - +
+

+

+ +

-

Step 1: Make sure the target language is installed and up to date (check above).") ?>

+
+ for_html_attr() ?>"> + + -

Step 2: Make sure you have selected the right target language (currently %default_locale).", - array("default_locale" => locales::display_name())) ?>

+

-

Step 3: Start the translation mode and the translation interface will appear at the bottom of each Gallery page.") ?>

+

- - - get("l10n_mode", false)): ?> - - - - - -
+
    +
  • +
  • locales::display_name())) ?>
  • +
  • +
+ + + get("l10n_mode", false)): ?> + + + + + -

- +

+ +
+
+ +
diff --git a/modules/gallery/views/admin_maintenance.html.php b/modules/gallery/views/admin_maintenance.html.php index 94582dc8..73a4bef8 100644 --- a/modules/gallery/views/admin_maintenance.html.php +++ b/modules/gallery/views/admin_maintenance.html.php @@ -1,193 +1,195 @@ -
+

-
-

- - - - - - - - - severity) ?>"> - - - - - - -
- - - - - -
- name ?> - - description ?> - - callback?csrf=$csrf") ?>" - class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"> - - -
-
- - count()): ?> -
-

- - - - - - - - - - - - state == "stalled" ? "g-warning" : "" ?>"> - - - - - - - - - -
- - - - - - - - - - - " - class="g-button g-right ui-icon-left ui-state-default ui-corner-all"> - - -
"> - updated) ?> - - name ?> - - done): ?> - state == "cancelled"): ?> - - - - state == "stalled"): ?> - - - $task->percent_complete)) ?> - - - status ?> - - owner()->name) ?> - - id?csrf=$csrf") ?>" - class="g-button g-right ui-icon-left ui-state-default ui-corner-all"> - - - state == "stalled"): ?> - id?csrf=$csrf") ?>"> - - - -
-
- +
+
+

+ + + + + + + + + severity) ?>"> + + + + + + +
+ + + + + +
+ name ?> + + description ?> + + callback?csrf=$csrf") ?>" + class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"> + + +
+
- count()): ?> - + + + count()): ?> +
+

+ + + + + + + + + + + + state == "success" ? "g-success" : "g-error" ?>"> + + + + + + + + + +
+ + + + + + + + + + + " + class="g-button g-right ui-icon-left ui-state-default ui-corner-all"> + + +
"> + updated) ?> + + name ?> + + state == "success"): ?> + + state == "error"): ?> + + state == "cancelled"): ?> + + + + status ?> + + owner()->name) ?> + + done): ?> + id?csrf=$csrf") ?>" class="g-button ui-state-default ui-corner-all"> + + + get_log()): ?> + id?csrf=$csrf") ?>" class="g-dialog-link g-button ui-state-default ui-corner-all"> + + + + + id?csrf=$csrf") ?>" class="g-dialog-link g-button" ui-state-default ui-corner-all> + + + id?csrf=$csrf") ?>" class="g-button ui-state-default ui-corner-all"> + + + + +
+
+
-
diff --git a/modules/gallery/views/admin_modules.html.php b/modules/gallery/views/admin_modules.html.php index 75f4f0c5..4c4976f8 100644 --- a/modules/gallery/views/admin_modules.html.php +++ b/modules/gallery/views/admin_modules.html.php @@ -1,32 +1,34 @@ -
+

-
"> - - - - - - - - - - $module_info): ?> - "> - $module_name); ?> - locked) $data["disabled"] = 1; ?> - - - - - - - -
name) ?> version ?> description) ?>
- for_html_attr() ?>"/> -
+
+
"> + + + + + + + + + + $module_info): ?> + "> + $module_name); ?> + locked) $data["disabled"] = 1; ?> + + + + + + + +
name) ?> version ?> description) ?>
+ for_html_attr() ?>" /> +
+
diff --git a/modules/gallery/views/admin_sidebar.html.php b/modules/gallery/views/admin_sidebar.html.php index b4f339ae..ea950b54 100644 --- a/modules/gallery/views/admin_sidebar.html.php +++ b/modules/gallery/views/admin_sidebar.html.php @@ -1,7 +1,7 @@ -

-

- -

-
"> -
-

-
-
    - -
+
+

+

+ +

+ +
"> +
+

+
+
    + +
+
-
-
-

-
-
    - -
+
+

+
+
    + +
+
diff --git a/modules/gallery/views/admin_theme_options.html.php b/modules/gallery/views/admin_theme_options.html.php index e09be728..a4bf1c4e 100644 --- a/modules/gallery/views/admin_theme_options.html.php +++ b/modules/gallery/views/admin_theme_options.html.php @@ -1,6 +1,8 @@ -
+

+
+
diff --git a/modules/gallery/views/admin_themes.html.php b/modules/gallery/views/admin_themes.html.php index f7e77a01..dda18265 100644 --- a/modules/gallery/views/admin_themes.html.php +++ b/modules/gallery/views/admin_themes.html.php @@ -7,83 +7,88 @@ } -

-

- -

+
+

+

+ +

-
-

-
- " - alt="name) ?>" /> -

name ?>

-

- description ?> -

-
+
+ +
+

+
+ " + alt="name) ?>" /> +

name ?>

+

+ description ?> +

+
-
-

-
- " - alt="name) ?>" /> -

name ?>

-

- description ?> -

-
+

+
\ No newline at end of file diff --git a/modules/recaptcha/views/admin_recaptcha.html.php b/modules/recaptcha/views/admin_recaptcha.html.php index 3e964801..a0af3ba8 100644 --- a/modules/recaptcha/views/admin_recaptcha.html.php +++ b/modules/recaptcha/views/admin_recaptcha.html.php @@ -1,5 +1,5 @@ -
+

reCAPTCHA Public/Private Key pair, which is also free. Once registered, the challenge and response strings are evaluated at recaptcha.net to determine if the form content has been entered by a bot.", @@ -7,27 +7,29 @@ "recaptcha_url" => html::mark_clean("http://recaptcha.net"))) ?>

- -
+
+ - -
-

-

- -

+ +
+

+

+ +

-
- - +
+ + +
+
+ +
- - diff --git a/modules/server_add/views/admin_server_add.html.php b/modules/server_add/views/admin_server_add.html.php index e447ee6d..eae767af 100644 --- a/modules/server_add/views/admin_server_add.html.php +++ b/modules/server_add/views/admin_server_add.html.php @@ -1,25 +1,22 @@ -
-

- -

-
-

+
+

+
+

style="display: none;">
  • -
    -
    diff --git a/modules/tag/js/tag.js b/modules/tag/js/tag.js index 41fa4d41..4ed88e03 100644 --- a/modules/tag/js/tag.js +++ b/modules/tag/js/tag.js @@ -37,7 +37,7 @@ function editInPlace(element) { closeEditInPlaceForms(); // create edit form - var tag_id = $(this).attr('id').substr(5); + var tag_id = $(this).attr('rel'); var tag_name = $(this).html(); var tag_width = $(this).width(); $(this).parent().data("revert", $(this).parent().html()); @@ -67,7 +67,7 @@ function editInPlace(element) { console.log("success"); if (data.result == "success") { closeEditInPlaceForms(); // close form - $("#g-tag-" + data.tag_id).text(data.new_tagname); // update tagname + $(".g-tag[rel=" + data.tag_id + "]").text(data.new_tagname); // update tagname window.location.reload(); } else if (data.result == "error") { console.log("error"); diff --git a/modules/tag/views/admin_tags.html.php b/modules/tag/views/admin_tags.html.php index 7771f7fe..67ba4d95 100644 --- a/modules/tag/views/admin_tags.html.php +++ b/modules/tag/views/admin_tags.html.php @@ -1,5 +1,5 @@ - -

    - -

    - count()/5 ?> - - - - - + +
    - count()) ?> -
    - $tag): ?> - name, 0, 1)) ?> - - - -
      - - $tags_per_column): /* new column */ ?> -
    - - +
    +

    + +
    + + + + + - -
    + count()) ?> +
    + $tag): ?> + name, 0, 1)) ?> - - -
      - + + +
        + + $tags_per_column): /* new column */ ?> +
    + + + + + -
    + + + + +
    +
    +
    diff --git a/modules/user/views/admin_users.html.php b/modules/user/views/admin_users.html.php index 2f8d8673..aae39c8c 100644 --- a/modules/user/views/admin_users.html.php +++ b/modules/user/views/admin_users.html.php @@ -41,88 +41,93 @@ }); } -
    - " - class="g-dialog-link g-button g-right ui-icon-left ui-state-default ui-corner-all" - title="for_html_attr() ?>"> - - - -

    - -

    +
    +

    - - - - - - - - + user admin ? "admin" : "" ?>"> - - - - - - - -
    - " - title="for_html_attr() ?>" - alt="name) ?>" - width="20" - height="20" /> - name) ?> - - full_name) ?> - - email) ?> - - last_login == 0) ? "" : gallery::date($user->last_login) ?> - - id") ?>" - open_text="" - class="g-panel-link g-button ui-state-default ui-corner-all ui-icon-left"> - - id != $user->id && !$user->guest): ?> - id") ?>" - class="g-dialog-link g-button ui-state-default ui-corner-all ui-icon-left"> - - - for_html_attr() ?>" - class="g-button ui-state-disabled ui-corner-all ui-icon-left"> - - -
    -
    -
    +

    -
    - " - class="g-dialog-link g-button g-right ui-icon-left ui-state-default ui-corner-all" - title="for_html_attr() ?>"> - - - +
    + + + + + + + + -

    - -

    + $user): ?> + user admin ? "admin" : "" ?>"> + + + + + + + +
    + " + title="for_html_attr() ?>" + alt="name) ?>" + width="20" + height="20" /> + name) ?> + + full_name) ?> + + email) ?> + + last_login == 0) ? "" : gallery::date($user->last_login) ?> + + id") ?>" + open_text="" + class="g-panel-link g-button ui-state-default ui-corner-all ui-icon-left"> + + id != $user->id && !$user->guest): ?> + id") ?>" + class="g-dialog-link g-button ui-state-default ui-corner-all ui-icon-left"> + + + for_html_attr() ?>" + class="g-button ui-state-disabled ui-corner-all ui-icon-left"> + + +
    +
    +
    -
    -
      - $group): ?> -
    • " /> - group = $group; ?> - -
    • - -
    -
    + +
    diff --git a/modules/watermark/views/admin_watermarks.html.php b/modules/watermark/views/admin_watermarks.html.php index d034066a..af38cb41 100644 --- a/modules/watermark/views/admin_watermarks.html.php +++ b/modules/watermark/views/admin_watermarks.html.php @@ -1,37 +1,39 @@ -
    +

    - - " - title="for_html_attr() ?>" - class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"> - -

    -

    - -

    -
    -
    - -

    - watermark::position($position))) ?> -

    -

    - module::get_var("watermark", "transparency"))) ?> -

    -
    - diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index 1d60d392..20593e9c 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -107,11 +107,11 @@ td { border: none; border-bottom: 1px solid #ccc; padding: .5em; - vertical-align: top; + vertical-align: middle; } -#g-admin-maintenance td { - vertical-align: middle; +th { + white-space: nowrap; } /* Forms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ @@ -474,14 +474,6 @@ tr.g-warning { margin-right: 1em; } -#g-user-admin-list { - margin-bottom: 1em; -} - -#g-user-admin-list td { - vertical-align: bottom; -} - #g-user-admin-list .admin { color: #55f; font-weight: bold; @@ -531,36 +523,19 @@ li.g-default-group h4, li.g-default-group .g-user { color: gray; } -#g-admin-advanced-settings tr.setting:hover { - background: #ffc; -} - -/* admin/sidebar ~~~~~~~~~~~~~~~~~~~~~~~~~ */ -.g-admin-blocks-list { - float: left; - height: 300px; - margin-left: 20px; - width: 30%; -} +/* Block admin ~~~~~~~~~~~~~~~~~~~~~~~~~ */ -.g-admin-blocks-list div:last-child { - border: .1em solid; - height: 100%; - overflow-y: auto; +#g-admin-blocks .g-block { + margin-right: 2em; + height: 200px; + width: 30% !important; } -.g-admin-blocks-list ul { - height: 98%; - margin: .1em .1em; - padding: .1em; -} - -.g-admin-blocks-list ul li { - background-color: #e8e8e8; - font-size: 1em; - font-weight: bold; - margin: .5em; - padding: .3em .8em; +#g-admin-blocks .g-block li { + background: #e7e7e7; + /*border: 1px solid #fff;*/ + margin-bottom: 1em; + padding: .4em .8em; } /** ******************************************************************* @@ -797,20 +772,10 @@ li.g-default-group h4, li.g-default-group .g-user { } #g-languages-form table { - width: 400px; - float: left; + width: 40%; margin: 0 3em 1em 0; } -#g-languages-form .installed { - background-color: #EEEEEE; -} - -#g-languages-form .default { - background-color: #C5DBEC; - font-weight: bold; -} - #g-languages-form input { clear: both; } @@ -824,10 +789,6 @@ li.g-default-group h4, li.g-default-group .g-user { padding: .5em; } -.g-doc-link { - float: right; -} - /** ******************************************************************* * 7) Right to left styles *********************************************************************/ -- cgit v1.2.3 From 6a7db5bea15c346d069d42fef173a0f99393bf3d Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Sun, 18 Oct 2009 20:39:31 -0600 Subject: Resolve merge conflict. --- modules/gallery/helpers/module.php | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'modules/gallery') diff --git a/modules/gallery/helpers/module.php b/modules/gallery/helpers/module.php index fe37f4f9..77ec6f63 100644 --- a/modules/gallery/helpers/module.php +++ b/modules/gallery/helpers/module.php @@ -50,8 +50,20 @@ class module_Core { * @param string $module_name */ static function get($module_name) { - // @todo can't easily use model_cache here because it throw an exception on missing models. - return ORM::factory("module", array("name" => $module_name)); + if (empty(self::$modules[$module_name])) { + return ORM::factory("module", array("name" => $module_name)); + } + return self::$modules[$module_name]; + } + + /** + * Get the information about a module + * @returns ArrayObject containing the module information from the module.info file or false if + * not found + */ + static function info($module_name) { + $module_list = self::available(); + return isset($module_list->$module_name) ? $module_list->$module_name : false; } /** @@ -79,7 +91,8 @@ class module_Core { $modules = new ArrayObject(array(), ArrayObject::ARRAY_AS_PROPS); foreach (glob(MODPATH . "*/module.info") as $file) { $module_name = basename(dirname($file)); - $modules->$module_name = new ArrayObject(parse_ini_file($file), ArrayObject::ARRAY_AS_PROPS); + $modules->$module_name = + new ArrayObject(parse_ini_file($file), ArrayObject::ARRAY_AS_PROPS); $m =& $modules->$module_name; $m->installed = self::is_installed($module_name); $m->active = self::is_active($module_name); -- cgit v1.2.3 From b2d0b3ebbb1764593e387a2e07e0d4e67f4f5474 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Sun, 18 Oct 2009 23:38:27 -0600 Subject: Fix sidebar block admin layout. Don't hardcode block list height, use the equal_heights() function to set it. --- modules/gallery/views/admin_sidebar.html.php | 4 ++++ themes/admin_wind/css/screen.css | 7 +++---- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'modules/gallery') diff --git a/modules/gallery/views/admin_sidebar.html.php b/modules/gallery/views/admin_sidebar.html.php index ea950b54..030dfdce 100644 --- a/modules/gallery/views/admin_sidebar.html.php +++ b/modules/gallery/views/admin_sidebar.html.php @@ -1,5 +1,9 @@