Integrate the splash page into the general layout

* Cleanup the CSS
* Fix more views then you have fingers and toes
* Introduce position(weight) for sponsor levels
* Fix bootstrap/datatable integration
This commit is contained in:
Henne Vogelsang 2014-11-14 11:58:36 +01:00
parent 7acd16f923
commit f2cdea4f1a
56 changed files with 1191 additions and 1266 deletions

View file

@ -111,6 +111,9 @@ gem 'daemons'
# to encapsulate money in objects
gem 'money-rails'
# for lists
gem 'acts_as_list'
# Use guard and spring for testing in development
group :development do
# rspec Guard rules

View file

@ -36,6 +36,8 @@ GEM
activerecord (>= 3.0)
activesupport (>= 3.0)
awesome_nested_set (>= 2.0)
acts_as_list (0.4.0)
activerecord (>= 3.0)
addressable (2.3.6)
ahoy_matey (1.0.0)
addressable
@ -166,10 +168,10 @@ GEM
i18n (0.6.11)
inversion (0.12.3)
loggability (~> 0.4)
jquery-datatables-rails (2.2.2)
jquery-datatables-rails (2.2.3)
jquery-rails
sass-rails
jquery-rails (3.1.0)
jquery-rails (3.1.2)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.1)
@ -193,7 +195,7 @@ GEM
open4
rake
mini_portile (0.6.0)
minitest (5.4.2)
minitest (5.4.3)
momentjs-rails (2.8.1)
railties (>= 3.1)
monetize (0.3.0)
@ -351,10 +353,10 @@ GEM
ruby-progressbar (1.5.1)
rubyzip (1.0.0)
sass (3.2.19)
sass-rails (4.0.3)
sass-rails (4.0.4)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2.0)
sprockets (~> 2.8, <= 2.11.0)
sass (~> 3.2.2)
sprockets (~> 2.8, < 2.12)
sprockets-rails (~> 2.0)
shoulda (3.5.0)
shoulda-context (~> 1.0, >= 1.0.1)
@ -371,7 +373,7 @@ GEM
spring (1.1.2)
spring-commands-rspec (1.0.2)
spring (>= 0.9.1)
sprockets (2.11.0)
sprockets (2.11.3)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
@ -417,6 +419,7 @@ DEPENDENCIES
active_model_serializers
activeuuid
acts_as_commentable_with_threading
acts_as_list
ahoy_matey
awesome_nested_set (~> 3.0.0.rc.5)
axlsx_rails

View file

@ -1,14 +1,11 @@
$(function () {
$(document).ready(function() {
$('#registrations-datatable').dataTable();
});
$(document).ready(function() {
$('#users-datatable').dataTable();
});
$(document).ready(function() {
$('#events-datatable').dataTable();
});
$(document).ready(function() {
$('#buyers-datatable').dataTable();
$('.datatable').DataTable({
// ajax: ...,
autoWidth: false,
pagingType: 'full_numbers'
});
});
});

View file

@ -8,6 +8,7 @@
*= require osem-schedule-print
*= require osem-dashboard
*= require osem-fonts
*= require osem-splash
*= require font-awesome
*= require bootstrap-markdown.min
*= require bootstrap-datetimepicker

View file

@ -0,0 +1,59 @@
.flex-col {
display: flex;
display: -webkit-flex;
flex: 1 100%;
flex-flow: column nowrap;
}
.flex-grow {
display: flex;
-webkit-flex: 2;
flex: 2;
}
.row-flex, .row-flex > div[class*='col-'] {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
flex:1 1 auto;
}
.row-flex-wrap {
-webkit-flex-flow: row wrap;
align-content: flex-start;
flex:0;
}
.row-flex > div[class*='col-'], .container-flex > div[class*='col-'] {
margin:-.2px; /* hack adjust for wrapping */
}
.nav-header-bigger {
font-size: 15px;
font-weight: bold;
text-transform: uppercase;
}
.mySidebar {
.fa {
margin-right: 10px;
}
hr {
margin: 1px;
}
}
.dl-horizontal dt { white-space: normal; }
.table20 {
width: 20%;
}
@media only screen and (max-width: 768px) {
.mySidebar ul.subNav {
display: block;
}
}

View file

@ -12,3 +12,48 @@
font-size: 5em;
}
}
.dashbox {
padding-top: 20px;
padding-bottom: 20px;
}
.dashbox .icon {
padding-left: 8px;
display: block;
font-size: 3.8em;
}
.dashbox label {
display: block;
font-size: 1.1em;
}
.todolist-missing span {
color: #ff0000;
}
.todolist-ok {
text-decoration: line-through;
}
.todolist-ok span {
color: #02A10F;
}
.top-submitter img {
margin: 0 auto;
}
#doughnut .tab-content {
padding-bottom: 20px;
}
#submissions {
padding-bottom: 20px;
}
.conferenceCheckboxes div {
display: inline-block;
padding: 0px 10px 0px 0px;
}

View file

@ -0,0 +1,124 @@
#splash {
section {
padding-top: 60px;
padding-bottom: 60px;
}
section:nth-child(even) {
background: none repeat scroll 0 0 #e0e0e0;
color: #555;
}
section:nth-child(odd) {
background: none repeat scroll 0 0 #ffffff;
color: #7b7b7b;
}
}
#splash-banner{
background: none;
background-repeat: no-repeat;
background-position: center center;
width: 100%;
background-size: cover;
min-height: 700px;
margin-top: -10px;
.container {
padding-top: 60px;
}
h1, h3{
color:#3399CC;
}
h3{
font-family: 'Coustard', serif;
font-weight: 600;
text-shadow: 0.2em 0.2em 0 #4A4F6A;
}
h1{
font-size: 5em;
font-weight: 700;
text-shadow:0.04em 0.04em 0 black;
}
p {
color: #fff;
font-weight: 500;
}
}
#program {
.tracks:hover{
background-color: white;
}
}
#callforpapers {
.timer-box{
width: 130px;
margin: 35px 24px 20px 0;
border-radius: 50%;
border:4px solid #989797;
}
#cfp-date{
font-size: 40px;
color: #ff6633;
}
}
#location {
background-repeat: no-repeat;
background-position: center center;
width: 100%;
background-size: cover;
min-height: 500px;
h1,h2,p{
color: #fff;
}
h1,h2,li,p{
text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.6);
font-weight: 400;
}
}
#social-media{
i{
color: #4a4a4a;
}
i:hover{
color: #16a085;
}
}
.scroll-top-wrapper {
position: fixed;
opacity: 0;
visibility: hidden;
overflow: hidden;
text-align: center;
z-index: 99999999;
background-color: #424242;
width: 50px;
height: 48px;
line-height: 48px;
right: 30px;
bottom: 30px;
padding-top: 2px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
-webkit-transition: all 0.5s ease-in-out;
-moz-transition: all 0.5s ease-in-out;
-ms-transition: all 0.5s ease-in-out;
-o-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
i.fa {
line-height: inherit;
}
&.show {
visibility:visible;
cursor:pointer;
opacity: 1.0;
}
a {
color: white;
}
}

