summaryrefslogtreecommitdiffstats
path: root/templates/user
diff options
context:
space:
mode:
authormodmew8 <modmew8@gmail.com>2018-01-03 09:34:13 +0100
committerLunny Xiao <xiaolunwen@gmail.com>2018-01-03 02:34:13 -0600
commitd996da6babf505c56802bb2a9afe530dca940d7a (patch)
tree8c6d314ce74e9910bc8f6331b4eee2370be8eb87 /templates/user
parent22a7a7ec9b94aad6c689b7e61bee09c2e322fd57 (diff)
downloadgitea-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/user')
-rw-r--r--templates/user/dashboard/issues.tmpl5
1 files changed, 5 insertions, 0 deletions
diff --git a/templates/user/dashboard/issues.tmpl b/templates/user/dashboard/issues.tmpl
index 720def07e9..534df1177a 100644
--- a/templates/user/dashboard/issues.tmpl
+++ b/templates/user/dashboard/issues.tmpl
@@ -87,6 +87,11 @@
<img class="ui avatar image" src="{{.Assignee.RelAvatarLink}}">
</a>
{{end}}
+ {{$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}}
</p>
</li>
{{end}}