... | ... |
@@ -248,7 +248,10 @@ sub startup { |
248 | 248 |
}, |
249 | 249 |
{ |
250 | 250 |
table => 'issue_label', |
251 |
- primary_key => 'row_id' |
|
251 |
+ primary_key => 'row_id', |
|
252 |
+ join => [ |
|
253 |
+ 'left join label on issue_label.label = label.row_id' |
|
254 |
+ ] |
|
252 | 255 |
} |
253 | 256 |
]; |
254 | 257 |
$dbi->create_model($_) for @$models; |
... | ... |
@@ -52,6 +52,13 @@ |
52 | 52 |
width:20%; |
53 | 53 |
text-align:right; |
54 | 54 |
} |
55 |
+.issue-labels-setting-pallet li { |
|
56 |
+ border-radius:3px; |
|
57 |
+ margin-bottom:4px; |
|
58 |
+ margin-top:5px; |
|
59 |
+ padding:4px 5px; |
|
60 |
+ color:#333; |
|
61 |
+} |
|
55 | 62 |
.labels-new-panel { |
56 | 63 |
text-align:right; |
57 | 64 |
margin-bottom:20px; |
... | ... |
@@ -136,6 +136,13 @@ |
136 | 136 |
where => {project => $project_row_id} |
137 | 137 |
)->all; |
138 | 138 |
|
139 |
+ # Issue labels |
|
140 |
+ my $issue_labels = app->dbi->model('issue_label')->select( |
|
141 |
+ {label => '*'}, |
|
142 |
+ where => {'issue_label.issue' => $issue_row_id}, |
|
143 |
+ appden => 'order by label.id' |
|
144 |
+ )->all; |
|
145 |
+ |
|
139 | 146 |
layout 'common', title => "Issue - $user_id/$project_id #$issue_number"; |
140 | 147 |
%> |
141 | 148 |
|
... | ... |
@@ -246,11 +253,21 @@ |
246 | 253 |
<a href="javascript:void(0)"><i class="icon icon-cog"></i></a> |
247 | 254 |
</div> |
248 | 255 |
</div> |
249 |
- <ul> |
|
250 |
- <li> |
|
251 |
- None yet |
|
252 |
- </li> |
|
253 |
- </ul> |
|
256 |
+ % if (@$labels) { |
|
257 |
+ <ul class="issue-labels-setting-pallet"> |
|
258 |
+ % for my $issue_label (@$issue_labels) { |
|
259 |
+ <li style="background:<%= $issue_label->{'label.color'} %>"> |
|
260 |
+ <%= $issue_label->{'label.id'} %> |
|
261 |
+ </li> |
|
262 |
+ % } |
|
263 |
+ </ul> |
|
264 |
+ % } else { |
|
265 |
+ <ul> |
|
266 |
+ <li> |
|
267 |
+ None yet |
|
268 |
+ </li> |
|
269 |
+ </ul> |
|
270 |
+ % } |
|
254 | 271 |
</div> |
255 | 272 |
<div style="font-weight:bold;padding-bottom:3px"><%= @$participants %> participants</div> |
256 | 273 |
<ul> |