merged pretty styling

This commit is contained in:
Tyrel Souza 2014-04-25 12:15:23 -04:00
commit f7bd18de33
9 changed files with 315 additions and 224 deletions

View File

@ -1,3 +1,17 @@
section {
margin-top: 70px;
}
ul {
list-style: none;
padding-left: 0;
}
.help-block {
font-size: .85em;
}
$medgray: #3A9AC9; $medgray: #3A9AC9;
.videolisting { .videolisting {
@ -5,61 +19,68 @@ $medgray: #3A9AC9;
color: #fff; color: #fff;
} }
input { // input {
border: 2px inset; // border: 2px inset;
// }
.nested-fields {
-webkit-border-radius: 1em;
-moz-border-radius: 1em;
border-radius: 1em;
margin-bottom: 1em;
padding: 1em;
.help-block, strong, p {
color: #ffffff;
}
} }
.nested-fields:nth-of-type(odd){ .nested-fields:nth-of-type(odd){
background-color: #395C84; background-color: #395C84;
padding: 10px;
.help-block{
color: #ccc;
}
} }
.nested-fields:nth-of-type(even) { .nested-fields:nth-of-type(even) {
background-color: lighten(#456A92, 10); background-color: lighten(#395C84, 10%);
padding: 10px;
} }
.even, .odd { .blah {
.help-block{ a {
color: #ccc; color: #ffffff;
font-weight: bold;
} }
} }
} }
.campaigns { .campaigns {
input { input, select, textarea {
width: 100%; width: 100%;
} }
input[type="submit"] { input[type="submit"] {
width: 131px margin-bottom: 1em;
width: auto;
} }
textarea { textarea {
width: 100%;
height: 5em; height: 5em;
} }
.control-group {
select { margin-bottom: 1em;
width: 100%;
} }
.campaign-item, .videolisting-item { // .campaign-item, .videolisting-item {
display: block; // display: block;
strong { // strong {
display: block; // display: block;
} // }
span { // span {
padding-left: 2em; // padding-left: 2em;
} // }
span.list-item { // span.list-item {
display: block; // display: block;
} // }
} // }
span.tag.label.label-info { span.tag.label.label-info {
display: block; display: block;
margin-bottom: 1px; margin-bottom: 1px;

View File

@ -6,7 +6,7 @@
}) do |frm| %> }) do |frm| %>
<% if @campaign.errors.any? %> <% if @campaign.errors.any? %>
<div class="row"> <div class="row">
<div class="col-md-10 error_explanation"> <div class="col-md-12 error_explanation">
<h2><%= pluralize(@campaign.errors.count, "error") %> prohibited this campaign from being saved:</h2> <h2><%= pluralize(@campaign.errors.count, "error") %> prohibited this campaign from being saved:</h2>
<ul> <ul>
<% @campaign.errors.full_messages.each do |msg| %> <% @campaign.errors.full_messages.each do |msg| %>
@ -17,9 +17,8 @@
</div> </div>
<% end %> <% end %>
<div class="row"> <div class="row">
<div class="col-md-5"> <div class="col-md-6">
<%= frm.input :advertisername, <%= frm.input :advertisername,
label: 'Advertiser Name', label: 'Advertiser Name',
hint: "The name of the company." %> hint: "The name of the company." %>
@ -86,17 +85,16 @@
hint: "Toll-free phone number of business. Used in video creation." %> hint: "Toll-free phone number of business. Used in video creation." %>
</div> </div>
<div class="col-md-5 videolisting"> <div class="col-md-6 videolisting">
<%= frm.simple_fields_for(:videolistings, html: {class: 'form-horizontal'}) do |videolisting| %> <%= frm.simple_fields_for(:videolistings, html: {class: 'form-horizontal'}) do |videolisting| %>
<%= render 'videolisting_fields', :f => videolisting %> <%= render 'videolisting_fields', :f => videolisting %>
<% end %> <% end %>
<div class="links"> <div class="links">
[<%= link_to_add_association 'Add Videolisting', frm, :videolistings %>] <%= link_to_add_association 'Add Video Listing', frm, :videolistings %>
</div> </div>
</div> </div>
</div> </div>
<div class="actions"> <div class="actions">
<%= frm.submit %> <%= frm.submit %>
</div> </div>

View File

