Skip to content

Commit

Permalink
Modified page header markup to not conflict with flash msgs
Browse files Browse the repository at this point in the history
Increased width of textareas
  • Loading branch information
tjgrathwell committed Mar 19, 2013
1 parent ce9e565 commit 4ebce3d
Show file tree
Hide file tree
Showing 17 changed files with 36 additions and 51 deletions.
28 changes: 13 additions & 15 deletions app/assets/stylesheets/_base.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ h1, h2, h3, h4, h5 {
font-weight: normal;
line-height: 120%;
padding: 0;
margin: 10px 0 0 0;
margin: 0;
}

h1 {
Expand Down Expand Up @@ -42,6 +42,10 @@ p {
font-size: 15px;
}

textarea {
width: 500px;
}

a {
color: #22444D;
}
Expand Down Expand Up @@ -84,26 +88,20 @@ td.wide {
z-index: 1031 !important;
}

.container {
.header-container {
margin-top: 80px;
width: 900px;

h1 {
margin-bottom: 20px;
}
}

.bridgetroll-content {
width: 900px;
margin-left: auto;
margin-right: auto;
margin: 0 auto;
background-color: $content-background-color;
padding-left: 20px;
padding-bottom: 20px;
padding-right: 20px;
}

.has-giant-header {
margin-top: 160px;
& h1 {
position: absolute;
top: 80px;
}
padding: 20px;
}

.session-display {
Expand Down
4 changes: 1 addition & 3 deletions app/assets/stylesheets/events/_show.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
margin-bottom: 20px;
font-size: 18px;

span {
display: block;

div {
&:first-child {
padding-bottom: 10px;
font-size: 30px;
Expand Down
1 change: 0 additions & 1 deletion app/controllers/rsvps_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ class RsvpsController < ApplicationController
before_filter :load_rsvp, except: [:new, :create]

def new
flash[:notice] = "AWESOME - you're almost signed up"
@rsvp = @event.rsvps.build
end

Expand Down
10 changes: 2 additions & 8 deletions app/helpers/locations_helper.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
module LocationsHelper

def pretty_print_address location
loc = location_array(location)
pretty_address = ""

loc.each do |line|
pretty_address += content_tag( :span, line )
end

return pretty_address.html_safe
tags = location_array(location).map { |line| content_tag(:div, line) }
tags.join('').html_safe
end

private
Expand Down
2 changes: 1 addition & 1 deletion app/views/checkins/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= render 'events/header' %>
<%= content_for(:header_text, @event.title) %>

<h2>Check in volunteers to <%= @session.name %></h2>

Expand Down
5 changes: 0 additions & 5 deletions app/views/events/_header.html.erb

This file was deleted.

2 changes: 1 addition & 1 deletion app/views/events/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= render 'events/header' %>
<%= content_for(:header_text, @event.title) %>

<h1>Editing event</h1>

Expand Down
7 changes: 2 additions & 5 deletions app/views/events/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<div class="row-fluid has-giant-header">
<div class="span7">
<h1>Organize an Event</h1>
</div>
</div>
<%= content_for(:header_text, 'Organize an Event') %>
<%= render 'form' %>
<%= render 'shared/actions', links: [
Expand Down
2 changes: 1 addition & 1 deletion app/views/events/organize.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= render 'header' %>
<%= content_for(:header_text, @event.title) %>

<h2>Super Secret Organizer Mission Control Console</h2>

Expand Down
2 changes: 1 addition & 1 deletion app/views/events/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= render 'header' %>
<%= content_for(:header_text, @event.title) %>

<div class="row-fluid">
<div class="span8">
Expand Down
2 changes: 1 addition & 1 deletion app/views/events/volunteer_emails.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= render 'events/header' %>
<%= content_for(:header_text, @event.title) %>

<h2>Volunteer Emails</h2>

Expand Down
5 changes: 5 additions & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
</ul>
</div>
</div>
<div class='container header-container'>
<% if content_for(:header_text).present? %>
<h1><%= yield(:header_text) %></h1>
<% end %>
</div>
<div class="container center bridgetroll-content">
<% flash.each do |name, msg| %>
<div class="alert alert-<%= name == :notice ? "success" : "error" %>">
Expand Down
2 changes: 1 addition & 1 deletion app/views/organizers/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= render 'events/header' %>
<%= content_for(:header_text, @event.title) %>

<h3>Organizer Assignments</h3>
<br />
Expand Down
7 changes: 2 additions & 5 deletions app/views/rsvps/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,15 @@

<div class="field">
<%= f.label :subject_experience, "What's your experience with this workshop's subject matter?" %>
<%= f.text_area :subject_experience, rows: 5, cols: 80,
maxlength: Rsvp::MAX_EXPERIENCE_LENGTH %>
<%= f.text_area :subject_experience, rows: 3, maxlength: Rsvp::MAX_EXPERIENCE_LENGTH %>
</div>

<div class="field">
<%= f.label :teaching_experience, "What's your experience with teaching?" %>
<%= f.text_area :teaching_experience, rows: 5, cols: 80,
maxlength: Rsvp::MAX_EXPERIENCE_LENGTH %>
<%= f.text_area :teaching_experience, rows: 3, maxlength: Rsvp::MAX_EXPERIENCE_LENGTH %>
</div>

<strong>Teaching preference?</strong>
<p>If you're happy to do either, leave this section blank.</p>
<div class="field">
<%= f.label :teaching, class: 'checkbox' do %>
<%= f.check_box :teaching %> Teaching
Expand Down
2 changes: 1 addition & 1 deletion app/views/rsvps/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= render 'events/header' %>
<%= content_for(:header_text, @event.title) %>

<h2> Edit RSVP </h2>

Expand Down
4 changes: 3 additions & 1 deletion app/views/rsvps/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<%= render 'events/header' %>
<%= content_for(:header_text, @event.title) %>

<h2>RSVP</h2>

<h5>AWESOME - you're almost signed up!</h5>

<%= render 'form' %>
<%= render 'shared/actions', links: [
Expand Down
2 changes: 1 addition & 1 deletion app/views/volunteers/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= render 'events/header' %>
<%= content_for(:header_text, @event.title) %>

<h2>Assign Volunteer Teaching Roles</h2>

Expand Down

0 comments on commit 4ebce3d

Please sign in to comment.