Merge 116b862e98 into 740540de13
This commit is contained in:
commit
8b9b9decfd
8 changed files with 32 additions and 2 deletions
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[:id])
|
||||||
|
end
|
||||||
|
end
|
||||||
2
app/helpers/conference_helper.rb
Normal file
2
app/helpers/conference_helper.rb
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
module ConferenceHelper
|
||||||
|
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
|
||||||
|
|
@ -24,6 +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", conference_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,5 +1,4 @@
|
||||||
Osem::Application.routes.draw do
|
Osem::Application.routes.draw do
|
||||||
|
|
||||||
devise_for :users, :controllers => { :registrations => :registrations }, :path => 'accounts'
|
devise_for :users, :controllers => { :registrations => :registrations }, :path => 'accounts'
|
||||||
|
|
||||||
namespace :admin do
|
namespace :admin do
|
||||||
|
|
@ -51,7 +50,7 @@ Osem::Application.routes.draw do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :conference, :only => [] do
|
resources :conference, :only => [:show] do
|
||||||
resources :proposal do
|
resources :proposal do
|
||||||
resources :event_attachment, :controller => "event_attachments"
|
resources :event_attachment, :controller => "event_attachments"
|
||||||
patch "/confirm" => "proposal#confirm"
|
patch "/confirm" => "proposal#confirm"
|
||||||
|
|
|
||||||
2
config/secrets.yml
Normal file
2
config/secrets.yml
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
development:
|
||||||
|
secret_key_base: "12345"
|
||||||
12
spec/controllers/conference_controller_spec.rb
Normal file
12
spec/controllers/conference_controller_spec.rb
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
describe ConferenceController do
|
||||||
|
|
||||||
|
describe 'GET #show' do
|
||||||
|
it 'returns http success' do
|
||||||
|
get :show, :id => 'sample'
|
||||||
|
expect(response).to be_success
|
||||||
|
end
|
||||||
|
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