mirror of https://github.com/gogits/gogs.git
Unknwon
8 years ago
12 changed files with 50 additions and 90 deletions
File diff suppressed because one or more lines are too long
@ -0,0 +1,23 @@ |
|||||||
|
{{$file := .}} |
||||||
|
{{$highlightClass := $file.GetHighlightClass}} |
||||||
|
{{range $j, $section := $file.Sections}} |
||||||
|
{{range $k, $line := $section.Lines}} |
||||||
|
<tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}"> |
||||||
|
{{if eq .GetType 4}} |
||||||
|
<td colspan="2" class="lines-num"> |
||||||
|
{{/* {{if gt $j 0}}<span class="fold octicon octicon-fold"></span>{{end}} */}} |
||||||
|
</td> |
||||||
|
{{else}} |
||||||
|
<td class="lines-num lines-num-old"> |
||||||
|
<span rel="{{if $line.LeftIdx}}diff-{{Sha1 $file.Name}}L{{$line.LeftIdx}}{{end}}">{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}</span> |
||||||
|
</td> |
||||||
|
<td class="lines-num lines-num-new"> |
||||||
|
<span rel="{{if $line.RightIdx}}diff-{{Sha1 $file.Name}}R{{$line.RightIdx}}{{end}}">{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}</span> |
||||||
|
</td> |
||||||
|
{{end}} |
||||||
|
<td class="lines-code"> |
||||||
|
<pre><code class="{{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{$section.GetComputedInlineDiffFor $line}}</code></pre> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
{{end}} |
||||||
|
{{end}} |
@ -1,12 +0,0 @@ |
|||||||
<div id="file-content" class="ui attached table segment"> |
|
||||||
<div class="file-view code-view has-emoji"> |
|
||||||
<table> |
|
||||||
<tbody> |
|
||||||
<tr> |
|
||||||
<td class="lines-num"></td> |
|
||||||
<td class="lines-code"><pre><code><ol class="linenums">{{.FileContent}}</ol></code></pre></td> |
|
||||||
</tr> |
|
||||||
</tbody> |
|
||||||
</table> |
|
||||||
</div> |
|
||||||
</div> |
|
Loading…
Reference in new issue