File tree 2 files changed +4
-1
lines changed
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ const (
25
25
func NewDiffPatch (ctx * context.Context ) {
26
26
canCommit := renderCommitRights (ctx )
27
27
28
+ ctx .Data ["PageIsPatch" ] = true
29
+
28
30
ctx .Data ["TreePath" ] = ""
29
31
30
32
ctx .Data ["commit_summary" ] = ""
@@ -51,6 +53,7 @@ func NewDiffPatchPost(ctx *context.Context) {
51
53
if form .CommitChoice == frmCommitChoiceNewBranch {
52
54
branchName = form .NewBranchName
53
55
}
56
+ ctx .Data ["PageIsPatch" ] = true
54
57
ctx .Data ["TreePath" ] = ""
55
58
ctx .Data ["BranchLink" ] = ctx .Repo .RepoLink + "/src/" + ctx .Repo .BranchNameSubURL ()
56
59
ctx .Data ["FileContent" ] = form .Content
Original file line number Diff line number Diff line change 9
9
{{.locale.Tr "repo.editor.commit_changes"}}
10
10
{{- end}}</h3>
11
11
<div class="field">
12
- <input name="commit_summary" placeholder="{{if .PageIsDelete}}{{.locale.Tr "repo.editor.delete" .TreePath}}{{else if .PageIsUpload}}{{.locale.Tr "repo.editor.upload_files_to_dir" .TreePath}}{{else if .IsNewFile}}{{.locale.Tr "repo.editor.add_tmpl"}}{{else}}{{.locale.Tr "repo.editor.update" .TreePath}}{{end}}" value="{{.commit_summary}}" autofocus>
12
+ <input name="commit_summary" placeholder="{{if .PageIsDelete}}{{.locale.Tr "repo.editor.delete" .TreePath}}{{else if .PageIsUpload}}{{.locale.Tr "repo.editor.upload_files_to_dir" .TreePath}}{{else if .IsNewFile}}{{.locale.Tr "repo.editor.add_tmpl"}}{{else if .PageIsPatch}}{{.locale.Tr "repo.editor.patch"}}{{else }}{{.locale.Tr "repo.editor.update" .TreePath}}{{end}}" value="{{.commit_summary}}" autofocus>
13
13
</div>
14
14
<div class="field">
15
15
<textarea name="commit_message" placeholder="{{.locale.Tr "repo.editor.commit_message_desc"}}" rows="5">{{.commit_message}}</textarea>
You can’t perform that action at this time.
0 commit comments