Refactored finance/ordergroups|transactions module.
This commit is contained in:
parent
fc1d130113
commit
ea6348bc5c
38 changed files with 967 additions and 443 deletions
|
|
@ -0,0 +1,34 @@
|
|||
- title "Mehrer Konten aktualisieren"
|
||||
|
||||
- content_for :head do
|
||||
:javascript
|
||||
var ordergroup = "#{escape_javascript(render('ordergroup'))}"
|
||||
|
||||
$(function() {
|
||||
$('a[data-remove-transaction]').live('click', function() {
|
||||
$(this).parents('tr').remove();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('a[data-add-transaction]').click(function() {
|
||||
$('#ordergroups').append(ordergroup);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
- form_tag finance_create_transaction_collection_path do
|
||||
%p
|
||||
%b Notiz
|
||||
= text_field_tag :note
|
||||
%p
|
||||
%table#ordergroups{:style => "width:20em"}
|
||||
%tr
|
||||
%th Bestellgruppe
|
||||
%th Betrag
|
||||
= render :partial => 'ordergroup', :collection => [1, 2, 3]
|
||||
|
||||
%p
|
||||
= link_to "Neue Bestellgruppe hinzufügen", '#', 'data-add-transaction' => true
|
||||
%p
|
||||
= submit_tag "Transaktionen speichern"
|
||||
= link_to "oder abbrechen", finance_ordergroups_path
|
||||
Loading…
Add table
Add a link
Reference in a new issue