- "Age" column is now optional for the "list" and "next" reports.
This commit is contained in:
3
TUTORIAL
3
TUTORIAL
@@ -650,6 +650,9 @@ Configuring Task
|
|||||||
YMD 20080607
|
YMD 20080607
|
||||||
m-d-y 6-7-08
|
m-d-y 6-7-08
|
||||||
|
|
||||||
|
showage May be "yes" or "no". Determines whether the "Age"
|
||||||
|
column appears on the "list" and "next" reports.
|
||||||
|
|
||||||
color May be "on" or "off". Determines whether task uses
|
color May be "on" or "off". Determines whether task uses
|
||||||
color.
|
color.
|
||||||
|
|
||||||
|
|||||||
32
src/task.cpp
32
src/task.cpp
@@ -409,6 +409,8 @@ void handleList (const TDB& tdb, T& task, Config& conf)
|
|||||||
|
|
||||||
initializeColorRules (conf);
|
initializeColorRules (conf);
|
||||||
|
|
||||||
|
bool showAge = conf.get ("showage", true);
|
||||||
|
|
||||||
// Create a table for output.
|
// Create a table for output.
|
||||||
Table table;
|
Table table;
|
||||||
table.setTableWidth (width);
|
table.setTableWidth (width);
|
||||||
@@ -417,7 +419,7 @@ void handleList (const TDB& tdb, T& task, Config& conf)
|
|||||||
table.addColumn ("Pri");
|
table.addColumn ("Pri");
|
||||||
table.addColumn ("Due");
|
table.addColumn ("Due");
|
||||||
table.addColumn ("Active");
|
table.addColumn ("Active");
|
||||||
table.addColumn ("Age");
|
if (showAge) table.addColumn ("Age");
|
||||||
table.addColumn ("Description");
|
table.addColumn ("Description");
|
||||||
|
|
||||||
table.setColumnUnderline (0);
|
table.setColumnUnderline (0);
|
||||||
@@ -426,19 +428,19 @@ void handleList (const TDB& tdb, T& task, Config& conf)
|
|||||||
table.setColumnUnderline (3);
|
table.setColumnUnderline (3);
|
||||||
table.setColumnUnderline (4);
|
table.setColumnUnderline (4);
|
||||||
table.setColumnUnderline (5);
|
table.setColumnUnderline (5);
|
||||||
table.setColumnUnderline (6);
|
if (showAge) table.setColumnUnderline (6);
|
||||||
|
|
||||||
table.setColumnWidth (0, Table::minimum);
|
table.setColumnWidth (0, Table::minimum);
|
||||||
table.setColumnWidth (1, Table::minimum);
|
table.setColumnWidth (1, Table::minimum);
|
||||||
table.setColumnWidth (2, Table::minimum);
|
table.setColumnWidth (2, Table::minimum);
|
||||||
table.setColumnWidth (3, Table::minimum);
|
table.setColumnWidth (3, Table::minimum);
|
||||||
table.setColumnWidth (4, Table::minimum);
|
table.setColumnWidth (4, Table::minimum);
|
||||||
table.setColumnWidth (5, Table::minimum);
|
if (showAge) table.setColumnWidth (5, Table::minimum);
|
||||||
table.setColumnWidth (6, Table::flexible);
|
table.setColumnWidth ((showAge ? 6 : 5), Table::flexible);
|
||||||
|
|
||||||
table.setColumnJustification (0, Table::right);
|
table.setColumnJustification (0, Table::right);
|
||||||
table.setColumnJustification (3, Table::right);
|
table.setColumnJustification (3, Table::right);
|
||||||
table.setColumnJustification (5, Table::right);
|
if (showAge) table.setColumnJustification (5, Table::right);
|
||||||
|
|
||||||
table.sortOn (3, Table::ascendingDate);
|
table.sortOn (3, Table::ascendingDate);
|
||||||
table.sortOn (2, Table::descendingPriority);
|
table.sortOn (2, Table::descendingPriority);
|
||||||
@@ -530,8 +532,8 @@ void handleList (const TDB& tdb, T& task, Config& conf)
|
|||||||
table.addCell (row, 2, refTask.getAttribute ("priority"));
|
table.addCell (row, 2, refTask.getAttribute ("priority"));
|
||||||
table.addCell (row, 3, due);
|
table.addCell (row, 3, due);
|
||||||
table.addCell (row, 4, active);
|
table.addCell (row, 4, active);
|
||||||
table.addCell (row, 5, age);
|
if (showAge) table.addCell (row, 5, age);
|
||||||
table.addCell (row, 6, refTask.getDescription ());
|
table.addCell (row, (showAge ? 6 : 5), refTask.getDescription ());
|
||||||
|
|
||||||
if (conf.get ("color", true))
|
if (conf.get ("color", true))
|
||||||
{
|
{
|
||||||
@@ -1430,6 +1432,8 @@ void handleReportNext (const TDB& tdb, T& task, Config& conf)
|
|||||||
|
|
||||||
initializeColorRules (conf);
|
initializeColorRules (conf);
|
||||||
|
|
||||||
|
bool showAge = conf.get ("showage", true);
|
||||||
|
|
||||||
// Create a table for output.
|
// Create a table for output.
|
||||||
Table table;
|
Table table;
|
||||||
table.setTableWidth (width);
|
table.setTableWidth (width);
|
||||||
@@ -1439,7 +1443,7 @@ void handleReportNext (const TDB& tdb, T& task, Config& conf)
|
|||||||
table.addColumn ("Pri");
|
table.addColumn ("Pri");
|
||||||
table.addColumn ("Due");
|
table.addColumn ("Due");
|
||||||
table.addColumn ("Active");
|
table.addColumn ("Active");
|
||||||
table.addColumn ("Age");
|
if (showAge) table.addColumn ("Age");
|
||||||
table.addColumn ("Description");
|
table.addColumn ("Description");
|
||||||
|
|
||||||
table.setColumnUnderline (0);
|
table.setColumnUnderline (0);
|
||||||
@@ -1448,19 +1452,19 @@ void handleReportNext (const TDB& tdb, T& task, Config& conf)
|
|||||||
table.setColumnUnderline (3);
|
table.setColumnUnderline (3);
|
||||||
table.setColumnUnderline (4);
|
table.setColumnUnderline (4);
|
||||||
table.setColumnUnderline (5);
|
table.setColumnUnderline (5);
|
||||||
table.setColumnUnderline (6);
|
if (showAge) table.setColumnUnderline (6);
|
||||||
|
|
||||||
table.setColumnWidth (0, Table::minimum);
|
table.setColumnWidth (0, Table::minimum);
|
||||||
table.setColumnWidth (1, Table::minimum);
|
table.setColumnWidth (1, Table::minimum);
|
||||||
table.setColumnWidth (2, Table::minimum);
|
table.setColumnWidth (2, Table::minimum);
|
||||||
table.setColumnWidth (3, Table::minimum);
|
table.setColumnWidth (3, Table::minimum);
|
||||||
table.setColumnWidth (4, Table::minimum);
|
table.setColumnWidth (4, Table::minimum);
|
||||||
table.setColumnWidth (5, Table::minimum);
|
if (showAge) table.setColumnWidth (5, Table::minimum);
|
||||||
table.setColumnWidth (6, Table::flexible);
|
table.setColumnWidth ((showAge ? 6 : 5), Table::flexible);
|
||||||
|
|
||||||
table.setColumnJustification (0, Table::right);
|
table.setColumnJustification (0, Table::right);
|
||||||
table.setColumnJustification (3, Table::right);
|
table.setColumnJustification (3, Table::right);
|
||||||
table.setColumnJustification (5, Table::right);
|
if (showAge) table.setColumnJustification (5, Table::right);
|
||||||
|
|
||||||
table.sortOn (3, Table::ascendingDate);
|
table.sortOn (3, Table::ascendingDate);
|
||||||
table.sortOn (2, Table::descendingPriority);
|
table.sortOn (2, Table::descendingPriority);
|
||||||
@@ -1550,8 +1554,8 @@ void handleReportNext (const TDB& tdb, T& task, Config& conf)
|
|||||||
table.addCell (row, 2, refTask.getAttribute ("priority"));
|
table.addCell (row, 2, refTask.getAttribute ("priority"));
|
||||||
table.addCell (row, 3, due);
|
table.addCell (row, 3, due);
|
||||||
table.addCell (row, 4, active);
|
table.addCell (row, 4, active);
|
||||||
table.addCell (row, 5, age);
|
if (showAge) table.addCell (row, 5, age);
|
||||||
table.addCell (row, 6, refTask.getDescription ());
|
table.addCell (row, (showAge ? 6 : 5), refTask.getDescription ());
|
||||||
|
|
||||||
if (conf.get ("color", true))
|
if (conf.get ("color", true))
|
||||||
{
|
{
|
||||||
|
|||||||
10
task.html
10
task.html
@@ -179,7 +179,9 @@ a img { border: none; padding: 0; margin: 0; }
|
|||||||
<li>"dateformat" configuration variable now properly used to parse as
|
<li>"dateformat" configuration variable now properly used to parse as
|
||||||
well as render dates
|
well as render dates
|
||||||
<li>"task list x" now performs a caseless comparison between "x" and
|
<li>"task list x" now performs a caseless comparison between "x" and
|
||||||
the task description.
|
the task description
|
||||||
|
<li>"showage" configuration variable determines whether the "Age" column
|
||||||
|
should appear on the "task list" and "task next" reports
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -991,6 +993,12 @@ on_white on_bright_white</code></pre>
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</p>
|
</p>
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
<dt>showage<dt>
|
||||||
|
<dd>
|
||||||
|
May be "yes" or "no". Determines whether the "Age"
|
||||||
|
column appears on the "list" and "next" reports.
|
||||||
<dd>
|
<dd>
|
||||||
|
|
||||||
<dt>color</dt>
|
<dt>color</dt>
|
||||||
|
|||||||
Reference in New Issue
Block a user