From 51a74966d0d9d05460dc29496eae8b29efdd26ab Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Thu, 9 Apr 2015 17:47:58 -0300 Subject: [PATCH] Remove view_type option for group block --- lib/pairwise_plugin/questions_group_list_block.rb | 5 +---- views/blocks/questions_group_menu.html.erb | 99 --------------------------------------------------------------------------------------------------- views/box_organizer/pairwise_plugin/_questions_group_list_block.html.erb | 4 ---- 3 files changed, 1 insertion(+), 107 deletions(-) delete mode 100644 views/blocks/questions_group_menu.html.erb diff --git a/lib/pairwise_plugin/questions_group_list_block.rb b/lib/pairwise_plugin/questions_group_list_block.rb index a97f2f4..09b5321 100644 --- a/lib/pairwise_plugin/questions_group_list_block.rb +++ b/lib/pairwise_plugin/questions_group_list_block.rb @@ -9,11 +9,8 @@ class PairwisePlugin::QuestionsGroupListBlock < Block end settings_items :group_description, :type => String - settings_items :view_type, :type => String, :default => 'menu' - attr_accessible :group_description, :questions_ids, :random_sort, :view_type - - AVAILABLE_VIEW_TYPES = [[_('Menu'), 'menu'], [_('List'), 'list']] + attr_accessible :group_description, :questions_ids, :random_sort def content(args={}) block = self diff --git a/views/blocks/questions_group_menu.html.erb b/views/blocks/questions_group_menu.html.erb deleted file mode 100644 index 8a4d8ea..0000000 --- a/views/blocks/questions_group_menu.html.erb +++ /dev/null @@ -1,99 +0,0 @@ -<% extend PairwisePlugin::Helpers::ViewerHelper %> -<% questions = block.questions_for_view || [] %> - -
-
- - - - - - <%= _('Select theme') %> - <% if questions.count > 1 %> - - <% end %> -
-
- <% if block.questions.blank? %> - <%= _("Empty") %> - <% else %> - <% questions.each_with_index do |pairwise_content, index| %> - <%#= 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 %> -
-
- - diff --git a/views/box_organizer/pairwise_plugin/_questions_group_list_block.html.erb b/views/box_organizer/pairwise_plugin/_questions_group_list_block.html.erb index 963f676..da9d4f5 100644 --- a/views/box_organizer/pairwise_plugin/_questions_group_list_block.html.erb +++ b/views/box_organizer/pairwise_plugin/_questions_group_list_block.html.erb @@ -11,10 +11,6 @@

<%= _('Description:') %>

<%= text_area(:block, :group_description, :rows => 6, :cols => 50) %> -
-

<%= _('Choose a view type:') %>

- <%= select_tag "block[view_type]", options_for_select(PairwisePlugin::QuestionsGroupListBlock::AVAILABLE_VIEW_TYPES, @block.view_type) %> -

<%= _('Choose which attributes should be displayed and drag to reorder them:') %>