Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add permission check for moving issue action in project view page #24589

Merged
Show file tree
Hide file tree
Changes from all 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: 1 addition & 1 deletion templates/projects/view.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
</div>
<div class="ui container fluid padded" id="project-board">

<div class="board">
<div class="board {{if .CanWriteProjects}}sortable{{end}}">
{{range $board := .Boards}}

<div class="ui segment board-column" style="background: {{.Color}} !important;" data-id="{{.ID}}" data-sorting="{{.Sorting}}" data-url="{{$.Link}}/{{.ID}}">
Expand Down
5 changes: 4 additions & 1 deletion web_src/css/features/projects.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
margin: 0 0.5em;
}

.board.sortable .board-card {
cursor: move;
}

.board-column {
background-color: var(--color-project-board-bg) !important;
border: 1px solid var(--color-secondary) !important;
Expand Down Expand Up @@ -80,7 +84,6 @@
.board-card {
margin: 4px 2px !important;
border-radius: 5px !important;
cursor: move;
width: calc(100% - 4px) !important;
padding: 0.5rem !important;
min-height: auto !important;
Expand Down
2 changes: 1 addition & 1 deletion web_src/js/features/repo-projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function moveIssue({item, from, to, oldIndex}) {
}

async function initRepoProjectSortable() {
const els = document.querySelectorAll('#project-board > .board');
const els = document.querySelectorAll('#project-board > .board.sortable');
if (!els.length) return;

const {Sortable} = await import(/* webpackChunkName: "sortable" */'sortablejs');
Expand Down