From 6e76c4d48096f91331b7a93d58266f8657b93f18 Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Tue, 22 Apr 2014 12:52:28 -0400 Subject: [PATCH] Change styling, add help text and placeholder text --- app/assets/stylesheets/campaign.css.scss | 29 ++++- app/controllers/campaigns_controller.rb | 2 +- app/views/campaigns/_form.html.erb | 138 ++++++++++++++------ app/views/campaigns/edit.html.erb | 6 +- app/views/campaigns/index.html.erb | 8 +- app/views/campaigns/new.html.erb | 3 +- app/views/campaigns/show.html.erb | 153 ++++++++++------------- 7 files changed, 204 insertions(+), 135 deletions(-) diff --git a/app/assets/stylesheets/campaign.css.scss b/app/assets/stylesheets/campaign.css.scss index 817b1b0..297b30f 100644 --- a/app/assets/stylesheets/campaign.css.scss +++ b/app/assets/stylesheets/campaign.css.scss @@ -1,4 +1,4 @@ -$medgray: #666; +$medgray: #3A9AC9; .videolisting { label { @@ -12,10 +12,37 @@ $medgray: #666; .odd { background-color: $medgray; padding: 10px; + .help-block{ + color: #ccc; + } + } .even { background-color: lighten($medgray, 50); padding: 10px; } + + .even, .odd { + .help-block{ + color: #ccc; + } + } } +input { + width:100%; +} + +input[type="submit"]{ + width: 131px +} + + +textarea { + width:100%; + height: 5em; +} + +select { + width:100%; +} \ No newline at end of file diff --git a/app/controllers/campaigns_controller.rb b/app/controllers/campaigns_controller.rb index f03547c..693a02c 100644 --- a/app/controllers/campaigns_controller.rb +++ b/app/controllers/campaigns_controller.rb @@ -43,7 +43,7 @@ class CampaignsController < ApplicationController else respond_to do |format| format.json { render json: {error: @campaign.errors.full_messages } } - format.html { render action: 'edit' } + format.html { render action: 'edit' } end end end diff --git a/app/views/campaigns/_form.html.erb b/app/views/campaigns/_form.html.erb index c740d52..d24e01c 100644 --- a/app/views/campaigns/_form.html.erb +++ b/app/views/campaigns/_form.html.erb @@ -1,4 +1,9 @@ -<%= simple_form_for(@campaign, url: @action, html: {class: 'form-horizontal'}) do |frm| %> +<%= simple_form_for(@campaign, url: @action, wrapper_mappings: { + check_boxes: :vertical_radio_and_checkboxes, + radio_buttons: :vertical_radio_and_checkboxes, + file: :vertical_file_input, + boolean: :vertical_boolean +}) do |frm| %>
@@ -21,49 +26,112 @@
- <%= frm.input :clientid, label: 'Client ID' %> - <%= frm.input :listingcode, label: 'Listing Code' %> - <%= frm.input :websiteurl, label: 'Website URL'%> - <%= frm.input :advertisername, label: 'Advertiser Name' %> - <%= frm.input :billingcode, label: 'Billing Code' %> - <%= frm.input :emailaddress, label: 'Email Address' %> - <%= frm.input :businessphone, label: 'Business Phone' %> - <%= frm.input :contactphone, label: 'Contact Phone' %> - <%= frm.input :customerfirstname, label: 'Customer First Name' %> - <%= frm.input :customerlastname, label: 'Customer Last Name' %> - <%= frm.input :address, label: 'Address' %> - <%= frm.input :city, label: 'City' %> - <%= frm.input :state, label: 'State' %> - <%= frm.input :zip, label: 'ZIP' %> - - <%= frm.input :awards, label: 'Awards' %> - <%= frm.input :background, label: 'Background' %> - <%= frm.input :categories, label: 'Categories' %> - <%= frm.input :companycolors, label: 'Company Colors' %> - <%= frm.input :description, label: 'Description' %> - <%= frm.input :facebookurl, label: 'Facebook URL' %> - <%= frm.input :productsandservices, label: 'Products & Services' %> - <%= frm.input :targetaudience, label: 'Target Audience' %> - <%= frm.input :tollfreephone, label: 'Tollfree Phone' %> - <%= frm.input :vpa, label: 'Client Service Rep' %> + <%= frm.input :clientid, + label: 'Client ID', + hint: 'An identifier provided by BetterVideo.' %> + <%= frm.input :listingcode, + label: 'Listing Code', + hint: "This should be the same as Intake Form's Form Hash." %> + <%= frm.input :websiteurl, + label: 'Website URL', + hint: "Used for script research and may be used in the video if they are including websites in the video graphics." %> + <%= frm.input :advertisername, + label: 'Advertiser Name', + hint: "The name of the company." %> + <%= frm.input :vpa, + label: 'Client Service Rep', + hint: "This is the full name of the client services representative, as entered in the BetteVideo system associated with this order. This feature is designed for sales reps that are well known to the system. This feature is typically used for automated communication." %> + <%= frm.input :billingcode, + label: 'Billing Code', + hint: "Market or billing code. Should match a billing code in the BetterVideo system so it can be associated." %> + <%= frm.input :emailaddress, + label: 'Email Address' %> + <%= frm.input :businessphone, + label: 'Business Phone' %> + <%= frm.input :contactphone, + label: 'Contact Phone' %> + <%= frm.input :customerfirstname, + label: 'Customer First Name' %> + <%= frm.input :customerlastname, + label: 'Customer Last Name' %> + <%= frm.input :address, + label: 'Address' %> + <%= frm.input :city, + label: 'City' %> + <%= frm.input :state, + label: 'State' %> + <%= frm.input :zip, + label: 'ZIP' %> + <%= frm.input :awards, + label: 'Awards', + hint: "Used in script and video research." %> + <%= frm.input :background, + label: 'Background', + hint: "This is the background of the company and is used for script research." %> + <%= frm.input :categories, + label: 'Categories', + hint: "Used in script and video research." %> + <%= frm.input :companycolors, + label: 'Company Colors', + hint: "Comma Separated.", + placeholder: "ex: red, white, blue" %> + <%= frm.input :description, + label: 'Description', + hint: "Used for script research." %> + <%= frm.input :facebookurl, + label: 'Facebook URL', + hint: "Used for script and photo research." %> + <%= frm.input :productsandservices, + label: 'Products & Services', + hint: "Used in script and video research." %> + <%= frm.input :targetaudience, + label: 'Target Audience', + hint: "Used in script and video research." %> + <%= frm.input :tollfreephone, + label: 'Tollfree Phone', + hint: "Toll-free phone number of business. Used in video creation." %>
<%= frm.simple_fields_for(:videolistings, html: {class: 'form-horizontal'}) do |vidlist| %>
- <%= vidlist.input :videocode, label: 'Video Code' %> - <%= vidlist.input :producttypeid, label: "Product Type", collection: producttypeid_list %> - <%= vidlist.input :voiceoverselection, label: 'Voiceover Selection', collection: voiceoverselection_list %> - <%= vidlist.input :musicselection, label: 'Music Selection', collection: musicselection_list %> - <%= vidlist.input :clientprovidedscript, label: 'Client Provided Script' %> - <%= vidlist.input :keywords, label: 'Keywords' %> - <%= vidlist.input :focus, label: 'Focus' %> - <%= vidlist.input :notes, label: 'Notes' %> - <%= vidlist.input :asseturls, label: 'Asset Urls' %> + <%= vidlist.input :videocode, + label: 'Video Code', + hint: "Unique identifier for every video." %> + <%= vidlist.input :producttypeid, + label: "Product Type", + collection: producttypeid_list, + hint: "What type of content to create for this video. The types available are dependant on the pre-defined list of products." %> + <%= vidlist.input :voiceoverselection, + label: 'Voiceover Selection', + collection: voiceoverselection_list, + hint: "What type of voiceover talent to use." %> + <%= vidlist.input :musicselection, + label: 'Music Selection', + collection: musicselection_list, + hint: "What type of music to use in the video." %> + <%= vidlist.input :clientprovidedscript, + label: 'Client Provided Script', + as: 'text', + hint: "If the customer has provided a script for BetterVideo to use. Formatting is text only." %> + <%= vidlist.input :keywords, + label: 'Keywords', + hint: "Keywords for use in VSEO campaigns or indexing such as Google or YouTube." %> + <%= vidlist.input :focus, + label: 'Focus', + hint: "Information used to guide BetterVideo in creating the video." %> + <%= vidlist.input :notes, + label: 'Notes', + hint: "Notes and/or instructions sent in this field are used by the editors to aid in production of the video." %> + <%= vidlist.input :asseturls, + as: 'text', + label: 'Asset Urls', + placeholder: "ex: http://www.company.com/logo.png, http://www.company.com/background.png", + hint: "A comma separated list of URLs of any assets." %>
<% end %>
diff --git a/app/views/campaigns/edit.html.erb b/app/views/campaigns/edit.html.erb index 992234e..256a1f9 100644 --- a/app/views/campaigns/edit.html.erb +++ b/app/views/campaigns/edit.html.erb @@ -1,6 +1,6 @@ +<%= link_to 'Show', @campaign %> | +<%= link_to 'Back', campaigns_path %> +

