Sprankelprachtig aan/afmeldsysteem

home.html.haml 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. = e.name
  28. %td
  29. = e.group.name
  30. %td
  31. = e.start
  32. %td
  33. = e.location
  34. %td
  35. = render partial: "activities/presence_buttons", locals: {activity: e, person: current_person, state: p.attending}
  36. .row
  37. .col-md-6
  38. .panel.panel-default
  39. .panel-heading
  40. = t 'groups.singular'
  41. .panel-body
  42. %table.table.table-bordered
  43. %tbody
  44. - current_person.groups.each do |group|
  45. %tr
  46. %td
  47. = link_to group do
  48. = group.name
  49. .col-md-6
  50. .panel.panel-default
  51. .panel-heading
  52. = t 'dashboard.organized_you'
  53. .panel-body
  54. %table.table.table-striped.table-bordered
  55. %tbody
  56. - @user_organized.each do |p|
  57. - a = p.activity
  58. %tr
  59. %td
  60. = link_to group_activity_url(a.group, a) do
  61. = a.name
  62. = render partial: "activities/state_counts", locals: {counts: a.state_counts}
  63. .row
  64. .col-md-12
  65. .panel.panel-default
  66. .panel-heading
  67. = t 'dashboard.participant_you'
  68. .panel-body
  69. %table.table.table-striped
  70. %tbody
  71. - @upcoming.each do |p|
  72. - e = p.activity
  73. %tr{class: p.row_class, data: {activity_id: e.id, person_id: current_person.id}}
  74. %td
  75. = e.name
  76. %td
  77. = render partial: "activities/presence_buttons", locals: {activity: e, person: current_person, state: p.attending}
  78. %td
  79. = 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')