diff options
author | Brecht Van Lommel | 2023-02-25 00:10:50 +0100 |
---|---|---|
committer | GitHub | 2023-02-24 18:10:50 -0500 |
commit | 843f81113ebe71fd725210c5a382268333865cc7 (patch) | |
tree | fa9a62d43a4309b1fb3c62120572983a1e94403a /templates | |
parent | d827215011260ca704606e421ce9e1eff32387bc (diff) |
Projects: rename Board to Column in interface and improve consistency (#22767)
Diffstat (limited to 'templates')
-rw-r--r-- | templates/projects/new.tmpl | 24 | ||||
-rw-r--r-- | templates/projects/view.tmpl | 38 | ||||
-rw-r--r-- | templates/repo/projects/new.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/projects/view.tmpl | 38 |
4 files changed, 54 insertions, 52 deletions
diff --git a/templates/projects/new.tmpl b/templates/projects/new.tmpl index 19bf50369..c96f948de 100644 --- a/templates/projects/new.tmpl +++ b/templates/projects/new.tmpl @@ -31,14 +31,16 @@ </div> {{if not .PageIsEditProjects}} - <label>{{.locale.Tr "repo.projects.template.desc"}}</label> - <div class="ui selection dropdown"> - <input type="hidden" name="board_type" value="{{.type}}"> - <div class="default text">{{.locale.Tr "repo.projects.template.desc_helper"}}</div> - <div class="menu"> - {{range $element := .BoardTypes}} - <div class="item" data-id="{{$element.BoardType}}" data-value="{{$element.BoardType}}">{{$.locale.Tr $element.Translation}}</div> - {{end}} + <div class="field"> + <label>{{.locale.Tr "repo.projects.template.desc"}}</label> + <div class="ui selection dropdown"> + <input type="hidden" name="board_type" value="{{.type}}"> + <div class="default text">{{.locale.Tr "repo.projects.template.desc_helper"}}</div> + <div class="menu"> + {{range $element := .ProjectTypes}} + <div class="item" data-id="{{$element.BoardType}}" data-value="{{$element.BoardType}}">{{$.locale.Tr $element.Translation}}</div> + {{end}} + </div> </div> </div> {{end}} @@ -47,14 +49,14 @@ <div class="ui divider"></div> <div class="ui left"> {{if .PageIsEditProjects}} - <a class="ui primary basic button" href="{{.RepoLink}}/projects"> + <a class="ui cancel button" href="{{.RepoLink}}/projects"> {{.locale.Tr "repo.milestones.cancel"}} </a> - <button class="ui green button"> + <button class="ui primary button"> {{.locale.Tr "repo.projects.modify"}} </button> {{else}} - <button class="ui green button"> + <button class="ui primary button"> {{.locale.Tr "repo.projects.create"}} </button> {{end}} diff --git a/templates/projects/view.tmpl b/templates/projects/view.tmpl index b25cf2526..3d0bea35d 100644 --- a/templates/projects/view.tmpl +++ b/templates/projects/view.tmpl @@ -5,21 +5,21 @@ </div> <div class="column right aligned"> {{if .CanWriteProjects}} - <a class="ui green button show-modal item" data-modal="#new-board-item">{{.locale.Tr "new_project_board"}}</a> + <a class="ui green button show-modal item" data-modal="#new-board-item">{{.locale.Tr "new_project_column"}}</a> {{end}} <div class="ui small modal new-board-modal" id="new-board-item"> <div class="header"> - {{$.locale.Tr "repo.projects.board.new"}} + {{$.locale.Tr "repo.projects.column.new"}} </div> <div class="content"> <form class="ui form"> <div class="required field"> - <label for="new_board">{{$.locale.Tr "repo.projects.board.new_title"}}</label> + <label for="new_board">{{$.locale.Tr "repo.projects.column.new_title"}}</label> <input class="new-board" id="new_board" name="title" required> </div> <div class="field color-field"> - <label for="new_board_color">{{$.locale.Tr "repo.projects.board.color"}}</label> + <label for="new_board_color">{{$.locale.Tr "repo.projects.column.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"> @@ -30,7 +30,7 @@ <div class="text right actions"> <div class="ui cancel button">{{$.locale.Tr "settings.cancel"}}</div> - <button data-url="{{$.Link}}" class="ui green button" id="new_board_submit">{{$.locale.Tr "repo.projects.board.new_submit"}}</button> + <button data-url="{{$.Link}}" class="ui primary button" id="new_board_submit">{{$.locale.Tr "repo.projects.column.new_submit"}}</button> </div> </form> </div> @@ -92,32 +92,32 @@ <div class="menu user-menu" tabindex="-1"> <a class="item show-modal button" data-modal="#edit-project-board-modal-{{.ID}}"> {{svg "octicon-pencil"}} - {{$.locale.Tr "repo.projects.board.edit"}} + {{$.locale.Tr "repo.projects.column.edit"}} </a> {{if not .Default}} <a class="item show-modal button" data-modal="#set-default-project-board-modal-{{.ID}}"> {{svg "octicon-pin"}} - {{$.locale.Tr "repo.projects.board.set_default"}} + {{$.locale.Tr "repo.projects.column.set_default"}} </a> {{end}} <a class="item show-modal button" data-modal="#delete-board-modal-{{.ID}}"> {{svg "octicon-trash"}} - {{$.locale.Tr "repo.projects.board.delete"}} + {{$.locale.Tr "repo.projects.column.delete"}} </a> <div class="ui small modal edit-project-board" id="edit-project-board-modal-{{.ID}}"> <div class="header"> - {{$.locale.Tr "repo.projects.board.edit"}} + {{$.locale.Tr "repo.projects.column.edit"}} </div> <div class="content"> <form class="ui form"> <div class="required field"> - <label for="new_board_title">{{$.locale.Tr "repo.projects.board.edit_title"}}</label> + <label for="new_board_title">{{$.locale.Tr "repo.projects.column.edit_title"}}</label> <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">{{$.locale.Tr "repo.projects.board.color"}}</label> + <label for="new_board_color">{{$.locale.Tr "repo.projects.column.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"> @@ -128,7 +128,7 @@ <div class="text right actions"> <div class="ui cancel button">{{$.locale.Tr "settings.cancel"}}</div> - <button data-url="{{$.Link}}/{{.ID}}" class="ui red button">{{$.locale.Tr "repo.projects.board.edit"}}</button> + <button data-url="{{$.Link}}/{{.ID}}" class="ui primary button">{{$.locale.Tr "repo.projects.column.edit"}}</button> </div> </form> </div> @@ -136,31 +136,31 @@ <div class="ui basic modal" id="set-default-project-board-modal-{{.ID}}"> <div class="ui icon header"> - {{$.locale.Tr "repo.projects.board.set_default"}} + {{$.locale.Tr "repo.projects.column.set_default"}} </div> <div class="content center"> <label> - {{$.locale.Tr "repo.projects.board.set_default_desc"}} + {{$.locale.Tr "repo.projects.column.set_default_desc"}} </label> </div> <div class="text right actions"> <div class="ui cancel button">{{$.locale.Tr "settings.cancel"}}</div> - <button class="ui red button set-default-project-board" data-url="{{$.Link}}/{{.ID}}/default">{{$.locale.Tr "repo.projects.board.set_default"}}</button> + <button class="ui primary button set-default-project-board" data-url="{{$.Link}}/{{.ID}}/default">{{$.locale.Tr "repo.projects.column.set_default"}}</button> </div> </div> <div class="ui basic modal" id="delete-board-modal-{{.ID}}"> <div class="ui icon header"> - {{$.locale.Tr "repo.projects.board.delete"}} + {{$.locale.Tr "repo.projects.column.delete"}} </div> <div class="content center"> <label> - {{$.locale.Tr "repo.projects.board.deletion_desc"}} + {{$.locale.Tr "repo.projects.column.deletion_desc"}} </label> </div> <div class="text right actions"> <div class="ui cancel button">{{$.locale.Tr "settings.cancel"}}</div> - <button class="ui red button delete-project-board" data-url="{{$.Link}}/{{.ID}}">{{$.locale.Tr "repo.projects.board.delete"}}</button> + <button class="ui red button delete-project-board" data-url="{{$.Link}}/{{.ID}}">{{$.locale.Tr "repo.projects.column.delete"}}</button> </div> </div> </div> @@ -238,7 +238,7 @@ {{end}} <div class="right floated"> {{range .Assignees}} - <a class="tooltip" target="_blank" href="{{.HomeLink}}" data-content="{{$.locale.Tr "repo.projects.board.assigned_to"}} {{.Name}}">{{avatar . 28 "mini gt-mr-3"}}</a> + <a class="tooltip" target="_blank" href="{{.HomeLink}}" data-content="{{$.locale.Tr "repo.projects.column.assigned_to"}} {{.Name}}">{{avatar . 28 "mini gt-mr-3"}}</a> {{end}} </div> </div> diff --git a/templates/repo/projects/new.tmpl b/templates/repo/projects/new.tmpl index c90fa4369..b65601c15 100644 --- a/templates/repo/projects/new.tmpl +++ b/templates/repo/projects/new.tmpl @@ -71,14 +71,14 @@ <div class="ui divider"></div> <div class="ui left"> {{if .PageIsEditProjects}} - <a class="ui primary basic button" href="{{.RepoLink}}/projects"> + <a class="ui cancel button" href="{{.RepoLink}}/projects"> {{.locale.Tr "repo.milestones.cancel"}} </a> - <button class="ui green button"> + <button class="ui primary button"> {{.locale.Tr "repo.projects.modify"}} </button> {{else}} - <button class="ui green button"> + <button class="ui primary button"> {{.locale.Tr "repo.projects.create"}} </button> {{end}} diff --git a/templates/repo/projects/view.tmpl b/templates/repo/projects/view.tmpl index a4ada8735..1450fdac1 100644 --- a/templates/repo/projects/view.tmpl +++ b/templates/repo/projects/view.tmpl @@ -9,21 +9,21 @@ <div class="column right aligned"> {{if and .CanWriteProjects (not .Repository.IsArchived)}} <a class="ui green button show-modal item" href="{{$.RepoLink}}/issues/new/choose?project={{$.Project.ID}}">{{.locale.Tr "repo.issues.new"}}</a> - <a class="ui green button show-modal item" data-modal="#new-board-item">{{.locale.Tr "new_project_board"}}</a> + <a class="ui green button show-modal item" data-modal="#new-board-item">{{.locale.Tr "new_project_column"}}</a> {{end}} <div class="ui small modal new-board-modal" id="new-board-item"> <div class="header"> - {{$.locale.Tr "repo.projects.board.new"}} + {{$.locale.Tr "repo.projects.column.new"}} </div> <div class="content"> <form class="ui form"> <div class="required field"> - <label for="new_board">{{$.locale.Tr "repo.projects.board.new_title"}}</label> + <label for="new_board">{{$.locale.Tr "repo.projects.column.new_title"}}</label> <input class="new-board" id="new_board" name="title" required> </div> <div class="field color-field"> - <label for="new_board_color">{{$.locale.Tr "repo.projects.board.color"}}</label> + <label for="new_board_color">{{$.locale.Tr "repo.projects.column.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"> @@ -34,7 +34,7 @@ <div class="text right actions"> <div class="ui cancel button">{{$.locale.Tr "settings.cancel"}}</div> - <button data-url="{{$.RepoLink}}/projects/{{$.Project.ID}}" class="ui green button" id="new_board_submit">{{$.locale.Tr "repo.projects.board.new_submit"}}</button> + <button data-url="{{$.RepoLink}}/projects/{{$.Project.ID}}" class="ui primary button" id="new_board_submit">{{$.locale.Tr "repo.projects.column.new_submit"}}</button> </div> </form> </div> @@ -96,32 +96,32 @@ <div class="menu user-menu" tabindex="-1"> <a class="item show-modal button" data-modal="#edit-project-board-modal-{{.ID}}"> {{svg "octicon-pencil"}} - {{$.locale.Tr "repo.projects.board.edit"}} + {{$.locale.Tr "repo.projects.column.edit"}} </a> {{if not .Default}} <a class="item show-modal button" data-modal="#set-default-project-board-modal-{{.ID}}"> {{svg "octicon-pin"}} - {{$.locale.Tr "repo.projects.board.set_default"}} + {{$.locale.Tr "repo.projects.column.set_default"}} </a> {{end}} <a class="item show-modal button" data-modal="#delete-board-modal-{{.ID}}"> {{svg "octicon-trash"}} - {{$.locale.Tr "repo.projects.board.delete"}} + {{$.locale.Tr "repo.projects.column.delete"}} </a> <div class="ui small modal edit-project-board" id="edit-project-board-modal-{{.ID}}"> <div class="header"> - {{$.locale.Tr "repo.projects.board.edit"}} + {{$.locale.Tr "repo.projects.column.edit"}} </div> <div class="content"> <form class="ui form"> <div class="required field"> - <label for="new_board_title">{{$.locale.Tr "repo.projects.board.edit_title"}}</label> + <label for="new_board_title">{{$.locale.Tr "repo.projects.column.edit_title"}}</label> <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">{{$.locale.Tr "repo.projects.board.color"}}</label> + <label for="new_board_color">{{$.locale.Tr "repo.projects.column.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"> @@ -132,7 +132,7 @@ <div class="text right actions"> <div class="ui cancel button">{{$.locale.Tr "settings.cancel"}}</div> - <button data-url="{{$.RepoLink}}/projects/{{$.Project.ID}}/{{.ID}}" class="ui red button">{{$.locale.Tr "repo.projects.board.edit"}}</button> + <button data-url="{{$.RepoLink}}/projects/{{$.Project.ID}}/{{.ID}}" class="ui primary button">{{$.locale.Tr "repo.projects.column.edit"}}</button> </div> </form> </div> @@ -140,31 +140,31 @@ <div class="ui basic modal" id="set-default-project-board-modal-{{.ID}}"> <div class="ui icon header"> - {{$.locale.Tr "repo.projects.board.set_default"}} + {{$.locale.Tr "repo.projects.column.set_default"}} </div> <div class="content center"> <label> - {{$.locale.Tr "repo.projects.board.set_default_desc"}} + {{$.locale.Tr "repo.projects.column.set_default_desc"}} </label> </div> <div class="text right actions"> <div class="ui cancel button">{{$.locale.Tr "settings.cancel"}}</div> - <button class="ui red button set-default-project-board" data-url="{{$.RepoLink}}/projects/{{$.Project.ID}}/{{.ID}}/default">{{$.locale.Tr "repo.projects.board.set_default"}}</button> + <button class="ui primary button set-default-project-board" data-url="{{$.RepoLink}}/projects/{{$.Project.ID}}/{{.ID}}/default">{{$.locale.Tr "repo.projects.column.set_default"}}</button> </div> </div> <div class="ui basic modal" id="delete-board-modal-{{.ID}}"> <div class="ui icon header"> - {{$.locale.Tr "repo.projects.board.delete"}} + {{$.locale.Tr "repo.projects.column.delete"}} </div> <div class="content center"> <label> - {{$.locale.Tr "repo.projects.board.deletion_desc"}} + {{$.locale.Tr "repo.projects.column.deletion_desc"}} </label> </div> <div class="text right actions"> <div class="ui cancel button">{{$.locale.Tr "settings.cancel"}}</div> - <button class="ui red button delete-project-board" data-url="{{$.RepoLink}}/projects/{{$.Project.ID}}/{{.ID}}">{{$.locale.Tr "repo.projects.board.delete"}}</button> + <button class="ui red button delete-project-board" data-url="{{$.RepoLink}}/projects/{{$.Project.ID}}/{{.ID}}">{{$.locale.Tr "repo.projects.column.delete"}}</button> </div> </div> </div> @@ -249,7 +249,7 @@ {{end}} <div class="right floated"> {{range .Assignees}} - <a class="tooltip" target="_blank" href="{{.HomeLink}}" data-content="{{$.locale.Tr "repo.projects.board.assigned_to"}} {{.Name}}">{{avatar $.Context . 28 "mini gt-mr-3"}}</a> + <a class="tooltip" target="_blank" href="{{.HomeLink}}" data-content="{{$.locale.Tr "repo.projects.column.assigned_to"}} {{.Name}}">{{avatar $.Context . 28 "mini gt-mr-3"}}</a> {{end}} </div> </div> |