Skip to content

Commit 59b194f

Browse files
jaqralafriks
jaqra
authored andcommitted
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
1 parent 52fda31 commit 59b194f

File tree

5 files changed

+46
-16
lines changed

5 files changed

+46
-16
lines changed

public/css/index.css

+4-1
Original file line numberDiff line numberDiff line change
@@ -782,8 +782,11 @@ footer .ui.left,footer .ui.right{line-height:40px}
782782
.issue.list>.item .desc .checklist{padding-left:5px}
783783
.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}
784784
.issue.list>.item .desc .checklist .progress-bar .progress{background-color:#ccc;display:block;height:100%}
785-
.issue.list>.item .desc a.milestone{padding-left:5px;color:#999!important}
785+
.issue.list>.item .desc a.milestone{margin-left:5px;color:#999!important}
786786
.issue.list>.item .desc a.milestone:hover{color:#000!important}
787+
.issue.list>.item .desc a.ref{margin-left:8px;color:#999!important}
788+
.issue.list>.item .desc a.ref:hover{color:#000!important}
789+
.issue.list>.item .desc a.ref span{margin-right:-4px}
787790
.issue.list>.item .desc .assignee{margin-top:-5px;margin-right:5px}
788791
.issue.list>.item .desc .overdue{color:red}
789792
.page.buttons{padding-top:15px}

public/less/_repository.less

+14-1
Original file line numberDiff line numberDiff line change
@@ -1985,12 +1985,25 @@
19851985
}
19861986

19871987
a.milestone {
1988-
padding-left: 5px;
1988+
margin-left: 5px;
1989+
color: #999999 !important;
1990+
1991+
&:hover {
1992+
color: #000000 !important;
1993+
}
1994+
}
1995+
1996+
a.ref {
1997+
margin-left: 8px;
19891998
color: #999999 !important;
19901999

19912000
&:hover {
19922001
color: #000000 !important;
19932002
}
2003+
2004+
span {
2005+
margin-right: -4px;
2006+
}
19942007
}
19952008

19962009
.assignee {

templates/repo/issue/list.tmpl

+10-8
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,6 @@
217217
{{end}}
218218
{{end}}
219219

220-
{{if .Ref}}
221-
<a class="ui label" href="{{$.RepoLink}}/src/branch/{{.Ref}}">{{.Ref}}</a>
222-
{{end}}
223220
{{range .Labels}}
224221
<a class="ui label has-emoji" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}" title="{{.Description}}">{{.Name}}</a>
225222
{{end}}
@@ -242,18 +239,23 @@
242239
{{$.i18n.Tr .GetLastEventLabelFake $timeStr (.Poster.GetDisplayName | Escape) | Safe}}
243240
{{end}}
244241

242+
{{if .Milestone}}
243+
<a class="milestone" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.Milestone.ID}}&assignee={{$.AssigneeID}}">
244+
<span class="octicon octicon-milestone"></span> {{.Milestone.Name}}
245+
</a>
246+
{{end}}
247+
{{if .Ref}}
248+
<a class="ref" href="{{$.RepoLink}}/src/branch/{{.Ref}}">
249+
<span class="octicon octicon-git-branch"></span> {{.Ref}}
250+
</a>
251+
{{end}}
245252
{{$tasks := .GetTasks}}
246253
{{if gt $tasks 0}}
247254
{{$tasksDone := .GetTasksDone}}
248255
<span class="checklist">
249256
<span class="octicon octicon-checklist"></span> {{$tasksDone}} / {{$tasks}} <span class="progress-bar"><span class="progress" style="width:calc(100% * {{$tasksDone}} / {{$tasks}});"></span></span>
250257
</span>
251258
{{end}}
252-
{{if .Milestone}}
253-
<a class="milestone" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.Milestone.ID}}&assignee={{$.AssigneeID}}">
254-
<span class="octicon octicon-milestone"></span> {{.Milestone.Name}}
255-
</a>
256-
{{end}}
257259
{{if ne .DeadlineUnix 0}}
258260
<span class="octicon octicon-calendar"></span>
259261
<span{{if .IsOverdue}} class="overdue"{{end}}>{{.DeadlineUnix.FormatShort}}</span>

templates/repo/issue/milestone_issues.tmpl

+5-3
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,6 @@
187187
<div class="ui {{if .IsRead}}black{{else}}green{{end}} label">#{{.Index}}</div>
188188
<a class="title has-emoji" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title}}</a>
189189

190-
{{if .Ref}}
191-
<a class="ui label" href="{{$.RepoLink}}/src/branch/{{.Ref}}">{{.Ref}}</a>
192-
{{end}}
193190
{{range .Labels}}
194191
<a class="ui label has-emoji" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}&assignee={{$.AssigneeID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}" title="{{.Description}}">{{.Name}}</a>
195192
{{end}}
@@ -208,6 +205,11 @@
208205
{{else}}
209206
{{$.i18n.Tr .GetLastEventLabelFake $timeStr (.Poster.GetDisplayName|Escape) | Safe}}
210207
{{end}}
208+
{{if .Ref}}
209+
<a class="ref" href="{{$.RepoLink}}/src/branch/{{.Ref}}">
210+
<span class="octicon octicon-git-branch"></span> {{.Ref}}
211+
</a>
212+
{{end}}
211213
{{$tasks := .GetTasks}}
212214
{{if gt $tasks 0}}
213215
{{$tasksDone := .GetTasksDone}}

templates/user/dashboard/issues.tmpl

+13-3
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,19 @@
100100
{{else}}
101101
{{$.i18n.Tr .GetLastEventLabelFake $timeStr (.Poster.GetDisplayName|Escape) | Safe}}
102102
{{end}}
103-
{{if .Assignee}}
104-
<a class="ui right assignee poping up" href="{{.Assignee.HomeLink}}" data-content="{{.Assignee.GetDisplayName}}" data-variation="inverted" data-position="left center">
105-
<img class="ui avatar image" src="{{.Assignee.RelAvatarLink}}">
103+
{{if .Milestone}}
104+
<a class="milestone" href="{{AppSubUrl}}/{{.Repo.Owner.Name}}/{{.Repo.Name}}{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.Milestone.ID}}&assignee={{$.AssigneeID}}">
105+
<span class="octicon octicon-milestone"></span> {{.Milestone.Name}}
106+
</a>
107+
{{end}}
108+
{{if .Ref}}
109+
<a class="ref" href="{{AppSubUrl}}/{{.Repo.Owner.Name}}/{{.Repo.Name}}/src/branch/{{.Ref}}">
110+
<span class="octicon octicon-git-branch"></span> {{.Ref}}
111+
</a>
112+
{{end}}
113+
{{range .Assignees}}
114+
<a class="ui right assignee poping up" href="{{.HomeLink}}" data-content="{{.GetDisplayName}}" data-variation="inverted" data-position="left center">
115+
<img class="ui avatar image" src="{{.RelAvatarLink}}">
106116
</a>
107117
{{end}}
108118
{{$tasks := .GetTasks}}

0 commit comments

Comments
 (0)