From 06e544caeed945dde31bc83e51e0c3d0e2bcca4a Mon Sep 17 00:00:00 2001 From: Luciano Prestes Cavalcanti Date: Wed, 29 Oct 2014 14:17:56 -0200 Subject: [PATCH] Remove manage_software feature from plugin --- controllers/mpog_software_plugin_controller.rb | 23 ----------------------- views/mpog_software_plugin/archive_software.html.erb | 13 ------------- views/profile/_software_tab.html.erb | 8 +------- 3 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 views/mpog_software_plugin/archive_software.html.erb diff --git a/controllers/mpog_software_plugin_controller.rb b/controllers/mpog_software_plugin_controller.rb index 4188476..73b993c 100644 --- a/controllers/mpog_software_plugin_controller.rb +++ b/controllers/mpog_software_plugin_controller.rb @@ -2,29 +2,6 @@ require 'csv' class MpogSoftwarePluginController < ApplicationController include InstitutionHelper - def archive_software - per_page = 10 - scope = SoftwareInfo - @q = params[:q] - @collection = find_by_contents(:community, scope, @q, {:per_page => per_page, :page => params[:npage]})[:results] - end - - def deactivate - community = SoftwareInfo.find(params[:id]).community_id - Community.find(community).deactivate - if params[:from_profile] - redirect_to :back - else - redirect_to :action => 'archive_software' - end - end - - def activate - community = SoftwareInfo.find(params[:id]).community_id - Community.find(community).activate - redirect_to :action => 'archive_software' - end - def check_reactivate_account if request.xhr? and params[:email] result = "" diff --git a/views/mpog_software_plugin/archive_software.html.erb b/views/mpog_software_plugin/archive_software.html.erb deleted file mode 100644 index 324e31c..0000000 --- a/views/mpog_software_plugin/archive_software.html.erb +++ /dev/null @@ -1,13 +0,0 @@ -

<%= _('Manage softwares') %>

- -<%= form_tag( { :action => 'archive_software' }, :method => 'get', :class => 'users-search' ) do %> - -
- <%= render :partial => 'softwares_search_form' %> -
-
- <%= render :partial => 'software_list' %> -
-<% end %> - -<%= render :partial => 'index_buttons' %> \ No newline at end of file diff --git a/views/profile/_software_tab.html.erb b/views/profile/_software_tab.html.erb index d7645ec..1fe15f2 100644 --- a/views/profile/_software_tab.html.erb +++ b/views/profile/_software_tab.html.erb @@ -97,10 +97,4 @@ - - -<% if profile.admins.include? current_person %> - <%= label_tag _("Deactivate Software: ") %> - <%= button_without_text :'deactivate-user', _('Deactivate software'), {:controller => "mpog_software_plugin", :action => 'deactivate', :id => profile.software_info.id, :q => @q, :from_profile => true}, :filter => @filter, :confirm => _("Do you want to deactivate this software?") %> -<% end %> - + \ No newline at end of file -- libgit2 0.21.2