master
ブランチ master
LittleBeast / view / gitler / diffs.maron
2.7 KB、51行 生 Blame 履歴
1{@ foreach ($files as $f) @}
2 <div class="gl-diff">
3 <div class="gl-diff-head">
4 <span class="gl-st gl-st-{{ $f['status'] }}">{{ $f['statusText'] }}</span>
5 {{ $f['oldPath'] !== '' ? $f['oldPath'].' → ' : '' }}{@ if ($f['url'] !== '') @}<a href="{{ $f['url'] }}">{{ $f['path'] }}</a>{@ else @}{{ $f['path'] }}{@ endif @}
6 </div>
7{@ if ($f['note'] !== '') @}
8 <p class="gl-note">{{ $f['note'] }}</p>
9{@ endif @}
10{@ if (!empty($f['hunks'])) @}
11 <div class="gl-code">
12 <table class="gl-lines">
13 <tbody>
14{@ foreach ($f['hunks'] as $h) @}
15 <tr class="gl-hunk"><td class="gl-ln"></td><td class="gl-ln"></td><td class="gl-src">{{ $h['head'] }}</td></tr>
16{@ foreach ($h['rows'] as $r) @}
17 <tr class="{{ $r['op'] === '+' ? 'gl-line-add' : ($r['op'] === '-' ? 'gl-line-del' : '') }}"{{{ isset($r['anchor']) ? ' id="'.$r['anchor'].'"' : '' }}}>
18 <td class="gl-ln">{@ if (!empty($r['link']) && $r['op'] === '-') @}<a href="{{ $r['link'] }}" title="この行にコメント">{{ $r['old'] }}</a>{@ else @}{{ $r['old'] }}{@ endif @}</td>
19 <td class="gl-ln">{@ if (!empty($r['link']) && $r['op'] !== '-') @}<a href="{{ $r['link'] }}" title="この行にコメント">{{ $r['new'] }}</a>{@ else @}{{ $r['new'] }}{@ endif @}</td>
20 <td class="gl-src">{{ $r['op'] }}{{ $r['text'] }}</td>
21 </tr>
22{@ if (!empty($r['threads']) || !empty($r['form'])) @}
23 <tr class="gl-threadrow">
24 <td colspan="3">
25{@ foreach ($r['threads'] as $ic) @}
26{@ include(gitler/inline) @}
27{@ endforeach @}
28{@ if (!empty($r['form'])) @}
29 <form method="post" action="{{ $filesUrl }}" class="gl-form gl-inlinenew">
30 <input type="hidden" name="csrf_token" value="{{ $csrf }}" />
31 <input type="hidden" name="path" value="{{ $r['form']['path'] }}" />
32 <input type="hidden" name="side" value="{{ $r['form']['side'] }}" />
33 <input type="hidden" name="line" value="{{ $r['form']['line'] }}" />
34 <textarea name="body" rows="4" placeholder="{{ $r['form']['line'] }}行目へのコメント(Markdown)" required="required"></textarea>
35 <div class="gl-row">
36 <button name="do" value="inline">コメントする</button>
37 <button name="do" value="inlinePending">レビューに追加(下書き)</button>
38 </div>
39 </form>
40{@ endif @}
41 </td>
42 </tr>
43{@ endif @}
44{@ endforeach @}
45{@ endforeach @}
46 </tbody>
47 </table>
48 </div>
49{@ endif @}
50 </div>
51{@ endforeach @}