Verified Commit de6ad1d1 authored by Kaspar Vollenweider's avatar Kaspar Vollenweider 👻
Browse files

some view quirks

parent b8b9f85a
......@@ -93,11 +93,10 @@ table.table.table-striped
= link_to t_action(:show), group_offer_path(offer)
= link_to t('download'), group_offer_path(offer, format: :pdf)
= link_to t_action(:edit), edit_group_offer_path(offer)
- if policy(GroupOffer).destroy?
= link_to t_action(:delete), group_offer_path(offer), confirm_deleting(offer)
= link_to "#{ offer.active? ? t('.deactivate') : t('.activate') }",
change_active_state_group_offer_path(offer), method: :put, remote: :true
= link_to_if(policy(GroupOffer).initiate_termination?, 'Beenden', initiate_termination_group_offer_path(offer)) { '' }
- if offer.period_end.blank?
= link_to "#{ offer.active? ? t('.deactivate') : t('.activate') }",
change_active_state_group_offer_path(offer), method: :put, remote: :true
= link_to_if(policy(GroupOffer).initiate_termination?, 'Beenden', initiate_termination_group_offer_path(offer)) { '' }
nav.navbar.section-navigation
......
......@@ -19,9 +19,8 @@ h2 class=('disabled-title' if @group_offer.group_assignments.running.any?) Endda
p.text-danger.text-bigger-1 Um das Gruppenangebot zu beenden, müssen erst alle zugehörigen Gruppeneinsätze beendet sein.
= simple_form_for(@group_offer, method: :put, url: submit_initiate_termination_group_offer_path(@group_offer)) do |f|
= f.input :period_end, as: :date_picker, disabled: @group_offer.group_assignments.running.any?
p.text-info.m-b-10.text-bigger-1
= f.input :period_end, as: :date_picker, wrapper: :date_picker, disabled: @group_offer.group_assignments.running.any?
p.text-info.m-b-10.m-t-10.text-bigger-1
em Die Voreinstellung für das Enddatum kann auf ein beliebiges Datum angepasst werden
hr
= f.button :submit, disabled: @group_offer.group_assignments.running.any?
input.btn.btn-default type='submit' name='commit' value='Gruppenangebots Ende setzen' data-disable-with='Gruppenangebot aktualisieren'
......@@ -112,15 +112,18 @@ SimpleForm.setup do |config|
end
end
config.wrappers :date_picker, tag: 'div', class: 'form-group date form_datetime input-date-picker', error_class: 'has-error' do |b|
config.wrappers :date_picker, tag: 'div', class: 'input-group date form_datetime input-date-picker', error_class: 'has-error' do |b|
b.use :html5
b.use :placeholder
b.optional :readonly
b.use :label, class: 'control-label'
b.use :input, class: 'input-sm form-control', data: { provide: 'datepicker' }
b.use :input, class: 'form-control', data: { provide: 'datepicker' }
b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
end
config.wrappers :date_picker_inline, tag: 'div', class: 'date form_datetime input-date-picker field-wrapper-inline', error_class: 'has-error' do |b|
b.use :html5
b.optional :readonly
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment