OpenFest: Implement WelcomeController#index view

This commit is contained in:
Petko Bordjukov 2015-07-19 21:08:29 +03:00 committed by Andrew Radev
parent 95ae825096
commit 2fe1fd2f09
7 changed files with 48 additions and 11 deletions

View File

@ -1,4 +1,12 @@
module OpenFest module OpenFest
class ApplicationController < ActionController::Base 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
end end

View File

@ -1,14 +1,21 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>OpenFest</title> <title>
<%= stylesheet_link_tag "open_fest/application", media: "all" %> <% if content_for? :title %>
<%= javascript_include_tag "open_fest/application" %> <%= yield :title %> |
<%= csrf_meta_tags %> <% end %>
</head> <%= @current_conference.try :title %>
<body> </title>
<%= yield %> <%= stylesheet_link_tag "open_fest/application", media: "all" %>
<%= javascript_include_tag "open_fest/application" %>
<%= csrf_meta_tags %>
</head>
<body>
</body> <section class="content">
<%= yield %>
</section>
</body>
</html> </html>

View File

@ -0,0 +1 @@
=> link_to t('views.welcome.submit_event', event_type: event_type.name.mb_chars.downcase), '#', class: 'btn-link btn-link-large'

View File

@ -0,0 +1,6 @@
li
p
strong
= track.name
span<>
= track.description

View File

@ -1,2 +0,0 @@
<h1>Welcome#index</h1>
<p>Find me in app/views/open_fest/welcome/index.html.erb</p>

View File

@ -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

View File

@ -1,4 +1,7 @@
bg: bg:
views:
welcome:
submit_event: "Предложи %{event_type}"
home_title: "%{conference} - зов за лектори" home_title: "%{conference} - зов за лектори"
what_we_ask: 'Бихме искали да получим предложенията Ви за лекции и уъркшопи, принадлежащи към следните категории до 30 септември 2014г.:' what_we_ask: 'Бихме искали да получим предложенията Ви за лекции и уъркшопи, принадлежащи към следните категории до 30 септември 2014г.:'
license_notice: 'Имайте предвид, че презентациите ви впоследствие ще бъдат публикувани с лиценз CC-BY-ND (Creative Commons Attribution No derivatives).' license_notice: 'Имайте предвид, че презентациите ви впоследствие ще бъдат публикувани с лиценз CC-BY-ND (Creative Commons Attribution No derivatives).'