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
a0a6007e
Commit
a0a6007e
authored
Jul 19, 2017
by
Chrysanthi Lagodimou
Browse files
add assignments to volunteer show
parent
c9fd180b
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/views/assignments/_assignment.html.slim
View file @
a0a6007e
tr
td
=
link_to
assignment
.
client
,
assignment
.
client
td
=
link_to
assignment
.
volunteer
,
assignment
.
volunteer
-
if
action_name
==
'index'
td
=
link_to
assignment
.
volunteer
,
assignment
.
volunteer
td
=
t
(
"state.
#{
assignment
.
state
}
"
,
scope:
[
:simple_form
,
:options
,
:assignment
])
if
assignment
.
state
.
present?
td
=
link_to
assignment
.
creator
,
assignment
.
creator
if
assignment
.
creator
.
present?
=
render
'index_actions'
,
subject:
assignment
...
...
app/views/assignments/_assignments_block.html.slim
0 → 100644
View file @
a0a6007e
.row
.col-xs-12
table
.table.table-striped
thead
tr
th
=
t_model
(
Client
)
-
if
action_name
==
'index'
th
=
t_model
(
Volunteer
)
th
=
t_attr
(
:state
)
th
=
t_attr
(
:created_by
)
th
colspan
=
'5'
tbody
=
render
assignments
app/views/assignments/index.html.slim
View file @
a0a6007e
...
...
@@ -2,18 +2,6 @@
.col-xs-12
h1
=
t
(
'assignments'
)
.row
.col-xs-12
table
.table.table-striped
thead
tr
th
=
t_model
(
Client
)
th
=
t_model
(
Volunteer
)
th
=
t_attr
(
:state
)
th
=
t_attr
(
:created_by
)
th
colspan
=
'5'
tbody
=
render
@assignments
=
render
'assignments_block'
,
assignments:
@assignments
=
form_navigation_btn
:new
app/views/volunteers/show.html.slim
View file @
a0a6007e
...
...
@@ -109,5 +109,11 @@ h3= t_attr(:group_accompaniment)
=
render
'schedules/show'
,
participant:
@volunteer
-
if
@volunteer
.
assignments
.
any?
.row
.col-xs-12
h3
=
t
(
'assignments'
)
=
render
'assignments/assignments_block'
,
assignments:
@volunteer
.
assignments
=
form_navigation_btn
:edit
=
form_navigation_btn
:back
Write
Preview
Markdown
is supported
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