summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Model/Project.php2
-rw-r--r--app/Template/app/index.php18
-rw-r--r--app/Template/task_table.php22
-rw-r--r--assets/css/app.css47
-rw-r--r--assets/css/table.css47
5 files changed, 115 insertions, 21 deletions
diff --git a/app/Model/Project.php b/app/Model/Project.php
index ad64edcd..305e3f1e 100644
--- a/app/Model/Project.php
+++ b/app/Model/Project.php
@@ -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();
diff --git a/app/Template/app/index.php b/app/Template/app/index.php
index 1aa5819a..89550e05 100644
--- a/app/Template/app/index.php
+++ b/app/Template/app/index.php
@@ -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%">&nbsp;</th>
- <th width="15%"><?= t('Project') ?></th>
- <th width="75%"><?= t('Columns') ?></th>
+ <th class="column-8">&nbsp;</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%">&nbsp;</th>
- <th width="15%"><?= t('Project') ?></th>
- <th width="60%"><?= t('Task') ?></th>
- <th width="20%"><?= t('Due date') ?></th>
+ <th class="column-8">&nbsp;</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>
diff --git a/app/Template/task_table.php b/app/Template/task_table.php
index fa04fa55..2f856661 100644
--- a/app/Template/task_table.php
+++ b/app/Template/task_table.php
@@ -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>
diff --git a/assets/css/app.css b/assets/css/app.css
index 08deefb7..a23fca2d 100644
--- a/assets/css/app.css
+++ b/assets/css/app.css
@@ -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;
diff --git a/assets/css/table.css b/assets/css/table.css
index 008b4bbf..c5ddb4c0 100644
--- a/assets/css/table.css
+++ b/assets/css/table.css
@@ -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%;
} \ No newline at end of file