|
1 |
| -<div role="main" aria-label="{{.Title}}" class="page-content repository projects edit-project new milestone"> |
2 |
| - <div class="ui container"> |
3 |
| - <div class="navbar"> |
4 |
| - {{if and .CanWriteProjects .PageIsEditProject}} |
5 |
| - <div class="ui right floated secondary menu"> |
6 |
| - <a class="ui small green button" href="{{$.HomeLink}}/-/projects/new">{{.locale.Tr "repo.milestones.new"}}</a> |
7 |
| - </div> |
| 1 | +<div class="ui container"> |
| 2 | + <h2 class="ui dividing header"> |
| 3 | + {{if .PageIsEditProjects}} |
| 4 | + {{.locale.Tr "repo.projects.edit"}} |
| 5 | + <div class="sub header">{{.locale.Tr "repo.projects.edit_subheader"}}</div> |
| 6 | + {{else}} |
| 7 | + {{.locale.Tr "repo.projects.new"}} |
| 8 | + <div class="sub header">{{.locale.Tr "repo.projects.new_subheader"}}</div> |
8 | 9 | {{end}}
|
9 |
| - </div> |
10 |
| - <div class="ui divider"></div> |
11 |
| - <h2 class="ui dividing header"> |
12 |
| - {{if .PageIsEditProjects}} |
13 |
| - {{.locale.Tr "repo.projects.edit"}} |
14 |
| - <div class="sub header">{{.locale.Tr "repo.projects.edit_subheader"}}</div> |
15 |
| - {{else}} |
16 |
| - {{.locale.Tr "repo.projects.new"}} |
17 |
| - <div class="sub header">{{.locale.Tr "repo.projects.new_subheader"}}</div> |
18 |
| - {{end}} |
19 |
| - </h2> |
20 |
| - {{template "base/alert" .}} |
21 |
| - <form class="ui form grid" action="{{.Link}}" method="post"> |
22 |
| - {{.CsrfTokenHtml}} |
23 |
| - <div class="eleven wide column"> |
24 |
| - <input type="hidden" id="redirect" name="redirect" value="{{.redirect}}"> |
25 |
| - <div class="field {{if .Err_Title}}error{{end}}"> |
26 |
| - <label>{{.locale.Tr "repo.projects.title"}}</label> |
27 |
| - <input name="title" placeholder="{{.locale.Tr "repo.projects.title"}}" value="{{.title}}" autofocus required> |
28 |
| - </div> |
29 |
| - <div class="field"> |
30 |
| - <label>{{.locale.Tr "repo.projects.description"}}</label> |
31 |
| - <textarea name="content" placeholder="{{.locale.Tr "repo.projects.description_placeholder"}}">{{.content}}</textarea> |
32 |
| - </div> |
33 |
| - |
34 |
| - {{if not .PageIsEditProjects}} |
35 |
| - <div class="field"> |
36 |
| - <label>{{.locale.Tr "repo.projects.template.desc"}}</label> |
37 |
| - <div class="ui selection dropdown"> |
38 |
| - <input type="hidden" name="board_type" value="{{.type}}"> |
39 |
| - <div class="default text">{{.locale.Tr "repo.projects.template.desc_helper"}}</div> |
40 |
| - <div class="menu"> |
41 |
| - {{range $element := .BoardTypes}} |
42 |
| - <div class="item" data-id="{{$element.BoardType}}" data-value="{{$element.BoardType}}">{{$.locale.Tr $element.Translation}}</div> |
43 |
| - {{end}} |
44 |
| - </div> |
45 |
| - </div> |
46 |
| - </div> |
47 |
| - {{end}} |
| 10 | + </h2> |
| 11 | + {{template "base/alert" .}} |
| 12 | + <form class="ui form grid" action="{{.Link}}" method="post"> |
| 13 | + {{.CsrfTokenHtml}} |
| 14 | + <div class="eleven wide column"> |
| 15 | + <input type="hidden" id="redirect" name="redirect" value="{{.redirect}}"> |
| 16 | + <div class="field {{if .Err_Title}}error{{end}}"> |
| 17 | + <label>{{.locale.Tr "repo.projects.title"}}</label> |
| 18 | + <input name="title" placeholder="{{.locale.Tr "repo.projects.title"}}" value="{{.title}}" autofocus required> |
| 19 | + </div> |
| 20 | + <div class="field"> |
| 21 | + <label>{{.locale.Tr "repo.projects.description"}}</label> |
| 22 | + <textarea name="content" placeholder="{{.locale.Tr "repo.projects.description_placeholder"}}">{{.content}}</textarea> |
| 23 | + </div> |
48 | 24 |
|
| 25 | + {{if not .PageIsEditProjects}} |
49 | 26 | <div class="field">
|
50 |
| - <label>{{.locale.Tr "repo.projects.card_type.desc"}}</label> |
| 27 | + <label>{{.locale.Tr "repo.projects.template.desc"}}</label> |
51 | 28 | <div class="ui selection dropdown">
|
52 |
| - {{svg "octicon-triangle-down" 14 "dropdown icon"}} |
53 |
| - {{range $element := .CardTypes}} |
54 |
| - {{if or (eq $.card_type $element.CardType) (and (not $.PageIsEditProjects) (eq $element.CardType 1))}} |
55 |
| - <input type="hidden" name="card_type" value="{{$element.CardType}}"> |
56 |
| - <div class="default text">{{$.locale.Tr $element.Translation}}</div> |
57 |
| - {{end}} |
58 |
| - {{end}} |
| 29 | + <input type="hidden" name="board_type" value="{{.type}}"> |
| 30 | + <div class="default text">{{.locale.Tr "repo.projects.template.desc_helper"}}</div> |
59 | 31 | <div class="menu">
|
60 |
| - {{range $element := .CardTypes}} |
61 |
| - <div class="item" data-id="{{$element.CardType}}" data-value="{{$element.CardType}}">{{$.locale.Tr $element.Translation}}</div> |
| 32 | + {{range $element := .BoardTypes}} |
| 33 | + <div class="item" data-id="{{$element.BoardType}}" data-value="{{$element.BoardType}}">{{$.locale.Tr $element.Translation}}</div> |
62 | 34 | {{end}}
|
63 | 35 | </div>
|
64 | 36 | </div>
|
65 | 37 | </div>
|
66 |
| - </div> |
67 |
| - <div class="ui container"> |
68 |
| - <div class="ui divider"></div> |
69 |
| - <div class="ui left"> |
70 |
| - {{if .PageIsEditProjects}} |
71 |
| - <a class="ui cancel button" href="{{$.HomeLink}}/-/projects{{if eq .redirect "project"}}/{{.projectID}}{{end}}"> |
72 |
| - {{.locale.Tr "repo.milestones.cancel"}} |
73 |
| - </a> |
74 |
| - <button class="ui primary button"> |
75 |
| - {{.locale.Tr "repo.projects.modify"}} |
76 |
| - </button> |
77 |
| - {{else}} |
78 |
| - <button class="ui primary button"> |
79 |
| - {{.locale.Tr "repo.projects.create"}} |
80 |
| - </button> |
| 38 | + {{end}} |
| 39 | + |
| 40 | + <div class="field"> |
| 41 | + <label>{{.locale.Tr "repo.projects.card_type.desc"}}</label> |
| 42 | + <div class="ui selection dropdown"> |
| 43 | + {{svg "octicon-triangle-down" 14 "dropdown icon"}} |
| 44 | + {{range $element := .CardTypes}} |
| 45 | + {{if or (eq $.card_type $element.CardType) (and (not $.PageIsEditProjects) (eq $element.CardType 1))}} |
| 46 | + <input type="hidden" name="card_type" value="{{$element.CardType}}"> |
| 47 | + <div class="default text">{{$.locale.Tr $element.Translation}}</div> |
| 48 | + {{end}} |
81 | 49 | {{end}}
|
| 50 | + <div class="menu"> |
| 51 | + {{range $element := .CardTypes}} |
| 52 | + <div class="item" data-id="{{$element.CardType}}" data-value="{{$element.CardType}}">{{$.locale.Tr $element.Translation}}</div> |
| 53 | + {{end}} |
| 54 | + </div> |
82 | 55 | </div>
|
83 | 56 | </div>
|
84 |
| - |
85 |
| - </form> |
86 |
| - </div> |
| 57 | + </div> |
| 58 | + <div class="ui container"> |
| 59 | + <div class="ui divider"></div> |
| 60 | + <div class="ui left"> |
| 61 | + <a class="ui cancel button" href="{{$.CancelLink}}"> |
| 62 | + {{.locale.Tr "repo.milestones.cancel"}} |
| 63 | + </a> |
| 64 | + <button class="ui primary button"> |
| 65 | + {{if .PageIsEditProjects}}{{.locale.Tr "repo.projects.modify"}}{{else}}{{.locale.Tr "repo.projects.create"}}{{end}} |
| 66 | + </button> |
| 67 | + </div> |
| 68 | + </div> |
| 69 | + </form> |
87 | 70 | </div>
|
0 commit comments