fix csv download + template optional parameters
Conflicts: app/views/finance/financial_transactions/_transactions.html.haml app/views/home/ordergroup.html.haml app/views/login/_accept_invitation_form.html.haml
This commit is contained in:
parent
b1d085c618
commit
9e58a6f2b1
3 changed files with 25 additions and 7 deletions
|
@ -1,9 +1,11 @@
|
|||
- with_ordergroup ||= false
|
||||
- with_ordergroup = local_assigns[:with_ordergroup]
|
||||
- with_csv = local_assigns[:with_csv]
|
||||
.pull-right
|
||||
.btn-group
|
||||
= link_to url_for(q: params[:q], format: :csv), class: 'btn' do
|
||||
= glyph :download
|
||||
CSV
|
||||
- if with_csv
|
||||
.btn-group
|
||||
= link_to url_for(search: params[:q], format: :csv), class: 'btn' do
|
||||
= glyph :download
|
||||
CSV
|
||||
- if @financial_transactions.total_pages > 1
|
||||
.btn-group= items_per_page wrap: false
|
||||
= pagination_links_remote @financial_transactions
|
||||
|
|
|
@ -20,5 +20,4 @@
|
|||
'data-submit-onchange' => true, class: 'form-search' do
|
||||
= text_field_tag :query, params[:query], class: 'input-medium search-query',
|
||||
placeholder: t('.search')
|
||||
#transactions= render "finance/financial_transactions/transactions"
|
||||
|
||||
#transactions= render "finance/financial_transactions/transactions", with_csv: false
|
||||
|
|
17
app/views/login/_accept_invitation_form.html.haml
Normal file
17
app/views/login/_accept_invitation_form.html.haml
Normal file
|
@ -0,0 +1,17 @@
|
|||
- content_for :javascript do
|
||||
:javascript
|
||||
$(#{FoodsoftConfig[:use_nick] ? 'user_nick' : 'user_first_name'}).focus();
|
||||
|
||||
= (FoodsoftConfig[:invitation_form_message] or t('.body')).html_safe
|
||||
-# empty paragraph in case when invitation_form_text does not have <p></p>
|
||||
%p
|
||||
|
||||
- form_url = local_assigns[:accept_invitation_path]
|
||||
= simple_form_for @user, url: form_url do |form|
|
||||
- unless @invite and @invite.group
|
||||
- capt = capture do
|
||||
= form.fields_for :ordergroup do |ogf|
|
||||
= ogf.input :contact_address, label: t('activerecord.attributes.ordergroup.contact_address'), required: false
|
||||
= render partial: 'shared/user_form_fields', locals: {f: form, captured: capt}
|
||||
.form-actions
|
||||
= submit_tag t('.submit'), class: 'btn'
|
Loading…
Reference in a new issue