/
_cast_votes.html.haml
104 lines (96 loc) · 5.25 KB
/
_cast_votes.html.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
-@item_data, @item_ids = [], []
#cookies-failed.scrollbar_container{:style => "display: none;"}
.aboutpage
%h2 Cookies Blocked
%p
= link_to("Cookies are required", 'http://blog.allourideas.org/post/54515392435/cookies', :target => '_blank')
for voting, and it looks like third-party cookies may be disabled in your browser.
In order to vote, you may
= link_to("vote on the main site", @cast_votes_url, :target => '_blank')
or allow
= link_to("third-party cookies", 'http://en.wikipedia.org/wiki/Third-party_cookie#Privacy_and_third-party_cookies', :target => '_blank')
in your browser.
#voting-container.scrollbar_container
.question_container
%table.question.center.no_padding
%tr
%td#cv_question= @question.attributes['name']
.votebox
%table.full
%tr.prompt.prompter
%td.half.idea.left.vote_cell.rounded{:rel => @question.id, :id => "left_choice_cell"}
= link_to(h(truncate(@left_choice_text, :length => 140, :omission => '…')), "#", :rel => @question.id, :class => 'leftside btn-vote', :id => 'leftside', :choice_id => @left_choice_id, :question_slug => @question.slug, :"data-question_id" => @question.id)
%td{:style => 'width: 4px'}
%td.right.idea.vote_cell.rounded{:rel => @question.id, :id => "right_choice_cell"}
= link_to(h(truncate(@right_choice_text, :length => 140, :omission => '…')), "#", :rel => @question.id, :class => 'rightside btn-vote', :id => 'rightside', :choice_id => @right_choice_id, :question_slug => @question.slug, :"data-question_id" => @question.id)
-if @earl.flag_enabled?
.flag_row
.fleft.no_bottom_padding
= link_to(t('vote.flag_as_inappropriate'), "#flag_inappropriate", :id => 'left_flag', :class=> 'flag_link')
.no_bottom_padding
.fright.no_bottom_padding
= link_to(t('vote.flag_as_inappropriate'), "#flag_inappropriate", :id => 'right_flag',:class => 'flag_link')
%center.cd_container.two_top_margin
.vote-footer
%span.rounded#cant_decide_btn
= t('vote.cant_decide')
%center.add_container
.add_idea
%span.add_idea_button.rounded
= t('vote.add_your_idea_button')
.showmespace
#indicator.indicator{:style => "display:none;"}= image_tag('indicator.gif')
.tellmearea
#initial_notice= t('vote.click_idea_to_start_widget')
#cant_decide_options.no_bottom_padding{:style => 'display:none'}
%h2= t('vote.cant_decide_title')
-cd_options= ['like_both', 'dislike_both', 'dont_know_both_widget']
.cd_options
- cd_options.each do |choice|
.cd_option
.cd_box
%a.rounded{:href=> "##{choice}", :class => choice, 'data-questionid' => @question.id}
=t('vote.cd_'+choice)
- if choice == 'dont_know_left'
.leftside
%em= h(@left_choice_text)
- elsif choice == 'dont_know_right'
.rightside
%em= h(@right_choice_text)
.close_and_submit
%a.close.fleft{:href => '#page1'}
= image_tag("/facebox/closelabel.gif",:title => "close", :class => "close_imag")
.add-box#the_add_box{:style => 'display:none'}
%br
- box_text = t('vote.add_your_idea')
.indicator{:style => "display:none;"}= image_tag('indicator.gif')
.text_field_border.rounded= text_area_tag('new_idea', '', :title => box_text ,:rows => 2, :maxlength => Const::MAX_ITEM_LENGTH, :class => 'new_text_field', :id => 'new_idea_field')
= hidden_field_tag 'default_text', box_text
= hidden_field_tag 'question_id', @question_id
.new_idea_counter
.close_and_submit
%a.close.fleft{:href => '#page1'}
= image_tag("/facebox/closelabel.gif",:title => "close", :class => "close_image")
%span
.new_idea_submit.rounded.fright#submit_btn{:rel => @question.id}= t('vote.submit')
-if @earl.flag_enabled?
#flag_inappropriate.center{:style => 'display:none'}
= t('vote.please_explain_flag')
.text_field_border.rounded= text_area_tag('new_idea', '', :title => '' , :rows => 2, :cols => 55, :class => 'new_text_field', :id => 'new_flag_field')
.close_and_submit
%a.close.flag_close.fleft{:href => '#page1'}
= image_tag("/facebox/closelabel.gif",:title => "close", :class => "close_image")
%span
.flag_submit_button.rounded.fright{:rel => @question.id}= t('vote.submit')
=hidden_field_tag 'prompt_id', @question.attributes['picked_prompt_id']
=hidden_field_tag 'appearance_lookup', @question.attributes['appearance_id']
-content_for :head do
= javascript_include_tag 'jquery.corner', 'widget/jquery.scrollTo'
-content_for :view_javascript do
=render :partial => 'vote_box_js'
.bottom_status.leveling_message{:style => 'display:none'}
#leveling_message_appended
/* Use a table here to fix a small issue with a non-linking space after the first link */
%table.link_style
%td= t('vote.powered_widget') + link_to(t('common.title_widget'), 'http://allourideas.org', :target => '_blank')
%td= link_to(image_tag('widget/lpadded_outgoing_link.png'), 'http://allourideas.org', :target => '_blank')