diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-26 22:34:48 -0600 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-26 22:34:48 -0600 |
commit | 59d0e73c3507296b31c8e741b44afc7bfe1eb695 (patch) | |
tree | 79970b755e0c5309b0f05dcd45053f91500ba85b /templates/repo | |
parent | 1badb2bbccfe81303f69f8dedf57c22fb89d4b99 (diff) | |
download | gitea-59d0e73c3507296b31c8e741b44afc7bfe1eb695.tar.gz gitea-59d0e73c3507296b31c8e741b44afc7bfe1eb695.zip |
Batch mirror fix
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/single_file.tmpl | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/templates/repo/single_file.tmpl b/templates/repo/single_file.tmpl index 9199ca91f7..b8205024c5 100644 --- a/templates/repo/single_file.tmpl +++ b/templates/repo/single_file.tmpl @@ -21,30 +21,31 @@ </div> {{end}} </div> + {{if not .FileIsText}} - <div class="panel-footer text-center"> - {{if .IsImageFile}} - <img src="{{.FileLink}}"> - {{else}} - <a href="{{.FileLink}}" class="btn btn-default">View Raw</a> - {{end}} - </div> - {{else}} - {{if .ReadmeExist}} - <div class="panel-body file-body markdown"> - {{.FileContent|str2html}} - </div> + <div class="panel-body file-body file-code code-view"> + {{if .IsImageFile}} + <img src="{{.FileLink}}"> {{else}} - <div class="panel-body file-body file-code code-view"> - <table> - <tbody> - <tr> - <td class="lines-num"></td> - <td class="lines-code markdown"><pre class="prettyprint linenums{{if .FileExt}} lang-{{.FileExt}}{{end}}">{{.FileContent}}</pre></td> - </tr> - </tbody> - </table> - </div> + <a href="{{.FileLink}}" class="btn btn-default">View Raw</a> {{end}} + </div> + {{else}} + {{if .ReadmeExist}} + <div class="panel-body file-body markdown"> + {{.FileContent|str2html}} + </div> + {{else}} + <div class="panel-body file-body file-code code-view"> + <table> + <tbody> + <tr> + <td class="lines-num"></td> + <td class="lines-code markdown"><pre class="prettyprint linenums{{if .FileExt}} lang-{{.FileExt}}{{end}}">{{.FileContent}}</pre></td> + </tr> + </tbody> + </table> + </div> + {{end}} {{end}} </div> |