Skip to content

Commit 7d0768c

Browse files
committed
fix merge
1 parent d1a1458 commit 7d0768c

File tree

5 files changed

+23
-262
lines changed

5 files changed

+23
-262
lines changed

templates/repo/projects/view.tmpl

Lines changed: 14 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -82,25 +82,17 @@
8282

8383
<div class="ui segment board-column" style="background: {{.Color}} !important;" data-id="{{.ID}}" data-sorting="{{.Sorting}}" data-url="{{$.RepoLink}}/projects/{{$.Project.ID}}/{{.ID}}">
8484
<div class="board-column-header df ac sb">
85-
<div class="ui large label board-label py-2">{{.Title}}</div>
85+
<div class="ui large label board-label py-2">
86+
<div class="ui small circular grey label board-card-cnt">
87+
{{len .Issues}}
88+
</div>
89+
{{.Title}}
90+
</div>
8691
{{if and $.CanWriteProjects (not $.Repository.IsArchived) (ne .ID 0)}}
8792
<div class="ui dropdown jump item tooltip">
8893
<div class="not-mobile px-3" tabindex="-1">
8994
{{svg "octicon-kebab-horizontal"}}
9095
</div>
91-
<div class="ui segment board-column" data-id="{{.ID}}" data-sorting="{{.Sorting}}" data-url="{{$.RepoLink}}/projects/{{$.Project.ID}}/{{.ID}}">
92-
<div class="board-column-header">
93-
<div class="ui large label board-label">
94-
<div class="ui small circular grey label board-card-cnt">
95-
{{ len .Issues}}
96-
</div>
97-
{{.Title}}
98-
</div>
99-
{{if and $.CanWriteProjects (not $.Repository.IsArchived) $.PageIsProjects (ne .ID 0)}}
100-
<div class="ui dropdown jump item poping up right" data-variation="tiny inverted">
101-
<span class="ui text">
102-
<span class="fitted not-mobile" tabindex="-1">{{svg "octicon-kebab-horizontal" 24}}</span>
103-
</span>
10496
<div class="menu user-menu" tabindex="-1">
10597
<a class="item show-modal button" data-modal="#edit-project-board-modal-{{.ID}}">
10698
{{svg "octicon-pencil"}}
@@ -226,14 +218,11 @@
226218
</span>
227219
</div>
228220
<div class="meta">
229-
#{{.Index}} {{$.i18n.Tr "repo.projects.board.opened_by"}}
230-
<a href="{{AppUrl}}{{.Poster.Name}}">
231-
{{.Poster.Name}}
232-
</a>
221+
#{{.Index}} {{$.i18n.Tr "repo.projects.board.opened_by"}} <a target="_blank" href="{{.Poster.HTMLURL}}">{{.Poster.Name}}</a>
233222
</div>
234223
{{- if .MilestoneID }}
235224
<div class="meta my-2">
236-
<a class="milestone" href="{{$.RepoLink}}/milestone/{{ .MilestoneID}}">
225+
<a class="milestone" target="_blank" href="{{$.RepoLink}}/milestone/{{ .MilestoneID}}">
237226
{{svg "octicon-milestone" 16 "mr-2 vm"}}
238227
<span class="vm">{{ .Milestone.Name }}</span>
239228
</a>
@@ -248,25 +237,19 @@
248237
</div>
249238
{{- end }}
250239
</div>
251-
{{if .Labels}}
252-
<div class="extra content labels-list p-0 pt-2">
253-
{{ range .Labels }}
254-
<a class="ui label" href="{{$.RepoLink}}/issues?labels={{.ID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}};" title="{{.Description | RenderEmojiPlain}}">{{.Name | RenderEmoji}}</a>
255-
{{ end }}
256-
</div>
257-
{{end}}
258-
<div class="extra content">
240+
241+
{{ if or .Labels .Assignees }}
242+
<div class="extra content labels-list p-0 pt-2">
259243
{{ range .Labels }}
260-
<a class="ui label" href="{{$.RepoLink}}/issues?labels={{.ID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}; margin-bottom: 3px;" title="{{.Description | RenderEmojiPlain}}">{{.Name | RenderEmoji}}</a>
244+
<a class="ui label" target="_blank" href="{{$.RepoLink}}/issues?labels={{.ID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}};" title="{{.Description | RenderEmojiPlain}}">{{.Name | RenderEmoji}}</a>
261245
{{ end }}
262246
<div class="right floated">
263247
{{ range .Assignees }}
264-
<a class="poping up" data-content='{{$.i18n.Tr "repo.projects.board.assigned_to"}} {{.Name}}' data-variation="tiny inverted">
265-
{{avatar . 28 "mini mr-3"}}
266-
</a>
248+
<a class="tooltip" target="_blank" href="{{.HTMLURL}}" data-content="{{$.i18n.Tr "repo.projects.board.assigned_to"}} {{.Name}}">{{avatar . 28 "mini mr-3"}}</a>
267249
{{ end }}
268250
</div>
269251
</div>
252+
{{ end }}
270253
</div>
271254
<!-- stop issue card -->
272255

