diff options
author | Romain <romdum@users.noreply.github.com> | 2021-09-29 22:53:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-29 22:53:12 +0200 |
commit | ecfac78f6ef2cc01e4397c1a92b9a59b7ff0b2ff (patch) | |
tree | 161b9c6fcae7bbda0a827f565fdcc07cadd756ee /templates/repo/projects | |
parent | ba1fdbcfdb26ce7088a7eab0175e224e5325ef72 (diff) | |
download | gitea-ecfac78f6ef2cc01e4397c1a92b9a59b7ff0b2ff.tar.gz gitea-ecfac78f6ef2cc01e4397c1a92b9a59b7ff0b2ff.zip |
Kanban colored boards (#16647)
Add a column Color in ProjectBoard and color picker in new / edit project board form.
Diffstat (limited to 'templates/repo/projects')
-rw-r--r-- | templates/repo/projects/view.tmpl | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/templates/repo/projects/view.tmpl b/templates/repo/projects/view.tmpl index 9d08462b1c..082f4d8eb9 100644 --- a/templates/repo/projects/view.tmpl +++ b/templates/repo/projects/view.tmpl @@ -11,7 +11,7 @@ <a class="ui green button show-modal item" href="{{$.RepoLink}}/issues/new?project={{$.Project.ID}}">{{.i18n.Tr "repo.issues.new"}}</a> <a class="ui green button show-modal item" data-modal="#new-board-item">{{.i18n.Tr "new_project_board"}}</a> {{end}} - <div class="ui small modal" id="new-board-item"> + <div class="ui small modal new-board-modal" id="new-board-item"> <div class="header"> {{$.i18n.Tr "repo.projects.board.new"}} </div> @@ -22,6 +22,16 @@ <input class="new-board" id="new_board" name="title" required> </div> + <div class="field color-field"> + <label for="new_board_color">{{$.i18n.Tr "color"}}</label> + <div class="color picker column"> + <input class="color-picker" maxlength="7" placeholder="#c320f6" id="new_board_color_picker" name="color"> + <div class="column precolors"> + {{template "repo/issue/label_precolors"}} + </div> + </div> + </div> + <div class="text right actions"> <div class="ui cancel button">{{$.i18n.Tr "settings.cancel"}}</div> <button data-url="{{$.RepoLink}}/projects/{{$.Project.ID}}" class="ui green button" id="new_board_submit">{{$.i18n.Tr "repo.projects.board.new_submit"}}</button> @@ -70,7 +80,7 @@ <div class="board"> {{ range $board := .Boards }} - <div class="ui segment board-column" data-id="{{.ID}}" data-sorting="{{.Sorting}}" data-url="{{$.RepoLink}}/projects/{{$.Project.ID}}/{{.ID}}"> + <div class="ui segment board-column" style="background: {{.Color}}!important;" data-id="{{.ID}}" data-sorting="{{.Sorting}}" data-url="{{$.RepoLink}}/projects/{{$.Project.ID}}/{{.ID}}"> <div class="board-column-header df ac sb"> <div class="ui large label board-label py-2">{{.Title}}</div> {{if and $.CanWriteProjects (not $.Repository.IsArchived) $.PageIsProjects (ne .ID 0)}} @@ -105,6 +115,16 @@ <input class="project-board-title" id="new_board_title" name="title" value="{{.Title}}" required> </div> + <div class="field color-field"> + <label for="new_board_color">{{$.i18n.Tr "color"}}</label> + <div class="color picker column"> + <input class="color-picker" maxlength="7" placeholder="#c320f6" id="new_board_color" name="color" value="{{.Color}}"> + <div class="column precolors"> + {{template "repo/issue/label_precolors"}} + </div> + </div> + </div> + <div class="text right actions"> <div class="ui cancel button">{{$.i18n.Tr "settings.cancel"}}</div> <button data-url="{{$.RepoLink}}/projects/{{$.Project.ID}}/{{.ID}}" class="ui red button">{{$.i18n.Tr "repo.projects.board.edit"}}</button> |