Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,8 @@ projects.board.delete = "Delete Board"
projects.board.deletion_desc = "Deleting a project board moves all related issues to 'Uncategorized'. Continue?"
projects.open = Open
projects.close = Close
projects.board.assigned_to = Assigned to
projects.board.opened_by = opened by

issues.desc = Organize bug reports, tasks and milestones.
issues.filter_assignees = Filter Assignee
Expand Down
20 changes: 19 additions & 1 deletion templates/repo/projects/view.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@

<div class="ui segment board-column" data-id="{{.ID}}" data-sorting="{{.Sorting}}" data-url="{{$.RepoLink}}/projects/{{$.Project.ID}}/{{.ID}}">
<div class="board-column-header">
<div class="ui large label board-label">{{.Title}}</div>
<div class="ui large label board-label">
<div class="ui small circular grey label board-card-cnt">
{{ len .Issues}}
</div>
{{.Title}}
</div>
{{if and $.CanWriteProjects (not $.Repository.IsArchived) $.PageIsProjects (ne .ID 0)}}
<div class="ui dropdown jump item poping up right" data-variation="tiny inverted">
<span class="ui text">
Expand Down Expand Up @@ -166,6 +171,12 @@
</span>
<a class="project-board-title" href="{{$.RepoLink}}/issues/{{.Index}}">#{{.Index}} {{.Title}}</a>
</div>
<div class="meta">
#{{.Index}} {{$.i18n.Tr "repo.projects.board.opened_by"}}
<a href="{{AppUrl}}{{.Poster.Name}}">
{{.Poster.Name}}
</a>
</div>
{{- if .MilestoneID }}
<div class="meta">
<a class="milestone" href="{{$.RepoLink}}/milestone/{{ .MilestoneID}}">
Expand All @@ -186,6 +197,13 @@
{{ range .Labels }}
<a class="ui label" href="{{$.RepoLink}}/issues?labels={{.ID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}; margin-bottom: 3px;" title="{{.Description | RenderEmojiPlain}}">{{.Name | RenderEmoji}}</a>
{{ end }}
<div class="right floated">
{{ range .Assignees }}
<a class="poping up" data-content='{{$.i18n.Tr "repo.projects.board.assigned_to"}} {{.Name}}' data-variation="tiny inverted">
{{avatar . 28 "mini mr-3"}}
</a>
{{ end }}
</div>
</div>
</div>
<!-- stop issue card -->
Expand Down
8 changes: 8 additions & 0 deletions web_src/js/features/projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ export default async function initProject() {
},
contentType: 'application/json',
type: 'POST',
success: () => {
// Update the number of cards in board while drop successful.
const fromCnt = e.from.parentElement.getElementsByClassName('board-card').length;
e.from.parentElement.getElementsByClassName('board-card-cnt')[0].innerText = fromCnt;

const toCnt = e.to.parentElement.getElementsByClassName('board-card').length;
e.to.parentElement.getElementsByClassName('board-card-cnt')[0].innerText = toCnt;
},
error: () => {
e.from.insertBefore(e.item, e.from.children[e.oldIndex]);
},
Expand Down
7 changes: 6 additions & 1 deletion web_src/less/_repository.less
Original file line number Diff line number Diff line change
Expand Up @@ -2996,13 +2996,18 @@ tbody.commit-list {
.board-column > .cards {
flex: 1;
display: flex;
flex-direction: column;
// flex-direction: column;
align-content: baseline;
margin: 0 !important;
padding: 0 !important;

.card .meta > a.milestone {
color: #999999;
}

.card {
flex-basis: 100%;
}
}

.board-column > .divider {
Expand Down