aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorRomain <romdum@users.noreply.github.com>2021-09-29 22:53:12 +0200
committerGitHub <noreply@github.com>2021-09-29 22:53:12 +0200
commitecfac78f6ef2cc01e4397c1a92b9a59b7ff0b2ff (patch)
tree161b9c6fcae7bbda0a827f565fdcc07cadd756ee /templates
parentba1fdbcfdb26ce7088a7eab0175e224e5325ef72 (diff)
downloadgitea-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')
-rw-r--r--templates/repo/graph.tmpl2
-rw-r--r--templates/repo/projects/view.tmpl24
-rw-r--r--templates/repo/settings/webhook/slack.tmpl2
3 files changed, 24 insertions, 4 deletions
diff --git a/templates/repo/graph.tmpl b/templates/repo/graph.tmpl
index e3b5cd3878..963bf0449a 100644
--- a/templates/repo/graph.tmpl
+++ b/templates/repo/graph.tmpl
@@ -47,7 +47,7 @@
</div>
</div>
<button id="flow-color-monochrome" class="ui labelled icon button{{if eq .Mode "monochrome"}} active{{end}}" title="{{.i18n.Tr "repo.commit_graph.monochrome"}}">{{svg "material-invert-colors" 16 "mr-2"}}{{.i18n.Tr "repo.commit_graph.monochrome"}}</button>
- <button id="flow-color-colored" class="ui labelled icon button{{if ne .Mode "monochrome"}} active{{end}}" title="{{.i18n.Tr "repo.commit_graph.color"}}">{{svg "material-palette" 16 "mr-2"}}{{.i18n.Tr "repo.commit_graph.color"}}</button>
+ <button id="flow-color-colored" class="ui labelled icon button{{if ne .Mode "monochrome"}} active{{end}}" title="{{.i18n.Tr "color"}}">{{svg "material-palette" 16 "mr-2"}}{{.i18n.Tr "color"}}</button>
</div>
</h2>
<div class="ui dividing"></div>
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>
diff --git a/templates/repo/settings/webhook/slack.tmpl b/templates/repo/settings/webhook/slack.tmpl
index d7b6eebf3b..12e112acca 100644
--- a/templates/repo/settings/webhook/slack.tmpl
+++ b/templates/repo/settings/webhook/slack.tmpl
@@ -20,7 +20,7 @@
<input id="icon_url" name="icon_url" value="{{.SlackHook.IconURL}}" placeholder="e.g. https://example.com/img/favicon.png">
</div>
<div class="field">
- <label for="color">{{.i18n.Tr "repo.settings.slack_color"}}</label>
+ <label for="color">{{.i18n.Tr "color"}}</label>
<input id="color" name="color" value="{{.SlackHook.Color}}" placeholder="e.g. #dd4b39, good, warning, danger">
</div>
{{template "repo/settings/webhook/settings" .}}