web_src/js/features/projects.js

Lines changed: 0 additions & 151 deletions
This file was deleted.

web_src/js/features/repo-projects.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@ import $ from 'jquery';
22

33
const {csrfToken} = window.config;
44

5+
function updateIssueCount(cards) {
6+
const parent = cards.parentElement;
7+
const cnt = parent.getElementsByClassName('board-card').length;
8+
parent.getElementsByClassName('board-card-cnt')[0].innerText = cnt;
9+
}
10+
511
function moveIssue({item, from, to, oldIndex}) {
612
const columnCards = to.getElementsByClassName('board-card');
13+
updateIssueCount(from);
14+
updateIssueCount(to);
715

816
const columnSorting = {
917
issues: [...columnCards].map((card, i) => ({

web_src/less/_repository.less

Lines changed: 0 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -3010,86 +3010,6 @@ tbody.commit-list {
30103010
padding-top: 0 !important;
30113011
}
30123012

3013-
.board {
3014-
display: flex;
3015-
flex-direction: row;
3016-
flex-wrap: nowrap;
3017-
overflow-x: auto;
3018-
margin: 0 .5em;
3019-
}
3020-
3021-
.board-column {
3022-
background-color: rgba(0, 0, 0, .05) !important;
3023-
border: 1px solid var(--color-secondary) !important;
3024-
margin: 0 .5rem !important;
3025-
padding: .5rem !important;
3026-
width: 320px;
3027-
height: 60vh;
3028-
overflow-y: scroll;
3029-
flex: 0 0 auto;
3030-
overflow: visible;
3031-
display: flex;
3032-
flex-direction: column;
3033-
}
3034-
3035-
.board-column-header {
3036-
display: flex;
3037-
justify-content: space-between;
3038-
}
3039-
3040-
.board-label {
3041-
background: none !important;
3042-
line-height: 1.25 !important;
3043-
}
3044-
3045-
.board-column > .cards {
3046-
flex: 1;
3047-
display: flex;
3048-
align-content: baseline;
3049-
margin: 0 !important;
3050-
padding: 0 !important;
3051-
3052-
.card .meta > a.milestone {
3053-
color: #999999;
3054-
}
3055-
3056-
.card {
3057-
flex-basis: 100%;
3058-
}
3059-
}
3060-
3061-
.board-column > .divider {
3062-
margin: 5px 0;
3063-
}
3064-
3065-
.board-column:first-child {
3066-
margin-left: auto !important;
3067-
}
3068-
3069-
.board-column:last-child {
3070-
margin-right: auto !important;
3071-
}
3072-
3073-
.board-card {
3074-
margin: 3px !important;
3075-
width: auto !important;
3076-
background-color: #fff;
3077-
border-radius: 5px;
3078-
cursor: pointer;
3079-
}
3080-
3081-
.board-card .header {
3082-
font-size: 1.1em !important;
3083-
}
3084-
3085-
.board-card .content {
3086-
padding: 8px 8px 5px !important;
3087-
}
3088-
3089-
.board-card .extra.content {
3090-
padding: 5px 8px !important;
3091-
}
3092-
30933013
td.blob-excerpt {
30943014
background-color: #fafafa;
30953015
}

web_src/less/features/projects.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
.board-column > .cards {
4949
flex: 1;
5050
display: flex;
51+
align-content: baseline;
5152
margin: 0 !important;
5253
padding: 0 !important;
5354
flex-wrap: nowrap !important;

0 commit comments

Comments
 (0)