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
aba7a3cf
Verified
Commit
aba7a3cf
authored
Jul 14, 2018
by
Kaspar Vollenweider
👻
Browse files
more explicit name for semester filters variable
parent
5fa6dbbf
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/controllers/billing_expenses_controller.rb
View file @
aba7a3cf
...
...
@@ -5,7 +5,7 @@ class BillingExpensesController < ApplicationController
def
index
authorize
BillingExpense
@billing_semesters
=
BillingExpense
.
generate_semester_filters
@billing_semester
_filter
s
=
BillingExpense
.
generate_semester_filters
set_default_filter
(
semester:
default_billing_semester
)
@q
=
policy_scope
(
BillingExpense
).
ransack
(
params
[
:q
])
@q
.
sorts
=
[
'created_at desc'
]
if
@q
.
sorts
.
empty?
...
...
@@ -95,7 +95,7 @@ class BillingExpensesController < ApplicationController
end
def
set_billing_semesters
@billing_semesters
=
BillingExpense
.
generate_semester_filters
(
:billable
)
@billing_semester
_filter
s
=
BillingExpense
.
generate_semester_filters
(
:billable
)
end
def
set_selection
...
...
@@ -103,7 +103,7 @@ class BillingExpensesController < ApplicationController
end
def
default_billing_semester
@billing_semesters
.
first
[
:value
]
@billing_semester
_filter
s
.
first
[
:value
]
end
def
selected_billing_semester
...
...
app/views/billing_expenses/index.html.slim
View file @
aba7a3cf
...
...
@@ -10,7 +10,7 @@ h1
html:
{
class:
'form-ignore-changes'
,
target:
'_blank'
}
do
|
f
|
ul
.list-inline
li
=
clear_filter_button
=
custom_filter_dropdown
(
t_attr
(
:semester
,
BillingExpense
),
*
@billing_semesters
)
=
custom_filter_dropdown
(
t_attr
(
:semester
,
BillingExpense
),
*
@billing_semester
_filter
s
)
li
=
>
f
.
button
:submit
,
'Auswahl herunterladen'
,
data:
{
disable_with:
false
}
li
-
if
@volunteer
...
...
app/views/billing_expenses/new.html.slim
View file @
aba7a3cf
...
...
@@ -5,7 +5,7 @@ h1 Spesenformulare erfassen
ul
.list-inline
=
button_link
navigation_glyph
(
:back
),
billing_expenses_path
li
=
clear_filter_button
=
custom_filter_dropdown
(
t_attr
(
:semester
,
BillingExpense
),
*
@billing_semesters
)
=
custom_filter_dropdown
(
t_attr
(
:semester
,
BillingExpense
),
*
@billing_semester
_filter
s
)
=
simple_form_for
@billing_expense
do
|
f
|
=
hidden_field_tag
'selected_semester'
,
@selected_billing_semester
...
...
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