Small changes to users presentation

- Fixed W3C validation in user list
- Fixed post CSS were not included
- Added link to delete account under "options" (for consistency sake)
This commit is contained in:
Marcin Kurczewski 2013-10-19 19:34:15 +02:00
parent ea463cb0db
commit 440029d6d6
3 changed files with 10 additions and 1 deletions

View file

@ -321,6 +321,7 @@ class UserController
PrivilegesHelper::confirmWithException(Privilege::ViewUser, PrivilegesHelper::getIdentitySubPrivilege($user)); PrivilegesHelper::confirmWithException(Privilege::ViewUser, PrivilegesHelper::getIdentitySubPrivilege($user));
$this->context->stylesheets []= 'user-view.css'; $this->context->stylesheets []= 'user-view.css';
$this->context->stylesheets []= 'post-list.css'; $this->context->stylesheets []= 'post-list.css';
$this->context->stylesheets []= 'post-small.css';
$this->context->stylesheets []= 'paginator.css'; $this->context->stylesheets []= 'paginator.css';
if ($this->config->browsing->endlessScrolling) if ($this->config->browsing->endlessScrolling)
$this->context->scripts []= 'paginator-endless.js'; $this->context->scripts []= 'paginator-endless.js';

View file

@ -32,7 +32,7 @@
<?php foreach ($this->context->transport->users as $user): ?> <?php foreach ($this->context->transport->users as $user): ?>
<div class="user"> <div class="user">
<a href="<?php echo \Chibi\UrlHelper::route('user', 'view', ['name' => $user->name]) ?>"> <a href="<?php echo \Chibi\UrlHelper::route('user', 'view', ['name' => $user->name]) ?>">
<img src="<?php echo $user->getAvatarUrl(100) ?>" alt="<?php echo $user->name ?>"/> <img src="<?php echo htmlspecialchars($user->getAvatarUrl(100)) ?>" alt="<?php echo $user->name ?>"/>
</a> </a>
<div class="details"> <div class="details">
<h1> <h1>

View file

@ -57,6 +57,14 @@
</li> </li>
<?php endif ?> <?php endif ?>
<?php if (PrivilegesHelper::confirm(Privilege::DeleteUser, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->user))): ?>
<li class="edit">
<a href="<?php echo \Chibi\UrlHelper::route('user', 'delete', ['name' => $this->context->transport->user->name, 'tab' => 'delete']) ?>">
Delete account
</a>
</li>
<?php endif ?>
<?php if (PrivilegesHelper::confirm(Privilege::BanUser, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->user))): ?> <?php if (PrivilegesHelper::confirm(Privilege::BanUser, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->user))): ?>
<?php if (!$this->context->transport->user->banned): ?> <?php if (!$this->context->transport->user->banned): ?>
<li class="ban"> <li class="ban">