Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ GEM
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.0.5)
crass (1.0.5)
cucumber (2.4.0)
builder (>= 2.1.2)
cucumber-core (~> 1.5.0)
Expand Down Expand Up @@ -159,15 +160,16 @@ GEM
activerecord
kaminari-core (= 1.1.1)
kaminari-core (1.1.1)
loofah (2.0.3)
loofah (2.3.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.6.5)
mime-types (>= 1.16, < 4)
method_source (0.8.2)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
mini_portile2 (2.4.0)
minitest (5.10.1)
multi_json (1.12.1)
multi_test (0.1.2)
Expand All @@ -176,8 +178,8 @@ GEM
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (5.0.2)
nokogiri (1.7.1)
mini_portile2 (~> 2.1.0)
nokogiri (1.10.5)
mini_portile2 (~> 2.4.0)
notifier (0.5.2)
oauth2 (1.3.1)
faraday (>= 0.8, < 0.12)
Expand Down
6 changes: 3 additions & 3 deletions app/models/ride.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ def is_flighttime_valid

def is_aspc_valid
return unless is_aspc
errors.add(:is_aspc, "ASPC-Funded Ride Booking through this website is currently disabled");

# Change these depending on the program date
aspc_ride_start_date = Date.new(2018, 12, 17)
aspc_ride_end_date = Date.new(2018, 12, 22)
# TODO: set this in admin panel
aspc_ride_start_date = Date.new(2019, 12, 17)
aspc_ride_end_date = Date.new(2019, 12, 22)

if not flighttime.to_date.between? aspc_ride_start_date, aspc_ride_end_date
errors.add(:flighttime, "falls outside the range of the program dates (#{aspc_ride_start_date.strftime("%B %d, %Y") + " - " + aspc_ride_end_date.strftime("%B %d, %Y")})")
Expand Down
2 changes: 1 addition & 1 deletion app/views/rides/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
<% end %>


<%= render 'form', :hide_aspc_signup => true %>
<%= render 'form', :hide_aspc_signup => current_user.is_admin %>
7 changes: 4 additions & 3 deletions app/views/rides/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

.section
.columns
.column.is-12
.column.is-5
.index-notification
%p
%strong ASPC is excited to reintroduce the 5C Rideshare service
Expand All @@ -46,13 +46,14 @@
%br
%p
The aim of this service is to allow students going to and from Ontario or LAX to connect with each other and split the cost of the ride – simply sign in and create or join a ride at a time which works for you!
/

- if current_user.is_admin
.column.is-2
.column-divider
.column.is-5
.index-notification
%p
%strong Pomona Students: Youx're eligible for a free ride over winter break!
%strong Pomona Students: You're eligible for a free ride over winter break!
%br
%p
For more details, sign in with your Pomona login and
Expand Down
4 changes: 2 additions & 2 deletions app/views/rides/new.html.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
=content_for :header do
=render 'layouts/page_header', :title => "Create a Ride"

#new-ride
= render 'rides/form', :hide_aspc_signup => true
= render 'rides/form', :hide_aspc_signup => current_user.is_admin