Browse Source

fix #1948

pull/1950/merge
Unknwon 9 years ago
parent
commit
b4970b3cc3
  1. 2
      README.md
  2. 2
      gogs.go
  3. 6
      modules/middleware/repo.go
  4. 2
      templates/.VERSION
  5. 23
      templates/repo/header_old.tmpl

2
README.md

@ -5,7 +5,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra
![](public/img/gogs-large-resize.png) ![](public/img/gogs-large-resize.png)
##### Current version: 0.7.10 Beta ##### Current version: 0.7.11 Beta
<table> <table>
<tr> <tr>

2
gogs.go

@ -17,7 +17,7 @@ import (
"github.com/gogits/gogs/modules/setting" "github.com/gogits/gogs/modules/setting"
) )
const APP_VER = "0.7.10.1114 Beta" const APP_VER = "0.7.11.1115 Beta"
func init() { func init() {
runtime.GOMAXPROCS(runtime.NumCPU()) runtime.GOMAXPROCS(runtime.NumCPU())

6
modules/middleware/repo.go

@ -79,6 +79,12 @@ func ApiRepoAssignment() macaron.Handler {
// RepoRef handles repository reference name including those contain `/`. // RepoRef handles repository reference name including those contain `/`.
func RepoRef() macaron.Handler { func RepoRef() macaron.Handler {
return func(ctx *Context) { return func(ctx *Context) {
// Empty repository does not have reference information.
if ctx.Repo.Repository.IsBare {
ctx.Data["CommitsCount"] = 0
return
}
var ( var (
refName string refName string
err error err error

2
templates/.VERSION

@ -1 +1 @@
0.7.10.1114 Beta 0.7.11.1115 Beta

23
templates/repo/header_old.tmpl

@ -10,29 +10,6 @@
{{if .IsFork}}<span class="fork-flag">forked from <a href="{{.BaseRepo.RepoLink}}">{{SubStr .BaseRepo.RepoLink 1 -1}}</a></span>{{end}} {{if .IsFork}}<span class="fork-flag">forked from <a href="{{.BaseRepo.RepoLink}}">{{SubStr .BaseRepo.RepoLink 1 -1}}</a></span>{{end}}
</h1> </h1>
<ul id="repo-header-meta" class="right menu menu-line"> <ul id="repo-header-meta" class="right menu menu-line">
<li id="repo-header-download" class="drop">
<a id="repo-header-download-btn" href="#">
<button class="btn btn-black text-bold btn-radius">
<i class="octicon octicon-cloud-download"></i>
</button>
</a>
<div id="repo-header-download-drop" class="drop-down">
<div id="repo-clone" class="clear">
{{if not $.DisableSSH}}
<button class="btn btn-blue left btn-left-radius" id="repo-clone-ssh" data-link="{{$.CloneLink.SSH}}">SSH</button>
{{end}}
<button class="btn {{if $.DisableSSH}}btn-blue{{else}}btn-gray{{end}} left" id="repo-clone-https" data-link="{{$.CloneLink.HTTPS}}">HTTPS</button>
<input id="repo-clone-url" class="ipt ipt-disabled left" value="{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" onclick="this.select();" readonly />
<button id="repo-clone-copy" class="btn btn-black left btn-right-radius" data-copy-val="val" data-copy-from="#repo-clone-url" original-title="{{$.i18n.Tr "repo.click_to_copy"}}" data-original-title="{{$.i18n.Tr "repo.click_to_copy"}}" data-after-title="{{$.i18n.Tr "repo.copied"}}">{{$.i18n.Tr "repo.copy_link"}}</button>
<p class="text-center" id="repo-clone-help">{{$.i18n.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2html}}</p>
<hr/>
<div class="text-center" id="repo-clone-zip">
<a class="btn btn-green btn-radius" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip"><i class="octicon octicon-file-zip"></i>ZIP</a>
<a class="btn btn-green btn-radius" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz"><i class="octicon octicon-file-zip"></i>TAR.GZ</a>
</div>
</div>
</div>
</li>
<li id="repo-header-watch"> <li id="repo-header-watch">
<a id="repo-header-watch-btn" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch"> <a id="repo-header-watch-btn" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch">
<button class="btn btn-gray text-bold btn-radius"> <button class="btn btn-gray text-bold btn-radius">

Loading…
Cancel
Save