Skip to content

Commit

Permalink
Displayed data "active" or not about the user.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-KM committed Apr 29, 2018
1 parent c82142a commit 6ce9283
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 5 deletions.
2 changes: 1 addition & 1 deletion application/asset/css/iconfonts.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion application/asset/css/style.css

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion application/asset/sass/_screen.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1390,7 +1390,8 @@ div[role="main"] {
}
}

td .o-icon-private {
td .o-icon-private,
td .o-icon-user-inactive {
display: inline-block;
vertical-align: bottom;
margin-left: .5em;
Expand Down
3 changes: 2 additions & 1 deletion application/asset/sass/_tablet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ footer {
width: 100%;
}

td .o-icon-private {
td .o-icon-private,
td .o-icon-user-inactive {
vertical-align: top;
margin: 0;
}
Expand Down
4 changes: 4 additions & 0 deletions application/asset/sass/iconfonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@
@extend .fa-eye-slash;
}

.o-icon-user-inactive {
@extend .fa-user-times;
}

.o-icon-activate {
@extend .fa-toggle-off;
}
Expand Down
5 changes: 5 additions & 0 deletions application/src/Api/Representation/UserRepresentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ public function role()
return $this->resource->getRole();
}

public function isActive()
{
return $this->resource->isActive();
}

public function created()
{
return $this->resource->getCreated();
Expand Down
3 changes: 3 additions & 0 deletions application/view/omeka/admin/user/browse.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ $sortHeadings = [
<tr>
<td>
<?php echo $user->link($user->email() . ' (' . $user->name() . ')'); ?>
<?php if (!$user->isActive()): ?>
<span class="o-icon-user-inactive"></span>
<?php endif; ?>
<ul class="actions">
<?php if ($user->userIsAllowed('update')): ?>
<li><?php echo $user->link('', 'edit', [
Expand Down
7 changes: 6 additions & 1 deletion application/view/omeka/admin/user/show-details.phtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<h3><a href="<?php echo $this->escapeHtml($resource->url()); ?>"><?php echo $this->escapeHtml($resource->name()); ?></a></h3>
<h3>
<a href="<?php echo $this->escapeHtml($resource->url()); ?>"><?php echo $this->escapeHtml($resource->name()); ?></a>
<?php if (!$resource->isActive()): ?>
<span class="user-inactive"><?php echo $this->translate('(inactive)'); ?></span>
<?php endif; ?>
</h3>

<div class="meta-group">
<h4><?php echo $this->translate('Items'); ?></h4>
Expand Down
6 changes: 6 additions & 0 deletions application/view/omeka/admin/user/show.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,10 @@
<?php echo $escape($this->translate($user->displayRole())); ?>
</div>
</div>
<div class="property">
<h4><?php echo $this->translate('Is active'); ?></h4>
<div class="value">
<?php echo $escape($user->isActive() ? $this->translate('yes') : $this->translate('no')); ?>
</div>
</div>
<?php $this->trigger('view.show.after'); ?>

0 comments on commit 6ce9283

Please sign in to comment.