Browse Source

repo/home.tmpl: only ellipsis on repository name

File name could contain non-ASCII characters.
See details on https://discuss.gogs.io/t/topic/758.
pull/3475/merge
Unknwon 8 years ago
parent
commit
d1c327d508
No known key found for this signature in database
GPG Key ID: FB9F411CDD69BEC1
  1. 2
      README.md
  2. 2
      gogs.go
  3. 2
      templates/.VERSION
  4. 6
      templates/repo/home.tmpl

2
README.md

@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra
![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true) ![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true)
##### Current tip version: 0.9.115 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions ~~or submit a task on [alpha stage automated binary building system](https://build.gogs.io/)~~) ##### Current tip version: 0.9.116 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions ~~or submit a task on [alpha stage automated binary building system](https://build.gogs.io/)~~)
| Web | UI | Preview | | Web | UI | Preview |
|:-------------:|:-------:|:-------:| |:-------------:|:-------:|:-------:|

2
gogs.go

@ -16,7 +16,7 @@ import (
"github.com/gogits/gogs/modules/setting" "github.com/gogits/gogs/modules/setting"
) )
const APP_VER = "0.9.115.0103" const APP_VER = "0.9.116.0124"
func init() { func init() {
setting.AppVer = APP_VER setting.AppVer = APP_VER

2
templates/.VERSION

@ -1 +1 @@
0.9.115.0103 0.9.116.0124

6
templates/repo/home.tmpl

@ -18,16 +18,16 @@
{{template "repo/branch_dropdown" .}} {{template "repo/branch_dropdown" .}}
<div class="fitted item"> <div class="fitted item">
<div class="ui breadcrumb"> <div class="ui breadcrumb">
<a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchName}}">{{EllipsisString .Repository.Name 25}}</a> <a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchName}}">{{EllipsisString .Repository.Name 15}}</a>
{{ $n := len .TreeNames}} {{ $n := len .TreeNames}}
{{ $l := Subtract $n 1}} {{ $l := Subtract $n 1}}
{{range $i, $v := .TreeNames}} {{range $i, $v := .TreeNames}}
<div class="divider"> / </div> <div class="divider"> / </div>
{{if eq $i $l}} {{if eq $i $l}}
<span class="active section">{{EllipsisString $v 15}}</span> <span class="active section">{{$v}}</span>
{{else}} {{else}}
{{ $p := index $.Paths $i}} {{ $p := index $.Paths $i}}
<span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{EllipsisString $v 15}}</a></span> <span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{$v}}</a></span>
{{end}} {{end}}
{{end}} {{end}}
</div> </div>

Loading…
Cancel
Save