Move small close button to helper.
Workaround for show order deface override nuking attributes of the close button.
This commit is contained in:
parent
cf0fcccfc3
commit
507651f5ba
10 changed files with 18 additions and 12 deletions
|
@ -233,6 +233,14 @@ module ApplicationHelper
|
|||
Foodsoft::ExpansionVariables.expand(text, options)
|
||||
end
|
||||
|
||||
# @param dismiss [String, Symbol] Bootstrap dismiss value (modal, alert)
|
||||
# @return [String] HTML for close button dismissing
|
||||
def close_button(dismiss)
|
||||
content_tag :button, type: 'button', class: 'close', data: {dismiss: dismiss} do
|
||||
I18n.t('ui.marks.close').html_safe
|
||||
end
|
||||
end
|
||||
|
||||
# @return [String] path to foodcoop CSS style (with MD5 parameter for caching)
|
||||
def foodcoop_css_path(options={})
|
||||
super(options.merge({md5: Digest::MD5.hexdigest(FoodsoftConfig[:custom_css].to_s)}))
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
= f.hidden_field :shared_updated_on
|
||||
= f.hidden_field :supplier_id
|
||||
.modal-header
|
||||
= link_to t('ui.marks.close').html_safe, '#', class: 'close', data: {dismiss: 'modal'}
|
||||
= close_button :modal
|
||||
%h3= @article.new_record? ? t('.title_new') : t('.title_edit')
|
||||
.modal-body
|
||||
= f.input :availability
|
||||
|
@ -22,4 +22,3 @@
|
|||
.modal-footer
|
||||
= link_to t('ui.close'), '#', class: 'btn', data: {dismiss: 'modal'}
|
||||
= f.submit class: 'btn btn-primary'
|
||||
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
= simple_form_for @order, url: update_note_finance_order_path(@order), remote: true, method: :put do |f|
|
||||
.modal-header
|
||||
= link_to t('ui.marks.close').html_safe, '#', class: 'close', data: {dismiss: 'modal'}
|
||||
= close_button :modal
|
||||
%h3 Notiz bearbeiten
|
||||
.modal-body
|
||||
= f.input :note, input_html: {class: 'input-xlarge'}
|
||||
.modal-footer
|
||||
= link_to t('ui.close'), '#', class: 'btn', data: {dismiss: 'modal'}
|
||||
= f.submit t('ui.save'), class: 'btn btn-primary'
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
= simple_form_for @group_order_article, remote: true do |form|
|
||||
= form.hidden_field :order_article_id
|
||||
.modal-header
|
||||
= link_to t('ui.marks.close').html_safe, '#', class: 'close', data: {dismiss: 'modal'}
|
||||
= close_button :modal
|
||||
%h3= t('.amount_change_for', article: @order_article.article.name)
|
||||
.modal-body
|
||||
= form.input :ordergroup_id, as: :select, collection: Ordergroup.all.map { |g| [g.name, g.id] }
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
.row-fluid
|
||||
.well.pull-left
|
||||
%button{type: "button", class: "close", data: {dismiss: 'alert'}}= '×'.html_safe
|
||||
= close_button :alert
|
||||
%h2= @order.name
|
||||
%dl.dl-horizontal
|
||||
- unless @order.note.blank?
|
||||
|
@ -47,7 +47,7 @@
|
|||
%dd= number_to_currency(@ordering_data[:available_funds])
|
||||
|
||||
.well.pull-right
|
||||
%button{type: "button", class: "close", data: {dismiss: 'alert'}}= '×'.html_safe
|
||||
= close_button :alert
|
||||
= render 'switch_order', current_order: @order
|
||||
|
||||
.row-fluid
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
= simple_form_for @invite, remote: true do |form|
|
||||
.modal-header
|
||||
= link_to t('ui.marks.close').html_safe, '#', class: 'close', data: {dismiss: 'modal'}
|
||||
= close_button :modal
|
||||
%h3= t '.title'
|
||||
.modal-body
|
||||
= t('.body', group: @invite.group.name).html_safe
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
= simple_form_for [@order, @order_article], remote: true do |form|
|
||||
.modal-header
|
||||
= link_to t('ui.marks.close').html_safe, '#', class: 'close', data: {dismiss: 'modal'}
|
||||
= close_button :modal
|
||||
%h3= t '.title'
|
||||
.modal-body
|
||||
- if params[:without_units]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
= simple_form_for [@order, @order_article], remote: true do |form|
|
||||
.modal-header
|
||||
= link_to t('ui.marks.close').html_safe, '#', class: 'close', data: {dismiss: 'modal'}
|
||||
= close_button :modal
|
||||
%h3= t '.title'
|
||||
.modal-body
|
||||
= form.association :article, collection: @order.supplier_articles, label_method: lambda {|a| article_label_with_unit(a)}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- title t('.title', name: @order.name)
|
||||
|
||||
.well
|
||||
%button{type: "button", class: "close", data: {dismiss: 'alert'}}= t('ui.marks.close').html_safe
|
||||
= close_button :alert
|
||||
%p
|
||||
= raw t '.description1',
|
||||
state: t("orders.state.#{@order.state}").capitalize,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
= simple_form_for stock_article, remote: true, :validate => true do |f|
|
||||
.modal-header
|
||||
= link_to t('ui.marks.close').html_safe, '#', class: 'close', data: {dismiss: 'modal'}
|
||||
= close_button :modal
|
||||
%h3= title
|
||||
.modal-body
|
||||
= f.association :supplier
|
||||
|
|
Loading…
Reference in a new issue