summaryrefslogtreecommitdiff
path: root/modules/gallery/views
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-01-24 15:27:33 -0800
committerTim Almdal <tnalmdal@shaw.ca>2010-01-24 15:27:33 -0800
commit7c06e21ec443a46bd78bc9e99d8284283ff85c59 (patch)
treef30063fc106eaace4a02c01a9c857924213f7eb9 /modules/gallery/views
parent3b16d0662b8a4b06f4be72165c858a1231e9bd67 (diff)
Refactor creating the user profile page content into the the event module. The show_user_profile is used to provide content to the user profile page. Add the list of the users comments to the profile page.
Diffstat (limited to 'modules/gallery/views')
-rw-r--r--modules/gallery/views/user_profile.html.php37
-rw-r--r--modules/gallery/views/user_profile_info.html.php9
2 files changed, 24 insertions, 22 deletions
diff --git a/modules/gallery/views/user_profile.html.php b/modules/gallery/views/user_profile.html.php
index e7ce56b3..bcfa5346 100644
--- a/modules/gallery/views/user_profile.html.php
+++ b/modules/gallery/views/user_profile.html.php
@@ -1,9 +1,7 @@
<?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 div {
+ margin-top: 1em;
}
#g-user-profile fieldset {
@@ -25,30 +23,25 @@
}
</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 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><?= t("User information") ?></label>
+ <label><?= $info->title ?></label>
<div>
- <table>
- <? foreach ($fields as $field => $value): ?>
- <tr>
- <td><?= $field ?></td>
- <td><?= $value ?></td>
- </tr>
- <? endforeach ?>
- </table>
+ <?= $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"
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>