@ -1,29 +1,34 @@
<li> <ul>
<span class="videolisting-item"> <li>
<strong>Video Code</strong> <p><strong>Video Code</strong><br>
<span><%= videolisting.videocode %></span> <%= videolisting.videocode %></p>
</span> </li>
<span class="videolisting-item"> <li>
<strong>Voiceover Selection</strong> <p><strong>Voiceover Selection</strong><br>
<span><%= voiceoverselection_list item:videolisting.voiceoverselection %></span> <%= voiceoverselection_list item:videolisting.voiceoverselection %></p>
</span> </li>
<span class="videolisting-item"> <li>
<strong>Music Selection</strong> <p><strong>Music Selection</strong><br>
<span><%= musicselection_list item:videolisting.musicselection %></span> <%= musicselection_list item:videolisting.musicselection %></p>
</span> </li>
<span class="videolisting-item"> <% unless videolisting.clientprovidedscript.empty? %>
<strong>Client Provided Script</strong> <li>
<span><%= videolisting.clientprovidedscript %></span> <p><strong>Client Provided Script</strong><br>
</span> <%= videolisting.clientprovidedscript %></p>
<span class="videolisting-item"> </li>
<strong>Production Notes</strong> <% end %>
<span><%= videolisting.notes %></span> <% unless videolisting.notes.empty? %>
</span> <li>
<span class="videolisting-item"> <p><strong>Production Notes</strong><br>
<strong>Asset URLs</strong> <%= videolisting.notes %></p>
</li>
<% videolisting.asseturls_array.each do |asset| %> <% end %>
<span class="list-item"><%= asset[:asseturl] %></span> <% unless videolisting.asseturls.empty? %>
<% end %> <li>
</span> <p><strong>asseturls</strong><br>
</li> <% videolisting.asseturls_array.each do |asset| %>
<%= asset[:asseturl] %></p>
<% end %>
</li>
<% end %>
</ul>

View File

@ -21,5 +21,5 @@
label: 'Asset Urls', label: 'Asset Urls',
hint: "A list of all file assets. Comma Separated, (press backspace or click the x to remove)", hint: "A list of all file assets. Comma Separated, (press backspace or click the x to remove)",
input_html: {data: {role: "tagsinput" }, value: ""} %> input_html: {data: {role: "tagsinput" }, value: ""} %>
{<%= link_to_remove_association "Remove Videolisting", f %>} <div class="blah"><%= link_to_remove_association "Remove Video Listing", f %></div>
</div> </div>

View File

@ -1,6 +1,11 @@
<%= link_to 'Show', campaign_path(@campaign.listingcode) %> | <div class="container">
<%= link_to 'Back', campaigns_path %> <section>
<div class="pull-right">
<h1>Editing <%= @campaign.advertisername %></h1> <%= link_to 'Cancel Edit Campaign', campaign_path(@campaign.listingcode) %> |
<%= link_to 'Back to Campaigns', campaigns_path %>
<%= render 'form' %> </div>
<h1>Edit <%= @campaign.advertisername %></h1>
<hr>
<%= render 'form' %>
</section>
</div>

View File

@ -1,36 +1,37 @@
<h1>Listing campaigns</h1> <div class="container">
<table class="table table-striped"> <section>
<thead> <h1>Campaigns</h1>
<tr> <hr>
<th>Listing Code(Form Hash)</th> <table class="table table-striped">
<th>Processed?</th> <thead>
<th>Billing Code</th> <tr>
<th>Address</th> <th>Listing Code (Form Hash)</th>
<th>City</th> <th>Processed?</th>
<th>State</th> <th>Billing Code</th>
<th>ZIP</th> <th>Address</th>
<th></th> <th>City</th>
<th></th> <th>State</th>
</tr> <th>ZIP</th>
</thead> <th></th>
<th></th>
<tbody> </tr>
<% @campaigns.each do |campaign| %> </thead>
<tr> <tbody>
<td><%= link_to campaign.listingcode, campaign_path(campaign.listingcode) %></td> <% @campaigns.each do |campaign| %>
<td><i class="glyphicon glyphicon-<% if campaign.processed? %>ok<% else %>remove<% end %>"></i> </td> <tr>
<td><%= campaign.billingcode %></td> <td><%= link_to campaign.listingcode, campaign_path(campaign.listingcode) %></td>
<td><%= campaign.address %></td> <td><i class="glyphicon glyphicon-<% if campaign.processed? %>ok<% else %>remove<% end %>"></i> </td>
<td><%= campaign.city %></td> <td><%= campaign.billingcode %></td>
<td><%= campaign.state %></td> <td><%= campaign.address %></td>
<td><%= campaign.zip %></td> <td><%= campaign.city %></td>
<td><%= link_to 'Edit', edit_campaign_path(campaign.listingcode) %></td> <td><%= campaign.state %></td>
<td><%= link_to 'Destroy', campaign_path(campaign.listingcode), method: :delete, data: { confirm: 'Are you sure?' } %></td> <td><%= campaign.zip %></td>
</tr> <td><%= link_to 'Edit', edit_campaign_path(campaign.listingcode) %></td>
<% end %> <td><%= link_to 'Destroy', campaign_path(campaign.listingcode), method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tbody> </tr>
</table> <% end %>
</tbody>
<br> </table>
<%= link_to 'New Campaign', new_campaign_path %>
<%= link_to 'New Campaign', new_campaign_path %> </section>
</div>

