master
ブランチ master
LittleBeast / view / gitler / compare.maron
2.7 KB、59行 生 Blame 履歴
1{@ include(common/header) @}
2{@ include(gitler/repohead) @}
3 <h2 class="paragraph">プルリクエストを作る</h2>
4 <form method="get" action="{{ $repoUrl }}/compare" class="gl-row gl-filter">
5 <label>マージ先:
6 <select name="base">
7{@ foreach ($branches as $b) @}
8 <option value="{{ $b }}"{{{ $b === $base ? ' selected="selected"' : '' }}}>{{ $b }}</option>
9{@ endforeach @}
10 </select>
11 </label>
12 ←
13 <label>変更:
14 <select name="head">
15 <option value="">選んで下さい</option>
16{@ foreach ($heads as $g) @}
17 <optgroup label="{{ $g['label'] }}">
18{@ foreach ($g['items'] as $h) @}
19 <option value="{{ $h }}"{{{ $h === $head ? ' selected="selected"' : '' }}}>{{ $h }}</option>
20{@ endforeach @}
21 </optgroup>
22{@ endforeach @}
23 </select>
24 </label>
25 <button>比べる</button>
26 </form>
27{@ if ($note !== '') @}
28 <p class="paragraph">{{ $note }}</p>
29{@ endif @}
30{@ if ($head === '') @}
31 <p class="gl-muted"><small>フォークのブランチからも作れます。フォークしないで作るには:<code>git push origin HEAD:refs/for/{{ $base }}/トピック</code></small></p>
32{@ endif @}
33{@ if ($ready) @}
34{@ if ($canPull) @}
35 <form method="post" action="{{ $repoUrl }}/compare" class="gl-form gl-issueform">
36 <input type="hidden" name="csrf_token" value="{{ $csrf }}" />
37 <input type="hidden" name="base" value="{{ $base }}" />
38 <input type="hidden" name="head" value="{{ $head }}" />
39 <input type="text" name="title" value="{{ $in['title'] }}" maxlength="200" placeholder="題名" required="required" />
40 <textarea name="body" rows="8" placeholder="説明(Markdown。「fixes #3」でマージした時にイシューを閉じます)">{{ $in['body'] }}</textarea>
41 <button>プルリクエストを作る</button>
42 </form>
43{@ elif ($user) @}
44 <p class="paragraph">プルリクエストを作るには「Gitのプルリクエスト」のロールが必要です。</p>
45{@ endif @}
46 <h3 class="paragraph">コミット({{ count($commits) }})</h3>
47 <ul class="gl-commits">
48{@ foreach ($commits as $c) @}
49 <li>
50 <a href="{{ $c['url'] }}">{{ $c['subject'] }}</a><br />
51 <small>{{ $c['author'] }}、{{ $c['date'] }}</small>
52 <span class="gl-commit-links"><a href="{{ $c['url'] }}"><code>{{ $c['short'] }}</code></a></span>
53 </li>
54{@ endforeach @}
55 </ul>
56 <p>{{ $stats['files'] }}個のファイル、<span class="gl-add">+{{ $stats['add'] }}</span> <span class="gl-del">-{{ $stats['del'] }}</span></p>
57{@ include(gitler/diffs) @}
58{@ endif @}
59{@ include(common/footer) @}