OpenFest: Implement WelcomeController#index view
This commit is contained in:
parent
95ae825096
commit
2fe1fd2f09
|
@ -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
|
||||
|
|
|
@ -1,14 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>OpenFest</title>
|
||||
<title>
|
||||
<% if content_for? :title %>
|
||||
<%= yield :title %> |
|
||||
<% end %>
|
||||
<%= @current_conference.try :title %>
|
||||
</title>
|
||||
|
||||
<%= stylesheet_link_tag "open_fest/application", media: "all" %>
|
||||
<%= javascript_include_tag "open_fest/application" %>
|
||||
<%= csrf_meta_tags %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<section class="content">
|
||||
<%= yield %>
|
||||
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
=> link_to t('views.welcome.submit_event', event_type: event_type.name.mb_chars.downcase), '#', class: 'btn-link btn-link-large'
|
|
@ -0,0 +1,6 @@
|
|||
li
|
||||
p
|
||||
strong
|
||||
= track.name
|
||||
span<> –
|
||||
= track.description
|
|
@ -1,2 +0,0 @@
|
|||
<h1>Welcome#index</h1>
|
||||
<p>Find me in app/views/open_fest/welcome/index.html.erb</p>
|
|
@ -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
|
|
@ -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).'
|
||||
|
|
Loading…
Reference in New Issue