diff --git a/src/IDF/Views/Issue.php b/src/IDF/Views/Issue.php index 7e1bb0c..8137557 100644 --- a/src/IDF/Views/Issue.php +++ b/src/IDF/Views/Issue.php @@ -61,9 +61,10 @@ class IDF_Views_Issue 'id' => __('Id'), array('summary', 'IDF_Views_Issue_SummaryAndLabels', __('Summary')), array('status', 'IDF_Views_Issue_ShowStatus', __('Status')), + array('due_dtime', 'IDF_Views_Issue_DueDate', __('Due Date')), array('modif_dtime', 'Pluf_Paginator_DateAgo', __('Last Updated')), ); - $pag->configure($list_display, array(), array('id', 'status', 'modif_dtime')); + $pag->configure($list_display, array(), array('id', 'status', 'due_dtime', 'modif_dtime')); $pag->items_per_page = 10; $pag->no_results_text = __('No issues were found.'); $pag->setFromRequest($request); @@ -220,9 +221,10 @@ class IDF_Views_Issue 'id' => __('Id'), array('summary', 'IDF_Views_Issue_SummaryAndLabels', __('Summary')), array('status', 'IDF_Views_Issue_ShowStatus', __('Status')), + array('due_dtime', 'IDF_Views_Issue_DueDate', __('Due Date')), array('modif_dtime', 'Pluf_Paginator_DateAgo', __('Last Updated')), ); - $pag->configure($list_display, array(), array('id', 'status', 'modif_dtime')); + $pag->configure($list_display, array(), array('id', 'status', 'due_dtime', 'modif_dtime')); $pag->items_per_page = 10; $pag->no_results_text = __('No issues were found.'); $pag->setFromRequest($request); @@ -302,9 +304,10 @@ class IDF_Views_Issue array('summary', 'IDF_Views_Issue_SummaryAndLabelsUnknownProject', __('Summary')), array('project', 'Pluf_Paginator_FkToString', __('Project')), array('status', 'IDF_Views_Issue_ShowStatus', __('Status')), + array('due_dtime', 'IDF_Views_Issue_DueDate', __('Due Date')), array('modif_dtime', 'Pluf_Paginator_DateAgo', __('Last Updated')), ); - $pag->configure($list_display, array(), array('id', 'project', 'status', 'modif_dtime')); + $pag->configure($list_display, array(), array('id', 'project', 'status', 'due_dtime', 'modif_dtime')); $pag->items_per_page = 10; $pag->no_results_text = __('No issues were found.'); $pag->setFromRequest($request); @@ -390,9 +393,10 @@ class IDF_Views_Issue 'id' => __('Id'), array('summary', 'IDF_Views_Issue_SummaryAndLabels', __('Summary')), array('status', 'IDF_Views_Issue_ShowStatus', __('Status')), + array('due_dtime', 'IDF_Views_Issue_DueDate', __('Due Date')), array('modif_dtime', 'Pluf_Paginator_DateAgo', __('Last Updated')), ); - $pag->configure($list_display, array(), array('id', 'status', 'modif_dtime')); + $pag->configure($list_display, array(), array('id', 'status', 'due_dtime', 'modif_dtime')); $pag->items_per_page = 10; $pag->no_results_text = __('No issues were found.'); $pag->setFromRequest($request); @@ -542,6 +546,7 @@ class IDF_Views_Issue 'id' => __('Id'), array('summary', 'IDF_Views_Issue_SummaryAndLabels', __('Summary')), array('status', 'IDF_Views_Issue_ShowStatus', __('Status')), + array('due_dtime', 'IDF_Views_Issue_DueDate', __('Due Date')), array('modif_dtime', 'Pluf_Paginator_DateAgo', __('Last Updated')), )); // disable paginating @@ -766,9 +771,10 @@ class IDF_Views_Issue 'id' => __('Id'), array('summary', 'IDF_Views_Issue_SummaryAndLabels', __('Summary')), array('status', 'IDF_Views_Issue_ShowStatus', __('Status')), + array('due_dtime', 'IDF_Views_Issue_DueDate', __('Due Date')), array('modif_dtime', 'Pluf_Paginator_DateAgo', __('Last Updated')), ); - $pag->configure($list_display, array(), array('id', 'status', 'modif_dtime')); + $pag->configure($list_display, array(), array('id', 'status', 'due_dtime', 'modif_dtime')); $pag->items_per_page = 10; $pag->no_results_text = __('No issues were found.'); $pag->setFromRequest($request); @@ -825,9 +831,10 @@ class IDF_Views_Issue 'id' => __('Id'), array('summary', 'IDF_Views_Issue_SummaryAndLabels', __('Summary')), array('status', 'IDF_Views_Issue_ShowStatus', __('Status')), + array('due_dtime', 'IDF_Views_Issue_DueDate', __('Due Date')), array('modif_dtime', 'Pluf_Paginator_DateAgo', __('Last Updated')), ); - $pag->configure($list_display, array(), array('id', 'status', 'modif_dtime')); + $pag->configure($list_display, array(), array('id', 'status', 'due_dtime', 'modif_dtime')); $pag->items_per_page = 10; $pag->no_results_text = __('No issues were found.'); $pag->setFromRequest($request); @@ -1017,6 +1024,14 @@ function IDF_Views_Issue_SummaryAndLabelsUnknownProject($field, $issue, $extra=' } /** + * Get the date value for the Due Date table column + */ +function IDF_Views_Issue_DueDate($field, $issue, $extra='') +{ + return $issue->$field; +} + +/** * Display the summary of an issue, then on a new line, display the * list of labels with a link to a view "by label only". * @@ -1038,8 +1053,11 @@ function IDF_Views_Issue_SummaryAndLabels($field, $issue, $extra='') $s = ''.__('On your watch list.').' '; } $out = ''; + if('' != $issue->due_dtime and (time() >= strtotime($issue->due_dtime))) { + $out = ' overdue'; + } if (count($tags)) { - $out = '
'.implode(', ', $tags).''; + $out .= '
'.implode(', ', $tags).''; } return $s.sprintf('%s', $edit, Pluf_esc($issue->summary)).$out; } diff --git a/www/media/idf/css/style.css b/www/media/idf/css/style.css index 8e12ddc..0ec23c2 100644 --- a/www/media/idf/css/style.css +++ b/www/media/idf/css/style.css @@ -180,6 +180,14 @@ table.recent-issues td { vertical-align: top; } +table.recent-issues td span.overdue { + font-weight: bold; + background-color: #c00; + color: #fff; + padding: 0 2px; + margin-left: 5px; +} + table.recent-issues tfoot th { text-align: right; }