From 80f47a210de396c0223e4a09bfdced211aed27a4 Mon Sep 17 00:00:00 2001 From: Bret Haynie Date: Fri, 25 Apr 2014 11:50:37 -0400 Subject: [PATCH] made campaigns, show, and edit pages consistent --- app/assets/stylesheets/campaign.css.scss | 82 ++++--- app/views/campaigns/_form.html.erb | 12 +- app/views/campaigns/_videolisting.html.erb | 48 ++--- .../campaigns/_videolisting_fields.html.erb | 2 +- app/views/campaigns/edit.html.erb | 9 +- app/views/campaigns/index.html.erb | 3 +- app/views/campaigns/new.html.erb | 16 +- app/views/campaigns/show.html.erb | 201 +++++++++--------- 8 files changed, 192 insertions(+), 181 deletions(-) diff --git a/app/assets/stylesheets/campaign.css.scss b/app/assets/stylesheets/campaign.css.scss index d8f8046..d91030a 100644 --- a/app/assets/stylesheets/campaign.css.scss +++ b/app/assets/stylesheets/campaign.css.scss @@ -1,10 +1,17 @@ -nav { - background: #f9f9f9; -} section { margin-top: 70px; } +ul { + list-style: none; + padding-left: 0; +} + +.help-block { + font-size: .85em; +} + + $medgray: #3A9AC9; .videolisting { @@ -12,61 +19,68 @@ $medgray: #3A9AC9; color: #fff; } - input { - border: 2px inset; + // input { + // 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){ background-color: #395C84; - padding: 10px; - .help-block{ - color: #ccc; - } } + .nested-fields:nth-of-type(even) { - background-color: lighten(#456A92, 10); - padding: 10px; + background-color: lighten(#395C84, 10%); } - .even, .odd { - .help-block{ - color: #ccc; + .blah { + a { + color: #ffffff; + font-weight: bold; } } + } .campaigns { - input { + input, select, textarea { width: 100%; } - input[type="submit"] { - width: 131px + margin-bottom: 1em; + width: auto; } - textarea { - width: 100%; height: 5em; } - - select { - width: 100%; + .control-group { + margin-bottom: 1em; } - .campaign-item, .videolisting-item { - display: block; - strong { - display: block; - } - span { - padding-left: 2em; - } - span.list-item { - display: block; - } - } + // .campaign-item, .videolisting-item { + // display: block; + // strong { + // display: block; + // } + // span { + // padding-left: 2em; + // } + // span.list-item { + // display: block; + // } + // } + span.tag.label.label-info { display: block; margin-bottom: 1px; diff --git a/app/views/campaigns/_form.html.erb b/app/views/campaigns/_form.html.erb index cf6b752..0cf07c6 100644 --- a/app/views/campaigns/_form.html.erb +++ b/app/views/campaigns/_form.html.erb @@ -6,7 +6,7 @@ }) do |frm| %> <% if @campaign.errors.any? %>
-
+

<%= pluralize(@campaign.errors.count, "error") %> prohibited this campaign from being saved:

    <% @campaign.errors.full_messages.each do |msg| %> @@ -17,9 +17,8 @@
<% end %> -
-
+
<%= frm.input :advertisername, label: 'Advertiser Name', hint: "The name of the company." %> @@ -86,18 +85,17 @@ hint: "Toll-free phone number of business. Used in video creation." %>
-
+
<%= frm.simple_fields_for(:videolistings, html: {class: 'form-horizontal'}) do |videolisting| %> <%= render 'videolisting_fields', :f => videolisting %> <% end %>
-
<%= frm.submit %>
-<% end %> +<% end %> \ No newline at end of file diff --git a/app/views/campaigns/_videolisting.html.erb b/app/views/campaigns/_videolisting.html.erb index d4eaa13..d82612f 100644 --- a/app/views/campaigns/_videolisting.html.erb +++ b/app/views/campaigns/_videolisting.html.erb @@ -1,29 +1,23 @@ -
  • - - Video Code - <%= videolisting.videocode %> - - - Voiceover Selection - <%= voiceoverselection_list item:videolisting.voiceoverselection %> - - - Music Selection - <%= musicselection_list item:videolisting.musicselection %> - - - Client Provided Script - <%= videolisting.clientprovidedscript %> - - - Production Notes - <%= videolisting.notes %> - - - asseturls - +
      +
    • +

      Video Code
      + <%= videolisting.videocode %>

      +
    • +

      Voiceover Selection
      + <%= voiceoverselection_list item:videolisting.voiceoverselection %>

      +
    • +

      Music Selection
      + <%= musicselection_list item:videolisting.musicselection %>

      +
    • +

      Client Provided Script
      + <%= videolisting.clientprovidedscript %>

      +
    • +

      Production Notes
      + <%= videolisting.notes %>

      +
    • +

      asseturls
      <% videolisting.asseturls_array.each do |asset| %> - <%= asset[:asseturl] %> + <%= asset[:asseturl] %>

      <% end %> - -
    • \ No newline at end of file + +
    \ No newline at end of file diff --git a/app/views/campaigns/_videolisting_fields.html.erb b/app/views/campaigns/_videolisting_fields.html.erb index ea5a1a1..9f99c19 100644 --- a/app/views/campaigns/_videolisting_fields.html.erb +++ b/app/views/campaigns/_videolisting_fields.html.erb @@ -21,5 +21,5 @@ label: 'Asset Urls', hint: "A list of all file assets. Comma Separated, (press backspace or click the x to remove)", input_html: {data: {role: "tagsinput" }, value: ""} %> - {<%= link_to_remove_association "Remove Videolisting", f %>} +
    <%= link_to_remove_association "Remove Video Listing", f %>
  • diff --git a/app/views/campaigns/edit.html.erb b/app/views/campaigns/edit.html.erb index a691abe..8fb8d22 100644 --- a/app/views/campaigns/edit.html.erb +++ b/app/views/campaigns/edit.html.erb @@ -1,10 +1,11 @@
    - <%= link_to 'Cancel Edit', campaign_path(@campaign.listingcode) %> - - +
    + <%= link_to 'Cancel Edit Campaign', campaign_path(@campaign.listingcode) %> | + <%= link_to 'Back to Campaigns', campaigns_path %> +

    Edit <%= @campaign.advertisername %>

    - +
    <%= render 'form' %>
    \ No newline at end of file diff --git a/app/views/campaigns/index.html.erb b/app/views/campaigns/index.html.erb index 2e05b41..ed50382 100644 --- a/app/views/campaigns/index.html.erb +++ b/app/views/campaigns/index.html.erb @@ -1,6 +1,7 @@

    Campaigns

    +
    @@ -31,6 +32,6 @@ <% end %>
    - <%= link_to 'Add New Campaign', new_campaign_path %> + <%= link_to 'New Campaign', new_campaign_path %>
    \ No newline at end of file diff --git a/app/views/campaigns/new.html.erb b/app/views/campaigns/new.html.erb index 03c4e13..1f2a274 100644 --- a/app/views/campaigns/new.html.erb +++ b/app/views/campaigns/new.html.erb @@ -1,8 +1,10 @@ -<%= link_to 'Back', campaigns_path %> -
    - -

    New campaign

    - -<%= render 'form' %> - +
    +
    +
    + <%= link_to 'Cancel New Campaign', campaigns_path %> +
    +

    New Campaign

    +
    + <%= render 'form' %> +
    \ No newline at end of file diff --git a/app/views/campaigns/show.html.erb b/app/views/campaigns/show.html.erb index dbe6a56..6b81f34 100644 --- a/app/views/campaigns/show.html.erb +++ b/app/views/campaigns/show.html.erb @@ -1,106 +1,107 @@
    - <%= link_to 'Edit Campaign', edit_campaign_path(@campaign.listingcode) %> - -
    -

    - <%= @campaign.advertisername %> -

    -

    <%= notice %>

    +
    + <%= link_to 'Edit Campaign', edit_campaign_path(@campaign.listingcode) %> | + <%= link_to 'Back to Campaigns', campaigns_path %>
    - -
    - - Listing Code - <%= @campaign.listingcode %> - - - Description - <%= @campaign.description %> - - - Products & Services - <%= @campaign.productsandservices %> - - - Websiteurl - <%= @campaign.websiteurl %> - - - Client Services Rep - <%= @campaign.vpa %> - - - Billing Code - <%= @campaign.billingcode %> - - - Email Address - <%= @campaign.emailaddress %> - - - Business Phone - <%= number_to_phone @campaign.businessphone %> - - - Contact Phone - <%= number_to_phone @campaign.contactphone %> - - - Customer First Name - <%= @campaign.customerfirstname %> - - - Customer Last Name - <%= @campaign.customerlastname %> - - - Address - <%= @campaign.address %> - - - City, State, Zip - <%= @campaign.city %>, <%= us_states item: @campaign.state %>, <%= @campaign.zip %> - - - Awards - <%= @campaign.awards %> - - - Background - <%= @campaign.background %> - - - Industry Categories - <%= @campaign.categories %> - - - Company Colors - <%= @campaign.companycolors %> - - - Facebook URL - <%= @campaign.facebookurl %> - - - Target Audience - <%= @campaign.targetaudience %> - - - Tollfree Phone - <%= @campaign.tollfreephone %> - -
    - -
    -
      - <% @campaign.videolistings.each do |videolisting| %> - <%= render 'videolisting', videolisting: videolisting %> - <% end %> - <% if @campaign.videolistings.empty? %> -
    • No Video Listings for this Campaign.
    • - <% end %> -
    +

    <%= @campaign.advertisername %>

    +
    +

    <%= notice %>

    +
    +
    +
      +
    • +

      Listing Code
      + <%= @campaign.listingcode %>

      +
    • +
    • +

      Description
      + <%= @campaign.description %>

      +
    • +
    • +

      Products & Services
      + <%= @campaign.productsandservices %>

      +
    • +
    • +

      Websiteurl
      + <%= @campaign.websiteurl %>

      +
    • +
    • +

      Client Services Rep
      + <%= @campaign.vpa %>

      +
    • +
    • +

      Billing Code
      + <%= @campaign.billingcode %>

      +
    • +
    • +

      Email Address
      + <%= @campaign.emailaddress %>

      +
    • +
    • +

      Business Phone
      + <%= number_to_phone @campaign.businessphone %>

      +
    • +
    • +

      Contact Phone
      + <%= number_to_phone @campaign.contactphone %>

      +
    • +
    • +

      Customer First Name
      + <%= @campaign.customerfirstname %>

      +
    • +
    • +

      Customer Last Name
      + <%= @campaign.customerlastname %>

      +
    • +
    • +

      Address
      + <%= @campaign.address %>

      +
    • +
    • +

      City, State, Zip
      + <%= @campaign.city %>, <%= us_states item: @campaign.state %>, <%= @campaign.zip %>

      +
    • +
    • +

      Awards
      + <%= @campaign.awards %>

      +
    • +
    • +

      Background
      + <%= @campaign.background %>

      +
    • +
    • +

      Industry Categories
      + <%= @campaign.categories %>

      +
    • +
    • +

      Company Colors
      + <%= @campaign.companycolors %>

      +
    • +
    • +

      Facebook URL
      + <%= @campaign.facebookurl %>

      +
    • +
    • +

      Target Audience
      + <%= @campaign.targetaudience %>

      +
    • +
    • +

      Tollfree Phone
      + <%= @campaign.tollfreephone %>

      +
    • +
    +
    +
    +
      + <% @campaign.videolistings.each do |videolisting| %> +
    • <%= render 'videolisting', videolisting: videolisting %>
    • + <% end %> + <% if @campaign.videolistings.empty? %> +
    • No Video Listings for this Campaign.

    • + <% end %> +
    +
    \ No newline at end of file