diff options
author | 6543 <m.huber@kithara.com> | 2023-10-19 16:08:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-19 14:08:31 +0000 |
commit | adbc995c347e158a56264f2488997d7d59a4dd8b (patch) | |
tree | d571ede3f565910d8890c96932518e7793728647 /templates/repo/issue | |
parent | e83f2cbbacd2696f26dde7105d7f07833c0cc33e (diff) | |
download | gitea-adbc995c347e158a56264f2488997d7d59a4dd8b.tar.gz gitea-adbc995c347e158a56264f2488997d7d59a4dd8b.zip |
Show total TrackedTime on issue/pull/milestone lists (#26672)
TODOs:
- [x] write test for `GetIssueTotalTrackedTime`
- [x] frontport kitharas template changes and make them mobile-friendly
---
![image](https://github.com/go-gitea/gitea/assets/24977596/6713da97-201f-4217-8588-4c4cec157171)
![image](https://github.com/go-gitea/gitea/assets/24977596/3a45aba8-26b5-4e6a-b97d-68bfc2bf9024)
---
*Sponsored by Kithara Software GmbH*
Diffstat (limited to 'templates/repo/issue')
-rw-r--r-- | templates/repo/issue/filters.tmpl | 9 | ||||
-rw-r--r-- | templates/repo/issue/list.tmpl | 9 | ||||
-rw-r--r-- | templates/repo/issue/milestone_issues.tmpl | 6 |
3 files changed, 24 insertions, 0 deletions
diff --git a/templates/repo/issue/filters.tmpl b/templates/repo/issue/filters.tmpl index 8645ff9d50..1d200e23b7 100644 --- a/templates/repo/issue/filters.tmpl +++ b/templates/repo/issue/filters.tmpl @@ -4,6 +4,15 @@ <input type="checkbox" autocomplete="off" class="issue-checkbox-all gt-mr-4" title="{{ctx.Locale.Tr "repo.issues.action_check_all"}}"> {{end}} {{template "repo/issue/openclose" .}} + <!-- Total Tracked Time --> + {{if .TotalTrackedTime}} + <div class="ui compact tiny secondary menu"> + <span class="item" data-tooltip-content='{{ctx.Locale.Tr "tracked_time_summary"}}'> + {{svg "octicon-clock"}} + {{.TotalTrackedTime | Sec2Time}} + </span> + </div> + {{end}} </div> <div class="issue-list-toolbar-right"> <div class="ui secondary filter menu labels"> diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index 038526f424..012b613fbf 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -34,6 +34,15 @@ <div id="issue-actions" class="issue-list-toolbar gt-hidden"> <div class="issue-list-toolbar-left"> {{template "repo/issue/openclose" .}} + <!-- Total Tracked Time --> + {{if .TotalTrackedTime}} + <div class="ui compact tiny secondary menu"> + <span class="item" data-tooltip-content='{{ctx.Locale.Tr "tracked_time_summary"}}'> + {{svg "octicon-clock"}} + {{.TotalTrackedTime | Sec2Time}} + </span> + </div> + {{end}} </div> <div class="issue-list-toolbar-right"> {{template "repo/issue/filter_actions" .}} diff --git a/templates/repo/issue/milestone_issues.tmpl b/templates/repo/issue/milestone_issues.tmpl index 9d5da13b5d..ea19518efa 100644 --- a/templates/repo/issue/milestone_issues.tmpl +++ b/templates/repo/issue/milestone_issues.tmpl @@ -46,6 +46,12 @@ {{end}} </div> <div class="gt-mr-3">{{ctx.Locale.Tr "repo.milestones.completeness" .Milestone.Completeness | Safe}}</div> + {{if .TotalTrackedTime}} + <div data-tooltip-content='{{ctx.Locale.Tr "tracked_time_summary"}}'> + {{svg "octicon-clock"}} + {{.TotalTrackedTime | Sec2Time}} + </div> + {{end}} </div> </div> <div class="divider"></div> |