aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/single_file.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo/single_file.tmpl')
-rw-r--r--templates/repo/single_file.tmpl18
1 files changed, 12 insertions, 6 deletions
diff --git a/templates/repo/single_file.tmpl b/templates/repo/single_file.tmpl
index 2a28f0b54a..9755812285 100644
--- a/templates/repo/single_file.tmpl
+++ b/templates/repo/single_file.tmpl
@@ -3,13 +3,19 @@
{{if .ReadmeExist}}
<i class="icon fa fa-book"></i>
{{else}}
+ <div class="btn-group pull-right">
+ <a class="btn btn-default hidden" href="#">Edit</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}}
- <a class="btn btn-default pull-right" href="#">Raw</a>
+ {{end}}{{.FileName}} {{FileSize .FileSize}}
</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}}
@@ -22,7 +28,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>