View file

@ -17,158 +17,11 @@ body {
/* Set the fixed height of the footer here */
height: 60px;
background-color: #f5f5f5;
}
.container .text-muted {
margin: 20px 0;
}
#footer > .container {
.container {
padding: 15px;
}
.nav-header-bigger {
font-size: 15px;
font-weight: bold;
text-transform: uppercase;
}
.fa {
margin-right: 10px;
}
.mySidebar hr {
margin: 1px;
}
@media only screen and (max-width: 768px) {
.mySidebar ul.subNav {
display: block;
}
}
.conferenceCheckboxes div {
display: inline-block;
padding: 0px 10px 0px 0px;
}
.dashbox {
padding-top: 20px;
padding-bottom: 20px;
}
.dashbox .icon {
padding-left: 8px;
display: block;
font-size: 3.8em;
}
.dashbox label {
display: block;
font-size: 1.1em;
}
.todolist-missing span {
color: #ff0000;
}
.todolist-ok {
text-decoration: line-through;
}
.todolist-ok span {
color: #02A10F;
}
.top-submitter img {
margin: 0 auto;
}
#doughnut .tab-content {
padding-bottom: 20px;
}
#submissions {
padding-bottom: 20px;
}
.banner-disp{
background-repeat: no-repeat;
background-position: center center;
width: 100%;
background-size: cover;
-webkit-background-size:cover;
}
#location .with-background {
min-height: 500px;
}
#splash-banner .with-background{
min-height: 700px;
}
.location-links li{
display: inline-block;
margin-right: 2em;
}
.banner-text{
padding-top: 10%;
}
.pad{
padding-top: 35px;
padding-bottom: 35px;
}
.dl-horizontal dt { white-space: normal; }
.equal, .equal > div[class*='col-'] {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
flex:1 0 auto;
}
.row-flex, .row-flex > div[class*='col-'] {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
flex:1 1 auto;
}
.row-flex-wrap {
-webkit-flex-flow: row wrap;
align-content: flex-start;
flex:0;
}
.row-flex > div[class*='col-'], .container-flex > div[class*='col-'] {
margin:-.2px; /* hack adjust for wrapping */
}
.container-flex > div[class*='col-'] div,.row-flex > div[class*='col-'] div {
width:100%;
}
.flex-col {
display: flex;
display: -webkit-flex;
flex: 1 100%;
flex-flow: column nowrap;
}
.flex-grow {
display: flex;
-webkit-flex: 2;
flex: 2;
}
.table20 {
width: 20%;
.nav-tabs {
margin-bottom: 15px;
}

View file

@ -1,265 +0,0 @@
@font-face {
font-family: 'Lato';
font-style: normal;
font-weight: 300;
src: local('Lato Light'), local('Lato-Light'), url("fonts/Lato-Light.woff") format('woff');
}
@font-face {
font-family: 'Lato';
font-style: normal;
font-weight: 400;
src: local('Lato Regular'), local('Lato-Regular'), url("fonts/Lato-Regular.woff") format('woff');
}
@font-face {
font-family: 'Lato';
font-style: normal;
font-weight: 700;
src: local('Lato Bold'), local('Lato-Bold'), url("fonts/Lato-Bold.woff") format('woff');
}
@font-face {
font-family: 'Lato';
font-style: italic;
font-weight: 300;
src: local('Lato Light Italic'), local('Lato-LightItalic'), url("fonts/Lato-LightItalic.woff") format('woff');
}
@font-face {
font-family: 'Lato';
font-style: italic;
font-weight: 400;
src: local('Lato Italic'), local('Lato-Italic'), url("fonts/Lato-Italic.woff") format('woff');
}
@font-face {
font-family: 'Raleway';
font-style: normal;
font-weight: 300;
src: local('Raleway Light'), local('Raleway-Light'), url("fonts/Raleway-Light.woff") format('woff');
}
@font-face {
font-family: 'Raleway';
font-style: normal;
font-weight: 400;
src: local('Raleway'), url("fonts/Raleway.woff") format('woff');
}
@font-face {
font-family: 'Raleway';
font-style: normal;
font-weight: 700;
src: local('Raleway Bold'), local('Raleway-Bold'), url("fonts/Raleway-Bold.woff") format('woff');
}
@font-face {
font-family: 'Coustard';
font-style: normal;
font-weight: 400;
src: local('Coustard'), url("fonts/Coustard.woff") format('woff');
}
@font-face {
font-family: 'Coustard';
font-style: normal;
font-weight: 900;
src: local('Coustard-Black'), url("fonts/Coustard-Black.woff") format('woff');
}
.splash {
background-color: #f2f2f2;
font-family: 'Lato';
font-weight: 300;
font-size: 16px;
color: #555;
margin-top: -10px;
-webkit-font-smoothing: antialiased;
/*-webkit-overflow-scrolling: touch;*/
/* Titles */
h1, h2, h3, h4, h5, h6 {
font-family: "Raleway";
font-weight: 300;
color: #333;
}
/* Links */
a {
color: #f85c37;
word-wrap: break-word;
-webkit-transition: color 0.1s ease-in, background 0.1s ease-in;
-moz-transition: color 0.1s ease-in, background 0.1s ease-in;
-ms-transition: color 0.1s ease-in, background 0.1s ease-in;
-o-transition: color 0.1s ease-in, background 0.1s ease-in;
transition: color 0.1s ease-in, background 0.1s ease-in;
}
a:hover,
a:focus {
color: #7b7b7b;
text-decoration: none;
outline: 0;
}
a:before,
a:after {
-webkit-transition: color 0.1s ease-in, background 0.1s ease-in;
-moz-transition: color 0.1s ease-in, background 0.1s ease-in;
-ms-transition: color 0.1s ease-in, background 0.1s ease-in;
-o-transition: color 0.1s ease-in, background 0.1s ease-in;
transition: color 0.1s ease-in, background 0.1s ease-in;
}
hr {
display: block;
height: 1px;
border: 0;
border-top: 1px solid #ccc;
margin: 1em 0;
padding: 0;
}
/* ==========================================================================
Wrap Sections
========================================================================== */
#splash-banner{
h1, h3{
color:#3399CC;
}
h3{
font-family: 'Coustard', serif;
font-weight: 600;
text-shadow: 0.2em 0.2em 0 #4A4F6A;
}
h1{
font-size: 5em;
font-weight: 700;
text-shadow:0.04em 0.04em 0 black;
}
p {
color: #fff;
font-weight: 500;
}
}
#program{
.tracks:hover{
background-color: white;
}
}
#callforpapers{
.timer-box{
width: 130px;
margin: 35px 24px 20px 0;
border-radius: 50%;
border:4px solid #989797;
}
#cfp-date{
font-size: 40px;
font-family: 'Coustard', serif;
color: #ff6633;
}
}
#registration{
background-color: #e0e0e0;
}
#sponsors{
h2,h3,h4{
color: #fff;
font-weight: 400;
}
color: #fff;
background-color: #343b3d;
}
#social-media{
i{
color: #4a4a4a;
}
i:hover{
color: #16a085;
}
}
#location{
h1,h2,p{
color: #fff;
}
h1,h2,li,p{
text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.6);
font-weight: 400;
}
}
#gallery{
min-height: 600px;
.item{
img {
height: 600px;
background-repeat: no-repeat;
background-position: center center;
width: 100%;
background-size: cover;
-webkit-background-size:cover;
}
}
.modal-body{
i{
margin-top: 35%;
}
}
#carousel-example-generic{
visibility: hidden;
}
}
.scroll-top-wrapper {
position: fixed;
opacity: 0;
visibility: hidden;
overflow: hidden;
text-align: center;
z-index: 99999999;
background-color: #424242;
width: 50px;
height: 48px;
line-height: 48px;
right: 30px;
bottom: 30px;
padding-top: 2px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
-webkit-transition: all 0.5s ease-in-out;
-moz-transition: all 0.5s ease-in-out;
-ms-transition: all 0.5s ease-in-out;
-o-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
i.fa {
line-height: inherit;
}
&.show {
visibility:visible;
cursor:pointer;
opacity: 1.0;
}
a {
color: white;
}
}
}

