| 1 | <div class="gl-inline" id="c{{ $ic['id'] }}"> |
| 2 | {@ if (!isset($filesUrl)) @} |
| 3 | <div class="gl-inline-path"><code>{{ $ic['path'] }}</code> {{ $ic['side'] === 'old' ? '元の' : '' }}{{ $ic['line'] }}行目{{ !empty($ic['outdated']) ? '(古いコミット)' : '' }}</div> |
| 4 | {@ if (!empty($ic['hunk'])) @} |
| 5 | <pre class="gl-inline-hunk">{{ implode("\n", $ic['hunk']) }}</pre> |
| 6 | {@ endif @} |
| 7 | {@ endif @} |
| 8 | <div class="gl-inline-c"> |
| 9 | <div class="gl-comment-head"> |
| 10 | {@ if ($ic['who']['icon'] !== '') @} |
| 11 | <img src="{{ $ic['who']['icon'] }}" alt="" class="gl-av" /> |
| 12 | {@ endif @} |
| 13 | <a href="{{ $ic['who']['url'] }}"><b>{{ $ic['who']['name'] }}</b></a> |
| 14 | <small><a href="#c{{ $ic['id'] }}">{{ $ic['date'] }}</a>{{ $ic['pending'] ? '(下書き)' : '' }}</small> |
| 15 | {@ if ($ic['canDelete']) @} |
| 16 | <form method="post" action="{{ isset($filesUrl) ? $filesUrl : $issueUrl }}" class="gl-inlineform"> |
| 17 | <input type="hidden" name="csrf_token" value="{{ $csrf }}" /> |
| 18 | <input type="hidden" name="id" value="{{ $ic['id'] }}" /> |
| 19 | <button name="do" value="deleteComment" class="danger">削除</button> |
| 20 | </form> |
| 21 | {@ endif @} |
| 22 | </div> |
| 23 | <div class="gl-comment-body">{{{ $ic['html'] }}}</div> |
| 24 | </div> |
| 25 | {@ foreach ($ic['replies'] as $rc) @} |
| 26 | <div class="gl-inline-c gl-inline-reply" id="c{{ $rc['id'] }}"> |
| 27 | <div class="gl-comment-head"> |
| 28 | {@ if ($rc['who']['icon'] !== '') @} |
| 29 | <img src="{{ $rc['who']['icon'] }}" alt="" class="gl-av" /> |
| 30 | {@ endif @} |
| 31 | <a href="{{ $rc['who']['url'] }}"><b>{{ $rc['who']['name'] }}</b></a> |
| 32 | <small><a href="#c{{ $rc['id'] }}">{{ $rc['date'] }}</a></small> |
| 33 | {@ if ($rc['canDelete']) @} |
| 34 | <form method="post" action="{{ isset($filesUrl) ? $filesUrl : $issueUrl }}" class="gl-inlineform"> |
| 35 | <input type="hidden" name="csrf_token" value="{{ $csrf }}" /> |
| 36 | <input type="hidden" name="id" value="{{ $rc['id'] }}" /> |
| 37 | <button name="do" value="deleteComment" class="danger">削除</button> |
| 38 | </form> |
| 39 | {@ endif @} |
| 40 | </div> |
| 41 | <div class="gl-comment-body">{{{ $rc['html'] }}}</div> |
| 42 | </div> |
| 43 | {@ endforeach @} |
| 44 | {@ if ($canReview && !$ic['pending']) @} |
| 45 | <details class="gl-edit gl-inline-replyform"> |
| 46 | <summary>返信</summary> |
| 47 | <form method="post" action="{{ isset($filesUrl) ? $filesUrl : $issueUrl }}" class="gl-form"> |
| 48 | <input type="hidden" name="csrf_token" value="{{ $csrf }}" /> |
| 49 | <input type="hidden" name="id" value="{{ $ic['id'] }}" /> |
| 50 | <input type="hidden" name="back" value="{{ isset($filesUrl) ? 'files' : '' }}" /> |
| 51 | <textarea name="body" rows="3" required="required"></textarea> |
| 52 | <button name="do" value="reply">返信</button> |
| 53 | </form> |
| 54 | </details> |
| 55 | {@ endif @} |
| 56 | </div> |