Fix #22954
Only users who have write permission can move issues in the project view page.
</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}}">
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;
.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;
}
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');