mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
Add default board to new projects, remove uncategorized pseudo-board (#29874)
On creation of an empty project (no template) a default board will be created instead of falling back to the uneditable pseudo-board. Every project now has to have exactly one default boards. As a consequence, you cannot unset a board as default, instead you have to set another board as default. Existing projects will be modified using a cron job, additionally this check will run every midnight by default. Deleting the default board is not allowed, you have to set another board as default to do it. Fixes #29873 Fixes #14679 along the way Fixes #29853 Co-authored-by: delvh <dev.lh@web.de>
This commit is contained in:
@ -74,7 +74,7 @@
|
||||
</div>
|
||||
{{.Title}}
|
||||
</div>
|
||||
{{if and $canWriteProject (ne .ID 0)}}
|
||||
{{if $canWriteProject}}
|
||||
<div class="ui dropdown jump item">
|
||||
<div class="tw-px-2">
|
||||
{{svg "octicon-kebab-horizontal"}}
|
||||
@ -86,29 +86,20 @@
|
||||
</a>
|
||||
{{if not .Default}}
|
||||
<a class="item show-modal button default-project-column-show"
|
||||
data-modal="#default-project-column-modal-{{.ID}}"
|
||||
data-modal-default-project-column-header="{{ctx.Locale.Tr "repo.projects.column.set_default"}}"
|
||||
data-modal-default-project-column-content="{{ctx.Locale.Tr "repo.projects.column.set_default_desc"}}"
|
||||
data-url="{{$.Link}}/{{.ID}}/default">
|
||||
data-modal="#default-project-column-modal-{{.ID}}"
|
||||
data-modal-default-project-column-header="{{ctx.Locale.Tr "repo.projects.column.set_default"}}"
|
||||
data-modal-default-project-column-content="{{ctx.Locale.Tr "repo.projects.column.set_default_desc"}}"
|
||||
data-url="{{$.Link}}/{{.ID}}/default">
|
||||
{{svg "octicon-pin"}}
|
||||
{{ctx.Locale.Tr "repo.projects.column.set_default"}}
|
||||
</a>
|
||||
{{else}}
|
||||
<a class="item show-modal button default-project-column-show"
|
||||
data-modal="#default-project-column-modal-{{.ID}}"
|
||||
data-modal-default-project-column-header="{{ctx.Locale.Tr "repo.projects.column.unset_default"}}"
|
||||
data-modal-default-project-column-content="{{ctx.Locale.Tr "repo.projects.column.unset_default_desc"}}"
|
||||
data-url="{{$.Link}}/{{.ID}}/unsetdefault">
|
||||
{{svg "octicon-pin-slash"}}
|
||||
{{ctx.Locale.Tr "repo.projects.column.unset_default"}}
|
||||
<a class="item show-modal button show-delete-project-column-modal"
|
||||
data-modal="#delete-project-column-modal-{{.ID}}"
|
||||
data-url="{{$.Link}}/{{.ID}}">
|
||||
{{svg "octicon-trash"}}
|
||||
{{ctx.Locale.Tr "repo.projects.column.delete"}}
|
||||
</a>
|
||||
{{end}}
|
||||
<a class="item show-modal button show-delete-project-column-modal"
|
||||
data-modal="#delete-project-column-modal-{{.ID}}"
|
||||
data-url="{{$.Link}}/{{.ID}}">
|
||||
{{svg "octicon-trash"}}
|
||||
{{ctx.Locale.Tr "repo.projects.column.delete"}}
|
||||
</a>
|
||||
|
||||
<div class="ui small modal edit-project-column-modal" id="edit-project-column-modal-{{.ID}}">
|
||||
<div class="header">
|
||||
@ -165,7 +156,7 @@
|
||||
|
||||
<div class="divider"></div>
|
||||
|
||||
<div class="ui cards {{if and $canWriteProject (ne .ID 0)}}{{/* ID 0 is default column which cannot be moved */}}tw-cursor-grab{{end}}" data-url="{{$.Link}}/{{.ID}}" data-project="{{$.Project.ID}}" data-board="{{.ID}}" id="board_{{.ID}}">
|
||||
<div class="ui cards{{if $canWriteProject}} tw-cursor-grab{{end}}" data-url="{{$.Link}}/{{.ID}}" data-project="{{$.Project.ID}}" data-board="{{.ID}}" id="board_{{.ID}}">
|
||||
{{range (index $.IssuesMap .ID)}}
|
||||
<div class="issue-card gt-word-break {{if $canWriteProject}}tw-cursor-grab{{end}}" data-issue="{{.ID}}">
|
||||
{{template "repo/issue/card" (dict "Issue" . "Page" $)}}
|
||||
|
Reference in New Issue
Block a user