0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-17 07:21:15 +01:00
This commit is contained in:
slene 2014-03-17 19:56:33 +08:00
parent ee93186f72
commit f90e37ade0
2 changed files with 3 additions and 0 deletions

View file

@ -97,6 +97,7 @@ func Single(ctx *middleware.Context, params martini.Params) {
} }
if readmeFile != nil { if readmeFile != nil {
ctx.Data["ReadmeExist"] = true
// if file large than 1M not show it // if file large than 1M not show it
if readmeFile.Size > 1024*1024 || readmeFile.Filemode != git.FileModeBlob { if readmeFile.Size > 1024*1024 || readmeFile.Filemode != git.FileModeBlob {
ctx.Data["FileIsLarge"] = true ctx.Data["FileIsLarge"] = true

View file

@ -83,6 +83,7 @@
</tbody> </tbody>
</table> </table>
</div> </div>
{{if .ReadmeExist}}
<div class="panel panel-default file-content"> <div class="panel panel-default file-content">
<div class="panel-heading file-head"> <div class="panel-heading file-head">
<i class="icon fa fa-book"></i> README.md <i class="icon fa fa-book"></i> README.md
@ -97,6 +98,7 @@
</div> </div>
{{end}} {{end}}
</div> </div>
{{end}}
</div> </div>
</div> </div>
{{template "base/footer" .}} {{template "base/footer" .}}