gitea源码

common_breadcrumb.tmpl 1011B

1234567891011121314151617
  1. <div class="breadcrumb">
  2. <a class="section" href="{{$.BranchLink}}">{{.Repository.Name}}</a>
  3. {{$n := len .TreeNames}}
  4. {{$l := Eval $n "-" 1}}
  5. {{range $i, $v := .TreeNames}}
  6. <div class="breadcrumb-divider">/</div>
  7. {{if eq $i $l}}
  8. <input id="file-name" maxlength="255" value="{{$v}}" placeholder="{{ctx.Locale.Tr (Iif $.PageIsUpload "repo.editor.add_subdir" "repo.editor.name_your_file")}}" data-editorconfig="{{$.EditorconfigJson}}" {{Iif $.PageIsUpload "" "required"}} autofocus>
  9. <span data-tooltip-content="{{ctx.Locale.Tr "repo.editor.filename_help"}}">{{svg "octicon-info"}}</span>
  10. {{else}}
  11. <span class="section"><a href="{{$.BranchLink}}/{{index $.TreePaths $i | PathEscapeSegments}}">{{$v}}</a></span>
  12. {{end}}
  13. {{end}}
  14. <span>{{ctx.Locale.Tr "repo.editor.or"}} <a href="{{or .ReturnURI (print $.BranchLink "/" (PathEscapeSegments .TreePath))}}">{{ctx.Locale.Tr "repo.editor.cancel_lower"}}</a></span>
  15. <input type="hidden" id="tree_path" name="tree_path" value="{{.TreePath}}">
  16. </div>