Sprankelprachtig aan/afmeldsysteem

home.html.haml 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. .panel-footer.text-center.sv-nomargins
  38. = will_paginate @need_response, param_name: 'nrpage', renderer: WillPaginate::ActionView::Bootstrap4LinkRenderer, class: 'pagination-sm pagination'
  39. .row
  40. .col-md-6
  41. .panel.panel-default
  42. .panel-heading
  43. = t 'groups.plural'
  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. = t 'dashboard.organized_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.name
  65. = render partial: "activities/state_counts", locals: {counts: a.state_counts}
  66. .row
  67. .col-md-12
  68. .panel.panel-default
  69. .panel-heading
  70. = t 'dashboard.participant_you'
  71. .panel-body
  72. %table.table.table-striped
  73. %tbody
  74. - @upcoming.each do |p|
  75. - e = p.activity
  76. %tr{class: p.row_class, data: {activity_id: e.id, person_id: current_person.id}}
  77. %td
  78. = link_to group_activity_path(e.group, e) do
  79. = e.name
  80. %td
  81. = render partial: "activities/presence_buttons", locals: {activity: e, person: current_person, state: p.attending}
  82. %td
  83. = 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')
  84. .panel-footer.text-center.sv-nomargins
  85. = will_paginate(@upcoming, param_name: 'upage', renderer: WillPaginate::ActionView::Bootstrap4LinkRenderer, class: 'pagination-sm pagination')