From 59b194f4d10168f16fb6c241e53005c38f1c8976 Mon Sep 17 00:00:00 2001 From: jaqra <48099350+jaqra@users.noreply.github.com> Date: Thu, 12 Sep 2019 12:31:36 +0300 Subject: [PATCH] Move ref (branch or tag) location on issue list page (#8157) * Move ref (branch or tag) location on issue list page * Make looks better * move branch label also on milestone/{id} page * [/issues page] Add milestone, Add Ref, Fix Assignees * [repo issues page] reorder tasks, milestone and ref --- public/css/index.css | 5 ++++- public/less/_repository.less | 15 ++++++++++++++- templates/repo/issue/list.tmpl | 18 ++++++++++-------- templates/repo/issue/milestone_issues.tmpl | 8 +++++--- templates/user/dashboard/issues.tmpl | 16 +++++++++++++--- 5 files changed, 46 insertions(+), 16 deletions(-) diff --git a/public/css/index.css b/public/css/index.css index 2cc7b42ce..5339aefe6 100644 --- a/public/css/index.css +++ b/public/css/index.css @@ -782,8 +782,11 @@ footer .ui.left,footer .ui.right{line-height:40px} .issue.list>.item .desc .checklist{padding-left:5px} .issue.list>.item .desc .checklist .progress-bar{margin-left:2px;width:80px;height:6px;display:inline-block;background-color:#eee;overflow:hidden;border-radius:3px;vertical-align:2px!important} .issue.list>.item .desc .checklist .progress-bar .progress{background-color:#ccc;display:block;height:100%} -.issue.list>.item .desc a.milestone{padding-left:5px;color:#999!important} +.issue.list>.item .desc a.milestone{margin-left:5px;color:#999!important} .issue.list>.item .desc a.milestone:hover{color:#000!important} +.issue.list>.item .desc a.ref{margin-left:8px;color:#999!important} +.issue.list>.item .desc a.ref:hover{color:#000!important} +.issue.list>.item .desc a.ref span{margin-right:-4px} .issue.list>.item .desc .assignee{margin-top:-5px;margin-right:5px} .issue.list>.item .desc .overdue{color:red} .page.buttons{padding-top:15px} diff --git a/public/less/_repository.less b/public/less/_repository.less index a64763b39..3ba747bdd 100644 --- a/public/less/_repository.less +++ b/public/less/_repository.less @@ -1985,7 +1985,7 @@ } a.milestone { - padding-left: 5px; + margin-left: 5px; color: #999999 !important; &:hover { @@ -1993,6 +1993,19 @@ } } + a.ref { + margin-left: 8px; + color: #999999 !important; + + &:hover { + color: #000000 !important; + } + + span { + margin-right: -4px; + } + } + .assignee { margin-top: -5px; margin-right: 5px; diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index 8bdc0dfa9..4874d97da 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -217,9 +217,6 @@ {{end}} {{end}} - {{if .Ref}} - {{.Ref}} - {{end}} {{range .Labels}} {{.Name}} {{end}} @@ -242,6 +239,16 @@ {{$.i18n.Tr .GetLastEventLabelFake $timeStr (.Poster.GetDisplayName | Escape) | Safe}} {{end}} + {{if .Milestone}} + + {{.Milestone.Name}} + + {{end}} + {{if .Ref}} + + {{.Ref}} + + {{end}} {{$tasks := .GetTasks}} {{if gt $tasks 0}} {{$tasksDone := .GetTasksDone}} @@ -249,11 +256,6 @@ {{$tasksDone}} / {{$tasks}} {{end}} - {{if .Milestone}} - - {{.Milestone.Name}} - - {{end}} {{if ne .DeadlineUnix 0}} {{.DeadlineUnix.FormatShort}} diff --git a/templates/repo/issue/milestone_issues.tmpl b/templates/repo/issue/milestone_issues.tmpl index 738ac4b81..889cd2c2f 100644 --- a/templates/repo/issue/milestone_issues.tmpl +++ b/templates/repo/issue/milestone_issues.tmpl @@ -187,9 +187,6 @@
#{{.Index}}
{{.Title}} - {{if .Ref}} - {{.Ref}} - {{end}} {{range .Labels}} {{.Name}} {{end}} @@ -208,6 +205,11 @@ {{else}} {{$.i18n.Tr .GetLastEventLabelFake $timeStr (.Poster.GetDisplayName|Escape) | Safe}} {{end}} + {{if .Ref}} + + {{.Ref}} + + {{end}} {{$tasks := .GetTasks}} {{if gt $tasks 0}} {{$tasksDone := .GetTasksDone}} diff --git a/templates/user/dashboard/issues.tmpl b/templates/user/dashboard/issues.tmpl index 708356916..3e1095606 100644 --- a/templates/user/dashboard/issues.tmpl +++ b/templates/user/dashboard/issues.tmpl @@ -100,9 +100,19 @@ {{else}} {{$.i18n.Tr .GetLastEventLabelFake $timeStr (.Poster.GetDisplayName|Escape) | Safe}} {{end}} - {{if .Assignee}} - - + {{if .Milestone}} + + {{.Milestone.Name}} + + {{end}} + {{if .Ref}} + + {{.Ref}} + + {{end}} + {{range .Assignees}} + + {{end}} {{$tasks := .GetTasks}}