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 # to encapsulate money in objects
gem 'money-rails' gem 'money-rails'
# for lists
gem 'acts_as_list'
# Use guard and spring for testing in development # Use guard and spring for testing in development
group :development do group :development do
# rspec Guard rules # rspec Guard rules

View file

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

View file

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

View file

@ -8,6 +8,7 @@
*= require osem-schedule-print *= require osem-schedule-print
*= require osem-dashboard *= require osem-dashboard
*= require osem-fonts *= require osem-fonts
*= require osem-splash
*= require font-awesome *= require font-awesome
*= require bootstrap-markdown.min *= require bootstrap-markdown.min
*= require bootstrap-datetimepicker *= 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; 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 */ /* Set the fixed height of the footer here */
height: 60px; height: 60px;
background-color: #f5f5f5; background-color: #f5f5f5;
} .container {
.container .text-muted {
margin: 20px 0;
}
#footer > .container {
padding: 15px; 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 { .nav-tabs {
display: inline-block; margin-bottom: 15px;
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%;
} }

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 module Admin
class SponsorshipLevelsController < Admin::BaseController class SponsorshipLevelsController < Admin::BaseController
load_and_authorize_resource :conference, find_by: :short_title load_and_authorize_resource :conference, find_by: :short_title
authorize_resource through: :conference load_and_authorize_resource through: :conference
def index def index
authorize! :index, SponsorshipLevel.new(conference_id: @conference.id) authorize! :index, SponsorshipLevel.new(conference_id: @conference.id)
end end
def update def edit; end
if @conference.update_attributes(params[:conference])
redirect_to(admin_conference_sponsorship_levels_path( def new
conference_id: @conference.short_title), @sponsorship_level = @conference.sponsorship_levels.new
notice: 'Sponsorship levels were successfully updated.')
else
redirect_to(admin_conference_sponsorship_levels_path(
conference_id: @conference.short_title),
alert: 'Sponsorship levels update failed')
end 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),
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 end
end end

View file

@ -57,7 +57,7 @@ class Conference < ActiveRecord::Base
has_many :participants, through: :registrations, source: :user has_many :participants, through: :registrations, source: :user
has_many :vdays, dependent: :destroy has_many :vdays, dependent: :destroy
has_many :vpositions, 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 :sponsors, dependent: :destroy
has_many :photos, dependent: :destroy has_many :photos, dependent: :destroy
has_many :targets, dependent: :destroy has_many :targets, dependent: :destroy

View file

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

View file

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

View file

@ -3,7 +3,7 @@
- if @conference.rooms.any? - if @conference.rooms.any?
.row .row
.col-md-12 .col-md-12
%table.table %table.table#rooms
%thead %thead
%th # %th #
%th Name %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 %h1 Sponsorship Levels
= 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 - if @conference.sponsorship_levels.any?
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} .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) = markdown(@ticket.description)
%h4 The following persons bought this ticket: %h4 The following persons bought this ticket:
%table.table#buyers-datatable %table.table.table-striped.table-bordered.table-hover.datatable
%thead %thead
%th # %th #
%th Name %th Name

View file

@ -1,12 +1,14 @@
.row .row
.col-md-12 .col-md-12
.page-header
%h2 %h2
Users Users
- if @users - if @users
= "(#{@users.length})" = "(#{@users.length})"
= link_to 'New User', new_admin_user_path, class: 'btn btn-success pull-right' = 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 %thead
%th ID %th ID
%th State %th State

View file

@ -1,8 +1,10 @@
%h1 Editing Commercial .container
.row
.row .col-md-12
.col-md-8 .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| = 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 = render 'form', f: f
= link_to 'Back', edit_conference_proposal_path(conference_id: @conference.short_title, id: @event.id)
= link_to 'Back', edit_conference_proposal_path(conference_id: @conference.short_title, id: @event.id)

View file

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

View file

