aboutsummaryrefslogtreecommitdiffstats
path: root/templates/projects
diff options
context:
space:
mode:
authoryp05327 <576951401@qq.com>2023-04-19 23:28:28 +0900
committerGitHub <noreply@github.com>2023-04-19 10:28:28 -0400
commitf30cc9faa93935f5afb7a38354e5381d5e8825bf (patch)
tree532618f0a068343473e321eb782dc8c36c02ae39 /templates/projects
parente422342eebc18034ef586ec58f1e2fff0340091d (diff)
downloadgitea-f30cc9faa93935f5afb7a38354e5381d5e8825bf.tar.gz
gitea-f30cc9faa93935f5afb7a38354e5381d5e8825bf.zip
Add unset default project column (#23531)
Close: https://github.com/go-gitea/gitea/issues/23401
Diffstat (limited to 'templates/projects')
-rw-r--r--templates/projects/view.tmpl27
1 files changed, 20 insertions, 7 deletions
diff --git a/templates/projects/view.tmpl b/templates/projects/view.tmpl
index 41bbb83f7b..338524d153 100644
--- a/templates/projects/view.tmpl
+++ b/templates/projects/view.tmpl
@@ -95,10 +95,25 @@
{{$.locale.Tr "repo.projects.column.edit"}}
</a>
{{if not .Default}}
- <a class="item show-modal button" data-modal="#set-default-project-board-modal-{{.ID}}">
+ <a class="item show-modal button default-project-board-show"
+ data-modal="#default-project-board-modal-{{.ID}}"
+ data-modal-default-project-board-header="{{$.locale.Tr "repo.projects.column.set_default"}}"
+ data-modal-default-project-board-content="{{$.locale.Tr "repo.projects.column.set_default_desc"}}"
+ data-modal-default-project-board-submit="{{$.locale.Tr "repo.projects.column.set_default"}}"
+ data-url="{{$.Link}}/{{.ID}}/default">
{{svg "octicon-pin"}}
{{$.locale.Tr "repo.projects.column.set_default"}}
</a>
+ {{else}}
+ <a class="item show-modal button default-project-board-show"
+ data-modal="#default-project-board-modal-{{.ID}}"
+ data-modal-default-project-board-header="{{$.locale.Tr "repo.projects.column.unset_default"}}"
+ data-modal-default-project-board-content="{{$.locale.Tr "repo.projects.column.unset_default_desc"}}"
+ data-modal-default-project-board-submit="{{$.locale.Tr "repo.projects.column.unset_default"}}"
+ data-url="{{$.Link}}/{{.ID}}/unsetdefault">
+ {{svg "octicon-pin"}}
+ {{$.locale.Tr "repo.projects.column.unset_default"}}
+ </a>
{{end}}
<a class="item show-modal button" data-modal="#delete-board-modal-{{.ID}}">
{{svg "octicon-trash"}}
@@ -134,18 +149,16 @@
</div>
</div>
- <div class="ui basic modal" id="set-default-project-board-modal-{{.ID}}">
+ <div class="ui basic modal default-project-board-modal" id="default-project-board-modal-{{.ID}}">
<div class="ui icon header">
- {{$.locale.Tr "repo.projects.column.set_default"}}
+ <span id="default-project-board-header"></span>
</div>
<div class="content center">
- <label>
- {{$.locale.Tr "repo.projects.column.set_default_desc"}}
- </label>
+ <label id="default-project-board-content"></label>
</div>
<div class="text right actions">
<button class="ui cancel button">{{$.locale.Tr "settings.cancel"}}</button>
- <button class="ui primary button set-default-project-board" data-url="{{$.Link}}/{{.ID}}/default">{{$.locale.Tr "repo.projects.column.set_default"}}</button>
+ <button class="ui primary button default-project-board-button" id="default-project-board-submit"></button>
</div>
</div>