|
35 | 35 | destroy_path: policy(@resource).destroy? ? event_path(@resource) : nil, |
36 | 36 | destroy_confirm: t('globals.confirm_delete'), |
37 | 37 | destroy_aria_label: 'Delete Record' do %> |
38 | | - <%= link_to t('better_together.events.add_to_calendar', default: 'Add to calendar (.ics)'), ics_event_path(@event), class: 'btn btn-outline-secondary btn-sm' if policy(@event).ics? %> |
| 38 | + <% if policy(@event).ics? %> |
| 39 | + <%= link_to ics_event_path(@event), class: 'btn btn-outline-secondary btn-sm' do %> |
| 40 | + <i class="fas fa-calendar-plus me-2" aria-hidden="true"></i><%= t('better_together.events.add_to_calendar', default: 'Add to calendar (.ics)') %> |
| 41 | + <% end %> |
| 42 | + <% end %> |
39 | 43 | <% end %> |
40 | 44 | </div> |
41 | 45 | </div> |
|
50 | 54 | <% attendance = BetterTogether::EventAttendance.find_by(event: @event, person: current_person) %> |
51 | 55 | <div class="container my-3"> |
52 | 56 | <div class="d-flex gap-2"> |
53 | | - <%= button_to t('better_together.events.rsvp_interested', default: 'Interested'), rsvp_interested_event_path(@event), method: :post, class: "btn btn-outline-primary #{'active' if attendance&.status == 'interested'}" %> |
54 | | - <%= button_to t('better_together.events.rsvp_going', default: 'Going'), rsvp_going_event_path(@event), method: :post, class: "btn btn-primary #{'active' if attendance&.status == 'going'}" %> |
| 57 | + <%= button_to rsvp_interested_event_path(@event), method: :post, class: "btn btn-outline-primary #{'active' if attendance&.status == 'interested'}" do %> |
| 58 | + <i class="fas fa-heart me-2" aria-hidden="true"></i><%= t('better_together.events.rsvp_interested', default: 'Interested') %> |
| 59 | + <% end %> |
| 60 | + <%= button_to rsvp_going_event_path(@event), method: :post, class: "btn btn-primary #{'active' if attendance&.status == 'going'}" do %> |
| 61 | + <i class="fas fa-check me-2" aria-hidden="true"></i><%= t('better_together.events.rsvp_going', default: 'Going') %> |
| 62 | + <% end %> |
55 | 63 | <% if attendance %> |
56 | | - <%= button_to t('better_together.events.rsvp_cancel', default: 'Cancel RSVP'), rsvp_cancel_event_path(@event), method: :delete, class: 'btn btn-outline-danger' %> |
| 64 | + <%= button_to rsvp_cancel_event_path(@event), method: :delete, class: 'btn btn-outline-danger' do %> |
| 65 | + <i class="fas fa-times me-2" aria-hidden="true"></i><%= t('better_together.events.rsvp_cancel', default: 'Cancel RSVP') %> |
| 66 | + <% end %> |
57 | 67 | <% end %> |
58 | 68 | </div> |
59 | 69 | <div class="text-muted mt-2"> |
|
0 commit comments