diff options
author | Unknwon <u@gogs.io> | 2016-08-30 05:07:50 -0700 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-08-30 05:23:59 -0700 |
commit | 643142acab44d46aa6c001c90ad5d307a8662b99 (patch) | |
tree | 8e26f8959af5175e865d71a35df5dc087ff14dc8 /templates/repo/home.tmpl | |
parent | 7c31f235da287b0ba1499986758332c2c346deb0 (diff) | |
download | gitea-643142acab44d46aa6c001c90ad5d307a8662b99.tar.gz gitea-643142acab44d46aa6c001c90ad5d307a8662b99.zip |
Web editor: support upload files
Diffstat (limited to 'templates/repo/home.tmpl')
-rw-r--r-- | templates/repo/home.tmpl | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 2b8c7e06e0..c0c06a1438 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -18,36 +18,36 @@ {{template "repo/branch_dropdown" .}} <div class="fitted item"> <div class="ui breadcrumb"> - <a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchName}}">{{.Repository.Name}}</a> + <a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchName}}">{{EllipsisString .Repository.Name 25}}</a> {{ $n := len .TreeNames}} {{ $l := Subtract $n 1}} {{range $i, $v := .TreeNames}} <div class="divider"> / </div> {{if eq $i $l}} - <span class="active section">{{$v}}</span> + <span class="active section">{{EllipsisString $v 15}}</span> {{else}} {{ $p := index $.Paths $i}} - <span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{$v}}</a></span> + <span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{EllipsisString $v 15}}</a></span> {{end}} {{end}} </div> </div> <div class="right fitted item"> {{if .Repository.CanEnableEditor}} - <div id="file-buttons" class="ui tiny buttons"> + <div id="file-buttons" class="ui tiny blue buttons"> {{if .CanAddFile}} <a href="{{.RepoLink}}/_new/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}" class="ui button"> {{.i18n.Tr "repo.editor.new_file"}} </a> {{end}} - {{if .UploadFileLink}} - <!-- <a href="{{EscapePound .UploadFileLink}}" class="ui button nowrap"> - <i class="upload icon"></i> {{.i18n.Tr "repo.upload_file"}} - </a> --> + {{if .CanUploadFile}} + <a href="{{.RepoLink}}/_upload/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}" class="ui button"> + {{.i18n.Tr "repo.editor.upload_file"}} + </a> {{end}} </div> {{end}} - + <!-- Only show colne panel in repository home page --> {{if eq $n 0}} <div class="ui action small input" id="clone-panel"> |