From e2e5e7f9c87f2eb6f406b40823f622e67582e8e8 Mon Sep 17 00:00:00 2001 From: Kriszta Matyi Date: Tue, 2 Aug 2022 18:02:41 -0700 Subject: [PATCH] Updates grid container on admin meeting pages --- app/assets/stylesheets/main.scss | 29 +------ app/views/admin/meetings/_form.html.haml | 2 +- .../meetings/_invitation_management.html.haml | 75 +++++++++---------- app/views/admin/meetings/edit.html.haml | 4 +- app/views/admin/meetings/new.html.haml | 4 +- app/views/admin/meetings/show.html.haml | 12 +-- 6 files changed, 50 insertions(+), 76 deletions(-) diff --git a/app/assets/stylesheets/main.scss b/app/assets/stylesheets/main.scss index 33f689a1d..a7054a73c 100644 --- a/app/assets/stylesheets/main.scss +++ b/app/assets/stylesheets/main.scss @@ -44,6 +44,7 @@ nav a.menu { .collapsed { display: none; } + .no-js .collapsed { display: block; } @@ -82,34 +83,6 @@ u { text-decoration: underline; } -.stripe:not(.reverse):first-child { - padding: 80px 0px 40px; -} - -.stripe:not(.reverse):nth-child(even) { - background-color: #f5f6f7; - padding: 60px 0; -} - -.stripe.reverse:nth-child(even) { - padding-top: 60px; - padding-bottom: 60px; -} - -.stripe.reverse:nth-child(odd) { - background-color: #f5f6f7; - padding-top: 60px; - padding-bottom: 60px; -} - -.stripe.reverse:first-child { - padding: 50px 0; -} - -.admin_margin { - margin-top: 15px; -} - form .hint { color: gray; display: inline-block; diff --git a/app/views/admin/meetings/_form.html.haml b/app/views/admin/meetings/_form.html.haml index b361c19a9..a9630ce8b 100644 --- a/app/views/admin/meetings/_form.html.haml +++ b/app/views/admin/meetings/_form.html.haml @@ -21,6 +21,6 @@ .col-12 = f.input :chapters, collection: Chapter.all, label_method: :name, value_method: :id, selected: @meeting.chapters.map(&:id), input_html: { multiple: true } .col-12 - = f.input :invitable, as: :boolean, hint: 'Allow members to RSVP' + = f.input :invitable, as: :boolean, hint: 'Allow members to RSVP', hint_html: { class: 'ml-1' } .text-right = f.button :button, 'Save', class: 'btn btn-primary' diff --git a/app/views/admin/meetings/_invitation_management.html.haml b/app/views/admin/meetings/_invitation_management.html.haml index a917d5bc8..e9bc58372 100644 --- a/app/views/admin/meetings/_invitation_management.html.haml +++ b/app/views/admin/meetings/_invitation_management.html.haml @@ -1,43 +1,42 @@ -- if @invitations.any? - .row.mb-4 - .col - .card.bg-white.border-success - .card-body - %p.mb-0 - #{@invitations.count} members have RSVP'd to this event. - - = simple_form_for :meeting_invitations, url: admin_meeting_invitations_path do |f| - .row - .col-6 - = f.select :member, - Member.all.map { |u| ["#{u.full_name}", u.id] }, - { include_blank: true }, { class: 'chosen-select', required: true, - data: { placeholder: t('messages.invitations.select_a_member_to_rsvp') } } - = f.hidden_field :meeting_id, value: @meeting.slug - .col - = f.button :button, 'Add', class: 'btn btn-sm btn-primary mb-0 mr-2' - %span{'data-bs-toggle': 'tooltip', 'data-bs-placement': 'bottom', title: t('admin.workshop.manage_rsvps.text')} - %i.fas.fa-info-circle +.row.mb-4 + .col + .card.bg-white.border-success + .card-body + %p.mb-0 + #{@invitations.count} members have RSVP'd to this event. - .row.mt-4 - .col-12.attendances - %h4 Participants += simple_form_for :meeting_invitations, url: admin_meeting_invitations_path do |f| + .row + .col-6 + = f.select :member, + Member.all.map { |u| ["#{u.full_name}", u.id] }, + { include_blank: true }, { class: 'chosen-select', required: true, + data: { placeholder: t('messages.invitations.select_a_member_to_rsvp') } } + = f.hidden_field :meeting_id, value: @meeting.slug + .col + = f.button :button, 'Add', class: 'btn btn-sm btn-primary mb-0 mr-2' + %span{'data-bs-toggle': 'tooltip', 'data-bs-placement': 'bottom', title: t('admin.workshop.manage_rsvps.text')} + %i.fas.fa-info-circle - - @invitations.each do |invitation| - .col-5.attendee - .row.mb-4 - .col-1 - - if (@meeting.date_and_time - 30.minutes).past? - - if invitation.attended? - = link_to '', admin_meeting_invitation_path(invitation, attendance_status: true, attended: false), class: 'far fa-check-square', method: :put - - else - = link_to '', admin_meeting_invitation_path(invitation, attendance_status: true, attended: true), - class: 'fa fa-square-o verify-attendance', - method: :put +.row.mt-4 + .col-12.attendances + %h4 Participants + - @invitations.each do |invitation| + .col-5.attendee + .row.mb-4 + .col-1 + - if (@meeting.date_and_time - 30.minutes).past? + - if invitation.attended? + = link_to '', admin_meeting_invitation_path(invitation, attendance_status: true, attended: false), class: 'far fa-check-square', method: :put - else - = link_to '', admin_meeting_invitation_path(invitation, attendance_status: false, attended: false), class: 'far fa-minus-square', method: :put + = link_to '', admin_meeting_invitation_path(invitation, attendance_status: true, attended: true), + class: 'fa fa-square-o verify-attendance', + method: :put + + - else + = link_to '', admin_meeting_invitation_path(invitation, attendance_status: false, attended: false), class: 'far fa-minus-square', method: :put - .col-11 - = link_to admin_member_path(invitation.member) do - = invitation.member.full_name + .col-11 + = link_to admin_member_path(invitation.member) do + = invitation.member.full_name diff --git a/app/views/admin/meetings/edit.html.haml b/app/views/admin/meetings/edit.html.haml index e72baa944..09f112584 100644 --- a/app/views/admin/meetings/edit.html.haml +++ b/app/views/admin/meetings/edit.html.haml @@ -1,8 +1,8 @@ -.container-fluid.pt-3 +.container.py-4.py-lg-5 .row.mb-4 .col %h1 Edit Monthly .row - .col.col-lg-10 + .col.col-md-10.col-lg-8 = render partial: 'form' diff --git a/app/views/admin/meetings/new.html.haml b/app/views/admin/meetings/new.html.haml index 043600c9b..1e5d75cbf 100644 --- a/app/views/admin/meetings/new.html.haml +++ b/app/views/admin/meetings/new.html.haml @@ -1,8 +1,8 @@ -.container-fluid.pt-3 +.container.py-4.py-lg-5 .row.mb-4 .col %h1 New Monthly .row - .col.col-lg-10 + .col.col-md-10.col-lg-8 = render partial: 'form' diff --git a/app/views/admin/meetings/show.html.haml b/app/views/admin/meetings/show.html.haml index 11d3276ce..9d678b71a 100644 --- a/app/views/admin/meetings/show.html.haml +++ b/app/views/admin/meetings/show.html.haml @@ -1,4 +1,4 @@ -.container-fluid.btn-group.p-0 +.container-fluid.btn-group.p-0{ role: 'group' } = link_to invite_admin_meeting_path(@meeting), class: 'btn btn-primary py-3 rounded-0', title: 'Invite' do %i.fas.fa-paper-plane %label.text-white Invite @@ -12,11 +12,11 @@ %i.fas.fa-users %label.text-white Labels -.container-fluid.mt-5 +.container.py-4.py-lg-5 .row .col %h1 - =@meeting.name + = @meeting.name %h2 %small #{humanize_date(@meeting.date_and_time, @meeting.ends_at, with_time: true)} .row @@ -53,5 +53,7 @@ %h4 Agenda = @meeting.description.html_safe -#invitations.stripe.reverse - = render partial: 'invitation_management' +- if @invitations.any? + .py-4.py-lg-5.bg-light + .container#invitations + = render partial: 'invitation_management'