Commit a8618196ea5d111944e65c8ec3ed07321a2d0552
1 parent
859bb0ba
Exists in
master
Organize questions visualization
Showing
4 changed files
with
53 additions
and
32 deletions
Show diff stats
public/style.css
... | ... | @@ -461,11 +461,12 @@ div.pairwise_group_menu_container .questions-menu .menu { |
461 | 461 | width: 96%; |
462 | 462 | z-index: 999; |
463 | 463 | padding: 10px; |
464 | - top: 45px; | |
464 | + top: 17px; | |
465 | 465 | box-shadow: -5px 7px 10px #888888; |
466 | 466 | } |
467 | -div.pairwise_group_menu_container .questions-menu .menu .item a { | |
468 | - text-decoration: none; | |
467 | +div.pairwise_group_menu_container .questions-menu .menu .item { | |
468 | + cursor: pointer; | |
469 | + color: rgb(107, 107, 107); | |
469 | 470 | } |
470 | 471 | div.pairwise_group_menu_container .questions-menu .menu .label { |
471 | 472 | color: rgb(175, 175, 175); | ... | ... |
views/blocks/questions_group_menu.html.erb
1 | 1 | <% extend PairwisePlugin::Helpers::ViewerHelper %> |
2 | 2 | <% questions = block.questions_for_view || [] %> |
3 | 3 | |
4 | -<%= block_title(block.title) %> | |
5 | - | |
6 | 4 | <div id='pairwise_group_list_block_<%= block.id %>' class="pairwise_group_menu_container" data-open-prompt="0"> |
7 | - <div class="description"> | |
8 | - <%= block.group_description %> | |
9 | - </div> | |
10 | - | |
11 | - | |
12 | 5 | <div class="questions-menu clearfix"> |
13 | 6 | <span class="menu-icon"> |
14 | 7 | <span class="icon-bar"></span> |
... | ... | @@ -16,25 +9,51 @@ |
16 | 9 | <span class="icon-bar"></span> |
17 | 10 | </span> |
18 | 11 | <span class="icon-label"><%= _('Select theme') %></span> |
19 | - <div class="menu" style="display: none"> | |
20 | - <div class="label"> | |
21 | - <%= _('Select a theme:') %> | |
22 | - </div> | |
23 | - <div class="items"> | |
24 | - <% questions.each_with_index do |pairwise_content, index| %> | |
25 | - <div class="item <%= pairwise_group_row_classes(index) %>"> | |
26 | - <a href="#"><%= pairwise_content.name %></a> | |
27 | - </div> | |
28 | - <% end %> | |
12 | + <% if questions.count > 1 %> | |
13 | + <div class="menu" style="display: none"> | |
14 | + <div class="label"> | |
15 | + <%= _('Select a specific theme below to vote on proposals:') %> | |
16 | + </div> | |
17 | + <div class="items"> | |
18 | + <% questions.each_with_index do |pairwise_content, index| %> | |
19 | + <div class="item <%= pairwise_group_row_classes(index) %>"> | |
20 | + <%= pairwise_content.name %> | |
21 | + </div> | |
22 | + <% end %> | |
23 | + </div> | |
29 | 24 | </div> |
30 | - </div> | |
25 | + <% end %> | |
31 | 26 | </div> |
32 | 27 | <div class="question container"> |
33 | - <% if block.questions.nil? || block.questions.empty? %> | |
28 | + <% if block.questions.blank? %> | |
34 | 29 | <span><%= _("Empty") %></span> |
35 | 30 | <% else %> |
36 | 31 | <% questions.each_with_index do |pairwise_content, index| %> |
37 | - <%= pairwise_group_content_body(index, pairwise_content) %> | |
32 | + <%#= pairwise_group_content_body(index, pairwise_content) %> | |
33 | + <div class="pairwise_inner_body" id="pairwise_inner_body_<%= pairwise_content.id %>" style="<%= index!=0 ? 'display:none' : '' %>" > | |
34 | + <div id="pairwise_<%= pairwise_content.id %>"> | |
35 | + <div id="pairwise_main" class="pairwise_main"> | |
36 | + <% embeded = params[:embeded] %> | |
37 | + <% question = nil %> | |
38 | + | |
39 | + <%= render :partial => 'content_viewer/menu', :locals => {:embeded => embeded, :pairwise_content => pairwise_content, :active_tab => :prompt} %> | |
40 | + | |
41 | + <div class="pairwise_content"> | |
42 | + <div class="pairwise_body"><%= block.title %></div> | |
43 | + <div class="description"> | |
44 | + <%= block.group_description %> | |
45 | + </div> | |
46 | + <div class=""><%= pairwise_content.title %></div> | |
47 | + <%= render :partial => 'content_viewer/pairwise_prompts', :locals => {:embeded => embeded, :pairwise_content => pairwise_content, :question => question, :source => (defined?(source) ? source : '') } %> | |
48 | + <% if embeded %> | |
49 | + <div class="footer"><%= _('Powered by') + ' ' + pairwise_content.environment.name%></div> | |
50 | + <% end %> | |
51 | + </div> | |
52 | + | |
53 | + <%= render :partial => 'content_viewer/pairwise_skip_vote', :locals => {:embeded => embeded, :pairwise_content => pairwise_content, :question => question, :source => (defined?(source) ? source : '') } %> | |
54 | + </div> | |
55 | + </div> | |
56 | + </div> | |
38 | 57 | <% end %> |
39 | 58 | <% end %> |
40 | 59 | </div> |
... | ... | @@ -43,7 +62,7 @@ |
43 | 62 | <script type="text/javascript"> |
44 | 63 | jQuery(document).ready(function($){ |
45 | 64 | $('.pairwise_group_menu_container .questions-menu .menu-icon').click(function() { |
46 | - $(this).siblings('.menu').toggle('fast'); | |
65 | + $(this).siblings('.menu').toggle(); | |
47 | 66 | }); |
48 | 67 | $('.pairwise_group_menu_container .questions-menu .items .row').click(function() { |
49 | 68 | $('.pairwise_group_menu_container .questions-menu .menu').hide('fast'); | ... | ... |
... | ... | @@ -0,0 +1,8 @@ |
1 | +<div class="skip_vote"> | |
2 | + <%= skip_vote_open_function(pairwise_content) %> | |
3 | +</div> | |
4 | +<div id="skip_vote_reasons_<%= pairwise_content.id %>" class="skip_vote_reasons"> | |
5 | + <% if question %> | |
6 | + <%= render :partial => 'content_viewer/pairwise_skips', :locals => {:embeded => embeded, :pairwise_content => pairwise_content, :question => question, :source => (defined?(source) ? source : '') } %> | |
7 | + <% end %> | |
8 | +</div> | ... | ... |
views/content_viewer/_prompt_body.html.erb
... | ... | @@ -9,14 +9,7 @@ |
9 | 9 | <div class="footer"><%= _('Powered by') + ' ' + pairwise_content.environment.name%></div> |
10 | 10 | <% end %> |
11 | 11 | </div> |
12 | - <div class="skip_vote"> | |
13 | - <%= skip_vote_open_function(pairwise_content) %> | |
14 | - </div> | |
15 | - <div id="skip_vote_reasons_<%= pairwise_content.id %>" class="skip_vote_reasons"> | |
16 | - <% if question %> | |
17 | - <%= render :partial => 'content_viewer/pairwise_skips', :locals => {:embeded => embeded, :pairwise_content => pairwise_content, :question => question, :source => (defined?(source) ? source : '') } %> | |
18 | - <% end %> | |
19 | - </div> | |
12 | + <%= render :partial => 'content_viewer/pairwise_skip_vote', :locals => {:embeded => embeded, :pairwise_content => pairwise_content, :question => question, :source => (defined?(source) ? source : '') } %> | |
20 | 13 | |
21 | 14 | <% if pairwise_content.allow_new_ideas? %> |
22 | 15 | <% if user %> | ... | ... |