diff options
author | modmew8 <modmew8@gmail.com> | 2018-01-03 09:34:13 +0100 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2018-01-03 02:34:13 -0600 |
commit | d996da6babf505c56802bb2a9afe530dca940d7a (patch) | |
tree | 8c6d314ce74e9910bc8f6331b4eee2370be8eb87 /templates/repo | |
parent | 22a7a7ec9b94aad6c689b7e61bee09c2e322fd57 (diff) | |
download | gitea-d996da6babf505c56802bb2a9afe530dca940d7a.tar.gz gitea-d996da6babf505c56802bb2a9afe530dca940d7a.zip |
Added progressbar for issues (#1146). (#3171)
* Added progressbar for issues (#1146).
* Updated the generated index.css.
Signed-off-by: modmew8 <modmew8@gmail.com>
* Removed stored progress percentage and changed it to css calc. Also added the issue task progress to the user/dashboard/issues.
Signed-off-by: modmew8 <modmew8@gmail.com>
* Removed unnecessary blanks.
Signed-off-by: modmew8 <modmew8@gmail.com>
* Formatted the files correctly, fmt-check terminates now without errors.
Signed-off-by: modmew8 <modmew8@gmail.com>
* Removed variables, made computing the tasks on demand with precompiled regexp.
Signed-off-by: modmew8 <modmew8@gmail.com>
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/issue/list.tmpl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index c6c63aa493..642458ff1e 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -200,6 +200,11 @@ <p class="desc"> {{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.HomeLink .Poster.Name | Safe}} + {{$tasks := .GetTasks}} + {{if gt $tasks 0}} + {{$tasksDone := .GetTasksDone}} + <span class="octicon octicon-checklist"></span> {{$tasksDone}} / {{$tasks}} <span class="progress-bar"><span class="progress" style="width:calc(100% * {{$tasksDone}} / {{$tasks}});"></span></span> + {{end}} {{if .Milestone}} <a class="milestone" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.Milestone.ID}}&assignee={{$.AssigneeID}}"> <span class="octicon octicon-milestone"></span> {{.Milestone.Name}} |