Improve css for tables
This commit is contained in:
parent
7eadf7cfd8
commit
7a5b78dbc6
|
|
@ -105,7 +105,7 @@ class Project extends Base
|
|||
* @param string $direction Sorting direction
|
||||
* @return array Project properties
|
||||
*/
|
||||
public function getSummary(array $project_ids, $status = self::ACTIVE, $order = 'last_modified', $direction = 'desc')
|
||||
public function getSummary(array $project_ids, $status = self::ACTIVE, $order = 'name', $direction = 'asc')
|
||||
{
|
||||
if (empty($project_ids)) {
|
||||
return array();
|
||||
|
|
|
|||
|
|
@ -18,11 +18,11 @@
|
|||
<?php if (empty($projects)): ?>
|
||||
<p class="alert"><?= t('Your are not member of any project.') ?></p>
|
||||
<?php else: ?>
|
||||
<table>
|
||||
<table class="table-fixed">
|
||||
<tr>
|
||||
<th width="5%"> </th>
|
||||
<th width="15%"><?= t('Project') ?></th>
|
||||
<th width="75%"><?= t('Columns') ?></th>
|
||||
<th class="column-8"> </th>
|
||||
<th class="column-20"><?= t('Project') ?></th>
|
||||
<th><?= t('Columns') ?></th>
|
||||
</tr>
|
||||
<?php foreach ($projects as $project): ?>
|
||||
<tr>
|
||||
|
|
@ -50,12 +50,12 @@
|
|||
<?php if (empty($tasks)): ?>
|
||||
<p class="alert"><?= t('There is nothing assigned to you.') ?></p>
|
||||
<?php else: ?>
|
||||
<table>
|
||||
<table class="table-fixed">
|
||||
<tr>
|
||||
<th width="5%"> </th>
|
||||
<th width="15%"><?= t('Project') ?></th>
|
||||
<th width="60%"><?= t('Task') ?></th>
|
||||
<th width="20%"><?= t('Due date') ?></th>
|
||||
<th class="column-8"> </th>
|
||||
<th class="column-20"><?= t('Project') ?></th>
|
||||
<th><?= t('Task') ?></th>
|
||||
<th class="column-20"><?= t('Due date') ?></th>
|
||||
</tr>
|
||||
<?php foreach ($tasks as $task): ?>
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
<table>
|
||||
<table class="table-fixed table-small">
|
||||
<tr>
|
||||
<th><?= Helper\order(t('Id'), 'tasks.id', $pagination) ?></th>
|
||||
<th><?= Helper\order(t('Column'), 'tasks.column_id', $pagination) ?></th>
|
||||
<th><?= Helper\order(t('Category'), 'tasks.category_id', $pagination) ?></th>
|
||||
<th class="column-8"><?= Helper\order(t('Id'), 'tasks.id', $pagination) ?></th>
|
||||
<th class="column-8"><?= Helper\order(t('Column'), 'tasks.column_id', $pagination) ?></th>
|
||||
<th class="column-8"><?= Helper\order(t('Category'), 'tasks.category_id', $pagination) ?></th>
|
||||
<th><?= Helper\order(t('Title'), 'tasks.title', $pagination) ?></th>
|
||||
<th><?= Helper\order(t('Assignee'), 'users.username', $pagination) ?></th>
|
||||
<th><?= Helper\order(t('Due date'), 'tasks.date_due', $pagination) ?></th>
|
||||
<th><?= Helper\order(t('Date created'), 'tasks.date_creation', $pagination) ?></th>
|
||||
<th><?= Helper\order(t('Date completed'), 'tasks.date_completed', $pagination) ?></th>
|
||||
<th><?= Helper\order(t('Status'), 'tasks.is_active', $pagination) ?></th>
|
||||
<th class="column-10"><?= Helper\order(t('Assignee'), 'users.username', $pagination) ?></th>
|
||||
<th class="column-10"><?= Helper\order(t('Due date'), 'tasks.date_due', $pagination) ?></th>
|
||||
<th class="column-10"><?= Helper\order(t('Date created'), 'tasks.date_creation', $pagination) ?></th>
|
||||
<th class="column-10"><?= Helper\order(t('Date completed'), 'tasks.date_completed', $pagination) ?></th>
|
||||
<th class="column-5"><?= Helper\order(t('Status'), 'tasks.is_active', $pagination) ?></th>
|
||||
</tr>
|
||||
<?php foreach ($tasks as $task): ?>
|
||||
<tr>
|
||||
|
|
@ -35,11 +35,11 @@
|
|||
<?= dt('%B %e, %Y', $task['date_due']) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= dt('%B %e, %Y at %k:%M %p', $task['date_creation']) ?>
|
||||
<?= dt('%B %e, %Y', $task['date_creation']) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($task['date_completed']): ?>
|
||||
<?= dt('%B %e, %Y at %k:%M %p', $task['date_completed']) ?>
|
||||
<?= dt('%B %e, %Y', $task['date_completed']) ?>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<td>
|
||||
|
|
|
|||
|
|
@ -105,6 +105,53 @@ th a {
|
|||
th a:focus,
|
||||
th a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.table-fixed {
|
||||
table-layout: fixed;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.table-fixed td {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.column-5 {
|
||||
width: 5%;
|
||||
}
|
||||
|
||||
.column-8 {
|
||||
width: 7.5%;
|
||||
}
|
||||
|
||||
.column-10 {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.column-20 {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.column-30 {
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.column-40 {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.column-50 {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.column-60 {
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.column-70 {
|
||||
width: 70%;
|
||||
}/* forms */
|
||||
form {
|
||||
margin-bottom: 20px;
|
||||
|
|
|
|||
|
|
@ -41,4 +41,51 @@ th a {
|
|||
th a:focus,
|
||||
th a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.table-fixed {
|
||||
table-layout: fixed;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.table-fixed td {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.column-5 {
|
||||
width: 5%;
|
||||
}
|
||||
|
||||
.column-8 {
|
||||
width: 7.5%;
|
||||
}
|
||||
|
||||
.column-10 {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.column-20 {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.column-30 {
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.column-40 {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.column-50 {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.column-60 {
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.column-70 {
|
||||
width: 70%;
|
||||
}
|
||||
Loading…
Reference in New Issue