Adjust width of timetracking column. Make subtasks wrap not under icons

This commit is contained in:
Slade 2019-12-04 19:22:08 -07:00 committed by Frédéric Guillot
parent 061b4a676c
commit ad85637aa1
8 changed files with 42 additions and 21 deletions

View File

@ -1,5 +1,5 @@
<div class="dropdown"> <div class="dropdown">
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog"></i><i class="fa fa-caret-down"></i></a> <a href="#" class="dropdown-menu dropdown-menu-link-icon"><div class="subtask-submenu"><i class="fa fa-cog"></i><i class="fa fa-caret-down"></i></div></a>
<ul> <ul>
<li> <li>
<?= $this->modal->medium('edit', t('Edit'), 'SubtaskController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?> <?= $this->modal->medium('edit', t('Edit'), 'SubtaskController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?>

View File

@ -5,26 +5,28 @@
> >
<thead> <thead>
<tr> <tr>
<th class="column-45"><?= t('Title') ?></th> <th><?= t('Title') ?></th>
<th class="column-15"><?= t('Assignee') ?></th> <th class="column-10"><?= t('Assignee') ?></th>
<?= $this->hook->render('template:subtask:table:header:before-timetracking') ?> <?= $this->hook->render('template:subtask:table:header:before-timetracking') ?>
<th><?= t('Time tracking') ?></th> <th class="column-30"><?= t('Time tracking') ?></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php foreach ($subtasks as $subtask): ?> <?php foreach ($subtasks as $subtask): ?>
<tr data-subtask-id="<?= $subtask['id'] ?>"> <tr data-subtask-id="<?= $subtask['id'] ?>">
<td> <td>
<div class="subtask-table-td">
<?php if ($editable): ?> <?php if ($editable): ?>
<i class="fa fa-arrows-alt draggable-row-handle" title="<?= t('Change subtask position') ?>"></i>&nbsp; <i class="fa fa-arrows-alt draggable-row-handle" title="<?= t('Change subtask position') ?>"></i>&nbsp;
<?= $this->render('subtask/menu', array( <?= $this->render('subtask/menu', array(
'task' => $task, 'task' => $task,
'subtask' => $subtask, 'subtask' => $subtask,
)) ?> )) ?>
<?= $this->subtask->renderToggleStatus($task, $subtask, 'table') ?> <?= $this->subtask->renderToggleStatus($task, $subtask, 'table') ?>
<?php else: ?> <?php else: ?>
<?= $this->subtask->renderTitle($subtask) ?> <?= $this->subtask->renderTitle($subtask) ?>
<?php endif ?> <?php endif ?>
</div>
</td> </td>
<td> <td>
<?php if (! empty($subtask['username'])): ?> <?php if (! empty($subtask['username'])): ?>

View File

@ -4,9 +4,9 @@
<tr> <tr>
<th class="column-15"><?= t('Type') ?></th> <th class="column-15"><?= t('Type') ?></th>
<th><?= t('Title') ?></th> <th><?= t('Title') ?></th>
<th class="column-10"><?= t('Dependency') ?></th> <th class="column-15"><?= t('Dependency') ?></th>
<th class="column-15"><?= t('Creator') ?></th> <th class="column-15"><?= t('Creator') ?></th>
<th class="column-15"><?= t('Date') ?></th> <th class="column-10"><?= t('Date') ?></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@ -2,9 +2,9 @@
<table class="table-striped table-scrolling"> <table class="table-striped table-scrolling">
<tr> <tr>
<th><?= t('Filename') ?></th> <th><?= t('Filename') ?></th>
<th><?= t('Creator') ?></th> <th class="column-15"><?= t('Size') ?></th>
<th><?= t('Date') ?></th> <th class="column-15"><?= t('Creator') ?></th>
<th><?= t('Size') ?></th> <th class="column-10"><?= t('Date') ?></th>
</tr> </tr>
<?php foreach ($files as $file): ?> <?php foreach ($files as $file): ?>
<tr> <tr>
@ -34,15 +34,15 @@
</ul> </ul>
</div> </div>
</td> </td>
<td>
<?= $this->text->bytes($file['size']) ?>
</td>
<td> <td>
<?= $this->text->e($file['user_name'] ?: $file['username']) ?> <?= $this->text->e($file['user_name'] ?: $file['username']) ?>
</td> </td>
<td> <td>
<?= $this->dt->date($file['date']) ?> <?= $this->dt->date($file['date']) ?>
</td> </td>
<td>
<?= $this->text->bytes($file['size']) ?>
</td>
</tr> </tr>
<?php endforeach ?> <?php endforeach ?>
</table> </table>

View File

@ -5,13 +5,13 @@
<?php foreach ($grouped_links as $link): ?> <?php foreach ($grouped_links as $link): ?>
<?php if (! $hide_td): ?> <?php if (! $hide_td): ?>
<tr> <tr>
<th class="column-45"> <th>
<?= t('This task') ?> <?= t('This task') ?>
<em><?= t($label) ?></em> <em><?= t($label) ?></em>
<span class="task-links-task-count">(<?= count($grouped_links) ?>)</span> <span class="task-links-task-count">(<?= count($grouped_links) ?>)</span>
</th> </th>
<th class="column-15"><?= t('Assignee') ?></th> <th class="column-10"><?= t('Assignee') ?></th>
<th><?= t('Time tracking') ?></th> <th class="column-30"><?= t('Time tracking') ?></th>
</tr> </tr>
<?php $hide_td = true ?> <?php $hide_td = true ?>
<?php endif ?> <?php endif ?>

File diff suppressed because one or more lines are too long

View File

@ -27,3 +27,18 @@
border-left: none border-left: none
} }
} }
.subtasks-table .subtask-table-td {
display: flex;
white-space: normal;
min-width: 400px;
}
.subtasks-table .subtask-submenu {
display: flex
}
.js-subtask-toggle-status {
display: flex;
text-decoration: none
}

View File

@ -26,3 +26,7 @@
display: none display: none
} }
} }
.subtask-time-tracking {
white-space: normal
}