35 lines
1.1 KiB
PHP
35 lines
1.1 KiB
PHP
<?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', count($rows) - 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>
|