38 lines
No EOL
1.2 KiB
Text
38 lines
No EOL
1.2 KiB
Text
- title "Mehrere Konten aktualisieren"
|
|
|
|
- content_for :javascript 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;
|
|
});
|
|
});
|
|
|
|
- content_for :sidebar do
|
|
.well.well-small
|
|
Hier kannst Du mehrere Konten gleichzeitig aktualsieren.
|
|
Z.B. alle Überweisungen der Bestellgruppen aus einem Kontoauszug.
|
|
|
|
= form_tag finance_create_transaction_collection_path do
|
|
%p
|
|
%b Notiz
|
|
= text_field_tag :note, params[:note], class: 'input-xlarge', required: 'required'
|
|
%p
|
|
%table#ordergroups{:style => "width:20em"}
|
|
%tr
|
|
%th Bestellgruppe
|
|
%th Betrag
|
|
= render :partial => 'ordergroup', :collection => [1, 2, 3]
|
|
%p
|
|
= link_to "Weitere Bestellgruppe hinzufügen", '#', 'data-add-transaction' => true, class: 'btn'
|
|
.form-actions
|
|
= submit_tag "Transaktionen speichern", class: 'btn btn-primary'
|
|
= link_to "oder abbrechen", finance_ordergroups_path |