|
1 | 1 | <h2 class="ui dividing header">
|
2 | 2 | {{if .PageIsEditProjects}}
|
3 |
| - {{.locale.Tr "repo.projects.edit"}} |
4 |
| - <div class="sub header">{{.locale.Tr "repo.projects.edit_subheader"}}</div> |
| 3 | + {{ctx.Locale.Tr "repo.projects.edit"}} |
| 4 | + <div class="sub header">{{ctx.Locale.Tr "repo.projects.edit_subheader"}}</div> |
5 | 5 | {{else}}
|
6 |
| - {{.locale.Tr "repo.projects.new"}} |
7 |
| - <div class="sub header">{{.locale.Tr "repo.projects.new_subheader"}}</div> |
| 6 | + {{ctx.Locale.Tr "repo.projects.new"}} |
| 7 | + <div class="sub header">{{ctx.Locale.Tr "repo.projects.new_subheader"}}</div> |
8 | 8 | {{end}}
|
9 | 9 | </h2>
|
10 | 10 | {{template "base/alert" .}}
|
|
13 | 13 | <div>
|
14 | 14 | <input type="hidden" id="redirect" name="redirect" value="{{.redirect}}">
|
15 | 15 | <div class="field {{if .Err_Title}}error{{end}}">
|
16 |
| - <label>{{.locale.Tr "repo.projects.title"}}</label> |
17 |
| - <input name="title" placeholder="{{.locale.Tr "repo.projects.title"}}" value="{{.title}}" autofocus required> |
| 16 | + <label>{{ctx.Locale.Tr "repo.projects.title"}}</label> |
| 17 | + <input name="title" placeholder="{{ctx.Locale.Tr "repo.projects.title"}}" value="{{.title}}" autofocus required> |
18 | 18 | </div>
|
19 | 19 | <div class="field">
|
20 |
| - <label>{{.locale.Tr "repo.projects.description"}}</label> |
21 |
| - <textarea name="content" placeholder="{{.locale.Tr "repo.projects.description_placeholder"}}">{{.content}}</textarea> |
| 20 | + <label>{{ctx.Locale.Tr "repo.projects.description"}}</label> |
| 21 | + <textarea name="content" placeholder="{{ctx.Locale.Tr "repo.projects.description_placeholder"}}">{{.content}}</textarea> |
22 | 22 | </div>
|
23 | 23 |
|
24 | 24 | {{if not .PageIsEditProjects}}
|
25 | 25 | <div class="field">
|
26 |
| - <label>{{.locale.Tr "repo.projects.template.desc"}}</label> |
| 26 | + <label>{{ctx.Locale.Tr "repo.projects.template.desc"}}</label> |
27 | 27 | <div class="ui selection dropdown">
|
28 | 28 | <input type="hidden" name="board_type" value="{{.type}}">
|
29 |
| - <div class="default text">{{.locale.Tr "repo.projects.template.desc_helper"}}</div> |
| 29 | + <div class="default text">{{ctx.Locale.Tr "repo.projects.template.desc_helper"}}</div> |
30 | 30 | <div class="menu">
|
31 | 31 | {{range $element := .BoardTypes}}
|
32 |
| - <div class="item" data-id="{{$element.BoardType}}" data-value="{{$element.BoardType}}">{{$.locale.Tr $element.Translation}}</div> |
| 32 | + <div class="item" data-id="{{$element.BoardType}}" data-value="{{$element.BoardType}}">{{ctx.Locale.Tr $element.Translation}}</div> |
33 | 33 | {{end}}
|
34 | 34 | </div>
|
35 | 35 | </div>
|
36 | 36 | </div>
|
37 | 37 | {{end}}
|
38 | 38 |
|
39 | 39 | <div class="field">
|
40 |
| - <label>{{.locale.Tr "repo.projects.card_type.desc"}}</label> |
| 40 | + <label>{{ctx.Locale.Tr "repo.projects.card_type.desc"}}</label> |
41 | 41 | <div class="ui selection dropdown">
|
42 | 42 | {{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
43 | 43 | {{range $element := .CardTypes}}
|
44 | 44 | {{if or (eq $.card_type $element.CardType) (and (not $.PageIsEditProjects) (eq $element.CardType 1))}}
|
45 | 45 | <input type="hidden" name="card_type" value="{{$element.CardType}}">
|
46 |
| - <div class="default text">{{$.locale.Tr $element.Translation}}</div> |
| 46 | + <div class="default text">{{ctx.Locale.Tr $element.Translation}}</div> |
47 | 47 | {{end}}
|
48 | 48 | {{end}}
|
49 | 49 | <div class="menu">
|
50 | 50 | {{range $element := .CardTypes}}
|
51 |
| - <div class="item" data-id="{{$element.CardType}}" data-value="{{$element.CardType}}">{{$.locale.Tr $element.Translation}}</div> |
| 51 | + <div class="item" data-id="{{$element.CardType}}" data-value="{{$element.CardType}}">{{ctx.Locale.Tr $element.Translation}}</div> |
52 | 52 | {{end}}
|
53 | 53 | </div>
|
54 | 54 | </div>
|
|
57 | 57 | <div class="divider"></div>
|
58 | 58 | <div class="gt-text-right">
|
59 | 59 | <a class="ui cancel button" href="{{$.CancelLink}}">
|
60 |
| - {{.locale.Tr "repo.milestones.cancel"}} |
| 60 | + {{ctx.Locale.Tr "repo.milestones.cancel"}} |
61 | 61 | </a>
|
62 | 62 | <button class="ui primary button">
|
63 |
| - {{if .PageIsEditProjects}}{{.locale.Tr "repo.projects.modify"}}{{else}}{{.locale.Tr "repo.projects.create"}}{{end}} |
| 63 | + {{if .PageIsEditProjects}}{{ctx.Locale.Tr "repo.projects.modify"}}{{else}}{{ctx.Locale.Tr "repo.projects.create"}}{{end}} |
64 | 64 | </button>
|
65 | 65 | </div>
|
66 | 66 | </form>
|
0 commit comments