2015-09-02 08:07:02 +09:00
|
|
|
{{if .DiffNotAvailable}}
|
2015-12-08 07:30:52 +09:00
|
|
|
<h4>{{.i18n.Tr "repo.diff.data_not_available"}}</h4>
|
2015-09-02 08:07:02 +09:00
|
|
|
{{else}}
|
2015-12-08 07:30:52 +09:00
|
|
|
<div class="diff-detail-box diff-box">
|
|
|
|
<div>
|
|
|
|
<i class="fa fa-retweet"></i>
|
|
|
|
{{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}}
|
|
|
|
<div class="ui right">
|
2016-01-03 07:13:47 +09:00
|
|
|
<a class="ui tiny basic toggle button" href="?style={{if .IsSplitStyle}}unified{{else}}split{{end}}">{{ if .IsSplitStyle }}{{.i18n.Tr "repo.diff.show_unified_view"}}{{else}}{{.i18n.Tr "repo.diff.show_split_view"}}{{end}}</a>
|
2015-12-13 11:58:54 +09:00
|
|
|
<a class="ui tiny basic toggle button" data-target="#diff-files">{{.i18n.Tr "repo.diff.show_diff_stats"}}</a>
|
2015-12-08 07:30:52 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<ol class="detail-files hide" id="diff-files">
|
|
|
|
{{range .Diff.Files}}
|
|
|
|
<li>
|
|
|
|
<div class="diff-counter count pull-right">
|
|
|
|
{{if not .IsBin}}
|
|
|
|
<span class="add" data-line="{{.Addition}}">{{.Addition}}</span>
|
|
|
|
<span class="bar">
|
|
|
|
<span class="pull-left add"></span>
|
|
|
|
<span class="pull-left del"></span>
|
|
|
|
</span>
|
|
|
|
<span class="del" data-line="{{.Deletion}}">{{.Deletion}}</span>
|
|
|
|
{{else}}
|
|
|
|
<span>{{$.i18n.Tr "repo.diff.bin"}}</span>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
<!-- todo finish all file status, now modify, add, delete and rename -->
|
|
|
|
<span class="status {{DiffTypeToStr .Type}} poping up" data-content="{{DiffTypeToStr .Type}}" data-variation="inverted tiny" data-position="right center"> </span>
|
|
|
|
<a class="file" href="#diff-{{.Index}}">{{.Name}}</a>
|
|
|
|
</li>
|
|
|
|
{{end}}
|
|
|
|
</ol>
|
|
|
|
</div>
|
2015-09-02 08:07:02 +09:00
|
|
|
|
2016-01-03 07:13:47 +09:00
|
|
|
{{if .IsSplitStyle}}
|
2015-12-26 20:26:26 +09:00
|
|
|
{{ template "repo/diff_box_split" . }}
|
|
|
|
{{else}}
|
2016-01-03 07:13:47 +09:00
|
|
|
{{ template "repo/diff_box_unified" . }}
|
2015-12-08 07:30:52 +09:00
|
|
|
{{end}}
|
2015-09-02 08:07:02 +09:00
|
|
|
{{end}}
|