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