Reverse the order of completed tasks in kanban block
This commit is contained in:
parent
1a81acbd9b
commit
2153875c90
1 changed files with 35 additions and 0 deletions
|
@ -0,0 +1,35 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @file views-view-list.tpl.php
|
||||||
|
* Default simple view template to display a list of rows.
|
||||||
|
*
|
||||||
|
* - $title : The title of this group of rows. May be empty.
|
||||||
|
* - $options['type'] will either be ul or ol.
|
||||||
|
* @ingroup views_templates
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<div class="item-list">
|
||||||
|
<?php if (!empty($title)) : ?>
|
||||||
|
<h3><?php print $title; ?></h3>
|
||||||
|
<?php endif; ?>
|
||||||
|
<<?php print $options['type']; ?>>
|
||||||
|
<?php foreach (array_reverse($rows) as $id => $row): ?>
|
||||||
|
<?php
|
||||||
|
global $user;
|
||||||
|
|
||||||
|
$task_class = '';
|
||||||
|
$task_assigned = $view->render_field('nid_1', $id);
|
||||||
|
if (!empty($task_assigned)) {
|
||||||
|
if ($user->stormperson_nid == $task_assigned) {
|
||||||
|
$task_class = ' task-own';
|
||||||
|
} elseif (module_exists('stormteam') && stormteam_user_belongs_to_team($task_assigned, $user->stormperson_nid)) {
|
||||||
|
$task_class = ' task-own';
|
||||||
|
} else {
|
||||||
|
$task_class = ' task-assigned';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<li class="<?php print $classes[$id] . $task_class; ?>"><?php print $row; ?></li>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</<?php print $options['type']; ?>>
|
||||||
|
</div>
|
Reference in a new issue