Editing campaign

<%= render 'form' %> - -<%= link_to 'Show', @campaign %> | -<%= link_to 'Back', campaigns_path %> diff --git a/app/views/campaigns/index.html.erb b/app/views/campaigns/index.html.erb index 531faad..45fd0b4 100644 --- a/app/views/campaigns/index.html.erb +++ b/app/views/campaigns/index.html.erb @@ -2,14 +2,14 @@ + + - - @@ -19,13 +19,13 @@ <% @campaigns.each do |campaign| %> - + + - diff --git a/app/views/campaigns/new.html.erb b/app/views/campaigns/new.html.erb index b219e95..92f70bc 100644 --- a/app/views/campaigns/new.html.erb +++ b/app/views/campaigns/new.html.erb @@ -1,5 +1,6 @@ +<%= link_to 'Back', campaigns_path %> +

New campaign

<%= render 'form' %> -<%= link_to 'Back', campaigns_path %> diff --git a/app/views/campaigns/show.html.erb b/app/views/campaigns/show.html.erb index 7ab3681..ae95b5f 100644 --- a/app/views/campaigns/show.html.erb +++ b/app/views/campaigns/show.html.erb @@ -1,97 +1,70 @@ <%= link_to 'Edit', edit_campaign_path(@campaign.listingcode) %> | <%= link_to 'Back', campaigns_path %> -
-
-

