Added categories and Filter widget

This commit is contained in:
Florian "flowdy" Heß
2017-01-29 15:57:34 +01:00
parent 6f19437901
commit d7db9a2eb1
23 changed files with 167 additions and 40 deletions

View File

@@ -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'

View File

@@ -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