mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-24 15:23:33 +01:00
fix
This commit is contained in:
parent
79633ab1fb
commit
123c7b44e8
2 changed files with 15 additions and 8 deletions
|
@ -156,6 +156,7 @@ func Single(ctx *middleware.Context, params martini.Params) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if readmeFile != nil {
|
if readmeFile != nil {
|
||||||
|
ctx.Data["ReadmeInSingle"] = true
|
||||||
ctx.Data["ReadmeExist"] = true
|
ctx.Data["ReadmeExist"] = true
|
||||||
if blob, err := readmeFile.LookupBlob(); err != nil {
|
if blob, err := readmeFile.LookupBlob(); err != nil {
|
||||||
ctx.Handle(404, "repo.Single(readmeFile.LookupBlob)", err)
|
ctx.Handle(404, "repo.Single(readmeFile.LookupBlob)", err)
|
||||||
|
|
|
@ -2,22 +2,28 @@
|
||||||
<div class="panel-heading file-head">
|
<div class="panel-heading file-head">
|
||||||
{{if .ReadmeExist}}
|
{{if .ReadmeExist}}
|
||||||
<i class="icon fa fa-book"></i>
|
<i class="icon fa fa-book"></i>
|
||||||
|
{{if .ReadmeInSingle}}
|
||||||
{{.FileName}}
|
{{.FileName}}
|
||||||
|
{{else}}
|
||||||
|
{{.FileName}} <span class="file-size">{{FileSize .FileSize}}</span>
|
||||||
|
{{end}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<i class="icon fa fa-file-text-o"></i>
|
<i class="icon fa fa-file-text-o"></i>
|
||||||
{{.FileName}} <span class="file-size">{{FileSize .FileSize}}</span>
|
{{.FileName}} <span class="file-size">{{FileSize .FileSize}}</span>
|
||||||
<div class="btn-group pull-right">
|
{{end}}
|
||||||
<a class="btn btn-default hidden" href="#">Edit</a>
|
{{if not .ReadmeInSingle}}
|
||||||
<a class="btn btn-default" href="{{.FileLink}}">Raw</a>
|
<div class="btn-group pull-right">
|
||||||
<a class="btn btn-default hidden" href="#">Blame</a>
|
<a class="btn btn-default hidden" href="#">Edit</a>
|
||||||
<a class="btn btn-default hidden" href="#">History</a>
|
<a class="btn btn-default" href="{{.FileLink}}">Raw</a>
|
||||||
<a class="btn btn-danger hidden" href="#">Delete</a>
|
<a class="btn btn-default hidden" href="#">Blame</a>
|
||||||
</div>
|
<a class="btn btn-default hidden" href="#">History</a>
|
||||||
|
<a class="btn btn-danger hidden" href="#">Delete</a>
|
||||||
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{if not .FileIsText}}
|
{{if not .FileIsText}}
|
||||||
<div class="panel-footer text-center">
|
<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>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{if .ReadmeExist}}
|
{{if .ReadmeExist}}
|
||||||
|
|
Loading…
Reference in a new issue