Fossil SCM
Added a "remove user flag" option to /stats_report for reports which accept (but do not require) the user flag. e.g. switch from by-month-for-user to by-month with 1 click.
Commit
f1a66a6c26a3be87f92dd7220252956123caf935
Parent
abe1030ca8b01c8…
1 file changed
+3
-4
+3
-4
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -2014,17 +2014,16 @@ | ||
| 2014 | 2014 | */ |
| 2015 | 2015 | void stats_report_page(){ |
| 2016 | 2016 | HQuery url; /* URL for various branch links */ |
| 2017 | 2017 | char const * zView = P("view"); /* Which view/report to show. */ |
| 2018 | 2018 | char const *zUserName = P("user"); |
| 2019 | + char const * zRemoveUser = 0; | |
| 2019 | 2020 | url_initialize(&url, "stats_report"); |
| 2020 | - /* We have to figure out which report to run before continuing so | |
| 2021 | - that we can add (or not) the user= param to the buttons in a sane | |
| 2022 | - manner. | |
| 2023 | - */ | |
| 2021 | + | |
| 2024 | 2022 | if(zUserName && *zUserName){ |
| 2025 | 2023 | url_add_parameter(&url,"user", zUserName); |
| 2024 | + timeline_submenu(&url, "(Remove User Flag)", "view", zView, "user"); | |
| 2026 | 2025 | } |
| 2027 | 2026 | timeline_submenu(&url, "By Year", "view", "byyear", 0); |
| 2028 | 2027 | timeline_submenu(&url, "By Month", "view", "bymonth", 0); |
| 2029 | 2028 | timeline_submenu(&url, "By User", "view", "byuser", "user"); |
| 2030 | 2029 | url_reset(&url); |
| 2031 | 2030 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -2014,17 +2014,16 @@ | |
| 2014 | */ |
| 2015 | void stats_report_page(){ |
| 2016 | HQuery url; /* URL for various branch links */ |
| 2017 | char const * zView = P("view"); /* Which view/report to show. */ |
| 2018 | char const *zUserName = P("user"); |
| 2019 | url_initialize(&url, "stats_report"); |
| 2020 | /* We have to figure out which report to run before continuing so |
| 2021 | that we can add (or not) the user= param to the buttons in a sane |
| 2022 | manner. |
| 2023 | */ |
| 2024 | if(zUserName && *zUserName){ |
| 2025 | url_add_parameter(&url,"user", zUserName); |
| 2026 | } |
| 2027 | timeline_submenu(&url, "By Year", "view", "byyear", 0); |
| 2028 | timeline_submenu(&url, "By Month", "view", "bymonth", 0); |
| 2029 | timeline_submenu(&url, "By User", "view", "byuser", "user"); |
| 2030 | url_reset(&url); |
| 2031 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -2014,17 +2014,16 @@ | |
| 2014 | */ |
| 2015 | void stats_report_page(){ |
| 2016 | HQuery url; /* URL for various branch links */ |
| 2017 | char const * zView = P("view"); /* Which view/report to show. */ |
| 2018 | char const *zUserName = P("user"); |
| 2019 | char const * zRemoveUser = 0; |
| 2020 | url_initialize(&url, "stats_report"); |
| 2021 | |
| 2022 | if(zUserName && *zUserName){ |
| 2023 | url_add_parameter(&url,"user", zUserName); |
| 2024 | timeline_submenu(&url, "(Remove User Flag)", "view", zView, "user"); |
| 2025 | } |
| 2026 | timeline_submenu(&url, "By Year", "view", "byyear", 0); |
| 2027 | timeline_submenu(&url, "By Month", "view", "bymonth", 0); |
| 2028 | timeline_submenu(&url, "By User", "view", "byuser", "user"); |
| 2029 | url_reset(&url); |
| 2030 |