diff --git a/lib/open_fest/app/controllers/open_fest/application_controller.rb b/lib/open_fest/app/controllers/open_fest/application_controller.rb index a6f561f..a8c4551 100644 --- a/lib/open_fest/app/controllers/open_fest/application_controller.rb +++ b/lib/open_fest/app/controllers/open_fest/application_controller.rb @@ -1,4 +1,12 @@ module OpenFest class ApplicationController < ActionController::Base + before_action :set_current_conference + + private + + #TODO: Make this display a nice 404 message when the conference is not found + def set_current_conference + @current_conference ||= Conference.find(1) + end end end diff --git a/lib/open_fest/app/views/layouts/open_fest/application.html.erb b/lib/open_fest/app/views/layouts/open_fest/application.html.erb index 1cf6ea2..162267d 100644 --- a/lib/open_fest/app/views/layouts/open_fest/application.html.erb +++ b/lib/open_fest/app/views/layouts/open_fest/application.html.erb @@ -1,14 +1,21 @@ -
-Find me in app/views/open_fest/welcome/index.html.erb
diff --git a/lib/open_fest/app/views/open_fest/welcome/index.slim b/lib/open_fest/app/views/open_fest/welcome/index.slim new file mode 100644 index 0000000..ead199d --- /dev/null +++ b/lib/open_fest/app/views/open_fest/welcome/index.slim @@ -0,0 +1,14 @@ +h1.entry-title = t :home_title, conference: @current_conference.title + += simple_format @current_conference.description + +p = t :what_we_ask + +ul + = render partial: 'track', collection: @current_conference.tracks + +p = t :license_notice + +- if @current_conference.call_for_participation.in_progress? + .centered.large + = render partial: 'event_type', collection: @current_conference.event_types diff --git a/lib/open_fest/config/locales/views.bg.yml b/lib/open_fest/config/locales/views.bg.yml index d60d599..0fae951 100644 --- a/lib/open_fest/config/locales/views.bg.yml +++ b/lib/open_fest/config/locales/views.bg.yml @@ -1,4 +1,7 @@ bg: + views: + welcome: + submit_event: "Предложи %{event_type}" home_title: "%{conference} - зов за лектори" what_we_ask: 'Бихме искали да получим предложенията Ви за лекции и уъркшопи, принадлежащи към следните категории до 30 септември 2014г.:' license_notice: 'Имайте предвид, че презентациите ви впоследствие ще бъдат публикувани с лиценз CC-BY-ND (Creative Commons – Attribution – No derivatives).'