YaleSTC / shifts

Application to easily track shifts, reports, and payforms for employees.
MIT License
23 stars 18 forks source link

Payforms Show page should indicate user's role #296

Closed dgoerger closed 10 years ago

dgoerger commented 10 years ago

This would be helpful so that administrators in heterogeneous employment environments can know at a glance that user's role and hence wage and billing authorizations. Specifically line three of

app/views/payforms/show.html.erb

it should change from

title "#{@payform.user.name}"

to

title "#{@payform.user.name + ' (' + @payform.user.roles.first.name + ')'}"

It might be preferrable to use payform.user.role, but I wasn't sure what the =(name) in the method declaration was all about and the first role as above should do the trick in all cases (unless the user has no role, but that'll error in other parts of the application in existing code and with the .role method, as well; we should maybe fix that in the definition of the role[s] method, if we don't just reboot the entire app from scratch and fix it that way).

This change is already live on weke.its---@stuartteal and I edited the server source directly, but it's not anywhere on the github, and I'm hesitant to push anything so trivial in the midst of the Big Rewrite of 2014. :/

mnquintana commented 10 years ago

Related to #206