From 61ebb8027c75658d2acb8b593036214d3d7e7fe2 Mon Sep 17 00:00:00 2001 From: Nikos Dimitrakopoulos Date: Sun, 21 Apr 2013 11:52:35 +0300 Subject: [PATCH] Remove date configurations from application.yml since they are now available in Phase instances. Refs #15. --- app/helpers/application_helper.rb | 4 ++-- app/views/dashboard/_moderator_dashboard.html.erb | 2 +- config/application.example.yml | 2 -- config/application.yml | 2 -- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ded9353..22e9e49 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -137,9 +137,9 @@ def authentication_links(container = :p) end def countdown_to_submissions_end - submissions_end = DateTime.parse(Settings.submissions_end) + submissions_end = Phase::ONE.ending_at if submissions_end > DateTime.now - content_tag :span, '', id: 'counter', data: {countdown_end: DateTime.parse(Settings.submissions_end).to_i * 1000} + content_tag :span, '', id: 'counter', data: {countdown_end: submissions_end.to_i * 1000} else content_tag :span, 'no time' end diff --git a/app/views/dashboard/_moderator_dashboard.html.erb b/app/views/dashboard/_moderator_dashboard.html.erb index 33b76ce..416fdb8 100644 --- a/app/views/dashboard/_moderator_dashboard.html.erb +++ b/app/views/dashboard/_moderator_dashboard.html.erb @@ -1,5 +1,5 @@ <% - submissions_start = DateTime.parse(Settings.submissions_start).to_date + submissions_start = Phase::ONE.starting_at.to_date proposals = Proposal.scoped suggestions = Suggestion.scoped diff --git a/config/application.example.yml b/config/application.example.yml index 7652e4a..4f94969 100644 --- a/config/application.example.yml +++ b/config/application.example.yml @@ -23,8 +23,6 @@ defaults: &defaults mailer: from: '"Your Event" ' bcc: 'info@example.org' - submissions_start: '2013-03-28T00:00:00+2' - submissions_end: '2013-04-24T00:00:00+3' development: <<: *defaults diff --git a/config/application.yml b/config/application.yml index 5033de9..449a069 100644 --- a/config/application.yml +++ b/config/application.yml @@ -27,8 +27,6 @@ defaults: &defaults mailer: from: '"EuRuKo 2013" ' bcc: 'info@euruko2013.org' - submissions_start: '2013-03-28T00:00:00+2' - submissions_end: '2013-04-24T00:00:00+3' development: <<: *defaults