2019-09-16 03:03:22 -06:00
|
|
|
{{ $imagePathOld := printf "%s/%s" .root.BeforeRawPath (EscapePound .file.OldName) }}
|
|
|
|
{{ $imagePathNew := printf "%s/%s" .root.RawPath (EscapePound .file.Name) }}
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<th class="halfwidth center">
|
|
|
|
{{.root.i18n.Tr "repo.diff.file_before"}}
|
|
|
|
</th>
|
|
|
|
<th class="halfwidth center">
|
|
|
|
{{.root.i18n.Tr "repo.diff.file_after"}}
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="halfwidth center">
|
2019-10-04 13:58:54 -06:00
|
|
|
{{if or .file.IsDeleted (not .file.IsCreated)}}
|
2019-09-16 03:03:22 -06:00
|
|
|
<a href="{{$imagePathOld}}" target="_blank">
|
|
|
|
<img src="{{$imagePathOld}}" class="border red" />
|
|
|
|
</a>
|
|
|
|
{{end}}
|
|
|
|
</td>
|
|
|
|
<td class="halfwidth center">
|
2019-10-04 13:58:54 -06:00
|
|
|
{{if or .file.IsCreated (not .file.IsDeleted)}}
|
|
|
|
<a href="{{$imagePathNew}}" target="_blank">
|
|
|
|
<img src="{{$imagePathNew}}" class="border green" />
|
|
|
|
</a>
|
|
|
|
{{end}}
|
2019-09-16 03:03:22 -06:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{ $imageInfoBase := (call .root.ImageInfoBase .file.OldName) }}
|
|
|
|
{{ $imageInfoHead := (call .root.ImageInfo .file.Name) }}
|
2019-10-04 13:58:54 -06:00
|
|
|
{{if or $imageInfoBase $imageInfoHead }}
|
2019-09-16 03:03:22 -06:00
|
|
|
<tr>
|
|
|
|
<td class="halfwidth center">
|
2019-10-04 13:58:54 -06:00
|
|
|
{{if $imageInfoBase }}
|
|
|
|
{{ $classWidth := "" }}
|
|
|
|
{{ $classHeight := "" }}
|
|
|
|
{{ $classByteSize := "" }}
|
|
|
|
{{if $imageInfoHead}}
|
|
|
|
{{if not (eq $imageInfoBase.Width $imageInfoHead.Width)}}
|
|
|
|
{{ $classWidth = "red" }}
|
|
|
|
{{end}}
|
|
|
|
{{if not (eq $imageInfoBase.Height $imageInfoHead.Height)}}
|
|
|
|
{{ $classHeight = "red" }}
|
|
|
|
{{end}}
|
|
|
|
{{if not (eq $imageInfoBase.ByteSize $imageInfoHead.ByteSize)}}
|
|
|
|
{{ $classByteSize = "red" }}
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
{{.root.i18n.Tr "repo.diff.file_image_width"}}: <span class="text {{$classWidth}}">{{$imageInfoBase.Width}}</span>
|
2019-09-16 03:03:22 -06:00
|
|
|
|
|
2019-10-04 13:58:54 -06:00
|
|
|
{{.root.i18n.Tr "repo.diff.file_image_height"}}: <span class="text {{$classHeight}}">{{$imageInfoBase.Height}}</span>
|
2019-09-16 03:03:22 -06:00
|
|
|
|
|
2019-10-04 13:58:54 -06:00
|
|
|
{{.root.i18n.Tr "repo.diff.file_byte_size"}}: <span class="text {{$classByteSize}}">{{FileSize $imageInfoBase.ByteSize}}</span>
|
|
|
|
{{end}}
|
2019-09-16 03:03:22 -06:00
|
|
|
</td>
|
|
|
|
<td class="halfwidth center">
|
2019-10-04 13:58:54 -06:00
|
|
|
{{if $imageInfoHead }}
|
|
|
|
{{ $classWidth := "" }}
|
|
|
|
{{ $classHeight := "" }}
|
|
|
|
{{ $classByteSize := "" }}
|
|
|
|
{{if $imageInfoBase}}
|
|
|
|
{{if not (eq $imageInfoBase.Width $imageInfoHead.Width)}}
|
|
|
|
{{ $classWidth = "green" }}
|
|
|
|
{{end}}
|
|
|
|
{{if not (eq $imageInfoBase.Height $imageInfoHead.Height)}}
|
|
|
|
{{ $classHeight = "green" }}
|
|
|
|
{{end}}
|
|
|
|
{{if not (eq $imageInfoBase.ByteSize $imageInfoHead.ByteSize)}}
|
|
|
|
{{ $classByteSize = "green" }}
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
{{.root.i18n.Tr "repo.diff.file_image_width"}}: <span class="text {{$classWidth}}">{{$imageInfoHead.Width}}</span>
|
2019-09-16 03:03:22 -06:00
|
|
|
|
|
2019-10-04 13:58:54 -06:00
|
|
|
{{.root.i18n.Tr "repo.diff.file_image_height"}}: <span class="text {{$classHeight}}">{{$imageInfoHead.Height}}</span>
|
2019-09-16 03:03:22 -06:00
|
|
|
|
|
2019-10-04 13:58:54 -06:00
|
|
|
{{.root.i18n.Tr "repo.diff.file_byte_size"}}: <span class="text {{$classByteSize}}">{{FileSize $imageInfoHead.ByteSize}}</span>
|
|
|
|
{{end}}
|
2019-09-16 03:03:22 -06:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{end}}
|