View file

@ -1,22 +1,65 @@
module Admin
class SponsorshipLevelsController < Admin::BaseController
load_and_authorize_resource :conference, find_by: :short_title
authorize_resource through: :conference
load_and_authorize_resource through: :conference
def index
authorize! :index, SponsorshipLevel.new(conference_id: @conference.id)
end
def update
if @conference.update_attributes(params[:conference])
redirect_to(admin_conference_sponsorship_levels_path(
conference_id: @conference.short_title),
notice: 'Sponsorship levels were successfully updated.')
def edit; end
def new
@sponsorship_level = @conference.sponsorship_levels.new
end
def create
@sponsorship_level = @conference.sponsorship_levels.new(sponsorship_level_params)
if @sponsorship_level.save
redirect_to(admin_conference_sponsorship_levels_path(conference_id: @conference.short_title),
notice: 'Sponsorship level successfully created.')
else
flash[:error] = "Creating Sponsorship Level failed: #{@sponsorship_level.errors.full_messages.join('. ')}."
render :new
end
end
def update
if @sponsorship_level.update_attributes(sponsorship_level_params)
redirect_to(admin_conference_sponsorship_levels_path(
conference_id: @conference.short_title),
alert: 'Sponsorship levels update failed')
end
notice: 'Sponsorship level successfully updated.')
else
flash[:error] = "Update Sponsorship level failed: #{@sponsorship_level.errors.full_messages.join('. ')}."
render :edit
end
end
def destroy
if @sponsorship_level.destroy
redirect_to(admin_conference_sponsorship_levels_path(conference_id: @conference.short_title),
notice: 'Sponsorship level successfully deleted.')
else
redirect_to(admin_conference_sponsorship_levels_path(conference_id: @conference.short_title),
error: 'Deleting sponsorship level failed! ' \
"#{@sponsorship_level.errors.full_messages.join('. ')}.")
end
end
def up
@sponsorship_level.move_higher
redirect_to(admin_conference_sponsorship_levels_path(conference_id: @conference.short_title))
end
def down
@sponsorship_level.move_lower
redirect_to(admin_conference_sponsorship_levels_path(conference_id: @conference.short_title))
end
private
def sponsorship_level_params
params[:sponsorship_level]
end
end
end

View file

@ -57,7 +57,7 @@ class Conference < ActiveRecord::Base
has_many :participants, through: :registrations, source: :user
has_many :vdays, dependent: :destroy
has_many :vpositions, dependent: :destroy
has_many :sponsorship_levels, dependent: :destroy
has_many :sponsorship_levels, -> { order('position ASC') }, dependent: :destroy
has_many :sponsors, dependent: :destroy
has_many :photos, dependent: :destroy
has_many :targets, dependent: :destroy

View file

@ -2,5 +2,6 @@ class SponsorshipLevel < ActiveRecord::Base
attr_accessible :title, :conference_id
validates_presence_of :title
belongs_to :conference
acts_as_list scope: :conference
has_many :sponsors
end

View file

@ -6,7 +6,7 @@
Events
- if @events
= "(#{@events.length})"
%table.table.table-striped.table-bordered.table-hover#events-datatable
%table.table.table-striped.table-bordered.table-hover.datatable
%thead
%th
%b ID

View file

@ -3,7 +3,7 @@
- if @conference.rooms.any?
.row
.col-md-12
%table.table
%table.table#rooms
%thead
%th #
%th Name

View file

@ -0,0 +1,2 @@
= f.input :title
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

@ -1,6 +0,0 @@
<div class="nested-fields">
<%= f.inputs do %>
<%= f.input :title %>
<%= remove_association_link :sponsorship_level, f %>
<% end %>
</div>

View file

@ -0,0 +1,8 @@
%h1 Editing Sponsorship Level
.row
.col-md-8
= semantic_form_for @sponsorship_level, url: admin_conference_sponsorship_level_path(conference_id: @conference.short_title, id: @sponsorship_level.id) do |f|
= render 'form', f: f
= link_to 'Back', admin_conference_sponsorship_levels_path

View file

@ -1,4 +1,29 @@
.col-md-9
= semantic_form_for(@conference, :url => admin_conference_sponsorship_level_path(@conference.short_title, @conference.sponsorship_levels)) do |f|
= dynamic_association :sponsorship_levels, "Sponsorship Levels", f
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
%h1 Sponsorship Levels
- if @conference.sponsorship_levels.any?
.row
.col-md-12
%table.table#sponsorship_levels
%thead
%th Title
%th Position
%th Actions
%tbody
- @conference.sponsorship_levels.each_with_index do |sponsorship_level, index|
%tr
%td
= sponsorship_level.title
%td
= sponsorship_level.position
.btn-group-vertical{role: "group"}
= link_to(up_admin_conference_sponsorship_level_path(@conference.short_title, sponsorship_level.id), method: :patch, class: 'btn btn-default btn-xs') do
%i.fa.fa-chevron-up
= link_to(down_admin_conference_sponsorship_level_path(@conference.short_title, sponsorship_level.id), method: :patch, class: 'btn btn-default btn-xs') do
%i.fa.fa-chevron-down
%td
= link_to 'Edit', edit_admin_conference_sponsorship_level_path(@conference.short_title, sponsorship_level.id),
method: :get, class: 'btn btn-primary'
= link_to 'Delete', admin_conference_sponsorship_level_path(@conference.short_title, sponsorship_level.id),
method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete the sponsorship level #{sponsorship_level.title}?" }
= link_to 'New Sponsorship Level', new_admin_conference_sponsorship_level_path(@conference.short_title), class: 'btn btn-success'