<%= notice %>

-

- Clientid: - <%= @campaign.clientid %> -

+
+

+ <%= @campaign.advertisername %> +

+

<%= notice %>

-

- Listingcode: - <%= @campaign.listingcode %> -

- -

- Billingcode: - <%= @campaign.billingcode %> -

- -

- Advertisername: - <%= @campaign.advertisername %> -

- -

- Address1: - <%= @campaign.address %> -

- -

- City: - <%= @campaign.city %> -

- -

- State: - <%= @campaign.state %> -

- -

- Zip: - <%= @campaign.zip %> -

- -

- Emailaddress: - <%= @campaign.emailaddress %> -

- -

- Customerfirstname: - <%= @campaign.customerfirstname %> -

- -

- Customerlastname: - <%= @campaign.customerlastname %> -

- - -

- Businessphone: - <%= @campaign.businessphone %> -

- -

- Description: - <%= @campaign.description %> -

- - -

- Contactphone: - <%= @campaign.contactphone %> -

- -

- Websiteurl: - <%= @campaign.websiteurl %> -

-
-
-
    - <% @campaign.videolistings.each do |videolisting| %> - <%= render 'videolisting', videolisting: videolisting %> - <% end %> - - <% if @campaign.videolistings.empty? %> -
  • No Video Listings for this Campaign.
  • - <% end %> - -
+
+
+
+ Clientid: + <%= @campaign.clientid %> + + Listingcode: + <%= @campaign.listingcode %> + + Billingcode: + <%= @campaign.billingcode %> + + Address1: + <%= @campaign.address %> + + City: + <%= @campaign.city %> + + State: + <%= @campaign.state %> + + Zip: + <%= @campaign.zip %> + + Email Address: + <%= @campaign.emailaddress %> + + Customer First Name: + <%= @campaign.customerfirstname %> + + Customer Last Name: + <%= @campaign.customerlastname %> + + Businessphone: + <%= @campaign.businessphone %> + + Description: + <%= @campaign.description %> + + Contactphone: + <%= @campaign.contactphone %> + + Websiteurl: + <%= @campaign.websiteurl %> +
+
+
    + <% @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
Listing Code(Form Hash)Processed? Client IDListing Code Billing Code Address City State ZIPProcessed?
<%= link_to campaign.listingcode, campaign_path(campaign.listingcode) %><%= campaign.listingcode %> <%= campaign.clientid %> <%= campaign.billingcode %> <%= campaign.address %> <%= campaign.city %> <%= campaign.state %> <%= campaign.zip %><%= campaign.processed? %> <%= link_to 'Edit', edit_campaign_path(campaign.listingcode) %> <%= link_to 'Destroy', campaign_path(campaign.listingcode), method: :delete, data: { confirm: 'Are you sure?' } %>