summaryrefslogtreecommitdiff
path: root/themes/greydragon_old/views/user_profile.html.php
blob: 587eec2784a400e2846300941bb2fe3a36ea17b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php defined("SYSPATH") or die("No direct script access.") ?>
<script type="text/javascript">
  $(document).ready(function() {
    $("#g-profile-return").click(function(event) {
      history.go(-1);
      return false;
    })
  });
</script>

<div id="g-user-profile">
  <h1><?= t("User profile: %name", array("name" => $user->display_name())) ?></h1>
  <div id="g-user-profile-operations">
    <a id="g-profile-return" class="g-button ui-state-default ui-corner-all" href="#">
      <?= t("Return") ?>
    </a>
<? if ($editable): ?>
    <a class="g-button ui-state-default ui-corner-all g-dialog-link" href="<?= url::site("form/edit/users/{$user->id}") ?>">
      <?= t("Edit") ?>
    </a>
    <a class="g-button ui-state-default ui-corner-all g-dialog-link" href="<?= url::site("users/form_change_email/{$user->id}") ?>">
      <?= t("Change email") ?>
    </a>
    <a class="g-button ui-state-default ui-corner-all g-dialog-link" href="<?= url::site("users/form_change_password/{$user->id}") ?>">
      <?= t("Change password") ?>
    </a>
<? endif ?>
<? if ($contactable): ?>
    <a class="g-button ui-state-default ui-corner-all g-dialog-link"
       href="<?= url::site("user_profile/contact/{$user->id}") ?>">
      <?= t("Contact") ?>
    </a>
<? endif ?>
  </div>
  <img src="<?= $user->avatar_url(40, $theme->url("images/avatar.jpg", true)) ?>"
     alt="<?= html::clean_attribute($user->display_name()) ?>"
     class="g-avatar g-left" width="40" height="40" />
<? foreach ($info_parts as $info): ?>
  <div class="g-block">
    <h2><?= html::purify($info->title) ?></h2>
    <div class="g-block-content"><?= $info->view ?></div>
  </div>
<? endforeach ?>
</div>