aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/editor/cherry_pick.tmpl28
-rw-r--r--templates/repo/editor/edit.tmpl32
-rw-r--r--templates/repo/editor/patch.tmpl20
-rw-r--r--templates/repo/editor/upload.tmpl32
-rw-r--r--templates/repo/home.tmpl2
5 files changed, 53 insertions, 61 deletions
diff --git a/templates/repo/editor/cherry_pick.tmpl b/templates/repo/editor/cherry_pick.tmpl
index 55c6252991..4f1937b848 100644
--- a/templates/repo/editor/cherry_pick.tmpl
+++ b/templates/repo/editor/cherry_pick.tmpl
@@ -8,21 +8,19 @@
<input type="hidden" name="last_commit" value="{{.last_commit}}">
<input type="hidden" name="page_has_posted" value="true">
<input type="hidden" name="revert" value="{{if eq .CherryPickType "revert"}}true{{else}}false{{end}}">
- <div class="ui secondary menu">
- <div class="fitted item treepath">
- <div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}">
- {{$shaurl := printf "%s/commit/%s" $.RepoLink (PathEscape .SHA)}}
- {{$shalink := printf "<a class=\"ui primary sha label\" href=\"%s\">%s</a>" (Escape $shaurl) (ShortSha .SHA)}}
- {{if eq .CherryPickType "revert"}}
- {{.locale.Tr "repo.editor.revert" $shalink | Str2html}}
- {{else}}
- {{.locale.Tr "repo.editor.cherry_pick" $shalink | Str2html}}
- {{end}}
- <a class="section" href="{{$.RepoLink}}">{{.Repository.FullName}}</a>
- <div class="divider">:</div>
- <a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a>
- <span>{{.locale.Tr "repo.editor.or"}} <a href="{{$shaurl}}">{{.locale.Tr "repo.editor.cancel_lower"}}</a></span>
- </div>
+ <div class="repo-editor-header">
+ <div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}">
+ {{$shaurl := printf "%s/commit/%s" $.RepoLink (PathEscape .SHA)}}
+ {{$shalink := printf "<a class=\"ui primary sha label\" href=\"%s\">%s</a>" (Escape $shaurl) (ShortSha .SHA)}}
+ {{if eq .CherryPickType "revert"}}
+ {{.locale.Tr "repo.editor.revert" $shalink | Str2html}}
+ {{else}}
+ {{.locale.Tr "repo.editor.cherry_pick" $shalink | Str2html}}
+ {{end}}
+ <a class="section" href="{{$.RepoLink}}">{{.Repository.FullName}}</a>
+ <div class="divider">:</div>
+ <a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a>
+ <span>{{.locale.Tr "repo.editor.or"}} <a href="{{$shaurl}}">{{.locale.Tr "repo.editor.cancel_lower"}}</a></span>
</div>
</div>
{{template "repo/editor/commit_form" .}}
diff --git a/templates/repo/editor/edit.tmpl b/templates/repo/editor/edit.tmpl
index fe0bd46635..2f47616dc5 100644
--- a/templates/repo/editor/edit.tmpl
+++ b/templates/repo/editor/edit.tmpl
@@ -7,24 +7,22 @@
{{.CsrfTokenHtml}}
<input type="hidden" name="last_commit" value="{{.last_commit}}">
<input type="hidden" name="page_has_posted" value="{{.PageHasPosted}}">
- <div class="ui secondary menu">
- <div class="fitted item treepath">
- <div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}">
- <a class="section" href="{{$.BranchLink}}">{{.Repository.Name}}</a>
- {{$n := len .TreeNames}}
- {{$l := Eval $n "-" 1}}
- {{range $i, $v := .TreeNames}}
- <div class="divider"> / </div>
- {{if eq $i $l}}
- <input id="file-name" value="{{$v}}" placeholder="{{$.locale.Tr "repo.editor.name_your_file"}}" data-editorconfig="{{$.Editorconfig}}" required autofocus>
- <span data-tooltip-content="{{$.locale.Tr "repo.editor.filename_help"}}">{{svg "octicon-info"}}</span>
- {{else}}
- <span class="section"><a href="{{$.BranchLink}}/{{index $.TreePaths $i | PathEscapeSegments}}">{{$v}}</a></span>
- {{end}}
+ <div class="repo-editor-header">
+ <div class="ui breadcrumb field{{if .Err_TreePath}} error{{end}}">
+ <a class="section" href="{{$.BranchLink}}">{{.Repository.Name}}</a>
+ {{$n := len .TreeNames}}
+ {{$l := Eval $n "-" 1}}
+ {{range $i, $v := .TreeNames}}
+ <div class="divider"> / </div>
+ {{if eq $i $l}}
+ <input id="file-name" value="{{$v}}" placeholder="{{$.locale.Tr "repo.editor.name_your_file"}}" data-editorconfig="{{$.Editorconfig}}" required autofocus>
+ <span data-tooltip-content="{{$.locale.Tr "repo.editor.filename_help"}}">{{svg "octicon-info"}}</span>
+ {{else}}
+ <span class="section"><a href="{{$.BranchLink}}/{{index $.TreePaths $i | PathEscapeSegments}}">{{$v}}</a></span>
{{end}}
- <span>{{.locale.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}{{if not .IsNewFile}}/{{PathEscapeSegments .TreePath}}{{end}}">{{.locale.Tr "repo.editor.cancel_lower"}}</a></span>
- <input type="hidden" id="tree_path" name="tree_path" value="{{.TreePath}}" required>
- </div>
+ {{end}}
+ <span>{{.locale.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}{{if not .IsNewFile}}/{{PathEscapeSegments .TreePath}}{{end}}">{{.locale.Tr "repo.editor.cancel_lower"}}</a></span>
+ <input type="hidden" id="tree_path" name="tree_path" value="{{.TreePath}}" required>
</div>
</div>
<div class="field">
diff --git a/templates/repo/editor/patch.tmpl b/templates/repo/editor/patch.tmpl
index 99c13c1fc5..4f4032e81c 100644
--- a/templates/repo/editor/patch.tmpl
+++ b/templates/repo/editor/patch.tmpl
@@ -7,17 +7,15 @@
{{.CsrfTokenHtml}}
<input type="hidden" name="last_commit" value="{{.last_commit}}">
<input type="hidden" name="page_has_posted" value="{{.PageHasPosted}}">
- <div class="ui secondary menu">
- <div class="fitted item treepath">
- <div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}">
- {{.locale.Tr "repo.editor.patching"}}
- <a class="section" href="{{$.RepoLink}}">{{.Repository.FullName}}</a>
- <div class="divider">:</div>
- <a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a>
- <span>{{.locale.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}">{{.locale.Tr "repo.editor.cancel_lower"}}</a></span>
- <input type="hidden" id="tree_path" name="tree_path" value="" required>
- <input id="file-name" type="hidden" value="diff.patch">
- </div>
+ <div class="repo-editor-header">
+ <div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}">
+ {{.locale.Tr "repo.editor.patching"}}
+ <a class="section" href="{{$.RepoLink}}">{{.Repository.FullName}}</a>
+ <div class="divider">:</div>
+ <a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a>
+ <span>{{.locale.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}">{{.locale.Tr "repo.editor.cancel_lower"}}</a></span>
+ <input type="hidden" id="tree_path" name="tree_path" value="" required>
+ <input id="file-name" type="hidden" value="diff.patch">
</div>
</div>
<div class="field">
diff --git a/templates/repo/editor/upload.tmpl b/templates/repo/editor/upload.tmpl
index 88cdf61c74..d9408c9eee 100644
--- a/templates/repo/editor/upload.tmpl
+++ b/templates/repo/editor/upload.tmpl
@@ -5,24 +5,22 @@
{{template "base/alert" .}}
<form class="ui comment form" method="post">
{{.CsrfTokenHtml}}
- <div class="ui secondary menu">
- <div class="item fitted treepath">
- <div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}">
- <a class="section" href="{{$.BranchLink}}">{{.Repository.Name}}</a>
- {{$n := len .TreeNames}}
- {{$l := Eval $n "-" 1}}
- {{range $i, $v := .TreeNames}}
- <div class="divider"> / </div>
- {{if eq $i $l}}
- <input type="text" id="file-name" value="{{$v}}" placeholder="{{$.locale.Tr "repo.editor.add_subdir"}}" autofocus>
- <span data-tooltip-content="{{$.locale.Tr "repo.editor.filename_help"}}">{{svg "octicon-info"}}</span>
- {{else}}
- <span class="section"><a href="{{$.BranchLink}}/{{index $.TreePaths $i | PathEscapeSegments}}">{{$v}}</a></span>
- {{end}}
+ <div class="repo-editor-header">
+ <div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}">
+ <a class="section" href="{{$.BranchLink}}">{{.Repository.Name}}</a>
+ {{$n := len .TreeNames}}
+ {{$l := Eval $n "-" 1}}
+ {{range $i, $v := .TreeNames}}
+ <div class="divider"> / </div>
+ {{if eq $i $l}}
+ <input type="text" id="file-name" value="{{$v}}" placeholder="{{$.locale.Tr "repo.editor.add_subdir"}}" autofocus>
+ <span data-tooltip-content="{{$.locale.Tr "repo.editor.filename_help"}}">{{svg "octicon-info"}}</span>
+ {{else}}
+ <span class="section"><a href="{{$.BranchLink}}/{{index $.TreePaths $i | PathEscapeSegments}}">{{$v}}</a></span>
{{end}}
- <span>{{.locale.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}{{if not .IsNewFile}}/{{.TreePath | PathEscapeSegments}}{{end}}">{{.locale.Tr "repo.editor.cancel_lower"}}</a></span>
- <input type="hidden" id="tree_path" name="tree_path" value="{{.TreePath}}" required>
- </div>
+ {{end}}
+ <span>{{.locale.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}{{if not .IsNewFile}}/{{.TreePath | PathEscapeSegments}}{{end}}">{{.locale.Tr "repo.editor.cancel_lower"}}</a></span>
+ <input type="hidden" id="tree_path" name="tree_path" value="{{.TreePath}}" required>
</div>
</div>
<div class="field">
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl
index 1db073c326..f9dbf49e5b 100644
--- a/templates/repo/home.tmpl
+++ b/templates/repo/home.tmpl
@@ -109,7 +109,7 @@
</a>
{{end}}
{{if ne $n 0}}
- <span class="ui breadcrumb repo-path gt-ml-2">
+ <span class="breadcrumb repo-path gt-ml-2">
<a class="section" href="{{.RepoLink}}/src/{{.BranchNameSubURL}}" title="{{.Repository.Name}}">{{StringUtils.EllipsisString .Repository.Name 30}}</a>
{{- range $i, $v := .TreeNames -}}
<span class="divider">/</span>