View File

@ -1,8 +1,10 @@
<%= link_to 'Back', campaigns_path %> <div class="container">
<div class="col-md-offset-1 col-md-10"> <section>
<div class="pull-right">
<h1>New campaign</h1> <%= link_to 'Cancel New Campaign', campaigns_path %>
</div>
<%= render 'form' %> <h1>New Campaign</h1>
<hr>
<%= render 'form' %>
</section>
</div> </div>

View File

@ -1,104 +1,147 @@
<%= link_to 'Edit', edit_campaign_path(@campaign.listingcode) %> | <div class="container">
<%= link_to 'Back', campaigns_path %> <section>
<div class="pull-right">
<%= link_to 'Edit Campaign', edit_campaign_path(@campaign.listingcode) %> |
<div class="col-md-12"> <%= link_to 'Back to Campaigns', campaigns_path %>
<h1>
<%= @campaign.advertisername %>
</h1>
<p id="notice"><%= notice %></p>
</div> </div>
<h1><%= @campaign.advertisername %></h1>
<div class="col-md-4 col-md-offset-1 col-xs-6"> <hr>
<span class="campaign-item"> <p id="notice"><%= notice %></p>
<strong>Listing Code</strong> <div class="row">
<span><%= @campaign.listingcode %></span> <div class="col-md-6">
</span>
<span class="campaign-item">
<strong>Description</strong>
<span><%= @campaign.description %></span>
</span>
<span class="campaign-item">
<strong>Products & Services</strong>
<span><%= @campaign.productsandservices %></span>
</span>
<span class="campaign-item">
<strong>Websiteurl</strong>
<span><%= @campaign.websiteurl %></span>
</span>
<span class="campaign-item">
<strong>Client Services Rep</strong>
<span><%= @campaign.vpa %></span>
</span>
<span class="campaign-item">
<strong>Billing Code</strong>
<span><%= @campaign.billingcode %></span>
</span>
<span class="campaign-item">
<strong>Email Address</strong>
<span><%= @campaign.emailaddress %></span>
</span>
<span class="campaign-item">
<strong>Business Phone</strong>
<span><%= number_to_phone @campaign.businessphone %></span>
</span>
<span class="campaign-item">
<strong>Contact Phone</strong>
<span><%= number_to_phone @campaign.contactphone %></span>
</span>
<span class="campaign-item">
<strong>Customer First Name</strong>
<span><%= @campaign.customerfirstname %></span>
</span>
<span class="campaign-item">
<strong>Customer Last Name</strong>
<span><%= @campaign.customerlastname %></span>
</span>
<span class="campaign-item">
<strong>Address</strong>
<span><%= @campaign.address %></span>
</span>
<span class="campaign-item">
<strong>City, State, Zip</strong>
<span><%= @campaign.city %>, <%= us_states item: @campaign.state %>, <%= @campaign.zip %></span>
</span>
<span class="campaign-item">
<strong>Awards</strong>
<span><%= @campaign.awards %></span>
</span>
<span class="campaign-item">
<strong>Background</strong>
<span><%= @campaign.background %></span>
</span>
<span class="campaign-item">
<strong>Industry Categories</strong>
<span><%= @campaign.categories %></span>
</span>
<span class="campaign-item">
<strong>Company Colors</strong>
<span><%= @campaign.companycolors %></span>
</span>
<span class="campaign-item">
<strong>Facebook URL</strong>
<span><%= @campaign.facebookurl %></span>
</span>
<span class="campaign-item">
<strong>Target Audience</strong>
<span><%= @campaign.targetaudience %></span>
</span>
<span class="campaign-item">
<strong>Tollfree Phone</strong>
<span><%= @campaign.tollfreephone %></span>
</span>
</div>
<div class="col-md-4 col-xs-6">
<ul> <ul>
<% @campaign.videolistings.each do |videolisting| %> <% unless @campaign.listingcode.empty? %>
<%= render 'videolisting', videolisting: videolisting %> <li>
<% end %> <p><strong>Listing Code</strong><br>
<% if @campaign.videolistings.empty? %> <%= @campaign.listingcode %></p>
<li>No Video Listings for this Campaign.</li> </li>
<% end %> <% end %>
<% unless @campaign.description.empty? %>
<li>
<p><strong>Description</strong><br>
<%= @campaign.description %></p>
</li>
<% end %>
<% unless @campaign.productsandservices.empty? %>
<li>
<p><strong>Products & Services</strong><br>
<%= @campaign.productsandservices %></p>
</li>
<% end %>
<% unless @campaign.websiteurl.empty? %>
<li>
<p><strong>Websiteurl</strong><br>
<%= @campaign.websiteurl %></p>
</li>
<% end %>
<% unless @campaign.vpa.empty? %>
<li>
<p><strong>Client Services Rep</strong><br>
<%= @campaign.vpa %></p>
</li>
<% end %>
<% unless @campaign.billingcode.empty? %>
<li>
<p><strong>Billing Code</strong><br>
<%= @campaign.billingcode %></p>
</li>
<% end %>
<% unless @campaign.emailaddress.empty? %>
<li>
<p><strong>Email Address</strong><br>
<%= @campaign.emailaddress %></p>
</li>
<% end %>
<% unless @campaign.businessphone.empty? %>
<li>
<p><strong>Business Phone</strong><br>
<%= number_to_phone @campaign.businessphone %></p>
</li>
<% end %>
<% unless @campaign.contactphone.empty? %>
<li>
<p><strong>Contact Phone</strong><br>
<%= number_to_phone @campaign.contactphone %></p>
</li>
<% end %>
<% unless @campaign.customerfirstname.empty? %>
<li>
<p><strong>Customer First Name</strong><br>
<%= @campaign.customerfirstname %></p>
</li>
<% end %>
<% unless @campaign.customerlastname.empty? %>
<li>
<p><strong>Customer Last Name</strong><br>
<%= @campaign.customerlastname %></p>
</li>
<% end %>
<% unless @campaign.address.empty? %>
<li>
<p><strong>Address</strong><br>
<%= @campaign.address %></p>
</li>
<% end %>
<% if @campaign.city.empty? || @campaign.state || @campaign.zip %>
<li>
<p><strong>City, State, Zip</strong><br>
<%= @campaign.city %>, <%= us_states item: @campaign.state %>, <%= @campaign.zip %></p>
</li>
<% end %>
<% unless @campaign.awards %>.empty?
<li>
<p><strong>Awards</strong><br>
<%= @campaign.awards %></p>
</li>
<% end %>
<% unless @campaign.background.empty? %>
<li>
<p><strong>Background</strong><br>
<%= @campaign.background %></p>
</li>
<% end %>
<% unless @campaign.categories.empty? %>
<li>
<p><strong>Industry Categories</strong><br>
<%= @campaign.categories %></p>
</li>
<% end %>
<% unless @campaign.companycolors.empty? %>
<li>
<p><strong>Company Colors</strong><br>
<%= @campaign.companycolors %></p>
</li>
<% end %>
<% unless @campaign.facebookurl.empty? %>
<li>
<p><strong>Facebook URL</strong><br>
<%= @campaign.facebookurl %></p>
</li>
<% end %>
<% unless @campaign.targetaudience.empty? %>
<li>
<p><strong>Target Audience</strong><br>
<%= @campaign.targetaudience %></p>
</li>
<% end %>
<% unless @campaign.tollfreephone.empty? %>
<li>
<p><strong>Tollfree Phone</strong><br>
<%= @campaign.tollfreephone %></p>
</li>
<% end %>
</ul> </ul>
</div>
<div class="col-md-6 videolisting">
<ul class="nested-fields">
<% @campaign.videolistings.each do |videolisting| %>
<li><%= render 'videolisting', videolisting: videolisting %></li>
<% end %>
<% if @campaign.videolistings.empty? %>
<li><p>No Video Listings for this Campaign.</p></li>
<% end %>
</ul>
</div>
</div> </div>
</section>
</div>

View File

@ -1,7 +1,23 @@
<% if user_signed_in? %> <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<%= link_to "Profile", edit_user_registration_path %> <div class="container">
<%= link_to "Logout", destroy_user_session_path, :method => :delete %> <div class="navbar-header">
<% else %> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<%= link_to "Sign in", new_user_session_path %> <span class="sr-only">Toggle navigation</span>
<% end %> <span class="icon-bar"></span>
----- <span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">VidPush</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<% if user_signed_in? %>
<li><%= link_to "Profile", edit_user_registration_path %></li>
<li><%= link_to "Logout", destroy_user_session_path, :method => :delete %></li>
<% else %>
<li><%= link_to "Sign in", new_user_session_path %></li>
<% end %>
</ul>
</div>
</div>
</div>