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_modules.html.php | 4 | ||||
-rw-r--r-- | modules/gallery/views/login_current_user.html.php | 8 | ||||
-rw-r--r-- | modules/gallery/views/user_profile.html.php | 68 | ||||
-rw-r--r-- | modules/gallery/views/user_profile_info.html.php | 9 |
5 files changed, 82 insertions, 9 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..453724cb 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($entry->user->id) ?>"><?= html::clean($entry->user->name) ?></a> <?= gallery::date_time($entry->timestamp) ?> <?= $entry->message ?> <?= $entry->html ?> diff --git a/modules/gallery/views/admin_modules.html.php b/modules/gallery/views/admin_modules.html.php index a021d969..26b2c87c 100644 --- a/modules/gallery/views/admin_modules.html.php +++ b/modules/gallery/views/admin_modules.html.php @@ -22,7 +22,7 @@ buttons: { <?= t("Continue")->for_js() ?>: function() { $("form", this).submit(); - $(".ui-dialog-buttonpane button:contains(Continue)") + $(".ui-dialog-buttonpane button:contains(<?= t("Continue") ?>)") .attr("disabled", "disabled") .addClass("ui-state-disabled"); }, @@ -32,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/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..708b1613 --- /dev/null +++ b/modules/gallery/views/user_profile.html.php @@ -0,0 +1,68 @@ +<?php defined("SYSPATH") or die("No direct script access.") ?> +<style> + #g-user-profile div { + margin-top: 1em; + } + + #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> + $(document).ready(function() { + $("#g-profile-return").click(function(event) { + history.go(-1); + }) + }); +</script> +<div id="g-user-profile"> + <h1> + <a href="#"> + <img src="<?= $user->avatar_url(40, $theme->url("images/avatar.jpg", true)) ?>" + alt="<?= html::clean_attribute($user->display_name()) ?>" + class="g-avatar" width="40" height="40" /> + </a> + <?= t("%name Profile", array("name" => $user->display_name())) ?> + </h1> + <? foreach ($info_parts as $info): ?> + <div> + <fieldset> + <label><?= $info->title ?></label> + <div> + <?= $info->view ?> + </div> + </fieldset> + </div> + <? endforeach ?> + <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 id="g-profile-return" class="g-button ui-icon-right ui-state-default ui-corner-all" href="#"> + <?= t("Return") ?> + </a> + </div> +</div>
\ No newline at end of file diff --git a/modules/gallery/views/user_profile_info.html.php b/modules/gallery/views/user_profile_info.html.php new file mode 100644 index 00000000..2a2549c8 --- /dev/null +++ b/modules/gallery/views/user_profile_info.html.php @@ -0,0 +1,9 @@ +<?php defined("SYSPATH") or die("No direct script access.") ?> +<table> + <? foreach ($fields as $field => $value): ?> + <tr> + <td><?= $field ?></td> + <td><?= $value ?></td> + </tr> + <? endforeach ?> +</table> |