... | ... |
@@ -19,10 +19,12 @@ |
19 | 19 |
<a href="<%= url_for("/$user/$project/commits/master") %>">Commits</a> |
20 | 20 |
</li> |
21 | 21 |
<li class="<%= $display eq 'branches' ? 'active' : '' %>"> |
22 |
- <a href="<%= url_for("/$user/$project/branches") %>">Branches</a> |
|
23 |
- % if ($display eq 'branches') { |
|
24 |
- <span><%= $branches_count %></span> |
|
25 |
- % } |
|
22 |
+ <a href="<%= url_for("/$user/$project/branches") %>"> |
|
23 |
+ Branches |
|
24 |
+ % if ($display eq 'branches') { |
|
25 |
+ <span class="badge"><%= $branches_count %></span> |
|
26 |
+ % } |
|
27 |
+ </a> |
|
26 | 28 |
</li> |
27 | 29 |
<li class="<%= $display eq 'tags' ? 'active' : '' %>"> |
28 | 30 |
<a href="<%= url_for("/$user/$project/tags") %>"> |
... | ... |
@@ -14,22 +14,30 @@ |
14 | 14 |
.font-black { |
15 | 15 |
color: #333; |
16 | 16 |
} |
17 |
+ .font-white { |
|
18 |
+ color: white; |
|
19 |
+ } |
|
17 | 20 |
|
18 | 21 |
/* Background color */ |
19 | 22 |
.bk-blue-light { |
20 | 23 |
background-color:#E6F1F6; |
21 | 24 |
} |
25 |
+ .bk-black { |
|
26 |
+ background-color:black; |
|
27 |
+ } |
|
22 | 28 |
|
23 | 29 |
/* Padding */ |
24 | 30 |
.padding-default { |
25 | 31 |
padding:5px; |
26 | 32 |
} |
27 | 33 |
|
28 |
- /* border */ |
|
34 |
+ /* Border */ |
|
29 | 35 |
.border-top-gray { |
30 | 36 |
border-top:1px solid #ccc; |
31 | 37 |
} |
32 |
- |
|
38 |
+ .border-bottom-gray { |
|
39 |
+ border-bottom:1px solid #ccc; |
|
40 |
+ } |
|
33 | 41 |
.border-3-gray { |
34 | 42 |
border-left:1px solid #ccc; |
35 | 43 |
border-bottom:1px solid #ccc; |
... | ... |
@@ -27,11 +27,6 @@ |
27 | 27 |
%= include '/css/common'; |
28 | 28 |
|
29 | 29 |
%= stylesheet begin |
30 |
- /* h2 */ |
|
31 |
- h2 { |
|
32 |
- font-size:140%; |
|
33 |
- padding-bottom:5px; |
|
34 |
- } |
|
35 | 30 |
|
36 | 31 |
/* Branches number */ |
37 | 32 |
.branches_number { |
... | ... |
@@ -88,49 +83,61 @@ |
88 | 83 |
|
89 | 84 |
%= include '/include/header'; |
90 | 85 |
|
91 |
- <div class="main_panel"> |
|
92 |
- %= include '/include/sub_header'; |
|
86 |
+ <div class="container"> |
|
87 |
+ %= include '/include/project_header'; |
|
93 | 88 |
%= include '/include/code_menu', display => 'branches', branches_count => scalar @$branches; |
94 | 89 |
|
95 |
- <h2>Branches</h2> |
|
90 |
+ <h3>Branches</h3> |
|
96 | 91 |
|
97 |
- <div class="branches_number">Showing <%= @$branches %> branches not merged into master</div> |
|
98 |
- <table class="branches"> |
|
99 |
- <tr class="bdefault"> |
|
100 |
- <td class="bleft"> |
|
101 |
- <div class="bname"><%= $default_branch->{name} %></div> |
|
102 |
- <div class="blast_updated">Last updated <%= $default_branch->{commit}{age_string} %> by <%= $default_branch->{commit}{author_name} %></div> |
|
103 |
- </td> |
|
104 |
- <td> |
|
105 |
- |
|
106 |
- </td> |
|
107 |
- <td class="bright"> |
|
108 |
- Base branch |
|
109 |
- </td> |
|
110 |
- </tr> |
|
111 |
- </table> |
|
112 |
- <table class="branches"> |
|
113 |
- % for (my $i = 0; $i < @$branches; $i++) { |
|
114 |
- % my $branch = $branches->[$i]; |
|
115 |
- % my $name = $branch->{name}; |
|
116 |
- <tr> |
|
117 |
- <td class="bleft"> |
|
118 |
- <div class="bname"> |
|
119 |
- <a href="<%= url_for("/$user/$project/tree/$name") %>"> |
|
120 |
- <%= $name %> |
|
92 |
+ <div class="muted"> |
|
93 |
+ Showing <%= @$branches %> branches not merged into master |
|
94 |
+ </div> |
|
95 |
+ <div class="row"> |
|
96 |
+ <div class="span12 bk-black padding-default"> |
|
97 |
+ <div class="row"> |
|
98 |
+ <div class="span8"> |
|
99 |
+ <div class="font-white"><b><%= $default_branch->{name} %></b></div> |
|
100 |
+ <div class="muted"> |
|
101 |
+ Last updated |
|
102 |
+ <%= $default_branch->{commit}{age_string} %> |
|
103 |
+ by |
|
104 |
+ <%= $default_branch->{commit}{author_name} %> |
|
105 |
+ </div> |
|
106 |
+ </div> |
|
107 |
+ <div class="span4 text-right font-white" style="padding-top:10px"> |
|
108 |
+ Base branch |
|
109 |
+ </div> |
|
110 |
+ </div> |
|
111 |
+ </div> |
|
112 |
+ </div> |
|
113 |
+ % for (my $i = 0; $i < @$branches; $i++) { |
|
114 |
+ % my $branch = $branches->[$i]; |
|
115 |
+ % my $name = $branch->{name}; |
|
116 |
+ <div class="row"> |
|
117 |
+ <div class="span12 padding-default border-bottom-gray"> |
|
118 |
+ <div class="row"> |
|
119 |
+ <div class="span8"> |
|
120 |
+ <div> |
|
121 |
+ <a href="<%= url_for("/$user/$project/tree/$name") %>"> |
|
122 |
+ <%= $name %> |
|
123 |
+ </a> |
|
124 |
+ </div> |
|
125 |
+ <div class="muted"> |
|
126 |
+ Last updated |
|
127 |
+ <%= $branch->{commit}{age_string} %> |
|
128 |
+ by |
|
129 |
+ <%= $branch->{commit}{author_name} %> |
|
130 |
+ </div> |
|
131 |
+ </div> |
|
132 |
+ <div class="span4 text-right" style="padding-top:5px"> |
|
133 |
+ <a class="btn" href="<%= url_for("/$user/$project/compare/$default_branch->{name}...$name") %>"> |
|
134 |
+ Compare |
|
121 | 135 |
</a> |
122 | 136 |
</div> |
123 |
- <div class="blast_updated">Last updated <%= $branch->{commit}{age_string} %> by <%= $branch->{commit}{author_name} %></div> |
|
124 |
- </td> |
|
125 |
- <td> |
|
126 |
- |
|
127 |
- </td> |
|
128 |
- <td class="bright"> |
|
129 |
- <a href="<%= url_for("/$user/$project/compare/$default_branch->{name}...$name") %>">Compare</a> |
|
130 |
- </td> |
|
131 |
- </tr> |
|
132 |
- % } |
|
133 |
- </table> |
|
137 |
+ </div> |
|
138 |
+ </div> |
|
139 |
+ </div> |
|
140 |
+ % } |
|
134 | 141 |
</div> |
135 | 142 |
|
136 | 143 |
%= include '/include/footer'; |
... | ... |
@@ -40,8 +40,6 @@ |
40 | 40 |
my $difftrees = $git->difftree($rep, |
41 | 41 |
,$end_commit->{id}, $start_commit->{id}, []); |
42 | 42 |
|
43 |
- use D;d $difftrees; |
|
44 |
- |
|
45 | 43 |
# Get blob diffs (command "git diff-tree") |
46 | 44 |
my $blobdiffs = $git->blobdiffs($rep, $start_commit->{id}, $end_commit->{id}, $difftrees); |
47 | 45 |
|