View file

@ -0,0 +1,7 @@
%h1 New Sponsorship Level
.row
.col-md-8
= semantic_form_for @sponsorship_level, url: admin_conference_sponsorship_levels_path(conference_id: @conference.short_title) do |f|
= render 'form', f: f
= link_to 'Back', admin_conference_sponsorship_levels_path

View file

@ -7,7 +7,7 @@
= markdown(@ticket.description)
%h4 The following persons bought this ticket:
%table.table#buyers-datatable
%table.table.table-striped.table-bordered.table-hover.datatable
%thead
%th #
%th Name

View file

@ -1,12 +1,14 @@
.row
.col-md-12
.page-header
%h2
Users
- if @users
= "(#{@users.length})"
= link_to 'New User', new_admin_user_path, class: 'btn btn-success pull-right'
%table.table.table-striped.table-bordered.table-hover#users-datatable
.row
.col-md-12
%table.table.table-striped.table-bordered.table-hover.datatable
%thead
%th ID
%th State

View file

@ -1,8 +1,10 @@
%h1 Editing Commercial
.container
.row
.col-md-8
.col-md-12
.page-header
%h1 Editing Commercial
.row
.col-md-12
= semantic_form_for @commercial, url: conference_proposal_commercial_path(conference_id: @conference.short_title, proposal_id: @event.id, id: @commercial.id) do |f|
= render 'form', f: f
= link_to 'Back', edit_conference_proposal_path(conference_id: @conference.short_title, id: @event.id)

View file

@ -1,7 +1,10 @@
.container
.row
.col-md-12
.page-header
%h1 New Commercial
.row
.col-md-8
.col-md-12
= semantic_form_for @commercial, url: conference_proposal_commercials_path(conference_id: @conference.short_title, proposal_id: @event.id) do |f|
= render 'form', f: f
= link_to 'Back', edit_conference_proposal_path(conference_id: @conference.short_title, id: @event.id)

View file

