mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
Add complementary hint :holidays
/no-holidays
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
parent
1a6d5cacca
commit
4044635e08
3 changed files with 5 additions and 2 deletions
|
@ -29,6 +29,7 @@ Default value is 'no'
|
|||
|
||||
**reports.summary.holidays**::
|
||||
Determines whether relevant holidays are shown beneath the report.
|
||||
Can be overridden by the ':holidays' and ':no-holidays' hint, respectively.
|
||||
Default value is 'yes'.
|
||||
|
||||
**reports.summary.ids**::
|
||||
|
|
|
@ -190,11 +190,11 @@ int CmdSummary (
|
|||
table.set (table.addRow (), (show_ids ? 8 : 7) + offset, " ", Color ("underline"));
|
||||
table.set (table.addRow (), (show_ids ? 8 : 7) + offset, Duration (grand_total).formatHours ());
|
||||
|
||||
const auto with_holidays = rules.getBoolean ("reports.summary.holidays");
|
||||
const auto show_holidays = cli.getComplementaryHint ("holidays", rules.getBoolean ("reports.summary.holidays"));
|
||||
|
||||
std::cout << '\n'
|
||||
<< table.render ()
|
||||
<< (with_holidays ? renderHolidays (createHolidayMap (rules, filter)) : "")
|
||||
<< (show_holidays ? renderHolidays (createHolidayMap (rules, filter)) : "")
|
||||
<< '\n';
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -98,6 +98,8 @@ void initializeEntities (CLI& cli)
|
|||
cli.entity ("hint", ":no-ids");
|
||||
cli.entity ("hint", ":annotations");
|
||||
cli.entity ("hint", ":no-annotations");
|
||||
cli.entity ("hint", ":holidays");
|
||||
cli.entity ("hint", ":no-holidays");
|
||||
cli.entity ("hint", ":lastmonth");
|
||||
cli.entity ("hint", ":lastquarter");
|
||||
cli.entity ("hint", ":lastweek");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue