mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
Rename variable to show_ids
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
parent
17f9e8727c
commit
4b483bab56
1 changed files with 11 additions and 11 deletions
|
@ -85,7 +85,7 @@ int CmdSummary (
|
||||||
// Map tags to colors.
|
// Map tags to colors.
|
||||||
Color colorID (rules.getBoolean ("color") ? rules.get ("theme.colors.ids") : "");
|
Color colorID (rules.getBoolean ("color") ? rules.get ("theme.colors.ids") : "");
|
||||||
|
|
||||||
auto ids = findHint (cli, ":ids");
|
auto show_ids = findHint (cli, ":ids");
|
||||||
auto show_annotation = findHint (cli, ":annotations");
|
auto show_annotation = findHint (cli, ":annotations");
|
||||||
|
|
||||||
Table table;
|
Table table;
|
||||||
|
@ -95,7 +95,7 @@ int CmdSummary (
|
||||||
table.add ("Date");
|
table.add ("Date");
|
||||||
table.add ("Day");
|
table.add ("Day");
|
||||||
|
|
||||||
if (ids)
|
if (show_ids)
|
||||||
{
|
{
|
||||||
table.add ("ID");
|
table.add ("ID");
|
||||||
}
|
}
|
||||||
|
@ -156,12 +156,12 @@ int CmdSummary (
|
||||||
|
|
||||||
std::string tags = join(", ", track.tags());
|
std::string tags = join(", ", track.tags());
|
||||||
|
|
||||||
if (ids)
|
if (show_ids)
|
||||||
{
|
{
|
||||||
table.set (row, 3, format ("@{1}", track.id), colorID);
|
table.set (row, 3, format ("@{1}", track.id), colorID);
|
||||||
}
|
}
|
||||||
|
|
||||||
table.set (row, (ids ? 4 : 3), tags, summaryIntervalColor (rules, track.tags ()));
|
table.set (row, (show_ids ? 4 : 3), tags, summaryIntervalColor (rules, track.tags ()));
|
||||||
|
|
||||||
if (show_annotation)
|
if (show_annotation)
|
||||||
{
|
{
|
||||||
|
@ -170,25 +170,25 @@ int CmdSummary (
|
||||||
if (annotation.length () > 15)
|
if (annotation.length () > 15)
|
||||||
annotation = annotation.substr (0, 12) + "...";
|
annotation = annotation.substr (0, 12) + "...";
|
||||||
|
|
||||||
table.set (row, (ids ? 5 : 4), annotation);
|
table.set (row, (show_ids ? 5 : 4), annotation);
|
||||||
}
|
}
|
||||||
|
|
||||||
table.set (row, (ids ? 5 : 4) + offset, today.start.toString ("h:N:S"));
|
table.set (row, (show_ids ? 5 : 4) + offset, today.start.toString ("h:N:S"));
|
||||||
table.set (row, (ids ? 6 : 5) + offset, (track.is_open () ? "-" : today.end.toString ("h:N:S")));
|
table.set (row, (show_ids ? 6 : 5) + offset, (track.is_open () ? "-" : today.end.toString ("h:N:S")));
|
||||||
table.set (row, (ids ? 7 : 6) + offset, Duration (today.total ()).formatHours ());
|
table.set (row, (show_ids ? 7 : 6) + offset, Duration (today.total ()).formatHours ());
|
||||||
|
|
||||||
daily_total += today.total ();
|
daily_total += today.total ();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (row != -1)
|
if (row != -1)
|
||||||
table.set (row, (ids ? 8 : 7) + offset, Duration (daily_total).formatHours ());
|
table.set (row, (show_ids ? 8 : 7) + offset, Duration (daily_total).formatHours ());
|
||||||
|
|
||||||
grand_total += daily_total;
|
grand_total += daily_total;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the total.
|
// Add the total.
|
||||||
table.set (table.addRow (), (ids ? 8 : 7) + offset, " ", Color ("underline"));
|
table.set (table.addRow (), (show_ids ? 8 : 7) + offset, " ", Color ("underline"));
|
||||||
table.set (table.addRow (), (ids ? 8 : 7) + offset, Duration (grand_total).formatHours ());
|
table.set (table.addRow (), (show_ids ? 8 : 7) + offset, Duration (grand_total).formatHours ());
|
||||||
|
|
||||||
const auto with_holidays = rules.getBoolean ("reports.summary.holidays");
|
const auto with_holidays = rules.getBoolean ("reports.summary.holidays");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue