Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changing copy and styling

  • Loading branch information...
commit 9947797e69e0e333ea3a80b19882960f79a2adc2 1 parent 65ff5c4
@nherzing nherzing authored
View
1  data/sms_prices.yml
@@ -9,4 +9,3 @@ tropo:
US: .01
plivo:
US: .008
-
View
3  lib/crowdring/crowdring.rb
@@ -24,6 +24,7 @@ def self.service_handler
register Sinatra::Reloader
service_handler.add('voice_logger', VoiceLoggingService.new(['+18001111111', '+555130793000', '+18002222222', '+919102764633','+27114891922'], output: true))
service_handler.add('sms_logger', SMSLoggingService.new(['+18001111111', '+18002222222', '27800', '+919102764622', '+27114891911'], output: true))
+ service_handler.add('twilio', TwilioService.new(ENV["TWILIO_ACCOUNT_SID"], ENV["TWILIO_AUTH_TOKEN"]))
end
configure :production do
@@ -351,7 +352,7 @@ def process_request(service_name, request, response_type)
@countries = @campaign.ringers.map(&:country).uniq
@all_fields = CsvField.all_fields
@basic_chart = HighChartsBuilder.basic_stats(@campaign)
- @sms_cost = SMSPrices.price_for(CompositeService.instance.service_for(:sms, @campaign.sms_number.raw_number), @campaign.sms_number.raw_number)
+ @sms_cost = SMSPrices.price_for(CompositeService.instance.service_for(:sms, @campaign.sms_number.raw_number), @campaign.sms_number)
haml :campaign, layout: !request.xhr?
else
View
39 lib/public/stylesheets/application.less
@@ -16,6 +16,18 @@
}
+.clearfix {display:block;}
+.clearfix:after {
+ clear: both;
+ content: ' ';
+ display: block;
+ font-size: 0;
+ line-height: 0;
+ visibility: hidden;
+ width: 0;
+ height: 0;
+}
+
body {
font-family: @body-font;
background: @background-dark;
@@ -183,6 +195,10 @@ body {
display: inline-block;
}
+ #sms-number {
+ margin-top: 40px;
+ }
+
#selected-regions {
margin: 10px;
}
@@ -198,15 +214,22 @@ body {
height: 50px;
padding-bottom: 20px;
- .edit-goal-link {
- padding-top: 15px;
- float: right;
- }
-
- .goal-cost {
- padding-top: 15px;
- padding-right: 10px;
+ .goal-data {
float: right;
+ text-align: right;
+ .edit-goal-link {
+ padding-top: 15px;
+ }
+
+ .goal-cost {
+ padding-top: 15px;
+ padding-right: 10px;
+
+ .total {
+ display: inline;
+ font-size: 25px;
+ }
+ }
}
}
#campaign-details {
View
2  lib/views/asks/join_ask.haml
@@ -1,3 +1,3 @@
-%h3 Join Ask
+%h3 Join ask
%div="#{ask.recipients.count} recipients / #{ask.respondents.count} respondents"
=haml :message, locals: {message: ask.message}
View
2  lib/views/asks/offline_ask.haml
@@ -1,2 +1,2 @@
-%h3 Offline Ask
+%h3 Offline ask
="#{ask.respondents.count} respondents"
View
2  lib/views/asks/send_sms_ask.haml
@@ -1,4 +1,4 @@
-%h3 Send SMS Ask
+%h3 Send a text message
%h4 Initial Cost Estimate
=haml :price_estimate, locals: {price_estimate: ask.initial_price_estimate(@campaign.ringers, @campaign.sms_number.raw_number)}
View
2  lib/views/asks/text_ask.haml
@@ -1,4 +1,4 @@
-%h3 Text Ask
+%h3 Request a text message
%h4 Initial Cost Estimate
=haml :price_estimate, locals: {price_estimate: ask.initial_price_estimate(@campaign.ringers, @campaign.sms_number.raw_number)}
="#{ask.respondents.count} recipients / #{ask.recipients.count} respondents"
View
2  lib/views/asks/voicemail_ask.haml
@@ -1,4 +1,4 @@
-%h3 Voicemail Ask
+%h3 Request a voice message
%h4 Initial Cost Estimate
=haml :price_estimate, locals: {price_estimate: ask.initial_price_estimate(@campaign.ringers, @campaign.sms_number.raw_number)}
%div="#{ask.recipients.count} recipients / #{ask.respondents.count} respondents"
View
2  lib/views/auth/index.haml
@@ -1,5 +1,5 @@
#sinatra_authentication.rounded-box
- %h1.page_title Users
+ %h1.page_title Lords of the Crowdring
%table
%tr
%th
View
38 lib/views/campaign.haml
@@ -23,29 +23,33 @@
#campaign-overview
#progress-wrapper
=haml :campaign_progress, locals: {campaign: @campaign}
- %a.edit-goal-link{href: "/campaign/#{@campaign.id}/edit-goal"} edit goal
- .goal-cost
- -if @sms_cost
- ="Cost to reach #{@campaign.goal} ringers: #{@campaign.goal} text messages x $#{@sms_cost} = $#{@campaign.goal * @sms_cost}"
- -else
- ="Unable to calculate cost to reach goal."
+ .goal-data
+ %a.edit-goal-link{href: "/campaign/#{@campaign.id}/edit-goal"}= "edit goal: #{@campaign.goal}"
+ .goal-cost
+ -if @sms_cost
+ One cost to text them all
+ .total=sprintf '$%.2f', (@campaign.goal * @sms_cost)
+ -else
+ ="unable to calculate cost to reach goal."
#campaign-details
%h2= "Title: #{@campaign.title}"
#voice-number
=haml :voice_numbers, locals:{campaign: @campaign}
- %a{href: "/campaign/#{@campaign.id}/assign_voice_number"} Need another number?
- %h2 SMS Number
- %h3
- -if @campaign.sms_number
- =@campaign.sms_number.pretty_phone_number
- -if @sms_cost
- %h4="Cost per text message: $#{@sms_cost}"
- %h5="(Assuming messages are sent to #{@campaign.sms_number.country_abbreviation} numbers)"
+ %form{action: "/campaign/#{@campaign.id}/assign_voice_number", method: 'post'}
+ %button{type: 'submit'} I need another number
+ #sms-number
+ %h2 Text Number
+ %h3
+ -if @campaign.sms_number
+ =@campaign.sms_number.pretty_phone_number
+ -if @sms_cost
+ %h4="Estimated cost per text message: $#{@sms_cost}"
+ -else
+ %h4 Cost per text message: Unknown.
-else
- %h4 Cost per text message: Unknown.
- -else
- No SMS number selected
+ No Text number selected
#campaign-ringers
+ %h2 Ringers
.counts
%h4.total_count
= "#{@ring_count} " + (@ring_count !=1 ? 'Total Rings' : 'Total Ring')
View
17 lib/views/index.haml
@@ -1,17 +1,18 @@
#new-campaign
%form{action: '/campaign/new', method: 'get'}
%button New Campaign
+ %h2 Campaigns
+ .clearfix
+ -if @campaigns.empty?
+ No campaigns currently running
+ -else
+ -@campaigns.each do |campaign|
+ = haml :campaign_preview, locals: {campaign: campaign}
+ %h2 Voice Unsubscribe
.rounded-box
- %h3 Unsubscribe Numbers
- %p When called, these numbers unsubscribe the caller from all future communications.
+ %p For a user to unsubscribe, they can call:
-@unsubscribe_numbers.each do |n|
= haml :unsubscribe_number, locals: {number: n}
%form{action: '/unsubscribe_numbers/new', method: 'get'}
%button Add Another
%h3= "Total Unsubscribes: #{@unsubscribed_count}"
- %h2 Campaigns
- -if @campaigns.empty?
- No campaigns currently running
- -else
- -@campaigns.each do |campaign|
- = haml :campaign_preview, locals: {campaign: campaign}
View
2  lib/views/message.haml
@@ -2,7 +2,7 @@
%h3 Messages
#messages
-message.nondefault_messages.each do |fm|
- %label When:
+ %label If:
.message
-fm.tag_filter.tags.each do |tag|
%li= tag
View
2  lib/views/price_estimate.haml
@@ -1,4 +1,4 @@
.price-estimate
- ="Total: #{price_estimate.total_price}"
+ ="Total: $#{price_estimate.total_price}"
="Unpriceable: #{price_estimate.unpriceable_items.count}"
="Total Items: #{price_estimate.total_item_count}"
View
4 lib/views/voice_numbers.haml
@@ -5,8 +5,8 @@
-else
-campaign.voice_numbers.each do |voice_number|
.assigned-number
- .number=voice_number.pretty_phone_number
+ %h3=voice_number.pretty_phone_number
.description= "Description: #{voice_number.description}"
%form{action: "/campaign/#{campaign.id}/assigned_voice_number/#{voice_number.id}/destroy", method: 'post'}
- %button{type: 'submit'} release
+ %button{type: 'submit'} I'm done with this number
%hr
Please sign in to comment.
Something went wrong with that request. Please try again.