|
|
@ -16,11 +16,7 @@ module HomeHelper |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def heading_for_user_role(user) |
|
|
|
def heading_for_user_role(user) |
|
|
|
case user.role |
|
|
|
ROLE_HEADINGS[user.role] |
|
|
|
when "data_provider" then "Complete your logs" |
|
|
|
|
|
|
|
when "data_coordinator" then "Manage your data" |
|
|
|
|
|
|
|
when "support" then "Manage all data" |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def data_subheading(user, type) |
|
|
|
def data_subheading(user, type) |
|
|
@ -66,4 +62,10 @@ module HomeHelper |
|
|
|
"View all #{type}" |
|
|
|
"View all #{type}" |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ROLE_HEADINGS = { |
|
|
|
|
|
|
|
"data_provider" => "Complete your logs", |
|
|
|
|
|
|
|
"data_coordinator" => "Manage your data", |
|
|
|
|
|
|
|
"support" => "Manage all data", |
|
|
|
|
|
|
|
}.freeze |
|
|
|
end |
|
|
|
end |
|
|
|