Sprankelprachtig aan/afmeldsysteem

home.html.haml 2.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. .container
  2. .row
  3. - if @need_response.any?
  4. .col-md-12
  5. .panel.panel-default
  6. .panel-heading
  7. Need response
  8. .panel-body
  9. %table.table.table-bordered
  10. %thead
  11. %tr
  12. %th
  13. Name
  14. %th
  15. Group
  16. %th
  17. When
  18. %th
  19. Where
  20. %th
  21. 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.public_name
  28. - if e.secret_name && e.participants.first.is_organizer
  29. %i
  30. = "(#{e.secret_name})"
  31. %td
  32. = e.group.name
  33. %td
  34. = e.start
  35. %td
  36. = e.location
  37. %td
  38. = render partial: "activities/presence_buttons", locals: {activity: e, person: current_person, state: p.attending}
  39. .row
  40. .col-md-6
  41. .panel.panel-default
  42. .panel-heading
  43. Groups
  44. .panel-body
  45. %table.table.table-bordered
  46. %tbody
  47. - current_person.groups.each do |group|
  48. %tr
  49. %td
  50. = link_to group do
  51. = group.name
  52. .col-md-6
  53. .panel.panel-default
  54. .panel-heading
  55. Organized by you
  56. .panel-body
  57. %table.table.table-striped.table-bordered
  58. %tbody
  59. - @user_organized.each do |p|
  60. - a = p.activity
  61. %tr
  62. %td
  63. = link_to group_activity_url(a.group, a) do
  64. = a.public_name
  65. - if a.secret_name
  66. = "(#{a.secret_name})"
  67. = render partial: "activities/state_counts", locals: {counts: a.state_counts}
  68. .row
  69. .col-md-12
  70. .panel.panel-default
  71. .panel-heading
  72. Your activities
  73. .panel-body
  74. %table.table.table-striped
  75. %tbody
  76. - @upcoming.each do |p|
  77. - e = p.activity
  78. %tr{class: p.row_class, data: {activity_id: e.id, person_id: current_person.id}}
  79. %td
  80. = e.public_name
  81. %td
  82. = render partial: "activities/presence_buttons", locals: {activity: e, person: current_person, state: p.attending}
  83. %td
  84. = editable p, :notes, url: presence_group_activity_path(e.group, e, person_id: current_person.id), title: "Notes", value: p.notes, emptytext: 'Notes'