Skip to content

Commit

Permalink
Updates grid container on admin ban, member, feedback and portal pages
Browse files Browse the repository at this point in the history
  • Loading branch information
matyikriszta committed Aug 8, 2022
1 parent e27923b commit eb5b026
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 160 deletions.
85 changes: 0 additions & 85 deletions app/assets/stylesheets/partials/_admin_member.scss

This file was deleted.

9 changes: 5 additions & 4 deletions app/views/admin/bans/_ban.html.haml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
.row.d-flex.suspension
.col-2.col-md-1
%span.fa-stack
%span.fa-stack.text-danger
%i.fas.fa-user.fa-stack-1x
%i.fas.fa-ban.fa-stack-2x.warning
%i.fas.fa-ban.fa-stack-2x
.col-9.col-md-11.details
%strong
- if action.permanent?
Suspended indefinitely
- else
Suspended until #{l(action.expires_at, format: :default_date)}
by #{link_to(action.added_by.full_name, action.added_by)}
%em= action.reason
%blockquote
%div
%em= action.reason
%p.mb-0
= action.note
- if action.explanation.present?
.explanation
Expand Down
8 changes: 4 additions & 4 deletions app/views/admin/bans/new.html.haml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.container-fluid.pt-3
.container.py-4.py-lg-5
.row.mb-4
.col
%nav
%ol.breadcrumb.ml0
%li.breadcrumb-item= link_to @member.full_name, admin_member_path(@member), class: 'border-0'
%nav{'aria-label': 'breadcrumb'}
%ol.breadcrumb.ml-0
%li.breadcrumb-item= link_to @member.full_name, admin_member_path(@member)
%li.breadcrumb-item.active=t('.title')

.row
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/feedback/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.container-fluid.pt-3
.container.py-4.py-lg-5
- if @feedback.any?
.row
.col
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/members/_actions.html.haml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.container-fluid.p-0.mb-4
.container-fluid.p-0
.btn-group.d-flex
= link_to '#', class: 'btn btn-primary d-block py-4 rounded-0', 'data-toggle': 'modal', 'data-target': "#note-modal" do
%i.fas.fa-pencil-alt.mr-2
Expand Down
8 changes: 4 additions & 4 deletions app/views/admin/members/_profile.html.haml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#profile
= image_tag(@member.avatar(200), title: @member.full_name, alt: @member.full_name)
%span.d-block= @member.full_name
%span.d-block= mail_to @member.email, @member.email
%span.d-block= @member&.mobile
= image_tag(@member.avatar(200), title: @member.full_name, alt: @member.full_name, class: 'mb-4 rounded-circle')
%span.d-block.mb-2= @member.full_name
%span.d-block.mb-2= mail_to @member.email, @member.email
%span.d-block.mb-2= @member&.mobile
%span.d-block
%p.lead= @member.about_you

Expand Down
45 changes: 22 additions & 23 deletions app/views/admin/members/events.html.haml
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
#admin-member
= render 'actions'
.container-fluid.mb-4.mb-md-0
.row
.col-12.col-md-3
= render 'profile'
.col-12.col-md-9
%p
=link_to admin_member_path(@member) do
%i.fas.fa-arrow-left
Back to member summary
- if @member.upcoming_rsvps.any?
%h3 Upcoming RSVPs
- @member.upcoming_rsvps.each do |invitation|
= render EventPresenter.decorate(invitation.event), invitation: invitation
= render 'actions'
.container.py-4.py-lg-5
.row
.col-12.col-md-3
= render 'profile'
.col-12.col-md-9
%p
=link_to admin_member_path(@member) do
%i.fas.fa-arrow-left
Back to member summary
- if @member.upcoming_rsvps.any?
%h3 Upcoming RSVPs
- @member.upcoming_rsvps.each do |invitation|
= render EventPresenter.decorate(invitation.event), invitation: invitation

- if @member.past_rsvps.any?
%h3 Past RSVPs
.digg_pagination.mb-3
.page_info
= page_entries_info(@member.past_rsvps.paginate(per_page: 20, page: params['page']), model: 'past events')
= will_paginate(@member.past_rsvps.paginate(per_page: 20, page: params['page']))
- if @member.past_rsvps.any?
%h3 Past RSVPs
.digg_pagination.mb-3
.page_info
= page_entries_info(@member.past_rsvps.paginate(per_page: 20, page: params['page']), model: 'past events')
= will_paginate(@member.past_rsvps.paginate(per_page: 20, page: params['page']))

