From ce010bc12b8b0a03e662a2f4df984daa6d252fb8 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 28 Oct 2014 18:20:33 +0100 Subject: [PATCH] color modified date as files app does it --- controller/guicontroller.php | 11 +++++++++++ grauphel.css | 4 ++++ templates/tag.php | 6 +++--- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/controller/guicontroller.php b/controller/guicontroller.php index 6fffcb2..127daaf 100644 --- a/controller/guicontroller.php +++ b/controller/guicontroller.php @@ -157,6 +157,17 @@ class GuiController extends Controller } ); + foreach ($notes as &$note) { + $diffInDays = intval( + (time() - strtotime($note['last-change-date'])) / 86400 + ); + $value = 0 + $diffInDays; + if ($value > 160) { + $value = 160; + } + $note['dateColor'] = '#' . str_repeat(sprintf('%02X', $value), 3); + } + $res = new TemplateResponse('grauphel', 'tag'); $res->setParams( array( diff --git a/grauphel.css b/grauphel.css index 0cddce6..14eafb0 100644 --- a/grauphel.css +++ b/grauphel.css @@ -144,6 +144,10 @@ table.table td { background-position: 8px center; background-repeat: no-repeat; } +#headerTitle { + /* let it take all available space */ + width: 9999px; +} a.action.delete, table.table form button.action.delete { position: absolute; diff --git a/templates/tag.php b/templates/tag.php index b2cab02..a8752a4 100644 --- a/templates/tag.php +++ b/templates/tag.php @@ -9,8 +9,8 @@ - - + + @@ -20,7 +20,7 @@ - -- 2.30.2
TitleLast changeTitleModified
+