@ -2,24 +2,24 @@
%li
%a.smoothscroll{ href: '#callforpapers' } Call For Papers
%div.container#callforpapers.text-center
%div.row
%div.col-md-12
.container
.row
.col-md-12.text-center
%h1
Call For Papers
- if !@conference.call_for_papers.description.blank?
.lead
= markdown(@conference.call_for_papers.description)
- if !@conference.call_for_papers.start_date.blank? && !@conference.call_for_papers.end_date.blank?
.lead Proposals will be accepted between
#cfp-date
= date_string(@conference.call_for_papers.start_date, @conference.call_for_papers.end_date)
- if @conference.cfp_open?
- if @conference.call_for_papers.end_date.to_time < Time.now
.lead Today is the last day. Hurry Up!
- else
.row
.col-md-8.col-md-offset-3
.col-md-12.text-center
.lead
= link_to "Submit Your Proposals Today", conference_proposal_index_path(@conference.short_title), class: 'btn btn-info', target: '_blank'
- if !@conference.call_for_papers.start_date.blank? && !@conference.call_for_papers.end_date.blank?
%p
Proposals will be accepted between
%p#cfp-date
= date_string(@conference.call_for_papers.start_date, @conference.call_for_papers.end_date)
.row
.col-md-8.col-md-offset-3.text-center
%div.col-md-2.timer-box
%h2#days
.lead Days
@ -32,11 +32,6 @@
%div.col-md-2.timer-box
%h2#seconds
.lead Seconds
.row
.lead
= link_to "Submit Your Proposals Today", conference_proposal_index_path(@conference.short_title), class: 'btn btn-info', target: '_blank'
-else
%h3 Call for Papers is currently closed!
:javascript
$( document ).ready(function(){

View file

@ -1,11 +0,0 @@
%div.row.text-center
%div.col-md-12
%h3 Keynote Speakers
- @keynote_speakers.each do |k|
%div{ class: (@keynote_speakers.count.to_i <= 2 ? "col-md-#{12/@keynote_speakers.count.to_i}" : "col-md-4") }
= image_tag(k.gravatar_url(size: '80'), class: 'img-circle') unless k.gravatar_url.blank?
%h4
= k.name
-unless k.biography.blank?
%p
= k.biography

View file

@ -2,25 +2,19 @@
%li
%a.smoothscroll{ href: '#location' } Location
%div.banner-disp{ style: ("background-image: url(#{@conference.venue.photo})" unless @conference.venue.photo.blank?), class:('with-background' unless @conference.venue.photo.blank?) }
%div.container.text-center
.div.row.col-md-12
.container
.row
.col-md-12.text-center
- unless @conference.venue.name.blank?
%h1
%strong #{ @conference.venue.name }
- unless @conference.venue.address.blank?
= link_to("http://maps.google.com/maps?q=#{@conference.venue.address}") do
%h2
%strong #{ @conference.venue.address }
#{ @conference.venue.address }
- unless @conference.venue.description.blank?
.lead
= markdown(@conference.venue.description)
%ul.location-links
- unless @conference.venue.address.blank?
%li
%b
= link_to 'View in Google Maps', "http://maps.google.com/maps?q=#{@conference.venue.address}", target: '_blank'
- unless @conference.venue.website.blank?
%li
%b
= link_to 'Visit Venue Website', @conference.venue.website, target: '_blank'
%p.lead
= link_to(@conference.venue.website, @conference.venue.website)

View file

@ -1,10 +1,10 @@
%div.container.text-center
%h2 Lodging
-unless @conference.splashpage.lodging_description.blank?
.lead
= markdown(@conference.splashpage.lodging_description)
%div.row.text-center
.container
.row
.col-md-12.text-center
%h2 Accommodation Deals
%p.lead
We have prepared affordable accommodation deals for your visit.
.row
- @conference.venue.lodgings.each do |r|
%div{ class: (@conference.venue.lodgings.count.to_i <= 2 ? "col-md-#{12/@conference.venue.lodgings.count.to_i}" : "col-md-4") }
.div.thumbnail

View file

@ -1,22 +1,36 @@
= content_for :splash_nav do
%li
%a.smoothscroll{ href: '#program' } Program
=link_to('#program', class: 'smoothscroll') do
Program
%div.container.text-center
%div.row
%div.col-md-12
.container
.row
.col-md-12.text-center
%h1 Program
- if @conference.splashpage and @conference.splashpage.include_tracks
.row
.col-md-12
- @conference.tracks.each do |t|
.tracks{ class: (@conference.tracks.count.to_i <= 2 ? "col-md-#{12/@conference.tracks.count.to_i}" : "col-md-4") }
%h4.text-center
= t.name
%p
= markdown(t.description)
- if @conference.call_for_papers and @conference.call_for_papers.schedule_public
%span You can check out our
%span
= link_to 'Schedule', conference_schedule_path(@conference.short_title), target: '_blank'
- else
%span The schedule is not ready yet. Stay tuned!
- unless @keynote_speakers.blank?
= render 'keynote_speakers'
-unless @conference.tracks.blank?
- if @conference.splashpage.include_tracks
= render 'tracks'
.row
.col-md-12
%p.text-center
Check out our
= link_to 'Schedule', conference_schedule_path(@conference.short_title)
- if !@keynote_speakers.blank?
%div.row.text-center
%div.col-md-12
%h3 Keynote Speakers
- @keynote_speakers.each do |k|
%div{ class: (@keynote_speakers.count.to_i <= 2 ? "col-md-#{12/@keynote_speakers.count.to_i}" : "col-md-4") }
= image_tag(k.gravatar_url(size: '80'), class: 'img-circle') unless k.gravatar_url.blank?
%h4
= k.name
-unless k.biography.blank?
%p
= k.biography

View file

@ -1,22 +1,16 @@
= content_for :splash_nav do
%li
%a.smoothscroll{ href: '#registration' } Registration
%div.container.text-center
%div.row
.container
.row
.col-md-12.text-center
%h1 Registration
- if !@conference.splashpage.registration_description.blank?
.lead
= markdown(@conference.splashpage.registration_description)
- if @conference.registration_dates_given?
-if @conference.registration_period.end_date >= Date.today
%h4 Registration period #{ date_string(@conference.registration_period.start_date, @conference.registration_period.end_date) }
-else
%h4 Registration is Closed, it was from #{ date_string(@conference.registration_period.start_date, @conference.registration_period.end_date) }
- if @conference.registration_open?
- if current_user && @conference.user_registered?(current_user)
= link_to "Modify Registration for #{@conference.short_title}", edit_conference_conference_registrations_path(@conference.short_title), class: "btn btn-success btn-lg", target: '_blank'
- else
= link_to "Register for #{@conference.short_title}", new_conference_conference_registrations_path(@conference.short_title), class: "btn btn-success btn-lg", target: '_blank'
- if @conference.tickets.any?
- if @conference.splashpage.include_tickets
= render 'tickets'
%p.lead
Going to
= @conference.short_title
is free of charge. We only ask you to
= link_to "register yourself", new_conference_conference_registrations_path(@conference.short_title)
until
= @conference.registration_period.end_date

View file

@ -1,24 +0,0 @@
= content_for :splash_nav do
%li
%a.smoothscroll{ href: '#sponsors' } Sponsors
%div.container#sponsors.text-center
%div.row
%div.col-md-12
%h2 Sponsors
-if !@conference.splashpage.sponsor_description.blank?
.lead
= markdown(@conference.splashpage.sponsor_description)
-if @conference.contact && @conference.contact.sponsor_email.present?
%h3= mail_to "#{ @conference.contact.sponsor_email }", 'Become a Sponsor'
- if !@conference.sponsorship_levels.blank?
- @conference.sponsorship_levels.each do |l|
- if !l.sponsors.blank?
%div.row.text-center
%h4 #{l.title}
- l.sponsors.each_with_index do |r,index|
%div.text-center{ class: (l.sponsors.count.to_i <= 2 ? "col-md-#{12/l.sponsors.count.to_i}" : "col-md-4") }
- if !r.logo.blank?
= link_to image_tag(r.logo(:large), alt: "#{r.name} Logo", title: "#{r.description}"), "http://#{r.website_url}"
- unless index == 0
- if index%2 == 0
%div.clearfix.visible-md.visible-lg

View file

@ -0,0 +1,33 @@
= content_for :splash_nav do
%li
%a.smoothscroll{ href: '#sponsors' } Sponsors
.container
.row
.col-md-12
%h2 Sponsors
%p.lead
whom without,
= @conference.short_title
wouldn't be possible!
- @conference.sponsorship_levels.each do |sponsorship_level|
-if sponsorship_level.sponsors.any?
.row
.col-md-12.text-center
%h3
= sponsorship_level.title
- sponsorship_level.sponsors.each_slice(3) do |slice|
.row
- slice.each do |sponsor|
.col-md-4
= link_to("http://#{sponsor.website_url}", class: 'thumbnail') do
= image_tag(sponsor.logo(:large), alt: "#{sponsor.name} Logo", title: "#{sponsor.description}")
-if @conference.contact and !@conference.contact.sponsor_email.blank?
.row
.col-md-12
%p.text-muted.text-center
%small
Want to sponsor #{@conference.short_title}?
= link_to("mailto: #{@conference.contact.sponsor_email}?subject=#{@conference.short_title}%20Sponsorship") do
Please contact us!

View file

@ -1,15 +1,21 @@
%div.row
%h3 Tickets
-if @conference.splashpage.ticket_description.present?
.lead
= markdown(@conference.splashpage.ticket_description)
- @conference.tickets.each do |s|
%div.col-md-6
.container
.row
.col-md-12.text-center
%h1
Support
=@conference.short_title
%p.lead
To support our event you can purchase tickets
.row
- @conference.tickets.each do |ticket|
%div{ class: (@conference.tickets.count <= 2 ? "col-md-#{12/@conference.tickets.count}" : "col-md-4") }
- if ticket.title.present?
%h4 #{ ticket.title }
%h4.text-center
=ticket.title
- if ticket.description.present?
.lead
= markdown(ticket.description)
%div.btn-group
= link_to "Buy Ticket", conference_tickets_path(@conference.short_title), class: 'btn btn-success'
= button_tag "#{humanized_money_with_symbol ticket.price}", class: 'btn btn-success'
.text-center
.btn-group
= link_to(conference_tickets_path(@conference.short_title), class: 'btn btn-success') do
Buy Ticket
= "#{humanized_money_with_symbol ticket.price}"

View file

@ -1,9 +0,0 @@
%div.row.text-center
%div.col-md-12
%h2 Tracks
- @conference.tracks.each do |t|
%div.tracks{ class: (@conference.tracks.count.to_i <= 2 ? "col-md-#{12/@conference.tracks.count.to_i}" : "col-md-4") }
%h4
= t.name
%p
= markdown(t.description)

View file

@ -1,60 +1,51 @@
= content_for :splash do
#splash
- if @conference.splashpage
.splash
- if @conference.splashpage.include_banner?
%section{ id: 'splash-banner' }
%div.banner-disp{ style: ("background-image: url(#{@conference.splashpage.banner_photo})" unless @conference.splashpage.banner_photo.blank?), class:('with-background' unless @conference.splashpage.banner_photo.blank?) }
%div.container.text-center.banner-text
#splash-banner{ style: ("background-image: url(#{@conference.splashpage.banner_photo})" unless @conference.splashpage.banner_photo.blank?) }
.container
.row
%h1
= @conference.title
.col-md-12.text-center
%h1= @conference.title
- if @conference.start_date && @conference.end_date
.row
%h3
= date_string(@conference.start_date, @conference.end_date)
%h3= date_string(@conference.start_date, @conference.end_date)
- unless @conference.splashpage.banner_description.blank?
.row-fluid
.col-md-12.lead
.lead
%p.lead
= markdown(@conference.splashpage.banner_description)
-unless @conference.photos.blank?
= link_to 'Gallery', gallery_photos_conference_path(@conference.short_title), class: 'btn btn-primary btn-lg', id: 'gallery-btn', remote: true
= render 'gallery'
- if @conference.splashpage.include_program
%section{ id: 'program' }
.pad
%section#program
= render 'program'
- if @conference.splashpage.include_registrations
%section{ id: 'registration' }
.pad
= render 'registration'
-unless @conference.call_for_papers.blank?
- if @conference.call_for_papers.include_cfp_in_splash?
%section{ id:'callforpapers' }
.pad
- if @conference.cfp_open? and @conference.call_for_papers.include_cfp_in_splash?
%section#callforpapers
= render 'call_for_papers'
-unless @conference.venue.blank?
- if @conference.splashpage.include_venue
%section{ id: 'location' }
.pad
- if @conference.venue and @conference.splashpage.include_venue
#location{ style: ("background-image: url(#{@conference.venue.photo})" unless @conference.venue.photo.blank?) }
= render 'location'
- unless @conference.venue.lodgings.empty?
- if @conference.splashpage.include_lodgings
- if @conference.registration_open? and @conference.splashpage.include_registrations
%section#registration
= render 'registration'
- if @conference.tickets.any? and @conference.splashpage.include_tickets
%section#tickets
= render 'tickets'
- if @conference.venue.lodgings.any? and @conference.splashpage.include_lodgings
%section#lodging
= render 'lodging'
- if @conference.splashpage.include_sponsors
%section{ id: 'sponsors' }
.pad
= render 'sponsor'
- if @conference.sponsors.any? and @conference.splashpage.include_sponsors
%section#sponsors
= render 'sponsors'
- if @conference.splashpage.include_social_media
%section{ id: 'social-media' }
.pad
%section#social-media
= render 'social_media'
// grmbl
= render 'footer'

View file

@ -1,3 +1,4 @@
.container
.row
.col-md-12
= semantic_form_for(@registration, url: conference_conference_registrations_path(@conference.short_title)) do |f|

View file

@ -1,50 +1,49 @@
.container
.row
.col-md-12
.page-header
%h1
= @conference.title
%small
= date_string(@conference.start_date, @conference.end_date)
.row
.col-md-6
- if @conference.venue.name and @conference.venue.website and @conference.venue.address
%p
%small
at
= link_to @conference.venue.name, @conference.venue.website
,
\#{link_to @conference.venue.address, "http://maps.google.com/maps?q=#{@conference.venue.address}"}
.row
= link_to @conference.venue.address, "http://maps.google.com/maps?q=#{@conference.venue.address}"
.col-md-4
.row
- if @conference.contact.facebook.present?
%div.col-md-3
= link_to "#{ @conference.contact.facebook }" do
%i.fa.fa-facebook-square.fa-2x
%i.fa.fa-facebook-square
- if @conference.contact.twitter.present?
%div.col-md-3
= link_to "#{ @conference.contact.twitter }" do
%i.fa.fa-twitter.fa-2x
%i.fa.fa-twitter
- if @conference.contact.instagram.present?
%div.col-md-3
= link_to "#{ @conference.contact.instagram }" do
%i.fa.fa-instagram.fa-2x
%i.fa.fa-instagram
- if @conference.contact.googleplus.present?
%div.col-md-3
= link_to "#{ @conference.contact.googleplus }" do
%i.fa.fa-google-plus-square.fa-2x
%br
%i.fa.fa-google-plus-square
.row
.col-md-12
- if @conference.tickets.any?
%h3
Tickets
- if current_user.tickets.any?
%p
You have already purchased the following tickets:
You have purchased the following tickets:
= render partial: 'tickets_bought', locals: { tickets: current_user.tickets }
- else
= render partial: 'tickets', locals: { tickets: @conference.tickets }
%p
If you would like to buy more tickets, please click
= link_to 'here', conference_tickets_path(@conference.short_title)
= render partial: 'tickets_bought', locals: { tickets: current_user.tickets }
- else
= render partial: 'tickets', locals: { tickets: @conference.tickets }
%br
.row
.col-md-12
- if @conference.speakers.confirmed.any?
%h3
= pluralize(@conference.speakers.confirmed.count, 'Speaker')
@ -60,8 +59,8 @@
.col-md-9
%h4
= speaker.name
%hr
.row
.col-md-12
- if @conference.events.confirmed.any?
%h3
= pluralize(@conference.events.confirmed.count, 'Event')
@ -73,8 +72,8 @@
%strong
presented by
= event.speaker_names
%hr
.row
.col-md-12
- if @conference.participants.any?
%h3
= pluralize(@conference.participants.count, 'Participant')
@ -85,25 +84,21 @@
= image_tag(participant.gravatar_url(size: '25'),
title: "Yo #{participant.name}!",
alt: '', 'class' => 'img-circle img-responsive text-center')
%hr
.row
.col-md-12
- if @registration
%h2
Congratulations! You are now registered for
= "#{@conference.title}!"
- if @conference.questions.any?
%h3 Your answers to the registrations questions are:
- @conference.questions.each do |q|
%p
%b Question:
= q.title
%b Your Answer:
- @registration.qanswers.where(:question_id => q.id).each do |qa|
= qa.answer.title
%br
- if @workshops.any?
%h3 You are registered for the following workshops:
%ul.list-unstyled
@ -114,8 +109,6 @@
%strong
presented by
= workshop.speaker_names
%br
%div
= link_to 'Modify your Registration', edit_conference_conference_registrations_path(@conference.short_title), class: 'btn btn-success'
= link_to 'Unregister', conference_conference_registrations_path(@conference.short_title),

View file

@ -1,8 +1,11 @@
.container
.row
.col-md-12
.page-header
%h1 Edit your Account
.row
.col-md-12
= semantic_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
= f.inputs name: 'Account' do
= f.input :username, required: false, input_html: { autocomplete: 'off' }
= f.input :email, required: false, input_html: { autocomplete: 'off' }
= f.input :password, hint: "(Leave blank if you don't want to change it)", input_html: { autocomplete: 'off' }

View file

@ -1,3 +1,4 @@
.container
.row
.col-md-6.col-md-offset-3
.panel.panel-default

View file

@ -100,7 +100,7 @@
%ul
- if can? :update, @conference.sponsorship_levels.build
%li{:class=> "#{active_nav_li(admin_conference_sponsorship_levels_path(@conference.short_title))}" }
= link_to 'Sponsorship', admin_conference_sponsorship_levels_path(@conference.short_title)
= link_to 'Sponsorship Levels', admin_conference_sponsorship_levels_path(@conference.short_title)
- if can? :update, @conference.sponsors.build
%li{:class=> active_nav_li(admin_conference_sponsors_path(@conference.short_title))}
= link_to 'Sponsors', admin_conference_sponsors_path(@conference.short_title)

View file

@ -8,6 +8,9 @@
%p
OSEM requires JavaScript to be enabled to function. Please turn on JavaScript in your browser's settings and reload the page to continue.
- flash.each do |type, message|
.container
.row
.col-md-12
%div{:class=>"alert alert-dismissable #{bootstrap_class_for(type)}", :id=>"flash"}
.button.close{"data-dismiss" => "alert", "aria-hidden"=>"true"}
&times;

View file

@ -6,7 +6,6 @@
%meta{:content => "", :name => "description"}
%meta{:content => "", :name => "author"}
= stylesheet_link_tag "application", :media => "all"
= stylesheet_link_tag "splash" if content_for :splash
= javascript_include_tag "application"
= csrf_meta_tags
:javascript
@ -25,23 +24,16 @@
= javascript_include_tag "//cdn.transifex.com/live.js"
= yield(:head)
%body{ data: (content_for?(:splash_nav) ? {spy: 'scroll', offset: 0, target: 'splash-nav'} : {} ) }
%body
= render 'layouts/navigation'
-# Admin area
- if controller.class.name.split("::").first=="Admin"
= render 'layouts/admin'
-else
.container#messages
.row
.col-md-12
#messages
= render 'layouts/messages'
- if content_for :splash
#content
= yield :splash
-else
.container#content
= yield
#footer
.container
%p.muted.text-center

View file

@ -1,3 +1,4 @@
.container
.row
.col-md-12
.tabbable

View file

@ -1,3 +1,4 @@
.container
.row
.col-md-12.page-header
%h1

View file

@ -1,3 +1,4 @@
.container
.row
.col-md-12
= simple_format(@conference.call_for_papers.description)

View file

@ -1,3 +1,4 @@
.container
.row
.col-md-12.page-header
%h2

View file

@ -1,3 +1,4 @@
<div class="container">
<div id="schedule-content">
<h2> Schedule for <%= @conference.title %></h2>
<ul class="nav nav-tabs">
@ -92,7 +93,7 @@
</div>
<% end %>
</div>
</div>
<%= javascript_tag do %>
jQuery( function($) {
$('tbody tr td[data-href]').addClass('clickable').mouseup(function(e) {

View file

@ -1,12 +1,13 @@
.container
.row
.col-sm-12.col-md-10.col-md-offset-1
.col-md-12
.page-header
%h1
Tickets
%p.lead
Please buy a ticket if you want to support
Please buy a ticket to support
%b
= @conference.title
!
=form_tag(conference_ticket_purchases_path, method: :post) do |f|
%table.table.table-hover
%thead

View file

@ -1,8 +1,11 @@
.container
.row
.col-md-12
.page-header
%h1 Edit your profile
.row
.col-md-12
= semantic_form_for(@user, url: user_path(@user.id)) do |f|
= f.inputs name: 'Profile' do
= f.input :name, as: :string
= f.input :nickname, as: :string
= f.input :affiliation, as: :string,

View file

@ -1,8 +1,16 @@
.container
.row
.col-md-12
.page-header
%h1
= image_tag(current_user.gravatar_url(size: '48'), title: "Yo #{current_user.name}!", :alt => '')
= @user.name
%h4
%small
= @user.nickname
%p
= @user.biography
.row
.col-md-12
- if @user.events.confirmed.any?
%h3
= "#{@user.name} presents #{pluralize(@user.events.confirmed.count, 'Event')}:"

View file

@ -48,7 +48,12 @@ Osem::Application.routes.draw do
resources :tracks, only: [:show, :update, :index]
resources :sponsorship_levels, only: [:show, :update, :index]
resources :sponsorship_levels, except: [:show] do
member do
patch :up
patch :down
end
end
resources :sponsors, only: [:show, :update, :index]

View file

@ -0,0 +1,5 @@
class AddPositionToSponsorshipLevel < ActiveRecord::Migration
def change
add_column :sponsorship_levels, :position, :integer
end
end

View file

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20141109172204) do
ActiveRecord::Schema.define(version: 20141113134103) do
create_table "ahoy_events", force: true do |t|
t.uuid "visit_id"
@ -423,6 +423,7 @@ ActiveRecord::Schema.define(version: 20141109172204) do
t.integer "conference_id"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "position"
end
create_table "subscriptions", force: true do |t|

View file

@ -11,22 +11,22 @@ feature Room do
visit admin_conference_rooms_path(
conference_id: conference.short_title)
expect(page.has_content?('Room Name')).to be false
expect(page.has_content?('100')).to be false
expect(page.has_no_table?('#rooms')).to be true
# Add room
click_link 'New Room'
fill_in 'room_name', with: 'Room Name'
fill_in 'room_name', with: 'Auditorium'
fill_in 'room_size', with: '100'
click_button 'Create Room'
# Validations
expect(flash).to eq('Room successfully created.')
expect(page.has_content?('Room Name')).to be true
expect(page.has_content?('100')).to be true
within('table#rooms') do
expect(page.has_content?('Auditorium')).to be true
expect(page.assert_selector('tr', count: 2)).to be true
end
end
scenario 'updates a room', feature: true, js: true do
@ -35,17 +35,19 @@ feature Room do
visit edit_admin_conference_room_path(
conference_id: conference.short_title, id: room.id)
fill_in 'room_name', with: 'Room Name'
fill_in 'room_name', with: 'Auditorium'
fill_in 'room_size', with: '100'
click_button 'Update Room'
# Validations
expect(flash).to eq('Room successfully updated.')
expect(page.has_content?('Room Name')).to be true
expect(page.has_content?('100')).to be true
within('table#rooms') do
expect(page.has_content?('Auditorium')).to be true
expect(page.assert_selector('tr', count: 2)).to be true
end
room.reload
expect(room.name).to eq('Room Name')
expect(room.name).to eq('Auditorium')
expect(room.size).to eq(100)
end
end

View file

@ -5,37 +5,51 @@ feature SponsorshipLevel do
let!(:organizer_role) { create(:organizer_role, resource: conference) }
let!(:organizer) { create(:user, role_ids: [organizer_role.id]) }
shared_examples 'sponsorship levels' do
scenario 'adds and updates sponsorship level', feature: true, js: true do
shared_examples 'sponsorship_levels' do
scenario 'adds a sponsorship level', feature: true, js: true do
sign_in organizer
visit admin_conference_sponsorship_levels_path(
conference_id: conference.short_title)
# Add sponsorship level
click_link 'Add sponsorship_level'
expect(page.all('div.nested-fields').count == 1).to be true
page.
find('div.nested-fields:nth-of-type(1) div:nth-of-type(1) input').
set('Example sponsorship level')
expect(page.has_no_table?('#sponsorship_levels')).to be true
click_button 'Update Conference'
# Add SponsorshipLevel
click_link 'New Sponsorship Level'
fill_in 'sponsorship_level_title', with: 'Platin'
click_button 'Create Sponsorship level'
# Validations
expect(flash).to eq('Sponsorship levels were successfully updated.')
expect(find('div.nested-fields:nth-of-type(1) div:nth-of-type(1) input').
value).to eq('Example sponsorship level')
expect(flash).to eq('Sponsorship level successfully created.')
within('table#sponsorship_levels') do
expect(page.has_content?('Platin')).to be true
expect(page.assert_selector('tr', count: 2)).to be true
end
end
# Remove sponsorship level
click_link 'Remove sponsorship_level'
expect(page.all('div.nested-fields').count == 0).to be true
click_button 'Update Conference'
expect(flash).to eq('Sponsorship levels were successfully updated.')
expect(page.all('div.nested-fields').count == 0).to be true
scenario 'updates a sponsorship level', feature: true, js: true do
level = create(:sponsorship_level, conference_id: conference.id)
sign_in organizer
visit edit_admin_conference_sponsorship_level_path(
conference_id: conference.short_title, id: level.id)
fill_in 'sponsorship_level_title', with: 'Gold'
click_button 'Update Sponsorship level'
# Validations
expect(flash).to eq('Sponsorship level successfully updated.')
within('table#sponsorship_levels') do
expect(page.has_content?('Gold')).to be true
expect(page.assert_selector('tr', count: 2)).to be true
end
level.reload
expect(level.title).to eq('Gold')
end
end
describe 'organizer' do
it_behaves_like 'sponsorship levels'
it_behaves_like 'sponsorship_levels'
end
end

View file

@ -5,9 +5,9 @@ describe 'conference/show.html.haml' do
@conference = create(:conference)
@conference.splashpage = create(:splashpage,
banner_description: 'Lorem Ipsum',
sponsor_description: 'Lorem Ipsum Dolor',
registration_description: 'Lorem Ipsum Dolor',
banner_description: 'Banner Description',
sponsor_description: 'Sponsor Description',
registration_description: 'Registration Description',
include_registrations: true,
include_program: true,
include_sponsors: true,
@ -19,13 +19,13 @@ describe 'conference/show.html.haml' do
include_lodgings: true)
@conference.contact.update(sponsor_email: 'example@example.com',
facebook: 'http://www.fbexample.com',
googleplus: 'http://www.google-example.com',
facebook: 'http://facebook.com',
googleplus: 'http://google.com',
instagram: 'http://instagram.com',
twitter: 'http://twitter.com')
@conference.registration_period = create(:registration_period,
start_date: Date.today,
start_date: Date.yesterday,
end_date: Date.tomorrow)
@conference.call_for_papers = create(:call_for_papers, conference: @conference,
@ -43,8 +43,8 @@ describe 'conference/show.html.haml' do
end
it 'renders banner component' do
expect(view.content_for(:splash)).to include("#{@conference.splashpage.banner_description}")
expect(view.content_for(:splash)).to include("#{@conference.short_title}")
expect(rendered).to match(/#{@conference.splashpage.banner_description}/)
expect(rendered).to match(/#{@conference.short_title}/)
end
it 'renders program partial' do
@ -52,45 +52,43 @@ describe 'conference/show.html.haml' do
end
it 'renders registration partial' do
expect(view.content_for(:splash)).to include("#{@conference.splashpage.registration_description}")
expect(view).to render_template(partial: 'conference/_registration')
end
it 'renders call_for_papers partial' do
expect(view.content_for(:splash)).to include("#{@conference.call_for_papers.description}")
expect(rendered).to match(/#{@conference.call_for_papers.description}/)
end
it 'renders sponsors partial' do
expect(view).to render_template(partial: 'conference/_sponsor')
expect(view.content_for(:splash)).to include('Lorem Ipsum Dolor')
expect(view.content_for(:splash)).to include('example@example.com')
expect(view.content_for(:splash)).to include('Platin')
expect(view.content_for(:splash)).to include('Example sponsor')
expect(view.content_for(:splash)).to include('http://www.example.com')
expect(view.content_for(:splash)).to include('Lorem Ipsum Dolor')
expect(view.content_for(:splash)).to include('rails.jpg')
expect(view).to render_template(partial: 'conference/_sponsors')
expect(rendered).to match(/example@example.com/)
expect(rendered).to match(/Platin/)
expect(rendered).to match(/Example sponsor/)
expect(rendered).to match(/www.example.com/)
expect(rendered).to match(/Lorem Ipsum Dolor/)
expect(rendered).to match(/rails.jpg/)
end
it 'renders social media partial' do
expect(view).to render_template('conference/_social_media')
expect(view.content_for(:splash)).to include('http://www.fbexample.com')
expect(view.content_for(:splash)).to include('http://www.google-example.com')
expect(view.content_for(:splash)).to include('http://instagram.com')
expect(view.content_for(:splash)).to include('http://twitter.com')
expect(rendered).to match(/facebook.com/)
expect(rendered).to match(/google.com/)
expect(rendered).to match(/instagram.com/)
expect(rendered).to match(/twitter.com/)
end
it 'renders location partial' do
expect(view).to render_template(partial: 'conference/_location')
expect(view.content_for(:splash)).to include('Suse Office')
expect(view.content_for(:splash)).to include('Maxfeldstrasse 5 \n90409 Nuremberg')
expect(view.content_for(:splash)).to include('www.opensuse.org')
expect(view.content_for(:splash)).to include('Lorem Ipsum Dolor')
expect(rendered).to match(/Suse Office/)
expect(rendered).to match(/Maxfeldstrasse 5/)
expect(rendered).to match(/www.opensuse.org/)
expect(rendered).to match(/Lorem Ipsum Dolor/)
end
it 'renders lodging partial' do
expect(view).to render_template(partial: 'conference/_lodging')
expect(view.content_for(:splash)).to include('Example Hotel')
expect(view.content_for(:splash)).to include('Lorem Ipsum Dolor')
expect(view.content_for(:splash)).to include('http://www.example.com')
expect(rendered).to match(/Example Hotel/)
expect(rendered).to match(/Lorem Ipsum Dolor/)
expect(rendered).to match(/www.example.com/)
end
end