Commit 0a4be1a 1 parent 5285b30 commit 0a4be1a Copy full SHA for 0a4be1a
File tree 3 files changed +46
-6
lines changed
3 files changed +46
-6
lines changed Original file line number Diff line number Diff line change @@ -941,6 +941,8 @@ projects.board.edit_title = "New Board Name"
941
941
projects.board.new_title = "New Board Name"
942
942
projects.board.new_submit = "Submit"
943
943
projects.board.new = "New Board"
944
+ projects.board.set_default = "Set Default"
945
+ projects.board.set_default_desc = "Set this board as default for all uncategorized issues and pulls"
944
946
projects.board.delete = "Delete Board"
945
947
projects.board.deletion_desc = "Deleting a project board moves all related issues to ' Uncategorized' . Continue?"
946
948
projects.open = Open
Original file line number Diff line number Diff line change 85
85
{{svg "octicon-pencil"}}
86
86
{{$.i18n.Tr "repo.projects.board.edit"}}
87
87
</a>
88
+ {{if not .Default}}
89
+ <a class="item show-modal button" data-modal="#set-default-project-board-modal-{{.ID}}">
90
+ {{svg "octicon-pin"}}
91
+ {{$.i18n.Tr "repo.projects.board.set_default"}}
92
+ </a>
93
+ {{end}}
88
94
<a class="item show-modal button" data-modal="#delete-board-modal-{{.ID}}">
89
95
{{svg "octicon-trashcan"}}
90
96
{{$.i18n.Tr "repo.projects.board.delete"}}
109
115
</div>
110
116
</div>
111
117
118
+ <div class="ui basic modal" id="set-default-project-board-modal-{{.ID}}">
119
+ <div class="ui icon header">
120
+ {{$.i18n.Tr "repo.projects.board.set_default"}}
121
+ </div>
122
+ <div class="content center">
123
+ <label>
124
+ {{$.i18n.Tr "repo.projects.board.set_default_desc"}}
125
+ </label>
126
+ </div>
127
+ <form class="ui form" method="post">
128
+ <div class="text right actions">
129
+ <div class="ui cancel button">{{$.i18n.Tr "settings.cancel"}}</div>
130
+ <button class="ui red button set-default-project-board" data-url="{{$.RepoLink}}/projects/{{$.Project.ID}}/{{.ID}}/default">{{$.i18n.Tr "repo.projects.board.set_default"}}</button>
131
+ </div>
132
+ </form>
133
+ </div>
134
+
112
135
<div class="ui basic modal" id="delete-board-modal-{{.ID}}">
113
136
<div class="ui icon header">
114
137
{{$.i18n.Tr "repo.projects.board.delete"}}
115
138
</div>
116
139
<div class="content center">
117
- <input type="hidden" name="action" value="delete">
118
- <div class="field">
119
- <label>
120
- {{$.i18n.Tr "repo.projects.board.deletion_desc"}}
121
- </label>
122
- </div>
140
+ <label>
141
+ {{$.i18n.Tr "repo.projects.board.deletion_desc"}}
142
+ </label>
123
143
</div>
124
144
<form class="ui form" method="post">
125
145
<div class="text right actions">
Original file line number Diff line number Diff line change @@ -59,6 +59,24 @@ export default async function initProject() {
59
59
} ) ;
60
60
} ) ;
61
61
62
+ $ ( '.set-default-project-board' ) . each ( function ( ) {
63
+ $ ( this ) . click ( function ( e ) {
64
+ e . preventDefault ( ) ;
65
+
66
+ $ . ajax ( {
67
+ url : $ ( this ) . data ( 'url' ) ,
68
+ headers : {
69
+ 'X-Csrf-Token' : csrf ,
70
+ 'X-Remote' : true ,
71
+ } ,
72
+ contentType : 'application/json' ,
73
+ method : 'POST' ,
74
+ } ) . done ( ( ) => {
75
+ setTimeout ( window . location . reload ( true ) , 2000 ) ;
76
+ } ) ;
77
+ } ) ;
78
+ } ) ;
79
+
62
80
$ ( '.delete-project-board' ) . each ( function ( ) {
63
81
$ ( this ) . click ( function ( e ) {
64
82
e . preventDefault ( ) ;
You can’t perform that action at this time.
0 commit comments