0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-25 17:02:50 +01:00

Merge branch 'master' of github.com:gogits/gogs

Conflicts:
	templates/repo/single_file.tmpl
This commit is contained in:
Unknown 2014-03-24 12:45:57 -04:00
commit 6ef3e8b3c9
2 changed files with 8 additions and 1 deletions

View file

@ -156,6 +156,7 @@ func Single(ctx *middleware.Context, params martini.Params) {
}
if readmeFile != nil {
ctx.Data["ReadmeInSingle"] = true
ctx.Data["ReadmeExist"] = true
if blob, err := readmeFile.LookupBlob(); err != nil {
ctx.Handle(404, "repo.Single(readmeFile.LookupBlob)", err)

View file

@ -2,11 +2,16 @@
<div class="panel-heading file-head">
{{if .ReadmeExist}}
<i class="icon fa fa-book"></i>
{{if .ReadmeInSingle}}
{{.FileName}}
{{else}}
{{.FileName}} <span class="file-size">{{FileSize .FileSize}}</span>
{{end}}
{{else}}
<i class="icon fa fa-file-text-o"></i>
{{.FileName}} <span class="file-size">{{FileSize .FileSize}}</span>
{{end}}
{{if not .ReadmeInSingle}}
<div class="btn-group pull-right">
<a class="btn btn-default hidden" href="#">Edit</a>
<a class="btn btn-default" href="{{.FileLink}}">Raw</a>
@ -14,10 +19,11 @@
<a class="btn btn-default hidden" href="#">History</a>
<a class="btn btn-danger hidden" href="#">Delete</a>
</div>
{{end}}
</div>
{{if not .FileIsText}}
<div class="panel-footer text-center">
<a href="{{.FileLink}}" class="btn btn-default btn-lg">View Raw</a>
<a href="{{.FileLink}}" class="btn btn-default">View Raw</a>
</div>
{{else}}
{{if .ReadmeExist}}