diff options
Diffstat (limited to 'modules/gallery/views')
-rw-r--r-- | modules/gallery/views/admin_block_log_entries.html.php | 2 | ||||
-rw-r--r-- | modules/gallery/views/admin_identity.html.php | 59 | ||||
-rw-r--r-- | modules/gallery/views/admin_identity_confirm.html.php | 10 | ||||
-rw-r--r-- | modules/gallery/views/admin_modules.html.php | 5 | ||||
-rw-r--r-- | modules/gallery/views/form_uploadify.html.php | 12 | ||||
-rw-r--r-- | modules/gallery/views/login_current_user.html.php | 8 | ||||
-rw-r--r-- | modules/gallery/views/user_profile.html.php | 69 |
7 files changed, 85 insertions, 80 deletions
diff --git a/modules/gallery/views/admin_block_log_entries.html.php b/modules/gallery/views/admin_block_log_entries.html.php index 780ff2d0..90ce88a7 100644 --- a/modules/gallery/views/admin_block_log_entries.html.php +++ b/modules/gallery/views/admin_block_log_entries.html.php @@ -2,7 +2,7 @@ <ul> <? foreach ($entries as $entry): ?> <li class="<?= log::severity_class($entry->severity) ?>" style="direction: ltr"> - <a href="<?= url::site("user/$entry->user_id") ?>"><?= html::clean($entry->user->name) ?></a> + <a href="<?= user_profile::url($entryr->id) ?>"><?= html::clean($entry->user->name) ?></a> <?= gallery::date_time($entry->timestamp) ?> <?= $entry->message ?> <?= $entry->html ?> diff --git a/modules/gallery/views/admin_identity.html.php b/modules/gallery/views/admin_identity.html.php deleted file mode 100644 index 51eaa58a..00000000 --- a/modules/gallery/views/admin_identity.html.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php defined("SYSPATH") or die("No direct script access.") ?> -<script type="text/javascript"> - $(document).ready(function() { - $("#g-modules form").submit(function() { - var eDialog = '<div id="g-dialog"></div>'; - var params = $(this).serialize(); - var url = $(this).attr("action"); - $("body").append(eDialog); - $.post($(this).attr("action"), $(this).serialize(), function(data, textStatus) { - $("#g-dialog").html(data); - $("#g-dialog").dialog({ - bgiframe: true, - title: <?= t("Confirm identity provider change")->for_js() ?>, - resizable: false, - height:180, - modal: true, - overlay: { - backgroundColor: '#000', - opacity: 0.5 - }, - buttons: { - "Continue": function() { - $("#g-dialog form").submit(); - }, - Cancel: function() { - $(this).dialog('destroy').remove(); - } - } - }); - }); - return false; - }); - }); - -</script> -<div id="g-modules"> - <h1> <?= t("Manage identity providers") ?> </h1> - <p> - <?= t("Choose a different user/group management provider.") ?> - </p> - - <form method="post" action="<?= url::site("admin/identity/confirm") ?>"> - <?= access::csrf_form_field() ?> - <table> - <tr> - <th> <?= t("Active") ?> </th> - <th> <?= t("Description") ?> </th> - </tr> - <? foreach ($available as $module_name => $description): ?> - <tr class="<?= text::alternate("g-odd", "g-even") ?>"> - <? $data = array("name" => "provider"); ?> - <td> <?= form::radio($data, $module_name, $module_name == $active) ?> </td> - <td> <?= t($description) ?> </td> - </tr> - <? endforeach ?> - </table> - <input type="submit" value="<?= t("Change")->for_html_attr() ?>" /> - </form> -</div> diff --git a/modules/gallery/views/admin_identity_confirm.html.php b/modules/gallery/views/admin_identity_confirm.html.php deleted file mode 100644 index 54aae9c8..00000000 --- a/modules/gallery/views/admin_identity_confirm.html.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php defined("SYSPATH") or die("No direct script access.") ?> -<form method="post" action="<?= url::site("admin/identity/change") ?>"> - <?= access::csrf_form_field() ?> - <?= form::hidden("provider", $new_provider) ?> - - <p><span class="ui-icon ui-icon-alert" style="float: left; margin:0 7px 20px 0;"></span> - <?= t("Are you sure you want to change your Identity Provider? Continuing will delete all existing users.") ?> - </p> -</form> - diff --git a/modules/gallery/views/admin_modules.html.php b/modules/gallery/views/admin_modules.html.php index 704e7beb..26b2c87c 100644 --- a/modules/gallery/views/admin_modules.html.php +++ b/modules/gallery/views/admin_modules.html.php @@ -22,6 +22,9 @@ buttons: { <?= t("Continue")->for_js() ?>: function() { $("form", this).submit(); + $(".ui-dialog-buttonpane button:contains(<?= t("Continue") ?>)") + .attr("disabled", "disabled") + .addClass("ui-state-disabled"); }, <?= t("Cancel")->for_js() ?>: function() { $(this).dialog("destroy").remove(); @@ -29,7 +32,7 @@ } }); if (!data.allow_continue) { - $(".ui-dialog-buttonpane button:contains(Continue)") + $(".ui-dialog-buttonpane button:contains(<?= t("Continue") ?>)") .attr("disabled", "disabled") .addClass("ui-state-disabled"); } diff --git a/modules/gallery/views/form_uploadify.html.php b/modules/gallery/views/form_uploadify.html.php index f3b9c883..b3b81ecb 100644 --- a/modules/gallery/views/form_uploadify.html.php +++ b/modules/gallery/views/form_uploadify.html.php @@ -2,17 +2,21 @@ <style> #g-add-photos-canvas object { height: 33px; - left: -60px; + left: -80px; position: relative; z-index: 100; } +#g-add-photos-canvas span { + height: 33px; + width: 150px; +} #g-add-photos-button { float: left; - left: 175px; + left: 155px; padding-bottom: .5em; padding-top: .5em; position: relative; - width: 110px; + width: 150px; z-index: 1; } </style> @@ -21,6 +25,8 @@ <script type="text/javascript"> $("#g-add-photos-canvas").ready(function () { $("#g-uploadify").uploadify({ + width: 150, + height: 33, uploader: "<?= url::file("lib/uploadify/uploadify.swf") ?>", script: "<?= url::site("simple_uploader/add_photo/{$album->id}") ?>", scriptData: <?= json_encode($script_data) ?>, diff --git a/modules/gallery/views/login_current_user.html.php b/modules/gallery/views/login_current_user.html.php index e3b3688f..94525576 100644 --- a/modules/gallery/views/login_current_user.html.php +++ b/modules/gallery/views/login_current_user.html.php @@ -1,11 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <li> <? $name = $menu->label->for_html() ?> - <? if (identity::is_writable()): ?> + <? $hover_text = t("Your profile")->for_html_attr() ?> <?= t("Logged in as %name", array("name" => html::mark_clean( - "<a href='$menu->url' title='" . t("Edit your profile")->for_html_attr() . - "' id='$menu->id' class='g-dialog-link'>{$name}</a>"))) ?> - <? else: ?> - <?= t("Logged in as %name", array("name" => $name)) ?> - <? endif ?> + "<a href='$menu->url' title='$hover_text' id='$menu->id'>{$name}</a>"))) ?> </li> diff --git a/modules/gallery/views/user_profile.html.php b/modules/gallery/views/user_profile.html.php new file mode 100644 index 00000000..e7ce56b3 --- /dev/null +++ b/modules/gallery/views/user_profile.html.php @@ -0,0 +1,69 @@ +<?php defined("SYSPATH") or die("No direct script access.") ?> +<style> + #g-user-profile #g-profile-buttons { + bottom: 0; + position: absolute; + right: 0; + } + + #g-user-profile fieldset { + border: 1px solid #CCCCCC; + padding: 0 1em 0.8em; + } + + #g-user-profile fieldset label { + font-weight: bold; + } + + #g-user-profile fieldset div { + padding-left: 1em; + } + + #g-user-profile td { + border: none; + padding: 0; + } + +</style> +<script> + $("#g-user-profile").ready(function() { + //$("#g-profile-return").click(function(event) { + // window.location = <?= $return->for_js() ?>; + //}); + }); +</script> +<div id="g-user-profile" style="height: <?= $height ?>px"> + <h1 style="display: none"><?= t("%name Profile", array("name" => $user->display_name())) ?></h1> + <div> + <fieldset> + <label><?= t("User information") ?></label> + <div> + <table> + <? foreach ($fields as $field => $value): ?> + <tr> + <td><?= $field ?></td> + <td><?= $value ?></td> + </tr> + <? endforeach ?> + </table> + </div> + </fieldset> + </div> + <div id="g-profile-buttons" class="ui-helper-clearfix g-right"> + <? if (!$user->guest && $not_current && !empty($user->email)): ?> + <a class="g-button ui-icon-right ui-state-default ui-corner-all g-dialog-link" + href="<?= url::site("user_profile/contact/{$user->id}") ?>"> + <?= t("Contact") ?> + </a> + <? endif ?> + <? if ($editable): ?> + <a class="g-button ui-icon-right ui-state-default ui-corner-all g-dialog-link" href="<?= url::site("form/edit/users/{$user->id}") ?>"> + <?= t("Edit") ?> + </a> + <? endif ?> + + <a class="g-button ui-icon-right ui-state-default ui-corner-all" href="<?= $return->for_html_attr() ?>"> + <?= t("Return") ?> + </a> + </div> +</div>
\ No newline at end of file |