Permalink
Browse files

Merge branch 'master' into wikipedia

  • Loading branch information...
2 parents 971de94 + 14a4e37 commit 8f15d241af4d9a2866daf0e63497124b6daeac0a @lukebaker lukebaker committed Dec 14, 2011
@@ -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,
@@ -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,
@@ -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,
@@ -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?
@@ -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)
@@ -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"}
@@ -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
@@ -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
@@ -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%;'}

0 comments on commit 8f15d24

Please sign in to comment.