@ -2,24 +2,24 @@
%li %li
%a.smoothscroll{ href: '#callforpapers' } Call For Papers %a.smoothscroll{ href: '#callforpapers' } Call For Papers
%div.container#callforpapers.text-center .container
%div.row .row
%div.col-md-12 .col-md-12.text-center
%h1 %h1
Call For Papers Call For Papers
- if !@conference.call_for_papers.description.blank? - if !@conference.call_for_papers.description.blank?
.lead
= markdown(@conference.call_for_papers.description) = 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 .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 %div.col-md-2.timer-box
%h2#days %h2#days
.lead Days .lead Days
@ -32,11 +32,6 @@
%div.col-md-2.timer-box %div.col-md-2.timer-box
%h2#seconds %h2#seconds
.lead 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 :javascript
$( document ).ready(function(){ $( 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 %li
%a.smoothscroll{ href: '#location' } Location %a.smoothscroll{ href: '#location' } Location
.container
%div.banner-disp{ style: ("background-image: url(#{@conference.venue.photo})" unless @conference.venue.photo.blank?), class:('with-background' unless @conference.venue.photo.blank?) } .row
%div.container.text-center .col-md-12.text-center
.div.row.col-md-12
- unless @conference.venue.name.blank? - unless @conference.venue.name.blank?
%h1 %h1
%strong #{ @conference.venue.name } %strong #{ @conference.venue.name }
- unless @conference.venue.address.blank? - unless @conference.venue.address.blank?
= link_to("http://maps.google.com/maps?q=#{@conference.venue.address}") do
%h2 %h2
%strong #{ @conference.venue.address } #{ @conference.venue.address }
- unless @conference.venue.description.blank? - unless @conference.venue.description.blank?
.lead .lead
= markdown(@conference.venue.description) = 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? - unless @conference.venue.website.blank?
%li %p.lead
%b = link_to(@conference.venue.website, @conference.venue.website)
= link_to 'Visit Venue Website', @conference.venue.website, target: '_blank'

View file

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

View file

@ -1,22 +1,36 @@
= content_for :splash_nav do = content_for :splash_nav do
%li %li
%a.smoothscroll{ href: '#program' } Program =link_to('#program', class: 'smoothscroll') do
Program
%div.container.text-center .container
%div.row .row
%div.col-md-12 .col-md-12.text-center
%h1 Program %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 - if @conference.call_for_papers and @conference.call_for_papers.schedule_public
%span You can check out our .row
%span .col-md-12
= link_to 'Schedule', conference_schedule_path(@conference.short_title), target: '_blank' %p.text-center
- else Check out our
%span The schedule is not ready yet. Stay tuned! = link_to 'Schedule', conference_schedule_path(@conference.short_title)
- if !@keynote_speakers.blank?
- unless @keynote_speakers.blank? %div.row.text-center
= render 'keynote_speakers' %div.col-md-12
%h3 Keynote Speakers
-unless @conference.tracks.blank? - @keynote_speakers.each do |k|
- if @conference.splashpage.include_tracks %div{ class: (@keynote_speakers.count.to_i <= 2 ? "col-md-#{12/@keynote_speakers.count.to_i}" : "col-md-4") }
= render 'tracks' = 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 = content_for :splash_nav do
%li %li
%a.smoothscroll{ href: '#registration' } Registration %a.smoothscroll{ href: '#registration' } Registration
%div.container.text-center
%div.row .container
.row
.col-md-12.text-center
%h1 Registration %h1 Registration
- if !@conference.splashpage.registration_description.blank? %p.lead
.lead Going to
= markdown(@conference.splashpage.registration_description) = @conference.short_title
- if @conference.registration_dates_given? is free of charge. We only ask you to
-if @conference.registration_period.end_date >= Date.today = link_to "register yourself", new_conference_conference_registrations_path(@conference.short_title)
%h4 Registration period #{ date_string(@conference.registration_period.start_date, @conference.registration_period.end_date) } until
-else = @conference.registration_period.end_date
%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'

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 .container
%h3 Tickets .row
-if @conference.splashpage.ticket_description.present? .col-md-12.text-center
.lead %h1
= markdown(@conference.splashpage.ticket_description) Support
- @conference.tickets.each do |s| =@conference.short_title
%div.col-md-6 %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? - if ticket.title.present?
%h4 #{ ticket.title } %h4.text-center
=ticket.title
- if ticket.description.present? - if ticket.description.present?
.lead
= markdown(ticket.description) = markdown(ticket.description)
%div.btn-group .text-center
= link_to "Buy Ticket", conference_tickets_path(@conference.short_title), class: 'btn btn-success' .btn-group
= button_tag "#{humanized_money_with_symbol ticket.price}", class: 'btn btn-success' = 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 - if @conference.splashpage
.splash
- if @conference.splashpage.include_banner? - if @conference.splashpage.include_banner?
%section{ id: 'splash-banner' } #splash-banner{ style: ("background-image: url(#{@conference.splashpage.banner_photo})" unless @conference.splashpage.banner_photo.blank?) }
%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?) } .container
%div.container.text-center.banner-text
.row .row
%h1 .col-md-12.text-center
= @conference.title %h1= @conference.title
- if @conference.start_date && @conference.end_date - 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? - unless @conference.splashpage.banner_description.blank?
.row-fluid %p.lead
.col-md-12.lead
.lead
= markdown(@conference.splashpage.banner_description) = markdown(@conference.splashpage.banner_description)
-unless @conference.photos.blank? -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 = link_to 'Gallery', gallery_photos_conference_path(@conference.short_title), class: 'btn btn-primary btn-lg', id: 'gallery-btn', remote: true
= render 'gallery' = render 'gallery'
- if @conference.splashpage.include_program - if @conference.splashpage.include_program
%section{ id: 'program' } %section#program
.pad
= render 'program' = render 'program'
- if @conference.splashpage.include_registrations - if @conference.cfp_open? and @conference.call_for_papers.include_cfp_in_splash?
%section{ id: 'registration' } %section#callforpapers
.pad
= render 'registration'
-unless @conference.call_for_papers.blank?
- if @conference.call_for_papers.include_cfp_in_splash?
%section{ id:'callforpapers' }
.pad
= render 'call_for_papers' = render 'call_for_papers'
-unless @conference.venue.blank? - if @conference.venue and @conference.splashpage.include_venue
- if @conference.splashpage.include_venue #location{ style: ("background-image: url(#{@conference.venue.photo})" unless @conference.venue.photo.blank?) }
%section{ id: 'location' }
.pad
= render 'location' = 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' = render 'lodging'
- if @conference.splashpage.include_sponsors - if @conference.sponsors.any? and @conference.splashpage.include_sponsors
%section{ id: 'sponsors' } %section#sponsors
.pad = render 'sponsors'
= render 'sponsor'
- if @conference.splashpage.include_social_media - if @conference.splashpage.include_social_media
%section{ id: 'social-media' } %section#social-media
.pad
= render 'social_media' = render 'social_media'
// grmbl
= render 'footer' = render 'footer'

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,5 @@
.row .container
.row
.col-md-12 .col-md-12
.tabbable .tabbable
%ul.nav.nav-tabs %ul.nav.nav-tabs

View file

@ -1,10 +1,11 @@
.row .container
.row
.col-md-12.page-header .col-md-12.page-header
%h1 %h1
= "My Proposals for #{@conference.title}" = "My Proposals for #{@conference.title}"
- if @conference.cfp_open? || (current_user.has_role? :organizer, @conference) - if @conference.cfp_open? || (current_user.has_role? :organizer, @conference)
= link_to "New Proposal", new_conference_proposal_path(@conference.short_title), :class => "btn btn-success pull-right" = link_to "New Proposal", new_conference_proposal_path(@conference.short_title), :class => "btn btn-success pull-right"
- if current_user.proposal_count(@conference) > 0 - if current_user.proposal_count(@conference) > 0
.row .row
.col-md-12 .col-md-12
%table.table.table-bordered.table-striped %table.table.table-bordered.table-striped

View file

@ -1,6 +1,7 @@
.row .container
.row
.col-md-12 .col-md-12
= simple_format(@conference.call_for_papers.description) = simple_format(@conference.call_for_papers.description)
.row .row
.col-md-12 .col-md-12
= render 'proposal_form' = render 'proposal_form'

View file

@ -1,4 +1,5 @@
.row .container
.row
.col-md-12.page-header .col-md-12.page-header
%h2 %h2
= @event.title = @event.title
@ -9,7 +10,7 @@
= link_to "Schedule", conference_schedule_path(@conference.short_title), :class =>"btn btn-success pull-right" = link_to "Schedule", conference_schedule_path(@conference.short_title), :class =>"btn btn-success pull-right"
- if can? :edit, @event - if can? :edit, @event
= link_to "Edit", edit_admin_conference_event_path(@conference.short_title, @event), :class => "btn btn-mini btn-primary pull-right" = link_to "Edit", edit_admin_conference_event_path(@conference.short_title, @event), :class => "btn btn-mini btn-primary pull-right"
.row .row
.col-md-3 .col-md-3
%p %p
= simple_format(@event.abstract) = simple_format(@event.abstract)

View file

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

View file

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

View file

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

View file

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

View file

@ -48,7 +48,12 @@ Osem::Application.routes.draw do
resources :tracks, only: [:show, :update, :index] 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] 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. # 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| create_table "ahoy_events", force: true do |t|
t.uuid "visit_id" t.uuid "visit_id"
@ -423,6 +423,7 @@ ActiveRecord::Schema.define(version: 20141109172204) do
t.integer "conference_id" t.integer "conference_id"
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
t.integer "position"
end end
create_table "subscriptions", force: true do |t| create_table "subscriptions", force: true do |t|

View file

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

View file

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

View file

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