Added categories and Filter widget
This commit is contained in:
@@ -8,3 +8,5 @@
|
||||
<tr><td class="number"><a href="/credit/<%= $credit->credId %>"><%= $credit->credId %></a></td><td><%= $credit->date %></td><td><%== nl2br $credit->purpose %></td><td class="number"><%== money $credit->value %></td><td class="number <%= $credit->spent < $credit->value ? "mark" : "" %>"><%== money $credit->spent %></td></tr>
|
||||
% }
|
||||
</table>
|
||||
|
||||
%= include 'filter-widget'
|
||||
|
||||
@@ -11,6 +11,17 @@
|
||||
% $r{purpose} = begin
|
||||
<input id="purpose" name="purpose" style="width:100%" value="<%= $credit->purpose %>">
|
||||
% end
|
||||
% $r{category} = begin
|
||||
% my $category = $credit->category // '';
|
||||
<select id="category" name="category">
|
||||
<option value="">-- Please select --</option>
|
||||
% while ( my $c = $categories->next ) {
|
||||
<option value="<%= $c->ID %>" <%== $category == $c->ID ? 'selected="selected"' :'' %>>
|
||||
<%= $c->label %>
|
||||
</option>
|
||||
% }
|
||||
</select>
|
||||
% end
|
||||
% $r{value} = begin
|
||||
<input id="value" name="value" value="<%= $credit->value %>"> Cent (declare target credit with "0")
|
||||
% end
|
||||
|
||||
Reference in New Issue
Block a user