bench-forgejo/templates/repo/diff.tmpl

422 lines
20 KiB
Cheetah
Raw Normal View History

2014-03-24 18:57:19 +05:30
{{template "base/head" .}}
{{template "base/navbar" .}}
{{template "repo/nav" .}}
{{template "repo/toolbar" .}}
2014-03-25 16:14:37 +05:30
<div id="body" class="container" data-page="repo">
<div id="source">
2014-03-24 18:57:19 +05:30
<div class="panel panel-info diff-box diff-head-box">
<div class="panel-heading">
2014-03-27 21:37:22 +05:30
<a class="pull-right btn btn-primary btn-sm" href="{{.SourcePath}}">Browse Source</a>
2014-03-26 09:23:01 +05:30
<h4>{{.Commit.Message}}</h4>
2014-03-24 18:57:19 +05:30
</div>
<div class="panel-body">
<span class="pull-right">
2014-03-26 09:23:01 +05:30
commit <span class="label label-default sha">{{.ShortSha}}</span>
2014-03-24 18:57:19 +05:30
</span>
<p class="author">
2014-03-26 09:23:01 +05:30
<img class="avatar" src="{{AvatarLink .Commit.Author.Email}}" alt=""/>
<a class="name" href="#"><strong>{{.Commit.Author.Name}}</strong></a>
<span class="time">{{TimeSince .Commit.Author.When}}</span>
2014-03-24 18:57:19 +05:30
</p>
</div>
</div>
<div class="diff-detail-box diff-box">
2014-03-26 09:23:01 +05:30
<a class="pull-right btn btn-default" data-toggle="collapse" data-target="#diff-files">Show Diff Stats</a>
2014-03-24 18:57:19 +05:30
<p class="showing">
<i class="fa fa-retweet"></i>
2014-03-26 09:23:01 +05:30
<strong> {{.Diff.NumFiles}} changed files</strong> with <strong>{{.Diff.TotalAddition}} additions</strong> and <strong>{{.Diff.TotalDeletion}} deletions</strong>.
2014-03-24 18:57:19 +05:30
</p>
<ol class="detail-files collapse" id="diff-files">
2014-03-26 09:23:01 +05:30
{{range .Diff.Files}}
2014-03-24 18:57:19 +05:30
<li>
<div class="diff-counter count pull-right">
2014-03-26 09:23:01 +05:30
<span class="add" data-line="{{.Addition}}">{{.Addition}}</span>
2014-03-24 18:57:19 +05:30
<span class="bar">
<span class="pull-left add"></span>
<span class="pull-left del"></span>
</span>
2014-03-26 09:23:01 +05:30
<span class="del" data-line="{{.Deletion}}">{{.Deletion}}</span>
2014-03-24 18:57:19 +05:30
</div>
<!-- todo finish all file status, now modify, add, delete and rename -->
2014-03-26 16:54:20 +05:30
<span class="status {{DiffTypeToStr .Type}}" data-toggle="tooltip" data-placement="right" title="{{DiffTypeToStr .Type}}">&nbsp;</span>
2014-03-26 09:23:01 +05:30
<a class="file" href="#diff-1">{{.Name}}</a>
2014-03-24 18:57:19 +05:30
</li>
2014-03-26 09:23:01 +05:30
{{end}}
2014-03-24 18:57:19 +05:30
</ol>
</div>
2014-03-26 09:23:01 +05:30
{{range .Diff.Files}}
2014-03-24 18:57:19 +05:30
<div class="panel panel-default diff-file-box diff-box file-content" id="diff-2">
<div class="panel-heading">
<div class="diff-counter count pull-left">
2014-03-26 09:23:01 +05:30
<span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span>
2014-03-24 18:57:19 +05:30
<span class="bar">
<span class="pull-left add"></span>
<span class="pull-left del"></span>
</span>
2014-03-26 09:23:01 +05:30
<span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span>
2014-03-24 18:57:19 +05:30
</div>
2014-03-27 21:37:22 +05:30
<a class="btn btn-default btn-sm pull-right" href="{{$.SourcePath}}/{{.Name}}">View File</a>
2014-03-26 09:23:01 +05:30
<span class="file">{{.Name}}</span>
2014-03-24 18:57:19 +05:30
</div>
2014-03-27 22:47:09 +05:30
{{$isImage := (call $.IsImageFile .Name)}}
2014-03-24 18:57:19 +05:30
<div class="panel-body file-body file-code code-view code-diff">
2014-03-27 22:47:09 +05:30
{{if $isImage}}
<div class="text-center">
<img src="{{$.RawPath}}/{{.Name}}">
</div>
{{else}}
2014-03-24 18:57:19 +05:30
<table>
<tbody>
2014-03-26 15:32:08 +05:30
{{range .Sections}}
{{range .Lines}}
2014-03-27 02:11:16 +05:30
<tr class="{{DiffLineTypeToStr .Type}}-code nl-1 ol-1">
2014-03-26 09:23:01 +05:30
<td class="lines-num lines-num-old">
2014-03-27 02:11:16 +05:30
<span rel="L1">{{if .LeftIdx}}{{.LeftIdx}}{{end}}</span>
2014-03-26 09:23:01 +05:30
</td>
<td class="lines-num lines-num-new">
2014-03-27 02:11:16 +05:30
<span rel="L1">{{if .RightIdx}}{{.RightIdx}}{{end}}</span>
2014-03-26 09:23:01 +05:30
</td>
<td class="lines-code">
2014-03-26 15:32:08 +05:30
<pre>{{.Content}}</pre>
2014-03-26 09:23:01 +05:30
</td>
</tr>
{{end}}
2014-03-26 15:32:08 +05:30
{{end}}
2014-03-26 09:23:01 +05:30
<!-- <tr class="same-code nl-2 ol-2">
<td class="lines-num lines-num-old">
<span rel="L1">2</span>
</td>
<td class="lines-num lines-num-new">
<span rel="L1">2</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
<tr class="same-code nl-3 ol-3">
<td class="lines-num lines-num-old">
<span rel="L3">3</span>
</td>
<td class="lines-num lines-num-new">
<span rel="L3">3</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
<tr class="add-code nl-4 ol-0">
<td class="lines-num lines-num-old">
<span rel="add">+</span>
</td>
<td class="lines-num lines-num-new">
<span rel="L4">4</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
<tr class="add-code nl-5 ol-0">
<td class="lines-num lines-num-old">
<span rel="add">+</span>
</td>
<td class="lines-num lines-num-new">
<span rel="L5">5</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
<tr class="del-code nl-0 ol-4">
<td class="lines-num lines-num-old">
<span rel="L4">4</span>
</td>
<td class="lines-num lines-num-new">
<span rel="del">-</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
<tr class="del-code nl-0 ol-5">
<td class="lines-num lines-num-old">
<span rel="L5">5</span>
</td>
<td class="lines-num lines-num-new">
<span rel="del">-</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
<tr class="del-code nl-0 ol-6">
<td class="lines-num lines-num-old">
<span rel="L6">6</span>
</td>
<td class="lines-num lines-num-new">
<span rel="del">-</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
<tr class="del-code nl-0 ol-7">
<td class="lines-num lines-num-old">
<span rel="L7">7</span>
</td>
<td class="lines-num lines-num-new">
<span rel="del">-</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
<tr class="same-code nl-6 ol-8">
<td class="lines-num lines-num-old">
<span rel="L8">8</span>
</td>
<td class="lines-num lines-num-new">
<span rel="L6">6</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
<tr class="same-code nl-7 ol-9">
<td class="lines-num lines-num-old">
<span rel="L1">9</span>
</td>
<td class="lines-num lines-num-new">
<span rel="L1">7</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
<tr class="same-code nl-8 ol-10">
<td class="lines-num lines-num-old">
<span rel="L1">10</span>
</td>
<td class="lines-num lines-num-new">
<span rel="L1">8</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr> -->
2014-03-24 18:57:19 +05:30
</tbody>
</table>
2014-03-27 22:47:09 +05:30
{{end}}
2014-03-24 18:57:19 +05:30
</div>
</div>
2014-03-26 09:23:01 +05:30
{{end}}
2014-03-24 18:57:19 +05:30
2014-03-26 09:23:01 +05:30
<!-- <div class="panel panel-default diff-file-box diff-box file-content">
2014-03-24 18:57:19 +05:30
<div class="panel-heading">
<div class="diff-counter count pull-left">
<span class="add" data-line="2">+ 2</span>
<span class="bar">
<span class="pull-left add"></span>
<span class="pull-left del"></span>
</span>
<span class="del" data-line="4">- 4</span>
</div>
<a class="btn btn-default btn-sm pull-right" href="#">View File</a>
<span class="file">data/test/bson_test/simple_type.go</span>
</div>
<div class="panel-body file-body file-code code-view code-diff">
<table>
<tbody>
<tr class="same-code nl-1 ol-1">
<td class="lines-num lines-num-old">
<span rel="L1">1</span>
</td>
<td class="lines-num lines-num-new">
<span rel="L1">1</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
<tr class="same-code nl-2 ol-2">
<td class="lines-num lines-num-old">
<span rel="L1">2</span>
</td>
<td class="lines-num lines-num-new">
<span rel="L1">2</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
<tr class="same-code nl-3 ol-3">
<td class="lines-num lines-num-old">
<span rel="L3">3</span>
</td>
<td class="lines-num lines-num-new">
<span rel="L3">3</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
<tr class="add-code nl-4 ol-0">
<td class="lines-num lines-num-old">
<span rel="add">+</span>
</td>
<td class="lines-num lines-num-new">
<span rel="L4">4</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
<tr class="add-code nl-5 ol-0">
<td class="lines-num lines-num-old">
<span rel="add">+</span>
</td>
<td class="lines-num lines-num-new">
<span rel="L5">5</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
<tr class="del-code nl-0 ol-4">
<td class="lines-num lines-num-old">
<span rel="L4">4</span>
</td>
<td class="lines-num lines-num-new">
<span rel="del">-</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
<tr class="del-code nl-0 ol-5">
<td class="lines-num lines-num-old">
<span rel="L5">5</span>
</td>
<td class="lines-num lines-num-new">
<span rel="del">-</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
<tr class="del-code nl-0 ol-6">
<td class="lines-num lines-num-old">
<span rel="L6">6</span>
</td>
<td class="lines-num lines-num-new">
<span rel="del">-</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
<tr class="del-code nl-0 ol-7">
<td class="lines-num lines-num-old">
<span rel="L7">7</span>
</td>
<td class="lines-num lines-num-new">
<span rel="del">-</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
<tr class="same-code nl-6 ol-8">
<td class="lines-num lines-num-old">
<span rel="L8">8</span>
</td>
<td class="lines-num lines-num-new">
<span rel="L6">6</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
<tr class="same-code nl-7 ol-9">
<td class="lines-num lines-num-old">
<span rel="L1">9</span>
</td>
<td class="lines-num lines-num-new">
<span rel="L1">7</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
<tr class="same-code nl-8 ol-10">
<td class="lines-num lines-num-old">
<span rel="L1">10</span>
</td>
<td class="lines-num lines-num-new">
<span rel="L1">8</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
2014-03-24 19:53:55 +05:30
<tr class="ellipsis-code">
<td class="text-center lines-ellipsis" colspan="2">
<i class="fa fa-ellipsis-h"></i>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
<tr class="same-code nl-8 ol-10">
<td class="lines-num lines-num-old">
<span rel="L1">10</span>
</td>
<td class="lines-num lines-num-new">
<span rel="L1">8</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
<tr class="same-code nl-8 ol-10">
<td class="lines-num lines-num-old">
<span rel="L1">10</span>
</td>
<td class="lines-num lines-num-new">
<span rel="L1">8</span>
</td>
<td class="lines-code">
<pre> "github.com/youtube/vitess/go/bson"</pre>
</td>
</tr>
2014-03-24 18:57:19 +05:30
</tbody>
</table>
</div>
</div>
<div class="panel panel-default diff-file-box diff-box file-content">
<div class="panel-heading">
<div class="diff-counter count pull-left">
<span class="add" data-line="0">BIN</span>
<span class="bar">
<span class="pull-left add"></span>
<span class="pull-left del"></span>
</span>
<span class="del" data-line="1"></span>
</div>
<a class="btn btn-default btn-sm pull-right" href="#">View File</a>
<span class="file">data/test/bson_test/simple_type.png</span>
</div>
<div class="panel-body file-body file-code code-view code-bin">
<table>
<tbody>
<tr class="text-center"><td><img src="http://1.gravatar.com/avatar/f72f7454ce9d710baa506394f68f4132?s=200" alt=""/></td></tr>
</tbody>
</table>
</div>
2014-03-26 09:23:01 +05:30
</div> -->
2014-03-24 18:57:19 +05:30
</div>
</div>
2014-03-27 21:37:22 +05:30
{{template "base/footer" .}}