From a8618196ea5d111944e65c8ec3ed07321a2d0552 Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Wed, 8 Apr 2015 16:45:59 -0300 Subject: [PATCH] Organize questions visualization --- public/style.css | 7 ++++--- views/blocks/questions_group_menu.html.erb | 61 ++++++++++++++++++++++++++++++++++++++++--------------------- views/content_viewer/_pairwise_skip_vote.html.erb | 8 ++++++++ views/content_viewer/_prompt_body.html.erb | 9 +-------- 4 files changed, 53 insertions(+), 32 deletions(-) create mode 100644 views/content_viewer/_pairwise_skip_vote.html.erb diff --git a/public/style.css b/public/style.css index 41b102f..dde517f 100644 --- a/public/style.css +++ b/public/style.css @@ -461,11 +461,12 @@ div.pairwise_group_menu_container .questions-menu .menu { width: 96%; z-index: 999; padding: 10px; - top: 45px; + top: 17px; box-shadow: -5px 7px 10px #888888; } -div.pairwise_group_menu_container .questions-menu .menu .item a { - text-decoration: none; +div.pairwise_group_menu_container .questions-menu .menu .item { + cursor: pointer; + color: rgb(107, 107, 107); } div.pairwise_group_menu_container .questions-menu .menu .label { color: rgb(175, 175, 175); diff --git a/views/blocks/questions_group_menu.html.erb b/views/blocks/questions_group_menu.html.erb index c2d0ed9..f4af79b 100644 --- a/views/blocks/questions_group_menu.html.erb +++ b/views/blocks/questions_group_menu.html.erb @@ -1,14 +1,7 @@ <% extend PairwisePlugin::Helpers::ViewerHelper %> <% questions = block.questions_for_view || [] %> -<%= block_title(block.title) %> -
-
- <%= block.group_description %> -
- -
@@ -16,25 +9,51 @@ <%= _('Select theme') %> -
- <% if block.questions.nil? || block.questions.empty? %> + <% if block.questions.blank? %> <%= _("Empty") %> <% else %> <% questions.each_with_index do |pairwise_content, index| %> - <%= pairwise_group_content_body(index, pairwise_content) %> + <%#= pairwise_group_content_body(index, pairwise_content) %> +
+
+
+ <% embeded = params[:embeded] %> + <% question = nil %> + + <%= render :partial => 'content_viewer/menu', :locals => {:embeded => embeded, :pairwise_content => pairwise_content, :active_tab => :prompt} %> + +
+
<%= block.title %>
+
+ <%= block.group_description %> +
+
<%= pairwise_content.title %>
+ <%= render :partial => 'content_viewer/pairwise_prompts', :locals => {:embeded => embeded, :pairwise_content => pairwise_content, :question => question, :source => (defined?(source) ? source : '') } %> + <% if embeded %> + + <% end %> +
+ + <%= render :partial => 'content_viewer/pairwise_skip_vote', :locals => {:embeded => embeded, :pairwise_content => pairwise_content, :question => question, :source => (defined?(source) ? source : '') } %> +
+
+
<% end %> <% end %>
@@ -43,7 +62,7 @@