code.gitea.io/gitea@v1.22.3/templates/repo/release/new.tmpl (about) 1 {{template "base/head" .}} 2 <div role="main" aria-label="{{.Title}}" class="page-content repository new release"> 3 {{template "repo/header" .}} 4 <div class="ui container"> 5 <h2 class="ui dividing header"> 6 {{if .PageIsEditRelease}} 7 {{ctx.Locale.Tr "repo.release.edit_release"}} 8 <div class="sub header">{{ctx.Locale.Tr "repo.release.edit_subheader"}}</div> 9 {{else}} 10 {{ctx.Locale.Tr "repo.release.new_release"}} 11 <div class="sub header">{{ctx.Locale.Tr "repo.release.new_subheader"}}</div> 12 {{end}} 13 </h2> 14 {{template "base/alert" .}} 15 <form class="ui form" action="{{.Link}}" method="post"> 16 {{.CsrfTokenHtml}} 17 <div class="ui seven wide target"> 18 <div class="inline field {{if .Err_TagName}}error{{end}}"> 19 {{if .PageIsEditRelease}} 20 <b>{{.tag_name}}</b><span class="at">@</span><strong>{{.tag_target}}</strong> 21 {{else}} 22 <input id="tag-name" name="tag_name" value="{{.tag_name}}" aria-label="{{ctx.Locale.Tr "repo.release.tag_name"}}" placeholder="{{ctx.Locale.Tr "repo.release.tag_name"}}" autofocus required maxlength="255"> 23 <input id="tag-name-editor" type="hidden" data-existing-tags="{{JsonUtils.EncodeToString .Tags}}" data-tag-helper="{{ctx.Locale.Tr "repo.release.tag_helper"}}" data-tag-helper-new="{{ctx.Locale.Tr "repo.release.tag_helper_new"}}" data-tag-helper-existing="{{ctx.Locale.Tr "repo.release.tag_helper_existing"}}"> 24 <div id="tag-target-selector" class="tw-inline-block"> 25 <span class="at">@</span> 26 <div class="ui selection dropdown"> 27 <input type="hidden" name="tag_target" value="{{.tag_target}}"> 28 {{svg "octicon-git-branch"}} 29 <div class="text"> 30 {{ctx.Locale.Tr "repo.release.target"}} : 31 <strong id="repo-branch-current">{{.Repository.DefaultBranch}}</strong> 32 </div> 33 {{svg "octicon-triangle-down" 14 "dropdown icon"}} 34 <div class="menu"> 35 {{range .Branches}} 36 <div class="item" data-value="{{.}}">{{.}}</div> 37 {{end}} 38 </div> 39 </div> 40 </div> 41 <div> 42 <span id="tag-helper" class="help tw-mt-2 tw-pb-0">{{ctx.Locale.Tr "repo.release.tag_helper"}}</span> 43 </div> 44 {{end}} 45 </div> 46 </div> 47 <div class="eleven wide tw-pt-0"> 48 <div class="field {{if .Err_Title}}error{{end}}"> 49 <input name="title" aria-label="{{ctx.Locale.Tr "repo.release.title"}}" placeholder="{{ctx.Locale.Tr "repo.release.title"}}" value="{{.title}}" autofocus maxlength="255"> 50 </div> 51 <div class="field"> 52 {{template "shared/combomarkdowneditor" (dict 53 "MarkdownPreviewUrl" (print .Repository.Link "/markup") 54 "MarkdownPreviewContext" .RepoLink 55 "TextareaName" "content" 56 "TextareaContent" .content 57 "TextareaPlaceholder" (ctx.Locale.Tr "repo.release.message") 58 "TextareaAriaLabel" (ctx.Locale.Tr "repo.release.message") 59 "DropzoneParentContainer" "form" 60 )}} 61 </div> 62 {{range .attachments}} 63 <div class="field flex-text-block" id="attachment-{{.ID}}"> 64 <div class="flex-text-inline tw-flex-1"> 65 <input name="attachment-edit-{{.UUID}}" class="attachment_edit" required value="{{.Name}}"> 66 <input name="attachment-del-{{.UUID}}" type="hidden" value="false"> 67 <span class="ui text grey tw-whitespace-nowrap">{{.Size | FileSize}}</span> 68 <span data-tooltip-content="{{ctx.Locale.Tr "repo.release.download_count" (ctx.Locale.PrettyNumber .DownloadCount)}}"> 69 {{svg "octicon-info"}} 70 </span> 71 </div> 72 <a class="ui mini compact red button remove-rel-attach" data-id="{{.ID}}" data-uuid="{{.UUID}}"> 73 {{ctx.Locale.Tr "remove"}} 74 </a> 75 </div> 76 {{end}} 77 {{if .IsAttachmentEnabled}} 78 <div class="field"> 79 {{template "repo/upload" .}} 80 </div> 81 {{end}} 82 </div> 83 <div class="divider"></div> 84 <div class="ui"> 85 <div> 86 {{if not .PageIsEditRelease}} 87 <div class="tag-message field"> 88 <div class="ui checkbox"> 89 <input type="checkbox" name="add_tag_msg"> 90 <label><strong>{{ctx.Locale.Tr "repo.release.add_tag_msg"}}</strong></label> 91 </div> 92 </div> 93 {{else}} 94 <input type="hidden" name="add_tag_msg" value="false"> 95 {{end}} 96 <div class="prerelease field"> 97 <div class="ui checkbox"> 98 <input type="checkbox" name="prerelease" {{if .prerelease}}checked{{end}}> 99 <label><strong>{{ctx.Locale.Tr "repo.release.prerelease_desc"}}</strong></label> 100 </div> 101 </div> 102 <span class="help">{{ctx.Locale.Tr "repo.release.prerelease_helper"}}</span> 103 <div class="divider tw-mt-0"></div> 104 <div class="tw-flex tw-justify-end"> 105 {{if .PageIsEditRelease}} 106 <a class="ui small button" href="{{.RepoLink}}/releases"> 107 {{ctx.Locale.Tr "repo.release.cancel"}} 108 </a> 109 <a class="ui small red button delete-button" data-url="{{$.RepoLink}}/releases/delete" data-id="{{.ID}}"> 110 {{ctx.Locale.Tr "repo.release.delete_release"}} 111 </a> 112 {{if .IsDraft}} 113 <button class="ui small button" type="submit" name="draft" value="{{ctx.Locale.Tr "repo.release.save_draft"}}">{{ctx.Locale.Tr "repo.release.save_draft"}}</button> 114 <button class="ui small primary button"> 115 {{ctx.Locale.Tr "repo.release.publish"}} 116 </button> 117 {{else}} 118 <button class="ui small primary button"> 119 {{ctx.Locale.Tr "repo.release.edit_release"}} 120 </button> 121 {{end}} 122 {{else}} 123 {{if not .tag_name}} 124 <button class="ui small button" name="tag_only" value="1">{{ctx.Locale.Tr "repo.release.add_tag"}}</button> 125 {{end}} 126 <button class="ui small button" name="draft" value="1">{{ctx.Locale.Tr "repo.release.save_draft"}}</button> 127 <button class="ui small primary button"> 128 {{ctx.Locale.Tr "repo.release.publish"}} 129 </button> 130 {{end}} 131 </div> 132 </div> 133 </div> 134 </form> 135 </div> 136 </div> 137 138 {{if .PageIsEditRelease}} 139 <div class="ui g-modal-confirm delete modal"> 140 <div class="header"> 141 {{svg "octicon-trash"}} 142 {{ctx.Locale.Tr "repo.release.deletion"}} 143 </div> 144 <div class="content"> 145 <p>{{ctx.Locale.Tr "repo.release.deletion_desc"}}</p> 146 </div> 147 {{template "base/modal_actions_confirm" .}} 148 </div> 149 {{end}} 150 {{template "base/footer" .}}