Skip to content

Commit

Permalink
Merge 4fb0f93 into 0fd5b9c
Browse files Browse the repository at this point in the history
  • Loading branch information
matyikriszta committed Apr 13, 2022
2 parents 0fd5b9c + 4fb0f93 commit 9eb620a
Show file tree
Hide file tree
Showing 35 changed files with 4 additions and 682 deletions.
1 change: 0 additions & 1 deletion app/assets/stylesheets/partials/_colors.sass
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ $navigation-links-purple: #613789
$title-side: #342552
$our-mission-purple: #6f4a93
$next-workshop-yellow: #fdcc38
$next-course-green: #57ae3b
$code-of-conduct-purple: #ccc0d6
$meeting-title: #241A62

Expand Down
6 changes: 1 addition & 5 deletions app/assets/stylesheets/partials/_events.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,10 @@
color: #968ae0;
}

.workshops.date {
.workshops.date {
color: #ab97bb;
}

.course.date {
color: #d9699e;
}

.event.date {
color: #138cd3;
}
2 changes: 1 addition & 1 deletion app/controllers/auth_services_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class AuthServicesController < ApplicationController
def new
referer_path = URI(request.referer).path
if Rails.application.routes.recognize_path(referer_path)[:controller].in?(%w[workshops events courses meetings])
if Rails.application.routes.recognize_path(referer_path)[:controller].in?(%w[workshops events meetings])
session[:referer_path] = referer_path
end
redirect_to '/auth/github'
Expand Down
41 changes: 0 additions & 41 deletions app/controllers/course/invitation_controller.rb

This file was deleted.

20 changes: 0 additions & 20 deletions app/controllers/courses_controller.rb

This file was deleted.

3 changes: 1 addition & 2 deletions app/controllers/dashboard_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,9 @@ def upcoming_events_for_user
end

def all_events(workshops)
course = Course.includes(:sponsor).next
meeting = Meeting.includes(:venue).next
events = Event.includes(:venue, :sponsors).upcoming.take(DEFAULT_UPCOMING_EVENTS)

[*workshops, course, *events, meeting].uniq.compact
[*workshops, *events, meeting].uniq.compact
end
end
3 changes: 0 additions & 3 deletions app/controllers/events_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ def index
fresh_when(latest_model_updated, etag: latest_model_updated)

events = [Workshop.past.includes(:chapter).joins(:chapter).merge(Chapter.active).limit(RECENT_EVENTS_DISPLAY_LIMIT)]
events << Course.past.limit(RECENT_EVENTS_DISPLAY_LIMIT)
events << Meeting.past.includes(:venue).limit(RECENT_EVENTS_DISPLAY_LIMIT)
events << Event.past.includes(:venue, :sponsors).limit(RECENT_EVENTS_DISPLAY_LIMIT)
events = events.compact.flatten.sort_by(&:date_and_time).reverse.first(RECENT_EVENTS_DISPLAY_LIMIT)
Expand All @@ -20,7 +19,6 @@ def index
end

events = [Workshop.includes(:chapter).upcoming.joins(:chapter).merge(Chapter.active)]
events << Course.upcoming.all
events << Meeting.upcoming.all
events << Event.upcoming.includes(:venue, :sponsors).all
events = events.compact.flatten.sort_by(&:date_and_time).group_by(&:date)
Expand Down Expand Up @@ -62,7 +60,6 @@ def rsvp
def latest_model_updated
[
Workshop.maximum(:updated_at),
Course.maximum(:updated_at),
Meeting.maximum(:updated_at),
Event.maximum(:updated_at),
Member.maximum(:updated_at)
Expand Down
4 changes: 0 additions & 4 deletions app/controllers/invitations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ def index
.joins(:workshop)
.merge(Workshop.upcoming)
.includes(workshop: :chapter)
upcoming_invitations += CourseInvitation.where(member: current_user)
.joins(:course)
.merge(Course.upcoming)
.includes(:course)
@upcoming_invitations = InvitationPresenter.decorate_collection(upcoming_invitations)

@attended_invitations = WorkshopInvitation.where(member: current_user)
Expand Down
23 changes: 0 additions & 23 deletions app/mailers/course_invitation_mailer.rb

This file was deleted.

41 changes: 0 additions & 41 deletions app/models/course.rb

This file was deleted.

22 changes: 0 additions & 22 deletions app/models/course_invitation.rb

This file was deleted.

4 changes: 0 additions & 4 deletions app/models/course_tutor.rb

This file was deleted.

9 changes: 0 additions & 9 deletions app/models/invitation_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,6 @@ def send_monthly_attendance_reminder_emails(monthly)
end
handle_asynchronously :send_monthly_attendance_reminder_emails

def send_course_emails(course)
students = Member.in_group(course.chapter.groups.students)
students.each do |student|
invitation = CourseInvitation.new(course: course, member: student)
invitation.send(:email) if invitation.save
end
end
handle_asynchronously :send_course_emails

def send_meeting_emails(meeting)
meeting.invitees.not_banned.each do |invitee|
invitation = MeetingInvitation.new(meeting: meeting, member: invitee, role: 'Participant')
Expand Down
17 changes: 0 additions & 17 deletions app/presenters/course_presenter.rb

This file was deleted.

1 change: 0 additions & 1 deletion app/presenters/event_presenter.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
class EventPresenter < BasePresenter
PRESENTER = { workshop: 'WorkshopPresenter',
course: 'CoursePresenter',
meeting: 'MeetingPresenter',
event: 'EventPresenter' }.freeze

Expand Down
103 changes: 0 additions & 103 deletions app/views/course/invitation/show.html.haml

This file was deleted.

Loading

0 comments on commit 9eb620a

Please sign in to comment.