diff options
author | Denys Konovalov <kontakt@denyskon.de> | 2024-03-27 21:54:32 +0100 |
---|---|---|
committer | Earl Warren <contact@earl-warren.org> | 2024-03-30 07:17:31 +0100 |
commit | 8ffb9c6fb1571a1221978440f108911057df25db (patch) | |
tree | 5ccefc57f712ec42fd46f96c749a1df9c99b0188 /templates | |
parent | Do some performance optimize for issues list and view issue/pull (#29515) (mi... (diff) | |
download | forgejo-8ffb9c6fb1571a1221978440f108911057df25db.tar.xz forgejo-8ffb9c6fb1571a1221978440f108911057df25db.zip |
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>
(cherry picked from commit e5160185ed65fd1c2bcb2fc7dc7e0b5514ddb299)
Conflicts:
options/locale/locale_en-US.ini
trivial conflict because Forgejo strings do not have
surrounding double quotes
Diffstat (limited to 'templates')
-rw-r--r-- | templates/projects/view.tmpl | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/templates/projects/view.tmpl b/templates/projects/view.tmpl index ba5cbc3b45..e6c6c20497 100644 --- a/templates/projects/view.tmpl +++ b/templates/projects/view.tmpl @@ -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" $)}} |