Sprankelprachtig aan/afmeldsysteem

index.html.haml 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. %h1
  2. - if params[:past]
  3. = t 'activities.past'
  4. - else
  5. = t 'activities.upcoming'
  6. - isleader = @group.leaders.include?(current_person) || current_person.is_admin?
  7. .btn-group.pull-right
  8. - if params[:past]
  9. = link_to group_activities_path(@group), class: 'btn btn-default' do
  10. %i.fas.fa-history
  11. = t 'activities.upcoming'
  12. - else
  13. = link_to group_activities_path(@group, past: true), class: 'btn btn-default' do
  14. %i.fas.fa-history
  15. = t 'activities.past'
  16. - if isleader
  17. = link_to new_group_activity_path(@group), class: 'btn btn-default' do
  18. %i.fas.fa-plus
  19. = t 'activities.new'
  20. %table.table
  21. %thead
  22. %tr
  23. %th
  24. = t 'activerecord.attributes.activity.name'
  25. %th
  26. = t 'activerecord.attributes.activity.start'
  27. %th
  28. P/A/?
  29. - if isleader
  30. %th
  31. %tbody
  32. - @activities.each do |a|
  33. %tr
  34. %td
  35. = link_to a.name, group_activity_path(@group, a)
  36. %td
  37. = l a.start, format: :short
  38. %td
  39. = a.human_state_counts
  40. - if isleader
  41. %td
  42. = link_to edit_group_activity_path(@group, a) do
  43. %i.fas.fa-pencil-alt
  44. = will_paginate @activities