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. --- 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 ++-- 18 files changed, 852 insertions(+), 815 deletions(-) (limited to 'modules') 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 @@ -