Added view and controller for splash page with routes for show
This commit is contained in:
parent
928db0e4f4
commit
c620d63b0f
12 changed files with 21 additions and 30 deletions
|
|
@ -1,2 +0,0 @@
|
||||||
// Place all the behaviors and hooks related to the matching controller here.
|
|
||||||
// All this logic will automatically be available in application.js.
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
// Place all the styles related to the conferences controller here.
|
|
||||||
// They will automatically be included in application.css.
|
|
||||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
|
||||||
5
app/controllers/conference_controller.rb
Normal file
5
app/controllers/conference_controller.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
class ConferenceController < ApplicationController
|
||||||
|
def show
|
||||||
|
@conference = Conference.find_by_title(params[:conference_id])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
class ConferencesController < ApplicationController
|
|
||||||
def show
|
|
||||||
@conference = Conference.find_by_title(params[:format])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
module ConferencesHelper
|
|
||||||
end
|
|
||||||
4
app/views/conference/show.html.haml
Normal file
4
app/views/conference/show.html.haml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
.row
|
||||||
|
.col-md-12
|
||||||
|
%h1
|
||||||
|
= @conference.title
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
.row
|
|
||||||
.col-md-12
|
|
||||||
%h1
|
|
||||||
= @conference.title
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
= simple_format(conference.venue.description, class: 'lead')
|
= simple_format(conference.venue.description, class: 'lead')
|
||||||
.col-md-2
|
.col-md-2
|
||||||
.btn-group-vertical
|
.btn-group-vertical
|
||||||
= link_to "View Conference", conferences_show_path(conference.title), :class => " btn btn-default"
|
= link_to "View Conference", conference_show_path(conference.title), :class => " btn btn-default"
|
||||||
- if conference.registration_open?
|
- if conference.registration_open?
|
||||||
- if conference.user_registered?(current_user)
|
- if conference.user_registered?(current_user)
|
||||||
= link_to "Modify Registration", register_conference_path(conference.short_title), :class =>"btn btn-default"
|
= link_to "Modify Registration", register_conference_path(conference.short_title), :class =>"btn btn-default"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
Osem::Application.routes.draw do
|
Osem::Application.routes.draw do
|
||||||
|
|
||||||
get 'conferences/show'
|
|
||||||
|
|
||||||
devise_for :users, :controllers => { :registrations => :registrations }, :path => 'accounts'
|
devise_for :users, :controllers => { :registrations => :registrations }, :path => 'accounts'
|
||||||
|
|
||||||
|
|
@ -50,6 +49,7 @@ Osem::Application.routes.draw do
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :conference, :only => [] do
|
resources :conference, :only => [] do
|
||||||
|
get '/show' => 'conference#show'
|
||||||
resources :proposal do
|
resources :proposal do
|
||||||
resources :event_attachment, :controller => "event_attachments"
|
resources :event_attachment, :controller => "event_attachments"
|
||||||
put "/confirm" => "proposal#confirm"
|
put "/confirm" => "proposal#confirm"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe ConferencesController do
|
describe ConferenceController do
|
||||||
|
|
||||||
describe "GET 'show'" do
|
describe "GET 'show'" do
|
||||||
it "returns http success" do
|
it "returns http success" do
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
# Specs in this file have access to a helper object that includes
|
# Specs in this file have access to a helper object that includes
|
||||||
# the ConferencesHelper. For example:
|
# the ConferenceHelper. For example:
|
||||||
#
|
#
|
||||||
# describe ConferencesHelper do
|
# describe ConferenceHelper do
|
||||||
# describe "string concat" do
|
# describe "string concat" do
|
||||||
# it "concats two strings with spaces" do
|
# it "concats two strings with spaces" do
|
||||||
# expect(helper.concat_strings("this","that")).to eq("this that")
|
# expect(helper.concat_strings("this","that")).to eq("this that")
|
||||||
# end
|
# end
|
||||||
# end
|
# end
|
||||||
# end
|
# end
|
||||||
describe ConferencesHelper do
|
describe ConferenceHelper do
|
||||||
pending "add some examples to (or delete) #{__FILE__}"
|
pending "add some examples to (or delete) #{__FILE__}"
|
||||||
end
|
end
|
||||||
5
spec/views/conference/show.html.haml_spec.rb
Normal file
5
spec/views/conference/show.html.haml_spec.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
describe "conference/show.html.haml" do
|
||||||
|
pending "add some examples to (or delete) #{__FILE__}"
|
||||||
|
end
|
||||||
Loading…
Add table
Add a link
Reference in a new issue