Skip to content

Commit

Permalink
Merge branch 'master' into wikipedia
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebaker committed Dec 14, 2011
2 parents 971de94 + 14a4e37 commit 8f15d24
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions app/controllers/prompts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def vote
:ideas => next_prompt['visitor_ideas'].to_i, :ab_test_name => ab_test_name)

result = {
:newleft => truncate(next_prompt['left_choice_text'], {:length => 137}),
:newright => truncate(next_prompt['right_choice_text'], {:length => 137}),
:newleft => truncate(next_prompt['left_choice_text'], :length => 140, :omission => '…'),
:newright => truncate(next_prompt['right_choice_text'], :length => 140, :omission => '…'),
:appearance_lookup => next_prompt['appearance_id'],
:prompt_id => next_prompt['id'],
:leveling_message => leveling_message,
Expand Down Expand Up @@ -58,8 +58,8 @@ def skip
:ideas => next_prompt['visitor_ideas'].to_i, :ab_test_name => ab_test_name)

result = {
:newleft => truncate(next_prompt['left_choice_text'], {:length => 137}),
:newright => truncate(next_prompt['right_choice_text'], {:length => 137}),
:newleft => truncate(next_prompt['left_choice_text'], :length => 140, :omission => '…'),
:newright => truncate(next_prompt['right_choice_text'], :length => 140, :omission => '…'),
:appearance_lookup => next_prompt['appearance_id'],
:prompt_id => next_prompt['id'],
:leveling_message => leveling_message,
Expand Down Expand Up @@ -113,8 +113,8 @@ def flag
:ideas => next_prompt['visitor_ideas'].to_i, :ab_test_name => ab_test_name)

result = {
:newleft => truncate(next_prompt['left_choice_text'], {:length => 137}),
:newright => truncate(next_prompt['right_choice_text'], {:length => 137}),
:newleft => truncate(next_prompt['left_choice_text'], :length => 140, :omission => '…'),
:newright => truncate(next_prompt['right_choice_text'], :length => 140, :omission => '…'),
:appearance_lookup => next_prompt['appearance_id'],
:prompt_id => next_prompt['id'],
:leveling_message => leveling_message,
Expand Down
2 changes: 1 addition & 1 deletion app/views/home/admin.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
-for earl in @earls
-q = @questions_map[earl.question_id] or next
%tr{:class => "row#{(alt = !alt) ? 1 : 2}"}
%td.title= link_to truncate(h(q.attributes['name']), :length => 137), url_for(:controller => :questions, :action => :admin, :id => earl.name)
%td.title= link_to truncate(h(q.attributes['name']), :length => 140, :omission => '…'), url_for(:controller => :questions, :action => :admin, :id => earl.name)
%td= q.votes_count
%td= q.recent_votes
-if current_user.admin?
Expand Down
2 changes: 1 addition & 1 deletion app/views/questions/_idea.html.haml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
%table
%tr
%td= link_to(truncate(h(data), :length => 137), "#", :rel => @question.id, :class => side, :id => side, :choice_id => choice_id, :question_slug => @question.slug)#, :title => data)
%td= link_to(truncate(h(data), :length => 140, :omission => '…'), "#", :rel => @question.id, :class => side, :id => side, :choice_id => choice_id, :question_slug => @question.slug)#, :title => data)
2 changes: 1 addition & 1 deletion app/views/questions/admin.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
%tbody
-for choice in @choices #.sort_by {|x| [(!!x.attributes['active']).to_s, x.data]}
%tr{:class => cycle ("row1", "row2")}
%td.title= link_to truncate(h(choice.data), :length => 137), :action => 'show', :controller => "choices", :id => choice.id, :question_id => @earl.name
%td.title= link_to truncate(h(choice.data), :length => 140, :omission => '…'), :action => 'show', :controller => "choices", :id => choice.id, :question_id => @earl.name
%td.votes= choice.attributes['score'].round.to_s + ' ' + link_to('[?]', '#explanation', :rel => 'facebox')
%td.votes= choice.attributes['user_created'] ? t('admin.user') : t('admin.seed')
%td.votes{:id => "choice_#{choice.id}_status"}
Expand Down
2 changes: 1 addition & 1 deletion app/views/questions/results.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
-alt=false
-for choice in @choices
%tr{:class => "row#{(alt = !alt) ? 1 : 2}"}
%td.title= link_to truncate(h(choice.data), :length => 137), :action => 'show', :controller => "choices", :id => choice.id, :question_id => @earl.name
%td.title= link_to truncate(h(choice.data), :length => 140, :omission => '…'), :action => 'show', :controller => "choices", :id => choice.id, :question_id => @earl.name
%td.votes= choice.attributes['score'].round.to_s + ' ' + link_to('[?]', '#explanation', :rel => 'facebox')
%td
.bar-chart
Expand Down
4 changes: 2 additions & 2 deletions app/views/widget/earls/_cast_votes.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
%table.full
%tr.prompt.prompter
%td.half.idea.left.vote_cell.rounded{:rel => @question.id, :id => "left_choice_cell"}
= link_to(truncate(@left_choice_text, :length => 137), "#", :rel => @question.id, :class => 'leftside', :id => 'leftside', :choice_id => @left_choice_id, :question_slug => @question.slug)
= link_to(truncate(@left_choice_text, :length => 140, :omission => '…'), "#", :rel => @question.id, :class => 'leftside', :id => 'leftside', :choice_id => @left_choice_id, :question_slug => @question.slug)
%td{:style => 'width: 4px'}
%td.right.idea.vote_cell.rounded{:rel => @question.id, :id => "right_choice_cell"}
= link_to(truncate(@right_choice_text, :length => 137), "#", :rel => @question.id, :class => 'rightside', :id => 'rightside', :choice_id => @right_choice_id, :question_slug => @question.slug)
= link_to(truncate(@right_choice_text, :length => 140, :omission => '…'), "#", :rel => @question.id, :class => 'rightside', :id => 'rightside', :choice_id => @right_choice_id, :question_slug => @question.slug)
-if @earl.flag_enabled?
.flag_row
.fleft.no_bottom_padding
Expand Down
2 changes: 1 addition & 1 deletion app/views/widget/questions/results.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
-for choice in @choices
%tr{:class => "row#{(alt = !alt) ? 1 : 2}"}
%td.idea_padding.idea_result
=truncate(h(choice.data), :length => 137)
=truncate(h(choice.data), :length => 140, :omission => '…')
%td{:style => 'text-align: left; width: 20px;'}
.score= choice.attributes['score'].round.to_s
%td{:style => 'text-align: left; width: 30%;'}
Expand Down

0 comments on commit 8f15d24

Please sign in to comment.