Change cards layout

This commit is contained in:
Frederic Guillot
2016-03-19 15:18:58 -04:00
parent 63a5bbafea
commit 8d036dc06c
6 changed files with 63 additions and 70 deletions

View File

@@ -20,12 +20,12 @@
<?php if (! empty($task['owner_id'])): ?> <?php if (! empty($task['owner_id'])): ?>
<div class="task-board-avatars"> <div class="task-board-avatars">
<span
<?php if ($this->user->hasProjectAccess('taskmodification', 'edit', $task['project_id'])): ?> <?php if ($this->user->hasProjectAccess('taskmodification', 'edit', $task['project_id'])): ?>
<div
class="task-board-assignee task-board-change-assignee" class="task-board-assignee task-board-change-assignee"
data-url="<?= $this->url->href('BoardPopover', 'changeAssignee', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"> data-url="<?= $this->url->href('BoardPopover', 'changeAssignee', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>">
<?php else: ?> <?php else: ?>
<div class="task-board-assignee"> class="task-board-assignee">
<?php endif ?> <?php endif ?>
<?= $this->avatar->small( <?= $this->avatar->small(
$task['owner_id'], $task['owner_id'],
@@ -34,7 +34,7 @@
$task['assignee_email'], $task['assignee_email'],
'avatar-inline' 'avatar-inline'
) ?> ) ?>
</div> </span>
</div> </div>
<?php endif ?> <?php endif ?>
@@ -95,6 +95,15 @@
<?php endif ?> <?php endif ?>
<?= $this->task->formatPriority($project, $task) ?> <?= $this->task->formatPriority($project, $task) ?>
<?php if ($task['is_active'] == 1): ?>
<div class="task-board-age">
<span title="<?= t('Task age in days')?>" class="task-board-age-total"><?= $this->dt->age($task['date_creation']) ?></span>
<span title="<?= t('Days in this column')?>" class="task-board-age-column"><?= $this->dt->age($task['date_moved']) ?></span>
</div>
<?php else: ?>
<span class="task-board-closed"><i class="fa fa-ban fa-fw"></i><?= t('Closed') ?></span>
<?php endif ?>
</div> </div>
<?= $this->hook->render('template:board:task:footer', array('task' => $task)) ?> <?= $this->hook->render('template:board:task:footer', array('task' => $task)) ?>

View File

@@ -44,20 +44,11 @@
</span> </span>
<?php endif ?> <?php endif ?>
<?php if ($task['is_active'] == 1): ?>
<div class="task-board-days">
<span title="<?= t('Task age in days')?>" class="task-days-age"><?= $this->dt->age($task['date_creation']) ?></span>
<span title="<?= t('Days in this column')?>" class="task-days-incolumn"><?= $this->dt->age($task['date_moved']) ?></span>
</div>
<?php else: ?>
<div class="task-board-closed"><i class="fa fa-ban fa-fw"></i><?= t('Closed') ?></div>
<?php endif ?>
<?= $this->hook->render('template:board:private:task:before-title', array('task' => $task)) ?> <?= $this->hook->render('template:board:private:task:before-title', array('task' => $task)) ?>
<div class="task-board-title"> <span class="task-board-title">
<?= $this->url->link($this->text->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> <?= $this->url->link($this->text->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
</div> </span>
<?= $this->hook->render('template:board:private:task:after-title', array('task' => $task)) ?> <?= $this->hook->render('template:board:private:task:after-title', array('task' => $task)) ?>

View File

@@ -10,9 +10,9 @@
<?= $this->hook->render('template:board:public:task:before-title', array('task' => $task)) ?> <?= $this->hook->render('template:board:public:task:before-title', array('task' => $task)) ?>
<div class="task-board-title"> <span class="task-board-title">
<?= $this->url->link($this->text->e($task['title']), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?> <?= $this->url->link($this->text->e($task['title']), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?>
</div> </span>
<?= $this->hook->render('template:board:public:task:after-title', array('task' => $task)) ?> <?= $this->hook->render('template:board:public:task:after-title', array('task' => $task)) ?>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +1,15 @@
/* task listing table */
.task-table .dropdown-menu {
color: #000;
text-decoration: none;
font-weight: bold;
}
.task-table .dropdown-menu:focus,
.task-table .dropdown-menu:hover {
text-decoration: underline;
}
/* task inside the board */ /* task inside the board */
.task-board { .task-board {
position: relative; position: relative;
@@ -17,71 +29,64 @@ div.task-board-status-closed {
border: 1px dotted #555; border: 1px dotted #555;
} }
.task-table a,
.task-board a { .task-board a {
color: #000; color: #000;
text-decoration: none; text-decoration: none;
}
.task-board .dropdown-menu {
font-weight: bold; font-weight: bold;
} }
.task-table a:focus, .task-board-title a:hover {
.task-table a:hover,
.task-board a:focus,
.task-board a:hover {
text-decoration: underline; text-decoration: underline;
} }
.task-board-title {
margin-left: 5px;
font-size: 1.15em;
}
.task-board-collapsed { .task-board-collapsed {
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
a.task-board-collapsed-title { .task-board-change-assignee:hover {
font-weight: normal; opacity: 0.6;
}
.task-board .dropdown {
font-size: 1.1em;
}
.task-board-title {
margin-top: 5px;
margin-bottom: 5px;
font-size: 1.1em;
}
.task-board-title a {
font-weight: normal;
} }
.task-board-change-assignee { .task-board-change-assignee {
cursor: pointer; cursor: pointer;
} }
a.task-board-nobody { /* category label */
font-weight: normal;
font-style: italic;
color: #444;
}
.task-board-category-container { .task-board-category-container {
text-align: right; margin-top: 8px;
} }
.task-board-category { .task-board-category {
font-weight: bold; font-weight: bold;
font-size: 0.9em;
color: #000; color: #000;
border: 1px solid #555; border: 1px solid #555;
padding: 2px; padding: 1px 2px 1px 2px;
padding-right: 5px; border-radius: 4px;
padding-left: 5px;
} }
.task-board-category:hover {
opacity: 0.6;
}
/* avatars on the card */
.task-board-avatars {
text-align: right;
}
/* task icons footer */
.task-board-icons { .task-board-icons {
text-align: right; text-align: right;
margin-top: 8px; margin-top: 4px;
} }
.task-board-icons a { .task-board-icons a {
@@ -115,39 +120,27 @@ span.task-board-date-overdue {
} }
/* task age */ /* task age */
.task-board-closed, .task-board-age {
.task-board-days { display: inline-block;
position: absolute; font-size: 0.9em;
right: 5px;
top: 5px;
opacity: 0.5;
font-size: 0.8em;
} }
.task-board-days:hover { span.task-board-age-total {
opacity: 1.0;
}
.task-days-age {
border: #666 1px solid; border: #666 1px solid;
padding: 1px 4px 1px 2px; padding: 1px 2px 1px 2px;
border-top-left-radius: 3px; border-top-left-radius: 3px;
border-bottom-left-radius: 3px; border-bottom-left-radius: 3px;
} }
.task-days-incolumn { span.task-board-age-column {
border: #666 1px solid; border: #666 1px solid;
border-left: none; border-left: none;
margin-left: -5px; margin-left: -5px;
padding: 1px 2px 1px 4px; padding: 1px 2px 1px 2px;
border-top-right-radius: 3px; border-top-right-radius: 3px;
border-bottom-right-radius: 3px; border-bottom-right-radius: 3px;
} }
.board-container-compact .task-board-days {
display: none;
}
/* task summary */ /* task summary */
#task-summary { #task-summary {
margin-bottom: 15px; margin-bottom: 15px;