Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
aoz-003
Commits
de6ad1d1
Verified
Commit
de6ad1d1
authored
Jan 26, 2018
by
Kaspar Vollenweider
👻
Browse files
some view quirks
parent
b8b9f85a
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/views/group_offers/index.html.slim
View file @
de6ad1d1
...
...
@@ -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
...
...
app/views/group_offers/initiate_termination.html.slim
View file @
de6ad1d1
...
...
@@ -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'
config/initializers/simple_form_bootstrap.rb
View file @
de6ad1d1
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment