Sprankelprachtig aan/afmeldsysteem

home.html.haml 3.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. .container
  2. .row
  3. - if @need_response.any?
  4. .col-md-12
  5. .panel.panel-default
  6. .panel-heading
  7. = t 'activities.state.need_response'
  8. .panel-body
  9. %table.table.table-bordered
  10. %thead
  11. %tr
  12. %th
  13. = t 'activities.attrs.name'
  14. %th
  15. = t 'activities.attrs.group'
  16. %th
  17. = t 'activities.attrs.when'
  18. %th
  19. = t 'activities.attrs.where'
  20. %th
  21. = t 'activities.attrs.actions'
  22. %tbody
  23. - @need_response.each do |p|
  24. - e = p.activity
  25. %tr{class: p.row_class, data: {activity_id: e.id, person_id: current_person.id}}
  26. %td
  27. = link_to group_activity_path(e.group, e) do
  28. = e.name
  29. %td
  30. = e.group.name
  31. %td
  32. = e.start
  33. %td
  34. = e.location
  35. %td
  36. = render partial: "activities/presence_buttons", locals: {activity: e, person: current_person, state: p.attending}
  37. .row
  38. .col-md-6
  39. .panel.panel-default
  40. .panel-heading
  41. = t 'groups.plural'
  42. .panel-body
  43. %table.table.table-bordered
  44. %tbody
  45. - current_person.groups.each do |group|
  46. %tr
  47. %td
  48. = link_to group do
  49. = group.name
  50. .col-md-6
  51. .panel.panel-default
  52. .panel-heading
  53. = t 'dashboard.organized_you'
  54. .panel-body
  55. %table.table.table-striped.table-bordered
  56. %tbody
  57. - @user_organized.each do |p|
  58. - a = p.activity
  59. %tr
  60. %td
  61. = link_to group_activity_url(a.group, a) do
  62. = a.name
  63. = render partial: "activities/state_counts", locals: {counts: a.state_counts}
  64. .row
  65. .col-md-12
  66. .panel.panel-default
  67. .panel-heading
  68. = t 'dashboard.participant_you'
  69. .panel-body
  70. %table.table.table-striped
  71. %tbody
  72. - @upcoming.each do |p|
  73. - e = p.activity
  74. %tr{class: p.row_class, data: {activity_id: e.id, person_id: current_person.id}}
  75. %td
  76. = link_to group_activity_path(e.group, e) do
  77. = e.name
  78. %td
  79. = render partial: "activities/presence_buttons", locals: {activity: e, person: current_person, state: p.attending}
  80. %td
  81. = editable p, :notes, url: presence_group_activity_path(e.group, e, person_id: current_person.id), title: t('activities.participant.notes'), value: p.notes, emptytext: t('activities.participant.add_notes')