diff options
author | FuXiaoHei <fuxiaohei@hexiaz.com> | 2014-03-25 00:02:37 +0800 |
---|---|---|
committer | FuXiaoHei <fuxiaohei@hexiaz.com> | 2014-03-25 00:02:37 +0800 |
commit | 8909935a1049dea3783021f0460118ad838b1dfd (patch) | |
tree | 00d23ec41174cda54d5bf2de1175a9d635b75f9a /templates | |
parent | 62b05c1e228f1a570a97e6957c45e018262f812f (diff) | |
parent | 6302f5462890b455cb306fc3925c71850a6e1dfb (diff) | |
download | gitea-8909935a1049dea3783021f0460118ad838b1dfd.tar.gz gitea-8909935a1049dea3783021f0460118ad838b1dfd.zip |
Merge branch 'master' of https://github.com/gogits/gogs
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/single_file.tmpl | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/templates/repo/single_file.tmpl b/templates/repo/single_file.tmpl index 7f07033703..d00bffa956 100644 --- a/templates/repo/single_file.tmpl +++ b/templates/repo/single_file.tmpl @@ -2,20 +2,22 @@ <div class="panel-heading file-head"> {{if .ReadmeExist}} <i class="icon fa fa-book"></i> + {{.FileName}} {{else}} + <i class="icon fa fa-file-text-o"></i> + {{.FileName}} {{FileSize .FileSize}} <div class="btn-group pull-right"> <a class="btn btn-default hidden" href="#">Edit</a> - <a class="btn btn-default" href="#">Raw</a> + <a class="btn btn-default" href="{{.FileLink}}">Raw</a> <a class="btn btn-default hidden" href="#">Blame</a> <a class="btn btn-default hidden" href="#">History</a> <a class="btn btn-danger hidden" href="#">Delete</a> </div> - <i class="icon fa fa-file-text-o"></i> - {{end}}{{.FileName}} + {{end}} </div> - {{if .FileIsLarge}} - <div class="panel-footer"> - Large file size 1000kb + {{if not .FileIsText}} + <div class="panel-footer text-center"> + <a href="{{.FileLink}}" class="btn btn-default">View Raw</a> </div> {{else}} {{if .ReadmeExist}} @@ -28,7 +30,7 @@ <tbody> <tr> <td class="lines-num"></td> - <td class="lines-code markdown"><pre class="prettyprint linenums lang-{{.FileExt}}">{{.FileContent}}</pre></td> + <td class="lines-code markdown"><pre class="prettyprint linenums{{if .FileExt}} lang-{{.FileExt}}{{end}}">{{.FileContent}}</pre></td> </tr> </tbody> </table> |