- @member.past_rsvps.paginate(per_page: 20, page: params['page']).each do |invitation|
= render EventPresenter.decorate(invitation.event), invitation: invitation
- @member.past_rsvps.paginate(per_page: 20, page: params['page']).each do |invitation|
= render EventPresenter.decorate(invitation.event), invitation: invitation
4 changes: 2 additions & 2 deletions app/views/admin/members/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.container-fluid
.container.py-4.py-lg-5
.row.mb-4
.col
%h1 Members Directory
.row.mb-4
.col-12.col-md-6
= select_tag 'member_lookup_id', options_for_select(@members.collect{ |u| [u.full_name, u.id] }), { class: 'chosen-select' }
.row.mb-4
.row
.col
= link_to 'View Profile', '#', { class: 'btn btn-primary', id: 'view_profile' }
55 changes: 27 additions & 28 deletions app/views/admin/members/show.html.haml
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
#admin-member
= render 'actions'
.container-fluid.mb-4
.row
.col-12.col-md-3
= render 'profile'
.col-12.col-md-9
.row
.col
%ul.list-unstyled.m-1#actions
- @actions.each do |action|
%li.border-bottom.border-light.mb-3= render action, action: action
= render 'actions'
.container.py-4.py-lg-5
.row
.col-12.col-md-3
= render 'profile'
.col-12.col-md-9
.row
.col
%ul.list-unstyled#actions
- @actions.each do |action|
%li.border-bottom.mb-3.pb-3= render action, action: action

.row.d-flex.align-items-center
.col-2.col-md-1
%span.fa-stack.text-success
%i.fas.fa-circle.fa-stack-2x
%i.fas.fa-user-plus.fa-stack-1x.fa-inverse
.col-9.col-md-11
%strong Signed up
= l(@member.created_at, format: :website_format)
.row.d-flex.align-items-center
.col-2.col-md-1
%span.fa-stack.text-success
%i.fas.fa-circle.fa-stack-2x
%i.fas.fa-user-plus.fa-stack-1x.fa-inverse
.col-9.col-md-11
%strong Signed up
= l(@member.created_at, format: :website_format)


- if @member.upcoming_rsvps.any?
.row
.col
%h3.mt-4 Upcoming RSVPs
- @member.upcoming_rsvps.each do |invitation|
= render EventPresenter.decorate(invitation.event), invitation: invitation
.row.mt-4
- if @member.upcoming_rsvps.any?
.row
.col
= link_to 'View all RSVPS', admin_member_events_path(@member), class: 'btn btn-primary btn-block'
%h3.mt-4 Upcoming RSVPs
- @member.upcoming_rsvps.each do |invitation|
= render EventPresenter.decorate(invitation.event), invitation: invitation
.row.mt-4
.col
= link_to 'View all RSVPS', admin_member_events_path(@member), class: 'btn btn-primary btn-block'
8 changes: 4 additions & 4 deletions app/views/admin/portal/guide.html.haml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.container-fluid
.container.py-4.py-lg-5
.row
.col
%h2 Using the codebar application
.col.col-md-10.col-lg-8
%h1 Using the codebar application

%h3 Managing admin privileges
%h2 Managing admin privileges

%p To manage roles, we use the Rolify gem. At the moment, the only way to add and remove privileges is through Rails console. There are three types of special roles: chapter organisers, meeting organisers and admins.

Expand Down
8 changes: 4 additions & 4 deletions app/views/admin/portal/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
.container-fluid
.container.py-4.py-lg-5
.row
.col-12.col-md-3
%h3.mb-3 Chapters
%ul.list-unstyled.m-0
- @chapters.each do |chapter|
%li.pb-2.mb-3.border-bottom.border-dark
= link_to chapter.name, [ :admin, chapter ], class: 'border-0 pl-2'
= link_to chapter.name, [ :admin, chapter ], class: 'pl-2'
.col-12.col-md-5
%h3.mb-3 Upcoming Workshops
%ul.list-unstyled.m-0
- @workshops.each do |workshop|
%li.border-bottom.border-dark.pb-2.mb-3
= link_to admin_workshop_path(workshop), class: 'border-0' do
= link_to admin_workshop_path(workshop) do
%strong= workshop.chapter.name
%br
= humanize_date(workshop.date_and_time, with_time: true)
Expand All @@ -28,7 +28,7 @@
%ul.list-unstyled.m-0
- @groups.each do |group|
%li.border-bottom.border-dark.pb-2.mb-3
= link_to [:admin, group], class: 'border-0' do
= link_to [:admin, group] do
#{group.name} (#{group.chapter.name})

.col-12.col-md-9
Expand Down

0 comments on commit eb5b026

Please sign in to comment.