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
3ef15cb8
Commit
3ef15cb8
authored
Oct 23, 2018
by
Jiri Strojil
Browse files
Added fields to the semester process volunteers#index
parent
d3e393a9
Pipeline
#29308
passed with stage
in 52 minutes and 17 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/helpers/semester_process_volunteer_helper.rb
View file @
3ef15cb8
...
...
@@ -27,4 +27,12 @@ module SemesterProcessVolunteerHelper
@semester_process_volunteer
.
commited_at
=
nil
end
def
render_missions
(
spv
)
html
=
""
spv
.
missions
.
each
do
|
m
|
html
+=
link_to
m
.
to_label
,
"/
#{
m
.
class
.
name
.
underscore
.
pluralize
}
/
#{
m
.
id
}
/edit"
,
target:
'_blank'
html
+=
"<br>"
end
html
.
html_safe
end
end
app/views/semester_process_volunteers/index.html.slim
View file @
3ef15cb8
...
...
@@ -10,9 +10,11 @@ h1= t_title(:index)
tr
th
.hidden-print
Aktionen
th
=
t_attr
(
:full_name
,
Volunteer
)
th
=
t_attr
(
:creator
)
th
=
t_attr
(
:semester
)
th
Missions
th
=
t_attr
(
:commited_by
)
th
=
t_attr
(
:commited_at
)
th
=
t_attr
(
:creator
)
th
=
t_attr
(
:created_at
)
tbody
...
...
@@ -22,11 +24,11 @@ h1= t_title(:index)
=
link_to
t_action
(
:show
),
spv
=
link_to
t_action
(
:edit
),
edit_semester_process_volunteer_path
(
spv
)
td
=
link_to_if
policy
(
Volunteer
).
edit?
,
spv
.
volunteer
.
contact
.
full_name
,
edit_volunteer_path
(
spv
.
volunteer
)
td
=
spv
.
creator
td
=
spv
.
semester_t
td
=
spv
.
missions
.
each
do
|
m
|
=
link_to
m
.
to_label
,
m
.
id
.
to_s
,
target:
'_blank'
td
=
render_missions
(
spv
)
td
=
spv
.
commited_by
td
=
spv
.
commited_at
&&
l
(
spv
.
commited_at
)
td
=
spv
.
creator
td
=
l
(
spv
.
created_at
)
=
bootstrap_paginate
(
@spvs
)
...
...
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