mirror of
https://github.com/go-gitea/gitea.git
synced 2025-02-02 15:09:33 -05:00
Dear Gitea team, first of all, thanks for the great work you're doing with this project. I'm planning to introduce Gitea at a client site, and noticed that while there is time recording, there are no project-manager-friendly reports to actually make use of that data, as were also mentioned by others in #4870 #8684 and #13531. Since I had a little time last weekend, I had put together something that I hope to be a useful contribution to this great project (while of course useful for me too). This PR adds a new "Worktime" tab to the Organisation level. There is a date range selector (by default set to the current month), and there are three possible views: - by repository, - by milestone, and - by team member. Happy to receive any feedback! There are several possible future improvements of course (predefined date ranges, charts, a member time sheet, matrix of repos/members, etc) but I hope that even in this relatively simple state this would be useful to lots of people. <img width="1161" alt="Screen Shot 2022-05-25 at 22 12 58" src="https://user-images.githubusercontent.com/118010/170366976-af00c7af-c4f3-4117-86d7-00356d6797a5.png"> Keep up the good work! Kristof --------- Co-authored-by: user <user@kk-git1> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
56 lines
2.6 KiB
Handlebars
56 lines
2.6 KiB
Handlebars
{{template "base/head" .}}
|
|
<div role="main" aria-label="{{.Title}}" class="page-content repository issue-list">
|
|
{{template "repo/header" .}}
|
|
<div class="ui container">
|
|
{{template "base/alert" .}}
|
|
|
|
{{if .PinnedIssues}}
|
|
<div id="issue-pins" {{if .IsRepoAdmin}}data-is-repo-admin{{end}}>
|
|
{{range .PinnedIssues}}
|
|
<div class="issue-card tw-break-anywhere {{if $.IsRepoAdmin}}tw-cursor-grab{{end}}" data-move-url="{{$.Link}}/move_pin" data-issue-id="{{.ID}}">
|
|
{{template "repo/issue/card" (dict "Issue" . "Page" $ "isPinnedIssueCard" true)}}
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|
|
|
|
<div class="list-header">
|
|
{{template "repo/issue/navbar" .}}
|
|
{{template "repo/issue/search" .}}
|
|
{{if not .Repository.IsArchived}}
|
|
{{if .PageIsIssueList}}
|
|
<a class="ui small primary button issue-list-new" href="{{.RepoLink}}/issues/new{{if .NewIssueChooseTemplate}}/choose{{end}}">{{ctx.Locale.Tr "repo.issues.new"}}</a>
|
|
{{else}}
|
|
<a class="ui small primary button new-pr-button issue-list-new{{if not .PullRequestCtx.Allowed}} disabled{{end}}" href="{{if .PullRequestCtx.Allowed}}{{.Repository.Link}}/compare/{{.Repository.DefaultBranch | PathEscapeSegments}}...{{if ne .Repository.Owner.Name .PullRequestCtx.BaseRepo.Owner.Name}}{{PathEscape .Repository.Owner.Name}}:{{end}}{{.Repository.DefaultBranch | PathEscapeSegments}}{{end}}">{{ctx.Locale.Tr "repo.pulls.new"}}</a>
|
|
{{end}}
|
|
{{else}}
|
|
{{if not .PageIsIssueList}}
|
|
<a class="ui small primary small button issue-list-new{{if not .PullRequestCtx.Allowed}} disabled{{end}}" href="{{if .PullRequestCtx.Allowed}}{{.PullRequestCtx.BaseRepo.Link}}/compare/{{.PullRequestCtx.BaseRepo.DefaultBranch | PathEscapeSegments}}...{{if ne .Repository.Owner.Name .PullRequestCtx.BaseRepo.Owner.Name}}{{PathEscape .Repository.Owner.Name}}:{{end}}{{.Repository.DefaultBranch | PathEscapeSegments}}{{end}}">{{ctx.Locale.Tr "action.compare_commits_general"}}</a>
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|
|
|
|
{{template "repo/issue/filters" .}}
|
|
|
|
<div id="issue-actions" class="issue-list-toolbar tw-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 | Sec2Hour}}
|
|
</span>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
<div class="issue-list-toolbar-right">
|
|
{{template "repo/issue/filter_actions" .}}
|
|
</div>
|
|
</div>
|
|
{{template "shared/issuelist" dict "." . "listType" "repo"}}
|
|
</div>
|
|
</div>
|
|
{{template "base/footer" .}}
|