diff --git a/app/design_blocks/favorite_links_profile/controllers/favorite_links_profile_controller.rb b/app/design_blocks/favorite_links_profile/controllers/favorite_links_profile_controller.rb deleted file mode 100644 index caf31a6..0000000 --- a/app/design_blocks/favorite_links_profile/controllers/favorite_links_profile_controller.rb +++ /dev/null @@ -1,7 +0,0 @@ -class FavoriteLinksProfileController < FavoriteLinksController - - needs_profile - - acts_as_design_block - -end diff --git a/app/design_blocks/favorite_links_profile/models/favorite_links_profile.rb b/app/design_blocks/favorite_links_profile/models/favorite_links_profile.rb deleted file mode 100644 index c30bef1..0000000 --- a/app/design_blocks/favorite_links_profile/models/favorite_links_profile.rb +++ /dev/null @@ -1,7 +0,0 @@ -class FavoriteLinksProfile < FavoriteLinks - - def self.description - _('Favorite Links') - end - -end diff --git a/app/design_blocks/list_block/controllers/list_block_controller.rb b/app/design_blocks/list_block/controllers/list_block_controller.rb deleted file mode 100644 index 1f83b3a..0000000 --- a/app/design_blocks/list_block/controllers/list_block_controller.rb +++ /dev/null @@ -1,58 +0,0 @@ -class ListBlockController < ApplicationController - - # This controller always has the object @design_block available to it. - # The method acts_as_design_block load a before_filter that always load - # this object. - - needs_profile - - acts_as_design_block - - # You must have a hash on format: - # { - # 'action name' => 'How the action will be displayed on menu' - # } - # - # EX: - # CONTROL_ACTION_OPTIONS = { - # 'design_edit' => _('Edit'), - # 'manage_links' => _('Manage Links') - # } - # - # This hash will define the options menu on edit mode. - CONTROL_ACTION_OPTIONS = { - 'edit' => _('Edit') - } - - - ########################### - # Mandatory methods - ########################### - - def index - @elements = @design_block.elements - design_render :action => @design_block.view - end - - ########################### - # Other Sample of methods - ########################### - - - def edit - @elements_types = @design_block.elements_types - design_render_on_edit :controller => 'list_block', :action => 'edit' - end - - def save - if @design_block.update_attributes(params[:design_block]) - design_render_on_edit :controller => 'list_block', :action => 'show' - else - design_render_on_edit :nothing => true - end - end - - def show - end - -end diff --git a/app/design_blocks/list_block/helpers/list_block_helper.rb b/app/design_blocks/list_block/helpers/list_block_helper.rb deleted file mode 100644 index 6887d0f..0000000 --- a/app/design_blocks/list_block/helpers/list_block_helper.rb +++ /dev/null @@ -1,3 +0,0 @@ -module ListBlockHelper - -end diff --git a/app/design_blocks/list_block/models/list_block.rb b/app/design_blocks/list_block/models/list_block.rb deleted file mode 100644 index bb68509..0000000 --- a/app/design_blocks/list_block/models/list_block.rb +++ /dev/null @@ -1,54 +0,0 @@ -class ListBlock < Design::Block - - # Define an specific method using the settings hash serialized - # variable to keep the value desired by method. - # - # EX: - # def max_number_of_element= value - # self.settings[:limit_number] = value - # end - - def self.description - _('List Block') - end - - def limit_number= value - self.settings[:limit_number] = value.to_i == 0 ? nil : value.to_i - end - - def limit_number - self.settings[:limit_number] - end - - def elements_types - ['Person', 'Enterprise'] - end - - def element_type - self.settings[:element_type] - end - - def element_type= value - return nil unless elements_types.include?(value) - self.settings[:element_type] = value - end - - def elements - return nil unless element_type - self.element_type.constantize.find(:all, :limit => limit_number) - end - - def view - return 'nothing' unless element_type - element_type.to_s.underscore - end - - def display_block - 'true' - end - - def display_header - 'true' - end - -end diff --git a/app/design_blocks/list_block/views/edit.rhtml b/app/design_blocks/list_block/views/edit.rhtml deleted file mode 100644 index eb73e80..0000000 --- a/app/design_blocks/list_block/views/edit.rhtml +++ /dev/null @@ -1,22 +0,0 @@ -
- - <%= text_field 'design_block', 'title'%> -
- -- - <%= select 'design_block', 'element_type', @elements_types %> -
- -- - <%= text_field 'design_block', 'limit_number'%> -
- - <% button_bar do %> - <%= submit_button('save', _('Save')) %> - <% end %> -<% end %> diff --git a/app/design_blocks/list_block/views/enterprise.rhtml b/app/design_blocks/list_block/views/enterprise.rhtml deleted file mode 100644 index aa8a8d5..0000000 --- a/app/design_blocks/list_block/views/enterprise.rhtml +++ /dev/null @@ -1,6 +0,0 @@ -<%= _('Limit number of people: ') %> <%= @design_block.limit_number %>
diff --git a/app/design_blocks/profile_info_block/controllers/profile_info_block_controller.rb b/app/design_blocks/profile_info_block/controllers/profile_info_block_controller.rb deleted file mode 100644 index fbcf6d5..0000000 --- a/app/design_blocks/profile_info_block/controllers/profile_info_block_controller.rb +++ /dev/null @@ -1,52 +0,0 @@ -class ProfileInfoBlockController < ApplicationController - - # This controller always has the object @design_block available to it. - # The method acts_as_design_block load a before_filter that always load - # this object. - - needs_profile - - acts_as_design_block - - # You must have a hash on format: - # { - # 'action name' => 'How the action will be displayed on menu' - # } - # - # EX: - # CONTROL_ACTION_OPTIONS = { - # 'design_edit' => _('Edit'), - # 'manage_links' => _('Manage Links') - # } - # - # This hash will define the options menu on edit mode. - CONTROL_ACTION_OPTIONS = { - 'edit' => _('Edit') - } - - - ########################### - # Mandatory methods - ########################### - - def index - @info = @profile.info - @can_edit = current_user.person.has_permission?('edit_profile', @profile) - design_render - end - - ########################### - # Other Sample of methods - ########################### - - def edit - design_render_on_edit - end - - def save - @design_block.update_attributes(params[:design_block]) - design_render_on_edit :nothing => true - end - - -end diff --git a/app/design_blocks/profile_info_block/helpers/profile_info_block_helper.rb b/app/design_blocks/profile_info_block/helpers/profile_info_block_helper.rb deleted file mode 100644 index 9d0344f..0000000 --- a/app/design_blocks/profile_info_block/helpers/profile_info_block_helper.rb +++ /dev/null @@ -1,3 +0,0 @@ -module ProfileInfoBlockHelper - -end diff --git a/app/design_blocks/profile_info_block/models/profile_info_block.rb b/app/design_blocks/profile_info_block/models/profile_info_block.rb deleted file mode 100644 index faa9a50..0000000 --- a/app/design_blocks/profile_info_block/models/profile_info_block.rb +++ /dev/null @@ -1,23 +0,0 @@ -class ProfileInfoBlock < Design::Block - - # Define an specific method using the settings hash serialized - # variable to keep the value desired by method. - # - # EX: - # def max_number_of_element= value - # self.settings[:limit_number] = value - # end - - def self.description - 'ProfileInfoBlock' - end - - def title - self.settings[:title] - end - - def title= value - self.settings[:title] = value - end - -end diff --git a/app/design_blocks/profile_info_block/views/edit.rhtml b/app/design_blocks/profile_info_block/views/edit.rhtml deleted file mode 100644 index 4f69f64..0000000 --- a/app/design_blocks/profile_info_block/views/edit.rhtml +++ /dev/null @@ -1,12 +0,0 @@ -- - <%= text_field 'design_block', 'title'%> -
- - <% button_bar do %> - <%= submit_button('save', _('Save')) %> - <% end %> -<% end %> diff --git a/app/design_blocks/profile_info_block/views/index.rhtml b/app/design_blocks/profile_info_block/views/index.rhtml deleted file mode 100644 index 9f03d83..0000000 --- a/app/design_blocks/profile_info_block/views/index.rhtml +++ /dev/null @@ -1,6 +0,0 @@ -<%= image_tag @profile.image.public_filename(:thumb) if @profile.image %>- - <%= text_field 'design_block', 'title'%> -
- -- - <%= select 'design_block', 'article_id', @articles.map{|a|[a.full_name, a.id]} %> -
- - <% button_bar do %> - <%= submit_button('save', _('Save')) %> - <% end %> -<% end %> diff --git a/app/design_blocks/view_article/views/index.rhtml b/app/design_blocks/view_article/views/index.rhtml deleted file mode 100644 index a9f1752..0000000 --- a/app/design_blocks/view_article/views/index.rhtml +++ /dev/null @@ -1 +0,0 @@ -<%= @design_block.article.to_html if @design_block.article %> -- libgit2 0.21.2