code.gitea.io/gitea@v1.22.3/templates/repo/editor/patch.tmpl (about) 1 {{template "base/head" .}} 2 <div role="main" aria-label="{{.Title}}" class="page-content repository file editor edit"> 3 {{template "repo/header" .}} 4 <div class="ui container"> 5 {{template "base/alert" .}} 6 <form class="ui edit form" method="post" action="{{.RepoLink}}/_diffpatch/{{.BranchName | PathEscapeSegments}}"> 7 {{.CsrfTokenHtml}} 8 <input type="hidden" name="last_commit" value="{{.last_commit}}"> 9 <input type="hidden" name="page_has_posted" value="{{.PageHasPosted}}"> 10 <div class="repo-editor-header"> 11 <div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}"> 12 {{ctx.Locale.Tr "repo.editor.patching"}} 13 <a class="section" href="{{$.RepoLink}}">{{.Repository.FullName}}</a> 14 <div class="breadcrumb-divider">:</div> 15 <a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a> 16 <span>{{ctx.Locale.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}">{{ctx.Locale.Tr "repo.editor.cancel_lower"}}</a></span> 17 <input type="hidden" name="tree_path" value="__dummy_for_EditRepoFileForm.TreePath(Required)__"> 18 <input id="file-name" type="hidden" value="diff.patch"> 19 </div> 20 </div> 21 <div class="field"> 22 <div class="ui compact small menu small-menu-items repo-editor-menu"> 23 <a class="active item" data-tab="write">{{svg "octicon-code" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.editor.new_patch"}}</a> 24 </div> 25 <div class="ui active tab segment tw-rounded tw-p-0" data-tab="write"> 26 <textarea id="edit_area" name="content" class="tw-hidden" data-id="repo-{{.Repository.Name}}-patch" 27 data-context="{{.RepoLink}}" 28 data-line-wrap-extensions="{{.LineWrapExtensions}}"> 29 {{.FileContent}}</textarea> 30 <div class="editor-loading is-loading"></div> 31 </div> 32 </div> 33 {{template "repo/editor/commit_form" .}} 34 </form> 35 </div> 36 37 <div class="ui g-modal-confirm modal" id="edit-empty-content-modal"> 38 <div class="header"> 39 {{svg "octicon-file"}} 40 {{ctx.Locale.Tr "repo.editor.commit_empty_file_header"}} 41 </div> 42 <div class="center content"> 43 <p>{{ctx.Locale.Tr "repo.editor.commit_empty_file_text"}}</p> 44 </div> 45 <div class="actions"> 46 <button class="ui cancel button"> 47 {{svg "octicon-x"}} 48 {{ctx.Locale.Tr "repo.editor.cancel"}} 49 </button> 50 <button class="ui primary ok button"> 51 {{svg "fontawesome-save"}} 52 {{ctx.Locale.Tr "repo.editor.commit_changes"}} 53 </button> 54 </div> 55 </div> 56 </div> 57 {{template "base/footer" .}}