diff --git a/src/gov_user/.gitignore b/src/gov_user/.gitignore deleted file mode 100644 index 783cd5b..0000000 --- a/src/gov_user/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.swp - diff --git a/src/gov_user/controllers/gov_user_plugin_controller.rb b/src/gov_user/controllers/gov_user_plugin_controller.rb deleted file mode 100644 index 80a41db..0000000 --- a/src/gov_user/controllers/gov_user_plugin_controller.rb +++ /dev/null @@ -1,251 +0,0 @@ -#aqui deve ter so usuario e instituicao -class GovUserPluginController < ApplicationController - - def hide_registration_incomplete_percentage - response = false - - if request.xhr? && params[:hide] - session[:hide_incomplete_percentage] = true - response = session[:hide_incomplete_percentage] - end - - render :json=>response.to_json - end - - def create_institution - @show_sisp_field = environment.admins.include?(current_user.person) - @state_list = get_state_list() - @governmental_sphere = [[_("Select a Governmental Sphere"), 0]]|GovernmentalSphere.all.map {|s| [s.name, s.id]} - @governmental_power = [[_("Select a Governmental Power"), 0]]|GovernmentalPower.all.map {|g| [g.name, g.id]} - @juridical_nature = [[_("Select a Juridical Nature"), 0]]|JuridicalNature.all.map {|j| [j.name, j.id]} - @state_options = [[_('Select a state'), '-1']] | @state_list.collect {|state| [state.name, state.name]} - - params[:community] ||= {} - params[:institutions] ||= {} - - if request.xhr? - render :layout=>false - else - redirect_to "/" - end - end - - def split_http_referer http_referer - split_list = [] - split_list = http_referer.split("/") - @url_token = split_list.last - return @url_token - end - - def create_institution_admin - @show_sisp_field = environment.admins.include?(current_user.person) - @state_list = get_state_list() - @governmental_sphere = [[_("Select a Governmental Sphere"), 0]]|GovernmentalSphere.all.map {|s| [s.name, s.id]} - @governmental_power = [[_("Select a Governmental Power"), 0]]|GovernmentalPower.all.map {|g| [g.name, g.id]} - @juridical_nature = [[_("Select a Juridical Nature"), 0]]|JuridicalNature.all.map {|j| [j.name, j.id]} - @state_options = [[_('Select a state'), '-1']] | @state_list.collect {|state| [state.name, state.name]} - - @url_token = split_http_referer request.original_url() - - params[:community] ||= {} - params[:institutions] ||= {} - - end - - def new_institution - redirect_to "/" if params[:community].blank? || params[:institutions].blank? - - response_message = {} - - institution_template = Community["institution"] - add_template_in_params institution_template - - @institutions = private_create_institution - add_environment_admins_to_institution @institutions - - response_message = save_institution @institutions - - if request.xhr? #User create institution - render :json => response_message.to_json - else #Admin create institution - session[:notice] = response_message[:message] # consume the notice - - redirect_depending_on_institution_creation response_message - end - end - - def institution_already_exists - redirect_to "/" if !request.xhr? || params[:name].blank? - - already_exists = !Community.where(:name=>params[:name]).empty? - - render :json=>already_exists.to_json - end - - def get_institutions - redirect_to "/" if !request.xhr? || params[:query].blank? - - list = Institution.search_institution(params[:query]).map{ |institution| - {:value=>institution.name, :id=>institution.id} - } - - render :json => list.to_json - end - - def get_brazil_states - redirect_to "/" unless request.xhr? - - state_list = get_state_list() - render :json=>state_list.collect {|state| state.name }.to_json - end - - def get_field_data - condition = !request.xhr? || params[:query].nil? || params[:field].nil? - return render :json=>{} if condition - - model = get_model_by_params_field - - data = model.where("name ILIKE ?", "%#{params[:query]}%").select("id, name") - .collect { |db| - {:id=>db.id, :label=>db.name} - } - - other = [model.select("id, name").last].collect { |db| - {:id=>db.id, :label=>db.name} - } - - # Always has other in the list - data |= other - - render :json=> data - end - - protected - - def get_model_by_params_field - case params[:field] - when "software_language" - return ProgrammingLanguage - else - return DatabaseDescription - end - end - - def get_state_list - NationalRegion.find( - :all, - :conditions=>["national_region_type_id = ?", 2], - :order=>"name" - ) - end - - def set_institution_type - institution_params = params[:institutions].except(:governmental_power, - :governmental_sphere, - :juridical_nature - ) - if params[:institutions][:type] == "PublicInstitution" - PublicInstitution::new institution_params - else - PrivateInstitution::new institution_params - end - end - - def set_public_institution_fields institution - inst_fields = params[:institutions] - - begin - gov_power = GovernmentalPower.find inst_fields[:governmental_power] - gov_sphere = GovernmentalSphere.find inst_fields[:governmental_sphere] - jur_nature = JuridicalNature.find inst_fields[:juridical_nature] - - institution.juridical_nature = jur_nature - institution.governmental_power = gov_power - institution.governmental_sphere = gov_sphere - rescue - institution.errors.add( - :governmental_fields, - _("Could not find Governmental Power or Governmental Sphere") - ) - end - end - - def private_create_institution - community = Community.new(params[:community]) - community.environment = environment - institution = set_institution_type - - institution.name = community[:name] - institution.community = community - - if institution.type == "PublicInstitution" - set_public_institution_fields institution - end - - institution.date_modification = DateTime.now - institution.save - institution - end - - def add_template_in_params institution_template - com_fields = params[:community] - if !institution_template.blank? && institution_template.is_template - com_fields[:template_id]= institution_template.id unless com_fields.blank? - end - end - - def add_environment_admins_to_institution institution - edit_page = params[:edit_institution_page] == false - if environment.admins.include?(current_user.person) && edit_page - environment.admins.each do |adm| - institution.community.add_admin(adm) - end - end - end - - def save_institution institution - inst_errors = institution.errors.messages - com_errors = institution.community.errors.messages - - set_errors institution - - if inst_errors.empty? && com_errors.empty? && institution.valid? && institution.save - { :success => true, - :message => _("Institution successful created!"), - :institution_data => {:name=>institution.name, :id=>institution.id} - } - else - { :success => false, - :message => _("Institution could not be created!"), - :errors => inst_errors.merge(com_errors) - } - end - end - - def redirect_depending_on_institution_creation response_message - if response_message[:success] - redirect_to :controller => "/admin_panel", :action => "index" - else - flash[:errors] = response_message[:errors] - - redirect_to :controller => "gov_user_plugin", :action => "create_institution_admin", :params => params - end - end - - def set_errors institution - institution.valid? if institution - institution.community.valid? if institution.community - - flash[:error_community_name] = institution.community.errors.include?(:name) ? "highlight-error" : "" - flash[:error_community_country] = institution.errors.include?(:country) ? "highlight-error" : "" - flash[:error_community_state] = institution.errors.include?(:state) ? "highlight-error" : "" - flash[:error_community_city] = institution.errors.include?(:city) ? "highlight-error" : "" - flash[:error_institution_corporate_name] = institution.errors.include?(:corporate_name) ? "highlight-error" : "" - flash[:error_institution_cnpj] = institution.errors.include?(:cnpj) ? "highlight-error" : "" - flash[:error_institution_governmental_sphere] = institution.errors.include?(:governmental_sphere) ? "highlight-error" : "" - flash[:error_institution_governmental_power] = institution.errors.include?(:governmental_power) ? "highlight-error" : "" - flash[:error_institution_juridical_nature] = institution.errors.include?(:juridical_nature) ? "highlight-error" : "" - flash[:error_institution_sisp] = institution.errors.include?(:sisp) ? "highlight-error" : "" - end - -end diff --git a/src/gov_user/controllers/gov_user_plugin_myprofile_controller.rb b/src/gov_user/controllers/gov_user_plugin_myprofile_controller.rb deleted file mode 100644 index 6b4d03e..0000000 --- a/src/gov_user/controllers/gov_user_plugin_myprofile_controller.rb +++ /dev/null @@ -1,50 +0,0 @@ -class GovUserPluginMyprofileController < MyProfileController - append_view_path File.join(File.dirname(__FILE__) + '/../views') - - def index - end - - def edit_institution - @show_sisp_field = environment.admins.include?(current_user.person) - @state_list = NationalRegion.find( - :all, - :conditions => { :national_region_type_id => 2 }, - :order => 'name' - ) - @institution = @profile.institution - update_institution if request.post? - end - - private - - def update_institution - @institution.community.update_attributes(params[:community]) - @institution.update_attributes(params[:institutions].except(:governmental_power, :governmental_sphere, :juridical_nature)) - if @institution.type == "PublicInstitution" - begin - governmental_updates - rescue - @institution.errors.add(:governmental_fields, - _("Could not find Governmental Power or Governmental Sphere")) - end - end - if @institution.valid? - redirect_to :controller => 'profile_editor', :action => 'index', :profile => profile.identifier - else - flash[:errors] = @institution.errors.full_messages - end - end - - def governmental_updates - gov_power = GovernmentalPower.find params[:institutions][:governmental_power] - gov_sphere = GovernmentalSphere.find params[:institutions][:governmental_sphere] - jur_nature = JuridicalNature.find params[:institutions][:juridical_nature] - - @institution.juridical_nature = jur_nature - @institution.governmental_power = gov_power - @institution.governmental_sphere = gov_sphere - @institution.save - end - - -end diff --git a/src/gov_user/db/migrate/20140528193816_add_extra_fields_to_user.rb b/src/gov_user/db/migrate/20140528193816_add_extra_fields_to_user.rb deleted file mode 100644 index 087fc62..0000000 --- a/src/gov_user/db/migrate/20140528193816_add_extra_fields_to_user.rb +++ /dev/null @@ -1,17 +0,0 @@ -class AddExtraFieldsToUser < ActiveRecord::Migration - def self.up - change_table :users do |t| - t.string :secondary_email - t.references :institution - t.string :role - end - end - - def self.down - change_table :users do |t| - t.remove :secondary_email - t.remove_references :institution - t.remove :role - end - end -end diff --git a/src/gov_user/db/migrate/20140528193835_create_institutions_table.rb b/src/gov_user/db/migrate/20140528193835_create_institutions_table.rb deleted file mode 100644 index 294c791..0000000 --- a/src/gov_user/db/migrate/20140528193835_create_institutions_table.rb +++ /dev/null @@ -1,13 +0,0 @@ -class CreateInstitutionsTable < ActiveRecord::Migration - def self.up - create_table :institutions do |t| - t.string :name - - t.timestamps - end - end - - def self.down - drop_table :institutions - end -end diff --git a/src/gov_user/db/migrate/20140617125143_add_new_fields_institution.rb b/src/gov_user/db/migrate/20140617125143_add_new_fields_institution.rb deleted file mode 100644 index 70ecf88..0000000 --- a/src/gov_user/db/migrate/20140617125143_add_new_fields_institution.rb +++ /dev/null @@ -1,27 +0,0 @@ -class AddNewFieldsInstitution < ActiveRecord::Migration - def up - add_column :institutions, :acronym, :string - add_column :institutions, :unit_code, :integer - add_column :institutions, :parent_code, :integer - add_column :institutions, :unit_type, :string - add_column :institutions, :juridical_nature, :string - add_column :institutions, :sub_juridical_nature, :string - add_column :institutions, :normalization_level, :string - add_column :institutions, :version, :string - add_column :institutions, :cnpj, :string - add_column :institutions, :type, :string - end - - def down - remove_column :institutions, :acronym - remove_column :institutions, :unit_code - remove_column :institutions, :parent_code - remove_column :institutions, :unit_type - remove_column :institutions, :juridical_nature - remove_column :institutions, :sub_juridical_nature - remove_column :institutions, :normalization_level - remove_column :institutions, :version - remove_column :institutions, :cnpj - remove_column :institutions, :type - end -end diff --git a/src/gov_user/db/migrate/20140617132133_create_governmental_spheres.rb b/src/gov_user/db/migrate/20140617132133_create_governmental_spheres.rb deleted file mode 100644 index 22c1fc7..0000000 --- a/src/gov_user/db/migrate/20140617132133_create_governmental_spheres.rb +++ /dev/null @@ -1,19 +0,0 @@ -class CreateGovernmentalSpheres < ActiveRecord::Migration - def change - create_table :governmental_spheres do |t| - t.string :name - t.string :acronym - t.integer :unit_code - t.integer :parent_code - t.string :unit_type - t.string :juridical_nature - t.string :sub_juridical_nature - t.string :normalization_level - t.string :version - t.string :cnpj - t.string :type - - t.timestamps - end - end -end diff --git a/src/gov_user/db/migrate/20140617132451_create_governmental_powers.rb b/src/gov_user/db/migrate/20140617132451_create_governmental_powers.rb deleted file mode 100644 index ce88ee7..0000000 --- a/src/gov_user/db/migrate/20140617132451_create_governmental_powers.rb +++ /dev/null @@ -1,9 +0,0 @@ -class CreateGovernmentalPowers < ActiveRecord::Migration - def change - create_table :governmental_powers do |t| - t.string :name - - t.timestamps - end - end -end diff --git a/src/gov_user/db/migrate/20140617134556_add_references_to_institution.rb b/src/gov_user/db/migrate/20140617134556_add_references_to_institution.rb deleted file mode 100644 index e5203e1..0000000 --- a/src/gov_user/db/migrate/20140617134556_add_references_to_institution.rb +++ /dev/null @@ -1,15 +0,0 @@ -class AddReferencesToInstitution < ActiveRecord::Migration - def up - change_table :institutions do |t| - t.references :governmental_power - t.references :governmental_sphere - end - end - - def down - change_table :institutions do |t| - t.remove_references :governmental_power - t.remove_references :governmental_sphere - end - end -end diff --git a/src/gov_user/db/migrate/20140630183326_add_relation_between_community_and_institution.rb b/src/gov_user/db/migrate/20140630183326_add_relation_between_community_and_institution.rb deleted file mode 100644 index 4dde5a9..0000000 --- a/src/gov_user/db/migrate/20140630183326_add_relation_between_community_and_institution.rb +++ /dev/null @@ -1,13 +0,0 @@ -class AddRelationBetweenCommunityAndInstitution < ActiveRecord::Migration - def up - change_table :institutions do |t| - t.references :community - end - end - - def down - change_table :institutions do |t| - t.remove_references :community - end - end -end diff --git a/src/gov_user/db/migrate/20140812143218_remove_field_role_from_user.rb b/src/gov_user/db/migrate/20140812143218_remove_field_role_from_user.rb deleted file mode 100644 index e4d4fc6..0000000 --- a/src/gov_user/db/migrate/20140812143218_remove_field_role_from_user.rb +++ /dev/null @@ -1,13 +0,0 @@ -class RemoveFieldRoleFromUser < ActiveRecord::Migration - def up - change_table :users do |t| - t.remove :role - end - end - - def down - change_table :users do |t| - t.string :role - end - end -end diff --git a/src/gov_user/db/migrate/20140814125947_add_new_fields_to_public_institution.rb b/src/gov_user/db/migrate/20140814125947_add_new_fields_to_public_institution.rb deleted file mode 100644 index 232f50a..0000000 --- a/src/gov_user/db/migrate/20140814125947_add_new_fields_to_public_institution.rb +++ /dev/null @@ -1,11 +0,0 @@ -class AddNewFieldsToPublicInstitution < ActiveRecord::Migration - def up - add_column :institutions, :sisp, :boolean, :default => false - remove_column :institutions, :juridical_nature - end - - def down - remove_column :institutions, :sisp - add_column :institutions, :juridical_nature, :string - end -end diff --git a/src/gov_user/db/migrate/20140814131606_create_juridical_natures_table.rb b/src/gov_user/db/migrate/20140814131606_create_juridical_natures_table.rb deleted file mode 100644 index f2c9c18..0000000 --- a/src/gov_user/db/migrate/20140814131606_create_juridical_natures_table.rb +++ /dev/null @@ -1,11 +0,0 @@ -class CreateJuridicalNaturesTable < ActiveRecord::Migration - def up - create_table :juridical_natures do |t| - t.string :name - end - end - - def down - drop_table :juridical_natures - end -end diff --git a/src/gov_user/db/migrate/20140814134827_add_juridical_nature_reference_to_institutions_table.rb b/src/gov_user/db/migrate/20140814134827_add_juridical_nature_reference_to_institutions_table.rb deleted file mode 100644 index 03baff8..0000000 --- a/src/gov_user/db/migrate/20140814134827_add_juridical_nature_reference_to_institutions_table.rb +++ /dev/null @@ -1,13 +0,0 @@ -class AddJuridicalNatureReferenceToInstitutionsTable < ActiveRecord::Migration - def up - change_table :institutions do |t| - t.references :juridical_nature - end - end - - def down - change_table :institutions do |t| - t.remove_references :juridical_nature - end - end -end diff --git a/src/gov_user/db/migrate/20140815194530_register_institution_modification.rb b/src/gov_user/db/migrate/20140815194530_register_institution_modification.rb deleted file mode 100644 index 3183ec0..0000000 --- a/src/gov_user/db/migrate/20140815194530_register_institution_modification.rb +++ /dev/null @@ -1,13 +0,0 @@ -class RegisterInstitutionModification < ActiveRecord::Migration - def up - change_table :institutions do |t| - t.string :date_modification - end - end - - def down - change_table :institutions do |t| - t.remove :date_modification - end - end -end diff --git a/src/gov_user/db/migrate/20140818195821_remove_institution_from_user.rb b/src/gov_user/db/migrate/20140818195821_remove_institution_from_user.rb deleted file mode 100644 index 37486cd..0000000 --- a/src/gov_user/db/migrate/20140818195821_remove_institution_from_user.rb +++ /dev/null @@ -1,9 +0,0 @@ -class RemoveInstitutionFromUser < ActiveRecord::Migration - def up - remove_column :users, :institution_id - end - - def down - add_column :users, :institution_id - end -end diff --git a/src/gov_user/db/migrate/20140818200738_create_institution_user_relation_table.rb b/src/gov_user/db/migrate/20140818200738_create_institution_user_relation_table.rb deleted file mode 100644 index 7068d72..0000000 --- a/src/gov_user/db/migrate/20140818200738_create_institution_user_relation_table.rb +++ /dev/null @@ -1,12 +0,0 @@ -class CreateInstitutionUserRelationTable < ActiveRecord::Migration - def up - create_table :institutions_users do |t| - t.belongs_to :user - t.belongs_to :institution - end - end - - def down - drop_table :institutions_users - end -end diff --git a/src/gov_user/db/migrate/20141103183013_add_corporate_name_to_institution.rb b/src/gov_user/db/migrate/20141103183013_add_corporate_name_to_institution.rb deleted file mode 100644 index 69d4a19..0000000 --- a/src/gov_user/db/migrate/20141103183013_add_corporate_name_to_institution.rb +++ /dev/null @@ -1,9 +0,0 @@ -class AddCorporateNameToInstitution < ActiveRecord::Migration - def up - add_column :institutions, :corporate_name, :string - end - - def down - remove_column :institutions, :corporate_name - end -end diff --git a/src/gov_user/db/migrate/20150910135510_add_siorg_code_to_institution.rb b/src/gov_user/db/migrate/20150910135510_add_siorg_code_to_institution.rb deleted file mode 100644 index 83cdec5..0000000 --- a/src/gov_user/db/migrate/20150910135510_add_siorg_code_to_institution.rb +++ /dev/null @@ -1,9 +0,0 @@ -class AddSiorgCodeToInstitution < ActiveRecord::Migration - def up - add_column :institutions, :siorg_code, :integer - end - - def down - remove_column :institutions, :siorg_code - end -end diff --git a/src/gov_user/db/migrate/20150910203559_add_institution_to_organization_rating.rb b/src/gov_user/db/migrate/20150910203559_add_institution_to_organization_rating.rb deleted file mode 100644 index cf97528..0000000 --- a/src/gov_user/db/migrate/20150910203559_add_institution_to_organization_rating.rb +++ /dev/null @@ -1,11 +0,0 @@ -class AddInstitutionToOrganizationRating < ActiveRecord::Migration - def up - change_table :organization_ratings do |t| - t.belongs_to :institution - end - end - - def down - remove_column :organization_ratings, :institution_id - end -end \ No newline at end of file diff --git a/src/gov_user/db/seeds.rb b/src/gov_user/db/seeds.rb deleted file mode 100644 index b9065f0..0000000 --- a/src/gov_user/db/seeds.rb +++ /dev/null @@ -1,19 +0,0 @@ -# encoding: UTF-8 -powers = ["Executivo", "Legislativo", "Judiciário", "Não se Aplica"] -spheres = ["Federal", "Estadual", "Distrital", "Municipal"] -jur_natures = ["Administração Direta", "Autarquia", "Empresa Pública", "Fundação", - "Orgão Autônomo", "Sociedade", "Sociedade Civil", - "Sociedade de Economia Mista" - ] - -powers.each do |power| - GovernmentalPower.create(:name => power) -end - -spheres.each do |sphere| - GovernmentalSphere.create(:name => sphere) -end - -jur_natures.each do |jur_nature| - JuridicalNature.create(:name => jur_nature) -end diff --git a/src/gov_user/features/institution_registration.feature b/src/gov_user/features/institution_registration.feature deleted file mode 100644 index c1fbb4e..0000000 --- a/src/gov_user/features/institution_registration.feature +++ /dev/null @@ -1,32 +0,0 @@ -Feature: Institution Field - As a user - I want to sign up resgistring my institution - So others users can use it - - Background: - Given "GovUserPlugin" plugin is enabled - And I am logged in as mpog_admin - And I go to /admin/plugins - And I check "GovUserPlugin" - And I press "Save changes" - And Institutions has initial default values on database - And I am logged in as mpog_admin - - @selenium - Scenario: Show new institution fields when clicked in create new institution - Given I follow "Edit Profile" - When I follow "Create new institution" - And I should see "New Institution" - And I should see "Public Institution" - And I should see "Private Institution" - And I should see "Corporate Name" - And I should see "Name" - And I should see "State" - And I should see "City" - And I should see "Country" - And I should see "CNPJ" - And I should see "Acronym" - And I choose "Public Institution" - Then I should see "Governmental Sphere:" - And I should see "Governmental Power:" - And I should see "Juridical Nature:" diff --git a/src/gov_user/features/steps_definitions/gov_user_steps.rb b/src/gov_user/features/steps_definitions/gov_user_steps.rb deleted file mode 100644 index 97cf5e2..0000000 --- a/src/gov_user/features/steps_definitions/gov_user_steps.rb +++ /dev/null @@ -1,90 +0,0 @@ -Given /^Institutions has initial default values on database$/ do - GovernmentalPower.create(:name => "Executivo") - GovernmentalPower.create(:name => "Legislativo") - GovernmentalPower.create(:name => "Judiciario") - - GovernmentalSphere.create(:name => "Federal") - - JuridicalNature.create(:name => "Autarquia") - JuridicalNature.create(:name => "Administracao Direta") - JuridicalNature.create(:name => "Empresa Publica") - JuridicalNature.create(:name => "Fundacao") - JuridicalNature.create(:name => "Orgao Autonomo") - JuridicalNature.create(:name => "Sociedade") - JuridicalNature.create(:name => "Sociedade Civil") - JuridicalNature.create(:name => "Sociedade de Economia Mista") - - national_region = NationalRegion.new - national_region.name = "Distrito Federal" - national_region.national_region_code = '35' - national_region.national_region_type_id = NationalRegionType::STATE - national_region.save -end - -Given /^I type in "([^"]*)" in autocomplete list "([^"]*)" and I choose "([^"]*)"$/ do |typed, input_field_selector, should_select| -# Wait the page javascript load -sleep 1 -# Basicaly it, search for the input field, type something, wait for ajax end select an item -page.driver.browser.execute_script %Q{ - var search_query = "#{input_field_selector}.ui-autocomplete-input"; - var input = jQuery(search_query).first(); - - input.trigger('click'); - input.val('#{typed}'); - input.trigger('keydown'); - - window.setTimeout(function(){ - search_query = ".ui-menu-item a:contains('#{should_select}')"; - var typed = jQuery(search_query).first(); - - typed.trigger('mouseenter').trigger('click'); - console.log(jQuery('#license_info_id')); - }, 1000); - } - sleep 1 -end - -Given /^the following public institutions?$/ do |table| - # table is a Cucumber::Ast::Table - table.hashes.each do |item| - community = Community.new - community.name = item[:name] - community.country = item[:country] - community.state = item[:state] - community.city = item[:city] - community.save! - - governmental_power = GovernmentalPower.where(:name => item[:governmental_power]).first - governmental_sphere = GovernmentalSphere.where(:name => item[:governmental_sphere]).first - - juridical_nature = JuridicalNature.create(:name => item[:juridical_nature]) - - institution = PublicInstitution.new(:name => item[:name], :type => "PublicInstitution", :acronym => item[:acronym], :cnpj => item[:cnpj], :juridical_nature => juridical_nature, :governmental_power => governmental_power, :governmental_sphere => governmental_sphere) - institution.community = community - institution.corporate_name = item[:corporate_name] - institution.save! - end -end - -Given /^I sleep for (\d+) seconds$/ do |time| - sleep time.to_i -end - -Given /^I am logged in as mpog_admin$/ do - visit('/account/logout') - - user = User.new(:login => 'admin_user', :password => '123456', :password_confirmation => '123456', :email => 'admin_user@example.com') - person = Person.new :name=>"Mpog Admin", :identifier=>"mpog-admin" - user.person = person - user.save! - - user.activate - e = Environment.default - e.add_admin(user.person) - - visit('/account/login') - fill_in("Username", :with => user.login) - fill_in("Password", :with => '123456') - click_button("Log in") -end - diff --git a/src/gov_user/features/user_profile_edition.feature b/src/gov_user/features/user_profile_edition.feature deleted file mode 100644 index be7ecfa..0000000 --- a/src/gov_user/features/user_profile_edition.feature +++ /dev/null @@ -1,77 +0,0 @@ -Feature: Institution Field - As a user - I want to update my update my user data - So I can maintain my personal data updated - - Background: - Given "GovUserPlugin" plugin is enabled - And the following users - | login | name | - | joao | Joao Silva | - And I am logged in as admin - And I go to /admin/plugins - And I check "GovUserPlugin" - And I press "Save changes" - And feature "skip_new_user_email_confirmation" is enabled on environment - And I go to /admin/features/manage_fields - And I check "person_fields_country_active" - And I check "person_fields_state_active" - And I check "person_fields_city_active" - And I press "Save changes" - And Institutions has initial default values on database - And the following public institutions - | name | acronym | country | state | city | cnpj | juridical_nature | governmental_power | governmental_sphere | corporate_name | - | Ministerio das Cidades | MC | BR | DF | Gama | 58.745.189/0001-21 | Autarquia | Executivo | Federal | Ministerio das Cidades | - | Governo do DF | GDF | BR | DF | Taguatinga | 12.645.166/0001-44 | Autarquia | Legislativo | Federal | Governo do DF | - | Ministerio do Planejamento | MP | BR | DF | Brasilia | 41.769.591/0001-43 | Autarquia | Judiciario | Federal | Ministerio do Planejamento | - - Scenario: Go to control panel when clicked on 'Complete your profile' link - Given I am logged in as "joao" - And I am on joao's control panel - When I follow "Complete your profile" - Then I should see "Profile settings for " - And I should see "Personal information" - - @selenium - Scenario: Verify text information to use governmental e-mail - Given I am logged in as "joao" - And I am on joao's control panel - When I follow "Edit Profile" - Then I should see "If you work in a public agency use your government e-Mail" - - @selenium - Scenario: Add more then one instituion on profile editor - Given I am logged in as "joao" - And I am on joao's control panel - When I follow "Edit Profile" - And I follow "Add new institution" - And I type in "Minis" in autocomplete list "#input_institution" and I choose "Ministerio do Planejamento" - And I follow "Add new institution" - And I type in "Gover" in autocomplete list "#input_institution" and I choose "Governo do DF" - And I follow "Add new institution" - Then I should see "Ministerio do Planejamento" within ".institutions_added" - And I should see "Governo do DF" within ".institutions_added" - - @selenium - Scenario: Verify if field 'city' is shown when Brazil is selected - Given I am logged in as "joao" - And I am on joao's control panel - When I follow "Edit Profile" - Then I should see "City" - - @selenium - Scenario: Verify if field 'city' does not appear when Brazil is not selected as country - Given I am logged in as "joao" - And I am on joao's control panel - When I follow "Edit Profile" - And I select "United States" from "profile_data_country" - Then I should not see "City" within ".type-text" - - @selenium - Scenario: Show message of institution not found - Given I am logged in as "joao" - And I am on joao's control panel - When I follow "Edit Profile" - And I fill in "input_institution" with "Some Nonexistent Institution" - And I sleep for 1 seconds - Then I should see "No institution found" diff --git a/src/gov_user/lib/ext/communities_block.rb b/src/gov_user/lib/ext/communities_block.rb deleted file mode 100644 index 4a5fcaa..0000000 --- a/src/gov_user/lib/ext/communities_block.rb +++ /dev/null @@ -1,45 +0,0 @@ -require_dependency 'communities_block' - -class CommunitiesBlock - - def profile_list - result = get_visible_profiles - result.slice(0..get_limit-1) - end - - def profile_count - profile_list.count - end - - private - - def get_visible_profiles - visible_profiles = profiles.visible.includes( - [:image,:domains,:preferred_domain,:environment] - ) - - delete_communities = [] - valid_communities_string = Community.get_valid_communities_string - Community.all.each{|community| delete_communities << community.id unless eval(valid_communities_string)} - - visible_profiles = visible_profiles.where(["profiles.id NOT IN (?)", delete_communities]) unless delete_communities.empty? - - if !prioritize_profiles_with_image - return visible_profiles.all( - :limit => get_limit, - :order => 'profiles.updated_at DESC' - ).sort_by {rand} - elsif profiles.visible.with_image.count >= get_limit - return visible_profiles.with_image.all( - :limit => get_limit * 5, - :order => 'profiles.updated_at DESC' - ).sort_by {rand} - else - visible_profiles = visible_profiles.with_image.sort_by {rand} + - visible_profiles.without_image.all( - :limit => get_limit * 5, :order => 'profiles.updated_at DESC' - ).sort_by {rand} - return visible_profiles - end - end -end diff --git a/src/gov_user/lib/ext/community.rb b/src/gov_user/lib/ext/community.rb deleted file mode 100644 index d274660..0000000 --- a/src/gov_user/lib/ext/community.rb +++ /dev/null @@ -1,25 +0,0 @@ -require_dependency 'community' - -class Community - has_one :institution, :dependent=>:destroy - - def institution? - return !institution.nil? - end - - def remove_of_community_search_institution? - return institution? - end - - def self.get_valid_communities_string - remove_of_communities_methods = Community.instance_methods.select{|m| m =~ /remove_of_community_search/} - valid_communities_string = "!(" - remove_of_communities_methods.each do |method| - valid_communities_string += "community.send('#{method}') || " - end - valid_communities_string = valid_communities_string[0..-5] - valid_communities_string += ")" - - valid_communities_string - end -end diff --git a/src/gov_user/lib/ext/organization_rating.rb b/src/gov_user/lib/ext/organization_rating.rb deleted file mode 100644 index fb2b59e..0000000 --- a/src/gov_user/lib/ext/organization_rating.rb +++ /dev/null @@ -1,20 +0,0 @@ -require_dependency "organization_rating" - -OrganizationRating.class_eval do - - belongs_to :institution - - attr_accessible :institution, :institution_id - - validate :verify_institution - - private - - def verify_institution - if self.institution != nil - institution = Institution.find_by_id self.institution.id - self.errors.add :institution, _("not found") unless institution - end - end - -end diff --git a/src/gov_user/lib/ext/person.rb b/src/gov_user/lib/ext/person.rb deleted file mode 100644 index 0260a99..0000000 --- a/src/gov_user/lib/ext/person.rb +++ /dev/null @@ -1,35 +0,0 @@ -# encoding: utf-8 - -require_dependency 'person' - -class Person - - settings_items :percentage_incomplete, :type => :string, :default => "" - - attr_accessible :percentage_incomplete - - delegate :login, :to => :user, :prefix => true - - def institution? - false - end - - def secondary_email - self.user.secondary_email unless self.user.nil? - end - - def secondary_email= value - self.user.secondary_email = value unless self.user.nil? - end - - def institutions - institutions = [] - unless self.user.institutions.nil? - self.user.institutions.each do |institution| - institutions << institution.name - end - end - institutions - end - -end diff --git a/src/gov_user/lib/ext/search_controller.rb b/src/gov_user/lib/ext/search_controller.rb deleted file mode 100644 index 45a0523..0000000 --- a/src/gov_user/lib/ext/search_controller.rb +++ /dev/null @@ -1,42 +0,0 @@ -require_dependency 'search_controller' - -class SearchController - - def communities - delete_communities = [] - valid_communities_string = Community.get_valid_communities_string - Community.all.each{|community| delete_communities << community.id unless eval(valid_communities_string)} - - @scope = visible_profiles(Community) - @scope = @scope.where(["id NOT IN (?)", delete_communities]) unless delete_communities.empty? - - full_text_search - end - - def institutions - @titles[:institutions] = _("Institution Catalog") - results = filter_communities_list{|community| community.institution?} - results = results.paginate(:per_page => 24, :page => params[:page]) - @searches[@asset] = {:results => results} - @search = results - end - - def filter_communities_list - unfiltered_list = visible_profiles(Community) - - unless params[:query].nil? - unfiltered_list = unfiltered_list.select do |com| - com.name.downcase =~ /#{params[:query].downcase}/ - end - end - - communities_list = [] - unfiltered_list.each do |profile| - if profile.class == Community && !profile.is_template? && yield(profile) - communities_list << profile - end - end - - communities_list - end -end diff --git a/src/gov_user/lib/ext/search_helper.rb b/src/gov_user/lib/ext/search_helper.rb deleted file mode 100644 index aae5940..0000000 --- a/src/gov_user/lib/ext/search_helper.rb +++ /dev/null @@ -1,8 +0,0 @@ -require_dependency 'search_helper' - -module SearchHelper - - COMMON_PROFILE_LIST_BLOCK ||= [] - COMMON_PROFILE_LIST_BLOCK << :institutions - -end diff --git a/src/gov_user/lib/ext/user.rb b/src/gov_user/lib/ext/user.rb deleted file mode 100644 index ec5f7ce..0000000 --- a/src/gov_user/lib/ext/user.rb +++ /dev/null @@ -1,60 +0,0 @@ -require_dependency 'user' - -class User - - GOV_SUFFIX = /^.*@[gov.br|jus.br|leg.br|mp.br]+$/ - - has_and_belongs_to_many :institutions - - validate :email_different_secondary?, :email_has_already_been_used?, - :secondary_email_format - - scope :primary_or_secondary_email_already_used?, lambda { |email| - where("email=? OR secondary_email=?", email, email) - } - - def email_different_secondary? - self.errors.add( - :base, - _("Email must be different from secondary email.") - ) if self.email == self.secondary_email - end - - def email_has_already_been_used? - user_already_saved = User.find(:first, - :conditions => ["email = ?", self.email]) - - if user_already_saved.nil? - primary_email_hasnt_been_used = - User.primary_or_secondary_email_already_used?(self.email).empty? - - if !self.secondary_email.nil? and self.secondary_email.empty? - self.secondary_email = nil - end - - secondary_email_hasnt_been_used = - User.primary_or_secondary_email_already_used?(self.secondary_email). - empty? - - if !primary_email_hasnt_been_used or !secondary_email_hasnt_been_used - self.errors.add(:base, _("E-mail or secondary e-mail already taken.")) - end - end - end - - def secondary_email_format - if !self.secondary_email.nil? and self.secondary_email.length > 0 - test = /\A[^@]+@([^@\.]+\.)+[^@\.]+\z/ - - unless test.match(self.secondary_email) - self.errors.add(:base, _("Invalid secondary email format.")) - end - end - end - - private - - def valid_format?(value, string_format) - !value.nil? && value.length > 0 && !string_format.match(value).nil? - end -end diff --git a/src/gov_user/lib/gov_user_plugin.rb b/src/gov_user/lib/gov_user_plugin.rb deleted file mode 100644 index 5cd63dc..0000000 --- a/src/gov_user/lib/gov_user_plugin.rb +++ /dev/null @@ -1,332 +0,0 @@ -class GovUserPlugin < Noosfero::Plugin - include ActionView::Helpers::TagHelper - include ActionView::Helpers::FormTagHelper - include ActionView::Helpers::FormOptionsHelper - include ActionView::Helpers::JavaScriptHelper - include ActionView::Helpers::AssetTagHelper - include FormsHelper - include ActionView::Helpers - include ActionDispatch::Routing - include Rails.application.routes.url_helpers - - def self.plugin_name - "GovUserPlugin" - end - - def self.plugin_description - _("Add features related to Brazilian government.") - end - - def stylesheet? - true - end - - # Hotspot to insert html without an especific hotspot on view. - def body_beginning - return if context.session[:user].nil? or context.session[:hide_incomplete_percentage] == true - - person = context.environment.people.where(:user_id=>context.session[:user]).first - - if context.profile && context.profile.person? and !person.nil? - @person = person - @percentege = calc_percentage_registration(person) - - if @percentege >= 0 and @percentege < 100 - expanded_template('incomplete_registration.html.erb') - end - end - end - - def profile_editor_transaction_extras - single_hash_transactions = { :user => 'user', - :instituton => 'instituton' - } - - single_hash_transactions.each do |model, transaction| - call_model_transaction(model, transaction) - end - end - - def profile_editor_controller_filters - block = proc do - if request.post? && params[:institution] - is_admin = environment.admins.include?(current_user.person) - - unless is_admin - institution = profile.user.institutions - - if !params[:institution].blank? && params[:institution].class == Hash && !params[:institution][:sisp].nil? - if params[:institution][:sisp] != institution.sisp - params[:institution][:sisp] = institution.sisp - end - end - end - end - end - - [{ - :type => 'before_filter', - :method_name => 'validate_institution_sisp_field_access', - :options => { :only => :edit }, - :block => block - }] - end - - def profile_tabs - if context.profile.community? - return profile_tabs_institution if context.profile.institution? - end - end - - def control_panel_buttons - if context.profile.institution? - return institution_info_button - end - end - - def self.extra_blocks - { - InstitutionsBlock => { :type => [Environment, Person] } - } - end - - def custom_user_registration_attributes(user) - return if context.params[:user][:institution_ids].nil? - context.params[:user][:institution_ids].delete('') - - update_user_institutions(user) - - user.institutions.each do |institution| - community = institution.community - community.add_member user.person - end - end - - def profile_editor_extras - profile = context.profile - - if profile.person? - expanded_template('person_editor_extras.html.erb') - end - end - - - def calc_percentage_registration(person) - required_list = profile_required_list - empty_fields = profile_required_empty_list person - count = required_list[:person_fields].count + - required_list[:user_fields].count - percentege = 100 - ((empty_fields.count * 100) / count) - person.percentage_incomplete = percentege - person.save(validate: false) - percentege - end - - def stylesheet? - true - end - - def admin_panel_links - [ - { - :title => _('Create Institution'), - :url => { - :controller => 'gov_user_plugin', - :action => 'create_institution_admin' - } - } - ] - end - - - def js_files - %w( - vendor/modulejs-1.5.0.min.js - vendor/jquery.js - lib/noosfero-root.js - lib/select-element.js - lib/select-field-choices.js - views/complete-registration.js - views/control-panel.js - views/create-institution.js - views/new-community.js - views/user-edit-profile.js - views/gov-user-comments-extra-fields.js - initializer.js - app.js - ) - end - - def admin_panel_links - [ - { - :title => _('Create Institution'), - :url => { - :controller => 'gov_user_plugin', - :action => 'create_institution_admin' - } - } - ] - end - - protected - - def profile_required_list - fields = {} - fields[:person_fields] = %w(cell_phone - contact_phone - comercial_phone - country - city - state - organization_website - image - identifier - name) - - fields[:user_fields] = %w(secondary_email email) - fields - end - - def profile_required_empty_list(person) - empty_fields = [] - required_list = profile_required_list - - required_list[:person_fields].each do |field| - empty_fields << field.sub('_',' ') if person.send(field).blank? - end - required_list[:user_fields].each do |field| - empty_fields << field.sub('_',' ') if person.user.send(field).blank? - end - empty_fields - end - - - protected - - def user_transaction - user_editor_institution_actions - - User.transaction do - context.profile.user.update_attributes!(context.params[:user]) - end - end - - def institution_transaction - institution.date_modification = DateTime.now - institution.save - institution_models = %w(governmental_power governmental_sphere - juridical_nature) - - institution_models.each do |model| - call_institution_transaction(model) - end - - if context.params.has_key?(:institution) - Institution.transaction do - context.profile. - institution. - update_attributes!(context.params[:institution]) - end - end - end - - def organization_ratings_plugin_comments_extra_fields - Proc::new do render :file => 'ratings_extra_field' end - end - - def organization_ratings_plugin_extra_fields_show_data user_rating - gov_user_self = self - - Proc::new { - if logged_in? - is_admin = environment.admins.include?(current_user.person) - is_admin ||= user_rating.organization.admins.include?(current_user.person) - - if is_admin and gov_user_self.context.profile.software? - render :file => 'organization_ratings_extra_fields_show_institution', - :locals => {:user_rating => user_rating} - end - end - } - end - - private - - def call_model_transaction(model,name) - send(name + '_transaction') if context.params.key?(model.to_sym) - end - - def call_institution_transaction(model) - context.profile.institution.send(model + '_id = ', - context.params[model.to_sym]) - context.profile.institution.save! - end - - # Add and remove the user from it's institutions communities - def user_editor_institution_actions - user = context.profile.user - - old_communities = [] - context.profile.user.institutions.each do |institution| - old_communities << institution.community - end - - new_communities = [] - unless context.params[:user][:institution_ids].nil? - context.params[:user][:institution_ids].delete('') - - context.params[:user][:institution_ids].each do |id| - new_communities << Institution.find(id).community - end - end - - manage_user_institutions(user, old_communities, new_communities) - end - - def institution_info_button - { - :title => _('Institution Info'), - :icon => 'edit-profile-group control-panel-instituton-link', - :url => { - :controller => 'gov_user_plugin_myprofile', - :action => 'edit_institution' - } - } - end - - def manage_user_institutions(user, old_communities, new_communities) - leave_communities = (old_communities - new_communities) - enter_communities = (new_communities - old_communities) - - leave_communities.each do |community| - community.remove_member(user.person) - user.institutions.delete(community.institution) - end - - enter_communities.each do |community| - community.add_member(user.person) - user.institutions << community.institution - end - end - - def profile_tabs_institution - { :title => _('Institution'), - :id => 'intitution-fields', - :content => Proc::new do render :partial => 'profile/institution_tab' end, - :start => true - } - end - - def update_user_institutions(user) - context.params[:user][:institution_ids].each do |institution_id| - institution = Institution.find institution_id - user.institutions << institution - - if institution.community.admins.blank? - institution.community.add_admin(user.person) - end - end - user.save unless user.institution_ids.empty? - end -end diff --git a/src/gov_user/lib/governmental_power.rb b/src/gov_user/lib/governmental_power.rb deleted file mode 100644 index cb7ca36..0000000 --- a/src/gov_user/lib/governmental_power.rb +++ /dev/null @@ -1,13 +0,0 @@ -class GovernmentalPower < ActiveRecord::Base - attr_accessible :name - - validates :name, :presence=>true, :uniqueness=>true - has_many :institutions - - def public_institutions - Institution.where( - :type=>"PublicInstitution", - :governmental_power_id=>self.id - ) - end -end diff --git a/src/gov_user/lib/governmental_sphere.rb b/src/gov_user/lib/governmental_sphere.rb deleted file mode 100644 index aef8f8f..0000000 --- a/src/gov_user/lib/governmental_sphere.rb +++ /dev/null @@ -1,7 +0,0 @@ -class GovernmentalSphere < ActiveRecord::Base - attr_accessible :name - - validates :name, :presence=>true, :uniqueness=>true - - has_many :institutions -end diff --git a/src/gov_user/lib/institution.rb b/src/gov_user/lib/institution.rb deleted file mode 100644 index ee5e870..0000000 --- a/src/gov_user/lib/institution.rb +++ /dev/null @@ -1,107 +0,0 @@ -class Institution < ActiveRecord::Base - has_many :comments - - SEARCH_FILTERS = { - :order => %w[], - :display => %w[compact] - } - - def self.default_search_display - 'compact' - end - - belongs_to :governmental_power - belongs_to :governmental_sphere - belongs_to :juridical_nature - - has_and_belongs_to_many :users - - attr_accessible :name, :acronym, :unit_code, :parent_code, :unit_type, - :sub_juridical_nature, :normalization_level, - :version, :cnpj, :type, :governmental_power, - :governmental_sphere, :sisp, :juridical_nature, - :corporate_name, :siorg_code, :community - - validates :name, :presence=>true, :uniqueness=>true - - before_save :verify_institution_type - - belongs_to :community - - scope :search_institution, lambda{ |value| - where("name ilike ? OR acronym ilike ?", "%#{value}%", "%#{value}%" ) - } - - validate :validate_country, :validate_state, :validate_city, - :verify_institution_type, :validate_format_cnpj - - - protected - - def verify_institution_type - valid_institutions_type = ["PublicInstitution", "PrivateInstitution"] - - unless valid_institutions_type.include? self.type - self.errors.add( - :type, - _("invalid, only public and private institutions are allowed.") - ) - - return false - end - - return true - end - - def validate_country - unless self.community.blank? - if self.community.country.blank? && self.errors[:country].blank? - self.errors.add(:country, _("can't be blank")) - return false - end - end - - return true - end - - def validate_state - unless self.community.blank? - if self.community.country == "BR" && - (self.community.state.blank? || self.community.state == "-1") && - self.errors[:state].blank? - - self.errors.add(:state, _("can't be blank")) - return false - end - end - - return true - end - - def validate_city - unless self.community.blank? - if self.community.country == "BR" && self.community.city.blank? && - self.errors[:city].blank? - - self.errors.add(:city, _("can't be blank")) - return false - end - end - - return true - end - - def validate_format_cnpj - return true if self.community.blank? && self.community.country != "BR" - return true if self.cnpj.blank? - - format = /^\d{2}\.\d{3}\.\d{3}\/\d{4}\-\d{2}$/ - - if !self.cnpj.blank? && format.match(self.cnpj) - return true - else - self.errors.add(:cnpj, _("invalid format")) - return false - end - end -end diff --git a/src/gov_user/lib/institutions_block.rb b/src/gov_user/lib/institutions_block.rb deleted file mode 100644 index 8ef8f59..0000000 --- a/src/gov_user/lib/institutions_block.rb +++ /dev/null @@ -1,71 +0,0 @@ -class InstitutionsBlock < CommunitiesBlock - - def self.description - _('Institutions') - end - - def profile_count - profile_list.count - end - - def default_title - n_('{#} institution', '{#} institutions', profile_count) - end - - def help - _('This block displays the institutions in which the user is a member.') - end - - def footer - owner = self.owner - case owner - when Profile - lambda do |context| - link_to s_('institutions|View all'), :profile => owner.identifier, - :controller => 'profile', :action => 'communities', - :type => 'Institution' - end - when Environment - lambda do |context| - link_to s_('institutions|View all'), :controller => 'search', - :action => 'communities', :type => 'Institution' - end - else - '' - end - end - - def profile_list - result = get_visible_profiles - - result = result.select { |p| p.class == Community && p.institution? } - - result.slice(0..get_limit-1) - end - - def profiles - owner.communities - end - - private - - def get_visible_profiles - include_list = [:image,:domains,:preferred_domain,:environment] - visible_profiles = profiles.visible.includes(include_list) - - if !prioritize_profiles_with_image - visible_profiles.all(:limit => get_limit, - :order => 'profiles.updated_at DESC' - ).sort_by{ rand } - elsif profiles.visible.with_image.count >= get_limit - visible_profiles.with_image.all(:limit => get_limit * 5, - :order => 'profiles.updated_at DESC' - ).sort_by{ rand } - else - visible_profiles.with_image.sort_by{ rand } + - visible_profiles.without_image.all(:limit => get_limit * 5, - :order => 'profiles.updated_at DESC' - ).sort_by{ rand } - end - end -end diff --git a/src/gov_user/lib/institutions_users.rb b/src/gov_user/lib/institutions_users.rb deleted file mode 100644 index e47da86..0000000 --- a/src/gov_user/lib/institutions_users.rb +++ /dev/null @@ -1,4 +0,0 @@ -class InstitutionUser < ActiveRecord::Base - belongs_to :user - belongs_to :institution -end diff --git a/src/gov_user/lib/juridical_nature.rb b/src/gov_user/lib/juridical_nature.rb deleted file mode 100644 index 1bb17f8..0000000 --- a/src/gov_user/lib/juridical_nature.rb +++ /dev/null @@ -1,15 +0,0 @@ -class JuridicalNature < ActiveRecord::Base - attr_accessible :name - - has_many :institutions - - validates_presence_of :name - validates_uniqueness_of :name - - def public_institutions - Institution.where( - :type=>"PublicInstitution", - :juridical_nature_id=>self.id - ) - end -end diff --git a/src/gov_user/lib/private_institution.rb b/src/gov_user/lib/private_institution.rb deleted file mode 100644 index db490d2..0000000 --- a/src/gov_user/lib/private_institution.rb +++ /dev/null @@ -1,2 +0,0 @@ -class PrivateInstitution < Institution -end diff --git a/src/gov_user/lib/public_institution.rb b/src/gov_user/lib/public_institution.rb deleted file mode 100644 index 33d13eb..0000000 --- a/src/gov_user/lib/public_institution.rb +++ /dev/null @@ -1,13 +0,0 @@ -class PublicInstitution < Institution - validates :governmental_power, :governmental_sphere, :juridical_nature, - :presence=>true - - validates :acronym, :allow_blank => true, :allow_nil => true, - :uniqueness=>true - - validates_format_of( - :cnpj, - :with => /^\d{2}\.\d{3}\.\d{3}\/\d{4}\-\d{2}$/, - :allow_nil => true, :allow_blank => true - ) -end diff --git a/src/gov_user/po/gov_user.pot b/src/gov_user/po/gov_user.pot deleted file mode 100644 index de87012..0000000 --- a/src/gov_user/po/gov_user.pot +++ /dev/null @@ -1,356 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: 1.2-141-g2924904\n" -"POT-Creation-Date: 2015-09-11 17:06-0000\n" -"PO-Revision-Date: 2015-09-01 20:59-0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" - -#: plugins/gov_user/lib/ext/search_controller.rb:17 -msgid "Institution Catalog" -msgstr "" - -#: plugins/gov_user/lib/ext/user.rb:19 -msgid "Email must be different from secondary email." -msgstr "" - -#: plugins/gov_user/lib/ext/user.rb:40 -msgid "E-mail or secondary e-mail already taken." -msgstr "" - -#: plugins/gov_user/lib/ext/user.rb:50 -msgid "Invalid secondary email format." -msgstr "" - -#: plugins/gov_user/lib/ext/organization_rating.rb:16 -msgid "not found" -msgstr "" - -#: plugins/gov_user/lib/gov_user_plugin.rb:17 -msgid "Add features related to Brazilian government." -msgstr "" - -#: plugins/gov_user/lib/gov_user_plugin.rb:132 -#: plugins/gov_user/lib/gov_user_plugin.rb:163 -msgid "Create Institution" -msgstr "" - -#: plugins/gov_user/lib/gov_user_plugin.rb:287 -msgid "Institution Info" -msgstr "" - -#: plugins/gov_user/lib/gov_user_plugin.rb:312 -msgid "Institution" -msgstr "" - -#: plugins/gov_user/lib/institutions_block.rb:4 -#: plugins/gov_user/views/person_editor_extras.html.erb:11 -msgid "Institutions" -msgstr "" - -#: plugins/gov_user/lib/institutions_block.rb:12 -msgid "{#} institution" -msgid_plural "{#} institutions" -msgstr[0] "" -msgstr[1] "" - -#: plugins/gov_user/lib/institutions_block.rb:16 -msgid "This block displays the institutions in which the user is a member." -msgstr "" - -#: plugins/gov_user/lib/institutions_block.rb:24 -#: plugins/gov_user/lib/institutions_block.rb:30 -msgid "institutions|View all" -msgstr "" - -#: plugins/gov_user/lib/institution.rb:47 -msgid "invalid, only public and private institutions are allowed." -msgstr "" - -#: plugins/gov_user/lib/institution.rb:59 -#: plugins/gov_user/lib/institution.rb:73 -#: plugins/gov_user/lib/institution.rb:86 -msgid "can't be blank" -msgstr "" - -#: plugins/gov_user/lib/institution.rb:103 -msgid "invalid format" -msgstr "" - -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:18 -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:43 -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:83 -msgid "Select a Governmental Sphere" -msgstr "" - -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:19 -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:44 -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:90 -msgid "Select a Governmental Power" -msgstr "" - -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:20 -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:45 -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:96 -msgid "Select a Juridical Nature" -msgstr "" - -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:21 -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:46 -msgid "Select a state" -msgstr "" - -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:168 -#: plugins/gov_user/controllers/gov_user_plugin_myprofile_controller.rb:26 -msgid "Could not find Governmental Power or Governmental Sphere" -msgstr "" - -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:214 -msgid "Institution successful created!" -msgstr "" - -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:219 -msgid "Institution could not be created!" -msgstr "" - -#: plugins/gov_user/test/unit/gov_user_person_test.rb:50 -#: plugins/gov_user/test/unit/gov_user_person_test.rb:56 -msgid "Name Should begin with a capital letter and no special characters" -msgstr "" - -#: plugins/gov_user/views/search/institutions.html.erb:3 -msgid "Type words about the %s you're looking for" -msgstr "" - -#: plugins/gov_user/views/ratings_extra_field.html.erb:2 -msgid "Organization name or Enterprise name" -msgstr "" - -#: plugins/gov_user/views/ratings_extra_field.html.erb:6 -#: plugins/gov_user/views/person_editor_extras.html.erb:21 -msgid "No institution found" -msgstr "" - -#: plugins/gov_user/views/incomplete_registration.html.erb:3 -msgid "Complete Profile" -msgstr "" - -#: plugins/gov_user/views/incomplete_registration.html.erb:6 -msgid "Complete your profile" -msgstr "" - -#: plugins/gov_user/views/incomplete_registration.html.erb:7 -msgid "Hide" -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:1 -msgid "Edit Institution" -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:5 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:5 -msgid "" -"Note that the creation of communities in this environment is restricted. " -"Your request to create this new community will be sent to %{environment} " -"administrators and will be approved or rejected according to their methods " -"and criteria." -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:11 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:11 -msgid "\"Can`t create new Institution: #{flash[:errors].length} errors\"" -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:24 -msgid "All fields with (*) are mandatory" -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:31 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:37 -msgid "Public Institution" -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:36 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:33 -msgid "Private Institution" -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:43 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:44 -msgid "Institution name already exists" -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:47 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:48 -msgid "Corporate Name" -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:52 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:53 -msgid "Country" -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:56 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:57 -msgid "State" -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:66 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:66 -msgid "CNPJ" -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:73 -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:75 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:72 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:74 -msgid "Acronym" -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:74 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:73 -msgid "Fantasy name" -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:82 -#: plugins/gov_user/views/profile/_institution_tab.html.erb:17 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:81 -msgid "Governmental Sphere:" -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:89 -#: plugins/gov_user/views/profile/_institution_tab.html.erb:16 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:88 -msgid "Governmental Power:" -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:95 -#: plugins/gov_user/views/profile/_institution_tab.html.erb:18 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:94 -msgid "Juridical Nature:" -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:102 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:101 -msgid "SISP?" -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:104 -#: plugins/gov_user/views/profile/_institution_tab.html.erb:19 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:104 -msgid "Yes" -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:106 -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:109 -#: plugins/gov_user/views/profile/_institution_tab.html.erb:19 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:106 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:108 -msgid "No" -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:114 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:114 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:118 -msgid "Save" -msgstr "" - -#: plugins/gov_user/views/person_editor_extras.html.erb:2 -msgid "Secondary e-mail" -msgstr "" - -#: plugins/gov_user/views/person_editor_extras.html.erb:22 -msgid "Add new institution" -msgstr "" - -#: plugins/gov_user/views/person_editor_extras.html.erb:23 -msgid "Create new institution" -msgstr "" - -#: plugins/gov_user/views/person_editor_extras.html.erb:39 -msgid "Should begin with a capital letter and no special characters" -msgstr "" - -#: plugins/gov_user/views/person_editor_extras.html.erb:40 -msgid "Email should have the following format: name@host.br" -msgstr "" - -#: plugins/gov_user/views/person_editor_extras.html.erb:41 -msgid "Site should have a valid format: http://name.hosts" -msgstr "" - -#: plugins/gov_user/views/person_editor_extras.html.erb:42 -msgid "If you work in a public agency use your government e-Mail" -msgstr "" - -#: plugins/gov_user/views/profile/_institution_tab.html.erb:3 -msgid "Institution Information" -msgstr "" - -#: plugins/gov_user/views/profile/_institution_tab.html.erb:6 -msgid "Type:" -msgstr "" - -#: plugins/gov_user/views/profile/_institution_tab.html.erb:7 -msgid "CNPJ:" -msgstr "" - -#: plugins/gov_user/views/profile/_institution_tab.html.erb:8 -msgid "Last modification:" -msgstr "" - -#: plugins/gov_user/views/profile/_institution_tab.html.erb:9 -msgid "Country:" -msgstr "" - -#: plugins/gov_user/views/profile/_institution_tab.html.erb:10 -msgid "State:" -msgstr "" - -#: plugins/gov_user/views/profile/_institution_tab.html.erb:11 -msgid "City:" -msgstr "" - -#: plugins/gov_user/views/profile/_institution_tab.html.erb:13 -msgid "Fantasy Name:" -msgstr "" - -#: plugins/gov_user/views/profile/_institution_tab.html.erb:15 -msgid "Acronym:" -msgstr "" - -#: plugins/gov_user/views/profile/_institution_tab.html.erb:19 -msgid "SISP:" -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:1 -msgid "New Institution" -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:16 -msgid "\"#{key_name.capitalize} #{value.join()}\"" -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:115 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:119 -msgid "Cancel" -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:121 -msgid "Could not send the form data to the server" -msgstr "" - -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:128 -msgid "Creating institution" -msgstr "" diff --git a/src/gov_user/po/pt/gov_user.po b/src/gov_user/po/pt/gov_user.po deleted file mode 100644 index 4a3a691..0000000 --- a/src/gov_user/po/pt/gov_user.po +++ /dev/null @@ -1,370 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: 1.2-143-g8dfded9\n" -"POT-Creation-Date: 2015-09-11 17:14-0000\n" -"PO-Revision-Date: 2015-09-01 19:55-0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" - -#: plugins/gov_user/test/unit/gov_user_person_test.rb:50 -#: plugins/gov_user/test/unit/gov_user_person_test.rb:56 -msgid "Name Should begin with a capital letter and no special characters" -msgstr "" -"Nome deve iniciar com letrar maiúscula e não deve conter carateres especiais" - -#: plugins/gov_user/controllers/gov_user_plugin_myprofile_controller.rb:26 -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:168 -msgid "Could not find Governmental Power or Governmental Sphere" -msgstr "Não foi possível encontrar o Poder ou Esfera Governamental" - -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:18 -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:43 -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:83 -msgid "Select a Governmental Sphere" -msgstr "Selecione uma Esfera Governamental" - -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:19 -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:44 -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:90 -msgid "Select a Governmental Power" -msgstr "Selecione um Poder Governamental" - -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:20 -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:45 -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:96 -msgid "Select a Juridical Nature" -msgstr "Seleciona uma Natureza Jurídica" - -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:21 -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:46 -msgid "Select a state" -msgstr "Selecione um Estado" - -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:214 -msgid "Institution successful created!" -msgstr "Instituição criada com sucesso!" - -#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:219 -msgid "Institution could not be created!" -msgstr "Instituição não pode ser criada!" - -#: plugins/gov_user/lib/gov_user_plugin.rb:17 -msgid "Add features related to Brazilian government." -msgstr "Adicionar funcionlidade relacionada com o governo brasileiro." - -#: plugins/gov_user/lib/gov_user_plugin.rb:132 -#: plugins/gov_user/lib/gov_user_plugin.rb:163 -msgid "Create Institution" -msgstr "Criar Instituição" - -#: plugins/gov_user/lib/gov_user_plugin.rb:287 -msgid "Institution Info" -msgstr "Informações da Instituição" - -#: plugins/gov_user/lib/gov_user_plugin.rb:312 -msgid "Institution" -msgstr "Instituição" - -#: plugins/gov_user/lib/institution.rb:47 -msgid "invalid, only public and private institutions are allowed." -msgstr "Inválido, somente instituições públicas e privadas são permitidas." - -#: plugins/gov_user/lib/institution.rb:59 -#: plugins/gov_user/lib/institution.rb:73 -#: plugins/gov_user/lib/institution.rb:86 -msgid "can't be blank" -msgstr "não pode ficar em branco" - -#: plugins/gov_user/lib/institution.rb:103 -msgid "invalid format" -msgstr "formato inválido" - -#: plugins/gov_user/lib/ext/user.rb:19 -msgid "Email must be different from secondary email." -msgstr "Email deve ser diferente do email secundário" - -#: plugins/gov_user/lib/ext/user.rb:40 -msgid "E-mail or secondary e-mail already taken." -msgstr "Email ou email secundário já estão sendo utilizados." - -#: plugins/gov_user/lib/ext/user.rb:50 -msgid "Invalid secondary email format." -msgstr "Formato inválido do email sencundário" - -#: plugins/gov_user/lib/ext/search_controller.rb:17 -msgid "Institution Catalog" -msgstr "Catálogo de Instituições" - -#: plugins/gov_user/lib/ext/organization_rating.rb:16 -msgid "not found" -msgstr "não encontrada" - -#: plugins/gov_user/lib/institutions_block.rb:4 -#: plugins/gov_user/views/person_editor_extras.html.erb:11 -msgid "Institutions" -msgstr "Instituições" - -#: plugins/gov_user/lib/institutions_block.rb:12 -msgid "{#} institution" -msgid_plural "{#} institutions" -msgstr[0] "{#} instituição" -msgstr[1] "{#} instituições" - -#: plugins/gov_user/lib/institutions_block.rb:16 -msgid "This block displays the institutions in which the user is a member." -msgstr "Esse bloco mostra as instituições em que o usuário faz parte." - -#: plugins/gov_user/lib/institutions_block.rb:24 -#: plugins/gov_user/lib/institutions_block.rb:30 -msgid "institutions|View all" -msgstr "instituições|Ver todas" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:1 -msgid "Edit Institution" -msgstr "Editar Instituição" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:5 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:5 -msgid "" -"Note that the creation of communities in this environment is restricted. " -"Your request to create this new community will be sent to %{environment} " -"administrators and will be approved or rejected according to their methods " -"and criteria." -msgstr "" -"Note que a criação de comunidades neste ambiente é restrita. Sua requisição " -"para criar essa nova comunidade será enviada para os administradores " -"%{environment} e será aprovada ou rejeitada de acordo com seus métodos e " -"critérios." - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:11 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:11 -msgid "\"Can`t create new Institution: #{flash[:errors].length} errors\"" -msgstr "" -"\"Não foi possível criar nova Instituição: #{flash[:errors].length} erros\"" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:24 -msgid "All fields with (*) are mandatory" -msgstr "Todos os campos com (*) são obrigatórios" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:31 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:37 -msgid "Public Institution" -msgstr "Instituição Pública" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:36 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:33 -msgid "Private Institution" -msgstr "Instituição Privada" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:43 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:44 -msgid "Institution name already exists" -msgstr "Nome de Instituição já existe" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:47 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:48 -msgid "Corporate Name" -msgstr "Nome da Coorporação" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:52 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:53 -msgid "Country" -msgstr "País" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:56 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:57 -msgid "State" -msgstr "Estado" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:66 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:66 -msgid "CNPJ" -msgstr "CNPJ" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:73 -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:75 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:72 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:74 -msgid "Acronym" -msgstr "Sigla" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:74 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:73 -msgid "Fantasy name" -msgstr "Nome Fantasia" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:82 -#: plugins/gov_user/views/profile/_institution_tab.html.erb:17 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:81 -msgid "Governmental Sphere:" -msgstr "Esfera Governamental:" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:89 -#: plugins/gov_user/views/profile/_institution_tab.html.erb:16 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:88 -msgid "Governmental Power:" -msgstr "Poder Governamental:" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:95 -#: plugins/gov_user/views/profile/_institution_tab.html.erb:18 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:94 -msgid "Juridical Nature:" -msgstr "Natureza Jurídica:" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:102 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:101 -msgid "SISP?" -msgstr "SISP?" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:104 -#: plugins/gov_user/views/profile/_institution_tab.html.erb:19 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:104 -msgid "Yes" -msgstr "Sim" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:106 -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:109 -#: plugins/gov_user/views/profile/_institution_tab.html.erb:19 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:106 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:108 -msgid "No" -msgstr "Não" - -#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:114 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:114 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:118 -msgid "Save" -msgstr "Salvar" - -#: plugins/gov_user/views/profile/_institution_tab.html.erb:3 -msgid "Institution Information" -msgstr "Informação da Instituição" - -#: plugins/gov_user/views/profile/_institution_tab.html.erb:6 -msgid "Type:" -msgstr "Tipo:" - -#: plugins/gov_user/views/profile/_institution_tab.html.erb:7 -msgid "CNPJ:" -msgstr "CNPJ:" - -#: plugins/gov_user/views/profile/_institution_tab.html.erb:8 -msgid "Last modification:" -msgstr "Última modificação:" - -#: plugins/gov_user/views/profile/_institution_tab.html.erb:9 -msgid "Country:" -msgstr "País:" - -#: plugins/gov_user/views/profile/_institution_tab.html.erb:10 -msgid "State:" -msgstr "Estado:" - -#: plugins/gov_user/views/profile/_institution_tab.html.erb:11 -msgid "City:" -msgstr "Cidade:" - -#: plugins/gov_user/views/profile/_institution_tab.html.erb:13 -msgid "Fantasy Name:" -msgstr "Nome Fantasia:" - -#: plugins/gov_user/views/profile/_institution_tab.html.erb:15 -msgid "Acronym:" -msgstr "Sigla:" - -#: plugins/gov_user/views/profile/_institution_tab.html.erb:19 -msgid "SISP:" -msgstr "SISP:" - -#: plugins/gov_user/views/ratings_extra_field.html.erb:2 -msgid "Organization name or Enterprise name" -msgstr "Nome da organização ou empresa" - -#: plugins/gov_user/views/ratings_extra_field.html.erb:6 -#: plugins/gov_user/views/person_editor_extras.html.erb:21 -msgid "No institution found" -msgstr "Nenhuma instituição encontrada" - -#: plugins/gov_user/views/person_editor_extras.html.erb:2 -msgid "Secondary e-mail" -msgstr "Email secundário" - -#: plugins/gov_user/views/person_editor_extras.html.erb:22 -msgid "Add new institution" -msgstr "Adicionar nova instituição" - -#: plugins/gov_user/views/person_editor_extras.html.erb:23 -msgid "Create new institution" -msgstr "Criar nova instituição" - -#: plugins/gov_user/views/person_editor_extras.html.erb:39 -msgid "Should begin with a capital letter and no special characters" -msgstr "Deve começar com letra maíscula e não conter caracteres especiais" - -#: plugins/gov_user/views/person_editor_extras.html.erb:40 -msgid "Email should have the following format: name@host.br" -msgstr "Email deve ter o seguinte formato: name@host.br" - -#: plugins/gov_user/views/person_editor_extras.html.erb:41 -msgid "Site should have a valid format: http://name.hosts" -msgstr "Site deve ter um formato válido: http://name.hosts" - -#: plugins/gov_user/views/person_editor_extras.html.erb:42 -msgid "If you work in a public agency use your government e-Mail" -msgstr "Se você trabalha em uma agência pública use seu email governamental" - -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:1 -msgid "New Institution" -msgstr "Nova Instituição" - -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:16 -msgid "\"#{key_name.capitalize} #{value.join()}\"" -msgstr "\"#{key_name.capitalize} #{value.join()}\"" - -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:115 -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:119 -msgid "Cancel" -msgstr "Cancelar" - -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:121 -msgid "Could not send the form data to the server" -msgstr "Não foi possível enviar os dados do formulário para o servidor" - -#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:128 -msgid "Creating institution" -msgstr "Criar instituição" - -#: plugins/gov_user/views/search/institutions.html.erb:3 -msgid "Type words about the %s you're looking for" -msgstr "Escreve palavras sobre o %s que você está procurando" - -#: plugins/gov_user/views/incomplete_registration.html.erb:3 -msgid "Complete Profile" -msgstr "Complete o Perfil" - -#: plugins/gov_user/views/incomplete_registration.html.erb:6 -msgid "Complete your profile" -msgstr "Complete seu perfil" - -#: plugins/gov_user/views/incomplete_registration.html.erb:7 -msgid "Hide" -msgstr "Ocultar" - -#~ msgid "A plugin that does this and that." -#~ msgstr "Um plugin que faz isso e aquilo" - -#~ msgid "The governamental email must be the primary one." -#~ msgstr "O email governamental deve ser o principal" - -#~ msgid "Institution is obligatory if user has a government email." -#~ msgstr "Instituição é obrigatória se o usuário tem email governamental." diff --git a/src/gov_user/public/app.js b/src/gov_user/public/app.js deleted file mode 100644 index 7e98375..0000000 --- a/src/gov_user/public/app.js +++ /dev/null @@ -1,11 +0,0 @@ -(function() { - 'use strict'; - - var $ = modulejs.require('jquery'); - var Initializer = modulejs.require('Initializer'); - - - $(document).ready(function() { - Initializer.init(); - }); -})(); diff --git a/src/gov_user/public/initializer.js b/src/gov_user/public/initializer.js deleted file mode 100644 index 395f20c..0000000 --- a/src/gov_user/public/initializer.js +++ /dev/null @@ -1,33 +0,0 @@ -(function() { - 'use strict'; - - var dependencies = [ - 'ControlPanel', - 'CreateInstitution', - 'CompleteRegistration', - 'UserEditProfile', - 'NewCommunity', - 'GovUserCommentsExtraFields' - ]; - - - modulejs.define('Initializer', dependencies, function() { - var __dependencies = arguments; - - - function call_dependency(dependency) { - if( dependency.isCurrentPage() ) { - dependency.init(); - } - } - - - return { - init: function() { - for(var i=0, len = __dependencies.length; i < len; i++) { - call_dependency(__dependencies[i]); - } - } - }; - }); -})(); diff --git a/src/gov_user/public/lib/noosfero-root.js b/src/gov_user/public/lib/noosfero-root.js deleted file mode 100644 index cd3c8bf..0000000 --- a/src/gov_user/public/lib/noosfero-root.js +++ /dev/null @@ -1,13 +0,0 @@ -modulejs.define('NoosferoRoot', function() { - 'use strict'; - - - function url_with_subdirectory(url) { - return noosfero_root() + url; - } - - - return { - urlWithSubDirectory: url_with_subdirectory - } -}); diff --git a/src/gov_user/public/lib/select-element.js b/src/gov_user/public/lib/select-element.js deleted file mode 100644 index 26880ae..0000000 --- a/src/gov_user/public/lib/select-element.js +++ /dev/null @@ -1,35 +0,0 @@ -modulejs.define('SelectElement', function() { - 'use strict'; - - - function SelectElement(name, id) { - this.select = document.createElement("select"); - } - - - SelectElement.prototype.setAttr = function(attr, value) { - return this.select.setAttribute(attr, value); - }; - - - SelectElement.prototype.addOption = function(option) { - return this.select.add(option); - }; - - - SelectElement.prototype.getSelect = function() { - return this.select; - }; - - - SelectElement.generateOption = function(value, text) { - var option; - option = document.createElement("option"); - option.setAttribute("value", value); - option.text = text; - return option; - }; - - - return SelectElement; -}); diff --git a/src/gov_user/public/lib/select-field-choices.js b/src/gov_user/public/lib/select-field-choices.js deleted file mode 100644 index 095d4e1..0000000 --- a/src/gov_user/public/lib/select-field-choices.js +++ /dev/null @@ -1,81 +0,0 @@ -modulejs.define('SelectFieldChoices', ['jquery', 'SelectElement'], function($, SelectElement) { - 'use strict'; - - - function SelectFieldChoices(state_id, city_id, state_url) { - this.state_id = state_id; - this.input_html = $(state_id).parent().html(); - this.old_value = $(state_id).val(); - this.city_parent_div = $(city_id).parent().parent().parent(); - this.state_url = state_url; - } - - - SelectFieldChoices.prototype.getCurrentStateElement = function() { - return $(this.state_id); - }; - - - SelectFieldChoices.prototype.replaceWith = function(html) { - var parent_div = this.getCurrentStateElement().parent(); - parent_div.html(html); - }; - - - SelectFieldChoices.prototype.generateSelect = function(state_list) { - var select_element, option; - - select_element = new SelectElement(); - select_element.setAttr("name", "profile_data[state]"); - select_element.setAttr("id", "state_field"); - select_element.setAttr("class", "type-select valid"); - - state_list.forEach(function(state) { - option = SelectElement.generateOption(state, state); - select_element.addOption(option); - }); - - return select_element.getSelect(); - }; - - - SelectFieldChoices.prototype.replaceStateWithSelectElement = function() { - var klass = this; - - $.get(this.state_url, function(response) { - var select_html; - - if (response.length > 0) { - select_html = klass.generateSelect(response); - klass.replaceWith(select_html); - - if (klass.old_value.length !== 0 && response.include(klass.old_value)) { - klass.getCurrentStateElement().val(klass.old_value); - } - } - }); - }; - - - SelectFieldChoices.prototype.replaceStateWithInputElement = function() { - this.replaceWith(this.input_html); - }; - - - SelectFieldChoices.prototype.hideCity = function() { - this.city_parent_div.addClass("mpog_hidden_field"); - }; - - - SelectFieldChoices.prototype.showCity = function() { - this.city_parent_div.removeClass("mpog_hidden_field"); - }; - - - SelectFieldChoices.prototype.actualFieldIsInput = function() { - return this.getCurrentStateElement().attr("type") === "text"; - }; - - - return SelectFieldChoices; -}); diff --git a/src/gov_user/public/static/governmental_powers.txt b/src/gov_user/public/static/governmental_powers.txt deleted file mode 100644 index d798c3a..0000000 --- a/src/gov_user/public/static/governmental_powers.txt +++ /dev/null @@ -1,4 +0,0 @@ -Executivo -Legislativo -Judiciário -Não se aplica diff --git a/src/gov_user/public/static/governmental_sphere.txt b/src/gov_user/public/static/governmental_sphere.txt deleted file mode 100644 index ef7cfce..0000000 --- a/src/gov_user/public/static/governmental_sphere.txt +++ /dev/null @@ -1,4 +0,0 @@ -Federal -Estadual -Distrital -Municipal diff --git a/src/gov_user/public/static/juridical_nature.txt b/src/gov_user/public/static/juridical_nature.txt deleted file mode 100644 index d66b9a7..0000000 --- a/src/gov_user/public/static/juridical_nature.txt +++ /dev/null @@ -1,8 +0,0 @@ -Administração Direta -Autarquia -Empresa Pública -Fundação -Orgão Autônomo -Sociedade -Sociedade Civil -Sociedade de Economia Mista diff --git a/src/gov_user/public/style.css b/src/gov_user/public/style.css deleted file mode 100644 index c1fdab2..0000000 --- a/src/gov_user/public/style.css +++ /dev/null @@ -1,26 +0,0 @@ -#complete_registration { - padding: 5px; - width: 100%; - background-color: #fff; -} - -#complete_registration a { - text-decoration: none; -} - -#complete_registration a:hover { - font-weight: bold; -} - -#complete_registration_percentage { - width: 100%; - height: 20px; - background: #fff; - border: solid 1px #000; -} - -.highlight-error { - outline: none; - border-color: #FF0000; - box-shadow: 0 0 10px #FF0000; -} diff --git a/src/gov_user/public/vendor/jquery.js b/src/gov_user/public/vendor/jquery.js deleted file mode 100644 index a3f4ebf..0000000 --- a/src/gov_user/public/vendor/jquery.js +++ /dev/null @@ -1,3 +0,0 @@ -modulejs.define('jquery', function() { - return jQuery; -}); diff --git a/src/gov_user/public/vendor/jquery.maskedinput.min.js b/src/gov_user/public/vendor/jquery.maskedinput.min.js deleted file mode 100644 index 0d9ce6e..0000000 --- a/src/gov_user/public/vendor/jquery.maskedinput.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - Masked Input plugin for jQuery - Copyright (c) 2007-2013 Josh Bush (digitalbush.com) - Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license) - Version: 1.3.1 -*/ -(function(e){function t(){var e=document.createElement("input"),t="onpaste";return e.setAttribute(t,""),"function"==typeof e[t]?"paste":"input"}var n,a=t()+".mask",r=navigator.userAgent,i=/iphone/i.test(r),o=/android/i.test(r);e.mask={definitions:{9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},dataName:"rawMaskFn",placeholder:"_"},e.fn.extend({caret:function(e,t){var n;if(0!==this.length&&!this.is(":hidden"))return"number"==typeof e?(t="number"==typeof t?t:e,this.each(function(){this.setSelectionRange?this.setSelectionRange(e,t):this.createTextRange&&(n=this.createTextRange(),n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",e),n.select())})):(this[0].setSelectionRange?(e=this[0].selectionStart,t=this[0].selectionEnd):document.selection&&document.selection.createRange&&(n=document.selection.createRange(),e=0-n.duplicate().moveStart("character",-1e5),t=e+n.text.length),{begin:e,end:t})},unmask:function(){return this.trigger("unmask")},mask:function(t,r){var c,l,s,u,f,h;return!t&&this.length>0?(c=e(this[0]),c.data(e.mask.dataName)()):(r=e.extend({placeholder:e.mask.placeholder,completed:null},r),l=e.mask.definitions,s=[],u=h=t.length,f=null,e.each(t.split(""),function(e,t){"?"==t?(h--,u=e):l[t]?(s.push(RegExp(l[t])),null===f&&(f=s.length-1)):s.push(null)}),this.trigger("unmask").each(function(){function c(e){for(;h>++e&&!s[e];);return e}function d(e){for(;--e>=0&&!s[e];);return e}function m(e,t){var n,a;if(!(0>e)){for(n=e,a=c(t);h>n;n++)if(s[n]){if(!(h>a&&s[n].test(R[a])))break;R[n]=R[a],R[a]=r.placeholder,a=c(a)}b(),x.caret(Math.max(f,e))}}function p(e){var t,n,a,i;for(t=e,n=r.placeholder;h>t;t++)if(s[t]){if(a=c(t),i=R[t],R[t]=n,!(h>a&&s[a].test(i)))break;n=i}}function g(e){var t,n,a,r=e.which;8===r||46===r||i&&127===r?(t=x.caret(),n=t.begin,a=t.end,0===a-n&&(n=46!==r?d(n):a=c(n-1),a=46===r?c(a):a),k(n,a),m(n,a-1),e.preventDefault()):27==r&&(x.val(S),x.caret(0,y()),e.preventDefault())}function v(t){var n,a,i,l=t.which,u=x.caret();t.ctrlKey||t.altKey||t.metaKey||32>l||l&&(0!==u.end-u.begin&&(k(u.begin,u.end),m(u.begin,u.end-1)),n=c(u.begin-1),h>n&&(a=String.fromCharCode(l),s[n].test(a)&&(p(n),R[n]=a,b(),i=c(n),o?setTimeout(e.proxy(e.fn.caret,x,i),0):x.caret(i),r.completed&&i>=h&&r.completed.call(x))),t.preventDefault())}function k(e,t){var n;for(n=e;t>n&&h>n;n++)s[n]&&(R[n]=r.placeholder)}function b(){x.val(R.join(""))}function y(e){var t,n,a=x.val(),i=-1;for(t=0,pos=0;h>t;t++)if(s[t]){for(R[t]=r.placeholder;pos++a.length)break}else R[t]===a.charAt(pos)&&t!==u&&(pos++,i=t);return e?b():u>i+1?(x.val(""),k(0,h)):(b(),x.val(x.val().substring(0,i+1))),u?t:f}var x=e(this),R=e.map(t.split(""),function(e){return"?"!=e?l[e]?r.placeholder:e:void 0}),S=x.val();x.data(e.mask.dataName,function(){return e.map(R,function(e,t){return s[t]&&e!=r.placeholder?e:null}).join("")}),x.attr("readonly")||x.one("unmask",function(){x.unbind(".mask").removeData(e.mask.dataName)}).bind("focus.mask",function(){clearTimeout(n);var e;S=x.val(),e=y(),n=setTimeout(function(){b(),e==t.length?x.caret(0,e):x.caret(e)},10)}).bind("blur.mask",function(){y(),x.val()!=S&&x.change()}).bind("keydown.mask",g).bind("keypress.mask",v).bind(a,function(){setTimeout(function(){var e=y(!0);x.caret(e),r.completed&&e==x.val().length&&r.completed.call(x)},0)}),y()}))}})})(jQuery); \ No newline at end of file diff --git a/src/gov_user/public/vendor/modulejs-1.5.0.min.js b/src/gov_user/public/vendor/modulejs-1.5.0.min.js deleted file mode 100644 index 9905b63..0000000 --- a/src/gov_user/public/vendor/modulejs-1.5.0.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* modulejs 1.5.0 - http://larsjung.de/modulejs/ */ -!function(n){this.modulejs=n()}(function(){"use strict";function n(n){return function(r){return l.toString.call(r)==="[object "+n+"]"}}function r(n){return n===new Object(n)}function t(n,r){return l.hasOwnProperty.call(n,r)}function e(n,r,e){if(p&&n.forEach===p)n.forEach(r,e);else if(n.length===+n.length)for(var i=0,o=n.length;o>i;i+=1)r.call(e,n[i],i,n);else for(var u in n)t(n,u)&&r.call(e,n[u],u,n)}function i(n,r){for(var t=0,e=n.length;e>t;t+=1)if(n[t]===r)return!0;return!1}function o(n){var r={},i=[];return e(n,function(n){t(r,n)||(i.push(n),r[n]=1)}),i}function u(n,r,t){if(n){var e=new Error("[modulejs-"+r+"] "+t);throw e.code=r,e}}function c(n,r,a){if(u(!h(n),31,'id must be a string "'+n+'"'),!r&&t(b,n))return b[n];var f=y[n];u(!f,32,'id not defined "'+n+'"'),a=(a||[]).slice(0),a.push(n);var s=[];if(e(f.deps,function(n){u(i(a,n),33,"circular dependencies: "+a+" & "+n),r?(s=s.concat(c(n,r,a)),s.push(n)):s.push(c(n,r,a))}),r)return o(s);var d=f.fn.apply(void 0,s);return b[n]=d,d}function a(n,t,e){void 0===e&&(e=t,t=[]),u(!h(n),11,'id must be a string "'+n+'"'),u(y[n],12,'id already defined "'+n+'"'),u(!g(t),13,'dependencies for "'+n+'" must be an array "'+t+'"'),u(!r(e)&&!v(e),14,'arg for "'+n+'" must be object or function "'+e+'"'),y[n]={id:n,deps:t,fn:v(e)?e:function(){return e}}}function f(n){return c(n)}function s(){var n={};return e(y,function(r,e){n[e]={deps:r.deps.slice(0),reqs:c(e,!0),init:t(b,e)}}),e(y,function(r,t){var o=[];e(y,function(r,e){i(n[e].reqs,t)&&o.push(e)}),n[t].reqd=o}),n}function d(n){var r="\n";return e(s(),function(t,e){var i=n?t.reqd:t.reqs;r+=(t.init?"* ":" ")+e+" -> [ "+i.join(", ")+" ]\n"}),r}var l=Object.prototype,p=Array.prototype.forEach,h=n("String"),v=n("Function"),g=Array.isArray||n("Array"),y={},b={};return{define:a,require:f,state:s,log:d,_private:{isString:h,isFunction:v,isArray:g,isObject:r,has:t,each:e,contains:i,uniq:o,err:u,definitions:y,instances:b,resolve:c}}}); \ No newline at end of file diff --git a/src/gov_user/public/views/complete-registration.js b/src/gov_user/public/views/complete-registration.js deleted file mode 100644 index 81dd745..0000000 --- a/src/gov_user/public/views/complete-registration.js +++ /dev/null @@ -1,60 +0,0 @@ -modulejs.define('CompleteRegistration', ['jquery', 'NoosferoRoot'], function($, NoosferoRoot) { - 'use strict'; - - - var AJAX_URL = { - hide_registration_incomplete_percentage: - NoosferoRoot.urlWithSubDirectory("/plugin/gov_user/hide_registration_incomplete_percentage") - }; - - - function hide_incomplete_percentage(evt) { - evt.preventDefault(); - - jQuery.get(AJAX_URL.hide_registration_incomplete_percentage, {hide:true}, function(response){ - if( response === true ) { - jQuery("#complete_registration").fadeOut(); - } - }); - } - - - function show_complete_progressbar() { - var percentage = jQuery("#complete_registration_message span").html(); - var canvas_tag = document.getElementById("complete_registration_percentage"); - - if( canvas_tag !== null ) { - var context = canvas_tag.getContext("2d"); - - percentage = canvas_tag.width*(percentage/100.0); - - context.beginPath(); - context.rect(0, 0, percentage, canvas_tag.height); - context.fillStyle = '#00FF00'; - context.fill(); - } - } - - - function repositioning_bar_percentage() { - var complete_message = $("#complete_registration").remove(); - - $(".profile-info-options").before(complete_message); - } - - - return { - isCurrentPage: function() { - return $("#complete_registration").length === 1; - }, - - - init: function() { - repositioning_bar_percentage(); - - jQuery(".hide-incomplete-percentage").click(hide_incomplete_percentage); - - show_complete_progressbar(); - } - } -}); diff --git a/src/gov_user/public/views/control-panel.js b/src/gov_user/public/views/control-panel.js deleted file mode 100644 index d89a588..0000000 --- a/src/gov_user/public/views/control-panel.js +++ /dev/null @@ -1,32 +0,0 @@ -modulejs.define('ControlPanel', ['jquery'], function($) { - 'use strict'; - - function add_institution_on_control_panel(control_panel) { - /*var institution_link = $(".control-panel-instituton-link").remove(); - - if( institution_link.size() > 0 ) { - control_panel.prepend(institution_link); - }*/ - } - - - function add_itens_on_controla_panel() { - var control_panel = $(".control-panel"); - - if( control_panel.size() > 0 ) { - add_institution_on_control_panel(control_panel); - } - } - - - return { - isCurrentPage: function() { - return $("#profile-editor-index").length === 1; - }, - - - init: function() { - add_itens_on_controla_panel(); - } - } -}); diff --git a/src/gov_user/public/views/create-institution.js b/src/gov_user/public/views/create-institution.js deleted file mode 100644 index 354295c..0000000 --- a/src/gov_user/public/views/create-institution.js +++ /dev/null @@ -1,406 +0,0 @@ -modulejs.define('CreateInstitution', ['jquery', 'NoosferoRoot', 'SelectElement'], function($, NoosferoRoot, SelectElement) { - 'use strict'; - - var AJAX_URL = { - create_institution_modal: - NoosferoRoot.urlWithSubDirectory("/plugin/gov_user/create_institution"), - new_institution: - NoosferoRoot.urlWithSubDirectory("/plugin/gov_user/new_institution"), - institution_already_exists: - NoosferoRoot.urlWithSubDirectory("/plugin/gov_user/institution_already_exists"), - get_institutions: - NoosferoRoot.urlWithSubDirectory("/plugin/gov_user/get_institutions"), - auto_complete_city: - NoosferoRoot.urlWithSubDirectory("/account/search_cities") - }; - - - function open_create_institution_modal(evt) { - evt.preventDefault(); - - $.get(AJAX_URL.create_institution_modal, function(response){ - $("#institution_dialog").html(response); - - set_form_count_custom_data(); - set_events(); - - $("#institution_dialog").dialog({ - modal: true, - width: 500, - height: 530, - position: 'center', - close: function() { - $("#institution_dialog").html(""); - $('#institution_empty_ajax_message').switchClass("show-field", "hide-field"); - } - }); - }); - } - - - function show_public_institutions_fields() { - $(".public-institutions-fields").show(); - } - - - function show_private_institutions_fields() { - $(".public-institutions-fields").hide(); - $("#institutions_governmental_power option").selected(0); - $("#institutions_governmental_sphere option").selected(0); - } - - - function get_comunity_post_data() { - return { - name : $("#community_name").val(), - country : $("#community_country").val(), - state : $("#community_state").val(), - city : $("#community_city").val() - }; - } - - - function get_institution_post_data() { - return { - cnpj: $("#institutions_cnpj").val(), - type: $("input[name='institutions[type]']:checked").val(), - acronym : $("#institutions_acronym").val(), - governmental_power: $("#institutions_governmental_power").selected().val(), - governmental_sphere: $("#institutions_governmental_sphere").selected().val(), - juridical_nature: $("#institutions_juridical_nature").selected().val(), - corporate_name: $("#institutions_corporate_name").val() - }; - } - - - function get_post_data() { - var post_data = {}; - - post_data.community = get_comunity_post_data(); - post_data.institutions = get_institution_post_data(); - - return post_data; - } - - - function success_ajax_response(response) { - close_loading(); - - if(response.success){ - var institution_name = response.institution_data.name; - var institution_id = response.institution_data.id; - - $("#institution_dialog").html("

"+response.message+"

"); - $("#create_institution_errors").switchClass("show-field", "hide-field"); - - $(".institution_container").append(get_clone_institution_data(institution_id)); - add_selected_institution_to_list(institution_id, institution_name); - - $(".remove-institution").click(remove_institution); - } else { - var errors = create_error_list(response); - $("#create_institution_errors").switchClass("hide-field", "show-field").html("

"+response.message+"

"+errors); - - show_errors_in_each_field(response.errors); - } - } - - function create_error_list(response){ - var errors = "
    "; - var field_name; - - for(var error_key in response.errors) { - field_name = adjust_error_key(error_key); - - if(response.errors[error_key].length > 0){ - errors += "
  • "+field_name+": "+response.errors[error_key]+"
  • "; - } - } - - errors += "
"; - return errors; - } - - - function show_errors_in_each_field(errors) { - var error_keys = Object.keys(errors); - - // (field)|(field)|... - var verify_error = new RegExp("(\\[" + error_keys.join("\\])|(\\[") + "\\])" ); - - var fields_with_errors = $("#institution_dialog .formfield input").filter(function(index, field) { - $(field).removeClass("highlight-error"); - return verify_error.test(field.getAttribute("name")); - }); - - var selects_with_errors = $("#institution_dialog .formfield select").filter(function(index, field) { - $(field).removeClass("highlight-error"); - return verify_error.test(field.getAttribute("name")); - }); - - fields_with_errors.addClass("highlight-error"); - selects_with_errors.addClass("highlight-error"); - } - - - function adjust_error_key(error_key) { - var text = error_key.replace(/_/, " "); - text = text.charAt(0).toUpperCase() + text.slice(1); - - return text; - } - - - function save_institution(evt) { - evt.preventDefault(); - - open_loading($("#loading_message").val()); - $.ajax({ - url: AJAX_URL.new_institution, - data : get_post_data(), - type: "POST", - success: success_ajax_response, - error: function() { - close_loading(); - var error_message = $("#institution_error_message").val(); - $("#create_institution_errors").switchClass("hide-field", "show-field").html("

"+error_message+"

"); - } - }); - } - - function cancel_institution(evt){ - evt.preventDefault(); - $('#institution_dialog').dialog('close'); - } - - - function institution_already_exists(){ - if( this.value.length >= 3 ) { - $.get(AJAX_URL.institution_already_exists, {name:this.value}, function(response){ - if( response === true ) { - $("#already_exists_text").switchClass("hide-field", "show-field"); - } else { - $("#already_exists_text").switchClass("show-field", "hide-field"); - } - }); - } - } - - - function get_clone_institution_data(value) { - var user_institutions = $(".user_institutions").first().clone(); - user_institutions.val(value); - - return user_institutions; - } - - - function institution_autocomplete() { - $("#input_institution").autocomplete({ - source : function(request, response){ - $.ajax({ - type: "GET", - url: AJAX_URL.get_institutions, - data: {query: request.term}, - success: function(result){ - response(result); - - if( result.length === 0 ) { - $('#institution_empty_ajax_message').switchClass("hide-field", "show-field"); - } else { - $('#institution_empty_ajax_message').switchClass("show-field", "hide-field"); - } - }, - error: function(ajax, stat, errorThrown) { - console.log('Link not found : ' + errorThrown); - } - }); - }, - - minLength: 2, - - select : function (event, selected) { - $("#institution_selected").val(selected.item.id).attr("data-name", selected.item.label); - } - }); - } - - - function add_selected_institution_to_list(id, name) { - var selected_institution = "
  • "+name; - selected_institution += "
  • "; - - $(".institutions_added").append(selected_institution); - } - - - function add_new_institution(evt) { - evt.preventDefault(); - var selected = $("#institution_selected"); - var institution_already_added = $(".institutions_added li[data-institution='"+selected.val()+"']").length; - - if(selected.val().length > 0 && institution_already_added === 0) { - //field that send the institutions to the server - $(".institution_container").append(get_clone_institution_data(selected.val())); - - // Visualy add the selected institution to the list - add_selected_institution_to_list(selected.val(), selected.attr("data-name")); - - // clean the institution flag - selected.val("").attr("data-name", ""); - $("#input_institution").val(""); - - $(".remove-institution").click(remove_institution); - } - } - - - function remove_institution(evt) { - evt.preventDefault(); - var code = $(this).parent().attr("data-institution"); - - $(".user_institutions[value="+code+"]").remove(); - $(this).parent().remove(); - } - - - function add_mask_to_form_items() { - if ($.mask) { - $("#institutions_cnpj").mask("99.999.999/9999-99"); - } - } - - - function show_hide_cnpj_city(country) { - var cnpj = $("#institutions_cnpj").parent().parent(); - var city = $("#community_city").parent().parent(); - var state = $("#community_state").parent().parent(); - var inst_type = $("input[name='institutions[type]']:checked").val(); - institution_type_actions(inst_type); - - if( country === "-1" ) $("#community_country").val("BR"); - - if( country !== "BR" ) { - cnpj.hide(); - city.hide(); - state.hide(); - } else { - cnpj.show(); - city.show(); - state.show(); - } - } - - function institution_type_actions(type) { - var country = $("#community_country").val(); - if( type === "PublicInstitution" && country == "BR") { - show_public_institutions_fields(); - } else { - show_private_institutions_fields(); - } - } - - - function set_form_count_custom_data() { - var divisor_option = SelectElement.generateOption("-1", "--------------------------------"); - var default_option = SelectElement.generateOption("BR", "Brazil"); - - - var inst_type = $("input[name='institutions[type]']:checked").val(); - var country = $("#community_country").val(); - - institution_type_actions(inst_type); - show_hide_cnpj_city(country); - - if( $('#community_country').find("option[value='']").length === 1 ) { - $('#community_country').find("option[value='']").remove(); - $('#community_country').prepend(divisor_option); - $('#community_country').prepend(default_option); - - if($("#edit_institution_page").val() === "false") { - $('#community_country').val("BR"); - show_hide_cnpj_city($('#community_country').val()); - } - } - } - - function autoCompleteCity() { - var country_selected = $('#community_country').val(); - - if(country_selected == "BR") { - $('#community_city').autocomplete({ - source : function(request, response){ - $.ajax({ - type: "GET", - url: AJAX_URL.auto_complete_city, - data: {city_name: request.term, state_name: $("#community_state").val()}, - success: function(result){ - response(result); - - // There are two autocompletes in this page, the last one is modal - // autocomplete just put it above the modal - $(".ui-autocomplete").last().css("z-index", 1000); - }, - error: function(ajax, stat, errorThrown) { - console.log('Link not found : ' + errorThrown); - } - }); - }, - - minLength: 3 - }); - } else { - if ($('#community_city').data('autocomplete')) { - $('#community_city').autocomplete("destroy"); - $('#community_city').removeData('autocomplete'); - } - } - } - - function set_events() { - $("#create_institution_link").click(open_create_institution_modal); - - $("input[name='institutions[type]']").click(function(){ - institution_type_actions(this.value); - }); - - $('#save_institution_button').click(save_institution); - $('#cancel_institution_button').click(cancel_institution); - - $("#community_name").keyup(institution_already_exists); - - $("#add_new_institution").click(add_new_institution); - - $(".remove-institution").click(remove_institution); - - $("#community_country").change(function(){ - show_hide_cnpj_city(this.value); - }); - - add_mask_to_form_items(); - - institution_autocomplete(); - - autoCompleteCity(); - $('#community_country').change(function(){ - autoCompleteCity(); - }); - } - - - return { - isCurrentPage: function() { - return $("#institution_form").length === 1; - }, - - - init: function() { - set_form_count_custom_data(); - set_events(); - }, - - institution_autocomplete: function(){ - institution_autocomplete(); - } - }; -}); diff --git a/src/gov_user/public/views/gov-user-comments-extra-fields.js b/src/gov_user/public/views/gov-user-comments-extra-fields.js deleted file mode 100644 index d302437..0000000 --- a/src/gov_user/public/views/gov-user-comments-extra-fields.js +++ /dev/null @@ -1,26 +0,0 @@ -modulejs.define("GovUserCommentsExtraFields", ['jquery','CreateInstitution'], function($,CreateInstitution) { - - function set_events() { - CreateInstitution.institution_autocomplete(); - } - - - function prepend_to_additional_information() { - var institution_comments = $("#input_institution_comments").remove(); - - $(".comments-software-extra-fields").prepend(institution_comments); - } - - - return { - isCurrentPage: function() { - return $(".star-rate-form").length === 1; - }, - - init: function() { - prepend_to_additional_information(); - set_events(); - } - } - -}) diff --git a/src/gov_user/public/views/new-community.js b/src/gov_user/public/views/new-community.js deleted file mode 100644 index b665e8f..0000000 --- a/src/gov_user/public/views/new-community.js +++ /dev/null @@ -1,28 +0,0 @@ -modulejs.define("NewCommunity", ['jquery'], function($) { - - function replace_mandatory_message() { - $(".required-field").first() - .replaceWith(" Os campos em destaque são obrigatórios. "); - } - - function remove_image_builder_text() { - $("label:contains('Image builder')").hide(); - } - - function hide_organization_template_fields(){ - $('#template-options').hide(); - } - - return { - - isCurrentPage: function() { - return true; - }, - - init: function() { - replace_mandatory_message(); - remove_image_builder_text(); - hide_organization_template_fields(); - } - } -}) diff --git a/src/gov_user/public/views/user-edit-profile.js b/src/gov_user/public/views/user-edit-profile.js deleted file mode 100644 index c92c987..0000000 --- a/src/gov_user/public/views/user-edit-profile.js +++ /dev/null @@ -1,216 +0,0 @@ -modulejs.define('UserEditProfile', ['jquery', 'SelectElement', 'SelectFieldChoices', 'CreateInstitution'], function($, SelectElement, SelectFieldChoices, CreateInstitution) { - 'use strict'; - - function set_form_count_custom_data() { - var divisor_option = SelectElement.generateOption("-1", "--------------------------------"); - var default_option = SelectElement.generateOption("BR", "Brazil"); - - $('#profile_data_country').find("option[value='']").remove(); - $('#profile_data_country').prepend(divisor_option); - $('#profile_data_country').prepend(default_option); - $('#profile_data_country').val("BR"); - } - - - function set_initial_form_custom_data(selectFieldChoices) { - set_form_count_custom_data(); - - $("#password-balloon").html($("#user_password_menssage").val()); - $("#profile_data_email").parent().append($("#email_public_message").remove()); - - if( $("#state_field").length !== 0 ) selectFieldChoices.replaceStateWithSelectElement(); - } - - - function show_state_if_country_is_brazil() { - var selectFieldChoices = new SelectFieldChoices("#state_field", "#city_field", "/plugin/gov_user/get_brazil_states"); - set_initial_form_custom_data(selectFieldChoices); - - $("#profile_data_country").change(function(){ - if( this.value === "-1" ) $(this).val("BR"); - - if( this.value === "BR" && selectFieldChoices.actualFieldIsInput() ) { - selectFieldChoices.replaceStateWithSelectElement(); - selectFieldChoices.showCity(); - } else if( this.value !== "BR" && !selectFieldChoices.actualFieldIsInput() ) { - selectFieldChoices.replaceStateWithInputElement(); - selectFieldChoices.hideCity(); - } - }); - } - - - function show_or_hide_phone_mask() { - if($("#profile_data_country").val() === "BR") { - if( (typeof $("#profile_data_cell_phone").data("rawMaskFn") === 'undefined') ) { - // $("#profile_data_cell_phone").mask("(99) 9999?9-9999"); - // $("#profile_data_comercial_phone").mask("(99) 9999?9-9999"); - // $("#profile_data_contact_phone").mask("(99) 9999?9-9999"); - } - } else { - // $("#profile_data_cell_phone").unmask(); - // $("#profile_data_comercial_phone").unmask(); - // $("#profile_data_contact_phone").unmask(); - } - } - - - function fix_phone_mask_format(id) { - $(id).blur(function() { - var last = $(this).val().substr( $(this).val().indexOf("-") + 1 ); - - if( last.length === 3 ) { - var move = $(this).val().substr( $(this).val().indexOf("-") - 1, 1 ); - var lastfour = move + last; - var first = $(this).val().substr( 0, 9 ); - - $(this).val( first + '-' + lastfour ); - } - }); - } - - - function show_plugin_error_message(field_selector, hidden_message_id ) { - var field = $(field_selector); - - field.removeClass("validated").addClass("invalid"); - - if(!$("." + hidden_message_id)[0]) { - var message = $("#" + hidden_message_id).val(); - field.parent().append("
    "+message+""); - } else { - $("." + hidden_message_id).show(); - } - } - - - function hide_plugin_error_message(field_selector, hidden_message_id) { - $(field_selector).removeClass("invalid").addClass("validated"); - $("." + hidden_message_id).hide(); - } - - - function add_blur_fields(field_selector, hidden_message_id, validation_function, allow_blank) { - $(field_selector).blur(function(){ - $(this).attr("class", ""); - - if( validation_function(this.value, !!allow_blank) ) { - show_plugin_error_message(field_selector, hidden_message_id); - } else { - hide_plugin_error_message(field_selector, hidden_message_id); - } - }); - } - - - function invalid_email_validation(value, allow_blank) { - if( allow_blank && value.trim().length === 0 ) { - return false; - } - - var correct_format_regex = new RegExp(/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/); - - return !correct_format_regex.test(value); - } - - - function invalid_site_validation(value) { - var correct_format_regex = new RegExp(/(^|)(http[s]{0,1})\:\/\/(\w+[.])\w+/g); - - return !correct_format_regex.test(value); - } - - - function get_privacy_selector_parent_div(field_id, actual) { - if( actual === undefined ) actual = $(field_id); - - if( actual.is("form") || actual.length === 0 ) return null; // Not allow recursion over form - - if( actual.hasClass("field-with-privacy-selector") ) { - return actual; - } else { - return get_privacy_selector_parent_div(field_id, actual.parent()); - } - } - - - function try_to_remove(list, field) { - try { - list.push(field.remove()); - } catch(e) { - console.log("Cound not remove field"); - } - } - - - function get_edit_fields_in_insertion_order() { - var containers = []; - - try_to_remove(containers, get_privacy_selector_parent_div("#city_field")); - try_to_remove(containers, get_privacy_selector_parent_div("#state_field")); - try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_country")); - try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_birth_date")); - try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_organization_website")); - try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_personal_website")); - try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_comercial_phone")); - try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_contact_phone")); - try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_cell_phone")); - try_to_remove(containers, $("#select_institution")); - try_to_remove(containers, $("#user_secondary_email").parent().parent()); - try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_email")); - try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_name")); - try_to_remove(containers, $(".pseudoformlabel").parent().parent()); - try_to_remove(containers, $("h2")[0]); - - return containers; - } - - - function change_edit_fields_order() { - var form = $("#profile-data"); - - if( form.length !== 0 ) { - var containers = get_edit_fields_in_insertion_order(); - - containers.forEach(function(container){ - form.prepend(container); - }); - } - } - - - function set_fields_validations() { - $("#profile_data_country").blur(show_or_hide_phone_mask); - - // $("#profile_data_birth_date").mask("99/99/9999"); - - fix_phone_mask_format("#profile_data_cell_phone"); - fix_phone_mask_format("#profile_data_comercial_phone"); - fix_phone_mask_format("#profile_data_contact_phone"); - - add_blur_fields("#profile_data_email", "email_error", invalid_email_validation); - add_blur_fields("#user_secondary_email", "email_error", invalid_email_validation, true); - add_blur_fields("#profile_data_personal_website", "site_error", invalid_site_validation); - add_blur_fields("#profile_data_organization_website", "site_error", invalid_site_validation); - } - - - return { - isCurrentPage: function() { - return $('#profile_data_email').length === 1; - }, - - - init: function() { - change_edit_fields_order(); // To change the fields order, it MUST be the first function executed - - show_state_if_country_is_brazil(); - - show_or_hide_phone_mask(); - - set_fields_validations(); - - CreateInstitution.init(); - } - } -}); diff --git a/src/gov_user/test/functional/gov_user_plugin_controller_test.rb b/src/gov_user/test/functional/gov_user_plugin_controller_test.rb deleted file mode 100644 index 48b4fc4..0000000 --- a/src/gov_user/test/functional/gov_user_plugin_controller_test.rb +++ /dev/null @@ -1,236 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/institution_test_helper' -require File.dirname(__FILE__) + '/../../controllers/gov_user_plugin_controller' - -class GovUserPluginController; def rescue_action(e) raise e end; end -class GovUserPluginControllerTest < ActionController::TestCase - - - def setup - @admin = create_user("adminuser").person - @admin.stubs(:has_permission?).returns("true") - @controller.stubs(:current_user).returns(@admin.user) - - @environment = Environment.default - @environment.enabled_plugins = ['SoftwareCommunitiesPlugin'] - @environment.add_admin(@admin) - @environment.save - - @gov_power = GovernmentalPower.create(:name=>"Some Gov Power") - @gov_sphere = GovernmentalSphere.create(:name=>"Some Gov Sphere") - @juridical_nature = JuridicalNature.create(:name => "Autarquia") - @response = ActionController::TestResponse.new - - @institution_list = [] - @institution_list << InstitutionTestHelper.create_public_institution( - "Ministerio Publico da Uniao", - "MPU", - "BR", - "DF", - "Gama", - @juridical_nature, - @gov_power, - @gov_sphere, - "12.345.678/9012-45" - ) - @institution_list << InstitutionTestHelper.create_public_institution( - "Tribunal Regional da Uniao", - "TRU", - "BR", - "DF", - "Brasilia", - @juridical_nature, - @gov_power, - @gov_sphere, - "12.345.678/9012-90" - ) - - end - - should "Search for institution with acronym" do - xhr :get, :get_institutions, :query=>"TRU" - - json_response = ActiveSupport::JSON.decode(@response.body) - - assert_equal "Tribunal Regional da Uniao", json_response[0]["value"] - end - - should "Search for institution with name" do - xhr :get, :get_institutions, :query=>"Minis" - - json_response = ActiveSupport::JSON.decode(@response.body) - - assert_equal "Ministerio Publico da Uniao", json_response[0]["value"] - end - - should "search with name or acronym and return a list with institutions" do - xhr :get, :get_institutions, :query=>"uni" - - json_response = ActiveSupport::JSON.decode(@response.body) - - assert_equal "Ministerio Publico da Uniao", json_response[0]["value"] - assert_equal "Tribunal Regional da Uniao", json_response[1]["value"] - end - - should "method create_institution return the html for modal" do - @controller.stubs(:current_user).returns(@admin.user) - xhr :get, :create_institution - assert_template 'create_institution' - end - - should "create new institution with ajax without acronym" do - @controller.stubs(:verify_recaptcha).returns(true) - - fields = InstitutionTestHelper.generate_form_fields( - "foo bar", - "BR", - "DF", - "Brasilia", - "12.234.567/8900-10", - "PublicInstitution" - ) - fields[:institutions][:governmental_power] = @gov_power.id - fields[:institutions][:governmental_sphere] = @gov_sphere.id - fields[:institutions][:juridical_nature] = @juridical_nature.id - - xhr :get, :new_institution, fields - - json_response = ActiveSupport::JSON.decode(@response.body) - - assert json_response["success"] - end - - should "create a institution without cnpj" do - @controller.stubs(:verify_recaptcha).returns(true) - - fields = InstitutionTestHelper.generate_form_fields( - "Some Private Institution", - "BR", - "DF", - "Brasilia", - "", - "PrivateInstitution" - ) - fields[:institutions][:acronym] = "SPI" - - xhr :get, :new_institution, fields - - json_response = ActiveSupport::JSON.decode(@response.body) - - assert json_response["success"] - end - - should "verify if institution name already exists" do - xhr :get, :institution_already_exists, :name=>"Ministerio Publico da Uniao" - assert_equal "true", @response.body - - xhr :get, :institution_already_exists, :name=>"Another name here" - assert_equal "false", @response.body - end - - should "hide registration incomplete message" do - xhr :get, :hide_registration_incomplete_percentage, :hide=>true - assert_equal "true", @response.body - end - - should "not hide registration incomplete message" do - xhr :get, :hide_registration_incomplete_percentage, :hide=>false - assert_equal "false", @response.body - end - - should "Create new institution with method post" do - @controller.stubs(:verify_recaptcha).returns(true) - - fields = InstitutionTestHelper.generate_form_fields( - "Some Private Institution", - "BR", - "DF", - "Brasilia", - "12.345.567/8900-10", - "PrivateInstitution" - ) - fields[:institutions][:acronym] = "SPI" - - post :new_institution, fields - - assert_redirected_to(controller: "admin_panel", action: "index") - end - - should "not create new institution with method post without cnpj" do - @controller.stubs(:verify_recaptcha).returns(true) - - fields = InstitutionTestHelper.generate_form_fields( - "Some Private Institution", - "BR", - "DF", - "Brasilia", - "56.366.790/0001-88", - "PrivateInstitution" - ) - - post :new_institution, fields - - assert_redirected_to(controller: "admin_panel", action: "index") - end - - should "Create foreign institution without city, state and cnpj by post" do - @controller.stubs(:verify_recaptcha).returns(true) - - fields = InstitutionTestHelper.generate_form_fields( - "Foreign institution", - "AZ", - "", - "", - "", - "PrivateInstitution" - ) - fields[:institutions][:acronym] = "FI" - - post :new_institution, fields - - assert_redirected_to(controller: "admin_panel", action: "index") - end - - should "Create foreign institution without city, state and cnpj by ajax" do - @controller.stubs(:verify_recaptcha).returns(true) - - fields = InstitutionTestHelper.generate_form_fields( - "Foreign institution", - "AZ", - "", - "", - "", - "PrivateInstitution" - ) - fields[:institutions][:acronym] = "FI" - - xhr :post, :new_institution, fields - - json_response = ActiveSupport::JSON.decode(@response.body) - - assert json_response["success"] - end - - should "add environment admins to institution when created via admin panel" do - @controller.stubs(:verify_recaptcha).returns(true) - admin2 = create_user("another_admin").person - admin2.stubs(:has_permission?).returns("true") - @environment.add_admin(admin2) - @environment.save - - fields = InstitutionTestHelper.generate_form_fields( - "Private Institution", - "BR", - "DF", - "Brasilia", - "12.323.557/8900-10", - "PrivateInstitution" - ) - fields[:institutions][:acronym] = "PI" - fields[:edit_institution_page] = false - post :new_institution, fields - - assert(Institution.last.community.admins.include?(admin2) ) - end - -end diff --git a/src/gov_user/test/functional/gov_user_plugin_myprofile_controller.rb b/src/gov_user/test/functional/gov_user_plugin_myprofile_controller.rb deleted file mode 100644 index 61c48b1..0000000 --- a/src/gov_user/test/functional/gov_user_plugin_myprofile_controller.rb +++ /dev/null @@ -1,105 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/institution_test_helper' -require( -File.dirname(__FILE__) + -'/../../controllers/gov_user_plugin_myprofile_controller' -) - -class GovUserPluginMyprofileController; def rescue_action(e) raise e end; -end - -class GovUserPluginMyprofileControllerTest < ActionController::TestCase - def setup - @controller = GovUserPluginMyprofileController.new - @request = ActionController::TestRequest.new - @response = ActionController::TestResponse.new - @person = create_user('person').person - @offer = create_user('Angela Silva') - @offer_1 = create_user('Ana de Souza') - @offer_2 = create_user('Angelo Roberto') - - login_as(@person.user_login) - @environment = Environment.default - @environment.enable_plugin('GovUserPlugin') - @environment.save! - end - should "user edit its community institution" do - govPower = GovernmentalPower.create(:name=>"Some Gov Power") - govSphere = GovernmentalSphere.create(:name=>"Some Gov Sphere") - juridical_nature = JuridicalNature.create(:name => "Autarquia") - - institution = InstitutionTestHelper.create_public_institution( - "Ministerio Publico da Uniao", - "MPU", - "BR", - "DF", - "Gama", - juridical_nature, - govPower, - govSphere, - "12.345.678/9012-45" - ) - - identifier = institution.community.identifier - - fields = InstitutionTestHelper.generate_form_fields( - "institution new name", - "BR", - "DF", - "Gama", - "12.345.678/9012-45", - "PrivateInstitution" - ) - - post( - :edit_institution, - :profile=>institution.community.identifier, - :community=>fields[:community], - :institutions=>fields[:institutions] - ) - - institution = Community[identifier].institution - assert_not_equal "Ministerio Publico da Uniao", institution.community.name - end - - should "not user edit its community institution with wrong values" do - govPower = GovernmentalPower.create(:name=>"Some Gov Power") - govSphere = GovernmentalSphere.create(:name=>"Some Gov Sphere") - juridical_nature = JuridicalNature.create(:name => "Autarquia") - - institution = InstitutionTestHelper.create_public_institution( - "Ministerio Publico da Uniao", - "MPU", - "BR", - "DF", - "Gama", - juridical_nature, - govPower, - govSphere, - "12.345.678/9012-45" - ) - - identifier = institution.community.identifier - - fields = InstitutionTestHelper.generate_form_fields( - "", - "BR", - "DF", - "Gama", - "6465465465", - "PrivateInstitution" - ) - - post( - :edit_institution, - :profile=>institution.community.identifier, - :community=>fields[:community], - :institutions=>fields[:institutions] - ) - - institution = Community[identifier].institution - assert_equal "Ministerio Publico da Uniao", institution.community.name - assert_equal "12.345.678/9012-45", institution.cnpj - end - -end diff --git a/src/gov_user/test/functional/profile_editor_controller_test.rb b/src/gov_user/test/functional/profile_editor_controller_test.rb deleted file mode 100644 index 52de533..0000000 --- a/src/gov_user/test/functional/profile_editor_controller_test.rb +++ /dev/null @@ -1,112 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/institution_test_helper' -require( -File.dirname(__FILE__) + -'/../../../../app/controllers/my_profile/profile_editor_controller' -) - -class ProfileEditorController; def rescue_action(e) raise e end; end - -class ProfileEditorControllerTest < ActionController::TestCase - - def setup - @controller = ProfileEditorController.new - @request = ActionController::TestRequest.new - @response = ActionController::TestResponse.new - @profile = create_user('default_user').person - - Environment.default.affiliate( - @profile, - [Environment::Roles.admin(Environment.default.id)] + - Profile::Roles.all_roles(Environment.default.id) - ) - - @environment = Environment.default - @environment.enabled_plugins = ['GovUserPlugin'] - admin = create_user("adminuser").person - admin.stubs(:has_permission?).returns("true") - login_as('adminuser') - @environment.add_admin(admin) - @environment.save - - @govPower = GovernmentalPower.create(:name=>"Some Gov Power") - @govSphere = GovernmentalSphere.create(:name=>"Some Gov Sphere") - @juridical_nature = JuridicalNature.create(:name => "Autarquia") - - @institution_list = [] - @institution_list << InstitutionTestHelper.create_public_institution( - "Ministerio Publico da Uniao", - "MPU", - "BR", - "DF", - "Gama", - @juridical_nature, - @govPower, - @govSphere, - "12.345.678/9012-45" - ) - - @institution_list << InstitutionTestHelper.create_public_institution( - "Tribunal Regional da Uniao", - "TRU", - "BR", - "DF", - "Brasilia", - @juridical_nature, - @govPower, - @govSphere, - "12.345.678/9012-90" - ) - end - - should "add new institution for user into edit profile" do - user = create_basic_user - - params_user = Hash.new - params_user[:institution_ids] = [] - - @institution_list.each do |institution| - params_user[:institution_ids] << institution.id - end - - post :edit, :profile => User.last.person.identifier, :user => params_user - - assert_equal @institution_list.count, User.last.institutions.count - end - - should "remove institutions for user into edit profile" do - user = create_basic_user - - @institution_list.each do |institution| - user.institutions << institution - end - user.save! - - params_user = Hash.new - params_user[:institution_ids] = [] - - assert_equal @institution_list.count, User.last.institutions.count - - post :edit, :profile => User.last.person.identifier, :user => params_user - - assert_equal 0, User.last.institutions.count - end - - protected - - def create_basic_user - user = fast_create(User) - user.person = fast_create(Person) - user.person.user = user - user.save! - user.person.save! - user - end - - def create_community name - community = fast_create(Community) - community.name = name - community.save - community - end -end diff --git a/src/gov_user/test/functional/search_controller_test.rb b/src/gov_user/test/functional/search_controller_test.rb deleted file mode 100644 index ab45f06..0000000 --- a/src/gov_user/test/functional/search_controller_test.rb +++ /dev/null @@ -1,57 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' -require( -File.dirname(__FILE__) + -'/../../../../app/controllers/public/search_controller' -) - -class SearchController; def rescue_action(e) raise e end; end - -class SearchControllerTest < ActionController::TestCase - include PluginTestHelper - - def setup - @environment = Environment.default - @environment.enabled_plugins = ['SoftwareCommunitiesPlugin'] - @environment.save - - @controller = SearchController.new - @request = ActionController::TestRequest.new - @request.stubs(:ssl?).returns(:false) - @response = ActionController::TestResponse.new - end - - should "communities searches don't have institution" do - community = create_community("New Community") - institution = create_private_institution( - "New Private Institution", - "NPI" , - "Brazil", - "DF", - "Gama", - "66.544.314/0001-63" - ) - - get :communities, :query => "New" - - assert_includes assigns(:searches)[:communities][:results], community - assert_not_includes assigns(:searches)[:communities][:results], institution.community - end - - should "institutions_search don't have community" do - community = create_community("New Community") - institution = create_private_institution( - "New Private Institution", - "NPI" , - "Brazil", - "DF", - "Gama", - "66.544.314/0001-63" - ) - - get :institutions, :query => "New" - - assert_includes assigns(:searches)[:institutions][:results], institution.community - assert_not_includes assigns(:searches)[:institutions][:results], community - end -end diff --git a/src/gov_user/test/helpers/institution_test_helper.rb b/src/gov_user/test/helpers/institution_test_helper.rb deleted file mode 100644 index 1f4df2f..0000000 --- a/src/gov_user/test/helpers/institution_test_helper.rb +++ /dev/null @@ -1,59 +0,0 @@ -module InstitutionTestHelper - - def self.generate_form_fields name, country, state, city, cnpj, type - fields = { - :community => { - :name => name, - :country => country, - :state => state, - :city => city - }, - :institutions => { - :cnpj=> cnpj, - :type => type, - :acronym => "", - :governmental_power => "", - :governmental_sphere => "", - :juridical_nature => "", - :corporate_name => "coporate default" - } - } - fields - end - - def self.create_public_institution name, acronym, country, state, city, juridical_nature, gov_p, gov_s, cnpj - institution = PublicInstitution.new - institution.community = institution_community(name, country, state, city) - institution.name = name - institution.juridical_nature = juridical_nature - institution.acronym = acronym - institution.governmental_power = gov_p - institution.governmental_sphere = gov_s - institution.cnpj = cnpj - institution.corporate_name = "corporate default" - institution.save - institution - end - - def self.create_private_institution name, acronym, country, state, city, cnpj - institution = PrivateInstitution.new - institution.community = institution_community(name, country, state, city) - institution.name = name - institution.acronym = acronym - institution.cnpj = cnpj - institution.corporate_name = "corporate default" - institution.save - - institution - end - - def self.institution_community name, country, state, city - institution_community = Community::new - institution_community.name = name - institution_community.country = country - institution_community.state = state - institution_community.city = city - institution_community.save - institution_community - end -end \ No newline at end of file diff --git a/src/gov_user/test/helpers/plugin_test_helper.rb b/src/gov_user/test/helpers/plugin_test_helper.rb deleted file mode 100644 index 741cb2f..0000000 --- a/src/gov_user/test/helpers/plugin_test_helper.rb +++ /dev/null @@ -1,77 +0,0 @@ -require File.dirname(__FILE__) + '/../helpers/institution_test_helper' - -module PluginTestHelper - - def create_person name, email, password, password_confirmation, secondary_email, state="state", city="city" - user = create_user( - name.to_slug, - email, - password, - password_confirmation, - secondary_email - ) - person = Person::new - - user.person = person - person.user = user - - person.name = name - person.identifier = name.to_slug - person.state = state - person.city = city - - user.save - person.save - - person - end - - def create_user login, email, password, password_confirmation, secondary_email - user = User.new - - user.login = login - user.email = email - user.password = password - user.password_confirmation = password_confirmation - user.secondary_email = secondary_email - - user - end - - def create_public_institution *params - InstitutionTestHelper.create_public_institution *params - end - - def create_community name - community = fast_create(Community) - community.name = name - community.save - community - end - - - def create_private_institution name, acronym, country, state, city, cnpj - InstitutionTestHelper.create_private_institution( - name, - acronym, - country, - state, - city, - cnpj - ) - end - - def create_public_institution *params - InstitutionTestHelper.create_public_institution *params - end - - def create_community_institution name, country, state, city - community = fast_create(Community) - community.name = name - community.country = country - community.state = state - community.city = city - community.save - community - end -end diff --git a/src/gov_user/test/unit/gov_user_person_test.rb b/src/gov_user/test/unit/gov_user_person_test.rb deleted file mode 100644 index 0c58478..0000000 --- a/src/gov_user/test/unit/gov_user_person_test.rb +++ /dev/null @@ -1,58 +0,0 @@ -# encoding: utf-8 - -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' - -class SoftwareCommunitiesPluginPersonTest < ActiveSupport::TestCase - include PluginTestHelper - - def setup - @plugin = GovUserPlugin.new - - @user = fast_create(User) - @person = create_person( - "My Name", - "user@email.com", - "123456", - "123456", - "user2@email.com", - "Any State", - "Some City" - ) - end - - def teardown - @plugin = nil - end - - should 'be a noosfero plugin' do - assert_kind_of Noosfero::Plugin, @plugin - end - - should 'save person with a valid full name' do - p = Person::new :name=>"S1mpl3 0f N4m3", :identifier=>"simple-name" - p.user = fast_create(:user) - - assert_equal true, p.save - end - - should 'save person with a valid full name with accents' do - name = 'Jônatàs dâ Sîlvã Jösé' - identifier = "jonatas-jose-da-silva" - p = Person::new :name=>name, :identifier=>identifier - p.user = fast_create(:user) - - assert_equal true, p.save - end - - should 'not save person whose name has not capital letter' do - p = Person::new :name=>"simple name" - assert !p.save, _("Name Should begin with a capital letter and no special characters") - end - - should 'not save person whose name has special characters' do - p = Person::new :name=>"Simple N@me" - - assert !p.save , _("Name Should begin with a capital letter and no special characters") - end -end diff --git a/src/gov_user/test/unit/governmental_power_test.rb b/src/gov_user/test/unit/governmental_power_test.rb deleted file mode 100644 index 5f777e6..0000000 --- a/src/gov_user/test/unit/governmental_power_test.rb +++ /dev/null @@ -1,33 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/institution_test_helper' - -class GovernmentalPowerTest < ActiveSupport::TestCase - - def setup - @gov_sphere = GovernmentalSphere.create(:name=>"Some Gov Sphere") - @juridical_nature = JuridicalNature.create(:name => "Autarquia") - end - - def teardown - Institution.destroy_all - end - - should "get public institutions" do - inst_name = "Ministerio Publico da Uniao" - inst_cnpj = "12.345.678/9012-45" - gov_power = GovernmentalPower.create(:name=>"Some gov power") - InstitutionTestHelper.create_public_institution( - inst_name, - "MPU", - "BR", - "DF", - "Gama", - @juridical_nature, - gov_power, - @gov_sphere, - inst_cnpj - ) - - assert_equal gov_power.public_institutions.count, PublicInstitution.count - end -end \ No newline at end of file diff --git a/src/gov_user/test/unit/institution_test.rb b/src/gov_user/test/unit/institution_test.rb deleted file mode 100644 index c4c77e5..0000000 --- a/src/gov_user/test/unit/institution_test.rb +++ /dev/null @@ -1,63 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' - -class InstitutionTest < ActiveSupport::TestCase - include PluginTestHelper - def setup - @gov_power = GovernmentalPower.create(:name=>"Some Gov Power") - @gov_sphere = GovernmentalSphere.create(:name=>"Some Gov Sphere") - @juridical_nature = JuridicalNature.create(:name => "Autarquia") - - @institution = create_public_institution( - "Ministerio Publico da Uniao", - "MPU", - "BR", - "DF", - "Gama", - @juridical_nature, - @gov_power, - @gov_sphere, - "11.222.333/4444-55" - ) - end - - def teardown - GovernmentalPower.destroy_all - GovernmentalSphere.destroy_all - JuridicalNature.destroy_all - @institution = nil - end - should "not save institutions without name" do - @institution.name = nil - assert_equal false, @institution.save - assert_equal true, @institution.errors.full_messages.include?("Name can't be blank") - end - - should "not save if institution has invalid type" do - invalid_msg = "Type invalid, only public and private institutions are allowed." - @institution.type = "Other type" - assert_equal false, @institution.save - assert_equal true, @institution.errors.full_messages.include?(invalid_msg) - end - - should "not save without country" do - @institution.community.country = nil - assert_equal false, @institution.save - assert_equal true, @institution.errors.full_messages.include?("Country can't be blank") - end - - should "not save without state" do - @institution.community.state = nil - - assert_equal false, @institution.save - assert_equal true, @institution.errors.full_messages.include?("State can't be blank") - end - - should "not save without city" do - @institution.community.city = nil - @institution.community.state = "DF" - - assert_equal false, @institution.save - assert_equal true, @institution.errors.full_messages.include?("City can't be blank") - end -end diff --git a/src/gov_user/test/unit/institutions_block_test.rb b/src/gov_user/test/unit/institutions_block_test.rb deleted file mode 100644 index bcab723..0000000 --- a/src/gov_user/test/unit/institutions_block_test.rb +++ /dev/null @@ -1,51 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' - -class InstitutionsBlockTest < ActiveSupport::TestCase - include PluginTestHelper - should 'inherit from Block' do - assert_kind_of Block, InstitutionsBlock.new - end - - should 'declare its default title' do - InstitutionsBlock.any_instance.stubs(:profile_count).returns(0) - assert_not_equal Block.new.default_title, InstitutionsBlock.new.default_title - end - - should 'describe itself' do - assert_not_equal Block.description, InstitutionsBlock.description - end - - should 'give empty footer on unsupported owner type' do - block = InstitutionsBlock.new - block.expects(:owner).returns(1) - assert_equal '', block.footer - end - - should 'list institutions' do - user = create_person("Jose_Augusto", - "jose_augusto@email.com", - "aaaaaaa", - "aaaaaaa", - 'jose@secondary.com', - "DF", - "Gama" - ) - - institution = create_private_institution( - "inst name", - "IN", - "country", - "state", - "city", - "00.111.222/3333-44" - ) - institution.community.add_member(user) - - block = InstitutionsBlock.new - block.expects(:owner).at_least_once.returns(user) - - assert_equivalent [institution.community], block.profiles - end - -end diff --git a/src/gov_user/test/unit/juridical_nature_test.rb b/src/gov_user/test/unit/juridical_nature_test.rb deleted file mode 100644 index 80d34c6..0000000 --- a/src/gov_user/test/unit/juridical_nature_test.rb +++ /dev/null @@ -1,23 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' - -class JuridicalNatureTest < ActiveSupport::TestCase - - include PluginTestHelper - - def setup - @govPower = GovernmentalPower.create(:name=>"Some Gov Power") - @govSphere = GovernmentalSphere.create(:name=>"Some Gov Sphere") - end - - def teardown - Institution.destroy_all - end - - should "get public institutions" do - juridical_nature = JuridicalNature.create(:name => "Autarquia") - create_public_institution("Ministerio Publico da Uniao", "MPU", "BR", "DF", "Gama", juridical_nature, @govPower, @govSphere, "22.333.444/5555-66") - create_public_institution("Tribunal Regional da Uniao", "TRU", "BR", "DF", "Brasilia", juridical_nature, @govPower, @govSphere, "22.333.444/5555-77") - assert juridical_nature.public_institutions.count == PublicInstitution.count - end -end diff --git a/src/gov_user/test/unit/organization_rating_test.rb b/src/gov_user/test/unit/organization_rating_test.rb deleted file mode 100644 index 748355f..0000000 --- a/src/gov_user/test/unit/organization_rating_test.rb +++ /dev/null @@ -1,44 +0,0 @@ -require File.expand_path(File.dirname(__FILE__)) + '/../../../../test/test_helper' -require File.expand_path(File.dirname(__FILE__)) + '/../helpers/plugin_test_helper' - -class OrganizationRatingTest < ActiveSupport::TestCase - include PluginTestHelper - - def setup - @environment = Environment.default - @environment.enabled_plugins = ['SoftwareCommunitiesPlugin'] - @environment.save - end - - should "validate institution if there is an institution_id" do - person = fast_create(Person) - community = fast_create(Community) - private_institution = build_private_institution "huehue", "hue", "11.222.333/4444-55" - - community_rating = OrganizationRating.new(:person => person, :value => 3, :organization => community, :institution => private_institution) - assert_equal false, community_rating.valid? - - assert_equal true, community_rating.errors[:institution].include?("not found") - - private_institution.save - community_rating.institution = private_institution - - assert_equal true, community_rating.valid? - assert_equal false, community_rating.errors[:institution].include?("not found") - end - - private - - def build_private_institution name, corporate_name, cnpj, country="AR" - community = Community.new :name => name - community.country = country - - institution = PrivateInstitution.new :name=> name - institution.corporate_name = corporate_name - institution.cnpj = cnpj - institution.community = community - - institution - end -end - diff --git a/src/gov_user/test/unit/person_test.rb b/src/gov_user/test/unit/person_test.rb deleted file mode 100644 index dd6c628..0000000 --- a/src/gov_user/test/unit/person_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' - -class SoftwareCommunitiesPluginPersonTest < ActiveSupport::TestCase - include PluginTestHelper - def setup - @plugin = GovUserPlugin.new - - @user = fast_create(User) - @person = create_person( - "My Name", - "user@email.com", - "123456", - "123456", - "user@secondaryemail.com", - "Any State", - "Some City" - ) - end - - should 'calculate the percentege of person incomplete fields' do - @person.cell_phone = "76888919" - @person.contact_phone = "987654321" - - assert_equal(67, @plugin.calc_percentage_registration(@person)) - - @person.comercial_phone = "11223344" - @person.country = "I dont know" - @person.state = "I dont know" - @person.city = "I dont know" - @person.organization_website = "www.whatever.com" - @person.image = Image::new :uploaded_data=>fixture_file_upload('/files/rails.png', 'image/png') - @person.save - - assert_equal(100, @plugin.calc_percentage_registration(@person)) - end - - should 'return true when the email has not gov.br,jus.br,leg.br or mp.br' do - @user.secondary_email = "test_email@com.br" - @user.email = "test_email@net.br" - assert @user.save - end -end diff --git a/src/gov_user/test/unit/private_institution_test.rb b/src/gov_user/test/unit/private_institution_test.rb deleted file mode 100644 index 8f01e95..0000000 --- a/src/gov_user/test/unit/private_institution_test.rb +++ /dev/null @@ -1,34 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' - -class PrivateInstitutionTest < ActiveSupport::TestCase - include PluginTestHelper - def setup - @institution = create_private_institution( - "Simple Private Institution", - "SPI", - "BR", - "DF", - "Gama", - "00.000.000/0001-00" - ) - end - - def teardown - @institution = nil - Institution.destroy_all - end - - should "save without a cnpj" do - @institution.cnpj = nil - - assert @institution.save - end - - should "save without fantasy name" do - @institution.acronym = nil - @institution.community.save - - assert @institution.save - end -end diff --git a/src/gov_user/test/unit/public_institution_test.rb b/src/gov_user/test/unit/public_institution_test.rb deleted file mode 100644 index 9f37965..0000000 --- a/src/gov_user/test/unit/public_institution_test.rb +++ /dev/null @@ -1,68 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' - -class PublicInstitutionTest < ActiveSupport::TestCase - include PluginTestHelper - def setup - @gov_power = GovernmentalPower.create(:name=>"Some Gov Power") - @gov_sphere = GovernmentalSphere.create(:name=>"Some Gov Sphere") - @juridical_nature = JuridicalNature.create(:name => "Autarquia") - - @institution = create_public_institution( - "Ministerio Publico da Uniao", - "MPU", - "BR", - "DF", - "Gama", - @juridical_nature, - @gov_power, - @gov_sphere, - "11.222.333/4444-55" - ) - end - - def teardown - GovernmentalPower.destroy_all - GovernmentalSphere.destroy_all - JuridicalNature.destroy_all - Institution.destroy_all - @gov_power = nil - @gov_sphere = nil - @juridical_nature = nil - @institution = nil - end - - should "save without a cnpj" do - @institution.cnpj = nil - assert @institution.save - end - - should "save institution without an acronym" do - @institution.acronym = nil - assert @institution.save - end - - should "Not save institution without a governmental_power" do - invalid_msg = "Governmental power can't be blank" - @institution.governmental_power = nil - - assert !@institution.save - assert @institution.errors.full_messages.include? invalid_msg - end - - should "Not save institution without a governmental_sphere" do - invalid_msg = "Governmental sphere can't be blank" - @institution.governmental_sphere = nil - - assert !@institution.save - assert @institution.errors.full_messages.include? invalid_msg - end - - should "not save institution without juridical nature" do - invalid_msg = "Juridical nature can't be blank" - @institution.juridical_nature = nil - - assert !@institution.save - assert @institution.errors.full_messages.include? invalid_msg - end -end diff --git a/src/gov_user/test/unit/user_test.rb b/src/gov_user/test/unit/user_test.rb deleted file mode 100644 index c2b15c6..0000000 --- a/src/gov_user/test/unit/user_test.rb +++ /dev/null @@ -1,99 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' - -class UserTest < ActiveSupport::TestCase - include PluginTestHelper - - should 'not save user whose both email and secondary email are the same' do - user = fast_create(User) - user.email = "test@email.com" - user.secondary_email = "test@email.com" - - assert !user.save - end - - should 'not save user whose email and secondary email have been taken' do - user1 = create_default_user - user2 = fast_create(User) - - user2.email = "primary@email.com" - user2.secondary_email = "secondary@email.com" - assert !user2.save - end - - should 'not save user whose email has already been used' do - user1 = create_default_user - user2 = fast_create(User) - - user2.email = "primary@email.com" - user2.secondary_email = "noosfero@email.com" - assert !user2.save - end - - should 'not save user whose email has been taken another in users secondary email' do - user1 = create_default_user - user2 = fast_create(User) - - user2.login = "another-login" - user2.email = "secondary@email.com" - user2.secondary_email = "noosfero@email.com" - assert !user2.save - end - - should 'not save user whose secondary email has been taken used in another users email' do - user1 = create_default_user - user2 = fast_create(User) - - user2.login = "another-login" - user2.email = "noosfero@email.com" - user2.secondary_email = "primary@email.com" - assert !user2.save - end - - should 'not save user whose secondary email has already been used in another users secondary email' do - user1 = create_default_user - user2 = fast_create(User) - - user2.login = "another-login" - user2.email = "noosfero@email.com" - user2.secondary_email = "secondary@email.com" - assert !user2.save - end - - should 'not save user whose secondary email is in the wrong format' do - user = fast_create(User) - user.email = "test@email.com" - user.secondary_email = "notarightformat.com" - - assert !user.save - - user.secondary_email = "not@arightformatcom" - - assert !user.save - end - - should 'save more than one user without secondary email' do - user = fast_create(User) - user.email = "test@email.com" - user.secondary_email = "" - user.save - - user2 = fast_create(User) - user2.email = "test2@email.com" - user2.secondary_email = "" - assert user2.save - end - - private - - def create_default_user - user = fast_create(User) - user.login = "a-login" - user.email = "primary@email.com" - user.secondary_email = "secondary@email.com" - user.save - - return user - end - -end diff --git a/src/gov_user/views/gov_user_plugin/_institution.html.erb b/src/gov_user/views/gov_user_plugin/_institution.html.erb deleted file mode 100644 index e2aa5b0..0000000 --- a/src/gov_user/views/gov_user_plugin/_institution.html.erb +++ /dev/null @@ -1,128 +0,0 @@ -

    <%= _('New Institution') %>

    - -<% if environment.enabled?('admin_must_approve_new_communities') %> -
    - <%= _("Note that the creation of communities in this environment is restricted. Your request to create this new community will be sent to %{environment} administrators and will be approved or rejected according to their methods and criteria.") % { :environment => environment.name }%> -
    -<%end %> - -<% unless flash[:errors].nil? %> -
    -

    <%= _("Can`t create new Institution: #{flash[:errors].length} errors") %>

    -
      - <% flash[:errors].each do |key, value| %> - <% key_name = key.to_s.gsub("_", " ") %> - <% if value.length > 0 %> -
    • <%= _("#{key_name.capitalize} #{value.join()}") %>
    • - <% end %> - <% end %> -
    -
    -<% end %> - -
    - -
    - <%= labelled_form_for :community, :url => {:action=>"new_institution"}, :html => { :multipart => true, :id=>"institution_form" } do |f| %> - <%= required_fields_message %> - <%= hidden_field_tag "edit_institution_page", false %> - <%= fields_for :institutions do |inst| %> - -
    - - - -
    -
    - - <%= required f.text_field(:name, :class => flash[:error_community_name], :value => params[:community][:name]) %> - <%= content_tag :span, _("Institution name already exists"), :id=>"already_exists_text", :class=>"errorExplanation hide-field" %> - - -
    - <%= inst.label "corporate_name", _("Corporate Name"), :class=>"formlabel" %> - <%= inst.text_field(:corporate_name, :value => params[:institutions][:corporate_name], :size => 55) %> -
    -
    - - <%= required select_country(_('Country'), 'community', 'country', {:class => "type-select #{flash[:error_community_country]}", :id => "community_country"}) %> - - -
    - - <%= f.select(:state, @state_options, {:selected => params[:community][:state]}, {:class => flash[:error_community_state]}) %> -
    -
    - - <%= required f.text_field(:city, :class => flash[:error_community_city], :value => params[:community][:city]) %> - - -
    - <%= inst.label("cnpj" ,_("CNPJ"), :class=>"formlabel") %> - <%= required inst.text_field(:cnpj, :placeholder=>"99.999.999/9999-99", :class=>"intitution_cnpj_field", :value => params[:institutions][:cnpj]) %> -
    - - -
    - <%= hidden_field_tag "acronym_translate", _("Acronym") %> - <%= hidden_field_tag "fantasy_name_translate", _("Fantasy name") %> - <%= inst.label("acronym" ,_("Acronym"), :class=>"formlabel") %> - <%= inst.text_field(:acronym, :value => params[:institutions][:acronym]) %> -
    -
    - - -
    - <%= inst.label("governmental_sphere_id" ,_("Governmental Sphere:"), :class=>"formlabel") %> - <%= inst.select(:governmental_sphere, @governmental_sphere, :selected=>params[:institutions][:governmental_sphere], :class => flash[:error_institution_governmental_sphere])%> -
    -
    - - -
    - <%= inst.label("governmental_power_id" ,_("Governmental Power:"), :class=>"formlabel") %> - <%= inst.select(:governmental_power, @governmental_power, :selected=>params[:institutions][:governmental_sphere], :class => flash[:error_institution_governmental_power])%> -
    -
    - -
    - <%= inst.label("juridical_nature_id" ,_("Juridical Nature:"), :class=>"formlabel") %> - <%= inst.select(:juridical_nature, @juridical_nature, :selected=>params[:institutions][:juridical_nature], :class => flash[:error_institution_juridical_nature])%> -
    -
    - - -
    - <%= _("SISP?") %> - <% if @show_sisp_field %> - <%= inst.radio_button(:sisp, true, :class => "#{flash[:error_institution_sisp]}" ) %> - <%= inst.label :sisp ,_("Yes"), :value => true %> - <%= inst.radio_button(:sisp, false, :checked=>"checked", :class => "#{flash[:error_institution_sisp]}") %> - <%= inst.label :sisp ,_("No"), :value => false %> - <% else %> - <%= inst.label("sisp", _("No")) %> - <% end %> -
    -
    - - <% if @url_token == "create_institution_admin" %> - <%= submit_button :save, _('Save') %> - <%= button(:cancel, _("Cancel"), {:controller => "admin_panel", :action => 'index'}) %> - <%else%> -
    - <%= link_to(_('Save'), '#', :id=>'save_institution_button', :class=>'button with-text icon-add') %> - <%= link_to(_('Cancel'), '#', :id=>"cancel_institution_button", :class=>'button with-text icon-cancel') %> -
    - <%= hidden_field_tag :institution_error_message, _("Could not send the form data to the server") %> - <%end%> - - <% end %> - - <% end %> -
    -<%= hidden_field_tag :loading_message, _("Creating institution") %> diff --git a/src/gov_user/views/gov_user_plugin/create_institution.html.erb b/src/gov_user/views/gov_user_plugin/create_institution.html.erb deleted file mode 100644 index 037140f..0000000 --- a/src/gov_user/views/gov_user_plugin/create_institution.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= render :partial => "institution" %> diff --git a/src/gov_user/views/gov_user_plugin/create_institution_admin.html.erb b/src/gov_user/views/gov_user_plugin/create_institution_admin.html.erb deleted file mode 100644 index 037140f..0000000 --- a/src/gov_user/views/gov_user_plugin/create_institution_admin.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= render :partial => "institution" %> diff --git a/src/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb b/src/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb deleted file mode 100644 index 7b0f936..0000000 --- a/src/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb +++ /dev/null @@ -1,114 +0,0 @@ -

    <%= _('Edit Institution') %>

    - -<% if environment.enabled?('admin_must_approve_new_communities') %> -
    - <%= _("Note that the creation of communities in this environment is restricted. Your request to create this new community will be sent to %{environment} administrators and will be approved or rejected according to their methods and criteria.") % { :environment => environment.name }%> -
    -<%end %> - -<% unless flash[:errors].blank? %> -
    -

    <%= _("Can`t create new Institution: #{flash[:errors].length} errors") %>

    -
      - <% flash[:errors].each do |error| %> -
    • <%= error %>
    • - <% end %> -
    -
    -<% end %> - -
    - -
    - <%= labelled_form_for :community,:html => { :multipart => true, :id=>"institution_form" } do |f| %> - <%= hidden_field_tag "edit_institution_page", true %> - <%= fields_for :institutions do |inst| %> - -
    - - - -
    -
    - - <%= required f.text_field(:name, :value => @institution.community.name) %> - <%= content_tag :span, _("Institution name already exists"), :id=>"already_exists_text", :class=>"errorExplanation hide-field" %> - - -
    - <%= inst.label "corporate_name", _("Corporate Name"), :class=>"formlabel" %> - <%= required inst.text_field(:corporate_name, :value => @institution.corporate_name) %> -
    -
    - - <%= required select_country(_('Country'), 'community', 'country', {:class => 'type-select', :id => "community_country"}, :selected => @institution.community.country) %> - - -
    - - <%= f.select(:state, @state_list.collect {|state| [state.name, state.name]}, :selected => @institution.community.state) %> -
    -
    - - <%= required f.text_field(:city, :value => @institution.community.city) %> - - - -
    - <%= inst.label("cnpj" ,_("CNPJ"), :class=>"formlabel") %> - <%= required inst.text_field(:cnpj, :placeholder=>"99.999.999/9999-99", :class=>"intitution_cnpj_field", :value => @institution.cnpj) %> -
    -
    - - -
    - <%= hidden_field_tag "acronym_translate", _("Acronym") %> - <%= hidden_field_tag "fantasy_name_translate", _("Fantasy name") %> - <%= inst.label("acronym" ,_("Acronym"), :class=>"formlabel") %> - <%= inst.text_field(:acronym, :value => @institution.acronym) %> -
    -
    - - -
    - <%= inst.label("governmental_sphere_id" ,_("Governmental Sphere:"), :class=>"formlabel") %> - <%= inst.select(:governmental_sphere, [[_("Select a Governmental Sphere"), 0]]|GovernmentalSphere.all.map {|s| [s.name, s.id]}, {:selected=>@institution.governmental_power_id})%> -
    -
    - - -
    - <%= inst.label("governmental_power_id" ,_("Governmental Power:"), :class=>"formlabel") %> - <%= inst.select(:governmental_power, [[_("Select a Governmental Power"), 0]]|GovernmentalPower.all.map {|g| [g.name, g.id]}, {:selected=> @institution.governmental_sphere_id})%> -
    -
    - -
    - <%= inst.label("juridical_nature_id" ,_("Juridical Nature:"), :class=>"formlabel") %> - <%= inst.select(:juridical_nature, [[_("Select a Juridical Nature"), 0]]|JuridicalNature.all.map {|j| [j.name, j.id]}, {:selected=> @institution.juridical_nature_id})%> -
    -
    - - -
    - <%= _("SISP?") %> - <% if @show_sisp_field %> - <%= inst.label("sisp" ,_("Yes")) %> - <%= inst.radio_button(:sisp, true, :checked=>(@institution.sisp ? true : false)) %> - <%= inst.label("sisp" ,_("No")) %> - <%= inst.radio_button(:sisp, false, :checked=>(@institution.sisp ? false : true)) %> - <% else %> - <%= inst.label("sisp", _("No")) %> - <% end %> -
    -
    - - <%= submit_button :save, _('Save') %> - <% end %> -<% end %> - diff --git a/src/gov_user/views/incomplete_registration.html.erb b/src/gov_user/views/incomplete_registration.html.erb deleted file mode 100644 index d1dceba..0000000 --- a/src/gov_user/views/incomplete_registration.html.erb +++ /dev/null @@ -1,11 +0,0 @@ -
    -
    -
    <%= _("Complete Profile")+": #{@percentege}%" %>
    - -
    - <%= link_to _("Complete your profile"), "#{Noosfero.root}/myprofile/#{@person.identifier}/profile_editor/edit" %> | - <%= link_to _("Hide"), "#", :class=>"hide-incomplete-percentage" %> -
    -
    -
    -
    diff --git a/src/gov_user/views/organization_ratings_extra_fields_show_institution.html.erb b/src/gov_user/views/organization_ratings_extra_fields_show_institution.html.erb deleted file mode 100644 index 7cc4709..0000000 --- a/src/gov_user/views/organization_ratings_extra_fields_show_institution.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -<% if user_rating.institution %> -
    -
    - Institution : <%= user_rating.institution.name unless user_rating.institution.nil? %> -
    -
    -<% end %> - diff --git a/src/gov_user/views/person_editor_extras.html.erb b/src/gov_user/views/person_editor_extras.html.erb deleted file mode 100644 index a3a11fc..0000000 --- a/src/gov_user/views/person_editor_extras.html.erb +++ /dev/null @@ -1,42 +0,0 @@ -
    - <%= label_tag "user[secondary_email]", _('Secondary e-mail')+":", :class=>"formlabel" %> - -
    - <%= text_field_tag "user[secondary_email]", context.profile.user.secondary_email %> -
    -
    - - -
    - <%= label_tag "user[institution_ids]", _('Institutions'), :class=>"formlabel" %> - -
    - <%= text_field_tag(:institution, "", :id=>"input_institution") %> - - <% context.profile.user.institutions.each do |institution| %> - <%= hidden_field_tag("user[institution_ids][]", institution.id, :class => 'user_institutions') %> - <% end %> -
    - - <%= content_tag(:div, _("No institution found"), :id=>"institution_empty_ajax_message", :class=>"errorExplanation hide-field") %> - <%= link_to(_("Add new institution"), "#", :class=>'button with-text icon-add', :id => 'add_new_institution') %> - <%= link_to(_("Create new institution"), "#", :id=>"create_institution_link", :class=>'button with-text icon-add') %> - <%= content_tag(:div, "", :id=>"institution_dialog") %> - - <%= hidden_field_tag("user[institution_ids][]", "", :class => 'user_institutions') %> - <%= hidden_field_tag("institution_selected", "") %> - -
      - <% context.profile.user.institutions.each do |institution| %> -
    • - <%= institution.name %> - <%= link_to("", "#", :class => "button without-text icon-remove remove-institution") %> -
    • - <% end %> -
    -
    - -<%= hidden_field_tag("full_name_error", _("Should begin with a capital letter and no special characters")) %> -<%= hidden_field_tag("email_error", _("Email should have the following format: name@host.br")) %> -<%= hidden_field_tag("site_error", _("Site should have a valid format: http://name.hosts")) %> -
    <%= _("If you work in a public agency use your government e-Mail") %>
    diff --git a/src/gov_user/views/profile/_institution_tab.html.erb b/src/gov_user/views/profile/_institution_tab.html.erb deleted file mode 100644 index 6c2f7fb..0000000 --- a/src/gov_user/views/profile/_institution_tab.html.erb +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - <%= display_mpog_field(_('Type:'), profile.institution, :type, true) %> - <%= display_mpog_field(_('CNPJ:'), profile.institution, :cnpj, true) %> - <%= display_mpog_field(_('Last modification:'), profile.institution, :date_modification, true) %> - <%= display_mpog_field(_('Country:'), profile.institution.community, :country, true) %> - <%= display_mpog_field(_('State:'), profile.institution.community, :state, true) %> - <%= display_mpog_field(_('City:'), profile.institution.community, :city, true) %> - <% if profile.institution.type == "PrivateInstitution"%> - <%= display_mpog_field(_('Fantasy Name:'), profile.institution, :acronym, true) %> - <% else %> - <%= display_mpog_field(_('Acronym:'), profile.institution, :acronym, true) %> - <%= display_mpog_field(_('Governmental Power:'), profile.institution.governmental_power, :name, true) %> - <%= display_mpog_field(_('Governmental Sphere:'), profile.institution.governmental_sphere, :name, true) %> - <%= display_mpog_field(_('Juridical Nature:'), profile.institution.juridical_nature, :name, true) %> - <%= content_tag('tr', content_tag('td', _("SISP:")) + content_tag('td', profile.institution.sisp ? _("Yes") : _("No"))) %> - <% end %> -
    <%= _('Institution Information')%>
    diff --git a/src/gov_user/views/profile/_profile_tab.html.erb b/src/gov_user/views/profile/_profile_tab.html.erb deleted file mode 100644 index 4fc67b0..0000000 --- a/src/gov_user/views/profile/_profile_tab.html.erb +++ /dev/null @@ -1,3 +0,0 @@ - - <%= display_mpog_profile_information %> -
    diff --git a/src/gov_user/views/ratings_extra_field.html.erb b/src/gov_user/views/ratings_extra_field.html.erb deleted file mode 100644 index 6f835d1..0000000 --- a/src/gov_user/views/ratings_extra_field.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -
    - <%= label_tag "input_institution", _("Organization name or Enterprise name")%> - - - - <%= content_tag(:div, _("No institution found"), - :id=>"institution_empty_ajax_message", - :class=>"errorExplanation hide-field") %> - <%= hidden_field_tag "organization_rating[institution_id]", "", id: "institution_selected" %> -
    diff --git a/src/gov_user/views/search/institutions.html.erb b/src/gov_user/views/search/institutions.html.erb deleted file mode 100644 index 1b33ed2..0000000 --- a/src/gov_user/views/search/institutions.html.erb +++ /dev/null @@ -1,16 +0,0 @@ -<%= search_page_title( @titles[@asset], @category ) %> - -<%= render :partial => 'search_form', :locals => { :hint => _("Type words about the %s you're looking for") % @asset.to_s.singularize } %> - -<%= display_results(@searches, @asset) %> -<% if params[:display] != 'map' %> - <%= pagination_links @searches[@asset][:results] %> -<% end %> - -
    - -<% if @asset == :product %> - <%= javascript_tag do %> - jQuery('.search-product-price-details').altBeautify(); - <% end %> -<% end %> diff --git a/src/noosfero-spb-theme/.gitignore b/src/noosfero-spb-theme/.gitignore deleted file mode 100644 index 9f4c784..0000000 --- a/src/noosfero-spb-theme/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# backup files -*~ -*.swp diff --git a/src/noosfero-spb-theme/README.md b/src/noosfero-spb-theme/README.md deleted file mode 100644 index 2ea6179..0000000 --- a/src/noosfero-spb-theme/README.md +++ /dev/null @@ -1,6 +0,0 @@ -PSB Theme for Noosfero -================================ - -Noosfero theme for the _Portal do Software Público_ project. - -Install on /public/designs/themes/noosfero-spb-theme \ No newline at end of file diff --git a/src/noosfero-spb-theme/categories.html.erb b/src/noosfero-spb-theme/categories.html.erb deleted file mode 100644 index d6393c8..0000000 --- a/src/noosfero-spb-theme/categories.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -
      - <% @environment.top_level_categories.find(:all, :conditions => {:display_in_menu => true}).each do |item| %> -
    • - <%= link_to(item.name, {:controller => :search, :action => 'category_index', :category_path => item.path }, :title => item.name, :style=>"color: ##{item.display_color || '000000'}" ) %> -
    • - <% end %> -
    diff --git a/src/noosfero-spb-theme/css/administration-panel.css b/src/noosfero-spb-theme/css/administration-panel.css deleted file mode 100644 index 558ffaf..0000000 --- a/src/noosfero-spb-theme/css/administration-panel.css +++ /dev/null @@ -1,159 +0,0 @@ -/*** Environment Admin Pages - General Rules ***/ -.action-admin_panel-index #content .main-block h2, -.controller-features #content .main-block h2{ - font-family: Arial; - font-size: 22px; - font-weight: 700; - line-height: 21px; -} - -/* Environment Settings */ - -/* Profile tab */ - -.action-admin_panel-site_info .main-content .ui-tabs{ - border: none; -} - -.action-admin_panel-site_info .main-content .ui-tabs .ui-tabs-nav{ - margin: 0 0 0 1em; - padding: 0; - background: none; - color: #172738; - border: 0px solid #aaaaaa; - border-radius: 4px; - font-weight: bold; -} - -.action-admin_panel-site_info .main-content .ui-widget-content .ui-state-default, -.action-admin_panel-site_info .main-content .ui-widget-header .ui-state-default{ - background: #d5d5d5 none; - color: #555555; - font-weight: normal; -} - -.action-admin_panel-site_info .main-content .ui-widget-content .ui-state-active, -.action-admin_panel-site_info .main-content .ui-widget-header .ui-state-active{ - background: #eeeff1; - color: #212121; - font-weight: normal; -} - -.action-admin_panel-site_info .main-content .ui-tabs .ui-tabs-panel{ - display: block; - padding: 1em 1.4em; - background-color: #eeeff1; - color: #777; - border-width: 1px; - font-size: 13px; - text-decoration: none; -} - -/* Organizations Settings */ - -.action-organizations-index .main-block form#manage-profiles, -.action-organizations-index .main-block form#manage-profiles form{ - background-color: transparent; -} - -.action-organizations-index .main-block form#manage-profiles .search-field{ - margin-bottom: 30px; -} - -.action-organizations-index .main-block form#manage-profiles .search-field .formfield { - width: 100%; - margin-right: 0.5em; - float: left; -} - -.action-organizations-index .main-block form#manage-profiles .search-field .formfield input { - margin-top: 0px; - margin-right: 0.5em; - padding: 6px; - min-width: 97%; - height: 19px; - max-height: 19px; - background: none; - border: 1px solid #ccc; - border-radius: 4px; -} - -.action-organizations-index .main-block form#manage-profiles input.button.submit{ - height: 32px; - margin-top: 8px; - padding: 5px 15px; - background: #3E67B1 none; - color: #FFF; - border-radius: 4px; - border: 1px solid #3E67B1; - line-height: 22px; - font-size: 14px; - text-transform: uppercase; -} - -.action-organizations-index .main-block form#manage-profiles input.button.submit:hover{ - background: #5E82C6; -} - -.action-organizations-index .main-block #environment-profiles-filter-title, -.action-organizations-index .main-block #environment-profiles-filter-filter{ - line-height: 35px; - font-size: 12px; -} - -.action-organizations-index .main-block table#organizations-list th{ - text-align: left; - vertical-align: middle; - padding: 2px 8px; -} - -/*** Features Settings ***/ - -.controller-features #content form *{ - font-size: 15px; -} - -.controller-features #content th{ - text-align: left; -} - -.controller-features #content h3{ - min-height: 0; - margin: 20px auto 10px auto; -} - -.controller-features #content hr{ - display: none; -} - -.controller-features #content ul.token-input-list{ - padding: 6px; - background: none; - border: 1px solid #ccc; - border-radius: 4px; - font-family: Arial, helvetica; - font-size: 15px; -} - -/*** Community Admin pages ***/ -/* Homepage */ -.action-profile_editor-index #profile-editor-index h1.block-title{ - color: #172738; - background-color: transparent; - border-bottom: none; - font-size: 2.3em; - font-weight: bold; - font-variant: normal; - font-family: Arial, open_sansbold, Helvetica, sans-serif; -} - -/* Index */ -.action-cms-index .cms-articles th{ - text-align: left; -} - -/* Spam Index */ -.action-spam-index .ui-widget-header { - border: none; - background: none; -} diff --git a/src/noosfero-spb-theme/css/animate.css b/src/noosfero-spb-theme/css/animate.css deleted file mode 100644 index 76810e6..0000000 --- a/src/noosfero-spb-theme/css/animate.css +++ /dev/null @@ -1,68 +0,0 @@ -.animated { - -webkit-animation-duration: .7s; - animation-duration: .7s; - -webkit-animation-fill-mode: both; - animation-fill-mode: both; -} - -@-webkit-keyframes slideInDown { - from { - -webkit-transform: translate3d(0, -100%, 0); - transform: translate3d(0, -100%, 0); - visibility: visible; - } - - 100% { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -@keyframes slideInDown { - from { - -webkit-transform: translate3d(0, -100%, 0); - transform: translate3d(0, -100%, 0); - visibility: visible; - } - - 100% { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} - -.slideInDown { - -webkit-animation-name: slideInDown; - animation-name: slideInDown; -} - -@-webkit-keyframes slideOutUp { - from { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - - 100% { - visibility: hidden; - -webkit-transform: translate3d(0, -100%, 0); - transform: translate3d(0, -100%, 0); - } -} - -@keyframes slideOutUp { - from { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - - 100% { - visibility: hidden; - -webkit-transform: translate3d(0, -100%, 0); - transform: translate3d(0, -100%, 0); - } -} - -.slideOutUp { - -webkit-animation-name: slideOutUp; - animation-name: slideOutUp; -} diff --git a/src/noosfero-spb-theme/css/article-page.css b/src/noosfero-spb-theme/css/article-page.css deleted file mode 100644 index ddace95..0000000 --- a/src/noosfero-spb-theme/css/article-page.css +++ /dev/null @@ -1,256 +0,0 @@ -/*** General Definitions ***/ -#content .main-block #article-header h1.title{ - margin-bottom: 10px; - padding: 0px 0px 10px 0px; - color: #172738; - border-bottom: 1px solid #D3D6DE; - font-family: Arial, open_sansbold, Helvetica, sans-serif; - font-size: 34px; - font-variant: normal; - font-weight: bold; - line-height: 37px; -} - -#content .main-block #article-header .publishing-info span{ - font-size: 12px; - color: #172738; - font-family: Arial; -} - -#content .main-block .publishing-info a{ - color: #2C66CE; - font-family: Arial; -} - -#content .main-block .article-body { - font-family: Arial ; - font-size: 15px; - line-height: 21px; -} - -#content #article-parent{ - margin: 0px 0px 10px 0; - font-style: normal; - text-align: left; -} - -#content #article-parent a.button.with-text{ - height: 18px; - padding: 5px; - background-color: #3E67B1; - color: #FFF; - border-radius: 4px; - border: 1px solid #3E67B1; - font-size: 12px; - line-height: 18px; - text-transform: none; -} - -#content #article-parent a.button.with-text:hover{ - background-color: #5E82C6; - border-color: #5E82C6; -} - -#content #article-parent a.button.with-text::before{ - content: "\f053"; - font-family: FontAwesome; - padding-right: 4px; - padding-left: 2px; - color: #ffffff; - border-radius: 4px; - text-align: center; -} - -/* Need a dev solution - blog internal pages*/ - -#article-header .preview{ - display: none; -} - -#article-hits { - display: none; - -} - -/* For software internal pages */ - -#content .main-block .article-body h2 { - margin-bottom: 20px; - font-family: Arial; - font-size: 16px; - font-weight: bold; - line-height: 21px; -} - -#content .main-block .article-body h3 { - margin-bottom: 20px; - font-size: 15px; - line-height: 21px; - font-weight: bold; - font-family: Arial; -} - -#content .main-block .article-body p{ - margin-bottom: 22px; - font-family: Arial; -} - -#content .main-block .article-body .zoomable-image, -#content .main-block .article-body img { - display: block; -} - -#content .main-block .article-body hr { - height: 0; - margin: 30px 0; - border: 0; - border-top: 1px solid rgba(0, 0, 0, 0.1); - border-bottom: 1px solid rgba(255, 255, 255, 0.3); -} - -#content .main-block .article-body #article-actions:last-child{ - margin: 0; - padding: 10px 0; - border-top: 3px solid #172938; -} - -#content .main-block .article-body #article-actions { - display: none; -} - -/*** Categories ***/ - -#content .main-block #article-cat{ - border-top: 4px solid #2C4B6B; - border-bottom: 1px solid #D3D6DE; -} - -#content .main-block #article-cat h4 { - float: left; - margin: 12px 10px 10px 0; - min-height: 0px; - color: #5E82C6; - font-family: Arial; - font-size: 12px; - font-weight: 300; - text-decoration: initial; -} - -#content .main-block #article-cat a{ - display: inline-block; - margin: 10px 10px 10px 0; - padding: 3px 10px; - color: #5E82C6; - background-color: #ECEDF1; - border: 1px solid #D3D6DE; - border-radius: 3px; - font-size: 12px; - text-decoration: initial; -} - -/*** Tags ***/ - -#content .main-block #article-tags{ - display: none; /* wait to fix label */ - width: 100%; - color: #5E82C6; - border-bottom: 1px solid #D3D6DE; - font-family: Arial; - font-size: 12px; - font-weight: 300; - text-align: left; -} - -#content .main-block #article-tags a{ - display: inline-block; - margin: 10px 10px 10px 0; - padding: 3px 10px; - color: #5E82C6; - background-color: #ECEDF1; - border: 1px solid #D3D6DE; - border-radius: 3px; - font-size: 12px; - text-decoration: initial; -} - -/*** Site Map page ***/ - -#content .main-block .article-body #sitemap{ - overflow: auto; -} - -#content .main-block .article-body #sitemap a{ - text-decoration: initial; -} - -#content .main-block .article-body #sitemap ul{ - padding-top: 20px; - font-weight: 700; -} - -#content .main-block .article-body #sitemap li{ - padding-left: 10px; - font-weight: 500; -} - -#content .main-block .article-body #sitemap #first-half{ - float: left; - width: 40%; -} - -#content .main-block .article-body #sitemap #second-half{ - float: left; - padding-top: 50px; - width: 40%; -} - -/*** end of sitemap page ***/ - -/*** Help page ***/ - -#content .main-block .article-body ul.help-list li { - list-style-type: none; - padding-bottom: 5px; -} - -#content .main-block .article-body ul.help-list li a[href="#faq"]:before { - content: url('../images/arrow-globe-icon.png'); - padding-right: 5px; - vertical-align: middle; -} - -#content .main-block .article-body ul.help-list li a[href="#lista-discussao"]:before { - content: url('../images/balloon-icon.png'); - padding-left: 3px; - padding-right: 6px; - vertical-align: middle; -} - -#content .main-block .article-body ul.help-list li a { - color: #2c66ce; - font-size: 15px; -} - -#content .main-block .article-body ul.help-list { - padding-top: 21px; - border-top: 1px solid #D3D6DE; -} - -#content .main-block .article-header h1.help-page-title { - margin-top: 0px; - margin-bottom: 30px; - padding: 0px; - color: #172738; - line-height: 30px; - border: none; - letter-spacing: -0.1px; - font-family: Arial; - font-size: 26px; - font-variant: normal; -} - -#content .main-block .article-body p a { - color: #2c66ce; -} - -/*** end of help page ***/ diff --git a/src/noosfero-spb-theme/css/community-pages.css b/src/noosfero-spb-theme/css/community-pages.css deleted file mode 100644 index a866f4b..0000000 --- a/src/noosfero-spb-theme/css/community-pages.css +++ /dev/null @@ -1,1130 +0,0 @@ -/*** Home page - profile page ***/ -.action-profile-index .main-content{ - padding:0px; -} -.action-profile-index .page-profile-header{ - display: block; - border-bottom: 1px solid #D3D6DE; - padding-bottom:30px; - margin-bottom: 30px; -} -.action-profile-index .page-profile-header .join-leave-button.require-login-popup{ - float:left; - width: 35%; -} -.action-profile-index #content .page-profile-header a.button.with-text { - padding: 5px 15px; - border: 1px solid #D3D6DE; - text-transform: none; - font-size: 12px; -} -.action-profile-index #content .page-profile-header .control-panel-button a{ - background:#3E67B1; - color:#fff; -} -.action-profile-index #content .page-profile-header .control-panel-button a.button.with-text, -.action-profile-index #content .page-profile-header .join-leave-button a:hover{ - border:1px solid #3E67B1; -} - - - -/* Profile header */ -.profile-type-is-community .action-profile-index #content .main-block h1 { - color: #172738; - border-bottom: none; - font-size: 2.3em; - font-weight: bold; - font-variant: normal; - font-family: Arial, open_sansbold, Helvetica, sans-serif; -} - -/* Search form - need to develop solution - hidden on profile page*/ -.profile-type-is-community .action-profile-index #public-profile-search{ - display: none; -} - -.action-profile-index .main-block #public-profile-search, -.action-profile-index .main-block #profile-search-results form, -.action-profile-index .main-block .profile-search-block form { - background-color: transparent; -} - -.action-profile-index .main-block #public-profile-search .search-field .formfield { - float: left; - margin-right: 0.5em; -} - -.action-profile-index .main-block #public-profile-search .search-field .formfield input { - margin-top: 0px; - margin-right: 0.5em; - padding: 6px; - height: 19px; - max-height: 19px; - border: 1px solid #D3D6DE; - border-radius: 4px; -} - -.action-profile-index .main-block #public-profile-search .formfield input, -.action-profile-index .main-block #public-profile-search .formfield textarea{ - width: 100%; - background: none #FFFFFF; - color: #585858; - border: 1px solid #DDDDDD; - font-size: 16px; - word-wrap: break-word; -} - -.action-profile-index .main-block #public-profile-search form input.button.submit { - height: 32px; - margin-top: 8px; - padding: 5px 15px; - color: #ffffff; - background: #2B51A8; - border-radius: 4px; - border: 1px solid #2B51A8; - font-size: 14px; - line-height: 14px; - text-transform: uppercase; -} - -/* Profile tab */ -.profile-type-is-community .action-profile-index .profile{ - display: none; -} - -#block-community-tabs{ - font-family: Arial; -} - -#block-community-tabs .ui-corner-all{ - overflow: visible; -} - -#content #block-community-tabs .iu-widget{ - font-size: 0px ; -} - -#block-community-tabs .ui-widget-header{ - background:#ECEDF1; - border:none; - border-bottom: 3px solid #D3D6DE; -} - -#block-community-tabs .ui-widget-content{ - border:none; - background:none; -} - -#block-community-tabs .ui-corner-all{ - border-radius:0px; -} - -#block-community-tabs .ui-state-default -#block-community-tabs .ui-widget-content .ui-state-default, -#block-community-tabs .ui-widget-header .ui-state-default{ - border:none; - background:#ECEDF1; - font-weight: normal; - color:#172738; -} - -#block-community-tabs .ui-tabs .ui-tabs-nav{ - font-size: 15px; - padding:.2em .0em 0; -} - -#block-community-tabs .ui-tabs .ui-tabs-nav .ui-tabs-anchor{ - float:none; - display:table; -} -.profile-members-tabs-container .ui-tabs .ui-tabs-panel, -#block-community-tabs .ui-tabs .ui-tabs-panel{ - padding: 0px; -} - -#block-community-tabs .ui-tabs .ui-tabs-nav li a:visited{ - color:#172738; -} - -#block-community-tabs .ui-tabs .ui-tabs-nav li{ - padding-right: 3px; -} - -#block-community-tabs .ui-tabs .ui-tabs-nav li.ui-tabs-active{ - margin-bottom: -3px !important; - padding-bottom: 1px; - border-bottom: 3px solid #FF0366; -} - -#block-community-tabs .ui-tabs .ui-tabs-nav li.ui-tabs-active.ui-state-active:before{ - content:"\f0dd"; - font-family: FontAwesome; - font-size: 16px; - position:absolute; - top:26px; - margin:0px 45%; - color:#FF0366; -} -#block-community-tabs .ui-tabs .ui-tabs-nav li.ui-tabs-active a{ - color: #FF0366; - font-weight: 300; -} - -/* Community's area tabs */ - -#content #discussions-content{ - color:#172738; -} - -#content #discussions-content .pull-left{ - float:none; -} - -#content #discussions-content{ - font-family: Arial; - font-size: 14px; -} - -#content #discussions-content .message-discussion{ - border-bottom: 1px solid #ECEDF1; - margin:0px 0px 8px 0px; - padding:10px 0px 18px 0px; -} - -#content #discussions-content .message-discussion .quiet:last-child{ - font-size: 16px; - max-height: 50px; - overflow: hidden; -} - -#content #discussions-content h4{ - font-size: 22px; - border-bottom: 1px solid #ECEDF1; - padding: 8px 0px 6px 0px; -} - -#discussions-content hr{ - display: none; -} - -#discussions-content .quiet{ - line-height: 21px; -} - -#discussions-content div.quiet:last-child{ - border-top:none; -} - -#discussions-content .text-right{ - padding:6px 0px 25px 0px; -} - -#discussions-content .text-right a{ - text-align: right; - display: block; - text-transform: uppercase; - line-height: 21px; - font-size: 11px; -} - -#discussions-content .text-right a:visited, -#content #discussions-content .text-right a:visited, -#discussions-content .text-right dl.portlet a:visited{ - color: #172738; -} - -#discussions-content .text-right a::after { - content: "\f105"; - font-family: FontAwesome; - padding-left: 7px; - padding-right: 4px; - color: #ffffff; - background: #3E67B1; - border-radius: 4px; - font-size: 18px; - line-height: 20px; - text-align: center; - margin-left: 5px; - position: relative; - top: 2px; -} - -#content #discussions-content .pull-left a{ - color:#3E67B1; - font-weight: 600; -} - -#content #discussions-content .subject{ - font-weight: 800; - font-size: 16px -} - -#repository-feed-tab .event-inline.event-item{ - border-bottom: 1px solid #ECEDF1; - margin-top:30px; - padding: 0px 0px 80px 0px; -} - -#repository-feed-tab .event-inline.event-item img{ - display: none; -} - -#repository-feed-tab .event-item-timestamp{ - border-right: 1px dotted #D3D6DE; - float:left; - width: 112px; - height: 55px; - margin-right: 20px; -} -#repository-feed-tab .event-item-timestamp .time_ago{ - color:#172738; -} - -#repository-feed-tab .event-item-timestamp .time_ago:before{ - content: url("../images/ic-calendar.png"); - margin-right: 10px; - margin-top: 0px; - float: left; -} - -#repository-feed-tab .event-title{ - max-height: 55px; - overflow: hidden; - float:left; - width: 70%; - font-size: 16px; -} - -#content #repository-feed-tab .author_name{ - display: block; - padding-bottom: 5px; - font-size: 12px; -} - -#content #repository-feed-tab .author_name a{ - color:#3E67B1; -} - -#repository-feed-tab .see-more-repository{ - text-align: right; - display: block; - text-transform: uppercase; - line-height: 21px; - font-size: 11px; - margin-top: 15px; -} - -#repository-feed-tab .see-more-repository:after{ - content: "\f105"; - font-family: FontAwesome; - padding-left: 7px; - padding-right: 4px; - color: #ffffff; - background: #3E67B1; - border-radius: 4px; - font-size: 18px; - line-height: 20px; - text-align: center; - margin-left: 5px; - position: relative; - top: 2px; -} - - -#repository-feed-tab .see-more-repository a:visited, -#content #repository-feed-tab .see-more-repository a:visited, -#repository-feed-tab .see-more-repository dl.portlet a:visited{ - color:#172738; -} - -/* Blog tab*/ - -#content #blog-tab .blog-posts{ - margin-top:15px; -} - -#content #blog-tab .blog .blog-post{ - background:none; - border-bottom: 1px solid #ECEDF1; - padding:25px 0px 12px 0px; -} - -#content #blog-tab .blog .blog-post h1{ - margin: 0px 0px 10px 0px; - padding: 0px 0px 0px 0px; - max-width: 555px; - max-height: 40px; - border: none; - font: normal normal bold 16px/20px Arial; - overflow: hidden; - display: inline-block; -} - -#content #blog-tab .blog .blog-post .post-pic{ - margin:0 20px 5px 0px; - border-radius: 4px; - height: 62px; - width: 19%; - background: center/cover no-repeat; - float: left; -} -#content #blog-tab .blog .blog-post .publishing-info { - border-top: none; - color: #172838; - font: 13px/21px Arial; -} - -#content #blog-tab .blog .publishing-info{ - display:inline; - text-align: left; -} -#content #blog-tab .blog .blog-post .publishing-info .date { - margin: 0px 0px 5px 0px; - display: table-cell; - font-size: 11px; -} -#content #blog-tab .blog .blog-post .author { - display: none; -} - -#content #blog-tab .blog .blog-post .comments{ - display: none; -} - -#content #blog-tab .blog .blog-post .short-post { - max-height: 35px; - text-align: justify; - text-overflow: ellipsis; - overflow: hidden; -} - -#content #blog-tab .blog .article-body p { - margin: 0px 0px 5px 0px; - max-height: 25px; - color: #172738; - text-align: left; - text-overflow: ellipsis; - font: 15px/21px Arial; - overflow: hidden; -} - -/*Post Position-1*/ -#content #blog-tab .blog .blog-post.position-1 h1{ - line-height: 37px; - font-size: 22px; - color: #172738; - padding-left:0px; - text-align: left; -} -#content #blog-tab .blog .blog-post.position-1 .date{ - padding-left:0px; -} - -#content #blog-tab .blog .blog-post.position-1 .post-pic { -margin: 0 20px 5px 0px; -border-radius: 4px; -height: 210px; -width: 100%; -background: center/cover no-repeat; -float: left; -} - -/* Read more button*/ -#content #blog-tab .blog .read-more{ - text-align: right; - display: block; - text-transform: uppercase; - line-height: 21px; - font-size: 11px; - margin:15px 0px 20px 0px; -} - -#content #blog-tab .blog .read-more:after{ - content: "\f105"; - font-family: FontAwesome; - padding-left: 7px; - padding-right: 4px; - color: #ffffff; - background: #172738; - border-radius: 2px; - font-size: 19px; - line-height: 20px; - text-align: center; - margin-left: 5px; - position: relative; - top: 2px; -} - -#content #blog-tab .blog .read-more a{ - text-decoration: none; - color:#172735; -} - -/* Software Tab Data - Need to develop solution - Only display on profile page */ - -.profile-type-is-community #content .software-tab-data-block{ - display: none; -} - -.profile-type-is-community .action-profile_design-index #content .software-tab-data-block, -.profile-type-is-community .action-profile-index #content .software-tab-data-block{ - display: block; -} - -/*** Right bar ***/ - -.template-default.profile-type-is-community .action-profile-index #content .box-3 .link-list-block, -.template-lefttopright.profile-type-is-community .action-profile-index #content .box-2 .link-list-block - display: none; -} - -/*Block with Community information - Need to develop solution - Only display on profile page */ - -.profile-type-is-community .community-block{ - display: none; -} - -.profile-type-is-community .action-profile_design-index #content .community-block, -.profile-type-is-community .action-profile-index #content .community-block{ - display: block; - border: 1px solid #ECEDF1; - border-radius: 4px; -} - -.profile-type-is-community #content .community-block-logo{ - border-bottom: 3px solid #3E67B1; -} - -.profile-type-is-community #content .community-block-title{ - padding: 10px; - background-color: #ECEDF1; - border-bottom-right-radius: 4px; - border-bottom-left-radius: 4px; -} - -.profile-type-is-community #content .community-block-title h1{ - margin: 5px auto; - font-size: 14px; - line-height: 20px; -} - -.profile-type-is-community #content .community-block-logo{ - padding: 10px; -} - -.profile-type-is-community #content .community-block-logo img.logo{ - height: auto; - width: 100px; - min-width: 100px; - max-width: 170px; -} - -.profile-type-is-community #content .community-block-logo a{ - display: block; - height: 100px; - overflow: hidden; - text-align: center; -} - -/* Wiki block - Need to develop solution - Only display on profile page */ -.template-default #content .box-3 .wiki-block, -.template-lefttopright #content .box-2 .wiki-block{ - display: none; -} - -.template-default .action-profile-index #content .box-3 .wiki-block, -.template-lefttopright .action-profile-index #content .box-2 .wiki-block, -.template-default .action-profile_design-index #content .box-3 .wiki-block, -.template-lefttopright .action-profile_design-index #content .box-2 .wiki-block{ - display: block; -} - -/* Repository block and wiki block need to look a unique block */ -.action-profile-index #content .box-2 .block-outer .repository-block, -.action-profile-index #content .box-3 .block-outer .repository-block{ - margin-bottom: 20px; -} - -/*Block with Members information - Need to develop solution - Only display on profile page */ - -.profile-type-is-community #content .members-block{ - display: none; - border: 1px solid #D3D6DE; - border-radius: 4px; -} - -.profile-type-is-community .action-profile_design-index #content .members-block, -.profile-type-is-community .action-profile-index #content .members-block{ - display: block; -} - -.profile-type-is-community #content .members-block .block-title{ - padding: 12px; - margin-bottom: 12px; - background-color: #ECEDF1; - color: #172738; - border-bottom: 1px solid #D3D6DE; - border-top: none; - font-size: 14px; -} - -.profile-type-is-community #content .members-block .block-footer-content{ - padding: 8px 10px 15px 0px; - margin-right: 0px; - background-color: #ECEDF1; - border-top: 1px solid #D3D6DE; - text-align: right; -} - -.profile-type-is-community #content .members-block .block-footer-content a{ - padding-right: 0px !important; -} - -.profile-type-is-community #content .members-block .block-footer-content a.view-all{ - background-image: none; - border: none; - text-transform: uppercase; - line-height: 21px; -} - -.profile-type-is-community #content .members-block .block-footer-content a.view-all::after{ - content: "\f105"; - position: relative; - top: 2px; - margin-left: 5px; - padding-left: 7px; - padding-right: 4px; - color: #ffffff; - background: #3E67B1; - border-radius: 4px; - font-family: FontAwesome; - font-size: 18px; - line-height: 20px; - text-align: center; -} - -.profile-type-is-community #content .members-block .common-profile-list-block .vcard{ - border: none; -} - -.profile-type-is-community #content .members-block .common-profile-list-block .vcard:hover{ - background: none; - border: none; -} - -.profile-type-is-community #content .members-block .common-profile-list-block .vcard li a{ - color: #172738; -} - -.profile-type-is-community #content .members-block .common-profile-list-block .vcard a.profile_link{ - /*height: 70px;*/ - height: 100px; - max-height: 100px; -} - -.profile-type-is-community #content .members-block .menu-submenu{ - background: #172738; - border-radius: 4px; - /***side block position***/ - top: -39px; - right: 100%; - width: 131px; - height: 176px; - box-shadow: 2px 2px 2px #ECEDF1; - -webkit-box-shadow: 2px 2px 2px #ECEDF1; - -moz-box-shadow: 2px 2px 2px #ECEDF1; -} - -.profile-type-is-community #content .members-block .menu-submenu.down::before{ - content:"\f0da"; - float: right; - position: relative; - margin: -7px; - margin-top: 30%; - color: #172738; - font-family: FontAwesome; - font-size: 25px; -} - -.profile-type-is-community #content .members-block .menu-submenu-header, -.profile-type-is-community #content .members-block .menu-submenu-content, -.profile-type-is-community #content .members-block .menu-submenu-footer{ - background: none; -} - -.profile-type-is-community #content .members-block .menu-submenu-header, -.profile-type-is-community #content .members-block .menu-submenu-footer{ - display: none; -} - -.profile-type-is-community #content .members-block .menu-submenu-content{ - height: 100%; -} - -.profile-type-is-community #content .members-block .common-profile-list-block li{ - margin: 0px !important; -} - -.profile-type-is-community #content .members-block .common-profile-list-block .vcard .menu-submenu-trigger{ - display: block; - height: 13px; - top: 2px; - left: 3px; - padding-bottom: 0px; - background: #172738; - border: 1px solid #fff; - opacity: 0.7; -} - -.profile-type-is-community #content .members-block .common-profile-list-block .vcard .menu-submenu-trigger::before{ - content: "\f053"; - color: #fff; - font-family: FontAwesome; - font-size: 8px; - line-height: 11px; -} - -.profile-type-is-community #content .members-block .common-profile-list-block .fn { - margin-top: 2px; - color: #172738; - max-height: 34px; - overflow: hidden; -} - -.profile-type-is-community #content .members-block .menu-submenu-content h4{ - max-height: 16px; - padding: 8px 7px 10px 6px; - margin: 0px 0px 2px 0px; - background: #243F59; - color: #fff; - border-bottom: 2px solid #FF0366; - border-radius: 4px 4px 0px 0px; - font-family: Arial; - font-size: 13px; - text-transform: uppercase; - text-align: center; - overflow: hidden; -} - -.profile-type-is-community #content .friends-block ul, #content .members-block ul { - min-width: 196px; - width: 192px; - margin: 0px 0px 0px 0px; - padding: 0px; -} - -.profile-type-is-community #content .members-block .menu-submenu-content .menu-submenu-list li a{ - padding: 2px; - color: #fff; - border-bottom: 1px dotted #2C4B6B; - text-align: center; - line-height: 30px; -} - -.profile-type-is-community #content .members-block .menu-submenu-content .menu-submenu-list li a.add-friend{ - border: none; -} - -.profile-type-is-community #content .members-block .menu-submenu-content .menu-submenu-list li a.add-friend::before{ - content: "\f067"; - padding-right: 6px; - color: #FF0366; - font-family: FontAwesome; - font-size: 11px; -} - -.profile-type-is-community #content .members-block .menu-submenu-content h4:hover, -.profile-type-is-community #content .members-block .menu-submenu-content .menu-submenu-list li a:hover{ - color: #ECEDF1; -} - -.profile-type-is-community #content .members-block .common-profile-list-block img{ - width: 50px; - height: 50px; - max-height: 50px; - max-width: 50px; - border-radius: 4px; -} - -.profile-type-is-community #content .members-block .block-footer-content a.view-all{ - position:relative; -} - -/* Profile info block */ - -#content .profile-image-block .admin-link a{ - color: #2c66ce; -} - -#content .profile-image-block .profile-info-options{ - padding-right: 0; - text-align: center; -} - -#content .profile-image-block .profile-info-options a.button.with-text{ - border-color: #D3D6DE; - font-size: 12px; - text-transform: none; -} - -#content .profile-image-block .profile-info-options a.button.with-text:hover{ - border-color: #3E67B1; -} - -/*** Members Page ***/ - -/* Title of the area members */ -.action-profile-members .box-1{ - width: 560px; -} - -.action-profile-members #content .page-members-header{ - margin-bottom: 45px; - border-bottom: 1px solid #D3D6DE; - font-family: Arial; - height: 150px; -} - -.action-profile-members #content .page-members-header h1{ - margin:20px 0px 8px 0px; -} - -.action-profile-members #content .page-members-header h3.community-name{ - margin: 0px 0px 5px 0px; - font-size: 14px; - font-weight: 300; -} - -.action-profile-members #content .page-members-header ul li{ - float:left; - margin:8px 0px 0px 0px; - width: 36%; - -} - -.action-profile-members #content .page-members-header a.button.with-text{ - padding: 5px 15px; - border: 1px solid #D3D6DE; - text-transform: none; - font-size: 12px; - margin-right: 5px; -} - -.action-profile-members #content .page-members-header a.button.with-text:hover{ - border-color: #3E67B1; -} - - -/* Tabs */ - -.action-profile-members #content .profile-members-tabs-container{ - font-family: Arial; -} - -.action-profile-members #content .profile-members-tabs-container .ui-corner-all{ - overflow: visible; - padding: 0; -} - -.action-profile-members #content .profile-members-tabs-container .iu-widget{ - font-size: 0px ; -} - -.action-profile-members #content .profile-members-tabs-container .ui-widget-header{ - background: #ECEDF1; - border: none; - border-bottom: 3px solid #D3D6DE; -} - -.action-profile-members #content .profile-members-tabs-container .ui-widget-content{ - background: none; - border: none; -} - -.action-profile-members #content .profile-members-tabs-container .ui-corner-all, -.action-profile-members #content .profile-members-tabs-container .ui-corner-bl, -.action-profile-members #content .profile-members-tabs-container .ui-corner-top, -.action-profile-members #content .profile-members-tabs-container .ui-corner-right, -.action-profile-members #content .profile-members-tabs-container .ui-corner-bottom, -.action-profile-members #content .profile-members-tabs-container .ui-corner-left, -.action-profile-members #content .profile-members-tabs-container .ui-corner-tr, -.action-profile-members #content .profile-members-tabs-container .ui-corner-tl{ - border-radius: 0px; -} - -.action-profile-members #content .profile-members-tabs-container .ui-state-default, -.action-profile-members #content .profile-members-tabs-container .ui-widget-content .ui-state-default, -.action-profile-members #content .profile-members-tabs-container .ui-widget-header .ui-state-default{ - border: none; - background: #ECEDF1; - font-weight: normal; - color: #172738; -} - -.action-profile-members #content .profile-members-tabs-container .ui-tabs .ui-tabs-nav { - font-size: 15px; -} - -.action-profile-members #content .profile-members-tabs-container .ui-tabs .ui-tabs-nav .ui-tabs-anchor{ - float: none; - display: table; -} - -.action-profile-members #content .profile-members-tabs-container .ui-tabs .ui-tabs-nav li{ - padding-right: 3px; -} - -.action-profile-members #content .profile-members-tabs-container .ui-tabs .ui-tabs-nav li a:visited{ - color: #172738; -} - -.action-profile-members #content .profile-members-tabs-container .ui-tabs .ui-tabs-nav li.ui-tabs-active { - margin-bottom: -3px; - padding-bottom: 1px; - border-bottom: 3px solid #FF0366; -} - -.action-profile-members #content .profile-members-tabs-container .ui-tabs .ui-tabs-nav li.ui-tabs-active.ui-state-active:before{ - content:"\f0dd"; - font-family: FontAwesome; - font-size: 16px; - position:absolute; - top:26px; - margin:0px 45%; - color:#FF0366; -} - -.action-profile-members #content .profile-members-tabs-container .ui-tabs .ui-tabs-nav li.ui-tabs-active a { - color: #FF0366; - font-weight: 300; -} - -/* Sort selection */ -.action-profile-members #profile-members-sort-options{ - font-size: 14px; - text-align: right; - margin:16px 15px 17px 6px; - border-bottom: 1px solid #ECEDF1; - padding-bottom:8px; -} - -.action-profile-members #profile-members-sort-options label{ - font-weight: 700; - color:#172738; -} - -.action-profile-members #profile-members-sort-options select{ - background: none; - border: 1px solid #D3D6DE; - border-radius: 4px; - padding: 4px 15px 4px 4px; - margin: 0px 0px 0px 10px; - font-size: 14px; -} - -/* Members Tab */ -.action-profile-members .profile-members-tabs-container .profile-members{ - padding-left: 5px; -} - -/* Admins Tab */ -.action-profile-members .profile-members-tabs-container .profile-admins{ - padding-left: 5px; -} - -/* Profiles list*/ -.action-profile-members .common-profile-list-block .vcard{ - border: none; -} - -.action-profile-members .common-profile-list-block .vcard:hover{ - border: none; - background: none; -} - -.action-profile-members .common-profile-list-block .vcard a{ - padding-bottom: 30px; -} - -.action-profile-members .box-1 .common-profile-list-block span{ - margin-right: 9px; - width: 90px; - height: 86px; -} - -.action-profile-members .common-profile-list-block img{ - border-radius: 4px; - width: 82px; - height: 82px; - max-width: 150px; - max-height: 150px; -} - -.action-profile-members .menu-submenu{ - background:#172738; - border-radius: 4px; - /***side block position***/ - bottom:0px; - right: 105%; - width: 131px; - height: 178px; - box-shadow: 2px 2px 2px #ECEDF1; - -webkit-box-shadow: 2px 2px 2px #ECEDF1; - -moz-box-shadow: 2px 2px 2px #ECEDF1; -} - -.action-profile-members .menu-submenu.down::before { - content:"\f0da"; - color:#172738; - font-family: FontAwesome; - font-size: 25px; - float: right; - position: relative; - margin:-7px; - margin-top: 30%; -} - -.action-profile-members .menu-submenu-header, -.action-profile-members .menu-submenu-content, -.action-profile-members .menu-submenu-footer{ - background:none; -} - -.action-profile-members .menu-submenu-header, -.action-profile-members .menu-submenu-footer{ - display: none; -} - -.action-profile-members .menu-submenu-content{ - height: 100%; -} - -.action-profile-members #content .menu-submenu-content h4{ - color:#fff; - font-size: 13px; - background:#243F59; - border-top-right-radius: 4px; - border-top-left-radius: 4px; - border-bottom: 2px solid #FF0366; - text-transform: uppercase; - padding:8px 7px 10px 6px; - margin:0px 0px 2px 0px; - text-align: center; - max-height: 16px; - overflow: hidden; -} - -.action-profile-members #content .menu-submenu-content ul a{ - padding-left: 0px; -} - -.action-profile-members #content .menu-submenu-content .menu-submenu-list .add-friend::before{ - content:"\f067"; - font-family: FontAwesome; - color:#FF0366; - font-size: 11px; - padding-right: 6px; -} - -.action-profile-members #content .menu-submenu-content .menu-submenu-list .add-friend:last-child{ - border-bottom:none; -} - -.action-profile-members #content .menu-submenu-content .menu-submenu-list li a { - color:#fff; - font-family: Arial; - font-size: 14px; - border-bottom:1px dotted #2C4B6B; - text-align: center; - padding-top:8px; - padding-bottom:10px; - margin-right: 1px; -} - -.action-profile-members .common-profile-list-block .vcard .menu-submenu-trigger{ - display: block; - background:#172738; - top:5px; - left:4px; - border:1px solid #172738; - padding-bottom: 0px; - border-radius: 5px; - -moz-border-radius:5px; - -webkit-border-radius:5px; - height: 15px; -} - -.action-profile-members .common-profile-list-block .vcard .menu-submenu-trigger::before{ - content:"\f053"; - color:#fff; - font-family: FontAwesome; - font-size: 10px; - line-height: 11px; -} - -.action-profile-members .box-1 .common-profile-list-block .fn{ - font-size: 14px; - color:#172738; - margin-bottom: 27px; - margin-top:2px; - height: 35px; - max-height: 35px; - overflow: hidden; -} - -/*** Events ***/ - -#content .article-body-event .event-card{ - border-top: 1px dotted #D3D6D3; - background-repeat: no-repeat; - width: 494px; - height: 116px; - margin-bottom: 30px; -} - -#content .article-body-event .event-image{ - border-right: 1px dotted #D3D6DE; -} - -#content .article-body-event .about-event > span{ - font-family: Arial; - line-height: 13px; -} - -#content .article-body-event .about-event .event-date{ - font-weight: bold; - letter-spacing: 0.49px; -} - -#content .article-body-event .about-event .event-address{ - margin-top: 19px; -} - -#content .article-body-event .about-event .event-address span{ - margin-top: 4.4px; - line-height: 14px; - letter-spacing: 0.5px; -} - -#content .article-body-event .event-link{ - letter-spacing: 0.48px; -} - -#content .article-body-event .event-link a{ - text-decoration: underline; -} - -#content .article-body-event .event-body .event-lead p{ - font-size: 16px; - font-family: Arial; - font-weight: bold; - letter-spacing: -0.4px; - line-height: 21px; -} - -#content .article-body-event .event-body .event-content p{ - font-size: 15px; - font-family: Arial; - line-height: 22px; -} diff --git a/src/noosfero-spb-theme/css/edition-pages.css b/src/noosfero-spb-theme/css/edition-pages.css deleted file mode 100644 index c5e2dae..0000000 --- a/src/noosfero-spb-theme/css/edition-pages.css +++ /dev/null @@ -1,477 +0,0 @@ -/*** General Form Fields ***/ - -/*** Edit Blog and Articles ***/ - -.controller-cms #content .main-content h1{ - margin: 0 0 10px 0; - padding: 0; - color: #172738; - border-bottom: none; - font-family: Arial; - font-size: 32px; - font-weight: bold; - font-variant: normal; -} - -.controller-cms #content .main-content form{ - font-size: 14px; - font-family: Arial; -} - -.controller-cms #content .main-content form .required-field .pseudoformlabel, -.controller-cms #content .main-content form .required-field label.formlabel:after { - color: #FF0366; - font-size: 14px; - font-weight: 500; -} - -.controller-cms #content .main-content .formlabel{ - display: inline-block; - max-width: 100%; - margin-bottom: 5px; - padding: 10px 0 5px 0; - color: #231f20; - font-size: 14px; -} - -.controller-cms #content .main-content .formfieldline .formfield code{ - display: block; - width: auto; - height: 30px; - padding: 2px 0px 2px 0px; - border: none; - border-radius: 4px; - font-size: 15px; - font-family: Arial, helvetica; -} - -.controller-cms #content .main-content .formfieldline .formfield code *{ - display: inline; -} - -.controller-cms #content .main-content .formfieldline .formfield input[type="text"]{ - padding: 6px; - color: #585858; - background: #FFF; - border: 1px solid #ccc; - border-radius: 4px; - font-size: 15px; - font-family: Arial, helvetica; -} - -.controller-cms #content .main-content .formfieldline textarea{ - padding: 6px; - color: #585858; - background: none; - border: 1px solid #ccc; - border-radius: 4px; - font-family: Arial, helvetica; - font-size: 15px; -} - -.controller-cms #content .main-content .formfieldline .formfield code input[type="text"]:hover, -.controller-cms #content .main-content .formfieldline .formfield code input[type="text"]:focus, -.controller-cms #content .main-content .formfieldline textarea:hover, -.controller-cms #content .main-content .formfieldline textarea:focus{ - border: 1px solid #172738; -} - -.controller-cms #content .main-content .formfieldline .type-file .type-file .formlabel{ - display: none; -} - -.controller-cms #content .main-content .formfieldline .type-file .type-file .type-text .formlabel{ - display: block; -} - -.controller-cms #content .formfield #article_image_builder_uploaded_data, -.controller-cms #content .formfield #article_image_builder_label{ - height: 19px; - padding: 6px; - background: none; - border: 1px solid #ccc; - border-radius: 4px; - font-size: 12px; - text-indent: 0px; -} - -.controller-cms #content .formfield #article_image_builder_uploaded_data:hover, -.controller-cms #content .formfield #article_image_builder_label:hover, -.controller-cms #content .formfield #article_image_builder_uploaded_data:focus, -.controller-cms #content .formfield #article_image_builder_label:focus{ - border: 1px solid #172738; -} - -.controller-cms #content .formfield #fetch-external-feed{ - padding-left: 20px; - border-radius: 4px; -} - -.controller-cms #content .formfield #fetch-external-feed > input{ - height: 13px; - margin: 8px 8px 8px 0px; - vertical-align: middle; - width: 13px; -} - -.controller-cms #content .formfield #fetch-external-feed #external-feed-options #external-feed-options-only-once input{ - margin-right: 3px; - width: 13px; - vertical-align: middle; -} - -.controller-cms #content .formfield #fetch-external-feed #external-feed-options #external-feed-options-only-once label{ - margin-right: 250px; -} - -.controller-cms #content .main-content form label.formlabel, -.controller-cms #content .main-content form .article-translation-field { - font-size: 14px; - margin-bottom: 5px; - color: #231f20; -} - -.controller-cms #content .main-content form .article-translation-field { - margin-top: 25px; - margin-bottom: 15px; -} - -.controller-cms #content .main-content form .button-bar input{ - height: 30px; - padding: 2px 15px; - margin-right: 10px; - color: #FFF; - background: #3E67B1; - font-size: 15px; -} - -.controller-cms #content .main-content form .button-bar input:hover{ - background: #5E82C6; - border: none; -} - -.controller-cms #content .main-content form .button-bar input.button.with-text{ - height: 36px; -} - -.controller-cms #content .main-content form .button-bar a.button{ - height: 30px; - padding: 2px 15px; - color: #3E67B1; - background: #FFF; - border: 1px solid #3E67B1; - font-size: 14px; - text-align: center; -} - -.controller-cms #content .main-content form .button-bar a.button:hover{ - background: none; - color: #3E67B1; - border-color: #3E67B1; -} - -.controller-cms #content .main-content form .box-title{ - font-size: 15px; - font-family: Arial, helvetica; -} - -.controller-cms #content .main-content #category-ajax-selector{ - border-style: dotted; -} - -.controller-cms #content .main-content #category-ajax-selector label{ - font-size: 14px; -} - -.controller-cms #content .main-content #category-ajax-selector .select-subcategory-link{ - background: #FFF; - border: 1px solid #2C66CE; - color: #2C66CE; - padding: 3px; -} - -.controller-cms #content .main-content #category-ajax-selector .select-subcategory-link:hover{ - background: #2C66CE; - color: #FFF; -} - -.controller-cms #content .main-content .inputosaurus-required{ - background: none; - border: 1px solid #ccc; -} - -.controller-cms #content .main-content .inputosaurus-required:hover, -.controller-cms #content .main-content .inputosaurus-required:focus{ - border: 1px solid #172738; -} - -.controller-cms #content .main-content .inputosaurus-required input:hover{ - background: none; -} - -#content #edit-article-options h4 { - font-family: "open_sansbold", Arial, Helvetica, sans-serif; - font-size: 14px; -} - -#content #edit-article-options div div { - margin-top: 13px; - margin-bottom: 13px; -} - -/*** Article's edition page ***/ - -#content .text-editor-sidebar .header{ - padding: 13px 10px; - color: #172738; - background: #D3D6DE; - border-radius: 4px; - font-size: 14px; - font-weight: 300; - font-family: Arial; -} - -#content .text-editor-sidebar .header a.button.icon-vertical-toggle{ - padding: 0 15px; - background: #3E67B1; - color: #FFF; - font-size: 14px; - font-weight: 300; - font-family: Arial; -} - -#content .text-editor-sidebar .header a.button.icon-vertical-toggle:hover{ - background: #5E82C6; -} - -#content .text-editor-sidebar-box{ - background: #ECEDF1; - border-radius: 4px; - border: 1px solid #D3D6DE; -} - -/*New Software form*/ - -.action-software_communities_plugin_myprofile-new_software #content.current-step h3 { - color: #F50054; -} - -.action-software_communities_plugin_myprofile-new_software #content .main-block form input[type="text"] { - display: block; - height: 19px; - padding: 6px; - border: 1px solid #ccc; - border-radius: 4px; - width: 384px; - font-size: 15px; - font-family: arial, helvetica; - color: #585858; -} - -.action-software_communities_plugin_myprofile-new_software #content .formfield input{ - background: none #FFFFFF; - border: 1px solid #DDDDDD; - color: #585858; - font-size: 16px; - width: 76%; - word-wrap: break-word; - border-radius: 4px; -} -.action-software_communities_plugin_myprofile-new_software #content .main-content form label.formlabel.mandatory{ - font-size: 14px; - margin-bottom: 5px; - color: #231f20; - font-weight: 300; -} - -.action-software_communities_plugin_myprofile-new_software #content .main-content form .required-field .formlabel.mandatory:after{ - color: #FF0366; - font-weight: 500; -} - -.action-software_communities_plugin_myprofile-new_software #content .formfield textarea{ - background: none #FFFFFF; - border: 1px solid #DDDDDD; - color: #585858; - font-size: 16px; - width: 100%; - word-wrap: break-word; -} - -.action-software_communities_plugin_myprofile-new_software #content #finality textarea { - resize: none; - height: 100px; -} - -.action-software_communities_plugin_myprofile-new_software #content #software-hostname { - float: left; - display: inline-block; - vertical-align: middle; - background: #EEE; - border: 1px solid #CFCFCF; - line-height: 22px; - padding: 0px 7px; - color: #4A4A4A; - font-size: 20px; - text-transform: lowercase; - min-width: 190px; - border-spacing: 20px; -} - -.action-software_communities_plugin_myprofile-new_software #content .main-block form #profile_change_picture { - padding: 0 15px 15px 15px; - border: 1px dotted #ddd; - margin-top: 10px; -} - -.action-software_communities_plugin_myprofile-new_software #content .main-content form p .required-field { - max-width: 500px; - padding: 15px 20px; - margin: 20px 0 30px 0; - border: 1px dotted #ccc; - border-left: 5px solid #FF0366; - border-radius: 3px; - display: block; - background: #fff; - line-height: 20px; - font-size: 13px; -} - -.action-software_communities_plugin_myprofile-new_software .explanation { -font-style: italic; -font-size: 10px; -} - -/* new community form*/ - -.action-memberships-new_community #content .main-block form input[type="text"] { - display: block; - height: 19px; - padding: 6px; - border: 1px solid #ccc; - border-radius: 4px; - width: 384px; - font-size: 15px; - font-family: arial, helvetica; - color: #585858; -} - -.action-memberships-new_community .formfield input{ - background: none #FFFFFF; - border: 1px solid #DDDDDD; - color: #585858; - font-size: 16px; - width: 76%; - word-wrap: break-word; - border-radius: 4px; -} - -.action-memberships-new_community #content .main-content form label.formlabel{ - font-size: 14px; - margin-bottom: 5px; - color:#231f20; - font-weight: 300; -} - -.action-memberships-new_community #content .main-content form .required-field .formlabel:after { - color: #FF0366; - font-weight: 500; -} - -.action-memberships-new_community .formfield textarea{ - background: none #FFFFFF; - border: 1px solid #DDDDDD; - color: #585858; - font-size: 16px; - width: 100%; - word-wrap: break-word; -} - -.action-memberships-new_community #content .main-block form #profile_change_picture { - padding: 0 15px 15px 15px; - border: 1px dotted #ddd; - margin-top: 10px; -} - -.action-memberships-new_community #content .main-content form p .required-field { - max-width: 500px; - padding: 15px 20px; - margin: 20px 0 30px 0; - border: 1px dotted #ccc; - border-left: 5px solid #FF0366; - border-radius: 3px; - display: block; - background: #fff; - line-height: 20px; - font-size: 13px; -} - -/*Contact new form*/ - -.action-contact-new #content .main-block form input[type="text"] { - display: block; - height: 19px; - padding: 6px; - border: 1px solid #ccc; - border-radius: 4px; - width: 384px; - font-size: 15px; - font-family: arial, helvetica; - color: #585858; -} - -.action-contact-new .formfield input{ - background: none #FFFFFF; - border: 1px solid #DDDDDD; - color: #585858; - font-size: 16px; - width: 76%; - word-wrap: break-word; - border-radius: 4px; -} - -.action-contact-new #content .main-content form label.formlabel{ - font-size: 14px; - margin-bottom: 5px; - color:#231f20; - font-weight: 300; -} - -.action-contact-new #content .main-content form .required-field .formlabel:after { - color: #FF0366; - font-weight: 500; -} -.action-contact-new #content .main-content form label.formlabel{ - font-size: 14px; - margin-bottom: 5px; - color:#231f20; - font-weight: 300; -} - -.action-contact-new #content .main-content form .required-field .formlabel:after { - color: #FF0366; - font-weight: 500; -} - - -.action-contact-new .formfield textarea{ - background: none #FFFFFF; - border: 1px solid #DDDDDD; - color: #585858; - font-size: 16px; - width: 100%; - word-wrap: break-word; -} - -.action-contact-new #content .main-content form p .required-field { - max-width: 500px; - padding: 15px 20px; - margin: 20px 0 30px 0; - border: 1px dotted #ccc; - border-left: 5px solid #FF0366; - border-radius: 3px; - display: block; - background: #fff; - line-height: 20px; - font-size: 13px; -} \ No newline at end of file diff --git a/src/noosfero-spb-theme/css/footer.css b/src/noosfero-spb-theme/css/footer.css deleted file mode 100644 index c65eb10..0000000 --- a/src/noosfero-spb-theme/css/footer.css +++ /dev/null @@ -1,208 +0,0 @@ -/******************Footer-Rodapé**********************************/ -#theme-footer { - width: 100%; - min-width: 960px; -} - -#theme-footer a{ - color: #2c66ce; -} - -#theme-footer a:hover{ - color: #2c66ce; -} - -#theme-footer #footer-content { - background: #fff; -} - -#theme-footer #footer-logos { - background: #0042b2; - max-width: 100%; - padding: 2em 0; - height: 49px; -} - -#theme-footer #footer-logos > div { - max-width: 960px; - margin: 0 auto; -} - -#theme-footer #footer-logos a { - display: block; - height: 49px; - float: left; -} - -#theme-footer #footer-logos span { - display: none; -} - -#theme-footer #footer-logos .logo-acesso { - background: transparent url(images/acesso-a-informacao.png) center center no-repeat; - width: 107px; -} - -#theme-footer #footer-logos .logo-brasil { - background: transparent url(images/brasil.png) center center no-repeat; - width: 153px; -} - -#footer-logos .logo-sgpr { - background: transparent url(images/sgpr.png) center center no-repeat; - width: 187px; - margin-right: 30px; -} - -#theme-footer #footer-logos .institucionais { - float: right; -} - -#theme-footer #footer-license { - max-width: 960px; - margin: 0 auto; - text-align: left; - padding: 5px; -} - -#theme-footer #footer-license p { - color: #0d4094; - text-align: left; -} - -/***********Rodape Colab *********************/ - -#theme-footer footer{ - display:block -} - -#theme-footer footer { - background:#d5d5d5; -} - -#theme-footer footer .footer-atalhos { - background:#fff; - border-bottom: 2px; -} - -#theme-footer footer .container2{ - width: 100%; - margin-right:auto; - margin-left:auto; - *zoom:1; - max-width: 960px; -} - -#theme-footer .container2:before, -#theme-footer .container2:after { - display:table; - content:""; - line-height:0; -} - -#theme-footer .container2:after { - clear:both; -} - -#theme-footer .voltar-ao-topo { - margin-top: 1.915em; - text-align: right; -} - -#theme-footer footer .footer-atalhos a { - margin-right:12px -} - -#theme-footer footer .footer-atalhos .voltar-ao-topo a { - color:#717782; - padding-left: 20px; - background: url(images/voltar-topo.png) no-repeat left center; - color: #777; - font-size: 15px; -} - -#theme-footer footer .footer-atalhos .voltar-ao-topo a:hover { - text-decoration:underline; -} - -#theme-footer footer .row { - margin-bottom: 20px; - margin-left: auto; - *zoom: 1; - margin-right: auto; -} - -#theme-footer .row:before, -#theme-footer .row:after { - display: table; - content: ""; - line-height: 0; -} - -#theme-footer .row:after { - clear:both; -} - -#theme-footer footer nav { - border-left: 1px dotted #2c66ce; - padding: 0 5px 0 10px -} - -#theme-footer footer nav h2 { - font-size: 18px; - font-weight: bold; - color: #2c66ce; - line-height: 1.3em; - padding: 0px; - margin: 0 0 8px 0; -} - -#theme-footer footer nav ul { - margin-left: 0px; -} - -#theme-footer footer nav li { - display: block; - padding-bottom: 3px; -} - -#theme-footer footer nav a { - font-size: 13px; - color: #2c66ce; - line-height: 1.7em; - font-family: "open_sansregular", Arial, Helvetica, sans-serif; -} - -#theme-footer footer nav a:hover { - color: #2c66ce; - text-decoration: underline; -} - -#theme-footer footer .footer-menus { - padding-bottom: 10px; -} - -#theme-footer .span2 { - width: 104px; -} - -#theme-footer [class*="span"] { - float:left; - min-height: 1px; - margin-left: 30px; - margin-top: 30px; -} - -#theme-footer .span3 { - width:210px; -} - -#theme-footer .hide { - display:none; -} - -#theme-footer .visible-phone { - display:none !important; -} - -/*****fim footer Colab*****/ diff --git a/src/noosfero-spb-theme/css/header.css b/src/noosfero-spb-theme/css/header.css deleted file mode 100644 index 40a20d4..0000000 --- a/src/noosfero-spb-theme/css/header.css +++ /dev/null @@ -1,301 +0,0 @@ -#theme-header { - height: auto; -} - -.header-content * { - margin: 0; - padding: 0; - list-style: none; - vertical-align: baseline; -} - -.header-content li { display: inline; } - -.header-content #header { - padding: 15px 0 0 0; - color: #000; - background-color:#f0f2f1; - background-color:#ecedf1; - background-image: -webkit-radial-gradient(center, ellipse cover, #f0f2f1 1%, #ecedf1 100%) -} - -.header-content #header > div { - max-width: 960px; - min-width: 960px; - margin: 0 auto; -} - -.header-content #accessibility { - display: block; - float: left; - font-family: arial; - font-size: 10px; - width: 50%; -} - -.header-content #accessibility a { - margin-right: 8px; - color: #2c66ce; -} - -.header-content #accessibility span { - background: none repeat scroll 0 0 #2c66ce; - color: #FFFFFF; - padding: 0 3px; -} - -/* logo */ -.header-content #logo { - padding: 0; - float: left; - width: 50%; -} - -.header-content #logo span { - display: block; -} - -.header-content #logo a { - display: block; - width: 100%; - color: #03316f; - margin: 1em 0px; -} - -.header-content #logo a, -.header-content #logo #portal-title { - color: #03316f; -} - -.header-content #logo #portal-title { - background-image: url("../images/logotipo_spb_beta.svg"); - background-repeat: no-repeat; - background-size: 370px; - height: 78px; - width: 374px; - margin: 10px 0px 10px 0px; -} - -.header-content #logo #portal-description { - font-size: 1.2em; - text-transform: uppercase; -} - -/* Site Actions */ -.header-content #portal-siteactions { - display: block; - float: right; - clear: left; - padding-bottom: 2px; - margin-top: -15px; - font-size: 10px; - text-align: center; -} - -.header-content #portal-siteactions a { - color:#2c66ce; - text-decoration: none; - padding: 4px 0 4px 10px; - text-transform: uppercase; - font-family: 'open_sansregular', Arial, Helvetica, sans-serif; -} - -.header-content #portal-siteactions a:hover { - color: #03316f; -} - -.header-content #portal-siteactions li { - display: inline; - margin: 0 5px 0 0; - border-bottom: 1px dotted #2c66ce; -} - -.header-content #portal-siteactions li a { - padding: 4px 0px; -} - -.header-content #siteaction-accessibility, -.header-content #siteaction-contraste, -.header-content li#siteaction-mapadosite { - margin: 0px 48px 0px 0px; -} - -/* Top links */ -.header-content #header #sobre { - line-height: 30px; - font-size: 12px; - height: 30px; - clear: both; - background-color:#CFD0D2; - max-width: 100%; - margin: 0px auto; - text-align: right; - padding: 0 0 0 10px; - border-right: none; -} - -.header-content #sobre a { - color: #2c66ce; - font-family: 'Open Sans', Arial, Helvetica, sans-serif; -} - -.header-content #links-rapidos{ - width: 960px; - margin: 0 auto; - font-color:#fff; -} - -.header-content #link-faq a { - border-right: 1px solid #2c66ce; - padding: 0 10px; -} - -.header-content #link-contact a { - padding-left: 10px; -} - -/* Searchbox */ -.header-content .LSBox { - margin: 0; - padding: 0; - border: none; -} - -.header-content input.searchField { - -moz-appearance: none; -} - -.header-content #portal-searchbox { - clear: right; - float: right; - font-size: 80%; - margin: 30px 0 15px; - text-align: right; - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - border: 1px solid #CCCCCC; - background: #fff; - padding: 2px; -} - -.header-content #portal-searchbox .searchField { - padding: 0.45em; - border-right: none; - border: none; - width: 171px; -} - -.header-content #portal-searchbox form { - white-space: nowrap; -} - -.header-content #portal-searchbox label { - font-weight: normal; -} - -.header-content #searchGadget { - width: 13em; -} - -.header-content #header input.searchButton { - padding: 0.3em; - background: transparent; - text-indent: -2000px; - padding: 4px 15px; - border: none; -} - -.header-content #content input.searchField { - margin-bottom: 1em; -} - -.header-content #header input.searchButton { - background-image: url("../images/search-button.png"); - background-position: 8px 2px; - background-repeat: no-repeat; - background-color: #ffffff; -} - -.header-content #LSResult { - z-index: 1; - margin-top: 0.5%; -} - -/* Social Icons */ - -.header-content #social-icons { - float: right; - clear: right; - margin: 0px 0px 17px; -} - -.header-content #social-icons ul { - display: table-row; -} - -.header-content #social-icons li { - float: right; - width: 20px; - margin-left: 4px; - display: table-cell; -} - -.header-content #social-icons li a { - width: 20px; - height: 20px; - padding: 0px; - display: inline-block; - opacity: .85; - border: none; - background-repeat: no-repeat; -} - -.header-content #social-icons span { - display: none; -} - -.header-content #sb_face, -.header-content #sb_tweet, -.header-content #sb_youtb, -.header-content #sb_flickr { - background: url(images/icones_home_branco.jpg) 0px; -} - -.header-content #sb_flickr { - background-position: -100px; -} - -.header-content #sb_face { - background-position: -12px; -} - -.header-content #sb_tweet { - background-position: -42px; -} - -.header-content #sb_youtb { - background-position: -71px; -} - -.header-content #social-icons a:focus, -.header-content #social-icons a:hover { - opacity: 1; - filter: alpha(opacity=100); -} - -/* end of Social Icons */ - -/**** disable html****/ -#barra-psocial { - position: relative; - height: 40px; - margin: -3px 0px 0px 0px; - border: none; - background-color:rgb(236,237,241); -} - -#barra-psocial li { - float: left; -} -/********** end disable html *************/ diff --git a/src/noosfero-spb-theme/css/home-page.css b/src/noosfero-spb-theme/css/home-page.css deleted file mode 100644 index c6829e7..0000000 --- a/src/noosfero-spb-theme/css/home-page.css +++ /dev/null @@ -1,526 +0,0 @@ -/*** boxes sizes definition **/ -.action-home-index .box-1 { - margin: 0px 0px 0px 210px; - width: 490px; -} - -.action-home-index .box-3 { - width: 230px; -} - -/*** end of boxes sizes definition **/ - -/*** Box's patterns ***/ - -.action-home-index .block-outer{ - margin-bottom: 45px; -} - -/* Read More pattern */ - -.action-home-index #content .box .block-outer .read-more{ - border-bottom: none; - background: #eee; - font: normal normal normal 10px 'open_sansregular', arial, helvetica, sans-serif; - text-transform: uppercase; - text-align: right; -} - -.action-home-index #content .box .block-outer .read-more a{ - padding: 8px; - line-height: 20px; - color: #000000; - display: block; -} - -.action-home-index #content .box .block-outer .read-more a:hover{ - background: #dedede; -} - -.action-home-index #content .box .block-outer .read-more a::after{ - margin-left: 7px; - border-radius: 4px; - padding: 0px 5px 0px 8px; - line-height: 20px; - color: #FFFFFF; - font: 14px 'open_sansbold', arial, helvetica, sans-serif; - text-align: center; - content: url('../images/right-arrow.png'); -} - - -/*** end of box patterns ***/ - -/******************** Box-1 ********************/ - -/*** Software catalog search block **/ - -.action-home-index #content #catalogo-software-search{ - width: 100%; - background-color: #1A397D; - border-radius: 4px; -} - -.action-home-index #content #catalogo-software-search h1{ - margin: 0px 15px 10px 15px; - border-bottom: none; - padding: 10px 0px 0px 0px; - line-height: 1.3em; - color: #FFFFFF; - font: normal normal normal 22px 'open_sansregular', arial; - text-align: left; -} - -.action-home-index #content #catalogo-software-search #search-Gadget{ - margin: 0px 15px 9px 15px; - border: none; - border-radius: 4px; - padding: 7px; - width: 90%; -} - -.action-home-index #content #catalogo-software-search .searchButton-catalog{ - cursor: pointer; - margin: 0px 0px 15px 15px; - padding: 6px 25px; - border: 1px solid #FFFFFF; - border-radius: 4px; - background-color: #1A397D; - color: #FFFFFF; - font-weight: bold; - font-size: 14px; - text-transform: uppercase; -} - -.action-home-index #content #catalogo-software-search #search-catalog-footer{ - border-top: 1px solid; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - background-color: #192758; - color: #FFFFFF; -} - -.action-home-index #content #catalogo-software-search #search-catalog-footer p{ - margin: 0px; - font-size: 11px; - text-align: right; - text-transform: uppercase; -} - -.action-home-index #content #catalogo-software-search #search-catalog-footer a{ - padding: 7px 0px 12px 0px; - color: #FFF; - display: block; -} - -.action-home-index #content #catalogo-software-search #search-catalog-footer a:hover{ - background-color: #101A38; -} - -.action-home-index #content #catalogo-software-search #bt_catalog-search::after{ - margin: 0px 15px 0 5px; - border-radius: 4px; - padding: 0px 4px 0 7px; - top: 2px; - line-height: 20px; - background: #eee; - color: #172857; - font-size: 15px; - text-align: center; - position: relative; - content: url('../images/right-arrow-black.png'); -} - -/*** Softwares block **/ -.action-home-index #content .softwares-block{ - margin: 0px; - overflow: auto; -} - -.action-home-index #content .softwares-block .block-title{ - margin: 0px 0px 25px 0px; - border-top: 4px solid #2c66ce; - background: #eee; - color: #2c66ce; - font-weight: 300; -} - -.action-home-index #content .softwares-block .block-footer-content a{ - display:none; -} - -.action-home-index #content .software-block{ - width: 145px; - height: 218px; - margin: 0px 18px 14px 0px; -} - -.action-home-index #content .software-block .software-block-logo{ - border: 1px solid #ccc; - border-radius: 8px; - width: 140px; - height: 150px; - text-align: center; - overflow: hidden; - vertical-align: middle; - display: table-cell; -} - -.action-home-index #content .software-block .software-block-logo img{ - height: auto; - max-width: 90px; -} - -.action-home-index #content .software-block .software-block-info{ - height: 85px; - overflow: hidden; -} - -.action-home-index #content .software-block .software-block-title{ - height: 50px; - font-weight: 300; - font-size: 14px; - text-align: center; - overflow: hidden; -} - -.action-home-index #content .software-block .software-block-title h3{ - margin: 10px 0px 10px 0px; - color: #2C66CE; - font: normal normal 300 14px 'open_sansregular', arial, helvetica, sans-serif; -} - -.action-home-index #content .software-block-description{ - display: none; -} - -.action-home-index #content .software-block .software-block-finality, -.action-home-index #content .software-block .software-block-content{ - text-align: right; -} - -.action-home-index #content .software-block .software-block-finality{ - border: solid 1px #D7D7D7; - border-radius: 8px; - width:142px; - height: 216px; - left: 0px; - background-color: #f4f4f4; - text-transform: uppercase; -} - -.action-home-index #content .software-block .software-block-finality::after{ - margin: 0px 7px 0px 3px; - border-radius: 4px; - padding: 0 4px 0 7px; - line-height: 20px; - background: #2c65cd; - color: #FFF; - font-size: 15px; - text-align: center; - position: relative; - content: url('../images/right-arrow.png'); -} - -.action-home-index #content .software-block .software-block-finality p{ - margin: 0px 0px 7px 0px; - border-bottom: solid 1px #D7D7D7; - padding: 12px 12px 0px 12px; - height: 170px; - color: #172738; - font-size: 12px; - text-align: left; - text-transform: none; - overflow: hidden; -} - -/*** News block - display content block **/ - -.action-home-index #content .display-content-block .block-title{ - margin: 0px; - border-top: 4px solid #643C67; - background: #eee; - color: #643C67; - font-weight: 300; -} - -.action-home-index #content .display-content-block li{ - border-top: 1px solid #eee; - padding: 15px 0px 0px 0px; - min-height: 150px; -} - -.action-home-index #content .display-content-block li:first-child{ - border-top: 0px solid #eee; -} - -.action-home-index #content .display-content-block .published-at{ - padding: 0px 0px 15px 0px; - color: #643C67; -} - -.action-home-index #content .display-content-block .image{ - padding-right: 25px; - padding: 0px 25px 0px 0px; - border: 0px solid #c0c1c1; - width: 150px; - display: table-cell; -} - -.action-home-index #content .display-content-block .image a{ - border-radius: 8px; - height: 90px; - overflow: hidden; - display: block; -} - -.action-home-index #content .display-content-block .image img{ - border: 0px solid #c0c1c1; - max-width: 150px; -} - -.action-home-index #content .display-content-block .title{ - margin: 2px 0px 4px 0px; - padding-right: 0px; - max-height: 40px; - text-align: justify; - overflow: hidden; -} - -.action-home-index #content .display-content-block .title a{ - padding: 0px; - color: #172738; - font: normal normal bold 16px/1.3em arial, helvetica, sans-serif; -} - -.action-home-index #content .display-content-block .lead{ - max-height: 47px; - overflow: hidden; -} - -.action-home-index #content .display-content-block .lead a{ - color: #000000; - font: 15px/1.3em arial; -} - -.action-home-index #content .display-content-block .lead a:visited, -.action-home-index #content .lead a:visited, -.action-home-index #content .lead dl.portlet a:visited{ - color: #172738; -} - -.action-home-index #content .display-content-block .notice-info{ - display: table-cell; - vertical-align: top; -} - -.action-home-index #content .display-content-block .read_more{ - display: none; -} - -.action-home-index #content .display-content-block .read-more{ - border-top: 1px solid #643C67; -} - -.action-home-index #content .display-content-block .read-more a::after{ - background: #643C67; -} - -/******************** End Box-1 ********************/ - -/******************** Box-3 ********************/ - -/*** What Is block - Article block **/ - -.template-default .action-home-index #content .box-3 .article-block .block-title{ - border-top: 4px solid #08A649; - border-bottom: none; - padding: 6px 8px 22px 10px; - background: #eee; - color: #08A649; - font: normal normal 300 18px/1.3em 'open_sansregular', arial, helvetica, sans-serif; - text-align: left; - text-transform: none; -} - -.template-default .action-home-index #content .box-3 .article-block .read-more{ - margin-top: 30px; - border-top: 1px solid #08A649; -} - -.template-default .action-home-index #content .box-3 .article-block .read-more a::after{ - background: #08A649; -} - -.template-default .action-home-index #content .box-3 .article-block .short-post{ - padding-top: 23px; -} - -.template-default .action-home-index #content .box-3 .article-block p{ - margin: 0px 0px 14px 0px; - padding: 0px; - font: 15px/18px arial, helvetica, sans-serif; - text-align: left; - text-transform: none; -} - -/******* See As Well Block - Highlights block *******/ - -.action-home-index #content .highlights-block .block-title{ - display: none; -} - -.action-home-index #content .highlights-border{ - border: 1px solid #c0c1c1; - border-radius: 8px; - width: auto; - height: 248px; - max-height: 250px; - background-color: #e8e9ec; - background-image: linear-gradient( - 0deg, - transparent 45%, - #fff 55%); - background-size: 100% 100%; -} - -.action-home-index #content .highlights-container{ - border-radius: 8px; - border-width: 0px 0px 1px 0px; - border-bottom: none; - padding: 0; - width: 100% !important; - max-height: 230px; - background: transparent; - position: relative; - top: 0; -} - -.action-home-index #content .highlights-image-link{ - padding: 18px 0px 0px 0px; - border-radius: 0px 0px 8px 8px; - width: 220px; - max-height: 217px; - background-color: #fff; -} - -.action-home-index #content .highlights-image-link img{ - height: 100px; - max-width: 200px; -} - -.action-home-index #content .highlights-label{ - border-top: 4px solid #3b61a7; - padding: 23px 20px 46px 20px; - max-height: 60px; - width: 190px; - position: relative; - bottom: -18px; - background: #e8e9ec; - color: #172638; - text-align: center; - font: normal normal normal 16px/1.5em 'open_sansbold', arial, helvetica, sans-serif; - vertical-align: middle; -} - -.action-home-index #content .highlights-block-pager{ - float: none; - display: block; - text-align: center; -} - -.action-home-index #content .highlights-block-pager a{ - margin: 0 4px; - border-color: transparent; - border-radius: 50%; - height: 6px; - width: 6px; - background: #c0c1c1 center center no-repeat; - color: transparent; - text-indent: -5000px; - z-index: 1000; - overflow: hidden; - display: inline-block; -} - -.action-home-index #content .highlights-block-pager a.activeSlide{ - border-color: transparent; - background: #3e67b1; - color: transparent; -} - -/*** software highlights block ***/ - -.action-home-index #content a.toggle-popover, -.action-home-index #content a.toggle-popover:hover{ - margin: 0 0 0 55px; - color: #3867b7; - cursor: pointer; -} - -.action-home-index #content span.popover-span{ - padding: 1px 6px; - border-radius: 50%; - background-color: #3867b7; - color: #ffffff; - font-weight: bold; - cursor: pointer; -} - -/*** mais software block **/ -.action-home-index #content #mais-software-block{ - margin: 11px 0px; - border: 1px solid #c0c1c1; - border-radius: 8px; - padding: 5px 0px; - width: auto; - background-color: #eeeff1; - font: 14px arial; -} - -.action-home-index #content #mais-software-block #sbp-information-softwares h2{ - margin: 10px 0px 0px 0px; - padding: 0px 0px 17px 15px; - border-bottom: 1px solid #c0c1c1; - color: #454545; - font: normal normal normal 16px/21px 'open_sansbold', arial, helvetica, sans-serif; - text-align: left; - text-transform: uppercase; -} - -.action-home-index #content #mais-software-block #list-categories{ - margin: 14px 14px 14px 14px; -} - -.action-home-index #content #mais-software-block #list-categories p{ - margin: 0 0 16px 0; - color: #464A55; -} - -.action-home-index #content #mais-software-block #list-categories ul li{ - margin: 18px 5px 5px 5px; -} - -.action-home-index #content #mais-software-block #list-categories li a{ - color: #335277; - font-weight: bold; -} - -.action-home-index #content #mais-software-block #list-categories a:hover{ - text-decoration: none; -} - -.action-home-index #content #mais-software-block #footer-mais-software{ - margin: 0px; - border-top: 1px solid #c0c1c1; - padding: 10px 10px 0px 3px; - font-size: 11px; - text-align: right; - text-transform: uppercase; -} - -.action-home-index #content #mais-software-block #footer-mais-software a{ - color: #464A55; -} - -/******************** End Box-3 ********************/ diff --git a/src/noosfero-spb-theme/css/left-bar.css b/src/noosfero-spb-theme/css/left-bar.css deleted file mode 100644 index 873694e..0000000 --- a/src/noosfero-spb-theme/css/left-bar.css +++ /dev/null @@ -1,184 +0,0 @@ -/******************** Box-2 ********************/ - -/*** WARNING - WITHOUT BOX-4 ***/ - -.template-leftbar .box-2, -.template-default .box-2 { - width:150px; -} - -.template-leftbar #content .box-2 .block-outer .block-title, -.template-default #content .box-2 .block-outer .block-title { - background: #eee; - color: #4562b1; - border-top: 4px solid #4562b1; - line-height: 15px; -} - -/*** Menus - Link list block ***/ - -.template-leftbar #content .box-2 .link-list-block li, -.template-default #content .box-2 .link-list-block li { - margin: 0; - padding: 0; - border-bottom: 1px solid #ddd; - border-top: none; -} - -.template-leftbar #content .box-2 .link-list-block li a, -.template-default #content .box-2 .link-list-block li a { - width: auto; - padding: 6px 5px 8px 18px; - background-color: #fff; - background-position: 0px 50%; - color: #2C66CE; - border-right: none; - border-top: 0px solid #64946E; - border-radius: 0 0 0 0; - font-weight: normal; - font-size: 14px; - line-height: 17px; -} - -.template-leftbar #content .box-2 .link-list-block h3.empty + ul, -.template-default #content .box-2 .link-list-block h3.empty + ul { - border-top: 1px solid #ddd; -} - -.template-leftbar #content .box-2 .link-list-block h3.empty + ul li a, -.template-default #content .box-2 .link-list-block h3.empty + ul li a { - padding-left: 0px; - padding-right: 0px; - background-image: none; -} - -.template-leftbar #content .box-2 .link-list-block li a.link-this-page, -.template-leftbar #content .box-2 .link-list-block li a.link-this-page:hover , -.template-default #content .box-2 .link-list-block li a.link-this-page, -.template-default #content .box-2 .link-list-block li a.link-this-page:hover { - border-right: none; -} - -.template-leftbar #content .box-2 .link-list-block li a:hover, -.template-default #content .box-2 .link-list-block li a:hover { - background-color: #FFFFFF; - color: #000; -} - -.template-leftbar #content .box-2 .link-list-block li a.link-this-page, -.template-default #content .box-2 .link-list-block li a.link-this-page { - width: auto; - margin-left: 0px; - background-color: #ffffff; - font-weight: bold; -} - -/*** END OF WARNING - WITHOUT BOX-4 ***/ - -/*** WARNING - WITH BOX-4 ***/ - -/************ DUPLICATE ************ - - This part of the code is duplicated because, if there is - a change of layout from template-default to lefttopright - the CSS fit without many complication. - - */ - -.template-lefttopright .box-3 { - width:150px; -} - -.template-lefttopright #content .box-3 .block-outer .block-title { - background: #eee; - color: #4562b1; - border-top: 4px solid #4562b1; - line-height: 15px; -} - -/*** Menus - Link list block ***/ - -.template-lefttopright #content .box-3 .link-list-block li { - margin: 0; - padding: 0; - border-bottom: 1px solid #ddd; - border-top: none; -} - -.template-lefttopright #content .box-3 .link-list-block li a { - width: auto; - padding: 6px 5px 8px 18px; - background-color: #fff; - background-position: 0px 50%; - color: #2C66CE; - border-right: none; - border-top: 0px solid #64946E; - border-radius: 0 0 0 0; - font-weight: normal; - font-size: 14px; - line-height: 17px; -} - -.template-lefttopright #content .box-3 .link-list-block h3.empty + ul { - border-top: 1px solid #ddd; -} - -.template-lefttopright #content .box-3 .link-list-block h3.empty + ul li a { - padding-left: 0px; - padding-right: 0px; - background-image: none; -} - -.template-lefttopright #content .box-3 .link-list-block li a.link-this-page, -.template-lefttopright #content .box-3 .link-list-block li a.link-this-page:hover { - border-right: none; -} - -.template-lefttopright #content .box-3 .link-list-block li a:hover { - background-color: #FFFFFF; - color: #000; -} -.template-lefttopright #content .box-3 .link-list-block li a.link-this-page { - width: auto; - margin-left: 0px; - background-color: #ffffff; - font-weight: bold; -} - -/************ END OF DUPLICATE ************ - -/*** END OF WARNING - WITH BOX-4 ***/ - -/*** Statistics block **/ -.template-default #content .box-2 .statistics-block { - padding: 10px 0px 10px 10px -} - -.statistics-block-data ul { - margin-top: 10px; -} - -.statistics-block-data ul li { - margin-left: 18px; - margin-top: 6px; - line-height: 17px; -} - -.statistics-block-data ul li.users span { - font-size: 14px; -} - -span.amount { - font-size: 14px; - font-weight: 700; -} - -span.label { - font-size: 14px; -} - -/*** end of statistics block **/ - -/*** WARNING - WITH BOX-4 ***/ - -/******************** end Box-2 ********************/ diff --git a/src/noosfero-spb-theme/css/main-content.css b/src/noosfero-spb-theme/css/main-content.css deleted file mode 100644 index 56307fb..0000000 --- a/src/noosfero-spb-theme/css/main-content.css +++ /dev/null @@ -1,174 +0,0 @@ -/*** Box ***/ - -.no-boxes .block { - margin-top: 50px; -} - -#content .box-2 .block-outer .block, -#content .box-3 .block-outer .block{ - margin-bottom: 45px; - clear: both; -} - -/*** Block Title ***/ -#content .block-outer .block-title { - padding: 5px 8px 18px 7px; - margin: 0px 0px 2px 0px; - background: #eee; - border-bottom: none; - font-size: 12px; - font-family: "open_sansbold", Arial, Helvetica, sans-serif; - font-variant: normal; - text-transform: uppercase; - text-align: left; - font-weight: 300; -} - -#content .box-1 .block-title { - padding: 5px 8px 20px 10px; - font-size: 18px; - font-family: "open_sansregular", Arial, Helvetica, sans-serif; - text-transform: none; -} - -/*** Pagination ***/ - -#content .pagination { - margin: 48px auto 30px auto; - border-top: 0 none; - font-family: "open_sansregular", Arial, Helvetica, sans-serif; -} - -#content .pagination a, -#content .pagination em, -#content .pagination span{ - padding: 5px 9px; - margin-right: 4px; - color: #172738; - border: 1px solid #D3D6DE; - border-radius: 4px; - letter-spacing: 0.6px; - font-size: 12px; - font-weight: 700; - text-decoration: none; - display: inline-table; -} - -#content .pagination .current { - background-color: #ECEDF1; - font-style: normal; -} - -#content .pagination .previous_page{ - float: left; -} - -#content .pagination .next_page{ - float: right; -} - -#content .pagination .previous_page, -#content .pagination .next_page{ - width: auto; - position: relative; - background-image: none; - font-weight: 500; -} - -#content .pagination .disabled{ - opacity: 0.5; -} - -/*** Button ***/ - -#content .button-bar a.button, -#content .button-bar input { - margin: 0 10px 10px 0; -} - -#content a.button.with-text{ - height: 32px; - padding: 5px 15px; - background: #FFF none; - color: #3E67B1; - border-radius: 4px; - border: 1px solid #3E67B1; - font-size: 14px; - line-height: 32px; - text-transform: uppercase; -} - -#content #article-actions a.button.with-text{ - display: inline-block; - height: 18px; - padding: 5px 10px; - margin-bottom: 5px; - background: #FFF none; - color: #3E67B1; - border-radius: 4px; - border: 1px solid #3E67B1; - font-size: 12px; - line-height: 18px; - text-transform: none; -} - -#content #article-actions a.button.with-text span{ - padding: 0; -} - -.action-profile-members #content .button-bar a.button.with-text{ - height: auto; - border: 1px solid #D3D6DE; - font-size: 12px; - line-height: normal; - text-transform: none; -} -.action-profile-members #content .page-profile-header a.button.with-text{ - border:none; -} -.action-profile-members #content .button-bar a.button.with-text:hover{ - border-color: #3E67B1; -} - -#content form input.button.with-text{ - height: 42px; - max-height: 42px; - padding: 5px 15px; - background: #FFF none; - color: #3E67B1; - border-radius: 4px; - border: 1px solid #3E67B1; - font-size: 14px; - line-height: 32px; - text-transform: uppercase; -} - -#content a.button:hover, -#content #article-actions a.button.with-text:hover, -#content input.button.with-text:hover{ - background-color: #3E67B1; - color: #FFF; -} - -/* This is a temporary solution until noosfero deals with logged-out comments in a better manner. */ -.comment-replies .comment-logged-out .comment-text, -.comment-logged-out .comment-picture, -.comment-logged-out h4 { - opacity: 1.0; -} - -.comment-logged-out .comment-text, -.comment-info { - color: black; -} -/**/ - -/* Temporary solution to code block in tutorial page. */ -.article-body td { - background-color: white; -} - -.article-body td:hover { - background-color: white; -} -/* End of temporary solution to code block in tutorial page. */ diff --git a/src/noosfero-spb-theme/css/news-page.css b/src/noosfero-spb-theme/css/news-page.css deleted file mode 100644 index 26d9720..0000000 --- a/src/noosfero-spb-theme/css/news-page.css +++ /dev/null @@ -1,215 +0,0 @@ -/*** News Page's homepage ***/ - -/** Header's Block **/ -.profile-name-is-spb #article #article-toolbar #article-header h1.title, -#content .blog #article-header h1.title{ - margin: 20px 0px 10px 0px; - padding: 0px 0px 10px 0px; - border-bottom: 1px solid #D3D6DE; - font: normal normal bold 35px/37px arial; -} - -/* WARNING: - * This solution is TEMPORARY. This informations shouldn't exist - * in this area. - * - * TODO: Remove this informations of the html and, then, from here. - */ - -#article-toolbar a.button.icon-feed.blog-feed-link { - display: none; -} - -/* WARNING: - * This solution is TEMPORARY. This informations shouldn't exist - * in this area. - * - * TODO: Remove this informations of the html and, then, from here. - */ -#content .blog #article-header .publishing-info .date, -#content .blog #article-header .publishing-info .author, -#content .blog #article-header .publishing-info .comments { - display: none; -} - - -/** General Properties of News **/ -#content .blog .article-body p { - margin: 0px 0px 5px 0px; - max-height: 25px; - color: #172738; - text-align: left; - text-overflow: ellipsis; - font: 14px/21px arial; - overflow: hidden; -} - -#content .blog .publishing-info { - display: inline; -} - -#content .blog .blog-post { - margin: 0 auto; - border-bottom: 1px solid #ccc; - padding: 25px 0px 0px 0px; - background: none; -} - -#content .blog .blog-post h1.title { - margin: 0px 0px 10px 0px; - padding: 0px 0px 0px 0px; - max-width: 555px; - max-height: 40px; - border: none; - font: normal normal bold 16px/20px arial; - overflow: hidden; - display: inline-block; -} - -#content .blog .blog-post h1.title a { - color: black; -} - -/* WARNING: - * This solution is TEMPORARY. This informations shouldn't exist - * in this area. - * - * TODO: Remove this informations of the html and, then, from here. - */ -#content .blog .blog-post .author { - display: none; -} - -#content .blog .blog-post .publishing-info { - border-top: none; - color: #172838; - font: 13px/21px arial; -} - -#content .blog .blog-post .publishing-info .date { - margin: 0px 0px 5px 0px; - display: block; -} - -#content .blog .blog-post .post-pic { - margin: 0px 20px 5px 0px; - border-radius: 4px; - height: 80px; - width: 20%; - background: center/cover no-repeat; - float: left; -} - -#content .blog .blog-post .short-post { - max-height: 35px; - text-align: justify; - text-overflow: ellipsis; - overflow: hidden; -} - -/* WARNING: - * This solution is TEMPORARY. This informations shouldn't exist - * in this area. - * - * TODO: Remove this informations of the html and, then, from here. - * The correct is the text is sensitive to lead to the complete text. - */ -#content .blog .blog-post .read-more { - display: none; -} - -#content .blog #article-actions:last-child { - border-top: none; -} -/** end of General Properties of News **/ - - -/** Main News' Block **/ -#content .blog .page-1 .position-1 { - padding: 0px 0px 0px 0px; -} - -#content .blog .page-1 .position-1 .title a { - line-height: 37px; - color: #172738 !important; - font-size: 34px; -} - -#content .blog .page-1 .position-1 .post-pic { - margin: 0px 0px 13px 0px; - max-height: 320px; - height: 320px; - width: 100%; -} - -#content .blog .page-1 .position-1 .short-post { - max-height: 50px; -} - - -/** Secondary News' Block **/ -#content .blog .page-1 .position-2, -#content .blog .page-1 .position-3, -#content .blog .page-1 .position-4 { - margin: 0px 0px 0px 0px; - padding: 20px 21px 45px 0px; - height: 235px; - width: 30.5%; - display: block; - float: left; -} - -#content .blog .page-1 .position-2 p, -#content .blog .page-1 .position-3 p, -#content .blog .page-1 .position-4 p { - max-height: 45px; -} - -#content .blog .page-1 .position-4 { - margin: 0px; - padding-right: 0px; -} - -#content .blog .page-1 .position-2 .post-pic, -#content .blog .page-1 .position-3 .post-pic, -#content .blog .page-1 .position-4 .post-pic { - margin-top: 12px; - top: 10px; - height: 120px; - width: 100%; -} - -#content .blog .page-1 .position-4 .post-pic { - margin-right: 0px; -} - -#content .blog .page-1 .position-2 .short-post, -#content .blog .page-1 .position-3 .short-post, -#content .blog .page-1 .position-4 .short-post { - max-height: 50px; - color: #172738; - text-align: justify; - text-overflow: ellipsis; - overflow: hidden; -} - - - -/** Lastest News' Block ***/ - -/* This rule serves to maintain the element in position-5 clear the - * configurations of float. - */ -#content .blog .blog-post.position-5 { - clear: both; -} - -/** Pagination **/ - -#content #article .pagination .next_page{ - position: relative; - -} - - -/*** end of News Page's homepage ***/ diff --git a/src/noosfero-spb-theme/css/overwriting-base-theme.css b/src/noosfero-spb-theme/css/overwriting-base-theme.css deleted file mode 100644 index 8b3903a..0000000 --- a/src/noosfero-spb-theme/css/overwriting-base-theme.css +++ /dev/null @@ -1,204 +0,0 @@ -/************overwriting themes/base/style.css****************/ -#wrap-1, #theme-footer { - margin: auto; - width: 100%; -} - -#wrap-2 { - width: 960px; - margin: 0 auto; - border: none; - padding: 0px; -} - -#main { - background: #fff; - font-size: 1.3em; - padding: 1em 0; - max-width: 960px; - margin: 0 auto; -} - -#wrapper { - margin: 0 auto; - font-size: 1.2em; - width: 100%; -} - -.main-content { - border-style: none; - box-shadow: none; - padding: 10px 20px; -} - -.profile-image-block .admin-link { - font-size: 100%; -} - -/* ==> blocks.css <== */ - -.block a { - color: #555753; -} -.block a:visited { - color: #888a85; - font-weight: normal; -} -.block a:hover { - color: #2e3436; - text-decoration: none; -} - -/* Title Header */ -#content .main-block h1, -#content .main-block h2, -#content .main-block h3, -#content .main-block h4 { - font-family: Arial, Helvetica, sans-serif; -} - -#content .main-block h1, -#not-found h1, -#access-denied h1, -#content .no-boxes h1 { - margin: 20px 0 10px 0; - padding: 0; - color: #172738; - border-bottom: none; - font-family: Arial; - font-size: 34px; - font-weight: bold; - font-variant: normal; - line-height: 37px; -} - -#content .title { - font-weight: normal; - padding-right: 70px; -} - -#content .main-block h3 { - font-size:18px; - line-height: 21px; -} - -/****************************************/ - -/*recent documents - everywhere on site*/ -#content .recent-documents-block ul { - margin-left: 0; - padding: 0; -} - -#content .recent-documents-block li { - background: none repeat scroll 0 0 #eeeff2; - border-bottom: 1px solid #c0c1c1; - display: block; - margin: 0; - min-height: 1em; - padding: 20px; - text-align: left; -} - -#content .recent-documents-block li a { - color: #464A55; - line-height: 1.2em; -} -#content .recent-documents-block li a:hover{ - color: #000; -} - -#content .recent-documents-block .block-title { - border-bottom: 1px solid #757575; - margin-bottom: 0; -} - - -#site-title { - position: absolute; - left: 8px; - top: -160px; - height: 78px; - width: 480px; - display: none; -} - -#content { - left: -480px; - margin-left: 50%; - margin-top: 38px; - position: relative; - width: 960px; -} - - -input.button.with-text { - background-position: 3px 50%; - font-size: 12px; - padding: 0 2px 2px 20px; - max-height: 28px; -} - -#content a.button.with-text, -#content a.button.with-text { - height: 28px; - max-height: 28px; -} -#content input.button, #content a.button { - background-color: #EEEEEE; - background-repeat: no-repeat; - border: 0px solid #CCCCCC; - color: #555555; - line-height: 16px; - text-decoration: none; -} - -#content #article-actions input.button, -#content #article-actions a.button, -#content a.button, -#content input.button { - background-color: transparent; - border: 1px solid #CCCCCC; - vertical-align: middle; -} - -#content a.button.with-text { - line-height: 28px; - height: 30px; - max-height: 30px; -} - -#content form input.button.submit { - height: 32px; - max-height: 32px; - margin-right: 5px; -} -#content #article-actions input.button:hover, -#content #article-actions a.button:hover { - background-color: #ccc; - border: 1px solid #CCCCCC; - color: white; -} - -#content a.button:hover { - border: 1px solid #CCCCCC; -} - -/*label of search's radio buttons*/ -#content .search-field label { - display: inline-block; - font-size: 12px; - vertical-align: middle; - margin-left: 5px; -} - -#public-profile-search .formfield, #public-profile-search .submit { - margin-bottom: 5px; -} - -#content .profile ul{ - margin-left: 1em; -} - -/*********************end of overwritting themes/base/style.css*********************************/ - diff --git a/src/noosfero-spb-theme/css/popover.css b/src/noosfero-spb-theme/css/popover.css deleted file mode 100644 index 905383b..0000000 --- a/src/noosfero-spb-theme/css/popover.css +++ /dev/null @@ -1,191 +0,0 @@ -.popover { - position: absolute; - top: 0; - left: 0; - z-index: 1060; - display: none; - max-width: 276px; - padding: 1px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - font-style: normal; - font-weight: normal; - line-height: 1.42857143; - text-align: left; - text-align: start; - text-decoration: none; - text-shadow: none; - text-transform: none; - letter-spacing: normal; - word-break: normal; - word-spacing: normal; - word-wrap: normal; - white-space: normal; - background-color: #fff; - -webkit-background-clip: padding-box; - background-clip: padding-box; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, .2); - border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2); - box-shadow: 0 5px 10px rgba(0, 0, 0, .2); - - line-break: auto; -} -.popover.top { - margin-top: -12px; -} -.popover.right { - margin-left: 10px; -} -.popover.bottom { - margin-top: 10px; -} -.popover.left { - margin-left: -10px; -} -.popover-title { - padding: 8px 14px; - margin: 0; - font-size: 14px; - background-color: #f7f7f7; - border-bottom: 1px solid #ebebeb; - border-radius: 5px 5px 0 0; -} -.popover-content { - padding: 9px 14px; -} -.popover > .arrow, -.popover > .arrow:after { - position: absolute; - display: block; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} -.popover > .arrow { - border-width: 11px; -} -.popover > .arrow:after { - content: ""; - border-width: 10px; -} -.popover.top > .arrow { - bottom: -11px; - left: 50%; - margin-left: -11px; - border-top-color: #999; - border-top-color: rgba(0, 0, 0, .25); - border-bottom-width: 0; -} -.popover.top > .arrow:after { - bottom: 1px; - margin-left: -10px; - content: " "; - border-top-color: #fff; - border-bottom-width: 0; -} -.popover.right > .arrow { - top: 50%; - left: -11px; - margin-top: -11px; - border-right-color: #999; - border-right-color: rgba(0, 0, 0, .25); - border-left-width: 0; -} -.popover.right > .arrow:after { - bottom: -10px; - left: 1px; - content: " "; - border-right-color: #fff; - border-left-width: 0; -} -.popover.bottom > .arrow { - top: -11px; - left: 50%; - margin-left: -11px; - border-top-width: 0; - border-bottom-color: #999; - border-bottom-color: rgba(0, 0, 0, .25); -} -.popover.bottom > .arrow:after { - top: 1px; - margin-left: -10px; - content: " "; - border-top-width: 0; - border-bottom-color: #fff; -} -.popover.left > .arrow { - top: 50%; - right: -11px; - margin-top: -11px; - border-right-width: 0; - border-left-color: #999; - border-left-color: rgba(0, 0, 0, .25); -} -.popover.left > .arrow:after { - right: 1px; - bottom: -10px; - content: " "; - border-right-width: 0; - border-left-color: #fff; -} - -/*** popover in software highlights block ***/ - -.highlights-popover { - max-width: 280px; - margin: 0 0 0 -75px; - background: #172638; - color: #FFFFFF; -} - -.highlights-popover .popover-content { - padding: 0; -} - -.highlights-popover p { - padding: 13px 13px 15px; - margin: 0px; - font-size: 14px; - line-height: 20px; -} - -.highlights-popover span { - font-weight: bold; - border-bottom: 1px dotted #FFFFFF; -} - -#content .highlights-popover a, -#content .highlights-popover a:visited, -#content .highlights-popover a:hover, -#content .highlights-popover a:link { - font-weight: bold; - color: #FFFFFF; - display: block; - padding: 8px 15px; - border-top: 1px dotted rgba(255,255,255,0.1); -} - -.highlights-popover a:before { - font-family: "FontAwesome"; - content: "\f067"; - vertical-align: middle; - color: #ff0066; - padding: 0 5px 0 0; -} - -.highlights-popover.top > .arrow, -.highlights-popover.right > .arrow, -.highlights-popover.bottom > .arrow, -.highlights-popover.left > .arrow { - margin-left: 64px; -} - -.highlights-popover.top > .arrow:after, -.highlights-popover.right > .arrow:after, -.highlights-popover.bottom > .arrow:after, -.highlights-popover.left > .arrow:after { - border-top-color: #172638; -} diff --git a/src/noosfero-spb-theme/css/search-pages.css b/src/noosfero-spb-theme/css/search-pages.css deleted file mode 100644 index fb05e26..0000000 --- a/src/noosfero-spb-theme/css/search-pages.css +++ /dev/null @@ -1,115 +0,0 @@ -/*** Search Community ***/ - -.action-search-index #content form #search-header, -.action-search-people #content form #search-header, -.action-search-communities #content form #search-header{ - margin-top: 5px; - float: right; - border: none; -} - -.action-search-people #content form #search-header #search-filters .sod_select, -.action-search-communities #content form #search-header #search-filters .sod_select{ - color: #3E67B1; - border: 1px solid #3E67B1; - border-radius: 4px; - font-family: Arial; - font-variant: normal; - font-weight: 300; - box-shadow: none; -} - -.action-search-people #content form #search-header #search-filters .sod_select .sod_list, -.action-search-communities #content form #search-header #search-filters .sod_select .sod_list{ - margin: -2px 0 0 -1px; - color: #3E67B1; - border: 1px solid #3E67B1; - border-top: none; - border-radius: 0px 0px 4px 4px; - font-family: Arial; - font-variant: normal; - font-weight: 300; -} - -.action-search-people #content form #search-header #search-filters .sod_select .sod_list .active, -.action-search-communities #content form #search-header #search-filters .sod_select .sod_list .active{ - border-radius: 0px 0px 4px 4px; -} - -.action-search-people #content form #search-header #search-filters .sod_select .sod_list .selected, -.action-search-communities #content form #search-header #search-filters .sod_select .sod_list .selected{ - padding-right: 21px; -} - -.action-search-people #content form #search-subheader .sod_select, -.action-search-communities #content form #search-subheader .sod_select{ - line-height: 15px; -} - -.action-search-index #content form .search-field, -.action-search-people #content form .search-field, -.action-search-communities #content form .search-field{ - margin-bottom: 30px; -} - -.action-search-index #content form .search-field .formfield, -.action-search-people #content form .search-field .formfield, -.action-search-communities #content form .search-field .formfield{ - float: left; - width: 99%; -} -.action-search-index #content form .search-field .formfield input, -.action-search-people #content form .search-field .formfield input, -.action-search-communities #content form .search-field .formfield input{ - margin-top: 0px; - padding: 6px; - height: 19px; - max-height: 19px; - max-width: 98%; - background: none; - border: 1px solid #ccc; - border-radius: 4px; -} - -.action-search-index #content form input.button.submit, -.action-search-people #content form input.button.submit, -.action-search-communities #content form input.button.submit{ - height: 32px; - margin-top: 8px; - padding: 5px 15px; - background: #3E67B1 none; - color: #FFF; - border-radius: 4px; - border: 1px solid #3E67B1; - font-size: 14px; - line-height: 14px; - text-transform: uppercase; -} - -.action-search-index #content form input.button.submit:hover, -.action-search-people #content form input.button.submit:hover, -.action-search-communities #content form input.button.submit:hover{ - background: #5E82C6; -} - -.action-search-people #search-results .search-results-type-people, -.action-search-communities #search-results .search-results-type-community{ - background: none; - border: 1px solid #ccc; - border-radius: 10px; -} - -.action-search-index #search-results h3{ - margin: 20px 0 10px 0; - color: #172738; - font-size:18px; - line-height: 21px; - font-family: Arial; - font-weight: 700; - font-variant: normal; -} - -.action-search-index #search-results .search-results-innerbox{ - background: none; - border: 1px solid #ccc; -} diff --git a/src/noosfero-spb-theme/css/software-catalog-page.css b/src/noosfero-spb-theme/css/software-catalog-page.css deleted file mode 100644 index 2b32cd0..0000000 --- a/src/noosfero-spb-theme/css/software-catalog-page.css +++ /dev/null @@ -1,426 +0,0 @@ -/*** Title and subtitle ***/ - -.action-search-software_infos #content { - margin-top: 10px; - padding: 0px; -} - -.action-search-software_infos .main-content { - border: none; - box-shadow: none; -} - -.action-search-software_infos #content .main-content h2{ - color: #FF0366; - font-size: 16px; - font-family: "open_sansregular",Arial, Helvetica,sans-serif; - font-weight: 300; - text-transform: uppercase; -} - -.action-search-software_infos #content .main-content h1{ - padding: 5px 0 10px 0; - border-bottom: 1px solid #D3D6DE; - font-family: Arial, Helvetica, sans-serif; - font-size: 35px; - font-variant: normal; -} - -/*** end of title and subtitle ***/ - -/*** Search Box ***/ -.action-search-software_infos .search-form { - margin-top:28px; - padding: 0; - background: #ecedf1; - border-radius: 4px; - border: 1px solid #D3D6DE; - background-image:url("catalogo.png"); -} - -.action-search-software_infos #software-search-container .search-form h3{ - margin: 0px 0px 3px 0px; - padding: 16px 0 20px 14px; - color: #2C4B6B; - font-family:"open_sansregular", Arial, Helvetica, sans-serif; - color: #2B51A8; - font-weight: bold; - font-size: 15px; - text-transform: uppercase; -} - -/*.action-search-software_infos #content .search-form .project-software { - margin: 0 0 0 15px; -} - - It's TEMPORARY -.action-search-software_infos #content .search-form .doubts-catalog-software { - display: none; -}*/ - -/**Radio Buttons***/ -.action-search-software_infos #public_software_radio_button, -.action-search-software_infos #all_radio_button { - margin:5px 4px 15px 15px; - line-height: 20px; - position:absolute; -} -.action-search-software_infos .search-form label, -.action-search-software_infos .search-form label{ - margin:0px 3px 4px 32px; - line-height: 22px; - font-size: 15px; - font-family: Arial; -} - -.action-search-software_infos #software-search-container .search-form .doubts-catalog-software{ - border:1px solid #3E67B1; - border-radius:50%; - padding:0px 3px; - font-size: 14px; - font-weight: 900; - background:#3E67B1; - color:#fff; - font-family: Arial; - cursor: pointer; -} -/******/ - -.action-search-software_infos #content .search-form .search-field .formfield { - width: 100%; - margin: 0; - padding: 0; -} - -.action-search-software_infos #content .search-form .search-field #search-input { - width: 96%; - margin: 13px 0px 4px 13px; - padding: 7px; - background: #FFF; - border-radius: 4px; - border: 1px solid #D3D6DE; - font-size: 14px; -} - - -.action-search-software_infos #content .search-form .search-field input.button{ - padding: 0px; - background-color: #3E67B1; - color: #FFF; - border: 1px solid #3E67B1; - font-family: "open_sansbold",Arial,sans-serif; - border-radius: 4px; -} - -.action-search-software_infos #content .search-form .search-field input.button.submit { - width: auto; - height: 30px; - max-height: 30px; - margin: 14px; - padding: 0 14px 0 14px; - background: #3E67B1; - line-height: 14px; - border-radius: 4px; - color: #ffffff; - text-transform: uppercase; - font-family: "open_sansbold",Arial,sans-serif; - font-size: 14px; -} - -/* Filter options */ - -.action-search-software_infos #filter-catalog-software { - background-color: #D3D6DE; -} - -.action-search-software_infos #filter-option-catalog-software { - cursor: pointer; - padding: 14px; - background-color: #D3D6DE; - border: none; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - font-size: 11px; - text-align: right; - text-transform: uppercase; -} - -.action-search-software_infos #filter-option-catalog-close { - padding: 7px 7px 17px 10px; - display: none; -} -.action-search-software_infos #filter-option-catalog-software:hover { - background-color: #c7c7c7; -} - -.action-search-software_infos #filter-option-catalog-software:after { - content: ""; - margin-left: 5px; - padding: 3px 10.5px; - background: url("../images/bottom-arrow.png") no-repeat center; - background-color: #3E67B1; - border-radius: 4px; -} - -.action-search-software_infos #filter-catalog-software #filter-categories-option { - border: none; - height: 0; - max-height: 620px; - position: relative; - overflow: hidden; - padding: 0 15px; -} - -.action-search-software_infos #filter-catalog-software #filter-categories-catalog h4 { - margin: 20px 0 10px 5px; - background: transparent; - color: black; -} - -.action-search-software_infos #filter-catalog-software input[type="checkbox"]{ - vertical-align: middle; - margin: 0 3px 2px 8px; -} - -.action-search-software_infos #group-categories ul { - font-family: Arial; - font-size: 14px; - line-height: 31px; - columns: 2; - -webkit-columns: 2; - -moz-columns: 2; -} - -.action-search-software_infos #group-categories li span { - font-family: Arial; - font-size: 14px; -} - -.action-search-software_infos #filter-catalog-software .project-software{ - margin: 20px 0 30px; - border-top: 1px dotted; - border-bottom: 1px dotted; - font-weight: bold; - font-size: 15px; - font-family: Arial; - padding: 10px; -} - -.action-search-software_infos #filter-catalog-software .project-software label { - font-weight: normal; -} - -.action-search-software_infos #filter-catalog-software .project-software span { - padding: 2px 6px; - background: #FFF; - color: #3E67B1; - border-radius: 50%; - font-size: 16px; -} - -.action-search-software_infos button#cleanup-filter-catalg { - cursor: pointer; - background-color: #3E67B1; - font-size: 14px; - font-family: Arial; - color: #ffffff; - border: 1px solid #2B65CD; - border-radius: 4px; - margin: 5px 0 0 5px; - padding: 5px 10px; -} - -.action-search-software_infos button#close-filter-catalog { - cursor:pointer; - float: right; - border: none; - background: none; - font-size: 12px; - margin-top: 5px; - color: #000; - text-transform: uppercase; - padding: 5px; -} - -.action-search-software_infos button#close-filter-catalog:after { - content: ""; - margin-left: 5px; - padding: 2.5px 10.5px; - background: url("../images/top-arrow.png") no-repeat center; - background-color: #3E67B1; - border-radius: 4px; -} - -/*** end of search box ***/ - -/*** Catalog Options ***/ - -.action-search-software_infos #catalog-display-options { - font-size: 14px; - font-family: Arial; -} - -.action-search-software_infos #catalog-display-options #catalog-display-options-count{ - padding: 45px 0 4px 0; - float: left; - width: 50%; -} - -.action-search-software_infos #catalog-display-options #catalog-display-options-show-and-sort{ - padding: 38px 0 5px 0; - font-weight: bold; - float: left; - width: 50%; -} -.action-search-software_infos #catalog-display-options #catalog-display-options-sort, -.action-search-software_infos #catalog-display-options #catalog-display-options-show{ - position: relative; - float: left; - width: 50%; - text-align: right; -} - -/*** Search Results ***/ -.action-search-software_infos #search-results { - border-top: 1px solid #d7d7d7; -} - -.action-search-software_infos #search-results.only-one-result-box .search-software-item { - padding: 29px 0 31px 0; - background: #ffffff; - border-bottom: 1px solid #d7d7d7; -} - -.action-search-software_infos #search-results #search-results-empty{ - padding: 15px 0px; - color: #172738; - font-size: 16px; - text-align: left; -} - - -.action-search-software_infos #search-results .search-results-innerbox { - background: #ffffff; - border: none; -} - -/* Column left */ - -.action-search-software_infos #search-results .search-software-item-column-left{ - width: 130px; - height: 130px; - float: left; - border-right: 1px dotted #ccc; -} - -.action-search-software_infos #search-results .search-software-item-column-left .vcard { - display: table; - margin: 0; - border: none; -} - -.action-search-software_infos #search-results .search-software-item-column-left .vcard:hover { - border: none; - background: none; -} - -.action-search-software_infos #search-results .search-software-item-column-left .vcard a:hover{ - color: #3E67B1; -} - -.action-search-software_infos #search-results .search-software-item-column-left .vcard a.profile_link{ - float:left; -} - -.action-search-software_infos #search-results .search-software-item-column-left .vcard:hover .menu-submenu-trigger { - display:none; -} - -.action-search-software_infos #search-results .search-software-item-column-left .profile-image{ - width: 130px; - height: 130px; - margin-left: 130px; - margin-top: 35px; -} - -.action-search-software_infos #search-results .search-software-item-column-left .vcard img { - max-width: 90px; - max-height: 130px; - height: auto; - margin-left:170px; -} - -.action-search-software_infos #search-results .search-software-item-column-left .org { - display: none; -} - -.action-search-software_infos #search-results .search-software-item-column-left .extra_info { - width: 130px; - padding-right: 20px; - top: 0px; - position: absolute; - color: #2C4B6B; - font-size: 13px; - font-family: Arial; - text-align: left; - opacity: inherit; -} - -.action-search-software_infos #search-results .search-software-item-column-left .extra_info::before{ - content: url("../images/ic-calendar.png"); - margin-right: 10px; - margin-top: 6px; - float: left; -} - -/* Column Right */ - -.action-search-software_infos #search-results .search-software-item-column-right { - width: 70%; - float: left; - margin-left: 130px; - padding: 0 0 0 8px; - font-size: 15px; - font-family: Arial; -} - -.action-search-software_infos #search-results .search-software-item-column-right .search-software-content-block h4{ - margin-top: 0; -} - -.action-search-software_infos #search-results .search-software-item-column-right .search-software-content-block h4 a { - color: #172738; - font-size: 19px; -} - -.action-search-software_infos #search-results .search-software-item-column-right .search-software-content-block:last-child { - margin-top: 30px; -} - -.action-search-software_infos #search-results .search-software-item-column-right span{ - width: 100%; -} - -.action-search-software_infos #search-results .search-software-item-column-right span b{ - font-weight: normal; - font-size: 13px; -} - -.action-search-software_infos #search-results .search-software-item-column-right .search-software-content-block:last-child span{ - width: auto; - float: left; -} - -.action-search-software_infos #search-results .search-software-content-block #categories-list li{ - width: auto !important; /* force overwritting from base */ - margin-left: 7px !important; /* force overwritting from base */ - float: left; - color: #3E67B1; - font-size: 13px; - line-height: 18px; - text-decoration: underline; -} - -.action-search-software_infos #search-results .search-software-content-block #categories-list li a{ - color: #3E67B1; -} diff --git a/src/noosfero-spb-theme/css/software-pages.css b/src/noosfero-spb-theme/css/software-pages.css deleted file mode 100644 index dd914a7..0000000 --- a/src/noosfero-spb-theme/css/software-pages.css +++ /dev/null @@ -1,623 +0,0 @@ -/*** Software Header ***/ -/*block title software button control painel*/ -.action-content_viewer-view_page #content .software-information-block .admin-link a{ - padding: 5px 10px; - background: #3E67B1; - border-radius: 4px; - text-transform: none; - font-size: 12px; - margin-top:15px; - color:#fff; -} -.action-content_viewer-view_page #content .software-information-block .profile-big-image img{ - margin-bottom:20px; -} -/**************************/ - -#content .software-information-block { - margin: 0px 0px 60px 0px; -} - -#content #software-information-block-table { - margin: 0px 15px; - width: auto; -} - -#content #software-information-block-table td { - display: table-cell; -} - -#content #software-information-block-table #col-software-name { - vertical-align: top; - font-style: normal; -} - -#content #software-information-block-table #col-software-name h1 { - font: 700 34px/37px arial, open_sansbold, helvetica, sans-serif; - text-align: left; -} - -#content #software-information-block-table #col-software-name b { - font: normal normal normal 15px/21px arial, 'open_sansregular', helvetica, sans-serif; -} - -/*** end of Software Header ***/ - -/*** Software Homepage ***/ - -/* Software Download Block*/ - -#content .download-block { - margin: 0px 15px; - border: 1px solid #D3D6DE; - border-radius: 10px; -} - -#content .download-block .block-title { - padding: 11px 10px 7px 20px; - background-color: #D3D6DE; - border-top-left-radius: 8px; - border-top-right-radius: 8px; - font-family: "open_sansbold", Arial, Helvetica, sans-serif; - margin: 0; - color: #172738; - font-size: 18px; -} - -#content .download-block .download-list li { - padding: 30px 10px 25px 10px; - border-top: 1px solid #D3D6DE; - clear: both; -} - -#content .download-block .download-list li:nth-child(even) { - background: #ECEDF1; -} - -#content .download-block .download-button { - width: 80px; - float: left; - clear: both; -} - -#content .download-block .download-button .download-image { - padding: 50px 0px 8px 0px; - border: 1px solid #2c66ce; - border-radius: 8px; - height: 18px; - background: #2C66CE url("../images/download-icon.png") center no-repeat; - display: block; -} - -#content .download-block .download-button #download-size { - border: 1px solid #1a397d; - border-radius: 0px 0px 8px 8px; - background-color: #1a397d; - color: #ffffff; - font-size: 12px; - text-align: center; - display: none; -} - -#content .download-block .download-info { - margin: 5px 0px 0px 100px; - position: relative; - font-size: 16px; -} - -#content .download-block .download-info .download-name { - display: block; - font-weight: bold; -} - -#content .download-block .download-info .download-platform { - display: block; - font-size: 14px; -} - -#content .download-block .download-info .min-requirements { - font-size: 12px; -} - -#content .download-block .download-info .min-requirements a { - line-height: 40px; - color: #3E67B1; - text-decoration: underline; -} - -#content .download-block #licensed-software { - padding:14px; - border-top: 1px solid #D3D6DE; - border-radius: 0px 0px 8px 8px; - background-color: #D3D6DE; - font-size: 12px; - text-align: right; -} - -#content .download-block #licensed-software a { - color: #3e67b1; - text-decoration: underline; -} - -/* About Software - Article on homepage */ - -.profile-homepage #article #article-toolbar #article-header h1 { - margin: 0px 0px 10px 0px; - padding: 0px; - color: #172738; - font: normal normal bold 22px/1.3em arial, 'open_sansbold', helvetica, sans-serif; -} - -.profile-homepage #article #article-toolbar #article-header h1.title { - border: none; -} - -.profile-homepage #article #article-header .publishing-info { - display: none; -} - -.profile-homepage #article .article-body h1 { - border-top: 1px solid #ECEDF1; - border-bottom: none; - padding-top: 25px; -} - -.profile-homepage #article .article-body p { - margin: 0px 0px 20px 0px; - line-height: 21px; - text-align: left; - font-size: 15px; -} - -.profile-homepage #article .article-body hr { - display: none; -} - -.profile-homepage #article .article-body ul { - background-repeat: no-repeat; - list-style-position: inside; - list-style-type: disc; -} - -.profile-homepage #article .article-body ul li { - line-height: 21px; - text-align: left; - font-size: 15px; - list-style: inherit; -} - -/*** end of Software Homepage ***/ - -/*** Categories and Tags block ***/ - -#content .box-1 .categories-and-tags-block{ - border-top: 4px solid #2C4B6B; -} - -#content .box-1 .categories-and-tags-block .block-title{ - display: inline-flex; - margin: 13px 10px 10px 0; - padding: 3px 0px; - background: none; - color: #5E82C6; - font-family: Arial; - font-size: 12px; - font-weight: 300; -} - -#content .box-1 .categories-and-tags-block .category_cloud{ - display: inline-flex; - margin: 13px 0 10px 0; - max-width: 87%; -} - -#content .box-1 .categories-and-tags-block .category_cloud a{ - display: inline-block; - padding: 3px 10px; - margin: 5px; - color: #3E67B1; - background-color: #ECEDF1; - border: 1px solid #D3D6DE; - border-radius: 3px; - font-size: 12px; -} - -#content .box-1 .categories-and-tags-block .category_cloud a:hover{ - border-color: #3a70d1; - background: #3a70d1; - color: white; -} - -#content .box-1 .categories-and-tags-block .category_cloud a:link{ - text-decoration: none; -} - -/*** end of categories and tags block ***/ - -/*** Right bar ***/ - -/*** WARNING - WHITOUT BOX-4 ***/ - -/* Link-list block */ -.template-default #content .box-3 .block-title{ - border-top: 4px solid #4562b1; - line-height: 15px; - background: #eee; - color: #4562b1; -} - -.template-default #content .box-3 .link-list-block li{ - margin: 0px; - padding: 0px; - border-bottom: 1px solid #ddd; - border-top: none; -} - -.template-default #content .box-3 .link-list-block li a{ - border-right: none; - border-top: 0px solid #64946E; - border-radius: 0px 0px 0px 0px; - padding: 6px 5px 8px 18px; - width: auto; - line-height: 17px; - background-color: #fff; - background-position: 0px 50%; - color: #2C66CE; - font-weight: normal; - font-size: 14px; -} - -.template-default #content .box-3 .link-list-block h3.empty + ul{ - border-top: 1px solid #ddd; -} - -.template-default #content .box-3 .link-list-block li a.link-this-page, -.template-default #content .box-3 .link-list-block li a.link-this-page:hover{ - border-right: none; -} - -.template-default #content .box-3 .link-list-block li a:hover{ - background-color: #FFFFFF; - color: #000; -} - -.template-default #content .box-3 .link-list-block li a.link-this-page{ - margin-left: 0px; - width: auto; - background-color: #ffffff; - font-weight: bold; -} - -/* Repository and Wiki blocks */ - -.template-default #content .box-3 .wiki-block, -.template-default #content .box-3 .repository-block{ - padding: 0 0 0 10px; -} - -.template-default .box-3 #bt_wiki, -.template-default .box-3 #bt_repositorio { - border-radius: 4px; - padding: 12px 10px; - background: #EAEBEE; - color: #2C66CE; - font: normal normal bold 12px 'open_sansbold', arial, helvetica, sans-serif; - text-transform: uppercase; - display: block; - position: relative; -} - -.template-default .box-3 #bt_wiki:hover, -.template-default .box-3 #bt_repositorio:hover { - color:#172738; -} - -.template-default .box-3 #bt_wiki:after, -.template-default .box-3 #bt_repositorio:after{ - margin-top: -2px; - padding: 4px 0px 4px 2px; - border-radius: 4px; - width: 18px; - right: 10px; - line-height: 20px; - position: absolute; - background: #2C66CE; - color: #FFF; - font-size: 16px; - text-align: center; - content: url('../images/right-arrow.png'); -} - -.template-default .box-3 #content #bt_wiki:hover, -.template-default .box-3 #content #bt_repositorio:hover{ - color: #FFF; - background: #2C66CE; - text-decoration: none; -} -/*** END - WARNING - WHITOUT BOX-4 ***/ - -/*** end of right bar ***/ - -/************ DUPLICATE ************/ - -/* - This part of the code is duplicated because, if there is - a change of layout from template-default to lefttopright - the CSS fit without many complication. - */ - -/*** Right bar ***/ - -/*** WARNING - WITH BOX-4 ***/ - -/* Link-list block */ -.template-lefttopright #content .box-2 .block-title { - border-top: 4px solid #4562b1; - line-height: 15px; - background: #eee; - color: #4562b1; -} - -.template-lefttopright #content .box-2 .link-list-block li { - margin: 0px; - padding: 0px; - border-bottom: 1px solid #ddd; - border-top: none; -} - -.template-lefttopright #content .box-2 .link-list-block li a { - border-right: none; - border-top: 0px solid #64946E; - border-radius: 0px 0px 0px 0px; - padding: 6px 5px 8px 18px; - width: auto; - line-height: 17px; - background-color: #fff; - background-position: 0px 50%; - color: #2C66CE; - font-weight: normal; - font-size: 14px; -} - -.template-lefttopright #content .box-2 .link-list-block h3.empty + ul { - border-top: 1px solid #ddd; -} - -.template-lefttopright #content .box-2 .link-list-block li a.link-this-page, -.template-lefttopright #content .box-2 .link-list-block li a.link-this-page:hover { - border-right: none; -} - -.template-lefttopright #content .box-2 .link-list-block li a:hover { - background-color: #FFFFFF; - color: #000; -} - -.template-lefttopright #content .box-2 .link-list-block li a.link-this-page { - margin-left: 0px; - width: auto; - background-color: #ffffff; - font-weight: bold; -} - -/* Repository block */ - -.template-lefttopright #content .box-2 .wiki-block, -.template-lefttopright #content .box-2 .repository-block{ - padding: 0 0 0 10px; -} - -.template-lefttopright .box-2 #bt_wiki, -.template-lefttopright .box-2 #bt_repositorio { - border-radius: 4px; - padding: 12px 10px; - background: #EAEBEE; - color: #2C66CE; - font: normal normal bold 12px 'open_sansbold', arial, helvetica, sans-serif; - text-transform: uppercase; - display: block; - position: relative; -} - -.template-lefttopright .box-2 #bt_wiki:hover, -.template-lefttopright .box-2 #bt_repositorio:hover { - color:#172738; -} - -.template-lefttopright .box-2 #bt_wiki::after, -.template-lefttopright .box-2 #bt_repositorio::after{ - margin-top: -2px; - padding: 4px 0px 4px 2px; - border-radius: 4px; - width: 18px; - right: 10px; - line-height: 20px; - position: absolute; - background: #2C66CE; - color: #FFF; - font-size: 16px; - text-align: center; - content: url('../images/right-arrow.png'); -} - -.template-lefttopright .box-2 #content #bt_wiki:hover, -.template-lefttopright .box-2 #content #bt_repositorio:hover{ - color: #FFF; - background: #2C66CE; - text-decoration: none; -} - -/*** WARNING - WITH BOX-4 ***/ - -/* Metrics Block */ -.software-metrics-block { - font-family: Arial; - padding: 3px 0px 0px 10px; -} - -.software-metrics-block .metrics-list { - border-bottom: 1px dotted #D3D6DE; -} - -.software-metrics-block .metrics-list li { - display: table; - margin-bottom: 10px; -} - -.software-metrics-block .metrics-list li span, -.software-metrics-block .metrics-list li a { - display: table-cell; - vertical-align: top; -} - -#content .software-metrics-block .metrics-list li a:link { - color: #2c66ce; -} - -.software-metrics-block span.arrow-globe-icon { - background: url('../images/arrow-globe-icon.png') no-repeat center center; - width: 25px; - height: 18px; -} - -.software-metrics-block span.downloads-icon { - background: url('../images/downloads-icon.png') no-repeat center center; - width: 25px; - height: 18px; -} - -.software-metrics-block span.face-icon { - background: url('../images/beneficiados-icon.png') no-repeat center center; - width: 25px; - height: 20px; -} - -.software-metrics-block span.pig-safe-icon { - background: url('../images/economizados-icon.png') no-repeat center center; - width: 25px; - height: 20px; -} - -.software-metrics-block .metrics-list li a { - letter-spacing: -0.1px; - line-height: 20px; - padding-left: 5px; -} - -.software-metrics-block .admin-estimation { - font-size: 11px; - line-height: 15px; - margin-top: 7px; - margin-left: 4px; -} - -.software-metrics-block .metrics-list .saved-money { - font-size: 14px; -} - -/*** end of right bar ***/ - -/************ END DUPLICATE ************/ - - -/*** Software internal pages ***/ - -/* FAQ page */ - -#content .main-block .article-body ul.etapas-publicacao { - margin-bottom: 20px; -} - -#content .main-block .article-body ul.etapas-publicacao li { - margin-bottom: 10px; - list-style: none; - list-style-position: inside; -} - -#content .main-block .article-body ul.etapas-publicacao li strong { - margin-right: 6px; - border-radius: 50%; - padding: 1px; - background: #333; - height: 24px; - width: 24px; - color: #fff; - text-align: center; - float: left; -} - -#content .main-block .article-body .etapas-publicacao-2 { - font-weight: bold; -} - -/* Tutorial page */ - -#content .main-block .article-body p strong { - font-size: 16px; -} - -#content .main-block .article-body .etapas-publicacao .etapas-publicacao-2 { - display: table-cell; -} - -#content .main-block .article-body .etapas-publicacao p { - margin: 0px 0 0 31px; -} - -/* Manual page */ - -#content .main-block #article .folder-content .item-info { - border-top: 1px solid #ccc; - padding: 30px 20px 32px 0px; -} - -#content .main-block #article .folder-content .folder-item:last-child .item-info { - border-bottom: 1px solid #ccc; -} - -#content .main-block #article .folder-content .item-icon { - margin: 2px 0px auto auto; - padding: 45px 40px 4px 10px; - border: 1px solid #2C66CE; - border-radius: 4px; - background: #2C66CE url("../images/download-mini_icon.png") center center no-repeat; - display: block; - float: left; -} - -#content .main-block #article .folder-content .item-icon a { - display: none; -} - - -#content .main-block #article .folder-content .item-description { - margin-left: 65px; - padding-left: 0px; -} - -#content .main-block #article .folder-content .item-description a { - color: #172938; - font-size: 18px; - font-family: Arial; - font-weight: 700; - word-wrap: break-word; -} - -/* It's a Specific rule to the Google Chrome. */ -@supports (-webkit-appearance:none) { - #content .main-block #article .folder-content .item-description a { - color: #172938; - font-size: 18px; - font-family: Arial; - font-weight: 700; - white-space: pre; - word-wrap: break-word; - } -} - -#content .main-block #article .folder-content .item-date { - margin-left: 65px; - padding-left: 0px; -} - -/*** end fo software internal pages ***/ diff --git a/src/noosfero-spb-theme/css/tooltip.css b/src/noosfero-spb-theme/css/tooltip.css deleted file mode 100644 index cbd7534..0000000 --- a/src/noosfero-spb-theme/css/tooltip.css +++ /dev/null @@ -1,62 +0,0 @@ -.tooltip { - position: absolute; - width: -moz-fit-content; - width: -webkit-fit-content; - width: fit-content; - max-width:280px; - padding: 15px 10px 15px 20px; - background: #172638; - color: white; - font-family: Arial, sans-serif; - font-size: 13px; - border-radius: 5px; - border: 0px !important; - z-index: 1070; - margin: -10px 0; -} - -.tooltip-bottom:after { - content: " "; - height: 0; - width: 0; - margin-left: -6px; - position: absolute; - bottom: 100%; - left: 50%; - border: solid transparent; - border-bottom-color: #172638; - border-width: 6px; -} - -.tooltip:after { - content: " "; - height: 0; - width: 0; - margin-left: -6px; - position: absolute; - top: 100%; - left: 50%; - border: solid transparent; - border-top-color: #172638; - border-width: 6px; -} - -/*Fix temporary - class="tooltip" send e-mail administrator community*/ - -.action-contact-new .tooltip{ - position:initial; - background:none; - color:#172537; - font-family: Arial, sans-serif; - max-width: 520px; - padding: 15px 20px; - margin: 20px 0 30px 0; - border: 1px dotted #ccc !important; - border-left: 5px solid #FF0366 !important; - line-height: 20px; -} - -.action-contact-new .tooltip:after{ - content:none; -} -/*************************************/ \ No newline at end of file diff --git a/src/noosfero-spb-theme/css/use-report.css b/src/noosfero-spb-theme/css/use-report.css deleted file mode 100644 index 9186e84..0000000 --- a/src/noosfero-spb-theme/css/use-report.css +++ /dev/null @@ -1,534 +0,0 @@ -/*** Profile homepage ***/ - -/* Ratings Header */ -.profile-homepage #content .organization-average-rating-container { - margin-top: 21px; - overflow: auto; -} - -.profile-homepage #content .organization-average-rating-container .star-rate-text { - font-size: 14px; - letter-spacing: 0.2px; - margin-right: 5px; - padding: 4px 0px 0px 3px; -} - -.profile-homepage #content .organization-average-rating-container .star-container { - margin-top: 2px; -} - -.profile-homepage #content .organization-average-rating-container .rate-this-organization { - font-size: 14px; - text-decoration: underline; - margin: 4px 0px 0px 6px; - padding: 0px 0px 0px 15px; -} - -.profile-homepage #content .organization-average-rating-container .rate-this-organization a { - color: #2c66ce; -} - -.profile-homepage #content .organization-average-rating-container .star-container .medium-star-negative, -.profile-homepage #content .organization-average-rating-container .star-container .medium-star-positive { - margin-right: 3px; -} - -.profile-homepage #content .communities-ratings-block .button-bar a.button.with-text { - height: 32px; - padding: 0px 5px; - border: 1px solid #3E67B1; - font-family: 'open_sansbold'; - font-size: 14px; - line-height: 32px; - text-transform: uppercase; -} - -/* Use report list */ - -.profile-homepage #content .communities-ratings-block .ratings-title .block-title { - background: none; - border-bottom: 1px solid #D3D6DE; - border-top: none; - color: #172738; - font-size: 20px; - font-weight: 700; - letter-spacing: 1.8px; - margin-bottom: 0px; - padding: 0px 0px 12px 4px; -} - -.profile-homepage #content .communities-ratings-block .ratings-list .make-report-block { - margin-top: 0px; - padding-top: 32px; - background-repeat: no-repeat; - border-bottom: 1px solid #D3D6DE; - border-top: none; - font-family: Arial; -} - -#content #software-information-block-table { - width: 100%; -} - -#content #software-information-block-table h1 { - font-size: 34px; -} - -#content #software-information-block-table #col-profile-big-image { - padding-right: 0px; -} - -#content #software-information-block-table #col-software-name { - padding-left: 0px; -} - - -#content .organization-average-rating-container { - margin-top: 21px; - overflow: auto; -} - -#content .organization-average-rating-container .star-rate-text { - font-size: 14px; - letter-spacing: 0.2px; - margin-right: 5px; - padding: 4px 0px 0px 3px; -} - -#content .organization-average-rating-container .star-container { - margin-top: 2px; -} - -#content .organization-average-rating-container .rate-this-organization { - font-size: 14px; - text-decoration: underline; - margin: 4px 0px 0px 6px; - padding: 0px 0px 0px 15px; -} - -#content .organization-average-rating-container .star-container .medium-star-negative, -#content .organization-average-rating-container .star-container .medium-star-positive { - margin-right: 3px; -} - -/*** Internal Page ***/ - -#content .main-content .star-page-title, -#content .main-content .star-rate-data { - max-width: 560px; -} - -#content .main-content .star-page-title .title { - font-size: 34px; -} - -#content .main-content .star-rate-data { - border-bottom: 1px solid #D3D6DE; - border-top: 1px solid #D3D6DE; - color: #172738; - margin-top: 16px; - padding: 29px 0px 21px 0px; - overflow: visible; -} - -#content .main-content .star-rate-data .star-rate-form .star-rate-text, -#content .main-content .star-rate-data .star-rate-form .star-container { - display: inline; - float: left; -} - -#content .main-content .star-rate-data .star-rate-form .star-container { - width: inherit; - height: 30px; - padding-left: 6px; -} - -#content .main-content .star-rate-data .star-rate-form { - padding: 0 37px; - letter-spacing: 0.1px; - width: 100%; -} - -#content .main-content .star-rate-data .star-rate-form .star-rate-text { - font-size: 14px; - padding-top: 4px; -} - -#content .main-content .star-rate-data .star-profile-information { - padding-left: 15px; - width: 79px; -} - -#content .main-content .star-rate-data .star-profile-information .star-profile-image { - padding-top: 1px; -} - -#content .main-content .star-rate-data .star-profile-information .star-profile-image img { - border-radius: 4px; - height: 60px; - width: 60px; -} - -#content .main-content .star-rate-data .star-rate-form .star-container .star-positive { - background-image: url('../images/star-positive-big.png'); -} - -#content .main-content .star-rate-data .star-rate-form .star-container .star-negative { - background-image: url('../images/star-negative-big.png'); -} - -#content .main-content .star-rate-data .star-rate-form .star-container .star-positive, -#content .main-content .star-rate-data .star-rate-form .star-container .star-negative { - display: table-cell; - margin-right: 0px; - height: 30px; - width: 28px; -} - -#content .main-content .star-rate-data .star-rate-form .star-comment-container { - padding-top: 23px; -} - -#content .main-content .star-rate-data .star-rate-form .star-comment-container .formlabel { - letter-spacing: -0.2px; - margin-bottom: 2px; -} - -#content .main-content .star-rate-data .star-rate-form .star-comment-container #comments_body { - border-radius: 4px; - height: 91px; - background: none #FFFFFF; - border: 1px solid #DDDDDD; - color: #585858; - font-size: 16px; - width: 100%; - word-wrap: break-word; -} - -#content .main-content .star-rate-data .star-rate-form .star-comment-container .button-bar input { - background-color: #3E67B1; - font-weight: 700; - text-transform: uppercase; - color: #FFF; - padding: 5px; - height: 31px; - line-height: 20px; - font-family: Arial; -} - -#content .main-content .star-rate-data .star-rate-form .star-comment-container .button-bar a { - display: none; -} - -#content .main-content .star-rate-data .star-rate-form .star-comment-container .button-bar { - padding-bottom: 50px; -} - -#content .main-content .star-rate-data .star-rate-form .star-notice { - display: none; - float: left; - margin-top: 10px; - margin-left: 10px; -} - -#content .star-rate-form .star-comment-container .comments-software-extra-fields { - height: 0; - overflow: hidden; -} - -#content .star-rate-form .star-comment-container .comments-software-extra-fields #input_institution_comments { - margin-bottom: 19px; - margin-top: 16px; - height: 50px; -} - -#content .star-rate-form .star-comment-container .comments-software-extra-fields #input_institution_comments label { - font-size: 12px; -} - -#content .star-rate-form .star-comment-container .comments-software-extra-fields #input_institution_comments input { - display: block; - height: 19px; - width: 335px; - padding: 6px; - margin-top: 3px; - color: rgb(88, 88, 88); - border: 1px solid rgb(204, 204, 204); - border-image-source: initial; - border-image-slice: initial; - border-image-width: initial; - border-image-outset: initial; - border-image-repeat: initial; - border-radius: 4px; - font-size: 15px; - font-family: Arial, helvetica; -} - -#content .star-rate-form .star-comment-container .comments-software-extra-fields .comments-software-people-benefited, -#content .star-rate-form .star-comment-container .comments-software-extra-fields .comments-software-saved-values { - font-size: 12px; - float: left; - padding-right: 10px; - height: 50px; -} - -#content .star-rate-form .star-comment-container .comments-software-extra-fields .comments-software-saved-values { - padding-right: 0px; - height: 70px; -} - -#content .star-rate-form .star-comment-container form .formfieldline { - margin-bottom: 17px; -} - -#content .star-rate-form .star-comment-container .comments-display-fields { - border-bottom: 1px dotted #D3D6DE; - overflow: auto; -} - -#content .star-rate-form .star-comment-container .comments-display-fields:hover span, -#content .star-rate-form .star-comment-container .comments-display-fields:hover span:after { - opacity: 0.6; -} - -#content .star-rate-form .star-comment-container .comments-display-fields span#comments-additional-information { - color: #172738; - display: block; - float: left; - font-size: 14px; - font-weight: 700; - padding-bottom: 4px; -} - -.action-organization_ratings_plugin_profile-new_rating #content .star-rate-form .star-comment-container .comments-display-fields .comments-arrow-up::after { - content: url('../images/top-arrow-black.png'); - float: right; - padding-top: 7px; - padding-right: 6px; -} - -.action-organization_ratings_plugin_profile-new_rating #content .star-rate-form .star-comment-container .comments-display-fields .comments-arrow-down::after { - content: url('../images/bottom-arrow-black.png'); - float: right; - padding-top: 7px; - padding-right: 6px; -} - -#content .star-rate-form .star-comment-container .comments-software-extra-fields #organization_rating_people_benefited, -#content .star-rate-form .star-comment-container .comments-software-extra-fields #organization_rating_saved_value { - display: block; - height: 19px; - width: 155px; - margin-top: 4px; - padding: 6px; - border: 1px solid rgb(204, 204, 204); - border-image-source: initial; - border-image-slice: initial; - border-image-width: initial; - border-image-outset: initial; - border-image-repeat: initial; - border-radius: 4px; - font-size: 15px; - font-family: Arial, helvetica; - color: rgb(88, 88, 88); -} - -#content .star-rate-form .star-comment-container .star-tooltip { - cursor: default; - content: '?'; - border-radius: 90%; - font-size: 12px; - font-weight: 700; - background: #3867b7; - color: #fff; - margin-left: 4px; - padding: 0px 6px; -} - -.ratings-list { - color: #172738; - font-family: Arial, Helvetica, "open_sansregular", sans-serif; -} - -.ratings-list .user-rating-block { - border-bottom: 1px solid #D3D6DE; - border-top: none; - padding-bottom: 40px; - padding-top: 32px; - margin-top: 0px; -} - -.ratings-list .star-profile-information { - padding: 1px 30px 0px 14px; - width: 99px; -} - -.ratings-list .user-rating-block .star-profile-information .star-profile-name { - line-height: 16px; - width: 70px; -} - -.ratings-list .star-profile-information .star-profile-image img { - border-radius: 4px; - height: 60px; -} - -.ratings-list .user-rating-block .user-testimony-container { - width: 100%; -} - -.ratings-list .user-rating-block .user-testimony-container .star-container div { - display: inline; -} - -.ratings-list .user-rating-block .user-testimony-container .user-testimony { - font-size: 16px; - line-height: 20px; - margin-top: 31px; - min-height: 60px; -} - -.star-rate-data .star-rate-form .star-comment-container .formfield textarea { - width: 100%; -} - -.ratings-list .user-rating-block .user-testimony-container .testimony-rate-date { - display: block; - float: left; - padding-right: 0px; - width: 100px; -} - -.ratings-list .star-container { - display: block; - float: right; - width: auto; -} - -.ratings-list .star-container .small-star-positive, -.ratings-list .star-container .small-star-negative { - margin-right: 3px; -} - -.ratings-list .user-rating-block .user-testimony-container .testimony-rate-date { - display: block; - float: left; - margin-top: 2px; -} - -.ratings-list .user-rating-block .user-testimony-container .additional-informations { - margin-top: 10px; -} - -#content .ratings-title .block-title { - background: none; - border-bottom: 1px solid #D3D6DE; - border-top: none; - color: #172738; - font-size: 20px; - font-weight: 700; - letter-spacing: 1.8px; - margin-bottom: 0px; - padding: 0px 0px 12px 4px; -} - -.ratings-list .make-report-block { - background-repeat: no-repeat; - border-bottom: 1px solid #D3D6DE; - border-top: none; - margin-top: 0px; - padding-top: 32px; -} - -.make-report-block .star-profile-information { - padding-right: 13px; - padding-left: 0px; -} - -.make-report-block .star-profile-information .star-profile-name { - margin-top: 8px; - width: 70px; -} - -.ratings-list .make-report-block .make-report-container { - padding-top: 2px; -} - -.ratings-list .make-report-block .make-report-container .make-report-message { - font-family: Arial; - font-weight: 300; - font-size: 18px; -} - -.ratings-list .make-report-block .make-report-container .button-bar { - padding-top: 6px; -} - -.ratings-list .make-report-block .make-report-container .alert { - margin-top: 37px; - padding-left: 1px; -} - -.ratings-list .make-report-block .make-report-container .button-bar a, -.star-rate-data .rating-cooldown .button-bar a, -.star-rate-data .rating-vote-once .button-bar a { - background-color: #3E67B1; - background-image: none; - color: #fff; - font-weight: 700; - font-size: 14px; - font-style: normal; - height: 31px; - padding: 0px 7px 0px 7px; - text-transform: uppercase; -} - -.star-rate-data .rating-cooldown, -.star-rate-data .rating-vote-once { - font-family: Arial; - font-size: 18px; - font-style: italic; - word-break: break-word; -} - -.star-rate-data .rating-cooldown .button-bar a.disabled-button, -.star-rate-data .rating-vote-once .button-bar a.disabled-button { - cursor: not-allowed; - opacity: 0.4; -} - -.ratings-list .see-more { - border-top: none; -} - -.ratings-list a.icon-arrow-right-p { - background: none; - color: #172738; - font-family: 'open_sansregular'; - font-size: 11px; - float: none; - margin-top: 0px; - padding-right: 0px; - padding-top: 22px; - padding-bottom: 20px; - text-align: right; - text-transform: uppercase; -} - -.ratings-list a.icon-arrow-right-p::after { - background-color: #3E67B1; - border-radius: 4px; - content: url('../images/right-arrow.png'); - font-size: 15px; - line-height: 20px; - margin-left: 9px; - padding-left: 8px; - padding-right: 5px; - text-align: center; -} - -/*** Tooltip ***/ - -.comments-software-extra-fields .tooltip-inner { - display: block; -} diff --git a/src/noosfero-spb-theme/favicon.ico b/src/noosfero-spb-theme/favicon.ico deleted file mode 100644 index f8c4036..0000000 Binary files a/src/noosfero-spb-theme/favicon.ico and /dev/null differ diff --git a/src/noosfero-spb-theme/font-awesome.min.css b/src/noosfero-spb-theme/font-awesome.min.css deleted file mode 100644 index ca0591c..0000000 --- a/src/noosfero-spb-theme/font-awesome.min.css +++ /dev/null @@ -1,4 +0,0 @@ -/*! - * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome - * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url('fonts/fontawesome-webfont.eot?v=4.3.0');src:url('fonts/fontawesome-webfont.eot?#iefix&v=4.3.0') format('embedded-opentype'),url('fonts/fontawesome-webfont.woff2?v=4.3.0') format('woff2'),url('fonts/fontawesome-webfont.woff?v=4.3.0') format('woff'),url('fonts/fontawesome-webfont.ttf?v=4.3.0') format('truetype'),url('fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;transform:translate(0, 0)}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-genderless:before,.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"} \ No newline at end of file diff --git a/src/noosfero-spb-theme/fonts/FontAwesome.otf b/src/noosfero-spb-theme/fonts/FontAwesome.otf deleted file mode 100644 index f7936cc..0000000 Binary files a/src/noosfero-spb-theme/fonts/FontAwesome.otf and /dev/null differ diff --git a/src/noosfero-spb-theme/fonts/fontawesome-webfont.eot b/src/noosfero-spb-theme/fonts/fontawesome-webfont.eot deleted file mode 100644 index 33b2bb8..0000000 Binary files a/src/noosfero-spb-theme/fonts/fontawesome-webfont.eot and /dev/null differ diff --git a/src/noosfero-spb-theme/fonts/fontawesome-webfont.svg b/src/noosfero-spb-theme/fonts/fontawesome-webfont.svg deleted file mode 100644 index 1ee89d4..0000000 --- a/src/noosfero-spb-theme/fonts/fontawesome-webfont.svg +++ /dev/null @@ -1,565 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/noosfero-spb-theme/fonts/fontawesome-webfont.ttf b/src/noosfero-spb-theme/fonts/fontawesome-webfont.ttf deleted file mode 100644 index ed9372f..0000000 Binary files a/src/noosfero-spb-theme/fonts/fontawesome-webfont.ttf and /dev/null differ diff --git a/src/noosfero-spb-theme/fonts/fontawesome-webfont.woff b/src/noosfero-spb-theme/fonts/fontawesome-webfont.woff deleted file mode 100644 index 8b280b9..0000000 Binary files a/src/noosfero-spb-theme/fonts/fontawesome-webfont.woff and /dev/null differ diff --git a/src/noosfero-spb-theme/fonts/fontawesome-webfont.woff2 b/src/noosfero-spb-theme/fonts/fontawesome-webfont.woff2 deleted file mode 100644 index 3311d58..0000000 Binary files a/src/noosfero-spb-theme/fonts/fontawesome-webfont.woff2 and /dev/null differ diff --git a/src/noosfero-spb-theme/fonts/opensans-300-webfont.eot b/src/noosfero-spb-theme/fonts/opensans-300-webfont.eot deleted file mode 100755 index abfdfa3..0000000 Binary files a/src/noosfero-spb-theme/fonts/opensans-300-webfont.eot and /dev/null differ diff --git a/src/noosfero-spb-theme/fonts/opensans-300-webfont.svg b/src/noosfero-spb-theme/fonts/opensans-300-webfont.svg deleted file mode 100755 index 1fb17a5..0000000 --- a/src/noosfero-spb-theme/fonts/opensans-300-webfont.svg +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/noosfero-spb-theme/fonts/opensans-300-webfont.ttf b/src/noosfero-spb-theme/fonts/opensans-300-webfont.ttf deleted file mode 100755 index c6d08b2..0000000 Binary files a/src/noosfero-spb-theme/fonts/opensans-300-webfont.ttf and /dev/null differ diff --git a/src/noosfero-spb-theme/fonts/opensans-300-webfont.woff b/src/noosfero-spb-theme/fonts/opensans-300-webfont.woff deleted file mode 100755 index b1020fd..0000000 Binary files a/src/noosfero-spb-theme/fonts/opensans-300-webfont.woff and /dev/null differ diff --git a/src/noosfero-spb-theme/fonts/opensans-400-webfont.eot b/src/noosfero-spb-theme/fonts/opensans-400-webfont.eot deleted file mode 100755 index 58b80a7..0000000 Binary files a/src/noosfero-spb-theme/fonts/opensans-400-webfont.eot and /dev/null differ diff --git a/src/noosfero-spb-theme/fonts/opensans-400-webfont.svg b/src/noosfero-spb-theme/fonts/opensans-400-webfont.svg deleted file mode 100755 index b951665..0000000 --- a/src/noosfero-spb-theme/fonts/opensans-400-webfont.svg +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/noosfero-spb-theme/fonts/opensans-400-webfont.ttf b/src/noosfero-spb-theme/fonts/opensans-400-webfont.ttf deleted file mode 100755 index 78a9bf2..0000000 Binary files a/src/noosfero-spb-theme/fonts/opensans-400-webfont.ttf and /dev/null differ diff --git a/src/noosfero-spb-theme/fonts/opensans-400-webfont.woff b/src/noosfero-spb-theme/fonts/opensans-400-webfont.woff deleted file mode 100755 index 4a54090..0000000 Binary files a/src/noosfero-spb-theme/fonts/opensans-400-webfont.woff and /dev/null differ diff --git a/src/noosfero-spb-theme/fonts/opensans-600-webfont.eot b/src/noosfero-spb-theme/fonts/opensans-600-webfont.eot deleted file mode 100755 index e99d282..0000000 Binary files a/src/noosfero-spb-theme/fonts/opensans-600-webfont.eot and /dev/null differ diff --git a/src/noosfero-spb-theme/fonts/opensans-600-webfont.svg b/src/noosfero-spb-theme/fonts/opensans-600-webfont.svg deleted file mode 100755 index 6306b56..0000000 --- a/src/noosfero-spb-theme/fonts/opensans-600-webfont.svg +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/noosfero-spb-theme/fonts/opensans-600-webfont.ttf b/src/noosfero-spb-theme/fonts/opensans-600-webfont.ttf deleted file mode 100755 index 174bed4..0000000 Binary files a/src/noosfero-spb-theme/fonts/opensans-600-webfont.ttf and /dev/null differ diff --git a/src/noosfero-spb-theme/fonts/opensans-600-webfont.woff b/src/noosfero-spb-theme/fonts/opensans-600-webfont.woff deleted file mode 100755 index f24aeb4..0000000 Binary files a/src/noosfero-spb-theme/fonts/opensans-600-webfont.woff and /dev/null differ diff --git a/src/noosfero-spb-theme/fonts/opensans-700-webfont.eot b/src/noosfero-spb-theme/fonts/opensans-700-webfont.eot deleted file mode 100755 index dfbcb12..0000000 Binary files a/src/noosfero-spb-theme/fonts/opensans-700-webfont.eot and /dev/null differ diff --git a/src/noosfero-spb-theme/fonts/opensans-700-webfont.svg b/src/noosfero-spb-theme/fonts/opensans-700-webfont.svg deleted file mode 100755 index 24c6ba3..0000000 --- a/src/noosfero-spb-theme/fonts/opensans-700-webfont.svg +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/noosfero-spb-theme/fonts/opensans-700-webfont.ttf b/src/noosfero-spb-theme/fonts/opensans-700-webfont.ttf deleted file mode 100755 index 5427c4d..0000000 Binary files a/src/noosfero-spb-theme/fonts/opensans-700-webfont.ttf and /dev/null differ diff --git a/src/noosfero-spb-theme/fonts/opensans-700-webfont.woff b/src/noosfero-spb-theme/fonts/opensans-700-webfont.woff deleted file mode 100755 index 1a731f0..0000000 Binary files a/src/noosfero-spb-theme/fonts/opensans-700-webfont.woff and /dev/null differ diff --git a/src/noosfero-spb-theme/fonts/opensans-800-webfont.eot b/src/noosfero-spb-theme/fonts/opensans-800-webfont.eot deleted file mode 100755 index f687e2a..0000000 Binary files a/src/noosfero-spb-theme/fonts/opensans-800-webfont.eot and /dev/null differ diff --git a/src/noosfero-spb-theme/fonts/opensans-800-webfont.svg b/src/noosfero-spb-theme/fonts/opensans-800-webfont.svg deleted file mode 100755 index daf84f0..0000000 --- a/src/noosfero-spb-theme/fonts/opensans-800-webfont.svg +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/noosfero-spb-theme/fonts/opensans-800-webfont.ttf b/src/noosfero-spb-theme/fonts/opensans-800-webfont.ttf deleted file mode 100755 index 079934c..0000000 Binary files a/src/noosfero-spb-theme/fonts/opensans-800-webfont.ttf and /dev/null differ diff --git a/src/noosfero-spb-theme/fonts/opensans-800-webfont.woff b/src/noosfero-spb-theme/fonts/opensans-800-webfont.woff deleted file mode 100755 index 4a69fa6..0000000 Binary files a/src/noosfero-spb-theme/fonts/opensans-800-webfont.woff and /dev/null differ diff --git a/src/noosfero-spb-theme/footer.html.erb b/src/noosfero-spb-theme/footer.html.erb deleted file mode 100644 index 8a7c49a..0000000 --- a/src/noosfero-spb-theme/footer.html.erb +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/noosfero-spb-theme/header.html.erb b/src/noosfero-spb-theme/header.html.erb deleted file mode 100644 index 5c5a3cf..0000000 --- a/src/noosfero-spb-theme/header.html.erb +++ /dev/null @@ -1,97 +0,0 @@ - - - - -
    - - -
    - <%= theme_include 'categories' %> -
    -
    diff --git a/src/noosfero-spb-theme/html-reference-resource/blog.html b/src/noosfero-spb-theme/html-reference-resource/blog.html deleted file mode 100644 index b9d2d24..0000000 --- a/src/noosfero-spb-theme/html-reference-resource/blog.html +++ /dev/null @@ -1,86 +0,0 @@ - -
    -
    -

    Blog

    -

    Desenvolvimento CACIC

    - -
    -
    -
    Hoje
    -
    Lorem ipsum dolor sit amlor sit amet, contur adipiscing elit
    -
    - -
    -
    Ambiente traz soluções que dispensam pagamentos de licença simples, de fácil utilização e com novas funcionalidades.
    -
    -
    -
    -
    -
    -
    Ontem
    -
    Lorem ipsum dolor sit amlor sit amet, contur adipiscing elit
    -
    Lorem ipsum dolor sit amlor sit amet, contur adipiscing elit.
    -
    -
    -
    -
    -
    -
    Ontem
    -
    Lorem ipsum dolor sit amlor sit amet, contur adipiscing elit
    -
    Lorem ipsum dolor sit amlor sit amet, contur adipiscing elit.
    -
    -
    -
    -
    -
    -
    Ontem
    -
    Lorem ipsum dolor sit amlor sit amet, contur adipiscing elit
    -
    Lorem ipsum dolor sit amlor sit amet, contur adipiscing elit.
    -
    -
    -
    - -
    - - - - - -
    -
    -
    - -
    -
    -

    CACIC - Configurador Automático e Coletor de Informações Computacionais

    -
    -
    -
    diff --git a/src/noosfero-spb-theme/html-reference-resource/event.html b/src/noosfero-spb-theme/html-reference-resource/event.html deleted file mode 100644 index 3f633b4..0000000 --- a/src/noosfero-spb-theme/html-reference-resource/event.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - -
    -

    Título do evento

    -
    - -
    -
    - -
    - 7 de fevereiro à 18 de março de 2015 - http://fga.unb.br/unb-gama/contato - - Área Especial de Indústria Projeção A - Gama - Setor Leste - Brasília - CEP: 72.444-240 - - -
    -
    - -
    -

    Morbi est est, blandit sit amet, sagittis vel, euismod vel, velit. Pellentesque egestas sem.

    -
    -

    Morbi in sem quis dui placerat ornare. Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu. Cras consequat.

    - -

    Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus.

    - -

    Phasellus ultrices nulla quis nibh. Quisque a lectus. Donec consectetuer ligula vulputate sem tristique cursus. Nam nulla quam, gravida non, commodo a, sodales sit amet, nisi.

    -
    -
    -
    - - -
    -
    - -
    -

    CACIC - Configurador Automático e Coletor de Informações Computacionais

    -
    -
    - -
    - - - - - - - - - - -
    Outros Eventos
    29/03 - Encontro dos colaboradores DF
    29/03 - Lançamento da versão 2.0
    -
    -
    \ No newline at end of file diff --git a/src/noosfero-spb-theme/html-reference-resource/list-item-initial-page.html b/src/noosfero-spb-theme/html-reference-resource/list-item-initial-page.html deleted file mode 100644 index e2b8c0c..0000000 --- a/src/noosfero-spb-theme/html-reference-resource/list-item-initial-page.html +++ /dev/null @@ -1,21 +0,0 @@ -
  • -
    Dezembro 11, 2014
    - -
  • \ No newline at end of file diff --git a/src/noosfero-spb-theme/images/503-logo.jpg b/src/noosfero-spb-theme/images/503-logo.jpg deleted file mode 100644 index 9abf016..0000000 Binary files a/src/noosfero-spb-theme/images/503-logo.jpg and /dev/null differ diff --git a/src/noosfero-spb-theme/images/503-small.jpg b/src/noosfero-spb-theme/images/503-small.jpg deleted file mode 100644 index c2c0efa..0000000 Binary files a/src/noosfero-spb-theme/images/503-small.jpg and /dev/null differ diff --git a/src/noosfero-spb-theme/images/503.jpg b/src/noosfero-spb-theme/images/503.jpg deleted file mode 100644 index 5048c71..0000000 Binary files a/src/noosfero-spb-theme/images/503.jpg and /dev/null differ diff --git a/src/noosfero-spb-theme/images/acesso-a-informacao.png b/src/noosfero-spb-theme/images/acesso-a-informacao.png deleted file mode 100644 index fffec98..0000000 Binary files a/src/noosfero-spb-theme/images/acesso-a-informacao.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/acesso-a-infornacao.png b/src/noosfero-spb-theme/images/acesso-a-infornacao.png deleted file mode 100644 index fffec98..0000000 Binary files a/src/noosfero-spb-theme/images/acesso-a-infornacao.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/alerta-cadastro16.jpg b/src/noosfero-spb-theme/images/alerta-cadastro16.jpg deleted file mode 100644 index 2ba5a10..0000000 Binary files a/src/noosfero-spb-theme/images/alerta-cadastro16.jpg and /dev/null differ diff --git a/src/noosfero-spb-theme/images/arrow-globe-icon.png b/src/noosfero-spb-theme/images/arrow-globe-icon.png deleted file mode 100644 index 4446447..0000000 Binary files a/src/noosfero-spb-theme/images/arrow-globe-icon.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/arrow_down.jpg b/src/noosfero-spb-theme/images/arrow_down.jpg deleted file mode 100644 index ae93957..0000000 Binary files a/src/noosfero-spb-theme/images/arrow_down.jpg and /dev/null differ diff --git a/src/noosfero-spb-theme/images/arrow_right.jpg b/src/noosfero-spb-theme/images/arrow_right.jpg deleted file mode 100644 index c91c8d0..0000000 Binary files a/src/noosfero-spb-theme/images/arrow_right.jpg and /dev/null differ diff --git a/src/noosfero-spb-theme/images/background_footer.png b/src/noosfero-spb-theme/images/background_footer.png deleted file mode 100644 index 2082c3e..0000000 Binary files a/src/noosfero-spb-theme/images/background_footer.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/balao-amarelo.png b/src/noosfero-spb-theme/images/balao-amarelo.png deleted file mode 100644 index a3adc03..0000000 Binary files a/src/noosfero-spb-theme/images/balao-amarelo.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/balloon-icon.png b/src/noosfero-spb-theme/images/balloon-icon.png deleted file mode 100644 index 6974af1..0000000 Binary files a/src/noosfero-spb-theme/images/balloon-icon.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/barra-menu-user-bg.png b/src/noosfero-spb-theme/images/barra-menu-user-bg.png deleted file mode 100644 index 08e7707..0000000 Binary files a/src/noosfero-spb-theme/images/barra-menu-user-bg.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/barra-psocial-bg-contarste.png b/src/noosfero-spb-theme/images/barra-psocial-bg-contarste.png deleted file mode 100644 index d533843..0000000 Binary files a/src/noosfero-spb-theme/images/barra-psocial-bg-contarste.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/barra-psocial-bg.png b/src/noosfero-spb-theme/images/barra-psocial-bg.png deleted file mode 100644 index c379867..0000000 Binary files a/src/noosfero-spb-theme/images/barra-psocial-bg.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/barra-psocial.png b/src/noosfero-spb-theme/images/barra-psocial.png deleted file mode 100644 index f2946eb..0000000 Binary files a/src/noosfero-spb-theme/images/barra-psocial.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/beneficiados-icon.png b/src/noosfero-spb-theme/images/beneficiados-icon.png deleted file mode 100644 index 180191d..0000000 Binary files a/src/noosfero-spb-theme/images/beneficiados-icon.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/bg-bloco-de-trilhas.png b/src/noosfero-spb-theme/images/bg-bloco-de-trilhas.png deleted file mode 100644 index df72b20..0000000 Binary files a/src/noosfero-spb-theme/images/bg-bloco-de-trilhas.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/bg-btn-ver-mais-1px.png b/src/noosfero-spb-theme/images/bg-btn-ver-mais-1px.png deleted file mode 100644 index 1ffab6a..0000000 Binary files a/src/noosfero-spb-theme/images/bg-btn-ver-mais-1px.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/bg-fundo-verde-tags.png b/src/noosfero-spb-theme/images/bg-fundo-verde-tags.png deleted file mode 100644 index 82ca489..0000000 Binary files a/src/noosfero-spb-theme/images/bg-fundo-verde-tags.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/bg-linhas-cinza.png b/src/noosfero-spb-theme/images/bg-linhas-cinza.png deleted file mode 100644 index 3dcb773..0000000 Binary files a/src/noosfero-spb-theme/images/bg-linhas-cinza.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/bg-menu-mobile-panel.png b/src/noosfero-spb-theme/images/bg-menu-mobile-panel.png deleted file mode 100644 index 0a084bf..0000000 Binary files a/src/noosfero-spb-theme/images/bg-menu-mobile-panel.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/bg-menu-mobile.png b/src/noosfero-spb-theme/images/bg-menu-mobile.png deleted file mode 100644 index 3b7954f..0000000 Binary files a/src/noosfero-spb-theme/images/bg-menu-mobile.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/bg-paginacao-preto.png b/src/noosfero-spb-theme/images/bg-paginacao-preto.png deleted file mode 100644 index 5d8f15a..0000000 Binary files a/src/noosfero-spb-theme/images/bg-paginacao-preto.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/bg-paginacao.png b/src/noosfero-spb-theme/images/bg-paginacao.png deleted file mode 100644 index 1362729..0000000 Binary files a/src/noosfero-spb-theme/images/bg-paginacao.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/bg-palacio-do-planalto.jpg b/src/noosfero-spb-theme/images/bg-palacio-do-planalto.jpg deleted file mode 100644 index 7034432..0000000 Binary files a/src/noosfero-spb-theme/images/bg-palacio-do-planalto.jpg and /dev/null differ diff --git a/src/noosfero-spb-theme/images/bg-titulo-interno.png b/src/noosfero-spb-theme/images/bg-titulo-interno.png deleted file mode 100644 index b186658..0000000 Binary files a/src/noosfero-spb-theme/images/bg-titulo-interno.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/bg-titulo-login.png b/src/noosfero-spb-theme/images/bg-titulo-login.png deleted file mode 100644 index 3672fa0..0000000 Binary files a/src/noosfero-spb-theme/images/bg-titulo-login.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/bg_h1.gif b/src/noosfero-spb-theme/images/bg_h1.gif deleted file mode 100644 index 2f5414f..0000000 Binary files a/src/noosfero-spb-theme/images/bg_h1.gif and /dev/null differ diff --git a/src/noosfero-spb-theme/images/bg_h3_busca.gif b/src/noosfero-spb-theme/images/bg_h3_busca.gif deleted file mode 100644 index 73faf7f..0000000 Binary files a/src/noosfero-spb-theme/images/bg_h3_busca.gif and /dev/null differ diff --git a/src/noosfero-spb-theme/images/bg_tags.png b/src/noosfero-spb-theme/images/bg_tags.png deleted file mode 100644 index 2e30379..0000000 Binary files a/src/noosfero-spb-theme/images/bg_tags.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/border-hor.png b/src/noosfero-spb-theme/images/border-hor.png deleted file mode 100644 index 8c1f185..0000000 Binary files a/src/noosfero-spb-theme/images/border-hor.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/border-ver.png b/src/noosfero-spb-theme/images/border-ver.png deleted file mode 100644 index 037ebdb..0000000 Binary files a/src/noosfero-spb-theme/images/border-ver.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/botao-enviar-pairwise.png b/src/noosfero-spb-theme/images/botao-enviar-pairwise.png deleted file mode 100644 index 9f5025b..0000000 Binary files a/src/noosfero-spb-theme/images/botao-enviar-pairwise.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/bottom-arrow-black.png b/src/noosfero-spb-theme/images/bottom-arrow-black.png deleted file mode 100644 index 61b3730..0000000 Binary files a/src/noosfero-spb-theme/images/bottom-arrow-black.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/bottom-arrow.png b/src/noosfero-spb-theme/images/bottom-arrow.png deleted file mode 100644 index eb49326..0000000 Binary files a/src/noosfero-spb-theme/images/bottom-arrow.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/brasil.png b/src/noosfero-spb-theme/images/brasil.png deleted file mode 100644 index 0ac6ed2..0000000 Binary files a/src/noosfero-spb-theme/images/brasil.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/btn_busca.png b/src/noosfero-spb-theme/images/btn_busca.png deleted file mode 100644 index 5e3dd03..0000000 Binary files a/src/noosfero-spb-theme/images/btn_busca.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/btn_cancelar_login.png b/src/noosfero-spb-theme/images/btn_cancelar_login.png deleted file mode 100644 index b081e5e..0000000 Binary files a/src/noosfero-spb-theme/images/btn_cancelar_login.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/btn_commit.png b/src/noosfero-spb-theme/images/btn_commit.png deleted file mode 100644 index 5e3dd03..0000000 Binary files a/src/noosfero-spb-theme/images/btn_commit.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/btn_continue.png b/src/noosfero-spb-theme/images/btn_continue.png deleted file mode 100644 index 74445f1..0000000 Binary files a/src/noosfero-spb-theme/images/btn_continue.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/btn_duvida_pairwise.png b/src/noosfero-spb-theme/images/btn_duvida_pairwise.png deleted file mode 100644 index 49f06ac..0000000 Binary files a/src/noosfero-spb-theme/images/btn_duvida_pairwise.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/btn_duvida_pairwise_hover.png b/src/noosfero-spb-theme/images/btn_duvida_pairwise_hover.png deleted file mode 100644 index 666f105..0000000 Binary files a/src/noosfero-spb-theme/images/btn_duvida_pairwise_hover.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/btn_entrar_login.png b/src/noosfero-spb-theme/images/btn_entrar_login.png deleted file mode 100644 index 7900127..0000000 Binary files a/src/noosfero-spb-theme/images/btn_entrar_login.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/btn_entrar_login_hover.png b/src/noosfero-spb-theme/images/btn_entrar_login_hover.png deleted file mode 100644 index e3bb0d7..0000000 Binary files a/src/noosfero-spb-theme/images/btn_entrar_login_hover.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/bullet.png b/src/noosfero-spb-theme/images/bullet.png deleted file mode 100644 index e5fb945..0000000 Binary files a/src/noosfero-spb-theme/images/bullet.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/button-read-more-vazio-contraste.png b/src/noosfero-spb-theme/images/button-read-more-vazio-contraste.png deleted file mode 100755 index 0be02f4..0000000 Binary files a/src/noosfero-spb-theme/images/button-read-more-vazio-contraste.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/button-read-more-vazio.png b/src/noosfero-spb-theme/images/button-read-more-vazio.png deleted file mode 100644 index fe2488e..0000000 Binary files a/src/noosfero-spb-theme/images/button-read-more-vazio.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/button-read-more2.png b/src/noosfero-spb-theme/images/button-read-more2.png deleted file mode 100644 index 6d0c0f0..0000000 Binary files a/src/noosfero-spb-theme/images/button-read-more2.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/cabecalho_pairwise.png b/src/noosfero-spb-theme/images/cabecalho_pairwise.png deleted file mode 100755 index 6756212..0000000 Binary files a/src/noosfero-spb-theme/images/cabecalho_pairwise.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/cadeado.png b/src/noosfero-spb-theme/images/cadeado.png deleted file mode 100644 index f2e1c87..0000000 Binary files a/src/noosfero-spb-theme/images/cadeado.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/calendar-icon.png b/src/noosfero-spb-theme/images/calendar-icon.png deleted file mode 100644 index 6ea0a2b..0000000 Binary files a/src/noosfero-spb-theme/images/calendar-icon.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/carta-comentarios.png b/src/noosfero-spb-theme/images/carta-comentarios.png deleted file mode 100644 index c72c4f2..0000000 Binary files a/src/noosfero-spb-theme/images/carta-comentarios.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/chat-icon.png b/src/noosfero-spb-theme/images/chat-icon.png deleted file mode 100644 index a79c397..0000000 Binary files a/src/noosfero-spb-theme/images/chat-icon.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/coala.jpeg b/src/noosfero-spb-theme/images/coala.jpeg deleted file mode 100644 index 6e8eaac..0000000 Binary files a/src/noosfero-spb-theme/images/coala.jpeg and /dev/null differ diff --git a/src/noosfero-spb-theme/images/comentarios.png b/src/noosfero-spb-theme/images/comentarios.png deleted file mode 100644 index f1855a3..0000000 Binary files a/src/noosfero-spb-theme/images/comentarios.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/comunidade-evento-imagem-evento.jpg b/src/noosfero-spb-theme/images/comunidade-evento-imagem-evento.jpg deleted file mode 100644 index db178f2..0000000 Binary files a/src/noosfero-spb-theme/images/comunidade-evento-imagem-evento.jpg and /dev/null differ diff --git a/src/noosfero-spb-theme/images/comunidade-evento-imagem-evento.png b/src/noosfero-spb-theme/images/comunidade-evento-imagem-evento.png deleted file mode 100644 index 838d29d..0000000 Binary files a/src/noosfero-spb-theme/images/comunidade-evento-imagem-evento.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/docs-board-icon.png b/src/noosfero-spb-theme/images/docs-board-icon.png deleted file mode 100644 index 8f66ef5..0000000 Binary files a/src/noosfero-spb-theme/images/docs-board-icon.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/download-icon.png b/src/noosfero-spb-theme/images/download-icon.png deleted file mode 100644 index e47f2a3..0000000 Binary files a/src/noosfero-spb-theme/images/download-icon.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/download-mini_icon.png b/src/noosfero-spb-theme/images/download-mini_icon.png deleted file mode 100644 index eb1f5e0..0000000 Binary files a/src/noosfero-spb-theme/images/download-mini_icon.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/downloads-icon.png b/src/noosfero-spb-theme/images/downloads-icon.png deleted file mode 100644 index 1973db5..0000000 Binary files a/src/noosfero-spb-theme/images/downloads-icon.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/economizados-icon.png b/src/noosfero-spb-theme/images/economizados-icon.png deleted file mode 100644 index 75fa752..0000000 Binary files a/src/noosfero-spb-theme/images/economizados-icon.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/em-destaque.png b/src/noosfero-spb-theme/images/em-destaque.png deleted file mode 100644 index d729d35..0000000 Binary files a/src/noosfero-spb-theme/images/em-destaque.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/enterprise-big.png b/src/noosfero-spb-theme/images/enterprise-big.png deleted file mode 100644 index 12746e8..0000000 Binary files a/src/noosfero-spb-theme/images/enterprise-big.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/enterprise-icon.png b/src/noosfero-spb-theme/images/enterprise-icon.png deleted file mode 100644 index 8f31987..0000000 Binary files a/src/noosfero-spb-theme/images/enterprise-icon.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/enterprise-minor.png b/src/noosfero-spb-theme/images/enterprise-minor.png deleted file mode 100644 index 4460368..0000000 Binary files a/src/noosfero-spb-theme/images/enterprise-minor.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/enterprise-portrait.png b/src/noosfero-spb-theme/images/enterprise-portrait.png deleted file mode 100644 index 637515b..0000000 Binary files a/src/noosfero-spb-theme/images/enterprise-portrait.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/enterprise-thumb.png b/src/noosfero-spb-theme/images/enterprise-thumb.png deleted file mode 100644 index 68f65e1..0000000 Binary files a/src/noosfero-spb-theme/images/enterprise-thumb.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/facebook-widget.png b/src/noosfero-spb-theme/images/facebook-widget.png deleted file mode 100644 index 60fb8f8..0000000 Binary files a/src/noosfero-spb-theme/images/facebook-widget.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/facebook.png b/src/noosfero-spb-theme/images/facebook.png deleted file mode 100644 index 5895cc6..0000000 Binary files a/src/noosfero-spb-theme/images/facebook.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/favicon.ico b/src/noosfero-spb-theme/images/favicon.ico deleted file mode 100644 index f8c4036..0000000 Binary files a/src/noosfero-spb-theme/images/favicon.ico and /dev/null differ diff --git a/src/noosfero-spb-theme/images/flag-en.gif b/src/noosfero-spb-theme/images/flag-en.gif deleted file mode 100644 index 350aa05..0000000 Binary files a/src/noosfero-spb-theme/images/flag-en.gif and /dev/null differ diff --git a/src/noosfero-spb-theme/images/flag-en.png b/src/noosfero-spb-theme/images/flag-en.png deleted file mode 100644 index 0f4fb95..0000000 Binary files a/src/noosfero-spb-theme/images/flag-en.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/flag-es.gif b/src/noosfero-spb-theme/images/flag-es.gif deleted file mode 100644 index b98c599..0000000 Binary files a/src/noosfero-spb-theme/images/flag-es.gif and /dev/null differ diff --git a/src/noosfero-spb-theme/images/flag-pt_br.png b/src/noosfero-spb-theme/images/flag-pt_br.png deleted file mode 100644 index f0e0221..0000000 Binary files a/src/noosfero-spb-theme/images/flag-pt_br.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/flickr.png b/src/noosfero-spb-theme/images/flickr.png deleted file mode 100644 index bc3aee7..0000000 Binary files a/src/noosfero-spb-theme/images/flickr.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/fundo-de-tela-amarelo.png b/src/noosfero-spb-theme/images/fundo-de-tela-amarelo.png deleted file mode 100644 index 44ffb0d..0000000 Binary files a/src/noosfero-spb-theme/images/fundo-de-tela-amarelo.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/globe-icon.png b/src/noosfero-spb-theme/images/globe-icon.png deleted file mode 100644 index a15bbab..0000000 Binary files a/src/noosfero-spb-theme/images/globe-icon.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/google_follow.png b/src/noosfero-spb-theme/images/google_follow.png deleted file mode 100644 index 385410f..0000000 Binary files a/src/noosfero-spb-theme/images/google_follow.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/google_follow.svg b/src/noosfero-spb-theme/images/google_follow.svg deleted file mode 100644 index bc1ee39..0000000 --- a/src/noosfero-spb-theme/images/google_follow.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - diff --git a/src/noosfero-spb-theme/images/hdot2.gif b/src/noosfero-spb-theme/images/hdot2.gif deleted file mode 100644 index b99f4ba..0000000 Binary files a/src/noosfero-spb-theme/images/hdot2.gif and /dev/null differ diff --git a/src/noosfero-spb-theme/images/header.gif b/src/noosfero-spb-theme/images/header.gif deleted file mode 100644 index 9e231ba..0000000 Binary files a/src/noosfero-spb-theme/images/header.gif and /dev/null differ diff --git a/src/noosfero-spb-theme/images/hub-arrow-right.png b/src/noosfero-spb-theme/images/hub-arrow-right.png deleted file mode 100644 index 6c65f4c..0000000 Binary files a/src/noosfero-spb-theme/images/hub-arrow-right.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/hub-not-pinned-icon.png b/src/noosfero-spb-theme/images/hub-not-pinned-icon.png deleted file mode 100644 index 9b510c8..0000000 Binary files a/src/noosfero-spb-theme/images/hub-not-pinned-icon.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/hub-not-promote-icon.png b/src/noosfero-spb-theme/images/hub-not-promote-icon.png deleted file mode 100644 index 4f57c4e..0000000 Binary files a/src/noosfero-spb-theme/images/hub-not-promote-icon.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/hub-pinned-icon.png b/src/noosfero-spb-theme/images/hub-pinned-icon.png deleted file mode 100644 index 9b510c8..0000000 Binary files a/src/noosfero-spb-theme/images/hub-pinned-icon.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/hub-promote-icon.png b/src/noosfero-spb-theme/images/hub-promote-icon.png deleted file mode 100644 index 4f57c4e..0000000 Binary files a/src/noosfero-spb-theme/images/hub-promote-icon.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/hub-remove-icon.png b/src/noosfero-spb-theme/images/hub-remove-icon.png deleted file mode 100644 index 1246778..0000000 Binary files a/src/noosfero-spb-theme/images/hub-remove-icon.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/hub-samarelo-a.png b/src/noosfero-spb-theme/images/hub-samarelo-a.png deleted file mode 100644 index 453d2a4..0000000 Binary files a/src/noosfero-spb-theme/images/hub-samarelo-a.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/hub-samarelo-b.png b/src/noosfero-spb-theme/images/hub-samarelo-b.png deleted file mode 100644 index 936bf46..0000000 Binary files a/src/noosfero-spb-theme/images/hub-samarelo-b.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/hub-samarelo.gif b/src/noosfero-spb-theme/images/hub-samarelo.gif deleted file mode 100644 index 2da3de2..0000000 Binary files a/src/noosfero-spb-theme/images/hub-samarelo.gif and /dev/null differ diff --git a/src/noosfero-spb-theme/images/hub-sverde-a.png b/src/noosfero-spb-theme/images/hub-sverde-a.png deleted file mode 100644 index 5bc1c40..0000000 Binary files a/src/noosfero-spb-theme/images/hub-sverde-a.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/hub-sverde-b.png b/src/noosfero-spb-theme/images/hub-sverde-b.png deleted file mode 100644 index ee21942..0000000 Binary files a/src/noosfero-spb-theme/images/hub-sverde-b.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/hub-svermelho-a.png b/src/noosfero-spb-theme/images/hub-svermelho-a.png deleted file mode 100644 index 36d4dfc..0000000 Binary files a/src/noosfero-spb-theme/images/hub-svermelho-a.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/hub-svermelho-b.png b/src/noosfero-spb-theme/images/hub-svermelho-b.png deleted file mode 100644 index 6df643a..0000000 Binary files a/src/noosfero-spb-theme/images/hub-svermelho-b.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/hub-time-bg.gif b/src/noosfero-spb-theme/images/hub-time-bg.gif deleted file mode 100644 index 43032c7..0000000 Binary files a/src/noosfero-spb-theme/images/hub-time-bg.gif and /dev/null differ diff --git a/src/noosfero-spb-theme/images/ic-calendar.png b/src/noosfero-spb-theme/images/ic-calendar.png deleted file mode 100644 index 0f32291..0000000 Binary files a/src/noosfero-spb-theme/images/ic-calendar.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/icone-branco-facebook.png b/src/noosfero-spb-theme/images/icone-branco-facebook.png deleted file mode 100644 index 5f4046c..0000000 Binary files a/src/noosfero-spb-theme/images/icone-branco-facebook.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/icone-branco-flickr.png b/src/noosfero-spb-theme/images/icone-branco-flickr.png deleted file mode 100644 index bf9b974..0000000 Binary files a/src/noosfero-spb-theme/images/icone-branco-flickr.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/icone-branco-twitter.png b/src/noosfero-spb-theme/images/icone-branco-twitter.png deleted file mode 100644 index b91d361..0000000 Binary files a/src/noosfero-spb-theme/images/icone-branco-twitter.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/icone-branco-youtube.png b/src/noosfero-spb-theme/images/icone-branco-youtube.png deleted file mode 100644 index 345983e..0000000 Binary files a/src/noosfero-spb-theme/images/icone-branco-youtube.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/icone-facebook.gif b/src/noosfero-spb-theme/images/icone-facebook.gif deleted file mode 100644 index 5cdbe68..0000000 Binary files a/src/noosfero-spb-theme/images/icone-facebook.gif and /dev/null differ diff --git a/src/noosfero-spb-theme/images/icone-facebook.png b/src/noosfero-spb-theme/images/icone-facebook.png deleted file mode 100644 index 9e12698..0000000 Binary files a/src/noosfero-spb-theme/images/icone-facebook.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/icone-flickr.png b/src/noosfero-spb-theme/images/icone-flickr.png deleted file mode 100644 index fa805c1..0000000 Binary files a/src/noosfero-spb-theme/images/icone-flickr.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/icone-related-items.png b/src/noosfero-spb-theme/images/icone-related-items.png deleted file mode 100644 index 59bac09..0000000 Binary files a/src/noosfero-spb-theme/images/icone-related-items.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/icone-twitter.png b/src/noosfero-spb-theme/images/icone-twitter.png deleted file mode 100644 index 2538edc..0000000 Binary files a/src/noosfero-spb-theme/images/icone-twitter.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/icone-verde-facebook.png b/src/noosfero-spb-theme/images/icone-verde-facebook.png deleted file mode 100644 index 18b907a..0000000 Binary files a/src/noosfero-spb-theme/images/icone-verde-facebook.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/icone-verde-flickr.png b/src/noosfero-spb-theme/images/icone-verde-flickr.png deleted file mode 100644 index 0d997cf..0000000 Binary files a/src/noosfero-spb-theme/images/icone-verde-flickr.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/icone-verde-twitter.png b/src/noosfero-spb-theme/images/icone-verde-twitter.png deleted file mode 100644 index d0b3b5a..0000000 Binary files a/src/noosfero-spb-theme/images/icone-verde-twitter.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/icone-verde-youtube.png b/src/noosfero-spb-theme/images/icone-verde-youtube.png deleted file mode 100644 index 4ed1206..0000000 Binary files a/src/noosfero-spb-theme/images/icone-verde-youtube.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/icone-youtube.png b/src/noosfero-spb-theme/images/icone-youtube.png deleted file mode 100644 index 003c75b..0000000 Binary files a/src/noosfero-spb-theme/images/icone-youtube.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/icone_pin.png b/src/noosfero-spb-theme/images/icone_pin.png deleted file mode 100644 index 3dcfed8..0000000 Binary files a/src/noosfero-spb-theme/images/icone_pin.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/icones_home_branco.jpg b/src/noosfero-spb-theme/images/icones_home_branco.jpg deleted file mode 100644 index 15b9026..0000000 Binary files a/src/noosfero-spb-theme/images/icones_home_branco.jpg and /dev/null differ diff --git a/src/noosfero-spb-theme/images/img_login_popUp.png b/src/noosfero-spb-theme/images/img_login_popUp.png deleted file mode 100644 index ce82e38..0000000 Binary files a/src/noosfero-spb-theme/images/img_login_popUp.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/instagram-widget.png b/src/noosfero-spb-theme/images/instagram-widget.png deleted file mode 100644 index b51f7de..0000000 Binary files a/src/noosfero-spb-theme/images/instagram-widget.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/left-arrow-black.png b/src/noosfero-spb-theme/images/left-arrow-black.png deleted file mode 100644 index 2697177..0000000 Binary files a/src/noosfero-spb-theme/images/left-arrow-black.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/left-arrow.png b/src/noosfero-spb-theme/images/left-arrow.png deleted file mode 100644 index 89b144c..0000000 Binary files a/src/noosfero-spb-theme/images/left-arrow.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/login16.png b/src/noosfero-spb-theme/images/login16.png deleted file mode 100644 index 1ffa50c..0000000 Binary files a/src/noosfero-spb-theme/images/login16.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/logo-PS-barra-pb.png b/src/noosfero-spb-theme/images/logo-PS-barra-pb.png deleted file mode 100644 index f9f9d42..0000000 Binary files a/src/noosfero-spb-theme/images/logo-PS-barra-pb.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/logo-PS-barra.png b/src/noosfero-spb-theme/images/logo-PS-barra.png deleted file mode 100644 index 77c694e..0000000 Binary files a/src/noosfero-spb-theme/images/logo-PS-barra.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/logo-participa.png b/src/noosfero-spb-theme/images/logo-participa.png deleted file mode 100644 index 436bceb..0000000 Binary files a/src/noosfero-spb-theme/images/logo-participa.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/logo_facebook_50x50.png b/src/noosfero-spb-theme/images/logo_facebook_50x50.png deleted file mode 100644 index 7e5fdb3..0000000 Binary files a/src/noosfero-spb-theme/images/logo_facebook_50x50.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/logo_twitter_50x50.png b/src/noosfero-spb-theme/images/logo_twitter_50x50.png deleted file mode 100644 index 4ffd721..0000000 Binary files a/src/noosfero-spb-theme/images/logo_twitter_50x50.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/logo_twitter_bird_blue_50x50.png b/src/noosfero-spb-theme/images/logo_twitter_bird_blue_50x50.png deleted file mode 100644 index a43574b..0000000 Binary files a/src/noosfero-spb-theme/images/logo_twitter_bird_blue_50x50.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/logo_twitter_bird_white_50x50.png b/src/noosfero-spb-theme/images/logo_twitter_bird_white_50x50.png deleted file mode 100644 index 90fdebd..0000000 Binary files a/src/noosfero-spb-theme/images/logo_twitter_bird_white_50x50.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/logotipo_spb.svg b/src/noosfero-spb-theme/images/logotipo_spb.svg deleted file mode 100644 index b3088ec..0000000 --- a/src/noosfero-spb-theme/images/logotipo_spb.svg +++ /dev/null @@ -1,6 +0,0 @@ - - \ No newline at end of file diff --git a/src/noosfero-spb-theme/images/logotipo_spb_ac.svg b/src/noosfero-spb-theme/images/logotipo_spb_ac.svg deleted file mode 100644 index cc61c20..0000000 --- a/src/noosfero-spb-theme/images/logotipo_spb_ac.svg +++ /dev/null @@ -1,6 +0,0 @@ - - \ No newline at end of file diff --git a/src/noosfero-spb-theme/images/logotipo_spb_beta.svg b/src/noosfero-spb-theme/images/logotipo_spb_beta.svg deleted file mode 100644 index cb38bf8..0000000 --- a/src/noosfero-spb-theme/images/logotipo_spb_beta.svg +++ /dev/null @@ -1,8 +0,0 @@ - \ No newline at end of file diff --git a/src/noosfero-spb-theme/images/logotipo_spb_beta3.svg b/src/noosfero-spb-theme/images/logotipo_spb_beta3.svg deleted file mode 100644 index fdf6df3..0000000 --- a/src/noosfero-spb-theme/images/logotipo_spb_beta3.svg +++ /dev/null @@ -1,6 +0,0 @@ - - \ No newline at end of file diff --git a/src/noosfero-spb-theme/images/logotipo_spb_beta_ac.svg b/src/noosfero-spb-theme/images/logotipo_spb_beta_ac.svg deleted file mode 100644 index 2b7034b..0000000 --- a/src/noosfero-spb-theme/images/logotipo_spb_beta_ac.svg +++ /dev/null @@ -1,8 +0,0 @@ - \ No newline at end of file diff --git a/src/noosfero-spb-theme/images/logotipo_spb_beta_ac3.svg b/src/noosfero-spb-theme/images/logotipo_spb_beta_ac3.svg deleted file mode 100644 index 64e47e6..0000000 --- a/src/noosfero-spb-theme/images/logotipo_spb_beta_ac3.svg +++ /dev/null @@ -1,6 +0,0 @@ - - \ No newline at end of file diff --git a/src/noosfero-spb-theme/images/mais_fotos.png b/src/noosfero-spb-theme/images/mais_fotos.png deleted file mode 100644 index 9aa88f0..0000000 Binary files a/src/noosfero-spb-theme/images/mais_fotos.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/marca-participacao-social.png b/src/noosfero-spb-theme/images/marca-participacao-social.png deleted file mode 100644 index 4ad05e3..0000000 Binary files a/src/noosfero-spb-theme/images/marca-participacao-social.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/mascote-bug.png b/src/noosfero-spb-theme/images/mascote-bug.png deleted file mode 100644 index e9f98ec..0000000 Binary files a/src/noosfero-spb-theme/images/mascote-bug.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/menu-ativo.gif b/src/noosfero-spb-theme/images/menu-ativo.gif deleted file mode 100644 index 89415eb..0000000 Binary files a/src/noosfero-spb-theme/images/menu-ativo.gif and /dev/null differ diff --git a/src/noosfero-spb-theme/images/menu-mobile-item.png b/src/noosfero-spb-theme/images/menu-mobile-item.png deleted file mode 100644 index d3fa756..0000000 Binary files a/src/noosfero-spb-theme/images/menu-mobile-item.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/negative-hand.png b/src/noosfero-spb-theme/images/negative-hand.png deleted file mode 100644 index 59804b4..0000000 Binary files a/src/noosfero-spb-theme/images/negative-hand.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/no-image.gif b/src/noosfero-spb-theme/images/no-image.gif deleted file mode 100644 index e565824..0000000 Binary files a/src/noosfero-spb-theme/images/no-image.gif and /dev/null differ diff --git a/src/noosfero-spb-theme/images/no-image.png b/src/noosfero-spb-theme/images/no-image.png deleted file mode 100644 index 34340e5..0000000 Binary files a/src/noosfero-spb-theme/images/no-image.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/oops.png b/src/noosfero-spb-theme/images/oops.png deleted file mode 100644 index ddeb2dd..0000000 Binary files a/src/noosfero-spb-theme/images/oops.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/person-minor.png b/src/noosfero-spb-theme/images/person-minor.png deleted file mode 100644 index b410d88..0000000 Binary files a/src/noosfero-spb-theme/images/person-minor.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/person-minor_50.png b/src/noosfero-spb-theme/images/person-minor_50.png deleted file mode 100644 index 7bf25a3..0000000 Binary files a/src/noosfero-spb-theme/images/person-minor_50.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/portlet-footer-textmore.png b/src/noosfero-spb-theme/images/portlet-footer-textmore.png deleted file mode 100644 index 777d1af..0000000 Binary files a/src/noosfero-spb-theme/images/portlet-footer-textmore.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/portlet-header-expanded.gif b/src/noosfero-spb-theme/images/portlet-header-expanded.gif deleted file mode 100644 index a46eb43..0000000 Binary files a/src/noosfero-spb-theme/images/portlet-header-expanded.gif and /dev/null differ diff --git a/src/noosfero-spb-theme/images/portlet-header.gif b/src/noosfero-spb-theme/images/portlet-header.gif deleted file mode 100644 index 6aa5d3f..0000000 Binary files a/src/noosfero-spb-theme/images/portlet-header.gif and /dev/null differ diff --git a/src/noosfero-spb-theme/images/positive-hand.png b/src/noosfero-spb-theme/images/positive-hand.png deleted file mode 100644 index 44c85ca..0000000 Binary files a/src/noosfero-spb-theme/images/positive-hand.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/prompt_bg.png b/src/noosfero-spb-theme/images/prompt_bg.png deleted file mode 100644 index 5a8ce78..0000000 Binary files a/src/noosfero-spb-theme/images/prompt_bg.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/prompt_bg_hover.png b/src/noosfero-spb-theme/images/prompt_bg_hover.png deleted file mode 100644 index 25eb01e..0000000 Binary files a/src/noosfero-spb-theme/images/prompt_bg_hover.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/prompt_bg_normal.png b/src/noosfero-spb-theme/images/prompt_bg_normal.png deleted file mode 100644 index c8cc9c1..0000000 Binary files a/src/noosfero-spb-theme/images/prompt_bg_normal.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/read-more-home.png b/src/noosfero-spb-theme/images/read-more-home.png deleted file mode 100644 index a39fcd0..0000000 Binary files a/src/noosfero-spb-theme/images/read-more-home.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/readmoreblue.png b/src/noosfero-spb-theme/images/readmoreblue.png deleted file mode 100644 index 74408e3..0000000 Binary files a/src/noosfero-spb-theme/images/readmoreblue.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/readmorebrown.png b/src/noosfero-spb-theme/images/readmorebrown.png deleted file mode 100644 index 291a6e8..0000000 Binary files a/src/noosfero-spb-theme/images/readmorebrown.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/readmoredarkblue.png b/src/noosfero-spb-theme/images/readmoredarkblue.png deleted file mode 100644 index 18eacef..0000000 Binary files a/src/noosfero-spb-theme/images/readmoredarkblue.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/readmoredarkgray.png b/src/noosfero-spb-theme/images/readmoredarkgray.png deleted file mode 100644 index 898ac8b..0000000 Binary files a/src/noosfero-spb-theme/images/readmoredarkgray.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/readmoregray.png b/src/noosfero-spb-theme/images/readmoregray.png deleted file mode 100644 index 4ead1c0..0000000 Binary files a/src/noosfero-spb-theme/images/readmoregray.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/readmoregreen.png b/src/noosfero-spb-theme/images/readmoregreen.png deleted file mode 100644 index 8c486b8..0000000 Binary files a/src/noosfero-spb-theme/images/readmoregreen.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/readmoreorange.png b/src/noosfero-spb-theme/images/readmoreorange.png deleted file mode 100644 index d5f5a01..0000000 Binary files a/src/noosfero-spb-theme/images/readmoreorange.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/readmorepurple.png b/src/noosfero-spb-theme/images/readmorepurple.png deleted file mode 100644 index ad9f569..0000000 Binary files a/src/noosfero-spb-theme/images/readmorepurple.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/readmorewhiteblue.png b/src/noosfero-spb-theme/images/readmorewhiteblue.png deleted file mode 100644 index 98b89ba..0000000 Binary files a/src/noosfero-spb-theme/images/readmorewhiteblue.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/reportar-erros.png b/src/noosfero-spb-theme/images/reportar-erros.png deleted file mode 100644 index b28c2a1..0000000 Binary files a/src/noosfero-spb-theme/images/reportar-erros.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/right-arrow-black.png b/src/noosfero-spb-theme/images/right-arrow-black.png deleted file mode 100644 index a22badd..0000000 Binary files a/src/noosfero-spb-theme/images/right-arrow-black.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/right-arrow.png b/src/noosfero-spb-theme/images/right-arrow.png deleted file mode 100644 index b8c6940..0000000 Binary files a/src/noosfero-spb-theme/images/right-arrow.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/rss.png b/src/noosfero-spb-theme/images/rss.png deleted file mode 100644 index 7661d92..0000000 Binary files a/src/noosfero-spb-theme/images/rss.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/rss.svg b/src/noosfero-spb-theme/images/rss.svg deleted file mode 100644 index 8256f3b..0000000 --- a/src/noosfero-spb-theme/images/rss.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - diff --git a/src/noosfero-spb-theme/images/search-buttom.gif b/src/noosfero-spb-theme/images/search-buttom.gif deleted file mode 100644 index 460a98e..0000000 Binary files a/src/noosfero-spb-theme/images/search-buttom.gif and /dev/null differ diff --git a/src/noosfero-spb-theme/images/search-button-30px.gif b/src/noosfero-spb-theme/images/search-button-30px.gif deleted file mode 100644 index 3ea65f2..0000000 Binary files a/src/noosfero-spb-theme/images/search-button-30px.gif and /dev/null differ diff --git a/src/noosfero-spb-theme/images/search-button.gif b/src/noosfero-spb-theme/images/search-button.gif deleted file mode 100644 index 460a98e..0000000 Binary files a/src/noosfero-spb-theme/images/search-button.gif and /dev/null differ diff --git a/src/noosfero-spb-theme/images/search-button.png b/src/noosfero-spb-theme/images/search-button.png deleted file mode 100644 index eb2130d..0000000 Binary files a/src/noosfero-spb-theme/images/search-button.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/search-button10.png b/src/noosfero-spb-theme/images/search-button10.png deleted file mode 100644 index cac2696..0000000 Binary files a/src/noosfero-spb-theme/images/search-button10.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/search-button100.png b/src/noosfero-spb-theme/images/search-button100.png deleted file mode 100644 index 42b442b..0000000 Binary files a/src/noosfero-spb-theme/images/search-button100.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/search-button2.gif b/src/noosfero-spb-theme/images/search-button2.gif deleted file mode 100644 index 460a98e..0000000 Binary files a/src/noosfero-spb-theme/images/search-button2.gif and /dev/null differ diff --git a/src/noosfero-spb-theme/images/search-button2.png b/src/noosfero-spb-theme/images/search-button2.png deleted file mode 100644 index 42b442b..0000000 Binary files a/src/noosfero-spb-theme/images/search-button2.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/search-button_oficial.png b/src/noosfero-spb-theme/images/search-button_oficial.png deleted file mode 100644 index 9ac6cb6..0000000 Binary files a/src/noosfero-spb-theme/images/search-button_oficial.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/search-ico.png b/src/noosfero-spb-theme/images/search-ico.png deleted file mode 100644 index 6d102ce..0000000 Binary files a/src/noosfero-spb-theme/images/search-ico.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/search.png b/src/noosfero-spb-theme/images/search.png deleted file mode 100644 index 757f6a5..0000000 Binary files a/src/noosfero-spb-theme/images/search.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/sections-ico.png b/src/noosfero-spb-theme/images/sections-ico.png deleted file mode 100644 index 4ba2a1e..0000000 Binary files a/src/noosfero-spb-theme/images/sections-ico.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/seta_cidadania_justica.png b/src/noosfero-spb-theme/images/seta_cidadania_justica.png deleted file mode 100644 index 242a3a2..0000000 Binary files a/src/noosfero-spb-theme/images/seta_cidadania_justica.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/seta_ciencia_tecnologia.png b/src/noosfero-spb-theme/images/seta_ciencia_tecnologia.png deleted file mode 100644 index ae05455..0000000 Binary files a/src/noosfero-spb-theme/images/seta_ciencia_tecnologia.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/seta_cultura.png b/src/noosfero-spb-theme/images/seta_cultura.png deleted file mode 100644 index d221d2c..0000000 Binary files a/src/noosfero-spb-theme/images/seta_cultura.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/seta_defesa_seguranca.png b/src/noosfero-spb-theme/images/seta_defesa_seguranca.png deleted file mode 100644 index 2668bd1..0000000 Binary files a/src/noosfero-spb-theme/images/seta_defesa_seguranca.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/seta_economia_emprego.png b/src/noosfero-spb-theme/images/seta_economia_emprego.png deleted file mode 100644 index ff79913..0000000 Binary files a/src/noosfero-spb-theme/images/seta_economia_emprego.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/seta_educacao.png b/src/noosfero-spb-theme/images/seta_educacao.png deleted file mode 100644 index 7934c02..0000000 Binary files a/src/noosfero-spb-theme/images/seta_educacao.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/seta_esporte.png b/src/noosfero-spb-theme/images/seta_esporte.png deleted file mode 100644 index dd484c6..0000000 Binary files a/src/noosfero-spb-theme/images/seta_esporte.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/seta_governo.png b/src/noosfero-spb-theme/images/seta_governo.png deleted file mode 100644 index 7d6341d..0000000 Binary files a/src/noosfero-spb-theme/images/seta_governo.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/seta_infraestrutura.png b/src/noosfero-spb-theme/images/seta_infraestrutura.png deleted file mode 100644 index 66cdff1..0000000 Binary files a/src/noosfero-spb-theme/images/seta_infraestrutura.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/seta_meio_ambiente.png b/src/noosfero-spb-theme/images/seta_meio_ambiente.png deleted file mode 100644 index 2079b67..0000000 Binary files a/src/noosfero-spb-theme/images/seta_meio_ambiente.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/seta_saude.png b/src/noosfero-spb-theme/images/seta_saude.png deleted file mode 100644 index 8cd6d10..0000000 Binary files a/src/noosfero-spb-theme/images/seta_saude.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/seta_tursimo.png b/src/noosfero-spb-theme/images/seta_tursimo.png deleted file mode 100644 index ed796e4..0000000 Binary files a/src/noosfero-spb-theme/images/seta_tursimo.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/sgpr.png b/src/noosfero-spb-theme/images/sgpr.png deleted file mode 100644 index 0c6187e..0000000 Binary files a/src/noosfero-spb-theme/images/sgpr.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/shadow-bottom.gif b/src/noosfero-spb-theme/images/shadow-bottom.gif deleted file mode 100644 index f804faa..0000000 Binary files a/src/noosfero-spb-theme/images/shadow-bottom.gif and /dev/null differ diff --git a/src/noosfero-spb-theme/images/site-footer.png b/src/noosfero-spb-theme/images/site-footer.png deleted file mode 100644 index ce5e61d..0000000 Binary files a/src/noosfero-spb-theme/images/site-footer.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/spb.png b/src/noosfero-spb-theme/images/spb.png deleted file mode 100644 index addfc12..0000000 Binary files a/src/noosfero-spb-theme/images/spb.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/sprite-icons.png b/src/noosfero-spb-theme/images/sprite-icons.png deleted file mode 100644 index 70781ca..0000000 Binary files a/src/noosfero-spb-theme/images/sprite-icons.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/sprite-setas.png b/src/noosfero-spb-theme/images/sprite-setas.png deleted file mode 100644 index 4537a80..0000000 Binary files a/src/noosfero-spb-theme/images/sprite-setas.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/sprite.png b/src/noosfero-spb-theme/images/sprite.png deleted file mode 100644 index a3e1333..0000000 Binary files a/src/noosfero-spb-theme/images/sprite.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/sprite2.png b/src/noosfero-spb-theme/images/sprite2.png deleted file mode 100644 index 440acbb..0000000 Binary files a/src/noosfero-spb-theme/images/sprite2.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/sprite_social-2.png b/src/noosfero-spb-theme/images/sprite_social-2.png deleted file mode 100644 index f9f90a6..0000000 Binary files a/src/noosfero-spb-theme/images/sprite_social-2.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/sprite_social-verde.png b/src/noosfero-spb-theme/images/sprite_social-verde.png deleted file mode 100644 index 87eb3f5..0000000 Binary files a/src/noosfero-spb-theme/images/sprite_social-verde.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/sprite_social.png b/src/noosfero-spb-theme/images/sprite_social.png deleted file mode 100644 index 300cb9d..0000000 Binary files a/src/noosfero-spb-theme/images/sprite_social.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/star-negative-big.png b/src/noosfero-spb-theme/images/star-negative-big.png deleted file mode 100644 index 617dbe4..0000000 Binary files a/src/noosfero-spb-theme/images/star-negative-big.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/star-negative-mini.png b/src/noosfero-spb-theme/images/star-negative-mini.png deleted file mode 100644 index eabea40..0000000 Binary files a/src/noosfero-spb-theme/images/star-negative-mini.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/star-negative.png b/src/noosfero-spb-theme/images/star-negative.png deleted file mode 100644 index 41973e7..0000000 Binary files a/src/noosfero-spb-theme/images/star-negative.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/star-positive-big.png b/src/noosfero-spb-theme/images/star-positive-big.png deleted file mode 100644 index d41a993..0000000 Binary files a/src/noosfero-spb-theme/images/star-positive-big.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/star-positive-mini.png b/src/noosfero-spb-theme/images/star-positive-mini.png deleted file mode 100644 index febf0de..0000000 Binary files a/src/noosfero-spb-theme/images/star-positive-mini.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/star-positive.png b/src/noosfero-spb-theme/images/star-positive.png deleted file mode 100644 index ca15335..0000000 Binary files a/src/noosfero-spb-theme/images/star-positive.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/steps_bg.png b/src/noosfero-spb-theme/images/steps_bg.png deleted file mode 100644 index 430b99d..0000000 Binary files a/src/noosfero-spb-theme/images/steps_bg.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/thin-logo.png b/src/noosfero-spb-theme/images/thin-logo.png deleted file mode 100644 index 1aeb9fc..0000000 Binary files a/src/noosfero-spb-theme/images/thin-logo.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/top-arrow-black.png b/src/noosfero-spb-theme/images/top-arrow-black.png deleted file mode 100644 index 5744b53..0000000 Binary files a/src/noosfero-spb-theme/images/top-arrow-black.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/top-arrow.png b/src/noosfero-spb-theme/images/top-arrow.png deleted file mode 100644 index d4e3f01..0000000 Binary files a/src/noosfero-spb-theme/images/top-arrow.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/touch_icon.png b/src/noosfero-spb-theme/images/touch_icon.png deleted file mode 100644 index 98c3ad4..0000000 Binary files a/src/noosfero-spb-theme/images/touch_icon.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/twitter-widget.png b/src/noosfero-spb-theme/images/twitter-widget.png deleted file mode 100644 index e0cd726..0000000 Binary files a/src/noosfero-spb-theme/images/twitter-widget.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/twitter.png b/src/noosfero-spb-theme/images/twitter.png deleted file mode 100644 index aededc4..0000000 Binary files a/src/noosfero-spb-theme/images/twitter.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/upload-icon.png b/src/noosfero-spb-theme/images/upload-icon.png deleted file mode 100644 index 00c39e1..0000000 Binary files a/src/noosfero-spb-theme/images/upload-icon.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/usuario_participa.png b/src/noosfero-spb-theme/images/usuario_participa.png deleted file mode 100644 index a86a6a3..0000000 Binary files a/src/noosfero-spb-theme/images/usuario_participa.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/visualizacoes.png b/src/noosfero-spb-theme/images/visualizacoes.png deleted file mode 100644 index 9a014d5..0000000 Binary files a/src/noosfero-spb-theme/images/visualizacoes.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/voltar-topo.png b/src/noosfero-spb-theme/images/voltar-topo.png deleted file mode 100644 index 3303386..0000000 Binary files a/src/noosfero-spb-theme/images/voltar-topo.png and /dev/null differ diff --git a/src/noosfero-spb-theme/images/youtube.png b/src/noosfero-spb-theme/images/youtube.png deleted file mode 100644 index 22b1fb7..0000000 Binary files a/src/noosfero-spb-theme/images/youtube.png and /dev/null differ diff --git a/src/noosfero-spb-theme/preview.png b/src/noosfero-spb-theme/preview.png deleted file mode 100644 index 8c3627e..0000000 Binary files a/src/noosfero-spb-theme/preview.png and /dev/null differ diff --git a/src/noosfero-spb-theme/site_title.html.erb b/src/noosfero-spb-theme/site_title.html.erb deleted file mode 100644 index e69de29..0000000 --- a/src/noosfero-spb-theme/site_title.html.erb +++ /dev/null diff --git a/src/noosfero-spb-theme/style.css b/src/noosfero-spb-theme/style.css deleted file mode 100644 index df03cbc..0000000 --- a/src/noosfero-spb-theme/style.css +++ /dev/null @@ -1,212 +0,0 @@ -/*** Noosfero Base Theme ***/ -@import url(../profile-base/style.css); - -/*** Icon and animation resources***/ -@import url(../../icons/tango/style.css); -@import url(css/animate.css); -@import url(font-awesome.min.css); - - -/*** SPB Theme section styles ***/ -@import url(css/overwriting-base-theme.css); -@import url(css/header.css); -@import url(css/footer.css); -@import url(css/left-bar.css); -@import url(css/home-page.css); -@import url(css/main-content.css); -@import url(css/edition-pages.css); -@import url(css/administration-panel.css); -@import url(css/article-page.css); -@import url(css/software-pages.css); -@import url(css/community-pages.css); -@import url(css/use-report.css); -@import url(css/news-page.css); -@import url(css/search-pages.css); -@import url(css/software-catalog-page.css); -@import url(css/tooltip.css); -@import url(css/popover.css); - -@font-face{ - font-weight: normal; - font-style: normal; - font-family: "open_sanslight"; - src: url("fonts/opensans-300-webfont.eot"); - src: url("fonts/opensans-300-webfont.eot?#iefix") format("embedded-opentype"), - url("fonts/opensans-300-webfont.woff") format("woff"), - url("fonts/opensans-300-webfont.ttf") format("truetype"), - url("fonts/opensans-300-webfont.svg#open_sanslight") format("svg"); -} - -@font-face{ - font-weight: normal; - font-style: normal; - font-family: "open_sansregular"; - src: url("fonts/opensans-400-webfont.eot"); - src: url("fonts/opensans-400-webfont.eot?#iefix") format("embedded-opentype"), - url("fonts/opensans-400-webfont.woff") format("woff"), - url("fonts/opensans-400-webfont.ttf") format("truetype"), - url("fonts/opensans-400-webfont.svg#open_sansregular") format("svg"); -} - -@font-face{ - font-weight: normal; - font-style: normal; - font-family: "open_sanssemibold"; - src: url("fonts/opensans-600-webfont.eot"); - src: url("fonts/opensans-600-webfont.eot?#iefix") format("embedded-opentype"), - url("fonts/opensans-600-webfont.woff") format("woff"), - url("fonts/opensans-600-webfont.ttf") format("truetype"), - url("fonts/opensans-600-webfont.svg#open_sanssemibold") format("svg"); -} - -@font-face{ - font-weight: normal; - font-style: normal; - font-family: "open_sansbold"; - src: url("fonts/opensans-700-webfont.eot"); - src: url("fonts/opensans-700-webfont.eot?#iefix") format("embedded-opentype"), - url("fonts/opensans-700-webfont.woff") format("woff"), - url("fonts/opensans-700-webfont.ttf") format("truetype"), - url("fonts/opensans-700-webfont.svg#open_sansbold") format("svg"); -} - -@font-face{ - font-weight: normal; - font-style: normal; - font-family: "open_sansextrabold"; - src: url("fonts/opensans-800-webfont.eot"); - src: url("fonts/opensans-800-webfont.eot?#iefix") format("embedded-opentype"), - url("fonts/opensans-800-webfont.woff") format("woff"), - url("fonts/opensans-800-webfont.ttf") format("truetype"), - url("fonts/opensans-800-webfont.svg#open_sansextrabold") format("svg"); -} - -/*********** General Rules ************/ - -* { - margin: 0; - padding: 0; - list-style: none; - vertical-align: baseline; -} - -body { - background-color: #fff; - color: #172738; - font-size: 12px; - font-family: "open_sansregular", Arial, Helvetica, sans-serif; -} - -* :link,:visited { - text-decoration: none; -} - -* ul,ol { - list-style: none; -} - -* h1,h2,h3,h4,h5,h6 { - color: inherit; - font-family: Arial; - font-weight: 700; - margin-top: 20px; - margin-bottom: 10px; -} - -* h1{ - font-size: 34px; - line-height: 37px; -} - -* h2{ - font-size: 22px; - line-height: 21px; -} - -* h3{ - font-size: 18px; - line-height: 21px; -} - -* h4,h5,h6 { - font-size: 16px; - line-height: 21px; -} - -#content h1, #content h2, #content h3, #content h4, #content h5, #content h6{ - margin-top: 20px; - margin-bottom: 10px; - color: inherit; - font-family: Arial; - font-weight: 700; -} - -#content h1{ - font-size: 34px; - line-height: 37px; -} - -#content h2{ - font-size: 22px; - line-height: 21px; -} - -#content h3{ - font-size: 18px; - line-height: 21px; - font-weight: 700; -} - -#content h4, content h5, #content h6{ - font-size: 16px; - line-height: 21px; -} - -p{ - margin: 0px 0px 10px 0px; - line-height: 21px; - font-size: 15px; -} - - -* a img,:link img,:visited img{ - border: none -} - -a{ - outline: none; -} -a:link, #content a:link, dl.portlet a:link{ - color: #172738; -} - -a:visited, #content a:visited, dl.portlet a:visited{ - color:#172738; -} - -a:focus{ - outline: 2px solid #f1ca7f; -} - -/* Remove in all td gray backgroung hover */ -tr:hover td{ - background-color: transparent; -} - -#content a:hover, dl.portlet a:hover{ - color: #000; -} - -table{ - border-spacing: 0; -} - -img{ - vertical-align: text-bottom; -} - -iframe{ - border-width: 0; border-style:none; -} - - diff --git a/src/noosfero-spb-theme/theme.js b/src/noosfero-spb-theme/theme.js deleted file mode 100644 index 3ef8426..0000000 --- a/src/noosfero-spb-theme/theme.js +++ /dev/null @@ -1,280 +0,0 @@ -function alignBlocks(containerIndex){ - //Needed to save the original reference to jQuery(this) - jt = jQuery(this); - longerBlock = 0; - jt.find(".block-outer").each(function () { - if(jQuery(this).height() > longerBlock) - longerBlock = jQuery(this).height(); - }); - - jt.find("#block-48504 .block-inner-2").height(492); - jt.find("#block-55304 .block-inner-2").height(378); - - //Aligns the blocks in the most common situations - jt.find(".block-outer").height(longerBlock); - //Only used for blocks with video, since it uses the size of the iframe - if(jt.find("iframe").length > 0){ - jt.find(".block-inner-1 .block-inner-2").each(function (idx) { - if(idx==2){ - jQuery(this).height(jt.find("iframe").height()); - } - }); - } -} - -(function($) { - // Run code - if($.cookie("high_contrast") === 'true'){ - $( "body" ).toggleClass( "contraste" ); - } - $( "#siteaction-contraste a" ).click(function() { - $( "body" ).toggleClass( "contraste" ); - if($('body').hasClass('contraste')){ - $.cookie('high_contrast', 'true', {path: '/'}); - } else { - $.cookie('high_contrast', null, { path: '/' }); - } - }); - - $( ".profile-image" ).prepend( "" ); - //insere a mensagem no bloco de trilhas na página inicial// - $( ".action-home-index #content .community-track-plugin_track-card-list-block .track_list" ).prepend( "Construa seu caminho de participação na elaboração de políticas públicas..." ); - //insere a mensagem no bloco de comunidades na página inicial// - $( ".action-home-index #content .communities-block .block-inner-2>div" ).prepend( "Participe dos dialogos entre governo e sociedade em comunidades temáticas..." ); - $( ".action-home-index #content .communities-block .block-inner-2>div.block-footer-content .msg_block" ).remove(); - $('.container-block-plugin_container-block').each(alignBlocks); - - $('#block-48500 > .block-inner-1 > .block-inner-2').append(''); - - - -// Foco no botao de busca - -$('#link-buscar').click(function(e) { - e.preventDefault(); - window.location.hash = '#portal-searchbox'; - $('.searchField').focus() -}) - -})(jQuery); - - -// Efeito Fade nos box de softwares - -(function($){ - "use strict";// Make javascript less intolerant to errors - - var TRANSITION_TIME = 250;// milliseconds - - - function show_finality() { - var finality = $(this).children(".software-block-finality"); - - //finality.stop().fadeTo(TRANSITION_TIME,1); - finality.stop().fadeTo('fast', 1); - //finality.stop().animate({"top" : "0%"}, TRANSITION_TIME); - } - - function hide_finality() { - var finality = $(this).children(".software-block-finality"); - - //finality.stop().fadeTo(TRANSITION_TIME,0); - finality.stop().fadeTo('fast', 0); - //finality.stop().animate({"top" : "100%"}, TRANSITION_TIME); - } - - function move_article_buttons(){ - var article_actions = $('#article-actions').clone(); - var report = $('.report-abuse-action').remove(); - var suggest = $('.icon-suggest').remove(); - - - $(article_actions).find('.icon-edit, .icon-new, .icon-delete, .icon-locale').remove(); - $('.article-body').append(article_actions); - } - - function add_link_to_article_div(){ - var list = $('.display-content-block').find('li'); - - list.each(function(){ - var link = $(this).find('.title').find('a').attr('href'); - var text = $(this).find('.lead').find('p').text(); - var leadLink = $(''); - - leadLink.attr('href', link); - leadLink.text(text); - - $(this).find('.lead').html(leadLink); - }); - } - - function insert_notice_div(){ - var notice = $('.display-content-block').find('li'); - notice.each(function(){ - var $set = $(this).children(); - for(var i=1, len = $set.length; i < len; i+=5){ - $set.slice(i, i+5).wrapAll('
    '); - } - for(var i=2, len = $set.length; i < len; i+=3){ - $set.slice(i, i+3).wrapAll('
    '); - } - //$('
    ').wrap($(this).find( '.image', '.title', '.lead', '.read_more')); - }); - - } - - //toggle filter options in catalog page - function setFilterCategoriesOptionClass() { - var filterOptions = $("#filter-categories-option"); - filterOptions.addClass("animated slideInDown"); - } - - function toggleFilterOptions(){ - var filterOptions = $("#filter-categories-option"); - var filterHeight = filterOptions[0].scrollHeight; - var showOptions = $("#filter-option-catalog-software"); - var hideOptions = $("#filter-option-catalog-close"); - if(hideOptions.is(":visible")){ - //filterOptions.slideUp(function() { - showOptions.show(); - hideOptions.hide(); - //}); - filterOptions.animate({ - height: 0 - },500); - } - else { - showOptions.hide(); - hideOptions.show(); - filterOptions.animate({ - height: filterHeight - },500); - } - } - - function setEvents(){ - // Fade css - $('.software-block-finality').css('opacity', 0); - $('.software-block-finality').css('top', 0); - // End Fade CSS - $(".software-block").mouseover(show_finality); - $(".software-block").mouseout(hide_finality); - - var showOptions = $("#filter-option-catalog-software"); - var hideOptions = $("#filter-option-catalog-close"); - showOptions.click(toggleFilterOptions); - hideOptions.click(toggleFilterOptions); - } - - /* Finds all uploaded files from manuals page and sets its names on the right format */ - function set_uploaded_files_names() { - try { - var article = document.getElementById('article'); - var folderList = article.getElementsByClassName('folder-content')[0]; - var folderItens = folderList.getElementsByClassName('item-description'); - - for(var i = 0; i < folderItens.length; i++) { - split_file_extension(folderItens[i].getElementsByTagName('a')[0]); - } - } catch(e) { - - } - } - - /* Splits a file name from its extension. Example: example.pdf becomes example - PDF */ - function split_file_extension(element) { - var tokens = element.innerHTML.split('.'); - if(tokens.length == 2) { - var fileName = tokens[0]; - var fileExtension = tokens[1].toUpperCase(); - element.innerHTML = fileName + " - " + fileExtension; - } - } - - function set_tooltip_content() { - $('.star-tooltip').html("?"); - } - - // TODO: fix calls for this function below - // TODO: comments-additional-information --> comments-display-fields - function set_arrow_direction() { - var additional_data_bar = $('.comments-display-fields'); - var arrow = $('.comments-arrow-down'); - var state = 0; - additional_data_bar.on('click', function() { - animateExtraFields(); - }); - } - - function animateExtraFields() { - var additional_data_bar = $('.comments-display-fields'); - var arrow = ($('.comments-arrow-down')[0])? $('.comments-arrow-down') : $('.comments-arrow-up'); - console.log(arrow); - var fields = $('.comments-software-extra-fields'); - if(fields) { - var innerHeight = fields[0].offsetHeight; - if(fields.height()!==0) { - arrow.attr('class', "comments-arrow-down"); - fields.animate({height: 0}); - } - else { - arrow.attr('class', "comments-arrow-up"); - fields.animate({height: 140}); - } - } - } - - function set_use_report_content() { - $('.make-report-block .make-report-container .button-bar a span').html('avaliar o software'); - $('.make-report-block .make-report-container .make-report-message').html('Relate sua experiência ou do órgão/empresa com relação ao software.'); - $('.ratings-list .see-more a.icon-arrow-right-p').html('veja todos os relatos'); - $('.main-content .star-rate-data .star-rate-form .star-comment-container .button-bar input').attr('value', 'enviar relato'); - $('.main-content .star-rate-data .star-rate-form .star-rate-text').html('Avalie o software'); - $('.main-content .star-rate-data .star-rate-form .star-comment-container .formlabel').html('Depoimento sobre o software'); - $('.star-rate-form .star-comment-container .comments-display-fields span#comments-additional-information').html('Dados adicionais (órgãos e empresas)'); - $('.star-rate-form .star-comment-container .comments-software-extra-fields #input_institution_comments label').html('Nome do órgão ou empresa'); - $('.star-rate-form .star-comment-container .comments-software-extra-fields .comments-software-people-benefited label').html('Número de beneficiados'); - $('.star-rate-form .star-comment-container .comments-software-extra-fields .comments-software-saved-values label').html('Recursos economizados'); - } - - function add_tooltips(){ - $('#content span[title]').attr("data-toggle","tooltip"); - - $('[data-toggle="tooltip"]').tooltip(); - } - - function add_popovers() { - var span = $('span[data-toggle="popover"]'); - var place = span.attr("data-placement"); - var elementClass = span.attr("data-class"); - if(span){ - var popover = span.popover({ - html:true, - placement: place, - content: function() { - return $(this).next().html(); - } - }) - .data('bs.popover'); - } - if(popover) { - popover.tip() - .addClass(elementClass); - $('a.toggle-popover').on("click",function() { - span.trigger("click"); - }); - } - } - - $(document).ready(function(){ - add_tooltips(); - add_popovers(); - move_article_buttons(); - insert_notice_div(); - set_uploaded_files_names(); - set_tooltip_content(); - set_arrow_direction(); - set_use_report_content(); - setEvents(); - }); -})(jQuery); diff --git a/src/noosfero-spb-theme/theme.yml b/src/noosfero-spb-theme/theme.yml deleted file mode 100644 index f5721f4..0000000 --- a/src/noosfero-spb-theme/theme.yml +++ /dev/null @@ -1,2 +0,0 @@ -name: "Software Público" -layout: "application-ng" diff --git a/src/noosfero-spb/.gitmodules b/src/noosfero-spb/.gitmodules deleted file mode 100644 index 3112967..0000000 --- a/src/noosfero-spb/.gitmodules +++ /dev/null @@ -1,12 +0,0 @@ -[submodule "software_communities"] - path = software_communities - url = git@softwarepublico.gov.br:softwarepublico/mpog_software.git -[submodule "noosfero-spb-theme"] - path = noosfero-spb-theme - url = git@softwarepublico.gov.br:softwarepublico/noosfero-spb-theme.git -[submodule "spb_migrations"] - path = spb_migrations - url = git@softwarepublico.gov.br:softwarepublico/spb_migrations.git -[submodule "gov_user"] - path = gov_user - url = git@softwarepublico.gov.br:softwarepublico/gov_user.git diff --git a/src/noosfero-spb/Makefile b/src/noosfero-spb/Makefile index 2be3cc3..b7be772 100644 --- a/src/noosfero-spb/Makefile +++ b/src/noosfero-spb/Makefile @@ -13,7 +13,7 @@ noosfero_dir=/usr/lib/noosfero dist: clean mkdir $(DISTDIR) tar --exclude=.git --exclude=$(DISTDIR) -cf - * | (cd $(DISTDIR) && tar xaf -) - tar --exclude=.git -czf $(TARBALL) $(DISTDIR) + tar --exclude=.git -hczf $(TARBALL) $(DISTDIR) clean: $(RM) $(TARBALL) diff --git a/src/noosfero-spb/gov_user b/src/noosfero-spb/gov_user deleted file mode 160000 index 20d8849..0000000 --- a/src/noosfero-spb/gov_user +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 20d8849666eb1f43a6c75e5710bb6acdbdeac271 diff --git a/src/noosfero-spb/gov_user/.gitignore b/src/noosfero-spb/gov_user/.gitignore new file mode 100644 index 0000000..783cd5b --- /dev/null +++ b/src/noosfero-spb/gov_user/.gitignore @@ -0,0 +1,2 @@ +*.swp + diff --git a/src/noosfero-spb/gov_user/controllers/gov_user_plugin_controller.rb b/src/noosfero-spb/gov_user/controllers/gov_user_plugin_controller.rb new file mode 100644 index 0000000..80a41db --- /dev/null +++ b/src/noosfero-spb/gov_user/controllers/gov_user_plugin_controller.rb @@ -0,0 +1,251 @@ +#aqui deve ter so usuario e instituicao +class GovUserPluginController < ApplicationController + + def hide_registration_incomplete_percentage + response = false + + if request.xhr? && params[:hide] + session[:hide_incomplete_percentage] = true + response = session[:hide_incomplete_percentage] + end + + render :json=>response.to_json + end + + def create_institution + @show_sisp_field = environment.admins.include?(current_user.person) + @state_list = get_state_list() + @governmental_sphere = [[_("Select a Governmental Sphere"), 0]]|GovernmentalSphere.all.map {|s| [s.name, s.id]} + @governmental_power = [[_("Select a Governmental Power"), 0]]|GovernmentalPower.all.map {|g| [g.name, g.id]} + @juridical_nature = [[_("Select a Juridical Nature"), 0]]|JuridicalNature.all.map {|j| [j.name, j.id]} + @state_options = [[_('Select a state'), '-1']] | @state_list.collect {|state| [state.name, state.name]} + + params[:community] ||= {} + params[:institutions] ||= {} + + if request.xhr? + render :layout=>false + else + redirect_to "/" + end + end + + def split_http_referer http_referer + split_list = [] + split_list = http_referer.split("/") + @url_token = split_list.last + return @url_token + end + + def create_institution_admin + @show_sisp_field = environment.admins.include?(current_user.person) + @state_list = get_state_list() + @governmental_sphere = [[_("Select a Governmental Sphere"), 0]]|GovernmentalSphere.all.map {|s| [s.name, s.id]} + @governmental_power = [[_("Select a Governmental Power"), 0]]|GovernmentalPower.all.map {|g| [g.name, g.id]} + @juridical_nature = [[_("Select a Juridical Nature"), 0]]|JuridicalNature.all.map {|j| [j.name, j.id]} + @state_options = [[_('Select a state'), '-1']] | @state_list.collect {|state| [state.name, state.name]} + + @url_token = split_http_referer request.original_url() + + params[:community] ||= {} + params[:institutions] ||= {} + + end + + def new_institution + redirect_to "/" if params[:community].blank? || params[:institutions].blank? + + response_message = {} + + institution_template = Community["institution"] + add_template_in_params institution_template + + @institutions = private_create_institution + add_environment_admins_to_institution @institutions + + response_message = save_institution @institutions + + if request.xhr? #User create institution + render :json => response_message.to_json + else #Admin create institution + session[:notice] = response_message[:message] # consume the notice + + redirect_depending_on_institution_creation response_message + end + end + + def institution_already_exists + redirect_to "/" if !request.xhr? || params[:name].blank? + + already_exists = !Community.where(:name=>params[:name]).empty? + + render :json=>already_exists.to_json + end + + def get_institutions + redirect_to "/" if !request.xhr? || params[:query].blank? + + list = Institution.search_institution(params[:query]).map{ |institution| + {:value=>institution.name, :id=>institution.id} + } + + render :json => list.to_json + end + + def get_brazil_states + redirect_to "/" unless request.xhr? + + state_list = get_state_list() + render :json=>state_list.collect {|state| state.name }.to_json + end + + def get_field_data + condition = !request.xhr? || params[:query].nil? || params[:field].nil? + return render :json=>{} if condition + + model = get_model_by_params_field + + data = model.where("name ILIKE ?", "%#{params[:query]}%").select("id, name") + .collect { |db| + {:id=>db.id, :label=>db.name} + } + + other = [model.select("id, name").last].collect { |db| + {:id=>db.id, :label=>db.name} + } + + # Always has other in the list + data |= other + + render :json=> data + end + + protected + + def get_model_by_params_field + case params[:field] + when "software_language" + return ProgrammingLanguage + else + return DatabaseDescription + end + end + + def get_state_list + NationalRegion.find( + :all, + :conditions=>["national_region_type_id = ?", 2], + :order=>"name" + ) + end + + def set_institution_type + institution_params = params[:institutions].except(:governmental_power, + :governmental_sphere, + :juridical_nature + ) + if params[:institutions][:type] == "PublicInstitution" + PublicInstitution::new institution_params + else + PrivateInstitution::new institution_params + end + end + + def set_public_institution_fields institution + inst_fields = params[:institutions] + + begin + gov_power = GovernmentalPower.find inst_fields[:governmental_power] + gov_sphere = GovernmentalSphere.find inst_fields[:governmental_sphere] + jur_nature = JuridicalNature.find inst_fields[:juridical_nature] + + institution.juridical_nature = jur_nature + institution.governmental_power = gov_power + institution.governmental_sphere = gov_sphere + rescue + institution.errors.add( + :governmental_fields, + _("Could not find Governmental Power or Governmental Sphere") + ) + end + end + + def private_create_institution + community = Community.new(params[:community]) + community.environment = environment + institution = set_institution_type + + institution.name = community[:name] + institution.community = community + + if institution.type == "PublicInstitution" + set_public_institution_fields institution + end + + institution.date_modification = DateTime.now + institution.save + institution + end + + def add_template_in_params institution_template + com_fields = params[:community] + if !institution_template.blank? && institution_template.is_template + com_fields[:template_id]= institution_template.id unless com_fields.blank? + end + end + + def add_environment_admins_to_institution institution + edit_page = params[:edit_institution_page] == false + if environment.admins.include?(current_user.person) && edit_page + environment.admins.each do |adm| + institution.community.add_admin(adm) + end + end + end + + def save_institution institution + inst_errors = institution.errors.messages + com_errors = institution.community.errors.messages + + set_errors institution + + if inst_errors.empty? && com_errors.empty? && institution.valid? && institution.save + { :success => true, + :message => _("Institution successful created!"), + :institution_data => {:name=>institution.name, :id=>institution.id} + } + else + { :success => false, + :message => _("Institution could not be created!"), + :errors => inst_errors.merge(com_errors) + } + end + end + + def redirect_depending_on_institution_creation response_message + if response_message[:success] + redirect_to :controller => "/admin_panel", :action => "index" + else + flash[:errors] = response_message[:errors] + + redirect_to :controller => "gov_user_plugin", :action => "create_institution_admin", :params => params + end + end + + def set_errors institution + institution.valid? if institution + institution.community.valid? if institution.community + + flash[:error_community_name] = institution.community.errors.include?(:name) ? "highlight-error" : "" + flash[:error_community_country] = institution.errors.include?(:country) ? "highlight-error" : "" + flash[:error_community_state] = institution.errors.include?(:state) ? "highlight-error" : "" + flash[:error_community_city] = institution.errors.include?(:city) ? "highlight-error" : "" + flash[:error_institution_corporate_name] = institution.errors.include?(:corporate_name) ? "highlight-error" : "" + flash[:error_institution_cnpj] = institution.errors.include?(:cnpj) ? "highlight-error" : "" + flash[:error_institution_governmental_sphere] = institution.errors.include?(:governmental_sphere) ? "highlight-error" : "" + flash[:error_institution_governmental_power] = institution.errors.include?(:governmental_power) ? "highlight-error" : "" + flash[:error_institution_juridical_nature] = institution.errors.include?(:juridical_nature) ? "highlight-error" : "" + flash[:error_institution_sisp] = institution.errors.include?(:sisp) ? "highlight-error" : "" + end + +end diff --git a/src/noosfero-spb/gov_user/controllers/gov_user_plugin_myprofile_controller.rb b/src/noosfero-spb/gov_user/controllers/gov_user_plugin_myprofile_controller.rb new file mode 100644 index 0000000..6b4d03e --- /dev/null +++ b/src/noosfero-spb/gov_user/controllers/gov_user_plugin_myprofile_controller.rb @@ -0,0 +1,50 @@ +class GovUserPluginMyprofileController < MyProfileController + append_view_path File.join(File.dirname(__FILE__) + '/../views') + + def index + end + + def edit_institution + @show_sisp_field = environment.admins.include?(current_user.person) + @state_list = NationalRegion.find( + :all, + :conditions => { :national_region_type_id => 2 }, + :order => 'name' + ) + @institution = @profile.institution + update_institution if request.post? + end + + private + + def update_institution + @institution.community.update_attributes(params[:community]) + @institution.update_attributes(params[:institutions].except(:governmental_power, :governmental_sphere, :juridical_nature)) + if @institution.type == "PublicInstitution" + begin + governmental_updates + rescue + @institution.errors.add(:governmental_fields, + _("Could not find Governmental Power or Governmental Sphere")) + end + end + if @institution.valid? + redirect_to :controller => 'profile_editor', :action => 'index', :profile => profile.identifier + else + flash[:errors] = @institution.errors.full_messages + end + end + + def governmental_updates + gov_power = GovernmentalPower.find params[:institutions][:governmental_power] + gov_sphere = GovernmentalSphere.find params[:institutions][:governmental_sphere] + jur_nature = JuridicalNature.find params[:institutions][:juridical_nature] + + @institution.juridical_nature = jur_nature + @institution.governmental_power = gov_power + @institution.governmental_sphere = gov_sphere + @institution.save + end + + +end diff --git a/src/noosfero-spb/gov_user/db/migrate/20140528193816_add_extra_fields_to_user.rb b/src/noosfero-spb/gov_user/db/migrate/20140528193816_add_extra_fields_to_user.rb new file mode 100644 index 0000000..087fc62 --- /dev/null +++ b/src/noosfero-spb/gov_user/db/migrate/20140528193816_add_extra_fields_to_user.rb @@ -0,0 +1,17 @@ +class AddExtraFieldsToUser < ActiveRecord::Migration + def self.up + change_table :users do |t| + t.string :secondary_email + t.references :institution + t.string :role + end + end + + def self.down + change_table :users do |t| + t.remove :secondary_email + t.remove_references :institution + t.remove :role + end + end +end diff --git a/src/noosfero-spb/gov_user/db/migrate/20140528193835_create_institutions_table.rb b/src/noosfero-spb/gov_user/db/migrate/20140528193835_create_institutions_table.rb new file mode 100644 index 0000000..294c791 --- /dev/null +++ b/src/noosfero-spb/gov_user/db/migrate/20140528193835_create_institutions_table.rb @@ -0,0 +1,13 @@ +class CreateInstitutionsTable < ActiveRecord::Migration + def self.up + create_table :institutions do |t| + t.string :name + + t.timestamps + end + end + + def self.down + drop_table :institutions + end +end diff --git a/src/noosfero-spb/gov_user/db/migrate/20140617125143_add_new_fields_institution.rb b/src/noosfero-spb/gov_user/db/migrate/20140617125143_add_new_fields_institution.rb new file mode 100644 index 0000000..70ecf88 --- /dev/null +++ b/src/noosfero-spb/gov_user/db/migrate/20140617125143_add_new_fields_institution.rb @@ -0,0 +1,27 @@ +class AddNewFieldsInstitution < ActiveRecord::Migration + def up + add_column :institutions, :acronym, :string + add_column :institutions, :unit_code, :integer + add_column :institutions, :parent_code, :integer + add_column :institutions, :unit_type, :string + add_column :institutions, :juridical_nature, :string + add_column :institutions, :sub_juridical_nature, :string + add_column :institutions, :normalization_level, :string + add_column :institutions, :version, :string + add_column :institutions, :cnpj, :string + add_column :institutions, :type, :string + end + + def down + remove_column :institutions, :acronym + remove_column :institutions, :unit_code + remove_column :institutions, :parent_code + remove_column :institutions, :unit_type + remove_column :institutions, :juridical_nature + remove_column :institutions, :sub_juridical_nature + remove_column :institutions, :normalization_level + remove_column :institutions, :version + remove_column :institutions, :cnpj + remove_column :institutions, :type + end +end diff --git a/src/noosfero-spb/gov_user/db/migrate/20140617132133_create_governmental_spheres.rb b/src/noosfero-spb/gov_user/db/migrate/20140617132133_create_governmental_spheres.rb new file mode 100644 index 0000000..22c1fc7 --- /dev/null +++ b/src/noosfero-spb/gov_user/db/migrate/20140617132133_create_governmental_spheres.rb @@ -0,0 +1,19 @@ +class CreateGovernmentalSpheres < ActiveRecord::Migration + def change + create_table :governmental_spheres do |t| + t.string :name + t.string :acronym + t.integer :unit_code + t.integer :parent_code + t.string :unit_type + t.string :juridical_nature + t.string :sub_juridical_nature + t.string :normalization_level + t.string :version + t.string :cnpj + t.string :type + + t.timestamps + end + end +end diff --git a/src/noosfero-spb/gov_user/db/migrate/20140617132451_create_governmental_powers.rb b/src/noosfero-spb/gov_user/db/migrate/20140617132451_create_governmental_powers.rb new file mode 100644 index 0000000..ce88ee7 --- /dev/null +++ b/src/noosfero-spb/gov_user/db/migrate/20140617132451_create_governmental_powers.rb @@ -0,0 +1,9 @@ +class CreateGovernmentalPowers < ActiveRecord::Migration + def change + create_table :governmental_powers do |t| + t.string :name + + t.timestamps + end + end +end diff --git a/src/noosfero-spb/gov_user/db/migrate/20140617134556_add_references_to_institution.rb b/src/noosfero-spb/gov_user/db/migrate/20140617134556_add_references_to_institution.rb new file mode 100644 index 0000000..e5203e1 --- /dev/null +++ b/src/noosfero-spb/gov_user/db/migrate/20140617134556_add_references_to_institution.rb @@ -0,0 +1,15 @@ +class AddReferencesToInstitution < ActiveRecord::Migration + def up + change_table :institutions do |t| + t.references :governmental_power + t.references :governmental_sphere + end + end + + def down + change_table :institutions do |t| + t.remove_references :governmental_power + t.remove_references :governmental_sphere + end + end +end diff --git a/src/noosfero-spb/gov_user/db/migrate/20140630183326_add_relation_between_community_and_institution.rb b/src/noosfero-spb/gov_user/db/migrate/20140630183326_add_relation_between_community_and_institution.rb new file mode 100644 index 0000000..4dde5a9 --- /dev/null +++ b/src/noosfero-spb/gov_user/db/migrate/20140630183326_add_relation_between_community_and_institution.rb @@ -0,0 +1,13 @@ +class AddRelationBetweenCommunityAndInstitution < ActiveRecord::Migration + def up + change_table :institutions do |t| + t.references :community + end + end + + def down + change_table :institutions do |t| + t.remove_references :community + end + end +end diff --git a/src/noosfero-spb/gov_user/db/migrate/20140812143218_remove_field_role_from_user.rb b/src/noosfero-spb/gov_user/db/migrate/20140812143218_remove_field_role_from_user.rb new file mode 100644 index 0000000..e4d4fc6 --- /dev/null +++ b/src/noosfero-spb/gov_user/db/migrate/20140812143218_remove_field_role_from_user.rb @@ -0,0 +1,13 @@ +class RemoveFieldRoleFromUser < ActiveRecord::Migration + def up + change_table :users do |t| + t.remove :role + end + end + + def down + change_table :users do |t| + t.string :role + end + end +end diff --git a/src/noosfero-spb/gov_user/db/migrate/20140814125947_add_new_fields_to_public_institution.rb b/src/noosfero-spb/gov_user/db/migrate/20140814125947_add_new_fields_to_public_institution.rb new file mode 100644 index 0000000..232f50a --- /dev/null +++ b/src/noosfero-spb/gov_user/db/migrate/20140814125947_add_new_fields_to_public_institution.rb @@ -0,0 +1,11 @@ +class AddNewFieldsToPublicInstitution < ActiveRecord::Migration + def up + add_column :institutions, :sisp, :boolean, :default => false + remove_column :institutions, :juridical_nature + end + + def down + remove_column :institutions, :sisp + add_column :institutions, :juridical_nature, :string + end +end diff --git a/src/noosfero-spb/gov_user/db/migrate/20140814131606_create_juridical_natures_table.rb b/src/noosfero-spb/gov_user/db/migrate/20140814131606_create_juridical_natures_table.rb new file mode 100644 index 0000000..f2c9c18 --- /dev/null +++ b/src/noosfero-spb/gov_user/db/migrate/20140814131606_create_juridical_natures_table.rb @@ -0,0 +1,11 @@ +class CreateJuridicalNaturesTable < ActiveRecord::Migration + def up + create_table :juridical_natures do |t| + t.string :name + end + end + + def down + drop_table :juridical_natures + end +end diff --git a/src/noosfero-spb/gov_user/db/migrate/20140814134827_add_juridical_nature_reference_to_institutions_table.rb b/src/noosfero-spb/gov_user/db/migrate/20140814134827_add_juridical_nature_reference_to_institutions_table.rb new file mode 100644 index 0000000..03baff8 --- /dev/null +++ b/src/noosfero-spb/gov_user/db/migrate/20140814134827_add_juridical_nature_reference_to_institutions_table.rb @@ -0,0 +1,13 @@ +class AddJuridicalNatureReferenceToInstitutionsTable < ActiveRecord::Migration + def up + change_table :institutions do |t| + t.references :juridical_nature + end + end + + def down + change_table :institutions do |t| + t.remove_references :juridical_nature + end + end +end diff --git a/src/noosfero-spb/gov_user/db/migrate/20140815194530_register_institution_modification.rb b/src/noosfero-spb/gov_user/db/migrate/20140815194530_register_institution_modification.rb new file mode 100644 index 0000000..3183ec0 --- /dev/null +++ b/src/noosfero-spb/gov_user/db/migrate/20140815194530_register_institution_modification.rb @@ -0,0 +1,13 @@ +class RegisterInstitutionModification < ActiveRecord::Migration + def up + change_table :institutions do |t| + t.string :date_modification + end + end + + def down + change_table :institutions do |t| + t.remove :date_modification + end + end +end diff --git a/src/noosfero-spb/gov_user/db/migrate/20140818195821_remove_institution_from_user.rb b/src/noosfero-spb/gov_user/db/migrate/20140818195821_remove_institution_from_user.rb new file mode 100644 index 0000000..37486cd --- /dev/null +++ b/src/noosfero-spb/gov_user/db/migrate/20140818195821_remove_institution_from_user.rb @@ -0,0 +1,9 @@ +class RemoveInstitutionFromUser < ActiveRecord::Migration + def up + remove_column :users, :institution_id + end + + def down + add_column :users, :institution_id + end +end diff --git a/src/noosfero-spb/gov_user/db/migrate/20140818200738_create_institution_user_relation_table.rb b/src/noosfero-spb/gov_user/db/migrate/20140818200738_create_institution_user_relation_table.rb new file mode 100644 index 0000000..7068d72 --- /dev/null +++ b/src/noosfero-spb/gov_user/db/migrate/20140818200738_create_institution_user_relation_table.rb @@ -0,0 +1,12 @@ +class CreateInstitutionUserRelationTable < ActiveRecord::Migration + def up + create_table :institutions_users do |t| + t.belongs_to :user + t.belongs_to :institution + end + end + + def down + drop_table :institutions_users + end +end diff --git a/src/noosfero-spb/gov_user/db/migrate/20141103183013_add_corporate_name_to_institution.rb b/src/noosfero-spb/gov_user/db/migrate/20141103183013_add_corporate_name_to_institution.rb new file mode 100644 index 0000000..69d4a19 --- /dev/null +++ b/src/noosfero-spb/gov_user/db/migrate/20141103183013_add_corporate_name_to_institution.rb @@ -0,0 +1,9 @@ +class AddCorporateNameToInstitution < ActiveRecord::Migration + def up + add_column :institutions, :corporate_name, :string + end + + def down + remove_column :institutions, :corporate_name + end +end diff --git a/src/noosfero-spb/gov_user/db/migrate/20150910135510_add_siorg_code_to_institution.rb b/src/noosfero-spb/gov_user/db/migrate/20150910135510_add_siorg_code_to_institution.rb new file mode 100644 index 0000000..83cdec5 --- /dev/null +++ b/src/noosfero-spb/gov_user/db/migrate/20150910135510_add_siorg_code_to_institution.rb @@ -0,0 +1,9 @@ +class AddSiorgCodeToInstitution < ActiveRecord::Migration + def up + add_column :institutions, :siorg_code, :integer + end + + def down + remove_column :institutions, :siorg_code + end +end diff --git a/src/noosfero-spb/gov_user/db/migrate/20150910203559_add_institution_to_organization_rating.rb b/src/noosfero-spb/gov_user/db/migrate/20150910203559_add_institution_to_organization_rating.rb new file mode 100644 index 0000000..cf97528 --- /dev/null +++ b/src/noosfero-spb/gov_user/db/migrate/20150910203559_add_institution_to_organization_rating.rb @@ -0,0 +1,11 @@ +class AddInstitutionToOrganizationRating < ActiveRecord::Migration + def up + change_table :organization_ratings do |t| + t.belongs_to :institution + end + end + + def down + remove_column :organization_ratings, :institution_id + end +end \ No newline at end of file diff --git a/src/noosfero-spb/gov_user/db/seeds.rb b/src/noosfero-spb/gov_user/db/seeds.rb new file mode 100644 index 0000000..b9065f0 --- /dev/null +++ b/src/noosfero-spb/gov_user/db/seeds.rb @@ -0,0 +1,19 @@ +# encoding: UTF-8 +powers = ["Executivo", "Legislativo", "Judiciário", "Não se Aplica"] +spheres = ["Federal", "Estadual", "Distrital", "Municipal"] +jur_natures = ["Administração Direta", "Autarquia", "Empresa Pública", "Fundação", + "Orgão Autônomo", "Sociedade", "Sociedade Civil", + "Sociedade de Economia Mista" + ] + +powers.each do |power| + GovernmentalPower.create(:name => power) +end + +spheres.each do |sphere| + GovernmentalSphere.create(:name => sphere) +end + +jur_natures.each do |jur_nature| + JuridicalNature.create(:name => jur_nature) +end diff --git a/src/noosfero-spb/gov_user/features/institution_registration.feature b/src/noosfero-spb/gov_user/features/institution_registration.feature new file mode 100644 index 0000000..c1fbb4e --- /dev/null +++ b/src/noosfero-spb/gov_user/features/institution_registration.feature @@ -0,0 +1,32 @@ +Feature: Institution Field + As a user + I want to sign up resgistring my institution + So others users can use it + + Background: + Given "GovUserPlugin" plugin is enabled + And I am logged in as mpog_admin + And I go to /admin/plugins + And I check "GovUserPlugin" + And I press "Save changes" + And Institutions has initial default values on database + And I am logged in as mpog_admin + + @selenium + Scenario: Show new institution fields when clicked in create new institution + Given I follow "Edit Profile" + When I follow "Create new institution" + And I should see "New Institution" + And I should see "Public Institution" + And I should see "Private Institution" + And I should see "Corporate Name" + And I should see "Name" + And I should see "State" + And I should see "City" + And I should see "Country" + And I should see "CNPJ" + And I should see "Acronym" + And I choose "Public Institution" + Then I should see "Governmental Sphere:" + And I should see "Governmental Power:" + And I should see "Juridical Nature:" diff --git a/src/noosfero-spb/gov_user/features/steps_definitions/gov_user_steps.rb b/src/noosfero-spb/gov_user/features/steps_definitions/gov_user_steps.rb new file mode 100644 index 0000000..97cf5e2 --- /dev/null +++ b/src/noosfero-spb/gov_user/features/steps_definitions/gov_user_steps.rb @@ -0,0 +1,90 @@ +Given /^Institutions has initial default values on database$/ do + GovernmentalPower.create(:name => "Executivo") + GovernmentalPower.create(:name => "Legislativo") + GovernmentalPower.create(:name => "Judiciario") + + GovernmentalSphere.create(:name => "Federal") + + JuridicalNature.create(:name => "Autarquia") + JuridicalNature.create(:name => "Administracao Direta") + JuridicalNature.create(:name => "Empresa Publica") + JuridicalNature.create(:name => "Fundacao") + JuridicalNature.create(:name => "Orgao Autonomo") + JuridicalNature.create(:name => "Sociedade") + JuridicalNature.create(:name => "Sociedade Civil") + JuridicalNature.create(:name => "Sociedade de Economia Mista") + + national_region = NationalRegion.new + national_region.name = "Distrito Federal" + national_region.national_region_code = '35' + national_region.national_region_type_id = NationalRegionType::STATE + national_region.save +end + +Given /^I type in "([^"]*)" in autocomplete list "([^"]*)" and I choose "([^"]*)"$/ do |typed, input_field_selector, should_select| +# Wait the page javascript load +sleep 1 +# Basicaly it, search for the input field, type something, wait for ajax end select an item +page.driver.browser.execute_script %Q{ + var search_query = "#{input_field_selector}.ui-autocomplete-input"; + var input = jQuery(search_query).first(); + + input.trigger('click'); + input.val('#{typed}'); + input.trigger('keydown'); + + window.setTimeout(function(){ + search_query = ".ui-menu-item a:contains('#{should_select}')"; + var typed = jQuery(search_query).first(); + + typed.trigger('mouseenter').trigger('click'); + console.log(jQuery('#license_info_id')); + }, 1000); + } + sleep 1 +end + +Given /^the following public institutions?$/ do |table| + # table is a Cucumber::Ast::Table + table.hashes.each do |item| + community = Community.new + community.name = item[:name] + community.country = item[:country] + community.state = item[:state] + community.city = item[:city] + community.save! + + governmental_power = GovernmentalPower.where(:name => item[:governmental_power]).first + governmental_sphere = GovernmentalSphere.where(:name => item[:governmental_sphere]).first + + juridical_nature = JuridicalNature.create(:name => item[:juridical_nature]) + + institution = PublicInstitution.new(:name => item[:name], :type => "PublicInstitution", :acronym => item[:acronym], :cnpj => item[:cnpj], :juridical_nature => juridical_nature, :governmental_power => governmental_power, :governmental_sphere => governmental_sphere) + institution.community = community + institution.corporate_name = item[:corporate_name] + institution.save! + end +end + +Given /^I sleep for (\d+) seconds$/ do |time| + sleep time.to_i +end + +Given /^I am logged in as mpog_admin$/ do + visit('/account/logout') + + user = User.new(:login => 'admin_user', :password => '123456', :password_confirmation => '123456', :email => 'admin_user@example.com') + person = Person.new :name=>"Mpog Admin", :identifier=>"mpog-admin" + user.person = person + user.save! + + user.activate + e = Environment.default + e.add_admin(user.person) + + visit('/account/login') + fill_in("Username", :with => user.login) + fill_in("Password", :with => '123456') + click_button("Log in") +end + diff --git a/src/noosfero-spb/gov_user/features/user_profile_edition.feature b/src/noosfero-spb/gov_user/features/user_profile_edition.feature new file mode 100644 index 0000000..be7ecfa --- /dev/null +++ b/src/noosfero-spb/gov_user/features/user_profile_edition.feature @@ -0,0 +1,77 @@ +Feature: Institution Field + As a user + I want to update my update my user data + So I can maintain my personal data updated + + Background: + Given "GovUserPlugin" plugin is enabled + And the following users + | login | name | + | joao | Joao Silva | + And I am logged in as admin + And I go to /admin/plugins + And I check "GovUserPlugin" + And I press "Save changes" + And feature "skip_new_user_email_confirmation" is enabled on environment + And I go to /admin/features/manage_fields + And I check "person_fields_country_active" + And I check "person_fields_state_active" + And I check "person_fields_city_active" + And I press "Save changes" + And Institutions has initial default values on database + And the following public institutions + | name | acronym | country | state | city | cnpj | juridical_nature | governmental_power | governmental_sphere | corporate_name | + | Ministerio das Cidades | MC | BR | DF | Gama | 58.745.189/0001-21 | Autarquia | Executivo | Federal | Ministerio das Cidades | + | Governo do DF | GDF | BR | DF | Taguatinga | 12.645.166/0001-44 | Autarquia | Legislativo | Federal | Governo do DF | + | Ministerio do Planejamento | MP | BR | DF | Brasilia | 41.769.591/0001-43 | Autarquia | Judiciario | Federal | Ministerio do Planejamento | + + Scenario: Go to control panel when clicked on 'Complete your profile' link + Given I am logged in as "joao" + And I am on joao's control panel + When I follow "Complete your profile" + Then I should see "Profile settings for " + And I should see "Personal information" + + @selenium + Scenario: Verify text information to use governmental e-mail + Given I am logged in as "joao" + And I am on joao's control panel + When I follow "Edit Profile" + Then I should see "If you work in a public agency use your government e-Mail" + + @selenium + Scenario: Add more then one instituion on profile editor + Given I am logged in as "joao" + And I am on joao's control panel + When I follow "Edit Profile" + And I follow "Add new institution" + And I type in "Minis" in autocomplete list "#input_institution" and I choose "Ministerio do Planejamento" + And I follow "Add new institution" + And I type in "Gover" in autocomplete list "#input_institution" and I choose "Governo do DF" + And I follow "Add new institution" + Then I should see "Ministerio do Planejamento" within ".institutions_added" + And I should see "Governo do DF" within ".institutions_added" + + @selenium + Scenario: Verify if field 'city' is shown when Brazil is selected + Given I am logged in as "joao" + And I am on joao's control panel + When I follow "Edit Profile" + Then I should see "City" + + @selenium + Scenario: Verify if field 'city' does not appear when Brazil is not selected as country + Given I am logged in as "joao" + And I am on joao's control panel + When I follow "Edit Profile" + And I select "United States" from "profile_data_country" + Then I should not see "City" within ".type-text" + + @selenium + Scenario: Show message of institution not found + Given I am logged in as "joao" + And I am on joao's control panel + When I follow "Edit Profile" + And I fill in "input_institution" with "Some Nonexistent Institution" + And I sleep for 1 seconds + Then I should see "No institution found" diff --git a/src/noosfero-spb/gov_user/lib/ext/communities_block.rb b/src/noosfero-spb/gov_user/lib/ext/communities_block.rb new file mode 100644 index 0000000..4a5fcaa --- /dev/null +++ b/src/noosfero-spb/gov_user/lib/ext/communities_block.rb @@ -0,0 +1,45 @@ +require_dependency 'communities_block' + +class CommunitiesBlock + + def profile_list + result = get_visible_profiles + result.slice(0..get_limit-1) + end + + def profile_count + profile_list.count + end + + private + + def get_visible_profiles + visible_profiles = profiles.visible.includes( + [:image,:domains,:preferred_domain,:environment] + ) + + delete_communities = [] + valid_communities_string = Community.get_valid_communities_string + Community.all.each{|community| delete_communities << community.id unless eval(valid_communities_string)} + + visible_profiles = visible_profiles.where(["profiles.id NOT IN (?)", delete_communities]) unless delete_communities.empty? + + if !prioritize_profiles_with_image + return visible_profiles.all( + :limit => get_limit, + :order => 'profiles.updated_at DESC' + ).sort_by {rand} + elsif profiles.visible.with_image.count >= get_limit + return visible_profiles.with_image.all( + :limit => get_limit * 5, + :order => 'profiles.updated_at DESC' + ).sort_by {rand} + else + visible_profiles = visible_profiles.with_image.sort_by {rand} + + visible_profiles.without_image.all( + :limit => get_limit * 5, :order => 'profiles.updated_at DESC' + ).sort_by {rand} + return visible_profiles + end + end +end diff --git a/src/noosfero-spb/gov_user/lib/ext/community.rb b/src/noosfero-spb/gov_user/lib/ext/community.rb new file mode 100644 index 0000000..d274660 --- /dev/null +++ b/src/noosfero-spb/gov_user/lib/ext/community.rb @@ -0,0 +1,25 @@ +require_dependency 'community' + +class Community + has_one :institution, :dependent=>:destroy + + def institution? + return !institution.nil? + end + + def remove_of_community_search_institution? + return institution? + end + + def self.get_valid_communities_string + remove_of_communities_methods = Community.instance_methods.select{|m| m =~ /remove_of_community_search/} + valid_communities_string = "!(" + remove_of_communities_methods.each do |method| + valid_communities_string += "community.send('#{method}') || " + end + valid_communities_string = valid_communities_string[0..-5] + valid_communities_string += ")" + + valid_communities_string + end +end diff --git a/src/noosfero-spb/gov_user/lib/ext/organization_rating.rb b/src/noosfero-spb/gov_user/lib/ext/organization_rating.rb new file mode 100644 index 0000000..fb2b59e --- /dev/null +++ b/src/noosfero-spb/gov_user/lib/ext/organization_rating.rb @@ -0,0 +1,20 @@ +require_dependency "organization_rating" + +OrganizationRating.class_eval do + + belongs_to :institution + + attr_accessible :institution, :institution_id + + validate :verify_institution + + private + + def verify_institution + if self.institution != nil + institution = Institution.find_by_id self.institution.id + self.errors.add :institution, _("not found") unless institution + end + end + +end diff --git a/src/noosfero-spb/gov_user/lib/ext/person.rb b/src/noosfero-spb/gov_user/lib/ext/person.rb new file mode 100644 index 0000000..0260a99 --- /dev/null +++ b/src/noosfero-spb/gov_user/lib/ext/person.rb @@ -0,0 +1,35 @@ +# encoding: utf-8 + +require_dependency 'person' + +class Person + + settings_items :percentage_incomplete, :type => :string, :default => "" + + attr_accessible :percentage_incomplete + + delegate :login, :to => :user, :prefix => true + + def institution? + false + end + + def secondary_email + self.user.secondary_email unless self.user.nil? + end + + def secondary_email= value + self.user.secondary_email = value unless self.user.nil? + end + + def institutions + institutions = [] + unless self.user.institutions.nil? + self.user.institutions.each do |institution| + institutions << institution.name + end + end + institutions + end + +end diff --git a/src/noosfero-spb/gov_user/lib/ext/search_controller.rb b/src/noosfero-spb/gov_user/lib/ext/search_controller.rb new file mode 100644 index 0000000..45a0523 --- /dev/null +++ b/src/noosfero-spb/gov_user/lib/ext/search_controller.rb @@ -0,0 +1,42 @@ +require_dependency 'search_controller' + +class SearchController + + def communities + delete_communities = [] + valid_communities_string = Community.get_valid_communities_string + Community.all.each{|community| delete_communities << community.id unless eval(valid_communities_string)} + + @scope = visible_profiles(Community) + @scope = @scope.where(["id NOT IN (?)", delete_communities]) unless delete_communities.empty? + + full_text_search + end + + def institutions + @titles[:institutions] = _("Institution Catalog") + results = filter_communities_list{|community| community.institution?} + results = results.paginate(:per_page => 24, :page => params[:page]) + @searches[@asset] = {:results => results} + @search = results + end + + def filter_communities_list + unfiltered_list = visible_profiles(Community) + + unless params[:query].nil? + unfiltered_list = unfiltered_list.select do |com| + com.name.downcase =~ /#{params[:query].downcase}/ + end + end + + communities_list = [] + unfiltered_list.each do |profile| + if profile.class == Community && !profile.is_template? && yield(profile) + communities_list << profile + end + end + + communities_list + end +end diff --git a/src/noosfero-spb/gov_user/lib/ext/search_helper.rb b/src/noosfero-spb/gov_user/lib/ext/search_helper.rb new file mode 100644 index 0000000..aae5940 --- /dev/null +++ b/src/noosfero-spb/gov_user/lib/ext/search_helper.rb @@ -0,0 +1,8 @@ +require_dependency 'search_helper' + +module SearchHelper + + COMMON_PROFILE_LIST_BLOCK ||= [] + COMMON_PROFILE_LIST_BLOCK << :institutions + +end diff --git a/src/noosfero-spb/gov_user/lib/ext/user.rb b/src/noosfero-spb/gov_user/lib/ext/user.rb new file mode 100644 index 0000000..ec5f7ce --- /dev/null +++ b/src/noosfero-spb/gov_user/lib/ext/user.rb @@ -0,0 +1,60 @@ +require_dependency 'user' + +class User + + GOV_SUFFIX = /^.*@[gov.br|jus.br|leg.br|mp.br]+$/ + + has_and_belongs_to_many :institutions + + validate :email_different_secondary?, :email_has_already_been_used?, + :secondary_email_format + + scope :primary_or_secondary_email_already_used?, lambda { |email| + where("email=? OR secondary_email=?", email, email) + } + + def email_different_secondary? + self.errors.add( + :base, + _("Email must be different from secondary email.") + ) if self.email == self.secondary_email + end + + def email_has_already_been_used? + user_already_saved = User.find(:first, + :conditions => ["email = ?", self.email]) + + if user_already_saved.nil? + primary_email_hasnt_been_used = + User.primary_or_secondary_email_already_used?(self.email).empty? + + if !self.secondary_email.nil? and self.secondary_email.empty? + self.secondary_email = nil + end + + secondary_email_hasnt_been_used = + User.primary_or_secondary_email_already_used?(self.secondary_email). + empty? + + if !primary_email_hasnt_been_used or !secondary_email_hasnt_been_used + self.errors.add(:base, _("E-mail or secondary e-mail already taken.")) + end + end + end + + def secondary_email_format + if !self.secondary_email.nil? and self.secondary_email.length > 0 + test = /\A[^@]+@([^@\.]+\.)+[^@\.]+\z/ + + unless test.match(self.secondary_email) + self.errors.add(:base, _("Invalid secondary email format.")) + end + end + end + + private + + def valid_format?(value, string_format) + !value.nil? && value.length > 0 && !string_format.match(value).nil? + end +end diff --git a/src/noosfero-spb/gov_user/lib/gov_user_plugin.rb b/src/noosfero-spb/gov_user/lib/gov_user_plugin.rb new file mode 100644 index 0000000..5cd63dc --- /dev/null +++ b/src/noosfero-spb/gov_user/lib/gov_user_plugin.rb @@ -0,0 +1,332 @@ +class GovUserPlugin < Noosfero::Plugin + include ActionView::Helpers::TagHelper + include ActionView::Helpers::FormTagHelper + include ActionView::Helpers::FormOptionsHelper + include ActionView::Helpers::JavaScriptHelper + include ActionView::Helpers::AssetTagHelper + include FormsHelper + include ActionView::Helpers + include ActionDispatch::Routing + include Rails.application.routes.url_helpers + + def self.plugin_name + "GovUserPlugin" + end + + def self.plugin_description + _("Add features related to Brazilian government.") + end + + def stylesheet? + true + end + + # Hotspot to insert html without an especific hotspot on view. + def body_beginning + return if context.session[:user].nil? or context.session[:hide_incomplete_percentage] == true + + person = context.environment.people.where(:user_id=>context.session[:user]).first + + if context.profile && context.profile.person? and !person.nil? + @person = person + @percentege = calc_percentage_registration(person) + + if @percentege >= 0 and @percentege < 100 + expanded_template('incomplete_registration.html.erb') + end + end + end + + def profile_editor_transaction_extras + single_hash_transactions = { :user => 'user', + :instituton => 'instituton' + } + + single_hash_transactions.each do |model, transaction| + call_model_transaction(model, transaction) + end + end + + def profile_editor_controller_filters + block = proc do + if request.post? && params[:institution] + is_admin = environment.admins.include?(current_user.person) + + unless is_admin + institution = profile.user.institutions + + if !params[:institution].blank? && params[:institution].class == Hash && !params[:institution][:sisp].nil? + if params[:institution][:sisp] != institution.sisp + params[:institution][:sisp] = institution.sisp + end + end + end + end + end + + [{ + :type => 'before_filter', + :method_name => 'validate_institution_sisp_field_access', + :options => { :only => :edit }, + :block => block + }] + end + + def profile_tabs + if context.profile.community? + return profile_tabs_institution if context.profile.institution? + end + end + + def control_panel_buttons + if context.profile.institution? + return institution_info_button + end + end + + def self.extra_blocks + { + InstitutionsBlock => { :type => [Environment, Person] } + } + end + + def custom_user_registration_attributes(user) + return if context.params[:user][:institution_ids].nil? + context.params[:user][:institution_ids].delete('') + + update_user_institutions(user) + + user.institutions.each do |institution| + community = institution.community + community.add_member user.person + end + end + + def profile_editor_extras + profile = context.profile + + if profile.person? + expanded_template('person_editor_extras.html.erb') + end + end + + + def calc_percentage_registration(person) + required_list = profile_required_list + empty_fields = profile_required_empty_list person + count = required_list[:person_fields].count + + required_list[:user_fields].count + percentege = 100 - ((empty_fields.count * 100) / count) + person.percentage_incomplete = percentege + person.save(validate: false) + percentege + end + + def stylesheet? + true + end + + def admin_panel_links + [ + { + :title => _('Create Institution'), + :url => { + :controller => 'gov_user_plugin', + :action => 'create_institution_admin' + } + } + ] + end + + + def js_files + %w( + vendor/modulejs-1.5.0.min.js + vendor/jquery.js + lib/noosfero-root.js + lib/select-element.js + lib/select-field-choices.js + views/complete-registration.js + views/control-panel.js + views/create-institution.js + views/new-community.js + views/user-edit-profile.js + views/gov-user-comments-extra-fields.js + initializer.js + app.js + ) + end + + def admin_panel_links + [ + { + :title => _('Create Institution'), + :url => { + :controller => 'gov_user_plugin', + :action => 'create_institution_admin' + } + } + ] + end + + protected + + def profile_required_list + fields = {} + fields[:person_fields] = %w(cell_phone + contact_phone + comercial_phone + country + city + state + organization_website + image + identifier + name) + + fields[:user_fields] = %w(secondary_email email) + fields + end + + def profile_required_empty_list(person) + empty_fields = [] + required_list = profile_required_list + + required_list[:person_fields].each do |field| + empty_fields << field.sub('_',' ') if person.send(field).blank? + end + required_list[:user_fields].each do |field| + empty_fields << field.sub('_',' ') if person.user.send(field).blank? + end + empty_fields + end + + + protected + + def user_transaction + user_editor_institution_actions + + User.transaction do + context.profile.user.update_attributes!(context.params[:user]) + end + end + + def institution_transaction + institution.date_modification = DateTime.now + institution.save + institution_models = %w(governmental_power governmental_sphere + juridical_nature) + + institution_models.each do |model| + call_institution_transaction(model) + end + + if context.params.has_key?(:institution) + Institution.transaction do + context.profile. + institution. + update_attributes!(context.params[:institution]) + end + end + end + + def organization_ratings_plugin_comments_extra_fields + Proc::new do render :file => 'ratings_extra_field' end + end + + def organization_ratings_plugin_extra_fields_show_data user_rating + gov_user_self = self + + Proc::new { + if logged_in? + is_admin = environment.admins.include?(current_user.person) + is_admin ||= user_rating.organization.admins.include?(current_user.person) + + if is_admin and gov_user_self.context.profile.software? + render :file => 'organization_ratings_extra_fields_show_institution', + :locals => {:user_rating => user_rating} + end + end + } + end + + private + + def call_model_transaction(model,name) + send(name + '_transaction') if context.params.key?(model.to_sym) + end + + def call_institution_transaction(model) + context.profile.institution.send(model + '_id = ', + context.params[model.to_sym]) + context.profile.institution.save! + end + + # Add and remove the user from it's institutions communities + def user_editor_institution_actions + user = context.profile.user + + old_communities = [] + context.profile.user.institutions.each do |institution| + old_communities << institution.community + end + + new_communities = [] + unless context.params[:user][:institution_ids].nil? + context.params[:user][:institution_ids].delete('') + + context.params[:user][:institution_ids].each do |id| + new_communities << Institution.find(id).community + end + end + + manage_user_institutions(user, old_communities, new_communities) + end + + def institution_info_button + { + :title => _('Institution Info'), + :icon => 'edit-profile-group control-panel-instituton-link', + :url => { + :controller => 'gov_user_plugin_myprofile', + :action => 'edit_institution' + } + } + end + + def manage_user_institutions(user, old_communities, new_communities) + leave_communities = (old_communities - new_communities) + enter_communities = (new_communities - old_communities) + + leave_communities.each do |community| + community.remove_member(user.person) + user.institutions.delete(community.institution) + end + + enter_communities.each do |community| + community.add_member(user.person) + user.institutions << community.institution + end + end + + def profile_tabs_institution + { :title => _('Institution'), + :id => 'intitution-fields', + :content => Proc::new do render :partial => 'profile/institution_tab' end, + :start => true + } + end + + def update_user_institutions(user) + context.params[:user][:institution_ids].each do |institution_id| + institution = Institution.find institution_id + user.institutions << institution + + if institution.community.admins.blank? + institution.community.add_admin(user.person) + end + end + user.save unless user.institution_ids.empty? + end +end diff --git a/src/noosfero-spb/gov_user/lib/governmental_power.rb b/src/noosfero-spb/gov_user/lib/governmental_power.rb new file mode 100644 index 0000000..cb7ca36 --- /dev/null +++ b/src/noosfero-spb/gov_user/lib/governmental_power.rb @@ -0,0 +1,13 @@ +class GovernmentalPower < ActiveRecord::Base + attr_accessible :name + + validates :name, :presence=>true, :uniqueness=>true + has_many :institutions + + def public_institutions + Institution.where( + :type=>"PublicInstitution", + :governmental_power_id=>self.id + ) + end +end diff --git a/src/noosfero-spb/gov_user/lib/governmental_sphere.rb b/src/noosfero-spb/gov_user/lib/governmental_sphere.rb new file mode 100644 index 0000000..aef8f8f --- /dev/null +++ b/src/noosfero-spb/gov_user/lib/governmental_sphere.rb @@ -0,0 +1,7 @@ +class GovernmentalSphere < ActiveRecord::Base + attr_accessible :name + + validates :name, :presence=>true, :uniqueness=>true + + has_many :institutions +end diff --git a/src/noosfero-spb/gov_user/lib/institution.rb b/src/noosfero-spb/gov_user/lib/institution.rb new file mode 100644 index 0000000..ee5e870 --- /dev/null +++ b/src/noosfero-spb/gov_user/lib/institution.rb @@ -0,0 +1,107 @@ +class Institution < ActiveRecord::Base + has_many :comments + + SEARCH_FILTERS = { + :order => %w[], + :display => %w[compact] + } + + def self.default_search_display + 'compact' + end + + belongs_to :governmental_power + belongs_to :governmental_sphere + belongs_to :juridical_nature + + has_and_belongs_to_many :users + + attr_accessible :name, :acronym, :unit_code, :parent_code, :unit_type, + :sub_juridical_nature, :normalization_level, + :version, :cnpj, :type, :governmental_power, + :governmental_sphere, :sisp, :juridical_nature, + :corporate_name, :siorg_code, :community + + validates :name, :presence=>true, :uniqueness=>true + + before_save :verify_institution_type + + belongs_to :community + + scope :search_institution, lambda{ |value| + where("name ilike ? OR acronym ilike ?", "%#{value}%", "%#{value}%" ) + } + + validate :validate_country, :validate_state, :validate_city, + :verify_institution_type, :validate_format_cnpj + + + protected + + def verify_institution_type + valid_institutions_type = ["PublicInstitution", "PrivateInstitution"] + + unless valid_institutions_type.include? self.type + self.errors.add( + :type, + _("invalid, only public and private institutions are allowed.") + ) + + return false + end + + return true + end + + def validate_country + unless self.community.blank? + if self.community.country.blank? && self.errors[:country].blank? + self.errors.add(:country, _("can't be blank")) + return false + end + end + + return true + end + + def validate_state + unless self.community.blank? + if self.community.country == "BR" && + (self.community.state.blank? || self.community.state == "-1") && + self.errors[:state].blank? + + self.errors.add(:state, _("can't be blank")) + return false + end + end + + return true + end + + def validate_city + unless self.community.blank? + if self.community.country == "BR" && self.community.city.blank? && + self.errors[:city].blank? + + self.errors.add(:city, _("can't be blank")) + return false + end + end + + return true + end + + def validate_format_cnpj + return true if self.community.blank? && self.community.country != "BR" + return true if self.cnpj.blank? + + format = /^\d{2}\.\d{3}\.\d{3}\/\d{4}\-\d{2}$/ + + if !self.cnpj.blank? && format.match(self.cnpj) + return true + else + self.errors.add(:cnpj, _("invalid format")) + return false + end + end +end diff --git a/src/noosfero-spb/gov_user/lib/institutions_block.rb b/src/noosfero-spb/gov_user/lib/institutions_block.rb new file mode 100644 index 0000000..8ef8f59 --- /dev/null +++ b/src/noosfero-spb/gov_user/lib/institutions_block.rb @@ -0,0 +1,71 @@ +class InstitutionsBlock < CommunitiesBlock + + def self.description + _('Institutions') + end + + def profile_count + profile_list.count + end + + def default_title + n_('{#} institution', '{#} institutions', profile_count) + end + + def help + _('This block displays the institutions in which the user is a member.') + end + + def footer + owner = self.owner + case owner + when Profile + lambda do |context| + link_to s_('institutions|View all'), :profile => owner.identifier, + :controller => 'profile', :action => 'communities', + :type => 'Institution' + end + when Environment + lambda do |context| + link_to s_('institutions|View all'), :controller => 'search', + :action => 'communities', :type => 'Institution' + end + else + '' + end + end + + def profile_list + result = get_visible_profiles + + result = result.select { |p| p.class == Community && p.institution? } + + result.slice(0..get_limit-1) + end + + def profiles + owner.communities + end + + private + + def get_visible_profiles + include_list = [:image,:domains,:preferred_domain,:environment] + visible_profiles = profiles.visible.includes(include_list) + + if !prioritize_profiles_with_image + visible_profiles.all(:limit => get_limit, + :order => 'profiles.updated_at DESC' + ).sort_by{ rand } + elsif profiles.visible.with_image.count >= get_limit + visible_profiles.with_image.all(:limit => get_limit * 5, + :order => 'profiles.updated_at DESC' + ).sort_by{ rand } + else + visible_profiles.with_image.sort_by{ rand } + + visible_profiles.without_image.all(:limit => get_limit * 5, + :order => 'profiles.updated_at DESC' + ).sort_by{ rand } + end + end +end diff --git a/src/noosfero-spb/gov_user/lib/institutions_users.rb b/src/noosfero-spb/gov_user/lib/institutions_users.rb new file mode 100644 index 0000000..e47da86 --- /dev/null +++ b/src/noosfero-spb/gov_user/lib/institutions_users.rb @@ -0,0 +1,4 @@ +class InstitutionUser < ActiveRecord::Base + belongs_to :user + belongs_to :institution +end diff --git a/src/noosfero-spb/gov_user/lib/juridical_nature.rb b/src/noosfero-spb/gov_user/lib/juridical_nature.rb new file mode 100644 index 0000000..1bb17f8 --- /dev/null +++ b/src/noosfero-spb/gov_user/lib/juridical_nature.rb @@ -0,0 +1,15 @@ +class JuridicalNature < ActiveRecord::Base + attr_accessible :name + + has_many :institutions + + validates_presence_of :name + validates_uniqueness_of :name + + def public_institutions + Institution.where( + :type=>"PublicInstitution", + :juridical_nature_id=>self.id + ) + end +end diff --git a/src/noosfero-spb/gov_user/lib/private_institution.rb b/src/noosfero-spb/gov_user/lib/private_institution.rb new file mode 100644 index 0000000..db490d2 --- /dev/null +++ b/src/noosfero-spb/gov_user/lib/private_institution.rb @@ -0,0 +1,2 @@ +class PrivateInstitution < Institution +end diff --git a/src/noosfero-spb/gov_user/lib/public_institution.rb b/src/noosfero-spb/gov_user/lib/public_institution.rb new file mode 100644 index 0000000..33d13eb --- /dev/null +++ b/src/noosfero-spb/gov_user/lib/public_institution.rb @@ -0,0 +1,13 @@ +class PublicInstitution < Institution + validates :governmental_power, :governmental_sphere, :juridical_nature, + :presence=>true + + validates :acronym, :allow_blank => true, :allow_nil => true, + :uniqueness=>true + + validates_format_of( + :cnpj, + :with => /^\d{2}\.\d{3}\.\d{3}\/\d{4}\-\d{2}$/, + :allow_nil => true, :allow_blank => true + ) +end diff --git a/src/noosfero-spb/gov_user/po/gov_user.pot b/src/noosfero-spb/gov_user/po/gov_user.pot new file mode 100644 index 0000000..de87012 --- /dev/null +++ b/src/noosfero-spb/gov_user/po/gov_user.pot @@ -0,0 +1,356 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 1.2-141-g2924904\n" +"POT-Creation-Date: 2015-09-11 17:06-0000\n" +"PO-Revision-Date: 2015-09-01 20:59-0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" + +#: plugins/gov_user/lib/ext/search_controller.rb:17 +msgid "Institution Catalog" +msgstr "" + +#: plugins/gov_user/lib/ext/user.rb:19 +msgid "Email must be different from secondary email." +msgstr "" + +#: plugins/gov_user/lib/ext/user.rb:40 +msgid "E-mail or secondary e-mail already taken." +msgstr "" + +#: plugins/gov_user/lib/ext/user.rb:50 +msgid "Invalid secondary email format." +msgstr "" + +#: plugins/gov_user/lib/ext/organization_rating.rb:16 +msgid "not found" +msgstr "" + +#: plugins/gov_user/lib/gov_user_plugin.rb:17 +msgid "Add features related to Brazilian government." +msgstr "" + +#: plugins/gov_user/lib/gov_user_plugin.rb:132 +#: plugins/gov_user/lib/gov_user_plugin.rb:163 +msgid "Create Institution" +msgstr "" + +#: plugins/gov_user/lib/gov_user_plugin.rb:287 +msgid "Institution Info" +msgstr "" + +#: plugins/gov_user/lib/gov_user_plugin.rb:312 +msgid "Institution" +msgstr "" + +#: plugins/gov_user/lib/institutions_block.rb:4 +#: plugins/gov_user/views/person_editor_extras.html.erb:11 +msgid "Institutions" +msgstr "" + +#: plugins/gov_user/lib/institutions_block.rb:12 +msgid "{#} institution" +msgid_plural "{#} institutions" +msgstr[0] "" +msgstr[1] "" + +#: plugins/gov_user/lib/institutions_block.rb:16 +msgid "This block displays the institutions in which the user is a member." +msgstr "" + +#: plugins/gov_user/lib/institutions_block.rb:24 +#: plugins/gov_user/lib/institutions_block.rb:30 +msgid "institutions|View all" +msgstr "" + +#: plugins/gov_user/lib/institution.rb:47 +msgid "invalid, only public and private institutions are allowed." +msgstr "" + +#: plugins/gov_user/lib/institution.rb:59 +#: plugins/gov_user/lib/institution.rb:73 +#: plugins/gov_user/lib/institution.rb:86 +msgid "can't be blank" +msgstr "" + +#: plugins/gov_user/lib/institution.rb:103 +msgid "invalid format" +msgstr "" + +#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:18 +#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:43 +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:83 +msgid "Select a Governmental Sphere" +msgstr "" + +#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:19 +#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:44 +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:90 +msgid "Select a Governmental Power" +msgstr "" + +#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:20 +#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:45 +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:96 +msgid "Select a Juridical Nature" +msgstr "" + +#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:21 +#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:46 +msgid "Select a state" +msgstr "" + +#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:168 +#: plugins/gov_user/controllers/gov_user_plugin_myprofile_controller.rb:26 +msgid "Could not find Governmental Power or Governmental Sphere" +msgstr "" + +#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:214 +msgid "Institution successful created!" +msgstr "" + +#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:219 +msgid "Institution could not be created!" +msgstr "" + +#: plugins/gov_user/test/unit/gov_user_person_test.rb:50 +#: plugins/gov_user/test/unit/gov_user_person_test.rb:56 +msgid "Name Should begin with a capital letter and no special characters" +msgstr "" + +#: plugins/gov_user/views/search/institutions.html.erb:3 +msgid "Type words about the %s you're looking for" +msgstr "" + +#: plugins/gov_user/views/ratings_extra_field.html.erb:2 +msgid "Organization name or Enterprise name" +msgstr "" + +#: plugins/gov_user/views/ratings_extra_field.html.erb:6 +#: plugins/gov_user/views/person_editor_extras.html.erb:21 +msgid "No institution found" +msgstr "" + +#: plugins/gov_user/views/incomplete_registration.html.erb:3 +msgid "Complete Profile" +msgstr "" + +#: plugins/gov_user/views/incomplete_registration.html.erb:6 +msgid "Complete your profile" +msgstr "" + +#: plugins/gov_user/views/incomplete_registration.html.erb:7 +msgid "Hide" +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:1 +msgid "Edit Institution" +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:5 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:5 +msgid "" +"Note that the creation of communities in this environment is restricted. " +"Your request to create this new community will be sent to %{environment} " +"administrators and will be approved or rejected according to their methods " +"and criteria." +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:11 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:11 +msgid "\"Can`t create new Institution: #{flash[:errors].length} errors\"" +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:24 +msgid "All fields with (*) are mandatory" +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:31 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:37 +msgid "Public Institution" +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:36 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:33 +msgid "Private Institution" +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:43 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:44 +msgid "Institution name already exists" +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:47 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:48 +msgid "Corporate Name" +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:52 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:53 +msgid "Country" +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:56 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:57 +msgid "State" +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:66 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:66 +msgid "CNPJ" +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:73 +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:75 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:72 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:74 +msgid "Acronym" +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:74 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:73 +msgid "Fantasy name" +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:82 +#: plugins/gov_user/views/profile/_institution_tab.html.erb:17 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:81 +msgid "Governmental Sphere:" +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:89 +#: plugins/gov_user/views/profile/_institution_tab.html.erb:16 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:88 +msgid "Governmental Power:" +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:95 +#: plugins/gov_user/views/profile/_institution_tab.html.erb:18 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:94 +msgid "Juridical Nature:" +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:102 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:101 +msgid "SISP?" +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:104 +#: plugins/gov_user/views/profile/_institution_tab.html.erb:19 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:104 +msgid "Yes" +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:106 +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:109 +#: plugins/gov_user/views/profile/_institution_tab.html.erb:19 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:106 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:108 +msgid "No" +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:114 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:114 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:118 +msgid "Save" +msgstr "" + +#: plugins/gov_user/views/person_editor_extras.html.erb:2 +msgid "Secondary e-mail" +msgstr "" + +#: plugins/gov_user/views/person_editor_extras.html.erb:22 +msgid "Add new institution" +msgstr "" + +#: plugins/gov_user/views/person_editor_extras.html.erb:23 +msgid "Create new institution" +msgstr "" + +#: plugins/gov_user/views/person_editor_extras.html.erb:39 +msgid "Should begin with a capital letter and no special characters" +msgstr "" + +#: plugins/gov_user/views/person_editor_extras.html.erb:40 +msgid "Email should have the following format: name@host.br" +msgstr "" + +#: plugins/gov_user/views/person_editor_extras.html.erb:41 +msgid "Site should have a valid format: http://name.hosts" +msgstr "" + +#: plugins/gov_user/views/person_editor_extras.html.erb:42 +msgid "If you work in a public agency use your government e-Mail" +msgstr "" + +#: plugins/gov_user/views/profile/_institution_tab.html.erb:3 +msgid "Institution Information" +msgstr "" + +#: plugins/gov_user/views/profile/_institution_tab.html.erb:6 +msgid "Type:" +msgstr "" + +#: plugins/gov_user/views/profile/_institution_tab.html.erb:7 +msgid "CNPJ:" +msgstr "" + +#: plugins/gov_user/views/profile/_institution_tab.html.erb:8 +msgid "Last modification:" +msgstr "" + +#: plugins/gov_user/views/profile/_institution_tab.html.erb:9 +msgid "Country:" +msgstr "" + +#: plugins/gov_user/views/profile/_institution_tab.html.erb:10 +msgid "State:" +msgstr "" + +#: plugins/gov_user/views/profile/_institution_tab.html.erb:11 +msgid "City:" +msgstr "" + +#: plugins/gov_user/views/profile/_institution_tab.html.erb:13 +msgid "Fantasy Name:" +msgstr "" + +#: plugins/gov_user/views/profile/_institution_tab.html.erb:15 +msgid "Acronym:" +msgstr "" + +#: plugins/gov_user/views/profile/_institution_tab.html.erb:19 +msgid "SISP:" +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:1 +msgid "New Institution" +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:16 +msgid "\"#{key_name.capitalize} #{value.join()}\"" +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:115 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:119 +msgid "Cancel" +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:121 +msgid "Could not send the form data to the server" +msgstr "" + +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:128 +msgid "Creating institution" +msgstr "" diff --git a/src/noosfero-spb/gov_user/po/pt/gov_user.po b/src/noosfero-spb/gov_user/po/pt/gov_user.po new file mode 100644 index 0000000..4a3a691 --- /dev/null +++ b/src/noosfero-spb/gov_user/po/pt/gov_user.po @@ -0,0 +1,370 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: 1.2-143-g8dfded9\n" +"POT-Creation-Date: 2015-09-11 17:14-0000\n" +"PO-Revision-Date: 2015-09-01 19:55-0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" + +#: plugins/gov_user/test/unit/gov_user_person_test.rb:50 +#: plugins/gov_user/test/unit/gov_user_person_test.rb:56 +msgid "Name Should begin with a capital letter and no special characters" +msgstr "" +"Nome deve iniciar com letrar maiúscula e não deve conter carateres especiais" + +#: plugins/gov_user/controllers/gov_user_plugin_myprofile_controller.rb:26 +#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:168 +msgid "Could not find Governmental Power or Governmental Sphere" +msgstr "Não foi possível encontrar o Poder ou Esfera Governamental" + +#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:18 +#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:43 +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:83 +msgid "Select a Governmental Sphere" +msgstr "Selecione uma Esfera Governamental" + +#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:19 +#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:44 +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:90 +msgid "Select a Governmental Power" +msgstr "Selecione um Poder Governamental" + +#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:20 +#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:45 +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:96 +msgid "Select a Juridical Nature" +msgstr "Seleciona uma Natureza Jurídica" + +#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:21 +#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:46 +msgid "Select a state" +msgstr "Selecione um Estado" + +#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:214 +msgid "Institution successful created!" +msgstr "Instituição criada com sucesso!" + +#: plugins/gov_user/controllers/gov_user_plugin_controller.rb:219 +msgid "Institution could not be created!" +msgstr "Instituição não pode ser criada!" + +#: plugins/gov_user/lib/gov_user_plugin.rb:17 +msgid "Add features related to Brazilian government." +msgstr "Adicionar funcionlidade relacionada com o governo brasileiro." + +#: plugins/gov_user/lib/gov_user_plugin.rb:132 +#: plugins/gov_user/lib/gov_user_plugin.rb:163 +msgid "Create Institution" +msgstr "Criar Instituição" + +#: plugins/gov_user/lib/gov_user_plugin.rb:287 +msgid "Institution Info" +msgstr "Informações da Instituição" + +#: plugins/gov_user/lib/gov_user_plugin.rb:312 +msgid "Institution" +msgstr "Instituição" + +#: plugins/gov_user/lib/institution.rb:47 +msgid "invalid, only public and private institutions are allowed." +msgstr "Inválido, somente instituições públicas e privadas são permitidas." + +#: plugins/gov_user/lib/institution.rb:59 +#: plugins/gov_user/lib/institution.rb:73 +#: plugins/gov_user/lib/institution.rb:86 +msgid "can't be blank" +msgstr "não pode ficar em branco" + +#: plugins/gov_user/lib/institution.rb:103 +msgid "invalid format" +msgstr "formato inválido" + +#: plugins/gov_user/lib/ext/user.rb:19 +msgid "Email must be different from secondary email." +msgstr "Email deve ser diferente do email secundário" + +#: plugins/gov_user/lib/ext/user.rb:40 +msgid "E-mail or secondary e-mail already taken." +msgstr "Email ou email secundário já estão sendo utilizados." + +#: plugins/gov_user/lib/ext/user.rb:50 +msgid "Invalid secondary email format." +msgstr "Formato inválido do email sencundário" + +#: plugins/gov_user/lib/ext/search_controller.rb:17 +msgid "Institution Catalog" +msgstr "Catálogo de Instituições" + +#: plugins/gov_user/lib/ext/organization_rating.rb:16 +msgid "not found" +msgstr "não encontrada" + +#: plugins/gov_user/lib/institutions_block.rb:4 +#: plugins/gov_user/views/person_editor_extras.html.erb:11 +msgid "Institutions" +msgstr "Instituições" + +#: plugins/gov_user/lib/institutions_block.rb:12 +msgid "{#} institution" +msgid_plural "{#} institutions" +msgstr[0] "{#} instituição" +msgstr[1] "{#} instituições" + +#: plugins/gov_user/lib/institutions_block.rb:16 +msgid "This block displays the institutions in which the user is a member." +msgstr "Esse bloco mostra as instituições em que o usuário faz parte." + +#: plugins/gov_user/lib/institutions_block.rb:24 +#: plugins/gov_user/lib/institutions_block.rb:30 +msgid "institutions|View all" +msgstr "instituições|Ver todas" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:1 +msgid "Edit Institution" +msgstr "Editar Instituição" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:5 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:5 +msgid "" +"Note that the creation of communities in this environment is restricted. " +"Your request to create this new community will be sent to %{environment} " +"administrators and will be approved or rejected according to their methods " +"and criteria." +msgstr "" +"Note que a criação de comunidades neste ambiente é restrita. Sua requisição " +"para criar essa nova comunidade será enviada para os administradores " +"%{environment} e será aprovada ou rejeitada de acordo com seus métodos e " +"critérios." + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:11 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:11 +msgid "\"Can`t create new Institution: #{flash[:errors].length} errors\"" +msgstr "" +"\"Não foi possível criar nova Instituição: #{flash[:errors].length} erros\"" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:24 +msgid "All fields with (*) are mandatory" +msgstr "Todos os campos com (*) são obrigatórios" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:31 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:37 +msgid "Public Institution" +msgstr "Instituição Pública" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:36 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:33 +msgid "Private Institution" +msgstr "Instituição Privada" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:43 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:44 +msgid "Institution name already exists" +msgstr "Nome de Instituição já existe" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:47 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:48 +msgid "Corporate Name" +msgstr "Nome da Coorporação" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:52 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:53 +msgid "Country" +msgstr "País" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:56 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:57 +msgid "State" +msgstr "Estado" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:66 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:66 +msgid "CNPJ" +msgstr "CNPJ" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:73 +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:75 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:72 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:74 +msgid "Acronym" +msgstr "Sigla" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:74 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:73 +msgid "Fantasy name" +msgstr "Nome Fantasia" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:82 +#: plugins/gov_user/views/profile/_institution_tab.html.erb:17 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:81 +msgid "Governmental Sphere:" +msgstr "Esfera Governamental:" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:89 +#: plugins/gov_user/views/profile/_institution_tab.html.erb:16 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:88 +msgid "Governmental Power:" +msgstr "Poder Governamental:" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:95 +#: plugins/gov_user/views/profile/_institution_tab.html.erb:18 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:94 +msgid "Juridical Nature:" +msgstr "Natureza Jurídica:" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:102 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:101 +msgid "SISP?" +msgstr "SISP?" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:104 +#: plugins/gov_user/views/profile/_institution_tab.html.erb:19 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:104 +msgid "Yes" +msgstr "Sim" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:106 +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:109 +#: plugins/gov_user/views/profile/_institution_tab.html.erb:19 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:106 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:108 +msgid "No" +msgstr "Não" + +#: plugins/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb:114 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:114 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:118 +msgid "Save" +msgstr "Salvar" + +#: plugins/gov_user/views/profile/_institution_tab.html.erb:3 +msgid "Institution Information" +msgstr "Informação da Instituição" + +#: plugins/gov_user/views/profile/_institution_tab.html.erb:6 +msgid "Type:" +msgstr "Tipo:" + +#: plugins/gov_user/views/profile/_institution_tab.html.erb:7 +msgid "CNPJ:" +msgstr "CNPJ:" + +#: plugins/gov_user/views/profile/_institution_tab.html.erb:8 +msgid "Last modification:" +msgstr "Última modificação:" + +#: plugins/gov_user/views/profile/_institution_tab.html.erb:9 +msgid "Country:" +msgstr "País:" + +#: plugins/gov_user/views/profile/_institution_tab.html.erb:10 +msgid "State:" +msgstr "Estado:" + +#: plugins/gov_user/views/profile/_institution_tab.html.erb:11 +msgid "City:" +msgstr "Cidade:" + +#: plugins/gov_user/views/profile/_institution_tab.html.erb:13 +msgid "Fantasy Name:" +msgstr "Nome Fantasia:" + +#: plugins/gov_user/views/profile/_institution_tab.html.erb:15 +msgid "Acronym:" +msgstr "Sigla:" + +#: plugins/gov_user/views/profile/_institution_tab.html.erb:19 +msgid "SISP:" +msgstr "SISP:" + +#: plugins/gov_user/views/ratings_extra_field.html.erb:2 +msgid "Organization name or Enterprise name" +msgstr "Nome da organização ou empresa" + +#: plugins/gov_user/views/ratings_extra_field.html.erb:6 +#: plugins/gov_user/views/person_editor_extras.html.erb:21 +msgid "No institution found" +msgstr "Nenhuma instituição encontrada" + +#: plugins/gov_user/views/person_editor_extras.html.erb:2 +msgid "Secondary e-mail" +msgstr "Email secundário" + +#: plugins/gov_user/views/person_editor_extras.html.erb:22 +msgid "Add new institution" +msgstr "Adicionar nova instituição" + +#: plugins/gov_user/views/person_editor_extras.html.erb:23 +msgid "Create new institution" +msgstr "Criar nova instituição" + +#: plugins/gov_user/views/person_editor_extras.html.erb:39 +msgid "Should begin with a capital letter and no special characters" +msgstr "Deve começar com letra maíscula e não conter caracteres especiais" + +#: plugins/gov_user/views/person_editor_extras.html.erb:40 +msgid "Email should have the following format: name@host.br" +msgstr "Email deve ter o seguinte formato: name@host.br" + +#: plugins/gov_user/views/person_editor_extras.html.erb:41 +msgid "Site should have a valid format: http://name.hosts" +msgstr "Site deve ter um formato válido: http://name.hosts" + +#: plugins/gov_user/views/person_editor_extras.html.erb:42 +msgid "If you work in a public agency use your government e-Mail" +msgstr "Se você trabalha em uma agência pública use seu email governamental" + +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:1 +msgid "New Institution" +msgstr "Nova Instituição" + +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:16 +msgid "\"#{key_name.capitalize} #{value.join()}\"" +msgstr "\"#{key_name.capitalize} #{value.join()}\"" + +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:115 +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:119 +msgid "Cancel" +msgstr "Cancelar" + +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:121 +msgid "Could not send the form data to the server" +msgstr "Não foi possível enviar os dados do formulário para o servidor" + +#: plugins/gov_user/views/gov_user_plugin/_institution.html.erb:128 +msgid "Creating institution" +msgstr "Criar instituição" + +#: plugins/gov_user/views/search/institutions.html.erb:3 +msgid "Type words about the %s you're looking for" +msgstr "Escreve palavras sobre o %s que você está procurando" + +#: plugins/gov_user/views/incomplete_registration.html.erb:3 +msgid "Complete Profile" +msgstr "Complete o Perfil" + +#: plugins/gov_user/views/incomplete_registration.html.erb:6 +msgid "Complete your profile" +msgstr "Complete seu perfil" + +#: plugins/gov_user/views/incomplete_registration.html.erb:7 +msgid "Hide" +msgstr "Ocultar" + +#~ msgid "A plugin that does this and that." +#~ msgstr "Um plugin que faz isso e aquilo" + +#~ msgid "The governamental email must be the primary one." +#~ msgstr "O email governamental deve ser o principal" + +#~ msgid "Institution is obligatory if user has a government email." +#~ msgstr "Instituição é obrigatória se o usuário tem email governamental." diff --git a/src/noosfero-spb/gov_user/public/app.js b/src/noosfero-spb/gov_user/public/app.js new file mode 100644 index 0000000..7e98375 --- /dev/null +++ b/src/noosfero-spb/gov_user/public/app.js @@ -0,0 +1,11 @@ +(function() { + 'use strict'; + + var $ = modulejs.require('jquery'); + var Initializer = modulejs.require('Initializer'); + + + $(document).ready(function() { + Initializer.init(); + }); +})(); diff --git a/src/noosfero-spb/gov_user/public/initializer.js b/src/noosfero-spb/gov_user/public/initializer.js new file mode 100644 index 0000000..395f20c --- /dev/null +++ b/src/noosfero-spb/gov_user/public/initializer.js @@ -0,0 +1,33 @@ +(function() { + 'use strict'; + + var dependencies = [ + 'ControlPanel', + 'CreateInstitution', + 'CompleteRegistration', + 'UserEditProfile', + 'NewCommunity', + 'GovUserCommentsExtraFields' + ]; + + + modulejs.define('Initializer', dependencies, function() { + var __dependencies = arguments; + + + function call_dependency(dependency) { + if( dependency.isCurrentPage() ) { + dependency.init(); + } + } + + + return { + init: function() { + for(var i=0, len = __dependencies.length; i < len; i++) { + call_dependency(__dependencies[i]); + } + } + }; + }); +})(); diff --git a/src/noosfero-spb/gov_user/public/lib/noosfero-root.js b/src/noosfero-spb/gov_user/public/lib/noosfero-root.js new file mode 100644 index 0000000..cd3c8bf --- /dev/null +++ b/src/noosfero-spb/gov_user/public/lib/noosfero-root.js @@ -0,0 +1,13 @@ +modulejs.define('NoosferoRoot', function() { + 'use strict'; + + + function url_with_subdirectory(url) { + return noosfero_root() + url; + } + + + return { + urlWithSubDirectory: url_with_subdirectory + } +}); diff --git a/src/noosfero-spb/gov_user/public/lib/select-element.js b/src/noosfero-spb/gov_user/public/lib/select-element.js new file mode 100644 index 0000000..26880ae --- /dev/null +++ b/src/noosfero-spb/gov_user/public/lib/select-element.js @@ -0,0 +1,35 @@ +modulejs.define('SelectElement', function() { + 'use strict'; + + + function SelectElement(name, id) { + this.select = document.createElement("select"); + } + + + SelectElement.prototype.setAttr = function(attr, value) { + return this.select.setAttribute(attr, value); + }; + + + SelectElement.prototype.addOption = function(option) { + return this.select.add(option); + }; + + + SelectElement.prototype.getSelect = function() { + return this.select; + }; + + + SelectElement.generateOption = function(value, text) { + var option; + option = document.createElement("option"); + option.setAttribute("value", value); + option.text = text; + return option; + }; + + + return SelectElement; +}); diff --git a/src/noosfero-spb/gov_user/public/lib/select-field-choices.js b/src/noosfero-spb/gov_user/public/lib/select-field-choices.js new file mode 100644 index 0000000..095d4e1 --- /dev/null +++ b/src/noosfero-spb/gov_user/public/lib/select-field-choices.js @@ -0,0 +1,81 @@ +modulejs.define('SelectFieldChoices', ['jquery', 'SelectElement'], function($, SelectElement) { + 'use strict'; + + + function SelectFieldChoices(state_id, city_id, state_url) { + this.state_id = state_id; + this.input_html = $(state_id).parent().html(); + this.old_value = $(state_id).val(); + this.city_parent_div = $(city_id).parent().parent().parent(); + this.state_url = state_url; + } + + + SelectFieldChoices.prototype.getCurrentStateElement = function() { + return $(this.state_id); + }; + + + SelectFieldChoices.prototype.replaceWith = function(html) { + var parent_div = this.getCurrentStateElement().parent(); + parent_div.html(html); + }; + + + SelectFieldChoices.prototype.generateSelect = function(state_list) { + var select_element, option; + + select_element = new SelectElement(); + select_element.setAttr("name", "profile_data[state]"); + select_element.setAttr("id", "state_field"); + select_element.setAttr("class", "type-select valid"); + + state_list.forEach(function(state) { + option = SelectElement.generateOption(state, state); + select_element.addOption(option); + }); + + return select_element.getSelect(); + }; + + + SelectFieldChoices.prototype.replaceStateWithSelectElement = function() { + var klass = this; + + $.get(this.state_url, function(response) { + var select_html; + + if (response.length > 0) { + select_html = klass.generateSelect(response); + klass.replaceWith(select_html); + + if (klass.old_value.length !== 0 && response.include(klass.old_value)) { + klass.getCurrentStateElement().val(klass.old_value); + } + } + }); + }; + + + SelectFieldChoices.prototype.replaceStateWithInputElement = function() { + this.replaceWith(this.input_html); + }; + + + SelectFieldChoices.prototype.hideCity = function() { + this.city_parent_div.addClass("mpog_hidden_field"); + }; + + + SelectFieldChoices.prototype.showCity = function() { + this.city_parent_div.removeClass("mpog_hidden_field"); + }; + + + SelectFieldChoices.prototype.actualFieldIsInput = function() { + return this.getCurrentStateElement().attr("type") === "text"; + }; + + + return SelectFieldChoices; +}); diff --git a/src/noosfero-spb/gov_user/public/static/governmental_powers.txt b/src/noosfero-spb/gov_user/public/static/governmental_powers.txt new file mode 100644 index 0000000..d798c3a --- /dev/null +++ b/src/noosfero-spb/gov_user/public/static/governmental_powers.txt @@ -0,0 +1,4 @@ +Executivo +Legislativo +Judiciário +Não se aplica diff --git a/src/noosfero-spb/gov_user/public/static/governmental_sphere.txt b/src/noosfero-spb/gov_user/public/static/governmental_sphere.txt new file mode 100644 index 0000000..ef7cfce --- /dev/null +++ b/src/noosfero-spb/gov_user/public/static/governmental_sphere.txt @@ -0,0 +1,4 @@ +Federal +Estadual +Distrital +Municipal diff --git a/src/noosfero-spb/gov_user/public/static/juridical_nature.txt b/src/noosfero-spb/gov_user/public/static/juridical_nature.txt new file mode 100644 index 0000000..d66b9a7 --- /dev/null +++ b/src/noosfero-spb/gov_user/public/static/juridical_nature.txt @@ -0,0 +1,8 @@ +Administração Direta +Autarquia +Empresa Pública +Fundação +Orgão Autônomo +Sociedade +Sociedade Civil +Sociedade de Economia Mista diff --git a/src/noosfero-spb/gov_user/public/style.css b/src/noosfero-spb/gov_user/public/style.css new file mode 100644 index 0000000..c1fdab2 --- /dev/null +++ b/src/noosfero-spb/gov_user/public/style.css @@ -0,0 +1,26 @@ +#complete_registration { + padding: 5px; + width: 100%; + background-color: #fff; +} + +#complete_registration a { + text-decoration: none; +} + +#complete_registration a:hover { + font-weight: bold; +} + +#complete_registration_percentage { + width: 100%; + height: 20px; + background: #fff; + border: solid 1px #000; +} + +.highlight-error { + outline: none; + border-color: #FF0000; + box-shadow: 0 0 10px #FF0000; +} diff --git a/src/noosfero-spb/gov_user/public/vendor/jquery.js b/src/noosfero-spb/gov_user/public/vendor/jquery.js new file mode 100644 index 0000000..a3f4ebf --- /dev/null +++ b/src/noosfero-spb/gov_user/public/vendor/jquery.js @@ -0,0 +1,3 @@ +modulejs.define('jquery', function() { + return jQuery; +}); diff --git a/src/noosfero-spb/gov_user/public/vendor/jquery.maskedinput.min.js b/src/noosfero-spb/gov_user/public/vendor/jquery.maskedinput.min.js new file mode 100644 index 0000000..0d9ce6e --- /dev/null +++ b/src/noosfero-spb/gov_user/public/vendor/jquery.maskedinput.min.js @@ -0,0 +1,7 @@ +/* + Masked Input plugin for jQuery + Copyright (c) 2007-2013 Josh Bush (digitalbush.com) + Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license) + Version: 1.3.1 +*/ +(function(e){function t(){var e=document.createElement("input"),t="onpaste";return e.setAttribute(t,""),"function"==typeof e[t]?"paste":"input"}var n,a=t()+".mask",r=navigator.userAgent,i=/iphone/i.test(r),o=/android/i.test(r);e.mask={definitions:{9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},dataName:"rawMaskFn",placeholder:"_"},e.fn.extend({caret:function(e,t){var n;if(0!==this.length&&!this.is(":hidden"))return"number"==typeof e?(t="number"==typeof t?t:e,this.each(function(){this.setSelectionRange?this.setSelectionRange(e,t):this.createTextRange&&(n=this.createTextRange(),n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",e),n.select())})):(this[0].setSelectionRange?(e=this[0].selectionStart,t=this[0].selectionEnd):document.selection&&document.selection.createRange&&(n=document.selection.createRange(),e=0-n.duplicate().moveStart("character",-1e5),t=e+n.text.length),{begin:e,end:t})},unmask:function(){return this.trigger("unmask")},mask:function(t,r){var c,l,s,u,f,h;return!t&&this.length>0?(c=e(this[0]),c.data(e.mask.dataName)()):(r=e.extend({placeholder:e.mask.placeholder,completed:null},r),l=e.mask.definitions,s=[],u=h=t.length,f=null,e.each(t.split(""),function(e,t){"?"==t?(h--,u=e):l[t]?(s.push(RegExp(l[t])),null===f&&(f=s.length-1)):s.push(null)}),this.trigger("unmask").each(function(){function c(e){for(;h>++e&&!s[e];);return e}function d(e){for(;--e>=0&&!s[e];);return e}function m(e,t){var n,a;if(!(0>e)){for(n=e,a=c(t);h>n;n++)if(s[n]){if(!(h>a&&s[n].test(R[a])))break;R[n]=R[a],R[a]=r.placeholder,a=c(a)}b(),x.caret(Math.max(f,e))}}function p(e){var t,n,a,i;for(t=e,n=r.placeholder;h>t;t++)if(s[t]){if(a=c(t),i=R[t],R[t]=n,!(h>a&&s[a].test(i)))break;n=i}}function g(e){var t,n,a,r=e.which;8===r||46===r||i&&127===r?(t=x.caret(),n=t.begin,a=t.end,0===a-n&&(n=46!==r?d(n):a=c(n-1),a=46===r?c(a):a),k(n,a),m(n,a-1),e.preventDefault()):27==r&&(x.val(S),x.caret(0,y()),e.preventDefault())}function v(t){var n,a,i,l=t.which,u=x.caret();t.ctrlKey||t.altKey||t.metaKey||32>l||l&&(0!==u.end-u.begin&&(k(u.begin,u.end),m(u.begin,u.end-1)),n=c(u.begin-1),h>n&&(a=String.fromCharCode(l),s[n].test(a)&&(p(n),R[n]=a,b(),i=c(n),o?setTimeout(e.proxy(e.fn.caret,x,i),0):x.caret(i),r.completed&&i>=h&&r.completed.call(x))),t.preventDefault())}function k(e,t){var n;for(n=e;t>n&&h>n;n++)s[n]&&(R[n]=r.placeholder)}function b(){x.val(R.join(""))}function y(e){var t,n,a=x.val(),i=-1;for(t=0,pos=0;h>t;t++)if(s[t]){for(R[t]=r.placeholder;pos++a.length)break}else R[t]===a.charAt(pos)&&t!==u&&(pos++,i=t);return e?b():u>i+1?(x.val(""),k(0,h)):(b(),x.val(x.val().substring(0,i+1))),u?t:f}var x=e(this),R=e.map(t.split(""),function(e){return"?"!=e?l[e]?r.placeholder:e:void 0}),S=x.val();x.data(e.mask.dataName,function(){return e.map(R,function(e,t){return s[t]&&e!=r.placeholder?e:null}).join("")}),x.attr("readonly")||x.one("unmask",function(){x.unbind(".mask").removeData(e.mask.dataName)}).bind("focus.mask",function(){clearTimeout(n);var e;S=x.val(),e=y(),n=setTimeout(function(){b(),e==t.length?x.caret(0,e):x.caret(e)},10)}).bind("blur.mask",function(){y(),x.val()!=S&&x.change()}).bind("keydown.mask",g).bind("keypress.mask",v).bind(a,function(){setTimeout(function(){var e=y(!0);x.caret(e),r.completed&&e==x.val().length&&r.completed.call(x)},0)}),y()}))}})})(jQuery); \ No newline at end of file diff --git a/src/noosfero-spb/gov_user/public/vendor/modulejs-1.5.0.min.js b/src/noosfero-spb/gov_user/public/vendor/modulejs-1.5.0.min.js new file mode 100644 index 0000000..9905b63 --- /dev/null +++ b/src/noosfero-spb/gov_user/public/vendor/modulejs-1.5.0.min.js @@ -0,0 +1,2 @@ +/* modulejs 1.5.0 - http://larsjung.de/modulejs/ */ +!function(n){this.modulejs=n()}(function(){"use strict";function n(n){return function(r){return l.toString.call(r)==="[object "+n+"]"}}function r(n){return n===new Object(n)}function t(n,r){return l.hasOwnProperty.call(n,r)}function e(n,r,e){if(p&&n.forEach===p)n.forEach(r,e);else if(n.length===+n.length)for(var i=0,o=n.length;o>i;i+=1)r.call(e,n[i],i,n);else for(var u in n)t(n,u)&&r.call(e,n[u],u,n)}function i(n,r){for(var t=0,e=n.length;e>t;t+=1)if(n[t]===r)return!0;return!1}function o(n){var r={},i=[];return e(n,function(n){t(r,n)||(i.push(n),r[n]=1)}),i}function u(n,r,t){if(n){var e=new Error("[modulejs-"+r+"] "+t);throw e.code=r,e}}function c(n,r,a){if(u(!h(n),31,'id must be a string "'+n+'"'),!r&&t(b,n))return b[n];var f=y[n];u(!f,32,'id not defined "'+n+'"'),a=(a||[]).slice(0),a.push(n);var s=[];if(e(f.deps,function(n){u(i(a,n),33,"circular dependencies: "+a+" & "+n),r?(s=s.concat(c(n,r,a)),s.push(n)):s.push(c(n,r,a))}),r)return o(s);var d=f.fn.apply(void 0,s);return b[n]=d,d}function a(n,t,e){void 0===e&&(e=t,t=[]),u(!h(n),11,'id must be a string "'+n+'"'),u(y[n],12,'id already defined "'+n+'"'),u(!g(t),13,'dependencies for "'+n+'" must be an array "'+t+'"'),u(!r(e)&&!v(e),14,'arg for "'+n+'" must be object or function "'+e+'"'),y[n]={id:n,deps:t,fn:v(e)?e:function(){return e}}}function f(n){return c(n)}function s(){var n={};return e(y,function(r,e){n[e]={deps:r.deps.slice(0),reqs:c(e,!0),init:t(b,e)}}),e(y,function(r,t){var o=[];e(y,function(r,e){i(n[e].reqs,t)&&o.push(e)}),n[t].reqd=o}),n}function d(n){var r="\n";return e(s(),function(t,e){var i=n?t.reqd:t.reqs;r+=(t.init?"* ":" ")+e+" -> [ "+i.join(", ")+" ]\n"}),r}var l=Object.prototype,p=Array.prototype.forEach,h=n("String"),v=n("Function"),g=Array.isArray||n("Array"),y={},b={};return{define:a,require:f,state:s,log:d,_private:{isString:h,isFunction:v,isArray:g,isObject:r,has:t,each:e,contains:i,uniq:o,err:u,definitions:y,instances:b,resolve:c}}}); \ No newline at end of file diff --git a/src/noosfero-spb/gov_user/public/views/complete-registration.js b/src/noosfero-spb/gov_user/public/views/complete-registration.js new file mode 100644 index 0000000..81dd745 --- /dev/null +++ b/src/noosfero-spb/gov_user/public/views/complete-registration.js @@ -0,0 +1,60 @@ +modulejs.define('CompleteRegistration', ['jquery', 'NoosferoRoot'], function($, NoosferoRoot) { + 'use strict'; + + + var AJAX_URL = { + hide_registration_incomplete_percentage: + NoosferoRoot.urlWithSubDirectory("/plugin/gov_user/hide_registration_incomplete_percentage") + }; + + + function hide_incomplete_percentage(evt) { + evt.preventDefault(); + + jQuery.get(AJAX_URL.hide_registration_incomplete_percentage, {hide:true}, function(response){ + if( response === true ) { + jQuery("#complete_registration").fadeOut(); + } + }); + } + + + function show_complete_progressbar() { + var percentage = jQuery("#complete_registration_message span").html(); + var canvas_tag = document.getElementById("complete_registration_percentage"); + + if( canvas_tag !== null ) { + var context = canvas_tag.getContext("2d"); + + percentage = canvas_tag.width*(percentage/100.0); + + context.beginPath(); + context.rect(0, 0, percentage, canvas_tag.height); + context.fillStyle = '#00FF00'; + context.fill(); + } + } + + + function repositioning_bar_percentage() { + var complete_message = $("#complete_registration").remove(); + + $(".profile-info-options").before(complete_message); + } + + + return { + isCurrentPage: function() { + return $("#complete_registration").length === 1; + }, + + + init: function() { + repositioning_bar_percentage(); + + jQuery(".hide-incomplete-percentage").click(hide_incomplete_percentage); + + show_complete_progressbar(); + } + } +}); diff --git a/src/noosfero-spb/gov_user/public/views/control-panel.js b/src/noosfero-spb/gov_user/public/views/control-panel.js new file mode 100644 index 0000000..d89a588 --- /dev/null +++ b/src/noosfero-spb/gov_user/public/views/control-panel.js @@ -0,0 +1,32 @@ +modulejs.define('ControlPanel', ['jquery'], function($) { + 'use strict'; + + function add_institution_on_control_panel(control_panel) { + /*var institution_link = $(".control-panel-instituton-link").remove(); + + if( institution_link.size() > 0 ) { + control_panel.prepend(institution_link); + }*/ + } + + + function add_itens_on_controla_panel() { + var control_panel = $(".control-panel"); + + if( control_panel.size() > 0 ) { + add_institution_on_control_panel(control_panel); + } + } + + + return { + isCurrentPage: function() { + return $("#profile-editor-index").length === 1; + }, + + + init: function() { + add_itens_on_controla_panel(); + } + } +}); diff --git a/src/noosfero-spb/gov_user/public/views/create-institution.js b/src/noosfero-spb/gov_user/public/views/create-institution.js new file mode 100644 index 0000000..354295c --- /dev/null +++ b/src/noosfero-spb/gov_user/public/views/create-institution.js @@ -0,0 +1,406 @@ +modulejs.define('CreateInstitution', ['jquery', 'NoosferoRoot', 'SelectElement'], function($, NoosferoRoot, SelectElement) { + 'use strict'; + + var AJAX_URL = { + create_institution_modal: + NoosferoRoot.urlWithSubDirectory("/plugin/gov_user/create_institution"), + new_institution: + NoosferoRoot.urlWithSubDirectory("/plugin/gov_user/new_institution"), + institution_already_exists: + NoosferoRoot.urlWithSubDirectory("/plugin/gov_user/institution_already_exists"), + get_institutions: + NoosferoRoot.urlWithSubDirectory("/plugin/gov_user/get_institutions"), + auto_complete_city: + NoosferoRoot.urlWithSubDirectory("/account/search_cities") + }; + + + function open_create_institution_modal(evt) { + evt.preventDefault(); + + $.get(AJAX_URL.create_institution_modal, function(response){ + $("#institution_dialog").html(response); + + set_form_count_custom_data(); + set_events(); + + $("#institution_dialog").dialog({ + modal: true, + width: 500, + height: 530, + position: 'center', + close: function() { + $("#institution_dialog").html(""); + $('#institution_empty_ajax_message').switchClass("show-field", "hide-field"); + } + }); + }); + } + + + function show_public_institutions_fields() { + $(".public-institutions-fields").show(); + } + + + function show_private_institutions_fields() { + $(".public-institutions-fields").hide(); + $("#institutions_governmental_power option").selected(0); + $("#institutions_governmental_sphere option").selected(0); + } + + + function get_comunity_post_data() { + return { + name : $("#community_name").val(), + country : $("#community_country").val(), + state : $("#community_state").val(), + city : $("#community_city").val() + }; + } + + + function get_institution_post_data() { + return { + cnpj: $("#institutions_cnpj").val(), + type: $("input[name='institutions[type]']:checked").val(), + acronym : $("#institutions_acronym").val(), + governmental_power: $("#institutions_governmental_power").selected().val(), + governmental_sphere: $("#institutions_governmental_sphere").selected().val(), + juridical_nature: $("#institutions_juridical_nature").selected().val(), + corporate_name: $("#institutions_corporate_name").val() + }; + } + + + function get_post_data() { + var post_data = {}; + + post_data.community = get_comunity_post_data(); + post_data.institutions = get_institution_post_data(); + + return post_data; + } + + + function success_ajax_response(response) { + close_loading(); + + if(response.success){ + var institution_name = response.institution_data.name; + var institution_id = response.institution_data.id; + + $("#institution_dialog").html("

    "+response.message+"

    "); + $("#create_institution_errors").switchClass("show-field", "hide-field"); + + $(".institution_container").append(get_clone_institution_data(institution_id)); + add_selected_institution_to_list(institution_id, institution_name); + + $(".remove-institution").click(remove_institution); + } else { + var errors = create_error_list(response); + $("#create_institution_errors").switchClass("hide-field", "show-field").html("

    "+response.message+"

    "+errors); + + show_errors_in_each_field(response.errors); + } + } + + function create_error_list(response){ + var errors = "
      "; + var field_name; + + for(var error_key in response.errors) { + field_name = adjust_error_key(error_key); + + if(response.errors[error_key].length > 0){ + errors += "
    • "+field_name+": "+response.errors[error_key]+"
    • "; + } + } + + errors += "
    "; + return errors; + } + + + function show_errors_in_each_field(errors) { + var error_keys = Object.keys(errors); + + // (field)|(field)|... + var verify_error = new RegExp("(\\[" + error_keys.join("\\])|(\\[") + "\\])" ); + + var fields_with_errors = $("#institution_dialog .formfield input").filter(function(index, field) { + $(field).removeClass("highlight-error"); + return verify_error.test(field.getAttribute("name")); + }); + + var selects_with_errors = $("#institution_dialog .formfield select").filter(function(index, field) { + $(field).removeClass("highlight-error"); + return verify_error.test(field.getAttribute("name")); + }); + + fields_with_errors.addClass("highlight-error"); + selects_with_errors.addClass("highlight-error"); + } + + + function adjust_error_key(error_key) { + var text = error_key.replace(/_/, " "); + text = text.charAt(0).toUpperCase() + text.slice(1); + + return text; + } + + + function save_institution(evt) { + evt.preventDefault(); + + open_loading($("#loading_message").val()); + $.ajax({ + url: AJAX_URL.new_institution, + data : get_post_data(), + type: "POST", + success: success_ajax_response, + error: function() { + close_loading(); + var error_message = $("#institution_error_message").val(); + $("#create_institution_errors").switchClass("hide-field", "show-field").html("

    "+error_message+"

    "); + } + }); + } + + function cancel_institution(evt){ + evt.preventDefault(); + $('#institution_dialog').dialog('close'); + } + + + function institution_already_exists(){ + if( this.value.length >= 3 ) { + $.get(AJAX_URL.institution_already_exists, {name:this.value}, function(response){ + if( response === true ) { + $("#already_exists_text").switchClass("hide-field", "show-field"); + } else { + $("#already_exists_text").switchClass("show-field", "hide-field"); + } + }); + } + } + + + function get_clone_institution_data(value) { + var user_institutions = $(".user_institutions").first().clone(); + user_institutions.val(value); + + return user_institutions; + } + + + function institution_autocomplete() { + $("#input_institution").autocomplete({ + source : function(request, response){ + $.ajax({ + type: "GET", + url: AJAX_URL.get_institutions, + data: {query: request.term}, + success: function(result){ + response(result); + + if( result.length === 0 ) { + $('#institution_empty_ajax_message').switchClass("hide-field", "show-field"); + } else { + $('#institution_empty_ajax_message').switchClass("show-field", "hide-field"); + } + }, + error: function(ajax, stat, errorThrown) { + console.log('Link not found : ' + errorThrown); + } + }); + }, + + minLength: 2, + + select : function (event, selected) { + $("#institution_selected").val(selected.item.id).attr("data-name", selected.item.label); + } + }); + } + + + function add_selected_institution_to_list(id, name) { + var selected_institution = "
  • "+name; + selected_institution += "
  • "; + + $(".institutions_added").append(selected_institution); + } + + + function add_new_institution(evt) { + evt.preventDefault(); + var selected = $("#institution_selected"); + var institution_already_added = $(".institutions_added li[data-institution='"+selected.val()+"']").length; + + if(selected.val().length > 0 && institution_already_added === 0) { + //field that send the institutions to the server + $(".institution_container").append(get_clone_institution_data(selected.val())); + + // Visualy add the selected institution to the list + add_selected_institution_to_list(selected.val(), selected.attr("data-name")); + + // clean the institution flag + selected.val("").attr("data-name", ""); + $("#input_institution").val(""); + + $(".remove-institution").click(remove_institution); + } + } + + + function remove_institution(evt) { + evt.preventDefault(); + var code = $(this).parent().attr("data-institution"); + + $(".user_institutions[value="+code+"]").remove(); + $(this).parent().remove(); + } + + + function add_mask_to_form_items() { + if ($.mask) { + $("#institutions_cnpj").mask("99.999.999/9999-99"); + } + } + + + function show_hide_cnpj_city(country) { + var cnpj = $("#institutions_cnpj").parent().parent(); + var city = $("#community_city").parent().parent(); + var state = $("#community_state").parent().parent(); + var inst_type = $("input[name='institutions[type]']:checked").val(); + institution_type_actions(inst_type); + + if( country === "-1" ) $("#community_country").val("BR"); + + if( country !== "BR" ) { + cnpj.hide(); + city.hide(); + state.hide(); + } else { + cnpj.show(); + city.show(); + state.show(); + } + } + + function institution_type_actions(type) { + var country = $("#community_country").val(); + if( type === "PublicInstitution" && country == "BR") { + show_public_institutions_fields(); + } else { + show_private_institutions_fields(); + } + } + + + function set_form_count_custom_data() { + var divisor_option = SelectElement.generateOption("-1", "--------------------------------"); + var default_option = SelectElement.generateOption("BR", "Brazil"); + + + var inst_type = $("input[name='institutions[type]']:checked").val(); + var country = $("#community_country").val(); + + institution_type_actions(inst_type); + show_hide_cnpj_city(country); + + if( $('#community_country').find("option[value='']").length === 1 ) { + $('#community_country').find("option[value='']").remove(); + $('#community_country').prepend(divisor_option); + $('#community_country').prepend(default_option); + + if($("#edit_institution_page").val() === "false") { + $('#community_country').val("BR"); + show_hide_cnpj_city($('#community_country').val()); + } + } + } + + function autoCompleteCity() { + var country_selected = $('#community_country').val(); + + if(country_selected == "BR") { + $('#community_city').autocomplete({ + source : function(request, response){ + $.ajax({ + type: "GET", + url: AJAX_URL.auto_complete_city, + data: {city_name: request.term, state_name: $("#community_state").val()}, + success: function(result){ + response(result); + + // There are two autocompletes in this page, the last one is modal + // autocomplete just put it above the modal + $(".ui-autocomplete").last().css("z-index", 1000); + }, + error: function(ajax, stat, errorThrown) { + console.log('Link not found : ' + errorThrown); + } + }); + }, + + minLength: 3 + }); + } else { + if ($('#community_city').data('autocomplete')) { + $('#community_city').autocomplete("destroy"); + $('#community_city').removeData('autocomplete'); + } + } + } + + function set_events() { + $("#create_institution_link").click(open_create_institution_modal); + + $("input[name='institutions[type]']").click(function(){ + institution_type_actions(this.value); + }); + + $('#save_institution_button').click(save_institution); + $('#cancel_institution_button').click(cancel_institution); + + $("#community_name").keyup(institution_already_exists); + + $("#add_new_institution").click(add_new_institution); + + $(".remove-institution").click(remove_institution); + + $("#community_country").change(function(){ + show_hide_cnpj_city(this.value); + }); + + add_mask_to_form_items(); + + institution_autocomplete(); + + autoCompleteCity(); + $('#community_country').change(function(){ + autoCompleteCity(); + }); + } + + + return { + isCurrentPage: function() { + return $("#institution_form").length === 1; + }, + + + init: function() { + set_form_count_custom_data(); + set_events(); + }, + + institution_autocomplete: function(){ + institution_autocomplete(); + } + }; +}); diff --git a/src/noosfero-spb/gov_user/public/views/gov-user-comments-extra-fields.js b/src/noosfero-spb/gov_user/public/views/gov-user-comments-extra-fields.js new file mode 100644 index 0000000..d302437 --- /dev/null +++ b/src/noosfero-spb/gov_user/public/views/gov-user-comments-extra-fields.js @@ -0,0 +1,26 @@ +modulejs.define("GovUserCommentsExtraFields", ['jquery','CreateInstitution'], function($,CreateInstitution) { + + function set_events() { + CreateInstitution.institution_autocomplete(); + } + + + function prepend_to_additional_information() { + var institution_comments = $("#input_institution_comments").remove(); + + $(".comments-software-extra-fields").prepend(institution_comments); + } + + + return { + isCurrentPage: function() { + return $(".star-rate-form").length === 1; + }, + + init: function() { + prepend_to_additional_information(); + set_events(); + } + } + +}) diff --git a/src/noosfero-spb/gov_user/public/views/new-community.js b/src/noosfero-spb/gov_user/public/views/new-community.js new file mode 100644 index 0000000..b665e8f --- /dev/null +++ b/src/noosfero-spb/gov_user/public/views/new-community.js @@ -0,0 +1,28 @@ +modulejs.define("NewCommunity", ['jquery'], function($) { + + function replace_mandatory_message() { + $(".required-field").first() + .replaceWith(" Os campos em destaque são obrigatórios. "); + } + + function remove_image_builder_text() { + $("label:contains('Image builder')").hide(); + } + + function hide_organization_template_fields(){ + $('#template-options').hide(); + } + + return { + + isCurrentPage: function() { + return true; + }, + + init: function() { + replace_mandatory_message(); + remove_image_builder_text(); + hide_organization_template_fields(); + } + } +}) diff --git a/src/noosfero-spb/gov_user/public/views/user-edit-profile.js b/src/noosfero-spb/gov_user/public/views/user-edit-profile.js new file mode 100644 index 0000000..c92c987 --- /dev/null +++ b/src/noosfero-spb/gov_user/public/views/user-edit-profile.js @@ -0,0 +1,216 @@ +modulejs.define('UserEditProfile', ['jquery', 'SelectElement', 'SelectFieldChoices', 'CreateInstitution'], function($, SelectElement, SelectFieldChoices, CreateInstitution) { + 'use strict'; + + function set_form_count_custom_data() { + var divisor_option = SelectElement.generateOption("-1", "--------------------------------"); + var default_option = SelectElement.generateOption("BR", "Brazil"); + + $('#profile_data_country').find("option[value='']").remove(); + $('#profile_data_country').prepend(divisor_option); + $('#profile_data_country').prepend(default_option); + $('#profile_data_country').val("BR"); + } + + + function set_initial_form_custom_data(selectFieldChoices) { + set_form_count_custom_data(); + + $("#password-balloon").html($("#user_password_menssage").val()); + $("#profile_data_email").parent().append($("#email_public_message").remove()); + + if( $("#state_field").length !== 0 ) selectFieldChoices.replaceStateWithSelectElement(); + } + + + function show_state_if_country_is_brazil() { + var selectFieldChoices = new SelectFieldChoices("#state_field", "#city_field", "/plugin/gov_user/get_brazil_states"); + set_initial_form_custom_data(selectFieldChoices); + + $("#profile_data_country").change(function(){ + if( this.value === "-1" ) $(this).val("BR"); + + if( this.value === "BR" && selectFieldChoices.actualFieldIsInput() ) { + selectFieldChoices.replaceStateWithSelectElement(); + selectFieldChoices.showCity(); + } else if( this.value !== "BR" && !selectFieldChoices.actualFieldIsInput() ) { + selectFieldChoices.replaceStateWithInputElement(); + selectFieldChoices.hideCity(); + } + }); + } + + + function show_or_hide_phone_mask() { + if($("#profile_data_country").val() === "BR") { + if( (typeof $("#profile_data_cell_phone").data("rawMaskFn") === 'undefined') ) { + // $("#profile_data_cell_phone").mask("(99) 9999?9-9999"); + // $("#profile_data_comercial_phone").mask("(99) 9999?9-9999"); + // $("#profile_data_contact_phone").mask("(99) 9999?9-9999"); + } + } else { + // $("#profile_data_cell_phone").unmask(); + // $("#profile_data_comercial_phone").unmask(); + // $("#profile_data_contact_phone").unmask(); + } + } + + + function fix_phone_mask_format(id) { + $(id).blur(function() { + var last = $(this).val().substr( $(this).val().indexOf("-") + 1 ); + + if( last.length === 3 ) { + var move = $(this).val().substr( $(this).val().indexOf("-") - 1, 1 ); + var lastfour = move + last; + var first = $(this).val().substr( 0, 9 ); + + $(this).val( first + '-' + lastfour ); + } + }); + } + + + function show_plugin_error_message(field_selector, hidden_message_id ) { + var field = $(field_selector); + + field.removeClass("validated").addClass("invalid"); + + if(!$("." + hidden_message_id)[0]) { + var message = $("#" + hidden_message_id).val(); + field.parent().append("
    "+message+""); + } else { + $("." + hidden_message_id).show(); + } + } + + + function hide_plugin_error_message(field_selector, hidden_message_id) { + $(field_selector).removeClass("invalid").addClass("validated"); + $("." + hidden_message_id).hide(); + } + + + function add_blur_fields(field_selector, hidden_message_id, validation_function, allow_blank) { + $(field_selector).blur(function(){ + $(this).attr("class", ""); + + if( validation_function(this.value, !!allow_blank) ) { + show_plugin_error_message(field_selector, hidden_message_id); + } else { + hide_plugin_error_message(field_selector, hidden_message_id); + } + }); + } + + + function invalid_email_validation(value, allow_blank) { + if( allow_blank && value.trim().length === 0 ) { + return false; + } + + var correct_format_regex = new RegExp(/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/); + + return !correct_format_regex.test(value); + } + + + function invalid_site_validation(value) { + var correct_format_regex = new RegExp(/(^|)(http[s]{0,1})\:\/\/(\w+[.])\w+/g); + + return !correct_format_regex.test(value); + } + + + function get_privacy_selector_parent_div(field_id, actual) { + if( actual === undefined ) actual = $(field_id); + + if( actual.is("form") || actual.length === 0 ) return null; // Not allow recursion over form + + if( actual.hasClass("field-with-privacy-selector") ) { + return actual; + } else { + return get_privacy_selector_parent_div(field_id, actual.parent()); + } + } + + + function try_to_remove(list, field) { + try { + list.push(field.remove()); + } catch(e) { + console.log("Cound not remove field"); + } + } + + + function get_edit_fields_in_insertion_order() { + var containers = []; + + try_to_remove(containers, get_privacy_selector_parent_div("#city_field")); + try_to_remove(containers, get_privacy_selector_parent_div("#state_field")); + try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_country")); + try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_birth_date")); + try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_organization_website")); + try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_personal_website")); + try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_comercial_phone")); + try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_contact_phone")); + try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_cell_phone")); + try_to_remove(containers, $("#select_institution")); + try_to_remove(containers, $("#user_secondary_email").parent().parent()); + try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_email")); + try_to_remove(containers, get_privacy_selector_parent_div("#profile_data_name")); + try_to_remove(containers, $(".pseudoformlabel").parent().parent()); + try_to_remove(containers, $("h2")[0]); + + return containers; + } + + + function change_edit_fields_order() { + var form = $("#profile-data"); + + if( form.length !== 0 ) { + var containers = get_edit_fields_in_insertion_order(); + + containers.forEach(function(container){ + form.prepend(container); + }); + } + } + + + function set_fields_validations() { + $("#profile_data_country").blur(show_or_hide_phone_mask); + + // $("#profile_data_birth_date").mask("99/99/9999"); + + fix_phone_mask_format("#profile_data_cell_phone"); + fix_phone_mask_format("#profile_data_comercial_phone"); + fix_phone_mask_format("#profile_data_contact_phone"); + + add_blur_fields("#profile_data_email", "email_error", invalid_email_validation); + add_blur_fields("#user_secondary_email", "email_error", invalid_email_validation, true); + add_blur_fields("#profile_data_personal_website", "site_error", invalid_site_validation); + add_blur_fields("#profile_data_organization_website", "site_error", invalid_site_validation); + } + + + return { + isCurrentPage: function() { + return $('#profile_data_email').length === 1; + }, + + + init: function() { + change_edit_fields_order(); // To change the fields order, it MUST be the first function executed + + show_state_if_country_is_brazil(); + + show_or_hide_phone_mask(); + + set_fields_validations(); + + CreateInstitution.init(); + } + } +}); diff --git a/src/noosfero-spb/gov_user/test/functional/gov_user_plugin_controller_test.rb b/src/noosfero-spb/gov_user/test/functional/gov_user_plugin_controller_test.rb new file mode 100644 index 0000000..48b4fc4 --- /dev/null +++ b/src/noosfero-spb/gov_user/test/functional/gov_user_plugin_controller_test.rb @@ -0,0 +1,236 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/institution_test_helper' +require File.dirname(__FILE__) + '/../../controllers/gov_user_plugin_controller' + +class GovUserPluginController; def rescue_action(e) raise e end; end +class GovUserPluginControllerTest < ActionController::TestCase + + + def setup + @admin = create_user("adminuser").person + @admin.stubs(:has_permission?).returns("true") + @controller.stubs(:current_user).returns(@admin.user) + + @environment = Environment.default + @environment.enabled_plugins = ['SoftwareCommunitiesPlugin'] + @environment.add_admin(@admin) + @environment.save + + @gov_power = GovernmentalPower.create(:name=>"Some Gov Power") + @gov_sphere = GovernmentalSphere.create(:name=>"Some Gov Sphere") + @juridical_nature = JuridicalNature.create(:name => "Autarquia") + @response = ActionController::TestResponse.new + + @institution_list = [] + @institution_list << InstitutionTestHelper.create_public_institution( + "Ministerio Publico da Uniao", + "MPU", + "BR", + "DF", + "Gama", + @juridical_nature, + @gov_power, + @gov_sphere, + "12.345.678/9012-45" + ) + @institution_list << InstitutionTestHelper.create_public_institution( + "Tribunal Regional da Uniao", + "TRU", + "BR", + "DF", + "Brasilia", + @juridical_nature, + @gov_power, + @gov_sphere, + "12.345.678/9012-90" + ) + + end + + should "Search for institution with acronym" do + xhr :get, :get_institutions, :query=>"TRU" + + json_response = ActiveSupport::JSON.decode(@response.body) + + assert_equal "Tribunal Regional da Uniao", json_response[0]["value"] + end + + should "Search for institution with name" do + xhr :get, :get_institutions, :query=>"Minis" + + json_response = ActiveSupport::JSON.decode(@response.body) + + assert_equal "Ministerio Publico da Uniao", json_response[0]["value"] + end + + should "search with name or acronym and return a list with institutions" do + xhr :get, :get_institutions, :query=>"uni" + + json_response = ActiveSupport::JSON.decode(@response.body) + + assert_equal "Ministerio Publico da Uniao", json_response[0]["value"] + assert_equal "Tribunal Regional da Uniao", json_response[1]["value"] + end + + should "method create_institution return the html for modal" do + @controller.stubs(:current_user).returns(@admin.user) + xhr :get, :create_institution + assert_template 'create_institution' + end + + should "create new institution with ajax without acronym" do + @controller.stubs(:verify_recaptcha).returns(true) + + fields = InstitutionTestHelper.generate_form_fields( + "foo bar", + "BR", + "DF", + "Brasilia", + "12.234.567/8900-10", + "PublicInstitution" + ) + fields[:institutions][:governmental_power] = @gov_power.id + fields[:institutions][:governmental_sphere] = @gov_sphere.id + fields[:institutions][:juridical_nature] = @juridical_nature.id + + xhr :get, :new_institution, fields + + json_response = ActiveSupport::JSON.decode(@response.body) + + assert json_response["success"] + end + + should "create a institution without cnpj" do + @controller.stubs(:verify_recaptcha).returns(true) + + fields = InstitutionTestHelper.generate_form_fields( + "Some Private Institution", + "BR", + "DF", + "Brasilia", + "", + "PrivateInstitution" + ) + fields[:institutions][:acronym] = "SPI" + + xhr :get, :new_institution, fields + + json_response = ActiveSupport::JSON.decode(@response.body) + + assert json_response["success"] + end + + should "verify if institution name already exists" do + xhr :get, :institution_already_exists, :name=>"Ministerio Publico da Uniao" + assert_equal "true", @response.body + + xhr :get, :institution_already_exists, :name=>"Another name here" + assert_equal "false", @response.body + end + + should "hide registration incomplete message" do + xhr :get, :hide_registration_incomplete_percentage, :hide=>true + assert_equal "true", @response.body + end + + should "not hide registration incomplete message" do + xhr :get, :hide_registration_incomplete_percentage, :hide=>false + assert_equal "false", @response.body + end + + should "Create new institution with method post" do + @controller.stubs(:verify_recaptcha).returns(true) + + fields = InstitutionTestHelper.generate_form_fields( + "Some Private Institution", + "BR", + "DF", + "Brasilia", + "12.345.567/8900-10", + "PrivateInstitution" + ) + fields[:institutions][:acronym] = "SPI" + + post :new_institution, fields + + assert_redirected_to(controller: "admin_panel", action: "index") + end + + should "not create new institution with method post without cnpj" do + @controller.stubs(:verify_recaptcha).returns(true) + + fields = InstitutionTestHelper.generate_form_fields( + "Some Private Institution", + "BR", + "DF", + "Brasilia", + "56.366.790/0001-88", + "PrivateInstitution" + ) + + post :new_institution, fields + + assert_redirected_to(controller: "admin_panel", action: "index") + end + + should "Create foreign institution without city, state and cnpj by post" do + @controller.stubs(:verify_recaptcha).returns(true) + + fields = InstitutionTestHelper.generate_form_fields( + "Foreign institution", + "AZ", + "", + "", + "", + "PrivateInstitution" + ) + fields[:institutions][:acronym] = "FI" + + post :new_institution, fields + + assert_redirected_to(controller: "admin_panel", action: "index") + end + + should "Create foreign institution without city, state and cnpj by ajax" do + @controller.stubs(:verify_recaptcha).returns(true) + + fields = InstitutionTestHelper.generate_form_fields( + "Foreign institution", + "AZ", + "", + "", + "", + "PrivateInstitution" + ) + fields[:institutions][:acronym] = "FI" + + xhr :post, :new_institution, fields + + json_response = ActiveSupport::JSON.decode(@response.body) + + assert json_response["success"] + end + + should "add environment admins to institution when created via admin panel" do + @controller.stubs(:verify_recaptcha).returns(true) + admin2 = create_user("another_admin").person + admin2.stubs(:has_permission?).returns("true") + @environment.add_admin(admin2) + @environment.save + + fields = InstitutionTestHelper.generate_form_fields( + "Private Institution", + "BR", + "DF", + "Brasilia", + "12.323.557/8900-10", + "PrivateInstitution" + ) + fields[:institutions][:acronym] = "PI" + fields[:edit_institution_page] = false + post :new_institution, fields + + assert(Institution.last.community.admins.include?(admin2) ) + end + +end diff --git a/src/noosfero-spb/gov_user/test/functional/gov_user_plugin_myprofile_controller.rb b/src/noosfero-spb/gov_user/test/functional/gov_user_plugin_myprofile_controller.rb new file mode 100644 index 0000000..61c48b1 --- /dev/null +++ b/src/noosfero-spb/gov_user/test/functional/gov_user_plugin_myprofile_controller.rb @@ -0,0 +1,105 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/institution_test_helper' +require( +File.dirname(__FILE__) + +'/../../controllers/gov_user_plugin_myprofile_controller' +) + +class GovUserPluginMyprofileController; def rescue_action(e) raise e end; +end + +class GovUserPluginMyprofileControllerTest < ActionController::TestCase + def setup + @controller = GovUserPluginMyprofileController.new + @request = ActionController::TestRequest.new + @response = ActionController::TestResponse.new + @person = create_user('person').person + @offer = create_user('Angela Silva') + @offer_1 = create_user('Ana de Souza') + @offer_2 = create_user('Angelo Roberto') + + login_as(@person.user_login) + @environment = Environment.default + @environment.enable_plugin('GovUserPlugin') + @environment.save! + end + should "user edit its community institution" do + govPower = GovernmentalPower.create(:name=>"Some Gov Power") + govSphere = GovernmentalSphere.create(:name=>"Some Gov Sphere") + juridical_nature = JuridicalNature.create(:name => "Autarquia") + + institution = InstitutionTestHelper.create_public_institution( + "Ministerio Publico da Uniao", + "MPU", + "BR", + "DF", + "Gama", + juridical_nature, + govPower, + govSphere, + "12.345.678/9012-45" + ) + + identifier = institution.community.identifier + + fields = InstitutionTestHelper.generate_form_fields( + "institution new name", + "BR", + "DF", + "Gama", + "12.345.678/9012-45", + "PrivateInstitution" + ) + + post( + :edit_institution, + :profile=>institution.community.identifier, + :community=>fields[:community], + :institutions=>fields[:institutions] + ) + + institution = Community[identifier].institution + assert_not_equal "Ministerio Publico da Uniao", institution.community.name + end + + should "not user edit its community institution with wrong values" do + govPower = GovernmentalPower.create(:name=>"Some Gov Power") + govSphere = GovernmentalSphere.create(:name=>"Some Gov Sphere") + juridical_nature = JuridicalNature.create(:name => "Autarquia") + + institution = InstitutionTestHelper.create_public_institution( + "Ministerio Publico da Uniao", + "MPU", + "BR", + "DF", + "Gama", + juridical_nature, + govPower, + govSphere, + "12.345.678/9012-45" + ) + + identifier = institution.community.identifier + + fields = InstitutionTestHelper.generate_form_fields( + "", + "BR", + "DF", + "Gama", + "6465465465", + "PrivateInstitution" + ) + + post( + :edit_institution, + :profile=>institution.community.identifier, + :community=>fields[:community], + :institutions=>fields[:institutions] + ) + + institution = Community[identifier].institution + assert_equal "Ministerio Publico da Uniao", institution.community.name + assert_equal "12.345.678/9012-45", institution.cnpj + end + +end diff --git a/src/noosfero-spb/gov_user/test/functional/profile_editor_controller_test.rb b/src/noosfero-spb/gov_user/test/functional/profile_editor_controller_test.rb new file mode 100644 index 0000000..52de533 --- /dev/null +++ b/src/noosfero-spb/gov_user/test/functional/profile_editor_controller_test.rb @@ -0,0 +1,112 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/institution_test_helper' +require( +File.dirname(__FILE__) + +'/../../../../app/controllers/my_profile/profile_editor_controller' +) + +class ProfileEditorController; def rescue_action(e) raise e end; end + +class ProfileEditorControllerTest < ActionController::TestCase + + def setup + @controller = ProfileEditorController.new + @request = ActionController::TestRequest.new + @response = ActionController::TestResponse.new + @profile = create_user('default_user').person + + Environment.default.affiliate( + @profile, + [Environment::Roles.admin(Environment.default.id)] + + Profile::Roles.all_roles(Environment.default.id) + ) + + @environment = Environment.default + @environment.enabled_plugins = ['GovUserPlugin'] + admin = create_user("adminuser").person + admin.stubs(:has_permission?).returns("true") + login_as('adminuser') + @environment.add_admin(admin) + @environment.save + + @govPower = GovernmentalPower.create(:name=>"Some Gov Power") + @govSphere = GovernmentalSphere.create(:name=>"Some Gov Sphere") + @juridical_nature = JuridicalNature.create(:name => "Autarquia") + + @institution_list = [] + @institution_list << InstitutionTestHelper.create_public_institution( + "Ministerio Publico da Uniao", + "MPU", + "BR", + "DF", + "Gama", + @juridical_nature, + @govPower, + @govSphere, + "12.345.678/9012-45" + ) + + @institution_list << InstitutionTestHelper.create_public_institution( + "Tribunal Regional da Uniao", + "TRU", + "BR", + "DF", + "Brasilia", + @juridical_nature, + @govPower, + @govSphere, + "12.345.678/9012-90" + ) + end + + should "add new institution for user into edit profile" do + user = create_basic_user + + params_user = Hash.new + params_user[:institution_ids] = [] + + @institution_list.each do |institution| + params_user[:institution_ids] << institution.id + end + + post :edit, :profile => User.last.person.identifier, :user => params_user + + assert_equal @institution_list.count, User.last.institutions.count + end + + should "remove institutions for user into edit profile" do + user = create_basic_user + + @institution_list.each do |institution| + user.institutions << institution + end + user.save! + + params_user = Hash.new + params_user[:institution_ids] = [] + + assert_equal @institution_list.count, User.last.institutions.count + + post :edit, :profile => User.last.person.identifier, :user => params_user + + assert_equal 0, User.last.institutions.count + end + + protected + + def create_basic_user + user = fast_create(User) + user.person = fast_create(Person) + user.person.user = user + user.save! + user.person.save! + user + end + + def create_community name + community = fast_create(Community) + community.name = name + community.save + community + end +end diff --git a/src/noosfero-spb/gov_user/test/functional/search_controller_test.rb b/src/noosfero-spb/gov_user/test/functional/search_controller_test.rb new file mode 100644 index 0000000..ab45f06 --- /dev/null +++ b/src/noosfero-spb/gov_user/test/functional/search_controller_test.rb @@ -0,0 +1,57 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' +require( +File.dirname(__FILE__) + +'/../../../../app/controllers/public/search_controller' +) + +class SearchController; def rescue_action(e) raise e end; end + +class SearchControllerTest < ActionController::TestCase + include PluginTestHelper + + def setup + @environment = Environment.default + @environment.enabled_plugins = ['SoftwareCommunitiesPlugin'] + @environment.save + + @controller = SearchController.new + @request = ActionController::TestRequest.new + @request.stubs(:ssl?).returns(:false) + @response = ActionController::TestResponse.new + end + + should "communities searches don't have institution" do + community = create_community("New Community") + institution = create_private_institution( + "New Private Institution", + "NPI" , + "Brazil", + "DF", + "Gama", + "66.544.314/0001-63" + ) + + get :communities, :query => "New" + + assert_includes assigns(:searches)[:communities][:results], community + assert_not_includes assigns(:searches)[:communities][:results], institution.community + end + + should "institutions_search don't have community" do + community = create_community("New Community") + institution = create_private_institution( + "New Private Institution", + "NPI" , + "Brazil", + "DF", + "Gama", + "66.544.314/0001-63" + ) + + get :institutions, :query => "New" + + assert_includes assigns(:searches)[:institutions][:results], institution.community + assert_not_includes assigns(:searches)[:institutions][:results], community + end +end diff --git a/src/noosfero-spb/gov_user/test/helpers/institution_test_helper.rb b/src/noosfero-spb/gov_user/test/helpers/institution_test_helper.rb new file mode 100644 index 0000000..1f4df2f --- /dev/null +++ b/src/noosfero-spb/gov_user/test/helpers/institution_test_helper.rb @@ -0,0 +1,59 @@ +module InstitutionTestHelper + + def self.generate_form_fields name, country, state, city, cnpj, type + fields = { + :community => { + :name => name, + :country => country, + :state => state, + :city => city + }, + :institutions => { + :cnpj=> cnpj, + :type => type, + :acronym => "", + :governmental_power => "", + :governmental_sphere => "", + :juridical_nature => "", + :corporate_name => "coporate default" + } + } + fields + end + + def self.create_public_institution name, acronym, country, state, city, juridical_nature, gov_p, gov_s, cnpj + institution = PublicInstitution.new + institution.community = institution_community(name, country, state, city) + institution.name = name + institution.juridical_nature = juridical_nature + institution.acronym = acronym + institution.governmental_power = gov_p + institution.governmental_sphere = gov_s + institution.cnpj = cnpj + institution.corporate_name = "corporate default" + institution.save + institution + end + + def self.create_private_institution name, acronym, country, state, city, cnpj + institution = PrivateInstitution.new + institution.community = institution_community(name, country, state, city) + institution.name = name + institution.acronym = acronym + institution.cnpj = cnpj + institution.corporate_name = "corporate default" + institution.save + + institution + end + + def self.institution_community name, country, state, city + institution_community = Community::new + institution_community.name = name + institution_community.country = country + institution_community.state = state + institution_community.city = city + institution_community.save + institution_community + end +end \ No newline at end of file diff --git a/src/noosfero-spb/gov_user/test/helpers/plugin_test_helper.rb b/src/noosfero-spb/gov_user/test/helpers/plugin_test_helper.rb new file mode 100644 index 0000000..741cb2f --- /dev/null +++ b/src/noosfero-spb/gov_user/test/helpers/plugin_test_helper.rb @@ -0,0 +1,77 @@ +require File.dirname(__FILE__) + '/../helpers/institution_test_helper' + +module PluginTestHelper + + def create_person name, email, password, password_confirmation, secondary_email, state="state", city="city" + user = create_user( + name.to_slug, + email, + password, + password_confirmation, + secondary_email + ) + person = Person::new + + user.person = person + person.user = user + + person.name = name + person.identifier = name.to_slug + person.state = state + person.city = city + + user.save + person.save + + person + end + + def create_user login, email, password, password_confirmation, secondary_email + user = User.new + + user.login = login + user.email = email + user.password = password + user.password_confirmation = password_confirmation + user.secondary_email = secondary_email + + user + end + + def create_public_institution *params + InstitutionTestHelper.create_public_institution *params + end + + def create_community name + community = fast_create(Community) + community.name = name + community.save + community + end + + + def create_private_institution name, acronym, country, state, city, cnpj + InstitutionTestHelper.create_private_institution( + name, + acronym, + country, + state, + city, + cnpj + ) + end + + def create_public_institution *params + InstitutionTestHelper.create_public_institution *params + end + + def create_community_institution name, country, state, city + community = fast_create(Community) + community.name = name + community.country = country + community.state = state + community.city = city + community.save + community + end +end diff --git a/src/noosfero-spb/gov_user/test/unit/gov_user_person_test.rb b/src/noosfero-spb/gov_user/test/unit/gov_user_person_test.rb new file mode 100644 index 0000000..0c58478 --- /dev/null +++ b/src/noosfero-spb/gov_user/test/unit/gov_user_person_test.rb @@ -0,0 +1,58 @@ +# encoding: utf-8 + +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' + +class SoftwareCommunitiesPluginPersonTest < ActiveSupport::TestCase + include PluginTestHelper + + def setup + @plugin = GovUserPlugin.new + + @user = fast_create(User) + @person = create_person( + "My Name", + "user@email.com", + "123456", + "123456", + "user2@email.com", + "Any State", + "Some City" + ) + end + + def teardown + @plugin = nil + end + + should 'be a noosfero plugin' do + assert_kind_of Noosfero::Plugin, @plugin + end + + should 'save person with a valid full name' do + p = Person::new :name=>"S1mpl3 0f N4m3", :identifier=>"simple-name" + p.user = fast_create(:user) + + assert_equal true, p.save + end + + should 'save person with a valid full name with accents' do + name = 'Jônatàs dâ Sîlvã Jösé' + identifier = "jonatas-jose-da-silva" + p = Person::new :name=>name, :identifier=>identifier + p.user = fast_create(:user) + + assert_equal true, p.save + end + + should 'not save person whose name has not capital letter' do + p = Person::new :name=>"simple name" + assert !p.save, _("Name Should begin with a capital letter and no special characters") + end + + should 'not save person whose name has special characters' do + p = Person::new :name=>"Simple N@me" + + assert !p.save , _("Name Should begin with a capital letter and no special characters") + end +end diff --git a/src/noosfero-spb/gov_user/test/unit/governmental_power_test.rb b/src/noosfero-spb/gov_user/test/unit/governmental_power_test.rb new file mode 100644 index 0000000..5f777e6 --- /dev/null +++ b/src/noosfero-spb/gov_user/test/unit/governmental_power_test.rb @@ -0,0 +1,33 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/institution_test_helper' + +class GovernmentalPowerTest < ActiveSupport::TestCase + + def setup + @gov_sphere = GovernmentalSphere.create(:name=>"Some Gov Sphere") + @juridical_nature = JuridicalNature.create(:name => "Autarquia") + end + + def teardown + Institution.destroy_all + end + + should "get public institutions" do + inst_name = "Ministerio Publico da Uniao" + inst_cnpj = "12.345.678/9012-45" + gov_power = GovernmentalPower.create(:name=>"Some gov power") + InstitutionTestHelper.create_public_institution( + inst_name, + "MPU", + "BR", + "DF", + "Gama", + @juridical_nature, + gov_power, + @gov_sphere, + inst_cnpj + ) + + assert_equal gov_power.public_institutions.count, PublicInstitution.count + end +end \ No newline at end of file diff --git a/src/noosfero-spb/gov_user/test/unit/institution_test.rb b/src/noosfero-spb/gov_user/test/unit/institution_test.rb new file mode 100644 index 0000000..c4c77e5 --- /dev/null +++ b/src/noosfero-spb/gov_user/test/unit/institution_test.rb @@ -0,0 +1,63 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' + +class InstitutionTest < ActiveSupport::TestCase + include PluginTestHelper + def setup + @gov_power = GovernmentalPower.create(:name=>"Some Gov Power") + @gov_sphere = GovernmentalSphere.create(:name=>"Some Gov Sphere") + @juridical_nature = JuridicalNature.create(:name => "Autarquia") + + @institution = create_public_institution( + "Ministerio Publico da Uniao", + "MPU", + "BR", + "DF", + "Gama", + @juridical_nature, + @gov_power, + @gov_sphere, + "11.222.333/4444-55" + ) + end + + def teardown + GovernmentalPower.destroy_all + GovernmentalSphere.destroy_all + JuridicalNature.destroy_all + @institution = nil + end + should "not save institutions without name" do + @institution.name = nil + assert_equal false, @institution.save + assert_equal true, @institution.errors.full_messages.include?("Name can't be blank") + end + + should "not save if institution has invalid type" do + invalid_msg = "Type invalid, only public and private institutions are allowed." + @institution.type = "Other type" + assert_equal false, @institution.save + assert_equal true, @institution.errors.full_messages.include?(invalid_msg) + end + + should "not save without country" do + @institution.community.country = nil + assert_equal false, @institution.save + assert_equal true, @institution.errors.full_messages.include?("Country can't be blank") + end + + should "not save without state" do + @institution.community.state = nil + + assert_equal false, @institution.save + assert_equal true, @institution.errors.full_messages.include?("State can't be blank") + end + + should "not save without city" do + @institution.community.city = nil + @institution.community.state = "DF" + + assert_equal false, @institution.save + assert_equal true, @institution.errors.full_messages.include?("City can't be blank") + end +end diff --git a/src/noosfero-spb/gov_user/test/unit/institutions_block_test.rb b/src/noosfero-spb/gov_user/test/unit/institutions_block_test.rb new file mode 100644 index 0000000..bcab723 --- /dev/null +++ b/src/noosfero-spb/gov_user/test/unit/institutions_block_test.rb @@ -0,0 +1,51 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' + +class InstitutionsBlockTest < ActiveSupport::TestCase + include PluginTestHelper + should 'inherit from Block' do + assert_kind_of Block, InstitutionsBlock.new + end + + should 'declare its default title' do + InstitutionsBlock.any_instance.stubs(:profile_count).returns(0) + assert_not_equal Block.new.default_title, InstitutionsBlock.new.default_title + end + + should 'describe itself' do + assert_not_equal Block.description, InstitutionsBlock.description + end + + should 'give empty footer on unsupported owner type' do + block = InstitutionsBlock.new + block.expects(:owner).returns(1) + assert_equal '', block.footer + end + + should 'list institutions' do + user = create_person("Jose_Augusto", + "jose_augusto@email.com", + "aaaaaaa", + "aaaaaaa", + 'jose@secondary.com', + "DF", + "Gama" + ) + + institution = create_private_institution( + "inst name", + "IN", + "country", + "state", + "city", + "00.111.222/3333-44" + ) + institution.community.add_member(user) + + block = InstitutionsBlock.new + block.expects(:owner).at_least_once.returns(user) + + assert_equivalent [institution.community], block.profiles + end + +end diff --git a/src/noosfero-spb/gov_user/test/unit/juridical_nature_test.rb b/src/noosfero-spb/gov_user/test/unit/juridical_nature_test.rb new file mode 100644 index 0000000..80d34c6 --- /dev/null +++ b/src/noosfero-spb/gov_user/test/unit/juridical_nature_test.rb @@ -0,0 +1,23 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' + +class JuridicalNatureTest < ActiveSupport::TestCase + + include PluginTestHelper + + def setup + @govPower = GovernmentalPower.create(:name=>"Some Gov Power") + @govSphere = GovernmentalSphere.create(:name=>"Some Gov Sphere") + end + + def teardown + Institution.destroy_all + end + + should "get public institutions" do + juridical_nature = JuridicalNature.create(:name => "Autarquia") + create_public_institution("Ministerio Publico da Uniao", "MPU", "BR", "DF", "Gama", juridical_nature, @govPower, @govSphere, "22.333.444/5555-66") + create_public_institution("Tribunal Regional da Uniao", "TRU", "BR", "DF", "Brasilia", juridical_nature, @govPower, @govSphere, "22.333.444/5555-77") + assert juridical_nature.public_institutions.count == PublicInstitution.count + end +end diff --git a/src/noosfero-spb/gov_user/test/unit/organization_rating_test.rb b/src/noosfero-spb/gov_user/test/unit/organization_rating_test.rb new file mode 100644 index 0000000..748355f --- /dev/null +++ b/src/noosfero-spb/gov_user/test/unit/organization_rating_test.rb @@ -0,0 +1,44 @@ +require File.expand_path(File.dirname(__FILE__)) + '/../../../../test/test_helper' +require File.expand_path(File.dirname(__FILE__)) + '/../helpers/plugin_test_helper' + +class OrganizationRatingTest < ActiveSupport::TestCase + include PluginTestHelper + + def setup + @environment = Environment.default + @environment.enabled_plugins = ['SoftwareCommunitiesPlugin'] + @environment.save + end + + should "validate institution if there is an institution_id" do + person = fast_create(Person) + community = fast_create(Community) + private_institution = build_private_institution "huehue", "hue", "11.222.333/4444-55" + + community_rating = OrganizationRating.new(:person => person, :value => 3, :organization => community, :institution => private_institution) + assert_equal false, community_rating.valid? + + assert_equal true, community_rating.errors[:institution].include?("not found") + + private_institution.save + community_rating.institution = private_institution + + assert_equal true, community_rating.valid? + assert_equal false, community_rating.errors[:institution].include?("not found") + end + + private + + def build_private_institution name, corporate_name, cnpj, country="AR" + community = Community.new :name => name + community.country = country + + institution = PrivateInstitution.new :name=> name + institution.corporate_name = corporate_name + institution.cnpj = cnpj + institution.community = community + + institution + end +end + diff --git a/src/noosfero-spb/gov_user/test/unit/person_test.rb b/src/noosfero-spb/gov_user/test/unit/person_test.rb new file mode 100644 index 0000000..dd6c628 --- /dev/null +++ b/src/noosfero-spb/gov_user/test/unit/person_test.rb @@ -0,0 +1,43 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' + +class SoftwareCommunitiesPluginPersonTest < ActiveSupport::TestCase + include PluginTestHelper + def setup + @plugin = GovUserPlugin.new + + @user = fast_create(User) + @person = create_person( + "My Name", + "user@email.com", + "123456", + "123456", + "user@secondaryemail.com", + "Any State", + "Some City" + ) + end + + should 'calculate the percentege of person incomplete fields' do + @person.cell_phone = "76888919" + @person.contact_phone = "987654321" + + assert_equal(67, @plugin.calc_percentage_registration(@person)) + + @person.comercial_phone = "11223344" + @person.country = "I dont know" + @person.state = "I dont know" + @person.city = "I dont know" + @person.organization_website = "www.whatever.com" + @person.image = Image::new :uploaded_data=>fixture_file_upload('/files/rails.png', 'image/png') + @person.save + + assert_equal(100, @plugin.calc_percentage_registration(@person)) + end + + should 'return true when the email has not gov.br,jus.br,leg.br or mp.br' do + @user.secondary_email = "test_email@com.br" + @user.email = "test_email@net.br" + assert @user.save + end +end diff --git a/src/noosfero-spb/gov_user/test/unit/private_institution_test.rb b/src/noosfero-spb/gov_user/test/unit/private_institution_test.rb new file mode 100644 index 0000000..8f01e95 --- /dev/null +++ b/src/noosfero-spb/gov_user/test/unit/private_institution_test.rb @@ -0,0 +1,34 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' + +class PrivateInstitutionTest < ActiveSupport::TestCase + include PluginTestHelper + def setup + @institution = create_private_institution( + "Simple Private Institution", + "SPI", + "BR", + "DF", + "Gama", + "00.000.000/0001-00" + ) + end + + def teardown + @institution = nil + Institution.destroy_all + end + + should "save without a cnpj" do + @institution.cnpj = nil + + assert @institution.save + end + + should "save without fantasy name" do + @institution.acronym = nil + @institution.community.save + + assert @institution.save + end +end diff --git a/src/noosfero-spb/gov_user/test/unit/public_institution_test.rb b/src/noosfero-spb/gov_user/test/unit/public_institution_test.rb new file mode 100644 index 0000000..9f37965 --- /dev/null +++ b/src/noosfero-spb/gov_user/test/unit/public_institution_test.rb @@ -0,0 +1,68 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' + +class PublicInstitutionTest < ActiveSupport::TestCase + include PluginTestHelper + def setup + @gov_power = GovernmentalPower.create(:name=>"Some Gov Power") + @gov_sphere = GovernmentalSphere.create(:name=>"Some Gov Sphere") + @juridical_nature = JuridicalNature.create(:name => "Autarquia") + + @institution = create_public_institution( + "Ministerio Publico da Uniao", + "MPU", + "BR", + "DF", + "Gama", + @juridical_nature, + @gov_power, + @gov_sphere, + "11.222.333/4444-55" + ) + end + + def teardown + GovernmentalPower.destroy_all + GovernmentalSphere.destroy_all + JuridicalNature.destroy_all + Institution.destroy_all + @gov_power = nil + @gov_sphere = nil + @juridical_nature = nil + @institution = nil + end + + should "save without a cnpj" do + @institution.cnpj = nil + assert @institution.save + end + + should "save institution without an acronym" do + @institution.acronym = nil + assert @institution.save + end + + should "Not save institution without a governmental_power" do + invalid_msg = "Governmental power can't be blank" + @institution.governmental_power = nil + + assert !@institution.save + assert @institution.errors.full_messages.include? invalid_msg + end + + should "Not save institution without a governmental_sphere" do + invalid_msg = "Governmental sphere can't be blank" + @institution.governmental_sphere = nil + + assert !@institution.save + assert @institution.errors.full_messages.include? invalid_msg + end + + should "not save institution without juridical nature" do + invalid_msg = "Juridical nature can't be blank" + @institution.juridical_nature = nil + + assert !@institution.save + assert @institution.errors.full_messages.include? invalid_msg + end +end diff --git a/src/noosfero-spb/gov_user/test/unit/user_test.rb b/src/noosfero-spb/gov_user/test/unit/user_test.rb new file mode 100644 index 0000000..c2b15c6 --- /dev/null +++ b/src/noosfero-spb/gov_user/test/unit/user_test.rb @@ -0,0 +1,99 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' + +class UserTest < ActiveSupport::TestCase + include PluginTestHelper + + should 'not save user whose both email and secondary email are the same' do + user = fast_create(User) + user.email = "test@email.com" + user.secondary_email = "test@email.com" + + assert !user.save + end + + should 'not save user whose email and secondary email have been taken' do + user1 = create_default_user + user2 = fast_create(User) + + user2.email = "primary@email.com" + user2.secondary_email = "secondary@email.com" + assert !user2.save + end + + should 'not save user whose email has already been used' do + user1 = create_default_user + user2 = fast_create(User) + + user2.email = "primary@email.com" + user2.secondary_email = "noosfero@email.com" + assert !user2.save + end + + should 'not save user whose email has been taken another in users secondary email' do + user1 = create_default_user + user2 = fast_create(User) + + user2.login = "another-login" + user2.email = "secondary@email.com" + user2.secondary_email = "noosfero@email.com" + assert !user2.save + end + + should 'not save user whose secondary email has been taken used in another users email' do + user1 = create_default_user + user2 = fast_create(User) + + user2.login = "another-login" + user2.email = "noosfero@email.com" + user2.secondary_email = "primary@email.com" + assert !user2.save + end + + should 'not save user whose secondary email has already been used in another users secondary email' do + user1 = create_default_user + user2 = fast_create(User) + + user2.login = "another-login" + user2.email = "noosfero@email.com" + user2.secondary_email = "secondary@email.com" + assert !user2.save + end + + should 'not save user whose secondary email is in the wrong format' do + user = fast_create(User) + user.email = "test@email.com" + user.secondary_email = "notarightformat.com" + + assert !user.save + + user.secondary_email = "not@arightformatcom" + + assert !user.save + end + + should 'save more than one user without secondary email' do + user = fast_create(User) + user.email = "test@email.com" + user.secondary_email = "" + user.save + + user2 = fast_create(User) + user2.email = "test2@email.com" + user2.secondary_email = "" + assert user2.save + end + + private + + def create_default_user + user = fast_create(User) + user.login = "a-login" + user.email = "primary@email.com" + user.secondary_email = "secondary@email.com" + user.save + + return user + end + +end diff --git a/src/noosfero-spb/gov_user/views/gov_user_plugin/_institution.html.erb b/src/noosfero-spb/gov_user/views/gov_user_plugin/_institution.html.erb new file mode 100644 index 0000000..e2aa5b0 --- /dev/null +++ b/src/noosfero-spb/gov_user/views/gov_user_plugin/_institution.html.erb @@ -0,0 +1,128 @@ +

    <%= _('New Institution') %>

    + +<% if environment.enabled?('admin_must_approve_new_communities') %> +
    + <%= _("Note that the creation of communities in this environment is restricted. Your request to create this new community will be sent to %{environment} administrators and will be approved or rejected according to their methods and criteria.") % { :environment => environment.name }%> +
    +<%end %> + +<% unless flash[:errors].nil? %> +
    +

    <%= _("Can`t create new Institution: #{flash[:errors].length} errors") %>

    +
      + <% flash[:errors].each do |key, value| %> + <% key_name = key.to_s.gsub("_", " ") %> + <% if value.length > 0 %> +
    • <%= _("#{key_name.capitalize} #{value.join()}") %>
    • + <% end %> + <% end %> +
    +
    +<% end %> + +
    + +
    + <%= labelled_form_for :community, :url => {:action=>"new_institution"}, :html => { :multipart => true, :id=>"institution_form" } do |f| %> + <%= required_fields_message %> + <%= hidden_field_tag "edit_institution_page", false %> + <%= fields_for :institutions do |inst| %> + +
    + + + +
    +
    + + <%= required f.text_field(:name, :class => flash[:error_community_name], :value => params[:community][:name]) %> + <%= content_tag :span, _("Institution name already exists"), :id=>"already_exists_text", :class=>"errorExplanation hide-field" %> + + +
    + <%= inst.label "corporate_name", _("Corporate Name"), :class=>"formlabel" %> + <%= inst.text_field(:corporate_name, :value => params[:institutions][:corporate_name], :size => 55) %> +
    +
    + + <%= required select_country(_('Country'), 'community', 'country', {:class => "type-select #{flash[:error_community_country]}", :id => "community_country"}) %> + + +
    + + <%= f.select(:state, @state_options, {:selected => params[:community][:state]}, {:class => flash[:error_community_state]}) %> +
    +
    + + <%= required f.text_field(:city, :class => flash[:error_community_city], :value => params[:community][:city]) %> + + +
    + <%= inst.label("cnpj" ,_("CNPJ"), :class=>"formlabel") %> + <%= required inst.text_field(:cnpj, :placeholder=>"99.999.999/9999-99", :class=>"intitution_cnpj_field", :value => params[:institutions][:cnpj]) %> +
    + + +
    + <%= hidden_field_tag "acronym_translate", _("Acronym") %> + <%= hidden_field_tag "fantasy_name_translate", _("Fantasy name") %> + <%= inst.label("acronym" ,_("Acronym"), :class=>"formlabel") %> + <%= inst.text_field(:acronym, :value => params[:institutions][:acronym]) %> +
    +
    + + +
    + <%= inst.label("governmental_sphere_id" ,_("Governmental Sphere:"), :class=>"formlabel") %> + <%= inst.select(:governmental_sphere, @governmental_sphere, :selected=>params[:institutions][:governmental_sphere], :class => flash[:error_institution_governmental_sphere])%> +
    +
    + + +
    + <%= inst.label("governmental_power_id" ,_("Governmental Power:"), :class=>"formlabel") %> + <%= inst.select(:governmental_power, @governmental_power, :selected=>params[:institutions][:governmental_sphere], :class => flash[:error_institution_governmental_power])%> +
    +
    + +
    + <%= inst.label("juridical_nature_id" ,_("Juridical Nature:"), :class=>"formlabel") %> + <%= inst.select(:juridical_nature, @juridical_nature, :selected=>params[:institutions][:juridical_nature], :class => flash[:error_institution_juridical_nature])%> +
    +
    + + +
    + <%= _("SISP?") %> + <% if @show_sisp_field %> + <%= inst.radio_button(:sisp, true, :class => "#{flash[:error_institution_sisp]}" ) %> + <%= inst.label :sisp ,_("Yes"), :value => true %> + <%= inst.radio_button(:sisp, false, :checked=>"checked", :class => "#{flash[:error_institution_sisp]}") %> + <%= inst.label :sisp ,_("No"), :value => false %> + <% else %> + <%= inst.label("sisp", _("No")) %> + <% end %> +
    +
    + + <% if @url_token == "create_institution_admin" %> + <%= submit_button :save, _('Save') %> + <%= button(:cancel, _("Cancel"), {:controller => "admin_panel", :action => 'index'}) %> + <%else%> +
    + <%= link_to(_('Save'), '#', :id=>'save_institution_button', :class=>'button with-text icon-add') %> + <%= link_to(_('Cancel'), '#', :id=>"cancel_institution_button", :class=>'button with-text icon-cancel') %> +
    + <%= hidden_field_tag :institution_error_message, _("Could not send the form data to the server") %> + <%end%> + + <% end %> + + <% end %> +
    +<%= hidden_field_tag :loading_message, _("Creating institution") %> diff --git a/src/noosfero-spb/gov_user/views/gov_user_plugin/create_institution.html.erb b/src/noosfero-spb/gov_user/views/gov_user_plugin/create_institution.html.erb new file mode 100644 index 0000000..037140f --- /dev/null +++ b/src/noosfero-spb/gov_user/views/gov_user_plugin/create_institution.html.erb @@ -0,0 +1 @@ +<%= render :partial => "institution" %> diff --git a/src/noosfero-spb/gov_user/views/gov_user_plugin/create_institution_admin.html.erb b/src/noosfero-spb/gov_user/views/gov_user_plugin/create_institution_admin.html.erb new file mode 100644 index 0000000..037140f --- /dev/null +++ b/src/noosfero-spb/gov_user/views/gov_user_plugin/create_institution_admin.html.erb @@ -0,0 +1 @@ +<%= render :partial => "institution" %> diff --git a/src/noosfero-spb/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb b/src/noosfero-spb/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb new file mode 100644 index 0000000..7b0f936 --- /dev/null +++ b/src/noosfero-spb/gov_user/views/gov_user_plugin_myprofile/edit_institution.html.erb @@ -0,0 +1,114 @@ +

    <%= _('Edit Institution') %>

    + +<% if environment.enabled?('admin_must_approve_new_communities') %> +
    + <%= _("Note that the creation of communities in this environment is restricted. Your request to create this new community will be sent to %{environment} administrators and will be approved or rejected according to their methods and criteria.") % { :environment => environment.name }%> +
    +<%end %> + +<% unless flash[:errors].blank? %> +
    +

    <%= _("Can`t create new Institution: #{flash[:errors].length} errors") %>

    +
      + <% flash[:errors].each do |error| %> +
    • <%= error %>
    • + <% end %> +
    +
    +<% end %> + +
    + +
    + <%= labelled_form_for :community,:html => { :multipart => true, :id=>"institution_form" } do |f| %> + <%= hidden_field_tag "edit_institution_page", true %> + <%= fields_for :institutions do |inst| %> + +
    + + + +
    +
    + + <%= required f.text_field(:name, :value => @institution.community.name) %> + <%= content_tag :span, _("Institution name already exists"), :id=>"already_exists_text", :class=>"errorExplanation hide-field" %> + + +
    + <%= inst.label "corporate_name", _("Corporate Name"), :class=>"formlabel" %> + <%= required inst.text_field(:corporate_name, :value => @institution.corporate_name) %> +
    +
    + + <%= required select_country(_('Country'), 'community', 'country', {:class => 'type-select', :id => "community_country"}, :selected => @institution.community.country) %> + + +
    + + <%= f.select(:state, @state_list.collect {|state| [state.name, state.name]}, :selected => @institution.community.state) %> +
    +
    + + <%= required f.text_field(:city, :value => @institution.community.city) %> + + + +
    + <%= inst.label("cnpj" ,_("CNPJ"), :class=>"formlabel") %> + <%= required inst.text_field(:cnpj, :placeholder=>"99.999.999/9999-99", :class=>"intitution_cnpj_field", :value => @institution.cnpj) %> +
    +
    + + +
    + <%= hidden_field_tag "acronym_translate", _("Acronym") %> + <%= hidden_field_tag "fantasy_name_translate", _("Fantasy name") %> + <%= inst.label("acronym" ,_("Acronym"), :class=>"formlabel") %> + <%= inst.text_field(:acronym, :value => @institution.acronym) %> +
    +
    + + +
    + <%= inst.label("governmental_sphere_id" ,_("Governmental Sphere:"), :class=>"formlabel") %> + <%= inst.select(:governmental_sphere, [[_("Select a Governmental Sphere"), 0]]|GovernmentalSphere.all.map {|s| [s.name, s.id]}, {:selected=>@institution.governmental_power_id})%> +
    +
    + + +
    + <%= inst.label("governmental_power_id" ,_("Governmental Power:"), :class=>"formlabel") %> + <%= inst.select(:governmental_power, [[_("Select a Governmental Power"), 0]]|GovernmentalPower.all.map {|g| [g.name, g.id]}, {:selected=> @institution.governmental_sphere_id})%> +
    +
    + +
    + <%= inst.label("juridical_nature_id" ,_("Juridical Nature:"), :class=>"formlabel") %> + <%= inst.select(:juridical_nature, [[_("Select a Juridical Nature"), 0]]|JuridicalNature.all.map {|j| [j.name, j.id]}, {:selected=> @institution.juridical_nature_id})%> +
    +
    + + +
    + <%= _("SISP?") %> + <% if @show_sisp_field %> + <%= inst.label("sisp" ,_("Yes")) %> + <%= inst.radio_button(:sisp, true, :checked=>(@institution.sisp ? true : false)) %> + <%= inst.label("sisp" ,_("No")) %> + <%= inst.radio_button(:sisp, false, :checked=>(@institution.sisp ? false : true)) %> + <% else %> + <%= inst.label("sisp", _("No")) %> + <% end %> +
    +
    + + <%= submit_button :save, _('Save') %> + <% end %> +<% end %> + diff --git a/src/noosfero-spb/gov_user/views/incomplete_registration.html.erb b/src/noosfero-spb/gov_user/views/incomplete_registration.html.erb new file mode 100644 index 0000000..d1dceba --- /dev/null +++ b/src/noosfero-spb/gov_user/views/incomplete_registration.html.erb @@ -0,0 +1,11 @@ +
    +
    +
    <%= _("Complete Profile")+": #{@percentege}%" %>
    + +
    + <%= link_to _("Complete your profile"), "#{Noosfero.root}/myprofile/#{@person.identifier}/profile_editor/edit" %> | + <%= link_to _("Hide"), "#", :class=>"hide-incomplete-percentage" %> +
    +
    +
    +
    diff --git a/src/noosfero-spb/gov_user/views/organization_ratings_extra_fields_show_institution.html.erb b/src/noosfero-spb/gov_user/views/organization_ratings_extra_fields_show_institution.html.erb new file mode 100644 index 0000000..7cc4709 --- /dev/null +++ b/src/noosfero-spb/gov_user/views/organization_ratings_extra_fields_show_institution.html.erb @@ -0,0 +1,8 @@ +<% if user_rating.institution %> +
    +
    + Institution : <%= user_rating.institution.name unless user_rating.institution.nil? %> +
    +
    +<% end %> + diff --git a/src/noosfero-spb/gov_user/views/person_editor_extras.html.erb b/src/noosfero-spb/gov_user/views/person_editor_extras.html.erb new file mode 100644 index 0000000..a3a11fc --- /dev/null +++ b/src/noosfero-spb/gov_user/views/person_editor_extras.html.erb @@ -0,0 +1,42 @@ +
    + <%= label_tag "user[secondary_email]", _('Secondary e-mail')+":", :class=>"formlabel" %> + +
    + <%= text_field_tag "user[secondary_email]", context.profile.user.secondary_email %> +
    +
    + + +
    + <%= label_tag "user[institution_ids]", _('Institutions'), :class=>"formlabel" %> + +
    + <%= text_field_tag(:institution, "", :id=>"input_institution") %> + + <% context.profile.user.institutions.each do |institution| %> + <%= hidden_field_tag("user[institution_ids][]", institution.id, :class => 'user_institutions') %> + <% end %> +
    + + <%= content_tag(:div, _("No institution found"), :id=>"institution_empty_ajax_message", :class=>"errorExplanation hide-field") %> + <%= link_to(_("Add new institution"), "#", :class=>'button with-text icon-add', :id => 'add_new_institution') %> + <%= link_to(_("Create new institution"), "#", :id=>"create_institution_link", :class=>'button with-text icon-add') %> + <%= content_tag(:div, "", :id=>"institution_dialog") %> + + <%= hidden_field_tag("user[institution_ids][]", "", :class => 'user_institutions') %> + <%= hidden_field_tag("institution_selected", "") %> + +
      + <% context.profile.user.institutions.each do |institution| %> +
    • + <%= institution.name %> + <%= link_to("", "#", :class => "button without-text icon-remove remove-institution") %> +
    • + <% end %> +
    +
    + +<%= hidden_field_tag("full_name_error", _("Should begin with a capital letter and no special characters")) %> +<%= hidden_field_tag("email_error", _("Email should have the following format: name@host.br")) %> +<%= hidden_field_tag("site_error", _("Site should have a valid format: http://name.hosts")) %> +
    <%= _("If you work in a public agency use your government e-Mail") %>
    diff --git a/src/noosfero-spb/gov_user/views/profile/_institution_tab.html.erb b/src/noosfero-spb/gov_user/views/profile/_institution_tab.html.erb new file mode 100644 index 0000000..6c2f7fb --- /dev/null +++ b/src/noosfero-spb/gov_user/views/profile/_institution_tab.html.erb @@ -0,0 +1,21 @@ + + + + + + <%= display_mpog_field(_('Type:'), profile.institution, :type, true) %> + <%= display_mpog_field(_('CNPJ:'), profile.institution, :cnpj, true) %> + <%= display_mpog_field(_('Last modification:'), profile.institution, :date_modification, true) %> + <%= display_mpog_field(_('Country:'), profile.institution.community, :country, true) %> + <%= display_mpog_field(_('State:'), profile.institution.community, :state, true) %> + <%= display_mpog_field(_('City:'), profile.institution.community, :city, true) %> + <% if profile.institution.type == "PrivateInstitution"%> + <%= display_mpog_field(_('Fantasy Name:'), profile.institution, :acronym, true) %> + <% else %> + <%= display_mpog_field(_('Acronym:'), profile.institution, :acronym, true) %> + <%= display_mpog_field(_('Governmental Power:'), profile.institution.governmental_power, :name, true) %> + <%= display_mpog_field(_('Governmental Sphere:'), profile.institution.governmental_sphere, :name, true) %> + <%= display_mpog_field(_('Juridical Nature:'), profile.institution.juridical_nature, :name, true) %> + <%= content_tag('tr', content_tag('td', _("SISP:")) + content_tag('td', profile.institution.sisp ? _("Yes") : _("No"))) %> + <% end %> +
    <%= _('Institution Information')%>
    diff --git a/src/noosfero-spb/gov_user/views/profile/_profile_tab.html.erb b/src/noosfero-spb/gov_user/views/profile/_profile_tab.html.erb new file mode 100644 index 0000000..4fc67b0 --- /dev/null +++ b/src/noosfero-spb/gov_user/views/profile/_profile_tab.html.erb @@ -0,0 +1,3 @@ + + <%= display_mpog_profile_information %> +
    diff --git a/src/noosfero-spb/gov_user/views/ratings_extra_field.html.erb b/src/noosfero-spb/gov_user/views/ratings_extra_field.html.erb new file mode 100644 index 0000000..6f835d1 --- /dev/null +++ b/src/noosfero-spb/gov_user/views/ratings_extra_field.html.erb @@ -0,0 +1,10 @@ +
    + <%= label_tag "input_institution", _("Organization name or Enterprise name")%> + + + + <%= content_tag(:div, _("No institution found"), + :id=>"institution_empty_ajax_message", + :class=>"errorExplanation hide-field") %> + <%= hidden_field_tag "organization_rating[institution_id]", "", id: "institution_selected" %> +
    diff --git a/src/noosfero-spb/gov_user/views/search/institutions.html.erb b/src/noosfero-spb/gov_user/views/search/institutions.html.erb new file mode 100644 index 0000000..1b33ed2 --- /dev/null +++ b/src/noosfero-spb/gov_user/views/search/institutions.html.erb @@ -0,0 +1,16 @@ +<%= search_page_title( @titles[@asset], @category ) %> + +<%= render :partial => 'search_form', :locals => { :hint => _("Type words about the %s you're looking for") % @asset.to_s.singularize } %> + +<%= display_results(@searches, @asset) %> +<% if params[:display] != 'map' %> + <%= pagination_links @searches[@asset][:results] %> +<% end %> + +
    + +<% if @asset == :product %> + <%= javascript_tag do %> + jQuery('.search-product-price-details').altBeautify(); + <% end %> +<% end %> diff --git a/src/noosfero-spb/noosfero-spb-theme b/src/noosfero-spb/noosfero-spb-theme deleted file mode 160000 index c861961..0000000 --- a/src/noosfero-spb/noosfero-spb-theme +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c861961d9e1160dbff135a95d53c16a18d0184b9 diff --git a/src/noosfero-spb/noosfero-spb-theme/.gitignore b/src/noosfero-spb/noosfero-spb-theme/.gitignore new file mode 100644 index 0000000..9f4c784 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/.gitignore @@ -0,0 +1,3 @@ +# backup files +*~ +*.swp diff --git a/src/noosfero-spb/noosfero-spb-theme/README.md b/src/noosfero-spb/noosfero-spb-theme/README.md new file mode 100644 index 0000000..2ea6179 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/README.md @@ -0,0 +1,6 @@ +PSB Theme for Noosfero +================================ + +Noosfero theme for the _Portal do Software Público_ project. + +Install on /public/designs/themes/noosfero-spb-theme \ No newline at end of file diff --git a/src/noosfero-spb/noosfero-spb-theme/categories.html.erb b/src/noosfero-spb/noosfero-spb-theme/categories.html.erb new file mode 100644 index 0000000..d6393c8 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/categories.html.erb @@ -0,0 +1,7 @@ +
      + <% @environment.top_level_categories.find(:all, :conditions => {:display_in_menu => true}).each do |item| %> +
    • + <%= link_to(item.name, {:controller => :search, :action => 'category_index', :category_path => item.path }, :title => item.name, :style=>"color: ##{item.display_color || '000000'}" ) %> +
    • + <% end %> +
    diff --git a/src/noosfero-spb/noosfero-spb-theme/css/administration-panel.css b/src/noosfero-spb/noosfero-spb-theme/css/administration-panel.css new file mode 100644 index 0000000..558ffaf --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/css/administration-panel.css @@ -0,0 +1,159 @@ +/*** Environment Admin Pages - General Rules ***/ +.action-admin_panel-index #content .main-block h2, +.controller-features #content .main-block h2{ + font-family: Arial; + font-size: 22px; + font-weight: 700; + line-height: 21px; +} + +/* Environment Settings */ + +/* Profile tab */ + +.action-admin_panel-site_info .main-content .ui-tabs{ + border: none; +} + +.action-admin_panel-site_info .main-content .ui-tabs .ui-tabs-nav{ + margin: 0 0 0 1em; + padding: 0; + background: none; + color: #172738; + border: 0px solid #aaaaaa; + border-radius: 4px; + font-weight: bold; +} + +.action-admin_panel-site_info .main-content .ui-widget-content .ui-state-default, +.action-admin_panel-site_info .main-content .ui-widget-header .ui-state-default{ + background: #d5d5d5 none; + color: #555555; + font-weight: normal; +} + +.action-admin_panel-site_info .main-content .ui-widget-content .ui-state-active, +.action-admin_panel-site_info .main-content .ui-widget-header .ui-state-active{ + background: #eeeff1; + color: #212121; + font-weight: normal; +} + +.action-admin_panel-site_info .main-content .ui-tabs .ui-tabs-panel{ + display: block; + padding: 1em 1.4em; + background-color: #eeeff1; + color: #777; + border-width: 1px; + font-size: 13px; + text-decoration: none; +} + +/* Organizations Settings */ + +.action-organizations-index .main-block form#manage-profiles, +.action-organizations-index .main-block form#manage-profiles form{ + background-color: transparent; +} + +.action-organizations-index .main-block form#manage-profiles .search-field{ + margin-bottom: 30px; +} + +.action-organizations-index .main-block form#manage-profiles .search-field .formfield { + width: 100%; + margin-right: 0.5em; + float: left; +} + +.action-organizations-index .main-block form#manage-profiles .search-field .formfield input { + margin-top: 0px; + margin-right: 0.5em; + padding: 6px; + min-width: 97%; + height: 19px; + max-height: 19px; + background: none; + border: 1px solid #ccc; + border-radius: 4px; +} + +.action-organizations-index .main-block form#manage-profiles input.button.submit{ + height: 32px; + margin-top: 8px; + padding: 5px 15px; + background: #3E67B1 none; + color: #FFF; + border-radius: 4px; + border: 1px solid #3E67B1; + line-height: 22px; + font-size: 14px; + text-transform: uppercase; +} + +.action-organizations-index .main-block form#manage-profiles input.button.submit:hover{ + background: #5E82C6; +} + +.action-organizations-index .main-block #environment-profiles-filter-title, +.action-organizations-index .main-block #environment-profiles-filter-filter{ + line-height: 35px; + font-size: 12px; +} + +.action-organizations-index .main-block table#organizations-list th{ + text-align: left; + vertical-align: middle; + padding: 2px 8px; +} + +/*** Features Settings ***/ + +.controller-features #content form *{ + font-size: 15px; +} + +.controller-features #content th{ + text-align: left; +} + +.controller-features #content h3{ + min-height: 0; + margin: 20px auto 10px auto; +} + +.controller-features #content hr{ + display: none; +} + +.controller-features #content ul.token-input-list{ + padding: 6px; + background: none; + border: 1px solid #ccc; + border-radius: 4px; + font-family: Arial, helvetica; + font-size: 15px; +} + +/*** Community Admin pages ***/ +/* Homepage */ +.action-profile_editor-index #profile-editor-index h1.block-title{ + color: #172738; + background-color: transparent; + border-bottom: none; + font-size: 2.3em; + font-weight: bold; + font-variant: normal; + font-family: Arial, open_sansbold, Helvetica, sans-serif; +} + +/* Index */ +.action-cms-index .cms-articles th{ + text-align: left; +} + +/* Spam Index */ +.action-spam-index .ui-widget-header { + border: none; + background: none; +} diff --git a/src/noosfero-spb/noosfero-spb-theme/css/animate.css b/src/noosfero-spb/noosfero-spb-theme/css/animate.css new file mode 100644 index 0000000..76810e6 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/css/animate.css @@ -0,0 +1,68 @@ +.animated { + -webkit-animation-duration: .7s; + animation-duration: .7s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; +} + +@-webkit-keyframes slideInDown { + from { + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + visibility: visible; + } + + 100% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +@keyframes slideInDown { + from { + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + visibility: visible; + } + + 100% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +.slideInDown { + -webkit-animation-name: slideInDown; + animation-name: slideInDown; +} + +@-webkit-keyframes slideOutUp { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + 100% { + visibility: hidden; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } +} + +@keyframes slideOutUp { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + 100% { + visibility: hidden; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } +} + +.slideOutUp { + -webkit-animation-name: slideOutUp; + animation-name: slideOutUp; +} diff --git a/src/noosfero-spb/noosfero-spb-theme/css/article-page.css b/src/noosfero-spb/noosfero-spb-theme/css/article-page.css new file mode 100644 index 0000000..ddace95 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/css/article-page.css @@ -0,0 +1,256 @@ +/*** General Definitions ***/ +#content .main-block #article-header h1.title{ + margin-bottom: 10px; + padding: 0px 0px 10px 0px; + color: #172738; + border-bottom: 1px solid #D3D6DE; + font-family: Arial, open_sansbold, Helvetica, sans-serif; + font-size: 34px; + font-variant: normal; + font-weight: bold; + line-height: 37px; +} + +#content .main-block #article-header .publishing-info span{ + font-size: 12px; + color: #172738; + font-family: Arial; +} + +#content .main-block .publishing-info a{ + color: #2C66CE; + font-family: Arial; +} + +#content .main-block .article-body { + font-family: Arial ; + font-size: 15px; + line-height: 21px; +} + +#content #article-parent{ + margin: 0px 0px 10px 0; + font-style: normal; + text-align: left; +} + +#content #article-parent a.button.with-text{ + height: 18px; + padding: 5px; + background-color: #3E67B1; + color: #FFF; + border-radius: 4px; + border: 1px solid #3E67B1; + font-size: 12px; + line-height: 18px; + text-transform: none; +} + +#content #article-parent a.button.with-text:hover{ + background-color: #5E82C6; + border-color: #5E82C6; +} + +#content #article-parent a.button.with-text::before{ + content: "\f053"; + font-family: FontAwesome; + padding-right: 4px; + padding-left: 2px; + color: #ffffff; + border-radius: 4px; + text-align: center; +} + +/* Need a dev solution - blog internal pages*/ + +#article-header .preview{ + display: none; +} + +#article-hits { + display: none; + +} + +/* For software internal pages */ + +#content .main-block .article-body h2 { + margin-bottom: 20px; + font-family: Arial; + font-size: 16px; + font-weight: bold; + line-height: 21px; +} + +#content .main-block .article-body h3 { + margin-bottom: 20px; + font-size: 15px; + line-height: 21px; + font-weight: bold; + font-family: Arial; +} + +#content .main-block .article-body p{ + margin-bottom: 22px; + font-family: Arial; +} + +#content .main-block .article-body .zoomable-image, +#content .main-block .article-body img { + display: block; +} + +#content .main-block .article-body hr { + height: 0; + margin: 30px 0; + border: 0; + border-top: 1px solid rgba(0, 0, 0, 0.1); + border-bottom: 1px solid rgba(255, 255, 255, 0.3); +} + +#content .main-block .article-body #article-actions:last-child{ + margin: 0; + padding: 10px 0; + border-top: 3px solid #172938; +} + +#content .main-block .article-body #article-actions { + display: none; +} + +/*** Categories ***/ + +#content .main-block #article-cat{ + border-top: 4px solid #2C4B6B; + border-bottom: 1px solid #D3D6DE; +} + +#content .main-block #article-cat h4 { + float: left; + margin: 12px 10px 10px 0; + min-height: 0px; + color: #5E82C6; + font-family: Arial; + font-size: 12px; + font-weight: 300; + text-decoration: initial; +} + +#content .main-block #article-cat a{ + display: inline-block; + margin: 10px 10px 10px 0; + padding: 3px 10px; + color: #5E82C6; + background-color: #ECEDF1; + border: 1px solid #D3D6DE; + border-radius: 3px; + font-size: 12px; + text-decoration: initial; +} + +/*** Tags ***/ + +#content .main-block #article-tags{ + display: none; /* wait to fix label */ + width: 100%; + color: #5E82C6; + border-bottom: 1px solid #D3D6DE; + font-family: Arial; + font-size: 12px; + font-weight: 300; + text-align: left; +} + +#content .main-block #article-tags a{ + display: inline-block; + margin: 10px 10px 10px 0; + padding: 3px 10px; + color: #5E82C6; + background-color: #ECEDF1; + border: 1px solid #D3D6DE; + border-radius: 3px; + font-size: 12px; + text-decoration: initial; +} + +/*** Site Map page ***/ + +#content .main-block .article-body #sitemap{ + overflow: auto; +} + +#content .main-block .article-body #sitemap a{ + text-decoration: initial; +} + +#content .main-block .article-body #sitemap ul{ + padding-top: 20px; + font-weight: 700; +} + +#content .main-block .article-body #sitemap li{ + padding-left: 10px; + font-weight: 500; +} + +#content .main-block .article-body #sitemap #first-half{ + float: left; + width: 40%; +} + +#content .main-block .article-body #sitemap #second-half{ + float: left; + padding-top: 50px; + width: 40%; +} + +/*** end of sitemap page ***/ + +/*** Help page ***/ + +#content .main-block .article-body ul.help-list li { + list-style-type: none; + padding-bottom: 5px; +} + +#content .main-block .article-body ul.help-list li a[href="#faq"]:before { + content: url('../images/arrow-globe-icon.png'); + padding-right: 5px; + vertical-align: middle; +} + +#content .main-block .article-body ul.help-list li a[href="#lista-discussao"]:before { + content: url('../images/balloon-icon.png'); + padding-left: 3px; + padding-right: 6px; + vertical-align: middle; +} + +#content .main-block .article-body ul.help-list li a { + color: #2c66ce; + font-size: 15px; +} + +#content .main-block .article-body ul.help-list { + padding-top: 21px; + border-top: 1px solid #D3D6DE; +} + +#content .main-block .article-header h1.help-page-title { + margin-top: 0px; + margin-bottom: 30px; + padding: 0px; + color: #172738; + line-height: 30px; + border: none; + letter-spacing: -0.1px; + font-family: Arial; + font-size: 26px; + font-variant: normal; +} + +#content .main-block .article-body p a { + color: #2c66ce; +} + +/*** end of help page ***/ diff --git a/src/noosfero-spb/noosfero-spb-theme/css/community-pages.css b/src/noosfero-spb/noosfero-spb-theme/css/community-pages.css new file mode 100644 index 0000000..a866f4b --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/css/community-pages.css @@ -0,0 +1,1130 @@ +/*** Home page - profile page ***/ +.action-profile-index .main-content{ + padding:0px; +} +.action-profile-index .page-profile-header{ + display: block; + border-bottom: 1px solid #D3D6DE; + padding-bottom:30px; + margin-bottom: 30px; +} +.action-profile-index .page-profile-header .join-leave-button.require-login-popup{ + float:left; + width: 35%; +} +.action-profile-index #content .page-profile-header a.button.with-text { + padding: 5px 15px; + border: 1px solid #D3D6DE; + text-transform: none; + font-size: 12px; +} +.action-profile-index #content .page-profile-header .control-panel-button a{ + background:#3E67B1; + color:#fff; +} +.action-profile-index #content .page-profile-header .control-panel-button a.button.with-text, +.action-profile-index #content .page-profile-header .join-leave-button a:hover{ + border:1px solid #3E67B1; +} + + + +/* Profile header */ +.profile-type-is-community .action-profile-index #content .main-block h1 { + color: #172738; + border-bottom: none; + font-size: 2.3em; + font-weight: bold; + font-variant: normal; + font-family: Arial, open_sansbold, Helvetica, sans-serif; +} + +/* Search form - need to develop solution - hidden on profile page*/ +.profile-type-is-community .action-profile-index #public-profile-search{ + display: none; +} + +.action-profile-index .main-block #public-profile-search, +.action-profile-index .main-block #profile-search-results form, +.action-profile-index .main-block .profile-search-block form { + background-color: transparent; +} + +.action-profile-index .main-block #public-profile-search .search-field .formfield { + float: left; + margin-right: 0.5em; +} + +.action-profile-index .main-block #public-profile-search .search-field .formfield input { + margin-top: 0px; + margin-right: 0.5em; + padding: 6px; + height: 19px; + max-height: 19px; + border: 1px solid #D3D6DE; + border-radius: 4px; +} + +.action-profile-index .main-block #public-profile-search .formfield input, +.action-profile-index .main-block #public-profile-search .formfield textarea{ + width: 100%; + background: none #FFFFFF; + color: #585858; + border: 1px solid #DDDDDD; + font-size: 16px; + word-wrap: break-word; +} + +.action-profile-index .main-block #public-profile-search form input.button.submit { + height: 32px; + margin-top: 8px; + padding: 5px 15px; + color: #ffffff; + background: #2B51A8; + border-radius: 4px; + border: 1px solid #2B51A8; + font-size: 14px; + line-height: 14px; + text-transform: uppercase; +} + +/* Profile tab */ +.profile-type-is-community .action-profile-index .profile{ + display: none; +} + +#block-community-tabs{ + font-family: Arial; +} + +#block-community-tabs .ui-corner-all{ + overflow: visible; +} + +#content #block-community-tabs .iu-widget{ + font-size: 0px ; +} + +#block-community-tabs .ui-widget-header{ + background:#ECEDF1; + border:none; + border-bottom: 3px solid #D3D6DE; +} + +#block-community-tabs .ui-widget-content{ + border:none; + background:none; +} + +#block-community-tabs .ui-corner-all{ + border-radius:0px; +} + +#block-community-tabs .ui-state-default +#block-community-tabs .ui-widget-content .ui-state-default, +#block-community-tabs .ui-widget-header .ui-state-default{ + border:none; + background:#ECEDF1; + font-weight: normal; + color:#172738; +} + +#block-community-tabs .ui-tabs .ui-tabs-nav{ + font-size: 15px; + padding:.2em .0em 0; +} + +#block-community-tabs .ui-tabs .ui-tabs-nav .ui-tabs-anchor{ + float:none; + display:table; +} +.profile-members-tabs-container .ui-tabs .ui-tabs-panel, +#block-community-tabs .ui-tabs .ui-tabs-panel{ + padding: 0px; +} + +#block-community-tabs .ui-tabs .ui-tabs-nav li a:visited{ + color:#172738; +} + +#block-community-tabs .ui-tabs .ui-tabs-nav li{ + padding-right: 3px; +} + +#block-community-tabs .ui-tabs .ui-tabs-nav li.ui-tabs-active{ + margin-bottom: -3px !important; + padding-bottom: 1px; + border-bottom: 3px solid #FF0366; +} + +#block-community-tabs .ui-tabs .ui-tabs-nav li.ui-tabs-active.ui-state-active:before{ + content:"\f0dd"; + font-family: FontAwesome; + font-size: 16px; + position:absolute; + top:26px; + margin:0px 45%; + color:#FF0366; +} +#block-community-tabs .ui-tabs .ui-tabs-nav li.ui-tabs-active a{ + color: #FF0366; + font-weight: 300; +} + +/* Community's area tabs */ + +#content #discussions-content{ + color:#172738; +} + +#content #discussions-content .pull-left{ + float:none; +} + +#content #discussions-content{ + font-family: Arial; + font-size: 14px; +} + +#content #discussions-content .message-discussion{ + border-bottom: 1px solid #ECEDF1; + margin:0px 0px 8px 0px; + padding:10px 0px 18px 0px; +} + +#content #discussions-content .message-discussion .quiet:last-child{ + font-size: 16px; + max-height: 50px; + overflow: hidden; +} + +#content #discussions-content h4{ + font-size: 22px; + border-bottom: 1px solid #ECEDF1; + padding: 8px 0px 6px 0px; +} + +#discussions-content hr{ + display: none; +} + +#discussions-content .quiet{ + line-height: 21px; +} + +#discussions-content div.quiet:last-child{ + border-top:none; +} + +#discussions-content .text-right{ + padding:6px 0px 25px 0px; +} + +#discussions-content .text-right a{ + text-align: right; + display: block; + text-transform: uppercase; + line-height: 21px; + font-size: 11px; +} + +#discussions-content .text-right a:visited, +#content #discussions-content .text-right a:visited, +#discussions-content .text-right dl.portlet a:visited{ + color: #172738; +} + +#discussions-content .text-right a::after { + content: "\f105"; + font-family: FontAwesome; + padding-left: 7px; + padding-right: 4px; + color: #ffffff; + background: #3E67B1; + border-radius: 4px; + font-size: 18px; + line-height: 20px; + text-align: center; + margin-left: 5px; + position: relative; + top: 2px; +} + +#content #discussions-content .pull-left a{ + color:#3E67B1; + font-weight: 600; +} + +#content #discussions-content .subject{ + font-weight: 800; + font-size: 16px +} + +#repository-feed-tab .event-inline.event-item{ + border-bottom: 1px solid #ECEDF1; + margin-top:30px; + padding: 0px 0px 80px 0px; +} + +#repository-feed-tab .event-inline.event-item img{ + display: none; +} + +#repository-feed-tab .event-item-timestamp{ + border-right: 1px dotted #D3D6DE; + float:left; + width: 112px; + height: 55px; + margin-right: 20px; +} +#repository-feed-tab .event-item-timestamp .time_ago{ + color:#172738; +} + +#repository-feed-tab .event-item-timestamp .time_ago:before{ + content: url("../images/ic-calendar.png"); + margin-right: 10px; + margin-top: 0px; + float: left; +} + +#repository-feed-tab .event-title{ + max-height: 55px; + overflow: hidden; + float:left; + width: 70%; + font-size: 16px; +} + +#content #repository-feed-tab .author_name{ + display: block; + padding-bottom: 5px; + font-size: 12px; +} + +#content #repository-feed-tab .author_name a{ + color:#3E67B1; +} + +#repository-feed-tab .see-more-repository{ + text-align: right; + display: block; + text-transform: uppercase; + line-height: 21px; + font-size: 11px; + margin-top: 15px; +} + +#repository-feed-tab .see-more-repository:after{ + content: "\f105"; + font-family: FontAwesome; + padding-left: 7px; + padding-right: 4px; + color: #ffffff; + background: #3E67B1; + border-radius: 4px; + font-size: 18px; + line-height: 20px; + text-align: center; + margin-left: 5px; + position: relative; + top: 2px; +} + + +#repository-feed-tab .see-more-repository a:visited, +#content #repository-feed-tab .see-more-repository a:visited, +#repository-feed-tab .see-more-repository dl.portlet a:visited{ + color:#172738; +} + +/* Blog tab*/ + +#content #blog-tab .blog-posts{ + margin-top:15px; +} + +#content #blog-tab .blog .blog-post{ + background:none; + border-bottom: 1px solid #ECEDF1; + padding:25px 0px 12px 0px; +} + +#content #blog-tab .blog .blog-post h1{ + margin: 0px 0px 10px 0px; + padding: 0px 0px 0px 0px; + max-width: 555px; + max-height: 40px; + border: none; + font: normal normal bold 16px/20px Arial; + overflow: hidden; + display: inline-block; +} + +#content #blog-tab .blog .blog-post .post-pic{ + margin:0 20px 5px 0px; + border-radius: 4px; + height: 62px; + width: 19%; + background: center/cover no-repeat; + float: left; +} +#content #blog-tab .blog .blog-post .publishing-info { + border-top: none; + color: #172838; + font: 13px/21px Arial; +} + +#content #blog-tab .blog .publishing-info{ + display:inline; + text-align: left; +} +#content #blog-tab .blog .blog-post .publishing-info .date { + margin: 0px 0px 5px 0px; + display: table-cell; + font-size: 11px; +} +#content #blog-tab .blog .blog-post .author { + display: none; +} + +#content #blog-tab .blog .blog-post .comments{ + display: none; +} + +#content #blog-tab .blog .blog-post .short-post { + max-height: 35px; + text-align: justify; + text-overflow: ellipsis; + overflow: hidden; +} + +#content #blog-tab .blog .article-body p { + margin: 0px 0px 5px 0px; + max-height: 25px; + color: #172738; + text-align: left; + text-overflow: ellipsis; + font: 15px/21px Arial; + overflow: hidden; +} + +/*Post Position-1*/ +#content #blog-tab .blog .blog-post.position-1 h1{ + line-height: 37px; + font-size: 22px; + color: #172738; + padding-left:0px; + text-align: left; +} +#content #blog-tab .blog .blog-post.position-1 .date{ + padding-left:0px; +} + +#content #blog-tab .blog .blog-post.position-1 .post-pic { +margin: 0 20px 5px 0px; +border-radius: 4px; +height: 210px; +width: 100%; +background: center/cover no-repeat; +float: left; +} + +/* Read more button*/ +#content #blog-tab .blog .read-more{ + text-align: right; + display: block; + text-transform: uppercase; + line-height: 21px; + font-size: 11px; + margin:15px 0px 20px 0px; +} + +#content #blog-tab .blog .read-more:after{ + content: "\f105"; + font-family: FontAwesome; + padding-left: 7px; + padding-right: 4px; + color: #ffffff; + background: #172738; + border-radius: 2px; + font-size: 19px; + line-height: 20px; + text-align: center; + margin-left: 5px; + position: relative; + top: 2px; +} + +#content #blog-tab .blog .read-more a{ + text-decoration: none; + color:#172735; +} + +/* Software Tab Data - Need to develop solution - Only display on profile page */ + +.profile-type-is-community #content .software-tab-data-block{ + display: none; +} + +.profile-type-is-community .action-profile_design-index #content .software-tab-data-block, +.profile-type-is-community .action-profile-index #content .software-tab-data-block{ + display: block; +} + +/*** Right bar ***/ + +.template-default.profile-type-is-community .action-profile-index #content .box-3 .link-list-block, +.template-lefttopright.profile-type-is-community .action-profile-index #content .box-2 .link-list-block + display: none; +} + +/*Block with Community information - Need to develop solution - Only display on profile page */ + +.profile-type-is-community .community-block{ + display: none; +} + +.profile-type-is-community .action-profile_design-index #content .community-block, +.profile-type-is-community .action-profile-index #content .community-block{ + display: block; + border: 1px solid #ECEDF1; + border-radius: 4px; +} + +.profile-type-is-community #content .community-block-logo{ + border-bottom: 3px solid #3E67B1; +} + +.profile-type-is-community #content .community-block-title{ + padding: 10px; + background-color: #ECEDF1; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; +} + +.profile-type-is-community #content .community-block-title h1{ + margin: 5px auto; + font-size: 14px; + line-height: 20px; +} + +.profile-type-is-community #content .community-block-logo{ + padding: 10px; +} + +.profile-type-is-community #content .community-block-logo img.logo{ + height: auto; + width: 100px; + min-width: 100px; + max-width: 170px; +} + +.profile-type-is-community #content .community-block-logo a{ + display: block; + height: 100px; + overflow: hidden; + text-align: center; +} + +/* Wiki block - Need to develop solution - Only display on profile page */ +.template-default #content .box-3 .wiki-block, +.template-lefttopright #content .box-2 .wiki-block{ + display: none; +} + +.template-default .action-profile-index #content .box-3 .wiki-block, +.template-lefttopright .action-profile-index #content .box-2 .wiki-block, +.template-default .action-profile_design-index #content .box-3 .wiki-block, +.template-lefttopright .action-profile_design-index #content .box-2 .wiki-block{ + display: block; +} + +/* Repository block and wiki block need to look a unique block */ +.action-profile-index #content .box-2 .block-outer .repository-block, +.action-profile-index #content .box-3 .block-outer .repository-block{ + margin-bottom: 20px; +} + +/*Block with Members information - Need to develop solution - Only display on profile page */ + +.profile-type-is-community #content .members-block{ + display: none; + border: 1px solid #D3D6DE; + border-radius: 4px; +} + +.profile-type-is-community .action-profile_design-index #content .members-block, +.profile-type-is-community .action-profile-index #content .members-block{ + display: block; +} + +.profile-type-is-community #content .members-block .block-title{ + padding: 12px; + margin-bottom: 12px; + background-color: #ECEDF1; + color: #172738; + border-bottom: 1px solid #D3D6DE; + border-top: none; + font-size: 14px; +} + +.profile-type-is-community #content .members-block .block-footer-content{ + padding: 8px 10px 15px 0px; + margin-right: 0px; + background-color: #ECEDF1; + border-top: 1px solid #D3D6DE; + text-align: right; +} + +.profile-type-is-community #content .members-block .block-footer-content a{ + padding-right: 0px !important; +} + +.profile-type-is-community #content .members-block .block-footer-content a.view-all{ + background-image: none; + border: none; + text-transform: uppercase; + line-height: 21px; +} + +.profile-type-is-community #content .members-block .block-footer-content a.view-all::after{ + content: "\f105"; + position: relative; + top: 2px; + margin-left: 5px; + padding-left: 7px; + padding-right: 4px; + color: #ffffff; + background: #3E67B1; + border-radius: 4px; + font-family: FontAwesome; + font-size: 18px; + line-height: 20px; + text-align: center; +} + +.profile-type-is-community #content .members-block .common-profile-list-block .vcard{ + border: none; +} + +.profile-type-is-community #content .members-block .common-profile-list-block .vcard:hover{ + background: none; + border: none; +} + +.profile-type-is-community #content .members-block .common-profile-list-block .vcard li a{ + color: #172738; +} + +.profile-type-is-community #content .members-block .common-profile-list-block .vcard a.profile_link{ + /*height: 70px;*/ + height: 100px; + max-height: 100px; +} + +.profile-type-is-community #content .members-block .menu-submenu{ + background: #172738; + border-radius: 4px; + /***side block position***/ + top: -39px; + right: 100%; + width: 131px; + height: 176px; + box-shadow: 2px 2px 2px #ECEDF1; + -webkit-box-shadow: 2px 2px 2px #ECEDF1; + -moz-box-shadow: 2px 2px 2px #ECEDF1; +} + +.profile-type-is-community #content .members-block .menu-submenu.down::before{ + content:"\f0da"; + float: right; + position: relative; + margin: -7px; + margin-top: 30%; + color: #172738; + font-family: FontAwesome; + font-size: 25px; +} + +.profile-type-is-community #content .members-block .menu-submenu-header, +.profile-type-is-community #content .members-block .menu-submenu-content, +.profile-type-is-community #content .members-block .menu-submenu-footer{ + background: none; +} + +.profile-type-is-community #content .members-block .menu-submenu-header, +.profile-type-is-community #content .members-block .menu-submenu-footer{ + display: none; +} + +.profile-type-is-community #content .members-block .menu-submenu-content{ + height: 100%; +} + +.profile-type-is-community #content .members-block .common-profile-list-block li{ + margin: 0px !important; +} + +.profile-type-is-community #content .members-block .common-profile-list-block .vcard .menu-submenu-trigger{ + display: block; + height: 13px; + top: 2px; + left: 3px; + padding-bottom: 0px; + background: #172738; + border: 1px solid #fff; + opacity: 0.7; +} + +.profile-type-is-community #content .members-block .common-profile-list-block .vcard .menu-submenu-trigger::before{ + content: "\f053"; + color: #fff; + font-family: FontAwesome; + font-size: 8px; + line-height: 11px; +} + +.profile-type-is-community #content .members-block .common-profile-list-block .fn { + margin-top: 2px; + color: #172738; + max-height: 34px; + overflow: hidden; +} + +.profile-type-is-community #content .members-block .menu-submenu-content h4{ + max-height: 16px; + padding: 8px 7px 10px 6px; + margin: 0px 0px 2px 0px; + background: #243F59; + color: #fff; + border-bottom: 2px solid #FF0366; + border-radius: 4px 4px 0px 0px; + font-family: Arial; + font-size: 13px; + text-transform: uppercase; + text-align: center; + overflow: hidden; +} + +.profile-type-is-community #content .friends-block ul, #content .members-block ul { + min-width: 196px; + width: 192px; + margin: 0px 0px 0px 0px; + padding: 0px; +} + +.profile-type-is-community #content .members-block .menu-submenu-content .menu-submenu-list li a{ + padding: 2px; + color: #fff; + border-bottom: 1px dotted #2C4B6B; + text-align: center; + line-height: 30px; +} + +.profile-type-is-community #content .members-block .menu-submenu-content .menu-submenu-list li a.add-friend{ + border: none; +} + +.profile-type-is-community #content .members-block .menu-submenu-content .menu-submenu-list li a.add-friend::before{ + content: "\f067"; + padding-right: 6px; + color: #FF0366; + font-family: FontAwesome; + font-size: 11px; +} + +.profile-type-is-community #content .members-block .menu-submenu-content h4:hover, +.profile-type-is-community #content .members-block .menu-submenu-content .menu-submenu-list li a:hover{ + color: #ECEDF1; +} + +.profile-type-is-community #content .members-block .common-profile-list-block img{ + width: 50px; + height: 50px; + max-height: 50px; + max-width: 50px; + border-radius: 4px; +} + +.profile-type-is-community #content .members-block .block-footer-content a.view-all{ + position:relative; +} + +/* Profile info block */ + +#content .profile-image-block .admin-link a{ + color: #2c66ce; +} + +#content .profile-image-block .profile-info-options{ + padding-right: 0; + text-align: center; +} + +#content .profile-image-block .profile-info-options a.button.with-text{ + border-color: #D3D6DE; + font-size: 12px; + text-transform: none; +} + +#content .profile-image-block .profile-info-options a.button.with-text:hover{ + border-color: #3E67B1; +} + +/*** Members Page ***/ + +/* Title of the area members */ +.action-profile-members .box-1{ + width: 560px; +} + +.action-profile-members #content .page-members-header{ + margin-bottom: 45px; + border-bottom: 1px solid #D3D6DE; + font-family: Arial; + height: 150px; +} + +.action-profile-members #content .page-members-header h1{ + margin:20px 0px 8px 0px; +} + +.action-profile-members #content .page-members-header h3.community-name{ + margin: 0px 0px 5px 0px; + font-size: 14px; + font-weight: 300; +} + +.action-profile-members #content .page-members-header ul li{ + float:left; + margin:8px 0px 0px 0px; + width: 36%; + +} + +.action-profile-members #content .page-members-header a.button.with-text{ + padding: 5px 15px; + border: 1px solid #D3D6DE; + text-transform: none; + font-size: 12px; + margin-right: 5px; +} + +.action-profile-members #content .page-members-header a.button.with-text:hover{ + border-color: #3E67B1; +} + + +/* Tabs */ + +.action-profile-members #content .profile-members-tabs-container{ + font-family: Arial; +} + +.action-profile-members #content .profile-members-tabs-container .ui-corner-all{ + overflow: visible; + padding: 0; +} + +.action-profile-members #content .profile-members-tabs-container .iu-widget{ + font-size: 0px ; +} + +.action-profile-members #content .profile-members-tabs-container .ui-widget-header{ + background: #ECEDF1; + border: none; + border-bottom: 3px solid #D3D6DE; +} + +.action-profile-members #content .profile-members-tabs-container .ui-widget-content{ + background: none; + border: none; +} + +.action-profile-members #content .profile-members-tabs-container .ui-corner-all, +.action-profile-members #content .profile-members-tabs-container .ui-corner-bl, +.action-profile-members #content .profile-members-tabs-container .ui-corner-top, +.action-profile-members #content .profile-members-tabs-container .ui-corner-right, +.action-profile-members #content .profile-members-tabs-container .ui-corner-bottom, +.action-profile-members #content .profile-members-tabs-container .ui-corner-left, +.action-profile-members #content .profile-members-tabs-container .ui-corner-tr, +.action-profile-members #content .profile-members-tabs-container .ui-corner-tl{ + border-radius: 0px; +} + +.action-profile-members #content .profile-members-tabs-container .ui-state-default, +.action-profile-members #content .profile-members-tabs-container .ui-widget-content .ui-state-default, +.action-profile-members #content .profile-members-tabs-container .ui-widget-header .ui-state-default{ + border: none; + background: #ECEDF1; + font-weight: normal; + color: #172738; +} + +.action-profile-members #content .profile-members-tabs-container .ui-tabs .ui-tabs-nav { + font-size: 15px; +} + +.action-profile-members #content .profile-members-tabs-container .ui-tabs .ui-tabs-nav .ui-tabs-anchor{ + float: none; + display: table; +} + +.action-profile-members #content .profile-members-tabs-container .ui-tabs .ui-tabs-nav li{ + padding-right: 3px; +} + +.action-profile-members #content .profile-members-tabs-container .ui-tabs .ui-tabs-nav li a:visited{ + color: #172738; +} + +.action-profile-members #content .profile-members-tabs-container .ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -3px; + padding-bottom: 1px; + border-bottom: 3px solid #FF0366; +} + +.action-profile-members #content .profile-members-tabs-container .ui-tabs .ui-tabs-nav li.ui-tabs-active.ui-state-active:before{ + content:"\f0dd"; + font-family: FontAwesome; + font-size: 16px; + position:absolute; + top:26px; + margin:0px 45%; + color:#FF0366; +} + +.action-profile-members #content .profile-members-tabs-container .ui-tabs .ui-tabs-nav li.ui-tabs-active a { + color: #FF0366; + font-weight: 300; +} + +/* Sort selection */ +.action-profile-members #profile-members-sort-options{ + font-size: 14px; + text-align: right; + margin:16px 15px 17px 6px; + border-bottom: 1px solid #ECEDF1; + padding-bottom:8px; +} + +.action-profile-members #profile-members-sort-options label{ + font-weight: 700; + color:#172738; +} + +.action-profile-members #profile-members-sort-options select{ + background: none; + border: 1px solid #D3D6DE; + border-radius: 4px; + padding: 4px 15px 4px 4px; + margin: 0px 0px 0px 10px; + font-size: 14px; +} + +/* Members Tab */ +.action-profile-members .profile-members-tabs-container .profile-members{ + padding-left: 5px; +} + +/* Admins Tab */ +.action-profile-members .profile-members-tabs-container .profile-admins{ + padding-left: 5px; +} + +/* Profiles list*/ +.action-profile-members .common-profile-list-block .vcard{ + border: none; +} + +.action-profile-members .common-profile-list-block .vcard:hover{ + border: none; + background: none; +} + +.action-profile-members .common-profile-list-block .vcard a{ + padding-bottom: 30px; +} + +.action-profile-members .box-1 .common-profile-list-block span{ + margin-right: 9px; + width: 90px; + height: 86px; +} + +.action-profile-members .common-profile-list-block img{ + border-radius: 4px; + width: 82px; + height: 82px; + max-width: 150px; + max-height: 150px; +} + +.action-profile-members .menu-submenu{ + background:#172738; + border-radius: 4px; + /***side block position***/ + bottom:0px; + right: 105%; + width: 131px; + height: 178px; + box-shadow: 2px 2px 2px #ECEDF1; + -webkit-box-shadow: 2px 2px 2px #ECEDF1; + -moz-box-shadow: 2px 2px 2px #ECEDF1; +} + +.action-profile-members .menu-submenu.down::before { + content:"\f0da"; + color:#172738; + font-family: FontAwesome; + font-size: 25px; + float: right; + position: relative; + margin:-7px; + margin-top: 30%; +} + +.action-profile-members .menu-submenu-header, +.action-profile-members .menu-submenu-content, +.action-profile-members .menu-submenu-footer{ + background:none; +} + +.action-profile-members .menu-submenu-header, +.action-profile-members .menu-submenu-footer{ + display: none; +} + +.action-profile-members .menu-submenu-content{ + height: 100%; +} + +.action-profile-members #content .menu-submenu-content h4{ + color:#fff; + font-size: 13px; + background:#243F59; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-bottom: 2px solid #FF0366; + text-transform: uppercase; + padding:8px 7px 10px 6px; + margin:0px 0px 2px 0px; + text-align: center; + max-height: 16px; + overflow: hidden; +} + +.action-profile-members #content .menu-submenu-content ul a{ + padding-left: 0px; +} + +.action-profile-members #content .menu-submenu-content .menu-submenu-list .add-friend::before{ + content:"\f067"; + font-family: FontAwesome; + color:#FF0366; + font-size: 11px; + padding-right: 6px; +} + +.action-profile-members #content .menu-submenu-content .menu-submenu-list .add-friend:last-child{ + border-bottom:none; +} + +.action-profile-members #content .menu-submenu-content .menu-submenu-list li a { + color:#fff; + font-family: Arial; + font-size: 14px; + border-bottom:1px dotted #2C4B6B; + text-align: center; + padding-top:8px; + padding-bottom:10px; + margin-right: 1px; +} + +.action-profile-members .common-profile-list-block .vcard .menu-submenu-trigger{ + display: block; + background:#172738; + top:5px; + left:4px; + border:1px solid #172738; + padding-bottom: 0px; + border-radius: 5px; + -moz-border-radius:5px; + -webkit-border-radius:5px; + height: 15px; +} + +.action-profile-members .common-profile-list-block .vcard .menu-submenu-trigger::before{ + content:"\f053"; + color:#fff; + font-family: FontAwesome; + font-size: 10px; + line-height: 11px; +} + +.action-profile-members .box-1 .common-profile-list-block .fn{ + font-size: 14px; + color:#172738; + margin-bottom: 27px; + margin-top:2px; + height: 35px; + max-height: 35px; + overflow: hidden; +} + +/*** Events ***/ + +#content .article-body-event .event-card{ + border-top: 1px dotted #D3D6D3; + background-repeat: no-repeat; + width: 494px; + height: 116px; + margin-bottom: 30px; +} + +#content .article-body-event .event-image{ + border-right: 1px dotted #D3D6DE; +} + +#content .article-body-event .about-event > span{ + font-family: Arial; + line-height: 13px; +} + +#content .article-body-event .about-event .event-date{ + font-weight: bold; + letter-spacing: 0.49px; +} + +#content .article-body-event .about-event .event-address{ + margin-top: 19px; +} + +#content .article-body-event .about-event .event-address span{ + margin-top: 4.4px; + line-height: 14px; + letter-spacing: 0.5px; +} + +#content .article-body-event .event-link{ + letter-spacing: 0.48px; +} + +#content .article-body-event .event-link a{ + text-decoration: underline; +} + +#content .article-body-event .event-body .event-lead p{ + font-size: 16px; + font-family: Arial; + font-weight: bold; + letter-spacing: -0.4px; + line-height: 21px; +} + +#content .article-body-event .event-body .event-content p{ + font-size: 15px; + font-family: Arial; + line-height: 22px; +} diff --git a/src/noosfero-spb/noosfero-spb-theme/css/edition-pages.css b/src/noosfero-spb/noosfero-spb-theme/css/edition-pages.css new file mode 100644 index 0000000..c5e2dae --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/css/edition-pages.css @@ -0,0 +1,477 @@ +/*** General Form Fields ***/ + +/*** Edit Blog and Articles ***/ + +.controller-cms #content .main-content h1{ + margin: 0 0 10px 0; + padding: 0; + color: #172738; + border-bottom: none; + font-family: Arial; + font-size: 32px; + font-weight: bold; + font-variant: normal; +} + +.controller-cms #content .main-content form{ + font-size: 14px; + font-family: Arial; +} + +.controller-cms #content .main-content form .required-field .pseudoformlabel, +.controller-cms #content .main-content form .required-field label.formlabel:after { + color: #FF0366; + font-size: 14px; + font-weight: 500; +} + +.controller-cms #content .main-content .formlabel{ + display: inline-block; + max-width: 100%; + margin-bottom: 5px; + padding: 10px 0 5px 0; + color: #231f20; + font-size: 14px; +} + +.controller-cms #content .main-content .formfieldline .formfield code{ + display: block; + width: auto; + height: 30px; + padding: 2px 0px 2px 0px; + border: none; + border-radius: 4px; + font-size: 15px; + font-family: Arial, helvetica; +} + +.controller-cms #content .main-content .formfieldline .formfield code *{ + display: inline; +} + +.controller-cms #content .main-content .formfieldline .formfield input[type="text"]{ + padding: 6px; + color: #585858; + background: #FFF; + border: 1px solid #ccc; + border-radius: 4px; + font-size: 15px; + font-family: Arial, helvetica; +} + +.controller-cms #content .main-content .formfieldline textarea{ + padding: 6px; + color: #585858; + background: none; + border: 1px solid #ccc; + border-radius: 4px; + font-family: Arial, helvetica; + font-size: 15px; +} + +.controller-cms #content .main-content .formfieldline .formfield code input[type="text"]:hover, +.controller-cms #content .main-content .formfieldline .formfield code input[type="text"]:focus, +.controller-cms #content .main-content .formfieldline textarea:hover, +.controller-cms #content .main-content .formfieldline textarea:focus{ + border: 1px solid #172738; +} + +.controller-cms #content .main-content .formfieldline .type-file .type-file .formlabel{ + display: none; +} + +.controller-cms #content .main-content .formfieldline .type-file .type-file .type-text .formlabel{ + display: block; +} + +.controller-cms #content .formfield #article_image_builder_uploaded_data, +.controller-cms #content .formfield #article_image_builder_label{ + height: 19px; + padding: 6px; + background: none; + border: 1px solid #ccc; + border-radius: 4px; + font-size: 12px; + text-indent: 0px; +} + +.controller-cms #content .formfield #article_image_builder_uploaded_data:hover, +.controller-cms #content .formfield #article_image_builder_label:hover, +.controller-cms #content .formfield #article_image_builder_uploaded_data:focus, +.controller-cms #content .formfield #article_image_builder_label:focus{ + border: 1px solid #172738; +} + +.controller-cms #content .formfield #fetch-external-feed{ + padding-left: 20px; + border-radius: 4px; +} + +.controller-cms #content .formfield #fetch-external-feed > input{ + height: 13px; + margin: 8px 8px 8px 0px; + vertical-align: middle; + width: 13px; +} + +.controller-cms #content .formfield #fetch-external-feed #external-feed-options #external-feed-options-only-once input{ + margin-right: 3px; + width: 13px; + vertical-align: middle; +} + +.controller-cms #content .formfield #fetch-external-feed #external-feed-options #external-feed-options-only-once label{ + margin-right: 250px; +} + +.controller-cms #content .main-content form label.formlabel, +.controller-cms #content .main-content form .article-translation-field { + font-size: 14px; + margin-bottom: 5px; + color: #231f20; +} + +.controller-cms #content .main-content form .article-translation-field { + margin-top: 25px; + margin-bottom: 15px; +} + +.controller-cms #content .main-content form .button-bar input{ + height: 30px; + padding: 2px 15px; + margin-right: 10px; + color: #FFF; + background: #3E67B1; + font-size: 15px; +} + +.controller-cms #content .main-content form .button-bar input:hover{ + background: #5E82C6; + border: none; +} + +.controller-cms #content .main-content form .button-bar input.button.with-text{ + height: 36px; +} + +.controller-cms #content .main-content form .button-bar a.button{ + height: 30px; + padding: 2px 15px; + color: #3E67B1; + background: #FFF; + border: 1px solid #3E67B1; + font-size: 14px; + text-align: center; +} + +.controller-cms #content .main-content form .button-bar a.button:hover{ + background: none; + color: #3E67B1; + border-color: #3E67B1; +} + +.controller-cms #content .main-content form .box-title{ + font-size: 15px; + font-family: Arial, helvetica; +} + +.controller-cms #content .main-content #category-ajax-selector{ + border-style: dotted; +} + +.controller-cms #content .main-content #category-ajax-selector label{ + font-size: 14px; +} + +.controller-cms #content .main-content #category-ajax-selector .select-subcategory-link{ + background: #FFF; + border: 1px solid #2C66CE; + color: #2C66CE; + padding: 3px; +} + +.controller-cms #content .main-content #category-ajax-selector .select-subcategory-link:hover{ + background: #2C66CE; + color: #FFF; +} + +.controller-cms #content .main-content .inputosaurus-required{ + background: none; + border: 1px solid #ccc; +} + +.controller-cms #content .main-content .inputosaurus-required:hover, +.controller-cms #content .main-content .inputosaurus-required:focus{ + border: 1px solid #172738; +} + +.controller-cms #content .main-content .inputosaurus-required input:hover{ + background: none; +} + +#content #edit-article-options h4 { + font-family: "open_sansbold", Arial, Helvetica, sans-serif; + font-size: 14px; +} + +#content #edit-article-options div div { + margin-top: 13px; + margin-bottom: 13px; +} + +/*** Article's edition page ***/ + +#content .text-editor-sidebar .header{ + padding: 13px 10px; + color: #172738; + background: #D3D6DE; + border-radius: 4px; + font-size: 14px; + font-weight: 300; + font-family: Arial; +} + +#content .text-editor-sidebar .header a.button.icon-vertical-toggle{ + padding: 0 15px; + background: #3E67B1; + color: #FFF; + font-size: 14px; + font-weight: 300; + font-family: Arial; +} + +#content .text-editor-sidebar .header a.button.icon-vertical-toggle:hover{ + background: #5E82C6; +} + +#content .text-editor-sidebar-box{ + background: #ECEDF1; + border-radius: 4px; + border: 1px solid #D3D6DE; +} + +/*New Software form*/ + +.action-software_communities_plugin_myprofile-new_software #content.current-step h3 { + color: #F50054; +} + +.action-software_communities_plugin_myprofile-new_software #content .main-block form input[type="text"] { + display: block; + height: 19px; + padding: 6px; + border: 1px solid #ccc; + border-radius: 4px; + width: 384px; + font-size: 15px; + font-family: arial, helvetica; + color: #585858; +} + +.action-software_communities_plugin_myprofile-new_software #content .formfield input{ + background: none #FFFFFF; + border: 1px solid #DDDDDD; + color: #585858; + font-size: 16px; + width: 76%; + word-wrap: break-word; + border-radius: 4px; +} +.action-software_communities_plugin_myprofile-new_software #content .main-content form label.formlabel.mandatory{ + font-size: 14px; + margin-bottom: 5px; + color: #231f20; + font-weight: 300; +} + +.action-software_communities_plugin_myprofile-new_software #content .main-content form .required-field .formlabel.mandatory:after{ + color: #FF0366; + font-weight: 500; +} + +.action-software_communities_plugin_myprofile-new_software #content .formfield textarea{ + background: none #FFFFFF; + border: 1px solid #DDDDDD; + color: #585858; + font-size: 16px; + width: 100%; + word-wrap: break-word; +} + +.action-software_communities_plugin_myprofile-new_software #content #finality textarea { + resize: none; + height: 100px; +} + +.action-software_communities_plugin_myprofile-new_software #content #software-hostname { + float: left; + display: inline-block; + vertical-align: middle; + background: #EEE; + border: 1px solid #CFCFCF; + line-height: 22px; + padding: 0px 7px; + color: #4A4A4A; + font-size: 20px; + text-transform: lowercase; + min-width: 190px; + border-spacing: 20px; +} + +.action-software_communities_plugin_myprofile-new_software #content .main-block form #profile_change_picture { + padding: 0 15px 15px 15px; + border: 1px dotted #ddd; + margin-top: 10px; +} + +.action-software_communities_plugin_myprofile-new_software #content .main-content form p .required-field { + max-width: 500px; + padding: 15px 20px; + margin: 20px 0 30px 0; + border: 1px dotted #ccc; + border-left: 5px solid #FF0366; + border-radius: 3px; + display: block; + background: #fff; + line-height: 20px; + font-size: 13px; +} + +.action-software_communities_plugin_myprofile-new_software .explanation { +font-style: italic; +font-size: 10px; +} + +/* new community form*/ + +.action-memberships-new_community #content .main-block form input[type="text"] { + display: block; + height: 19px; + padding: 6px; + border: 1px solid #ccc; + border-radius: 4px; + width: 384px; + font-size: 15px; + font-family: arial, helvetica; + color: #585858; +} + +.action-memberships-new_community .formfield input{ + background: none #FFFFFF; + border: 1px solid #DDDDDD; + color: #585858; + font-size: 16px; + width: 76%; + word-wrap: break-word; + border-radius: 4px; +} + +.action-memberships-new_community #content .main-content form label.formlabel{ + font-size: 14px; + margin-bottom: 5px; + color:#231f20; + font-weight: 300; +} + +.action-memberships-new_community #content .main-content form .required-field .formlabel:after { + color: #FF0366; + font-weight: 500; +} + +.action-memberships-new_community .formfield textarea{ + background: none #FFFFFF; + border: 1px solid #DDDDDD; + color: #585858; + font-size: 16px; + width: 100%; + word-wrap: break-word; +} + +.action-memberships-new_community #content .main-block form #profile_change_picture { + padding: 0 15px 15px 15px; + border: 1px dotted #ddd; + margin-top: 10px; +} + +.action-memberships-new_community #content .main-content form p .required-field { + max-width: 500px; + padding: 15px 20px; + margin: 20px 0 30px 0; + border: 1px dotted #ccc; + border-left: 5px solid #FF0366; + border-radius: 3px; + display: block; + background: #fff; + line-height: 20px; + font-size: 13px; +} + +/*Contact new form*/ + +.action-contact-new #content .main-block form input[type="text"] { + display: block; + height: 19px; + padding: 6px; + border: 1px solid #ccc; + border-radius: 4px; + width: 384px; + font-size: 15px; + font-family: arial, helvetica; + color: #585858; +} + +.action-contact-new .formfield input{ + background: none #FFFFFF; + border: 1px solid #DDDDDD; + color: #585858; + font-size: 16px; + width: 76%; + word-wrap: break-word; + border-radius: 4px; +} + +.action-contact-new #content .main-content form label.formlabel{ + font-size: 14px; + margin-bottom: 5px; + color:#231f20; + font-weight: 300; +} + +.action-contact-new #content .main-content form .required-field .formlabel:after { + color: #FF0366; + font-weight: 500; +} +.action-contact-new #content .main-content form label.formlabel{ + font-size: 14px; + margin-bottom: 5px; + color:#231f20; + font-weight: 300; +} + +.action-contact-new #content .main-content form .required-field .formlabel:after { + color: #FF0366; + font-weight: 500; +} + + +.action-contact-new .formfield textarea{ + background: none #FFFFFF; + border: 1px solid #DDDDDD; + color: #585858; + font-size: 16px; + width: 100%; + word-wrap: break-word; +} + +.action-contact-new #content .main-content form p .required-field { + max-width: 500px; + padding: 15px 20px; + margin: 20px 0 30px 0; + border: 1px dotted #ccc; + border-left: 5px solid #FF0366; + border-radius: 3px; + display: block; + background: #fff; + line-height: 20px; + font-size: 13px; +} \ No newline at end of file diff --git a/src/noosfero-spb/noosfero-spb-theme/css/footer.css b/src/noosfero-spb/noosfero-spb-theme/css/footer.css new file mode 100644 index 0000000..c65eb10 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/css/footer.css @@ -0,0 +1,208 @@ +/******************Footer-Rodapé**********************************/ +#theme-footer { + width: 100%; + min-width: 960px; +} + +#theme-footer a{ + color: #2c66ce; +} + +#theme-footer a:hover{ + color: #2c66ce; +} + +#theme-footer #footer-content { + background: #fff; +} + +#theme-footer #footer-logos { + background: #0042b2; + max-width: 100%; + padding: 2em 0; + height: 49px; +} + +#theme-footer #footer-logos > div { + max-width: 960px; + margin: 0 auto; +} + +#theme-footer #footer-logos a { + display: block; + height: 49px; + float: left; +} + +#theme-footer #footer-logos span { + display: none; +} + +#theme-footer #footer-logos .logo-acesso { + background: transparent url(images/acesso-a-informacao.png) center center no-repeat; + width: 107px; +} + +#theme-footer #footer-logos .logo-brasil { + background: transparent url(images/brasil.png) center center no-repeat; + width: 153px; +} + +#footer-logos .logo-sgpr { + background: transparent url(images/sgpr.png) center center no-repeat; + width: 187px; + margin-right: 30px; +} + +#theme-footer #footer-logos .institucionais { + float: right; +} + +#theme-footer #footer-license { + max-width: 960px; + margin: 0 auto; + text-align: left; + padding: 5px; +} + +#theme-footer #footer-license p { + color: #0d4094; + text-align: left; +} + +/***********Rodape Colab *********************/ + +#theme-footer footer{ + display:block +} + +#theme-footer footer { + background:#d5d5d5; +} + +#theme-footer footer .footer-atalhos { + background:#fff; + border-bottom: 2px; +} + +#theme-footer footer .container2{ + width: 100%; + margin-right:auto; + margin-left:auto; + *zoom:1; + max-width: 960px; +} + +#theme-footer .container2:before, +#theme-footer .container2:after { + display:table; + content:""; + line-height:0; +} + +#theme-footer .container2:after { + clear:both; +} + +#theme-footer .voltar-ao-topo { + margin-top: 1.915em; + text-align: right; +} + +#theme-footer footer .footer-atalhos a { + margin-right:12px +} + +#theme-footer footer .footer-atalhos .voltar-ao-topo a { + color:#717782; + padding-left: 20px; + background: url(images/voltar-topo.png) no-repeat left center; + color: #777; + font-size: 15px; +} + +#theme-footer footer .footer-atalhos .voltar-ao-topo a:hover { + text-decoration:underline; +} + +#theme-footer footer .row { + margin-bottom: 20px; + margin-left: auto; + *zoom: 1; + margin-right: auto; +} + +#theme-footer .row:before, +#theme-footer .row:after { + display: table; + content: ""; + line-height: 0; +} + +#theme-footer .row:after { + clear:both; +} + +#theme-footer footer nav { + border-left: 1px dotted #2c66ce; + padding: 0 5px 0 10px +} + +#theme-footer footer nav h2 { + font-size: 18px; + font-weight: bold; + color: #2c66ce; + line-height: 1.3em; + padding: 0px; + margin: 0 0 8px 0; +} + +#theme-footer footer nav ul { + margin-left: 0px; +} + +#theme-footer footer nav li { + display: block; + padding-bottom: 3px; +} + +#theme-footer footer nav a { + font-size: 13px; + color: #2c66ce; + line-height: 1.7em; + font-family: "open_sansregular", Arial, Helvetica, sans-serif; +} + +#theme-footer footer nav a:hover { + color: #2c66ce; + text-decoration: underline; +} + +#theme-footer footer .footer-menus { + padding-bottom: 10px; +} + +#theme-footer .span2 { + width: 104px; +} + +#theme-footer [class*="span"] { + float:left; + min-height: 1px; + margin-left: 30px; + margin-top: 30px; +} + +#theme-footer .span3 { + width:210px; +} + +#theme-footer .hide { + display:none; +} + +#theme-footer .visible-phone { + display:none !important; +} + +/*****fim footer Colab*****/ diff --git a/src/noosfero-spb/noosfero-spb-theme/css/header.css b/src/noosfero-spb/noosfero-spb-theme/css/header.css new file mode 100644 index 0000000..40a20d4 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/css/header.css @@ -0,0 +1,301 @@ +#theme-header { + height: auto; +} + +.header-content * { + margin: 0; + padding: 0; + list-style: none; + vertical-align: baseline; +} + +.header-content li { display: inline; } + +.header-content #header { + padding: 15px 0 0 0; + color: #000; + background-color:#f0f2f1; + background-color:#ecedf1; + background-image: -webkit-radial-gradient(center, ellipse cover, #f0f2f1 1%, #ecedf1 100%) +} + +.header-content #header > div { + max-width: 960px; + min-width: 960px; + margin: 0 auto; +} + +.header-content #accessibility { + display: block; + float: left; + font-family: arial; + font-size: 10px; + width: 50%; +} + +.header-content #accessibility a { + margin-right: 8px; + color: #2c66ce; +} + +.header-content #accessibility span { + background: none repeat scroll 0 0 #2c66ce; + color: #FFFFFF; + padding: 0 3px; +} + +/* logo */ +.header-content #logo { + padding: 0; + float: left; + width: 50%; +} + +.header-content #logo span { + display: block; +} + +.header-content #logo a { + display: block; + width: 100%; + color: #03316f; + margin: 1em 0px; +} + +.header-content #logo a, +.header-content #logo #portal-title { + color: #03316f; +} + +.header-content #logo #portal-title { + background-image: url("../images/logotipo_spb_beta.svg"); + background-repeat: no-repeat; + background-size: 370px; + height: 78px; + width: 374px; + margin: 10px 0px 10px 0px; +} + +.header-content #logo #portal-description { + font-size: 1.2em; + text-transform: uppercase; +} + +/* Site Actions */ +.header-content #portal-siteactions { + display: block; + float: right; + clear: left; + padding-bottom: 2px; + margin-top: -15px; + font-size: 10px; + text-align: center; +} + +.header-content #portal-siteactions a { + color:#2c66ce; + text-decoration: none; + padding: 4px 0 4px 10px; + text-transform: uppercase; + font-family: 'open_sansregular', Arial, Helvetica, sans-serif; +} + +.header-content #portal-siteactions a:hover { + color: #03316f; +} + +.header-content #portal-siteactions li { + display: inline; + margin: 0 5px 0 0; + border-bottom: 1px dotted #2c66ce; +} + +.header-content #portal-siteactions li a { + padding: 4px 0px; +} + +.header-content #siteaction-accessibility, +.header-content #siteaction-contraste, +.header-content li#siteaction-mapadosite { + margin: 0px 48px 0px 0px; +} + +/* Top links */ +.header-content #header #sobre { + line-height: 30px; + font-size: 12px; + height: 30px; + clear: both; + background-color:#CFD0D2; + max-width: 100%; + margin: 0px auto; + text-align: right; + padding: 0 0 0 10px; + border-right: none; +} + +.header-content #sobre a { + color: #2c66ce; + font-family: 'Open Sans', Arial, Helvetica, sans-serif; +} + +.header-content #links-rapidos{ + width: 960px; + margin: 0 auto; + font-color:#fff; +} + +.header-content #link-faq a { + border-right: 1px solid #2c66ce; + padding: 0 10px; +} + +.header-content #link-contact a { + padding-left: 10px; +} + +/* Searchbox */ +.header-content .LSBox { + margin: 0; + padding: 0; + border: none; +} + +.header-content input.searchField { + -moz-appearance: none; +} + +.header-content #portal-searchbox { + clear: right; + float: right; + font-size: 80%; + margin: 30px 0 15px; + text-align: right; + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border: 1px solid #CCCCCC; + background: #fff; + padding: 2px; +} + +.header-content #portal-searchbox .searchField { + padding: 0.45em; + border-right: none; + border: none; + width: 171px; +} + +.header-content #portal-searchbox form { + white-space: nowrap; +} + +.header-content #portal-searchbox label { + font-weight: normal; +} + +.header-content #searchGadget { + width: 13em; +} + +.header-content #header input.searchButton { + padding: 0.3em; + background: transparent; + text-indent: -2000px; + padding: 4px 15px; + border: none; +} + +.header-content #content input.searchField { + margin-bottom: 1em; +} + +.header-content #header input.searchButton { + background-image: url("../images/search-button.png"); + background-position: 8px 2px; + background-repeat: no-repeat; + background-color: #ffffff; +} + +.header-content #LSResult { + z-index: 1; + margin-top: 0.5%; +} + +/* Social Icons */ + +.header-content #social-icons { + float: right; + clear: right; + margin: 0px 0px 17px; +} + +.header-content #social-icons ul { + display: table-row; +} + +.header-content #social-icons li { + float: right; + width: 20px; + margin-left: 4px; + display: table-cell; +} + +.header-content #social-icons li a { + width: 20px; + height: 20px; + padding: 0px; + display: inline-block; + opacity: .85; + border: none; + background-repeat: no-repeat; +} + +.header-content #social-icons span { + display: none; +} + +.header-content #sb_face, +.header-content #sb_tweet, +.header-content #sb_youtb, +.header-content #sb_flickr { + background: url(images/icones_home_branco.jpg) 0px; +} + +.header-content #sb_flickr { + background-position: -100px; +} + +.header-content #sb_face { + background-position: -12px; +} + +.header-content #sb_tweet { + background-position: -42px; +} + +.header-content #sb_youtb { + background-position: -71px; +} + +.header-content #social-icons a:focus, +.header-content #social-icons a:hover { + opacity: 1; + filter: alpha(opacity=100); +} + +/* end of Social Icons */ + +/**** disable html****/ +#barra-psocial { + position: relative; + height: 40px; + margin: -3px 0px 0px 0px; + border: none; + background-color:rgb(236,237,241); +} + +#barra-psocial li { + float: left; +} +/********** end disable html *************/ diff --git a/src/noosfero-spb/noosfero-spb-theme/css/home-page.css b/src/noosfero-spb/noosfero-spb-theme/css/home-page.css new file mode 100644 index 0000000..c6829e7 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/css/home-page.css @@ -0,0 +1,526 @@ +/*** boxes sizes definition **/ +.action-home-index .box-1 { + margin: 0px 0px 0px 210px; + width: 490px; +} + +.action-home-index .box-3 { + width: 230px; +} + +/*** end of boxes sizes definition **/ + +/*** Box's patterns ***/ + +.action-home-index .block-outer{ + margin-bottom: 45px; +} + +/* Read More pattern */ + +.action-home-index #content .box .block-outer .read-more{ + border-bottom: none; + background: #eee; + font: normal normal normal 10px 'open_sansregular', arial, helvetica, sans-serif; + text-transform: uppercase; + text-align: right; +} + +.action-home-index #content .box .block-outer .read-more a{ + padding: 8px; + line-height: 20px; + color: #000000; + display: block; +} + +.action-home-index #content .box .block-outer .read-more a:hover{ + background: #dedede; +} + +.action-home-index #content .box .block-outer .read-more a::after{ + margin-left: 7px; + border-radius: 4px; + padding: 0px 5px 0px 8px; + line-height: 20px; + color: #FFFFFF; + font: 14px 'open_sansbold', arial, helvetica, sans-serif; + text-align: center; + content: url('../images/right-arrow.png'); +} + + +/*** end of box patterns ***/ + +/******************** Box-1 ********************/ + +/*** Software catalog search block **/ + +.action-home-index #content #catalogo-software-search{ + width: 100%; + background-color: #1A397D; + border-radius: 4px; +} + +.action-home-index #content #catalogo-software-search h1{ + margin: 0px 15px 10px 15px; + border-bottom: none; + padding: 10px 0px 0px 0px; + line-height: 1.3em; + color: #FFFFFF; + font: normal normal normal 22px 'open_sansregular', arial; + text-align: left; +} + +.action-home-index #content #catalogo-software-search #search-Gadget{ + margin: 0px 15px 9px 15px; + border: none; + border-radius: 4px; + padding: 7px; + width: 90%; +} + +.action-home-index #content #catalogo-software-search .searchButton-catalog{ + cursor: pointer; + margin: 0px 0px 15px 15px; + padding: 6px 25px; + border: 1px solid #FFFFFF; + border-radius: 4px; + background-color: #1A397D; + color: #FFFFFF; + font-weight: bold; + font-size: 14px; + text-transform: uppercase; +} + +.action-home-index #content #catalogo-software-search #search-catalog-footer{ + border-top: 1px solid; + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + background-color: #192758; + color: #FFFFFF; +} + +.action-home-index #content #catalogo-software-search #search-catalog-footer p{ + margin: 0px; + font-size: 11px; + text-align: right; + text-transform: uppercase; +} + +.action-home-index #content #catalogo-software-search #search-catalog-footer a{ + padding: 7px 0px 12px 0px; + color: #FFF; + display: block; +} + +.action-home-index #content #catalogo-software-search #search-catalog-footer a:hover{ + background-color: #101A38; +} + +.action-home-index #content #catalogo-software-search #bt_catalog-search::after{ + margin: 0px 15px 0 5px; + border-radius: 4px; + padding: 0px 4px 0 7px; + top: 2px; + line-height: 20px; + background: #eee; + color: #172857; + font-size: 15px; + text-align: center; + position: relative; + content: url('../images/right-arrow-black.png'); +} + +/*** Softwares block **/ +.action-home-index #content .softwares-block{ + margin: 0px; + overflow: auto; +} + +.action-home-index #content .softwares-block .block-title{ + margin: 0px 0px 25px 0px; + border-top: 4px solid #2c66ce; + background: #eee; + color: #2c66ce; + font-weight: 300; +} + +.action-home-index #content .softwares-block .block-footer-content a{ + display:none; +} + +.action-home-index #content .software-block{ + width: 145px; + height: 218px; + margin: 0px 18px 14px 0px; +} + +.action-home-index #content .software-block .software-block-logo{ + border: 1px solid #ccc; + border-radius: 8px; + width: 140px; + height: 150px; + text-align: center; + overflow: hidden; + vertical-align: middle; + display: table-cell; +} + +.action-home-index #content .software-block .software-block-logo img{ + height: auto; + max-width: 90px; +} + +.action-home-index #content .software-block .software-block-info{ + height: 85px; + overflow: hidden; +} + +.action-home-index #content .software-block .software-block-title{ + height: 50px; + font-weight: 300; + font-size: 14px; + text-align: center; + overflow: hidden; +} + +.action-home-index #content .software-block .software-block-title h3{ + margin: 10px 0px 10px 0px; + color: #2C66CE; + font: normal normal 300 14px 'open_sansregular', arial, helvetica, sans-serif; +} + +.action-home-index #content .software-block-description{ + display: none; +} + +.action-home-index #content .software-block .software-block-finality, +.action-home-index #content .software-block .software-block-content{ + text-align: right; +} + +.action-home-index #content .software-block .software-block-finality{ + border: solid 1px #D7D7D7; + border-radius: 8px; + width:142px; + height: 216px; + left: 0px; + background-color: #f4f4f4; + text-transform: uppercase; +} + +.action-home-index #content .software-block .software-block-finality::after{ + margin: 0px 7px 0px 3px; + border-radius: 4px; + padding: 0 4px 0 7px; + line-height: 20px; + background: #2c65cd; + color: #FFF; + font-size: 15px; + text-align: center; + position: relative; + content: url('../images/right-arrow.png'); +} + +.action-home-index #content .software-block .software-block-finality p{ + margin: 0px 0px 7px 0px; + border-bottom: solid 1px #D7D7D7; + padding: 12px 12px 0px 12px; + height: 170px; + color: #172738; + font-size: 12px; + text-align: left; + text-transform: none; + overflow: hidden; +} + +/*** News block - display content block **/ + +.action-home-index #content .display-content-block .block-title{ + margin: 0px; + border-top: 4px solid #643C67; + background: #eee; + color: #643C67; + font-weight: 300; +} + +.action-home-index #content .display-content-block li{ + border-top: 1px solid #eee; + padding: 15px 0px 0px 0px; + min-height: 150px; +} + +.action-home-index #content .display-content-block li:first-child{ + border-top: 0px solid #eee; +} + +.action-home-index #content .display-content-block .published-at{ + padding: 0px 0px 15px 0px; + color: #643C67; +} + +.action-home-index #content .display-content-block .image{ + padding-right: 25px; + padding: 0px 25px 0px 0px; + border: 0px solid #c0c1c1; + width: 150px; + display: table-cell; +} + +.action-home-index #content .display-content-block .image a{ + border-radius: 8px; + height: 90px; + overflow: hidden; + display: block; +} + +.action-home-index #content .display-content-block .image img{ + border: 0px solid #c0c1c1; + max-width: 150px; +} + +.action-home-index #content .display-content-block .title{ + margin: 2px 0px 4px 0px; + padding-right: 0px; + max-height: 40px; + text-align: justify; + overflow: hidden; +} + +.action-home-index #content .display-content-block .title a{ + padding: 0px; + color: #172738; + font: normal normal bold 16px/1.3em arial, helvetica, sans-serif; +} + +.action-home-index #content .display-content-block .lead{ + max-height: 47px; + overflow: hidden; +} + +.action-home-index #content .display-content-block .lead a{ + color: #000000; + font: 15px/1.3em arial; +} + +.action-home-index #content .display-content-block .lead a:visited, +.action-home-index #content .lead a:visited, +.action-home-index #content .lead dl.portlet a:visited{ + color: #172738; +} + +.action-home-index #content .display-content-block .notice-info{ + display: table-cell; + vertical-align: top; +} + +.action-home-index #content .display-content-block .read_more{ + display: none; +} + +.action-home-index #content .display-content-block .read-more{ + border-top: 1px solid #643C67; +} + +.action-home-index #content .display-content-block .read-more a::after{ + background: #643C67; +} + +/******************** End Box-1 ********************/ + +/******************** Box-3 ********************/ + +/*** What Is block - Article block **/ + +.template-default .action-home-index #content .box-3 .article-block .block-title{ + border-top: 4px solid #08A649; + border-bottom: none; + padding: 6px 8px 22px 10px; + background: #eee; + color: #08A649; + font: normal normal 300 18px/1.3em 'open_sansregular', arial, helvetica, sans-serif; + text-align: left; + text-transform: none; +} + +.template-default .action-home-index #content .box-3 .article-block .read-more{ + margin-top: 30px; + border-top: 1px solid #08A649; +} + +.template-default .action-home-index #content .box-3 .article-block .read-more a::after{ + background: #08A649; +} + +.template-default .action-home-index #content .box-3 .article-block .short-post{ + padding-top: 23px; +} + +.template-default .action-home-index #content .box-3 .article-block p{ + margin: 0px 0px 14px 0px; + padding: 0px; + font: 15px/18px arial, helvetica, sans-serif; + text-align: left; + text-transform: none; +} + +/******* See As Well Block - Highlights block *******/ + +.action-home-index #content .highlights-block .block-title{ + display: none; +} + +.action-home-index #content .highlights-border{ + border: 1px solid #c0c1c1; + border-radius: 8px; + width: auto; + height: 248px; + max-height: 250px; + background-color: #e8e9ec; + background-image: linear-gradient( + 0deg, + transparent 45%, + #fff 55%); + background-size: 100% 100%; +} + +.action-home-index #content .highlights-container{ + border-radius: 8px; + border-width: 0px 0px 1px 0px; + border-bottom: none; + padding: 0; + width: 100% !important; + max-height: 230px; + background: transparent; + position: relative; + top: 0; +} + +.action-home-index #content .highlights-image-link{ + padding: 18px 0px 0px 0px; + border-radius: 0px 0px 8px 8px; + width: 220px; + max-height: 217px; + background-color: #fff; +} + +.action-home-index #content .highlights-image-link img{ + height: 100px; + max-width: 200px; +} + +.action-home-index #content .highlights-label{ + border-top: 4px solid #3b61a7; + padding: 23px 20px 46px 20px; + max-height: 60px; + width: 190px; + position: relative; + bottom: -18px; + background: #e8e9ec; + color: #172638; + text-align: center; + font: normal normal normal 16px/1.5em 'open_sansbold', arial, helvetica, sans-serif; + vertical-align: middle; +} + +.action-home-index #content .highlights-block-pager{ + float: none; + display: block; + text-align: center; +} + +.action-home-index #content .highlights-block-pager a{ + margin: 0 4px; + border-color: transparent; + border-radius: 50%; + height: 6px; + width: 6px; + background: #c0c1c1 center center no-repeat; + color: transparent; + text-indent: -5000px; + z-index: 1000; + overflow: hidden; + display: inline-block; +} + +.action-home-index #content .highlights-block-pager a.activeSlide{ + border-color: transparent; + background: #3e67b1; + color: transparent; +} + +/*** software highlights block ***/ + +.action-home-index #content a.toggle-popover, +.action-home-index #content a.toggle-popover:hover{ + margin: 0 0 0 55px; + color: #3867b7; + cursor: pointer; +} + +.action-home-index #content span.popover-span{ + padding: 1px 6px; + border-radius: 50%; + background-color: #3867b7; + color: #ffffff; + font-weight: bold; + cursor: pointer; +} + +/*** mais software block **/ +.action-home-index #content #mais-software-block{ + margin: 11px 0px; + border: 1px solid #c0c1c1; + border-radius: 8px; + padding: 5px 0px; + width: auto; + background-color: #eeeff1; + font: 14px arial; +} + +.action-home-index #content #mais-software-block #sbp-information-softwares h2{ + margin: 10px 0px 0px 0px; + padding: 0px 0px 17px 15px; + border-bottom: 1px solid #c0c1c1; + color: #454545; + font: normal normal normal 16px/21px 'open_sansbold', arial, helvetica, sans-serif; + text-align: left; + text-transform: uppercase; +} + +.action-home-index #content #mais-software-block #list-categories{ + margin: 14px 14px 14px 14px; +} + +.action-home-index #content #mais-software-block #list-categories p{ + margin: 0 0 16px 0; + color: #464A55; +} + +.action-home-index #content #mais-software-block #list-categories ul li{ + margin: 18px 5px 5px 5px; +} + +.action-home-index #content #mais-software-block #list-categories li a{ + color: #335277; + font-weight: bold; +} + +.action-home-index #content #mais-software-block #list-categories a:hover{ + text-decoration: none; +} + +.action-home-index #content #mais-software-block #footer-mais-software{ + margin: 0px; + border-top: 1px solid #c0c1c1; + padding: 10px 10px 0px 3px; + font-size: 11px; + text-align: right; + text-transform: uppercase; +} + +.action-home-index #content #mais-software-block #footer-mais-software a{ + color: #464A55; +} + +/******************** End Box-3 ********************/ diff --git a/src/noosfero-spb/noosfero-spb-theme/css/left-bar.css b/src/noosfero-spb/noosfero-spb-theme/css/left-bar.css new file mode 100644 index 0000000..873694e --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/css/left-bar.css @@ -0,0 +1,184 @@ +/******************** Box-2 ********************/ + +/*** WARNING - WITHOUT BOX-4 ***/ + +.template-leftbar .box-2, +.template-default .box-2 { + width:150px; +} + +.template-leftbar #content .box-2 .block-outer .block-title, +.template-default #content .box-2 .block-outer .block-title { + background: #eee; + color: #4562b1; + border-top: 4px solid #4562b1; + line-height: 15px; +} + +/*** Menus - Link list block ***/ + +.template-leftbar #content .box-2 .link-list-block li, +.template-default #content .box-2 .link-list-block li { + margin: 0; + padding: 0; + border-bottom: 1px solid #ddd; + border-top: none; +} + +.template-leftbar #content .box-2 .link-list-block li a, +.template-default #content .box-2 .link-list-block li a { + width: auto; + padding: 6px 5px 8px 18px; + background-color: #fff; + background-position: 0px 50%; + color: #2C66CE; + border-right: none; + border-top: 0px solid #64946E; + border-radius: 0 0 0 0; + font-weight: normal; + font-size: 14px; + line-height: 17px; +} + +.template-leftbar #content .box-2 .link-list-block h3.empty + ul, +.template-default #content .box-2 .link-list-block h3.empty + ul { + border-top: 1px solid #ddd; +} + +.template-leftbar #content .box-2 .link-list-block h3.empty + ul li a, +.template-default #content .box-2 .link-list-block h3.empty + ul li a { + padding-left: 0px; + padding-right: 0px; + background-image: none; +} + +.template-leftbar #content .box-2 .link-list-block li a.link-this-page, +.template-leftbar #content .box-2 .link-list-block li a.link-this-page:hover , +.template-default #content .box-2 .link-list-block li a.link-this-page, +.template-default #content .box-2 .link-list-block li a.link-this-page:hover { + border-right: none; +} + +.template-leftbar #content .box-2 .link-list-block li a:hover, +.template-default #content .box-2 .link-list-block li a:hover { + background-color: #FFFFFF; + color: #000; +} + +.template-leftbar #content .box-2 .link-list-block li a.link-this-page, +.template-default #content .box-2 .link-list-block li a.link-this-page { + width: auto; + margin-left: 0px; + background-color: #ffffff; + font-weight: bold; +} + +/*** END OF WARNING - WITHOUT BOX-4 ***/ + +/*** WARNING - WITH BOX-4 ***/ + +/************ DUPLICATE ************ + + This part of the code is duplicated because, if there is + a change of layout from template-default to lefttopright + the CSS fit without many complication. + + */ + +.template-lefttopright .box-3 { + width:150px; +} + +.template-lefttopright #content .box-3 .block-outer .block-title { + background: #eee; + color: #4562b1; + border-top: 4px solid #4562b1; + line-height: 15px; +} + +/*** Menus - Link list block ***/ + +.template-lefttopright #content .box-3 .link-list-block li { + margin: 0; + padding: 0; + border-bottom: 1px solid #ddd; + border-top: none; +} + +.template-lefttopright #content .box-3 .link-list-block li a { + width: auto; + padding: 6px 5px 8px 18px; + background-color: #fff; + background-position: 0px 50%; + color: #2C66CE; + border-right: none; + border-top: 0px solid #64946E; + border-radius: 0 0 0 0; + font-weight: normal; + font-size: 14px; + line-height: 17px; +} + +.template-lefttopright #content .box-3 .link-list-block h3.empty + ul { + border-top: 1px solid #ddd; +} + +.template-lefttopright #content .box-3 .link-list-block h3.empty + ul li a { + padding-left: 0px; + padding-right: 0px; + background-image: none; +} + +.template-lefttopright #content .box-3 .link-list-block li a.link-this-page, +.template-lefttopright #content .box-3 .link-list-block li a.link-this-page:hover { + border-right: none; +} + +.template-lefttopright #content .box-3 .link-list-block li a:hover { + background-color: #FFFFFF; + color: #000; +} +.template-lefttopright #content .box-3 .link-list-block li a.link-this-page { + width: auto; + margin-left: 0px; + background-color: #ffffff; + font-weight: bold; +} + +/************ END OF DUPLICATE ************ + +/*** END OF WARNING - WITH BOX-4 ***/ + +/*** Statistics block **/ +.template-default #content .box-2 .statistics-block { + padding: 10px 0px 10px 10px +} + +.statistics-block-data ul { + margin-top: 10px; +} + +.statistics-block-data ul li { + margin-left: 18px; + margin-top: 6px; + line-height: 17px; +} + +.statistics-block-data ul li.users span { + font-size: 14px; +} + +span.amount { + font-size: 14px; + font-weight: 700; +} + +span.label { + font-size: 14px; +} + +/*** end of statistics block **/ + +/*** WARNING - WITH BOX-4 ***/ + +/******************** end Box-2 ********************/ diff --git a/src/noosfero-spb/noosfero-spb-theme/css/main-content.css b/src/noosfero-spb/noosfero-spb-theme/css/main-content.css new file mode 100644 index 0000000..56307fb --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/css/main-content.css @@ -0,0 +1,174 @@ +/*** Box ***/ + +.no-boxes .block { + margin-top: 50px; +} + +#content .box-2 .block-outer .block, +#content .box-3 .block-outer .block{ + margin-bottom: 45px; + clear: both; +} + +/*** Block Title ***/ +#content .block-outer .block-title { + padding: 5px 8px 18px 7px; + margin: 0px 0px 2px 0px; + background: #eee; + border-bottom: none; + font-size: 12px; + font-family: "open_sansbold", Arial, Helvetica, sans-serif; + font-variant: normal; + text-transform: uppercase; + text-align: left; + font-weight: 300; +} + +#content .box-1 .block-title { + padding: 5px 8px 20px 10px; + font-size: 18px; + font-family: "open_sansregular", Arial, Helvetica, sans-serif; + text-transform: none; +} + +/*** Pagination ***/ + +#content .pagination { + margin: 48px auto 30px auto; + border-top: 0 none; + font-family: "open_sansregular", Arial, Helvetica, sans-serif; +} + +#content .pagination a, +#content .pagination em, +#content .pagination span{ + padding: 5px 9px; + margin-right: 4px; + color: #172738; + border: 1px solid #D3D6DE; + border-radius: 4px; + letter-spacing: 0.6px; + font-size: 12px; + font-weight: 700; + text-decoration: none; + display: inline-table; +} + +#content .pagination .current { + background-color: #ECEDF1; + font-style: normal; +} + +#content .pagination .previous_page{ + float: left; +} + +#content .pagination .next_page{ + float: right; +} + +#content .pagination .previous_page, +#content .pagination .next_page{ + width: auto; + position: relative; + background-image: none; + font-weight: 500; +} + +#content .pagination .disabled{ + opacity: 0.5; +} + +/*** Button ***/ + +#content .button-bar a.button, +#content .button-bar input { + margin: 0 10px 10px 0; +} + +#content a.button.with-text{ + height: 32px; + padding: 5px 15px; + background: #FFF none; + color: #3E67B1; + border-radius: 4px; + border: 1px solid #3E67B1; + font-size: 14px; + line-height: 32px; + text-transform: uppercase; +} + +#content #article-actions a.button.with-text{ + display: inline-block; + height: 18px; + padding: 5px 10px; + margin-bottom: 5px; + background: #FFF none; + color: #3E67B1; + border-radius: 4px; + border: 1px solid #3E67B1; + font-size: 12px; + line-height: 18px; + text-transform: none; +} + +#content #article-actions a.button.with-text span{ + padding: 0; +} + +.action-profile-members #content .button-bar a.button.with-text{ + height: auto; + border: 1px solid #D3D6DE; + font-size: 12px; + line-height: normal; + text-transform: none; +} +.action-profile-members #content .page-profile-header a.button.with-text{ + border:none; +} +.action-profile-members #content .button-bar a.button.with-text:hover{ + border-color: #3E67B1; +} + +#content form input.button.with-text{ + height: 42px; + max-height: 42px; + padding: 5px 15px; + background: #FFF none; + color: #3E67B1; + border-radius: 4px; + border: 1px solid #3E67B1; + font-size: 14px; + line-height: 32px; + text-transform: uppercase; +} + +#content a.button:hover, +#content #article-actions a.button.with-text:hover, +#content input.button.with-text:hover{ + background-color: #3E67B1; + color: #FFF; +} + +/* This is a temporary solution until noosfero deals with logged-out comments in a better manner. */ +.comment-replies .comment-logged-out .comment-text, +.comment-logged-out .comment-picture, +.comment-logged-out h4 { + opacity: 1.0; +} + +.comment-logged-out .comment-text, +.comment-info { + color: black; +} +/**/ + +/* Temporary solution to code block in tutorial page. */ +.article-body td { + background-color: white; +} + +.article-body td:hover { + background-color: white; +} +/* End of temporary solution to code block in tutorial page. */ diff --git a/src/noosfero-spb/noosfero-spb-theme/css/news-page.css b/src/noosfero-spb/noosfero-spb-theme/css/news-page.css new file mode 100644 index 0000000..26d9720 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/css/news-page.css @@ -0,0 +1,215 @@ +/*** News Page's homepage ***/ + +/** Header's Block **/ +.profile-name-is-spb #article #article-toolbar #article-header h1.title, +#content .blog #article-header h1.title{ + margin: 20px 0px 10px 0px; + padding: 0px 0px 10px 0px; + border-bottom: 1px solid #D3D6DE; + font: normal normal bold 35px/37px arial; +} + +/* WARNING: + * This solution is TEMPORARY. This informations shouldn't exist + * in this area. + * + * TODO: Remove this informations of the html and, then, from here. + */ + +#article-toolbar a.button.icon-feed.blog-feed-link { + display: none; +} + +/* WARNING: + * This solution is TEMPORARY. This informations shouldn't exist + * in this area. + * + * TODO: Remove this informations of the html and, then, from here. + */ +#content .blog #article-header .publishing-info .date, +#content .blog #article-header .publishing-info .author, +#content .blog #article-header .publishing-info .comments { + display: none; +} + + +/** General Properties of News **/ +#content .blog .article-body p { + margin: 0px 0px 5px 0px; + max-height: 25px; + color: #172738; + text-align: left; + text-overflow: ellipsis; + font: 14px/21px arial; + overflow: hidden; +} + +#content .blog .publishing-info { + display: inline; +} + +#content .blog .blog-post { + margin: 0 auto; + border-bottom: 1px solid #ccc; + padding: 25px 0px 0px 0px; + background: none; +} + +#content .blog .blog-post h1.title { + margin: 0px 0px 10px 0px; + padding: 0px 0px 0px 0px; + max-width: 555px; + max-height: 40px; + border: none; + font: normal normal bold 16px/20px arial; + overflow: hidden; + display: inline-block; +} + +#content .blog .blog-post h1.title a { + color: black; +} + +/* WARNING: + * This solution is TEMPORARY. This informations shouldn't exist + * in this area. + * + * TODO: Remove this informations of the html and, then, from here. + */ +#content .blog .blog-post .author { + display: none; +} + +#content .blog .blog-post .publishing-info { + border-top: none; + color: #172838; + font: 13px/21px arial; +} + +#content .blog .blog-post .publishing-info .date { + margin: 0px 0px 5px 0px; + display: block; +} + +#content .blog .blog-post .post-pic { + margin: 0px 20px 5px 0px; + border-radius: 4px; + height: 80px; + width: 20%; + background: center/cover no-repeat; + float: left; +} + +#content .blog .blog-post .short-post { + max-height: 35px; + text-align: justify; + text-overflow: ellipsis; + overflow: hidden; +} + +/* WARNING: + * This solution is TEMPORARY. This informations shouldn't exist + * in this area. + * + * TODO: Remove this informations of the html and, then, from here. + * The correct is the text is sensitive to lead to the complete text. + */ +#content .blog .blog-post .read-more { + display: none; +} + +#content .blog #article-actions:last-child { + border-top: none; +} +/** end of General Properties of News **/ + + +/** Main News' Block **/ +#content .blog .page-1 .position-1 { + padding: 0px 0px 0px 0px; +} + +#content .blog .page-1 .position-1 .title a { + line-height: 37px; + color: #172738 !important; + font-size: 34px; +} + +#content .blog .page-1 .position-1 .post-pic { + margin: 0px 0px 13px 0px; + max-height: 320px; + height: 320px; + width: 100%; +} + +#content .blog .page-1 .position-1 .short-post { + max-height: 50px; +} + + +/** Secondary News' Block **/ +#content .blog .page-1 .position-2, +#content .blog .page-1 .position-3, +#content .blog .page-1 .position-4 { + margin: 0px 0px 0px 0px; + padding: 20px 21px 45px 0px; + height: 235px; + width: 30.5%; + display: block; + float: left; +} + +#content .blog .page-1 .position-2 p, +#content .blog .page-1 .position-3 p, +#content .blog .page-1 .position-4 p { + max-height: 45px; +} + +#content .blog .page-1 .position-4 { + margin: 0px; + padding-right: 0px; +} + +#content .blog .page-1 .position-2 .post-pic, +#content .blog .page-1 .position-3 .post-pic, +#content .blog .page-1 .position-4 .post-pic { + margin-top: 12px; + top: 10px; + height: 120px; + width: 100%; +} + +#content .blog .page-1 .position-4 .post-pic { + margin-right: 0px; +} + +#content .blog .page-1 .position-2 .short-post, +#content .blog .page-1 .position-3 .short-post, +#content .blog .page-1 .position-4 .short-post { + max-height: 50px; + color: #172738; + text-align: justify; + text-overflow: ellipsis; + overflow: hidden; +} + + + +/** Lastest News' Block ***/ + +/* This rule serves to maintain the element in position-5 clear the + * configurations of float. + */ +#content .blog .blog-post.position-5 { + clear: both; +} + +/** Pagination **/ + +#content #article .pagination .next_page{ + position: relative; + +} + + +/*** end of News Page's homepage ***/ diff --git a/src/noosfero-spb/noosfero-spb-theme/css/overwriting-base-theme.css b/src/noosfero-spb/noosfero-spb-theme/css/overwriting-base-theme.css new file mode 100644 index 0000000..8b3903a --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/css/overwriting-base-theme.css @@ -0,0 +1,204 @@ +/************overwriting themes/base/style.css****************/ +#wrap-1, #theme-footer { + margin: auto; + width: 100%; +} + +#wrap-2 { + width: 960px; + margin: 0 auto; + border: none; + padding: 0px; +} + +#main { + background: #fff; + font-size: 1.3em; + padding: 1em 0; + max-width: 960px; + margin: 0 auto; +} + +#wrapper { + margin: 0 auto; + font-size: 1.2em; + width: 100%; +} + +.main-content { + border-style: none; + box-shadow: none; + padding: 10px 20px; +} + +.profile-image-block .admin-link { + font-size: 100%; +} + +/* ==> blocks.css <== */ + +.block a { + color: #555753; +} +.block a:visited { + color: #888a85; + font-weight: normal; +} +.block a:hover { + color: #2e3436; + text-decoration: none; +} + +/* Title Header */ +#content .main-block h1, +#content .main-block h2, +#content .main-block h3, +#content .main-block h4 { + font-family: Arial, Helvetica, sans-serif; +} + +#content .main-block h1, +#not-found h1, +#access-denied h1, +#content .no-boxes h1 { + margin: 20px 0 10px 0; + padding: 0; + color: #172738; + border-bottom: none; + font-family: Arial; + font-size: 34px; + font-weight: bold; + font-variant: normal; + line-height: 37px; +} + +#content .title { + font-weight: normal; + padding-right: 70px; +} + +#content .main-block h3 { + font-size:18px; + line-height: 21px; +} + +/****************************************/ + +/*recent documents - everywhere on site*/ +#content .recent-documents-block ul { + margin-left: 0; + padding: 0; +} + +#content .recent-documents-block li { + background: none repeat scroll 0 0 #eeeff2; + border-bottom: 1px solid #c0c1c1; + display: block; + margin: 0; + min-height: 1em; + padding: 20px; + text-align: left; +} + +#content .recent-documents-block li a { + color: #464A55; + line-height: 1.2em; +} +#content .recent-documents-block li a:hover{ + color: #000; +} + +#content .recent-documents-block .block-title { + border-bottom: 1px solid #757575; + margin-bottom: 0; +} + + +#site-title { + position: absolute; + left: 8px; + top: -160px; + height: 78px; + width: 480px; + display: none; +} + +#content { + left: -480px; + margin-left: 50%; + margin-top: 38px; + position: relative; + width: 960px; +} + + +input.button.with-text { + background-position: 3px 50%; + font-size: 12px; + padding: 0 2px 2px 20px; + max-height: 28px; +} + +#content a.button.with-text, +#content a.button.with-text { + height: 28px; + max-height: 28px; +} +#content input.button, #content a.button { + background-color: #EEEEEE; + background-repeat: no-repeat; + border: 0px solid #CCCCCC; + color: #555555; + line-height: 16px; + text-decoration: none; +} + +#content #article-actions input.button, +#content #article-actions a.button, +#content a.button, +#content input.button { + background-color: transparent; + border: 1px solid #CCCCCC; + vertical-align: middle; +} + +#content a.button.with-text { + line-height: 28px; + height: 30px; + max-height: 30px; +} + +#content form input.button.submit { + height: 32px; + max-height: 32px; + margin-right: 5px; +} +#content #article-actions input.button:hover, +#content #article-actions a.button:hover { + background-color: #ccc; + border: 1px solid #CCCCCC; + color: white; +} + +#content a.button:hover { + border: 1px solid #CCCCCC; +} + +/*label of search's radio buttons*/ +#content .search-field label { + display: inline-block; + font-size: 12px; + vertical-align: middle; + margin-left: 5px; +} + +#public-profile-search .formfield, #public-profile-search .submit { + margin-bottom: 5px; +} + +#content .profile ul{ + margin-left: 1em; +} + +/*********************end of overwritting themes/base/style.css*********************************/ + diff --git a/src/noosfero-spb/noosfero-spb-theme/css/popover.css b/src/noosfero-spb/noosfero-spb-theme/css/popover.css new file mode 100644 index 0000000..905383b --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/css/popover.css @@ -0,0 +1,191 @@ +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1060; + display: none; + max-width: 276px; + padding: 1px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + font-style: normal; + font-weight: normal; + line-height: 1.42857143; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + word-spacing: normal; + word-wrap: normal; + white-space: normal; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, .2); + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2); + box-shadow: 0 5px 10px rgba(0, 0, 0, .2); + + line-break: auto; +} +.popover.top { + margin-top: -12px; +} +.popover.right { + margin-left: 10px; +} +.popover.bottom { + margin-top: 10px; +} +.popover.left { + margin-left: -10px; +} +.popover-title { + padding: 8px 14px; + margin: 0; + font-size: 14px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + border-radius: 5px 5px 0 0; +} +.popover-content { + padding: 9px 14px; +} +.popover > .arrow, +.popover > .arrow:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.popover > .arrow { + border-width: 11px; +} +.popover > .arrow:after { + content: ""; + border-width: 10px; +} +.popover.top > .arrow { + bottom: -11px; + left: 50%; + margin-left: -11px; + border-top-color: #999; + border-top-color: rgba(0, 0, 0, .25); + border-bottom-width: 0; +} +.popover.top > .arrow:after { + bottom: 1px; + margin-left: -10px; + content: " "; + border-top-color: #fff; + border-bottom-width: 0; +} +.popover.right > .arrow { + top: 50%; + left: -11px; + margin-top: -11px; + border-right-color: #999; + border-right-color: rgba(0, 0, 0, .25); + border-left-width: 0; +} +.popover.right > .arrow:after { + bottom: -10px; + left: 1px; + content: " "; + border-right-color: #fff; + border-left-width: 0; +} +.popover.bottom > .arrow { + top: -11px; + left: 50%; + margin-left: -11px; + border-top-width: 0; + border-bottom-color: #999; + border-bottom-color: rgba(0, 0, 0, .25); +} +.popover.bottom > .arrow:after { + top: 1px; + margin-left: -10px; + content: " "; + border-top-width: 0; + border-bottom-color: #fff; +} +.popover.left > .arrow { + top: 50%; + right: -11px; + margin-top: -11px; + border-right-width: 0; + border-left-color: #999; + border-left-color: rgba(0, 0, 0, .25); +} +.popover.left > .arrow:after { + right: 1px; + bottom: -10px; + content: " "; + border-right-width: 0; + border-left-color: #fff; +} + +/*** popover in software highlights block ***/ + +.highlights-popover { + max-width: 280px; + margin: 0 0 0 -75px; + background: #172638; + color: #FFFFFF; +} + +.highlights-popover .popover-content { + padding: 0; +} + +.highlights-popover p { + padding: 13px 13px 15px; + margin: 0px; + font-size: 14px; + line-height: 20px; +} + +.highlights-popover span { + font-weight: bold; + border-bottom: 1px dotted #FFFFFF; +} + +#content .highlights-popover a, +#content .highlights-popover a:visited, +#content .highlights-popover a:hover, +#content .highlights-popover a:link { + font-weight: bold; + color: #FFFFFF; + display: block; + padding: 8px 15px; + border-top: 1px dotted rgba(255,255,255,0.1); +} + +.highlights-popover a:before { + font-family: "FontAwesome"; + content: "\f067"; + vertical-align: middle; + color: #ff0066; + padding: 0 5px 0 0; +} + +.highlights-popover.top > .arrow, +.highlights-popover.right > .arrow, +.highlights-popover.bottom > .arrow, +.highlights-popover.left > .arrow { + margin-left: 64px; +} + +.highlights-popover.top > .arrow:after, +.highlights-popover.right > .arrow:after, +.highlights-popover.bottom > .arrow:after, +.highlights-popover.left > .arrow:after { + border-top-color: #172638; +} diff --git a/src/noosfero-spb/noosfero-spb-theme/css/search-pages.css b/src/noosfero-spb/noosfero-spb-theme/css/search-pages.css new file mode 100644 index 0000000..fb05e26 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/css/search-pages.css @@ -0,0 +1,115 @@ +/*** Search Community ***/ + +.action-search-index #content form #search-header, +.action-search-people #content form #search-header, +.action-search-communities #content form #search-header{ + margin-top: 5px; + float: right; + border: none; +} + +.action-search-people #content form #search-header #search-filters .sod_select, +.action-search-communities #content form #search-header #search-filters .sod_select{ + color: #3E67B1; + border: 1px solid #3E67B1; + border-radius: 4px; + font-family: Arial; + font-variant: normal; + font-weight: 300; + box-shadow: none; +} + +.action-search-people #content form #search-header #search-filters .sod_select .sod_list, +.action-search-communities #content form #search-header #search-filters .sod_select .sod_list{ + margin: -2px 0 0 -1px; + color: #3E67B1; + border: 1px solid #3E67B1; + border-top: none; + border-radius: 0px 0px 4px 4px; + font-family: Arial; + font-variant: normal; + font-weight: 300; +} + +.action-search-people #content form #search-header #search-filters .sod_select .sod_list .active, +.action-search-communities #content form #search-header #search-filters .sod_select .sod_list .active{ + border-radius: 0px 0px 4px 4px; +} + +.action-search-people #content form #search-header #search-filters .sod_select .sod_list .selected, +.action-search-communities #content form #search-header #search-filters .sod_select .sod_list .selected{ + padding-right: 21px; +} + +.action-search-people #content form #search-subheader .sod_select, +.action-search-communities #content form #search-subheader .sod_select{ + line-height: 15px; +} + +.action-search-index #content form .search-field, +.action-search-people #content form .search-field, +.action-search-communities #content form .search-field{ + margin-bottom: 30px; +} + +.action-search-index #content form .search-field .formfield, +.action-search-people #content form .search-field .formfield, +.action-search-communities #content form .search-field .formfield{ + float: left; + width: 99%; +} +.action-search-index #content form .search-field .formfield input, +.action-search-people #content form .search-field .formfield input, +.action-search-communities #content form .search-field .formfield input{ + margin-top: 0px; + padding: 6px; + height: 19px; + max-height: 19px; + max-width: 98%; + background: none; + border: 1px solid #ccc; + border-radius: 4px; +} + +.action-search-index #content form input.button.submit, +.action-search-people #content form input.button.submit, +.action-search-communities #content form input.button.submit{ + height: 32px; + margin-top: 8px; + padding: 5px 15px; + background: #3E67B1 none; + color: #FFF; + border-radius: 4px; + border: 1px solid #3E67B1; + font-size: 14px; + line-height: 14px; + text-transform: uppercase; +} + +.action-search-index #content form input.button.submit:hover, +.action-search-people #content form input.button.submit:hover, +.action-search-communities #content form input.button.submit:hover{ + background: #5E82C6; +} + +.action-search-people #search-results .search-results-type-people, +.action-search-communities #search-results .search-results-type-community{ + background: none; + border: 1px solid #ccc; + border-radius: 10px; +} + +.action-search-index #search-results h3{ + margin: 20px 0 10px 0; + color: #172738; + font-size:18px; + line-height: 21px; + font-family: Arial; + font-weight: 700; + font-variant: normal; +} + +.action-search-index #search-results .search-results-innerbox{ + background: none; + border: 1px solid #ccc; +} diff --git a/src/noosfero-spb/noosfero-spb-theme/css/software-catalog-page.css b/src/noosfero-spb/noosfero-spb-theme/css/software-catalog-page.css new file mode 100644 index 0000000..2b32cd0 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/css/software-catalog-page.css @@ -0,0 +1,426 @@ +/*** Title and subtitle ***/ + +.action-search-software_infos #content { + margin-top: 10px; + padding: 0px; +} + +.action-search-software_infos .main-content { + border: none; + box-shadow: none; +} + +.action-search-software_infos #content .main-content h2{ + color: #FF0366; + font-size: 16px; + font-family: "open_sansregular",Arial, Helvetica,sans-serif; + font-weight: 300; + text-transform: uppercase; +} + +.action-search-software_infos #content .main-content h1{ + padding: 5px 0 10px 0; + border-bottom: 1px solid #D3D6DE; + font-family: Arial, Helvetica, sans-serif; + font-size: 35px; + font-variant: normal; +} + +/*** end of title and subtitle ***/ + +/*** Search Box ***/ +.action-search-software_infos .search-form { + margin-top:28px; + padding: 0; + background: #ecedf1; + border-radius: 4px; + border: 1px solid #D3D6DE; + background-image:url("catalogo.png"); +} + +.action-search-software_infos #software-search-container .search-form h3{ + margin: 0px 0px 3px 0px; + padding: 16px 0 20px 14px; + color: #2C4B6B; + font-family:"open_sansregular", Arial, Helvetica, sans-serif; + color: #2B51A8; + font-weight: bold; + font-size: 15px; + text-transform: uppercase; +} + +/*.action-search-software_infos #content .search-form .project-software { + margin: 0 0 0 15px; +} + + It's TEMPORARY +.action-search-software_infos #content .search-form .doubts-catalog-software { + display: none; +}*/ + +/**Radio Buttons***/ +.action-search-software_infos #public_software_radio_button, +.action-search-software_infos #all_radio_button { + margin:5px 4px 15px 15px; + line-height: 20px; + position:absolute; +} +.action-search-software_infos .search-form label, +.action-search-software_infos .search-form label{ + margin:0px 3px 4px 32px; + line-height: 22px; + font-size: 15px; + font-family: Arial; +} + +.action-search-software_infos #software-search-container .search-form .doubts-catalog-software{ + border:1px solid #3E67B1; + border-radius:50%; + padding:0px 3px; + font-size: 14px; + font-weight: 900; + background:#3E67B1; + color:#fff; + font-family: Arial; + cursor: pointer; +} +/******/ + +.action-search-software_infos #content .search-form .search-field .formfield { + width: 100%; + margin: 0; + padding: 0; +} + +.action-search-software_infos #content .search-form .search-field #search-input { + width: 96%; + margin: 13px 0px 4px 13px; + padding: 7px; + background: #FFF; + border-radius: 4px; + border: 1px solid #D3D6DE; + font-size: 14px; +} + + +.action-search-software_infos #content .search-form .search-field input.button{ + padding: 0px; + background-color: #3E67B1; + color: #FFF; + border: 1px solid #3E67B1; + font-family: "open_sansbold",Arial,sans-serif; + border-radius: 4px; +} + +.action-search-software_infos #content .search-form .search-field input.button.submit { + width: auto; + height: 30px; + max-height: 30px; + margin: 14px; + padding: 0 14px 0 14px; + background: #3E67B1; + line-height: 14px; + border-radius: 4px; + color: #ffffff; + text-transform: uppercase; + font-family: "open_sansbold",Arial,sans-serif; + font-size: 14px; +} + +/* Filter options */ + +.action-search-software_infos #filter-catalog-software { + background-color: #D3D6DE; +} + +.action-search-software_infos #filter-option-catalog-software { + cursor: pointer; + padding: 14px; + background-color: #D3D6DE; + border: none; + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + font-size: 11px; + text-align: right; + text-transform: uppercase; +} + +.action-search-software_infos #filter-option-catalog-close { + padding: 7px 7px 17px 10px; + display: none; +} +.action-search-software_infos #filter-option-catalog-software:hover { + background-color: #c7c7c7; +} + +.action-search-software_infos #filter-option-catalog-software:after { + content: ""; + margin-left: 5px; + padding: 3px 10.5px; + background: url("../images/bottom-arrow.png") no-repeat center; + background-color: #3E67B1; + border-radius: 4px; +} + +.action-search-software_infos #filter-catalog-software #filter-categories-option { + border: none; + height: 0; + max-height: 620px; + position: relative; + overflow: hidden; + padding: 0 15px; +} + +.action-search-software_infos #filter-catalog-software #filter-categories-catalog h4 { + margin: 20px 0 10px 5px; + background: transparent; + color: black; +} + +.action-search-software_infos #filter-catalog-software input[type="checkbox"]{ + vertical-align: middle; + margin: 0 3px 2px 8px; +} + +.action-search-software_infos #group-categories ul { + font-family: Arial; + font-size: 14px; + line-height: 31px; + columns: 2; + -webkit-columns: 2; + -moz-columns: 2; +} + +.action-search-software_infos #group-categories li span { + font-family: Arial; + font-size: 14px; +} + +.action-search-software_infos #filter-catalog-software .project-software{ + margin: 20px 0 30px; + border-top: 1px dotted; + border-bottom: 1px dotted; + font-weight: bold; + font-size: 15px; + font-family: Arial; + padding: 10px; +} + +.action-search-software_infos #filter-catalog-software .project-software label { + font-weight: normal; +} + +.action-search-software_infos #filter-catalog-software .project-software span { + padding: 2px 6px; + background: #FFF; + color: #3E67B1; + border-radius: 50%; + font-size: 16px; +} + +.action-search-software_infos button#cleanup-filter-catalg { + cursor: pointer; + background-color: #3E67B1; + font-size: 14px; + font-family: Arial; + color: #ffffff; + border: 1px solid #2B65CD; + border-radius: 4px; + margin: 5px 0 0 5px; + padding: 5px 10px; +} + +.action-search-software_infos button#close-filter-catalog { + cursor:pointer; + float: right; + border: none; + background: none; + font-size: 12px; + margin-top: 5px; + color: #000; + text-transform: uppercase; + padding: 5px; +} + +.action-search-software_infos button#close-filter-catalog:after { + content: ""; + margin-left: 5px; + padding: 2.5px 10.5px; + background: url("../images/top-arrow.png") no-repeat center; + background-color: #3E67B1; + border-radius: 4px; +} + +/*** end of search box ***/ + +/*** Catalog Options ***/ + +.action-search-software_infos #catalog-display-options { + font-size: 14px; + font-family: Arial; +} + +.action-search-software_infos #catalog-display-options #catalog-display-options-count{ + padding: 45px 0 4px 0; + float: left; + width: 50%; +} + +.action-search-software_infos #catalog-display-options #catalog-display-options-show-and-sort{ + padding: 38px 0 5px 0; + font-weight: bold; + float: left; + width: 50%; +} +.action-search-software_infos #catalog-display-options #catalog-display-options-sort, +.action-search-software_infos #catalog-display-options #catalog-display-options-show{ + position: relative; + float: left; + width: 50%; + text-align: right; +} + +/*** Search Results ***/ +.action-search-software_infos #search-results { + border-top: 1px solid #d7d7d7; +} + +.action-search-software_infos #search-results.only-one-result-box .search-software-item { + padding: 29px 0 31px 0; + background: #ffffff; + border-bottom: 1px solid #d7d7d7; +} + +.action-search-software_infos #search-results #search-results-empty{ + padding: 15px 0px; + color: #172738; + font-size: 16px; + text-align: left; +} + + +.action-search-software_infos #search-results .search-results-innerbox { + background: #ffffff; + border: none; +} + +/* Column left */ + +.action-search-software_infos #search-results .search-software-item-column-left{ + width: 130px; + height: 130px; + float: left; + border-right: 1px dotted #ccc; +} + +.action-search-software_infos #search-results .search-software-item-column-left .vcard { + display: table; + margin: 0; + border: none; +} + +.action-search-software_infos #search-results .search-software-item-column-left .vcard:hover { + border: none; + background: none; +} + +.action-search-software_infos #search-results .search-software-item-column-left .vcard a:hover{ + color: #3E67B1; +} + +.action-search-software_infos #search-results .search-software-item-column-left .vcard a.profile_link{ + float:left; +} + +.action-search-software_infos #search-results .search-software-item-column-left .vcard:hover .menu-submenu-trigger { + display:none; +} + +.action-search-software_infos #search-results .search-software-item-column-left .profile-image{ + width: 130px; + height: 130px; + margin-left: 130px; + margin-top: 35px; +} + +.action-search-software_infos #search-results .search-software-item-column-left .vcard img { + max-width: 90px; + max-height: 130px; + height: auto; + margin-left:170px; +} + +.action-search-software_infos #search-results .search-software-item-column-left .org { + display: none; +} + +.action-search-software_infos #search-results .search-software-item-column-left .extra_info { + width: 130px; + padding-right: 20px; + top: 0px; + position: absolute; + color: #2C4B6B; + font-size: 13px; + font-family: Arial; + text-align: left; + opacity: inherit; +} + +.action-search-software_infos #search-results .search-software-item-column-left .extra_info::before{ + content: url("../images/ic-calendar.png"); + margin-right: 10px; + margin-top: 6px; + float: left; +} + +/* Column Right */ + +.action-search-software_infos #search-results .search-software-item-column-right { + width: 70%; + float: left; + margin-left: 130px; + padding: 0 0 0 8px; + font-size: 15px; + font-family: Arial; +} + +.action-search-software_infos #search-results .search-software-item-column-right .search-software-content-block h4{ + margin-top: 0; +} + +.action-search-software_infos #search-results .search-software-item-column-right .search-software-content-block h4 a { + color: #172738; + font-size: 19px; +} + +.action-search-software_infos #search-results .search-software-item-column-right .search-software-content-block:last-child { + margin-top: 30px; +} + +.action-search-software_infos #search-results .search-software-item-column-right span{ + width: 100%; +} + +.action-search-software_infos #search-results .search-software-item-column-right span b{ + font-weight: normal; + font-size: 13px; +} + +.action-search-software_infos #search-results .search-software-item-column-right .search-software-content-block:last-child span{ + width: auto; + float: left; +} + +.action-search-software_infos #search-results .search-software-content-block #categories-list li{ + width: auto !important; /* force overwritting from base */ + margin-left: 7px !important; /* force overwritting from base */ + float: left; + color: #3E67B1; + font-size: 13px; + line-height: 18px; + text-decoration: underline; +} + +.action-search-software_infos #search-results .search-software-content-block #categories-list li a{ + color: #3E67B1; +} diff --git a/src/noosfero-spb/noosfero-spb-theme/css/software-pages.css b/src/noosfero-spb/noosfero-spb-theme/css/software-pages.css new file mode 100644 index 0000000..dd914a7 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/css/software-pages.css @@ -0,0 +1,623 @@ +/*** Software Header ***/ +/*block title software button control painel*/ +.action-content_viewer-view_page #content .software-information-block .admin-link a{ + padding: 5px 10px; + background: #3E67B1; + border-radius: 4px; + text-transform: none; + font-size: 12px; + margin-top:15px; + color:#fff; +} +.action-content_viewer-view_page #content .software-information-block .profile-big-image img{ + margin-bottom:20px; +} +/**************************/ + +#content .software-information-block { + margin: 0px 0px 60px 0px; +} + +#content #software-information-block-table { + margin: 0px 15px; + width: auto; +} + +#content #software-information-block-table td { + display: table-cell; +} + +#content #software-information-block-table #col-software-name { + vertical-align: top; + font-style: normal; +} + +#content #software-information-block-table #col-software-name h1 { + font: 700 34px/37px arial, open_sansbold, helvetica, sans-serif; + text-align: left; +} + +#content #software-information-block-table #col-software-name b { + font: normal normal normal 15px/21px arial, 'open_sansregular', helvetica, sans-serif; +} + +/*** end of Software Header ***/ + +/*** Software Homepage ***/ + +/* Software Download Block*/ + +#content .download-block { + margin: 0px 15px; + border: 1px solid #D3D6DE; + border-radius: 10px; +} + +#content .download-block .block-title { + padding: 11px 10px 7px 20px; + background-color: #D3D6DE; + border-top-left-radius: 8px; + border-top-right-radius: 8px; + font-family: "open_sansbold", Arial, Helvetica, sans-serif; + margin: 0; + color: #172738; + font-size: 18px; +} + +#content .download-block .download-list li { + padding: 30px 10px 25px 10px; + border-top: 1px solid #D3D6DE; + clear: both; +} + +#content .download-block .download-list li:nth-child(even) { + background: #ECEDF1; +} + +#content .download-block .download-button { + width: 80px; + float: left; + clear: both; +} + +#content .download-block .download-button .download-image { + padding: 50px 0px 8px 0px; + border: 1px solid #2c66ce; + border-radius: 8px; + height: 18px; + background: #2C66CE url("../images/download-icon.png") center no-repeat; + display: block; +} + +#content .download-block .download-button #download-size { + border: 1px solid #1a397d; + border-radius: 0px 0px 8px 8px; + background-color: #1a397d; + color: #ffffff; + font-size: 12px; + text-align: center; + display: none; +} + +#content .download-block .download-info { + margin: 5px 0px 0px 100px; + position: relative; + font-size: 16px; +} + +#content .download-block .download-info .download-name { + display: block; + font-weight: bold; +} + +#content .download-block .download-info .download-platform { + display: block; + font-size: 14px; +} + +#content .download-block .download-info .min-requirements { + font-size: 12px; +} + +#content .download-block .download-info .min-requirements a { + line-height: 40px; + color: #3E67B1; + text-decoration: underline; +} + +#content .download-block #licensed-software { + padding:14px; + border-top: 1px solid #D3D6DE; + border-radius: 0px 0px 8px 8px; + background-color: #D3D6DE; + font-size: 12px; + text-align: right; +} + +#content .download-block #licensed-software a { + color: #3e67b1; + text-decoration: underline; +} + +/* About Software - Article on homepage */ + +.profile-homepage #article #article-toolbar #article-header h1 { + margin: 0px 0px 10px 0px; + padding: 0px; + color: #172738; + font: normal normal bold 22px/1.3em arial, 'open_sansbold', helvetica, sans-serif; +} + +.profile-homepage #article #article-toolbar #article-header h1.title { + border: none; +} + +.profile-homepage #article #article-header .publishing-info { + display: none; +} + +.profile-homepage #article .article-body h1 { + border-top: 1px solid #ECEDF1; + border-bottom: none; + padding-top: 25px; +} + +.profile-homepage #article .article-body p { + margin: 0px 0px 20px 0px; + line-height: 21px; + text-align: left; + font-size: 15px; +} + +.profile-homepage #article .article-body hr { + display: none; +} + +.profile-homepage #article .article-body ul { + background-repeat: no-repeat; + list-style-position: inside; + list-style-type: disc; +} + +.profile-homepage #article .article-body ul li { + line-height: 21px; + text-align: left; + font-size: 15px; + list-style: inherit; +} + +/*** end of Software Homepage ***/ + +/*** Categories and Tags block ***/ + +#content .box-1 .categories-and-tags-block{ + border-top: 4px solid #2C4B6B; +} + +#content .box-1 .categories-and-tags-block .block-title{ + display: inline-flex; + margin: 13px 10px 10px 0; + padding: 3px 0px; + background: none; + color: #5E82C6; + font-family: Arial; + font-size: 12px; + font-weight: 300; +} + +#content .box-1 .categories-and-tags-block .category_cloud{ + display: inline-flex; + margin: 13px 0 10px 0; + max-width: 87%; +} + +#content .box-1 .categories-and-tags-block .category_cloud a{ + display: inline-block; + padding: 3px 10px; + margin: 5px; + color: #3E67B1; + background-color: #ECEDF1; + border: 1px solid #D3D6DE; + border-radius: 3px; + font-size: 12px; +} + +#content .box-1 .categories-and-tags-block .category_cloud a:hover{ + border-color: #3a70d1; + background: #3a70d1; + color: white; +} + +#content .box-1 .categories-and-tags-block .category_cloud a:link{ + text-decoration: none; +} + +/*** end of categories and tags block ***/ + +/*** Right bar ***/ + +/*** WARNING - WHITOUT BOX-4 ***/ + +/* Link-list block */ +.template-default #content .box-3 .block-title{ + border-top: 4px solid #4562b1; + line-height: 15px; + background: #eee; + color: #4562b1; +} + +.template-default #content .box-3 .link-list-block li{ + margin: 0px; + padding: 0px; + border-bottom: 1px solid #ddd; + border-top: none; +} + +.template-default #content .box-3 .link-list-block li a{ + border-right: none; + border-top: 0px solid #64946E; + border-radius: 0px 0px 0px 0px; + padding: 6px 5px 8px 18px; + width: auto; + line-height: 17px; + background-color: #fff; + background-position: 0px 50%; + color: #2C66CE; + font-weight: normal; + font-size: 14px; +} + +.template-default #content .box-3 .link-list-block h3.empty + ul{ + border-top: 1px solid #ddd; +} + +.template-default #content .box-3 .link-list-block li a.link-this-page, +.template-default #content .box-3 .link-list-block li a.link-this-page:hover{ + border-right: none; +} + +.template-default #content .box-3 .link-list-block li a:hover{ + background-color: #FFFFFF; + color: #000; +} + +.template-default #content .box-3 .link-list-block li a.link-this-page{ + margin-left: 0px; + width: auto; + background-color: #ffffff; + font-weight: bold; +} + +/* Repository and Wiki blocks */ + +.template-default #content .box-3 .wiki-block, +.template-default #content .box-3 .repository-block{ + padding: 0 0 0 10px; +} + +.template-default .box-3 #bt_wiki, +.template-default .box-3 #bt_repositorio { + border-radius: 4px; + padding: 12px 10px; + background: #EAEBEE; + color: #2C66CE; + font: normal normal bold 12px 'open_sansbold', arial, helvetica, sans-serif; + text-transform: uppercase; + display: block; + position: relative; +} + +.template-default .box-3 #bt_wiki:hover, +.template-default .box-3 #bt_repositorio:hover { + color:#172738; +} + +.template-default .box-3 #bt_wiki:after, +.template-default .box-3 #bt_repositorio:after{ + margin-top: -2px; + padding: 4px 0px 4px 2px; + border-radius: 4px; + width: 18px; + right: 10px; + line-height: 20px; + position: absolute; + background: #2C66CE; + color: #FFF; + font-size: 16px; + text-align: center; + content: url('../images/right-arrow.png'); +} + +.template-default .box-3 #content #bt_wiki:hover, +.template-default .box-3 #content #bt_repositorio:hover{ + color: #FFF; + background: #2C66CE; + text-decoration: none; +} +/*** END - WARNING - WHITOUT BOX-4 ***/ + +/*** end of right bar ***/ + +/************ DUPLICATE ************/ + +/* + This part of the code is duplicated because, if there is + a change of layout from template-default to lefttopright + the CSS fit without many complication. + */ + +/*** Right bar ***/ + +/*** WARNING - WITH BOX-4 ***/ + +/* Link-list block */ +.template-lefttopright #content .box-2 .block-title { + border-top: 4px solid #4562b1; + line-height: 15px; + background: #eee; + color: #4562b1; +} + +.template-lefttopright #content .box-2 .link-list-block li { + margin: 0px; + padding: 0px; + border-bottom: 1px solid #ddd; + border-top: none; +} + +.template-lefttopright #content .box-2 .link-list-block li a { + border-right: none; + border-top: 0px solid #64946E; + border-radius: 0px 0px 0px 0px; + padding: 6px 5px 8px 18px; + width: auto; + line-height: 17px; + background-color: #fff; + background-position: 0px 50%; + color: #2C66CE; + font-weight: normal; + font-size: 14px; +} + +.template-lefttopright #content .box-2 .link-list-block h3.empty + ul { + border-top: 1px solid #ddd; +} + +.template-lefttopright #content .box-2 .link-list-block li a.link-this-page, +.template-lefttopright #content .box-2 .link-list-block li a.link-this-page:hover { + border-right: none; +} + +.template-lefttopright #content .box-2 .link-list-block li a:hover { + background-color: #FFFFFF; + color: #000; +} + +.template-lefttopright #content .box-2 .link-list-block li a.link-this-page { + margin-left: 0px; + width: auto; + background-color: #ffffff; + font-weight: bold; +} + +/* Repository block */ + +.template-lefttopright #content .box-2 .wiki-block, +.template-lefttopright #content .box-2 .repository-block{ + padding: 0 0 0 10px; +} + +.template-lefttopright .box-2 #bt_wiki, +.template-lefttopright .box-2 #bt_repositorio { + border-radius: 4px; + padding: 12px 10px; + background: #EAEBEE; + color: #2C66CE; + font: normal normal bold 12px 'open_sansbold', arial, helvetica, sans-serif; + text-transform: uppercase; + display: block; + position: relative; +} + +.template-lefttopright .box-2 #bt_wiki:hover, +.template-lefttopright .box-2 #bt_repositorio:hover { + color:#172738; +} + +.template-lefttopright .box-2 #bt_wiki::after, +.template-lefttopright .box-2 #bt_repositorio::after{ + margin-top: -2px; + padding: 4px 0px 4px 2px; + border-radius: 4px; + width: 18px; + right: 10px; + line-height: 20px; + position: absolute; + background: #2C66CE; + color: #FFF; + font-size: 16px; + text-align: center; + content: url('../images/right-arrow.png'); +} + +.template-lefttopright .box-2 #content #bt_wiki:hover, +.template-lefttopright .box-2 #content #bt_repositorio:hover{ + color: #FFF; + background: #2C66CE; + text-decoration: none; +} + +/*** WARNING - WITH BOX-4 ***/ + +/* Metrics Block */ +.software-metrics-block { + font-family: Arial; + padding: 3px 0px 0px 10px; +} + +.software-metrics-block .metrics-list { + border-bottom: 1px dotted #D3D6DE; +} + +.software-metrics-block .metrics-list li { + display: table; + margin-bottom: 10px; +} + +.software-metrics-block .metrics-list li span, +.software-metrics-block .metrics-list li a { + display: table-cell; + vertical-align: top; +} + +#content .software-metrics-block .metrics-list li a:link { + color: #2c66ce; +} + +.software-metrics-block span.arrow-globe-icon { + background: url('../images/arrow-globe-icon.png') no-repeat center center; + width: 25px; + height: 18px; +} + +.software-metrics-block span.downloads-icon { + background: url('../images/downloads-icon.png') no-repeat center center; + width: 25px; + height: 18px; +} + +.software-metrics-block span.face-icon { + background: url('../images/beneficiados-icon.png') no-repeat center center; + width: 25px; + height: 20px; +} + +.software-metrics-block span.pig-safe-icon { + background: url('../images/economizados-icon.png') no-repeat center center; + width: 25px; + height: 20px; +} + +.software-metrics-block .metrics-list li a { + letter-spacing: -0.1px; + line-height: 20px; + padding-left: 5px; +} + +.software-metrics-block .admin-estimation { + font-size: 11px; + line-height: 15px; + margin-top: 7px; + margin-left: 4px; +} + +.software-metrics-block .metrics-list .saved-money { + font-size: 14px; +} + +/*** end of right bar ***/ + +/************ END DUPLICATE ************/ + + +/*** Software internal pages ***/ + +/* FAQ page */ + +#content .main-block .article-body ul.etapas-publicacao { + margin-bottom: 20px; +} + +#content .main-block .article-body ul.etapas-publicacao li { + margin-bottom: 10px; + list-style: none; + list-style-position: inside; +} + +#content .main-block .article-body ul.etapas-publicacao li strong { + margin-right: 6px; + border-radius: 50%; + padding: 1px; + background: #333; + height: 24px; + width: 24px; + color: #fff; + text-align: center; + float: left; +} + +#content .main-block .article-body .etapas-publicacao-2 { + font-weight: bold; +} + +/* Tutorial page */ + +#content .main-block .article-body p strong { + font-size: 16px; +} + +#content .main-block .article-body .etapas-publicacao .etapas-publicacao-2 { + display: table-cell; +} + +#content .main-block .article-body .etapas-publicacao p { + margin: 0px 0 0 31px; +} + +/* Manual page */ + +#content .main-block #article .folder-content .item-info { + border-top: 1px solid #ccc; + padding: 30px 20px 32px 0px; +} + +#content .main-block #article .folder-content .folder-item:last-child .item-info { + border-bottom: 1px solid #ccc; +} + +#content .main-block #article .folder-content .item-icon { + margin: 2px 0px auto auto; + padding: 45px 40px 4px 10px; + border: 1px solid #2C66CE; + border-radius: 4px; + background: #2C66CE url("../images/download-mini_icon.png") center center no-repeat; + display: block; + float: left; +} + +#content .main-block #article .folder-content .item-icon a { + display: none; +} + + +#content .main-block #article .folder-content .item-description { + margin-left: 65px; + padding-left: 0px; +} + +#content .main-block #article .folder-content .item-description a { + color: #172938; + font-size: 18px; + font-family: Arial; + font-weight: 700; + word-wrap: break-word; +} + +/* It's a Specific rule to the Google Chrome. */ +@supports (-webkit-appearance:none) { + #content .main-block #article .folder-content .item-description a { + color: #172938; + font-size: 18px; + font-family: Arial; + font-weight: 700; + white-space: pre; + word-wrap: break-word; + } +} + +#content .main-block #article .folder-content .item-date { + margin-left: 65px; + padding-left: 0px; +} + +/*** end fo software internal pages ***/ diff --git a/src/noosfero-spb/noosfero-spb-theme/css/tooltip.css b/src/noosfero-spb/noosfero-spb-theme/css/tooltip.css new file mode 100644 index 0000000..cbd7534 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/css/tooltip.css @@ -0,0 +1,62 @@ +.tooltip { + position: absolute; + width: -moz-fit-content; + width: -webkit-fit-content; + width: fit-content; + max-width:280px; + padding: 15px 10px 15px 20px; + background: #172638; + color: white; + font-family: Arial, sans-serif; + font-size: 13px; + border-radius: 5px; + border: 0px !important; + z-index: 1070; + margin: -10px 0; +} + +.tooltip-bottom:after { + content: " "; + height: 0; + width: 0; + margin-left: -6px; + position: absolute; + bottom: 100%; + left: 50%; + border: solid transparent; + border-bottom-color: #172638; + border-width: 6px; +} + +.tooltip:after { + content: " "; + height: 0; + width: 0; + margin-left: -6px; + position: absolute; + top: 100%; + left: 50%; + border: solid transparent; + border-top-color: #172638; + border-width: 6px; +} + +/*Fix temporary - class="tooltip" send e-mail administrator community*/ + +.action-contact-new .tooltip{ + position:initial; + background:none; + color:#172537; + font-family: Arial, sans-serif; + max-width: 520px; + padding: 15px 20px; + margin: 20px 0 30px 0; + border: 1px dotted #ccc !important; + border-left: 5px solid #FF0366 !important; + line-height: 20px; +} + +.action-contact-new .tooltip:after{ + content:none; +} +/*************************************/ \ No newline at end of file diff --git a/src/noosfero-spb/noosfero-spb-theme/css/use-report.css b/src/noosfero-spb/noosfero-spb-theme/css/use-report.css new file mode 100644 index 0000000..9186e84 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/css/use-report.css @@ -0,0 +1,534 @@ +/*** Profile homepage ***/ + +/* Ratings Header */ +.profile-homepage #content .organization-average-rating-container { + margin-top: 21px; + overflow: auto; +} + +.profile-homepage #content .organization-average-rating-container .star-rate-text { + font-size: 14px; + letter-spacing: 0.2px; + margin-right: 5px; + padding: 4px 0px 0px 3px; +} + +.profile-homepage #content .organization-average-rating-container .star-container { + margin-top: 2px; +} + +.profile-homepage #content .organization-average-rating-container .rate-this-organization { + font-size: 14px; + text-decoration: underline; + margin: 4px 0px 0px 6px; + padding: 0px 0px 0px 15px; +} + +.profile-homepage #content .organization-average-rating-container .rate-this-organization a { + color: #2c66ce; +} + +.profile-homepage #content .organization-average-rating-container .star-container .medium-star-negative, +.profile-homepage #content .organization-average-rating-container .star-container .medium-star-positive { + margin-right: 3px; +} + +.profile-homepage #content .communities-ratings-block .button-bar a.button.with-text { + height: 32px; + padding: 0px 5px; + border: 1px solid #3E67B1; + font-family: 'open_sansbold'; + font-size: 14px; + line-height: 32px; + text-transform: uppercase; +} + +/* Use report list */ + +.profile-homepage #content .communities-ratings-block .ratings-title .block-title { + background: none; + border-bottom: 1px solid #D3D6DE; + border-top: none; + color: #172738; + font-size: 20px; + font-weight: 700; + letter-spacing: 1.8px; + margin-bottom: 0px; + padding: 0px 0px 12px 4px; +} + +.profile-homepage #content .communities-ratings-block .ratings-list .make-report-block { + margin-top: 0px; + padding-top: 32px; + background-repeat: no-repeat; + border-bottom: 1px solid #D3D6DE; + border-top: none; + font-family: Arial; +} + +#content #software-information-block-table { + width: 100%; +} + +#content #software-information-block-table h1 { + font-size: 34px; +} + +#content #software-information-block-table #col-profile-big-image { + padding-right: 0px; +} + +#content #software-information-block-table #col-software-name { + padding-left: 0px; +} + + +#content .organization-average-rating-container { + margin-top: 21px; + overflow: auto; +} + +#content .organization-average-rating-container .star-rate-text { + font-size: 14px; + letter-spacing: 0.2px; + margin-right: 5px; + padding: 4px 0px 0px 3px; +} + +#content .organization-average-rating-container .star-container { + margin-top: 2px; +} + +#content .organization-average-rating-container .rate-this-organization { + font-size: 14px; + text-decoration: underline; + margin: 4px 0px 0px 6px; + padding: 0px 0px 0px 15px; +} + +#content .organization-average-rating-container .star-container .medium-star-negative, +#content .organization-average-rating-container .star-container .medium-star-positive { + margin-right: 3px; +} + +/*** Internal Page ***/ + +#content .main-content .star-page-title, +#content .main-content .star-rate-data { + max-width: 560px; +} + +#content .main-content .star-page-title .title { + font-size: 34px; +} + +#content .main-content .star-rate-data { + border-bottom: 1px solid #D3D6DE; + border-top: 1px solid #D3D6DE; + color: #172738; + margin-top: 16px; + padding: 29px 0px 21px 0px; + overflow: visible; +} + +#content .main-content .star-rate-data .star-rate-form .star-rate-text, +#content .main-content .star-rate-data .star-rate-form .star-container { + display: inline; + float: left; +} + +#content .main-content .star-rate-data .star-rate-form .star-container { + width: inherit; + height: 30px; + padding-left: 6px; +} + +#content .main-content .star-rate-data .star-rate-form { + padding: 0 37px; + letter-spacing: 0.1px; + width: 100%; +} + +#content .main-content .star-rate-data .star-rate-form .star-rate-text { + font-size: 14px; + padding-top: 4px; +} + +#content .main-content .star-rate-data .star-profile-information { + padding-left: 15px; + width: 79px; +} + +#content .main-content .star-rate-data .star-profile-information .star-profile-image { + padding-top: 1px; +} + +#content .main-content .star-rate-data .star-profile-information .star-profile-image img { + border-radius: 4px; + height: 60px; + width: 60px; +} + +#content .main-content .star-rate-data .star-rate-form .star-container .star-positive { + background-image: url('../images/star-positive-big.png'); +} + +#content .main-content .star-rate-data .star-rate-form .star-container .star-negative { + background-image: url('../images/star-negative-big.png'); +} + +#content .main-content .star-rate-data .star-rate-form .star-container .star-positive, +#content .main-content .star-rate-data .star-rate-form .star-container .star-negative { + display: table-cell; + margin-right: 0px; + height: 30px; + width: 28px; +} + +#content .main-content .star-rate-data .star-rate-form .star-comment-container { + padding-top: 23px; +} + +#content .main-content .star-rate-data .star-rate-form .star-comment-container .formlabel { + letter-spacing: -0.2px; + margin-bottom: 2px; +} + +#content .main-content .star-rate-data .star-rate-form .star-comment-container #comments_body { + border-radius: 4px; + height: 91px; + background: none #FFFFFF; + border: 1px solid #DDDDDD; + color: #585858; + font-size: 16px; + width: 100%; + word-wrap: break-word; +} + +#content .main-content .star-rate-data .star-rate-form .star-comment-container .button-bar input { + background-color: #3E67B1; + font-weight: 700; + text-transform: uppercase; + color: #FFF; + padding: 5px; + height: 31px; + line-height: 20px; + font-family: Arial; +} + +#content .main-content .star-rate-data .star-rate-form .star-comment-container .button-bar a { + display: none; +} + +#content .main-content .star-rate-data .star-rate-form .star-comment-container .button-bar { + padding-bottom: 50px; +} + +#content .main-content .star-rate-data .star-rate-form .star-notice { + display: none; + float: left; + margin-top: 10px; + margin-left: 10px; +} + +#content .star-rate-form .star-comment-container .comments-software-extra-fields { + height: 0; + overflow: hidden; +} + +#content .star-rate-form .star-comment-container .comments-software-extra-fields #input_institution_comments { + margin-bottom: 19px; + margin-top: 16px; + height: 50px; +} + +#content .star-rate-form .star-comment-container .comments-software-extra-fields #input_institution_comments label { + font-size: 12px; +} + +#content .star-rate-form .star-comment-container .comments-software-extra-fields #input_institution_comments input { + display: block; + height: 19px; + width: 335px; + padding: 6px; + margin-top: 3px; + color: rgb(88, 88, 88); + border: 1px solid rgb(204, 204, 204); + border-image-source: initial; + border-image-slice: initial; + border-image-width: initial; + border-image-outset: initial; + border-image-repeat: initial; + border-radius: 4px; + font-size: 15px; + font-family: Arial, helvetica; +} + +#content .star-rate-form .star-comment-container .comments-software-extra-fields .comments-software-people-benefited, +#content .star-rate-form .star-comment-container .comments-software-extra-fields .comments-software-saved-values { + font-size: 12px; + float: left; + padding-right: 10px; + height: 50px; +} + +#content .star-rate-form .star-comment-container .comments-software-extra-fields .comments-software-saved-values { + padding-right: 0px; + height: 70px; +} + +#content .star-rate-form .star-comment-container form .formfieldline { + margin-bottom: 17px; +} + +#content .star-rate-form .star-comment-container .comments-display-fields { + border-bottom: 1px dotted #D3D6DE; + overflow: auto; +} + +#content .star-rate-form .star-comment-container .comments-display-fields:hover span, +#content .star-rate-form .star-comment-container .comments-display-fields:hover span:after { + opacity: 0.6; +} + +#content .star-rate-form .star-comment-container .comments-display-fields span#comments-additional-information { + color: #172738; + display: block; + float: left; + font-size: 14px; + font-weight: 700; + padding-bottom: 4px; +} + +.action-organization_ratings_plugin_profile-new_rating #content .star-rate-form .star-comment-container .comments-display-fields .comments-arrow-up::after { + content: url('../images/top-arrow-black.png'); + float: right; + padding-top: 7px; + padding-right: 6px; +} + +.action-organization_ratings_plugin_profile-new_rating #content .star-rate-form .star-comment-container .comments-display-fields .comments-arrow-down::after { + content: url('../images/bottom-arrow-black.png'); + float: right; + padding-top: 7px; + padding-right: 6px; +} + +#content .star-rate-form .star-comment-container .comments-software-extra-fields #organization_rating_people_benefited, +#content .star-rate-form .star-comment-container .comments-software-extra-fields #organization_rating_saved_value { + display: block; + height: 19px; + width: 155px; + margin-top: 4px; + padding: 6px; + border: 1px solid rgb(204, 204, 204); + border-image-source: initial; + border-image-slice: initial; + border-image-width: initial; + border-image-outset: initial; + border-image-repeat: initial; + border-radius: 4px; + font-size: 15px; + font-family: Arial, helvetica; + color: rgb(88, 88, 88); +} + +#content .star-rate-form .star-comment-container .star-tooltip { + cursor: default; + content: '?'; + border-radius: 90%; + font-size: 12px; + font-weight: 700; + background: #3867b7; + color: #fff; + margin-left: 4px; + padding: 0px 6px; +} + +.ratings-list { + color: #172738; + font-family: Arial, Helvetica, "open_sansregular", sans-serif; +} + +.ratings-list .user-rating-block { + border-bottom: 1px solid #D3D6DE; + border-top: none; + padding-bottom: 40px; + padding-top: 32px; + margin-top: 0px; +} + +.ratings-list .star-profile-information { + padding: 1px 30px 0px 14px; + width: 99px; +} + +.ratings-list .user-rating-block .star-profile-information .star-profile-name { + line-height: 16px; + width: 70px; +} + +.ratings-list .star-profile-information .star-profile-image img { + border-radius: 4px; + height: 60px; +} + +.ratings-list .user-rating-block .user-testimony-container { + width: 100%; +} + +.ratings-list .user-rating-block .user-testimony-container .star-container div { + display: inline; +} + +.ratings-list .user-rating-block .user-testimony-container .user-testimony { + font-size: 16px; + line-height: 20px; + margin-top: 31px; + min-height: 60px; +} + +.star-rate-data .star-rate-form .star-comment-container .formfield textarea { + width: 100%; +} + +.ratings-list .user-rating-block .user-testimony-container .testimony-rate-date { + display: block; + float: left; + padding-right: 0px; + width: 100px; +} + +.ratings-list .star-container { + display: block; + float: right; + width: auto; +} + +.ratings-list .star-container .small-star-positive, +.ratings-list .star-container .small-star-negative { + margin-right: 3px; +} + +.ratings-list .user-rating-block .user-testimony-container .testimony-rate-date { + display: block; + float: left; + margin-top: 2px; +} + +.ratings-list .user-rating-block .user-testimony-container .additional-informations { + margin-top: 10px; +} + +#content .ratings-title .block-title { + background: none; + border-bottom: 1px solid #D3D6DE; + border-top: none; + color: #172738; + font-size: 20px; + font-weight: 700; + letter-spacing: 1.8px; + margin-bottom: 0px; + padding: 0px 0px 12px 4px; +} + +.ratings-list .make-report-block { + background-repeat: no-repeat; + border-bottom: 1px solid #D3D6DE; + border-top: none; + margin-top: 0px; + padding-top: 32px; +} + +.make-report-block .star-profile-information { + padding-right: 13px; + padding-left: 0px; +} + +.make-report-block .star-profile-information .star-profile-name { + margin-top: 8px; + width: 70px; +} + +.ratings-list .make-report-block .make-report-container { + padding-top: 2px; +} + +.ratings-list .make-report-block .make-report-container .make-report-message { + font-family: Arial; + font-weight: 300; + font-size: 18px; +} + +.ratings-list .make-report-block .make-report-container .button-bar { + padding-top: 6px; +} + +.ratings-list .make-report-block .make-report-container .alert { + margin-top: 37px; + padding-left: 1px; +} + +.ratings-list .make-report-block .make-report-container .button-bar a, +.star-rate-data .rating-cooldown .button-bar a, +.star-rate-data .rating-vote-once .button-bar a { + background-color: #3E67B1; + background-image: none; + color: #fff; + font-weight: 700; + font-size: 14px; + font-style: normal; + height: 31px; + padding: 0px 7px 0px 7px; + text-transform: uppercase; +} + +.star-rate-data .rating-cooldown, +.star-rate-data .rating-vote-once { + font-family: Arial; + font-size: 18px; + font-style: italic; + word-break: break-word; +} + +.star-rate-data .rating-cooldown .button-bar a.disabled-button, +.star-rate-data .rating-vote-once .button-bar a.disabled-button { + cursor: not-allowed; + opacity: 0.4; +} + +.ratings-list .see-more { + border-top: none; +} + +.ratings-list a.icon-arrow-right-p { + background: none; + color: #172738; + font-family: 'open_sansregular'; + font-size: 11px; + float: none; + margin-top: 0px; + padding-right: 0px; + padding-top: 22px; + padding-bottom: 20px; + text-align: right; + text-transform: uppercase; +} + +.ratings-list a.icon-arrow-right-p::after { + background-color: #3E67B1; + border-radius: 4px; + content: url('../images/right-arrow.png'); + font-size: 15px; + line-height: 20px; + margin-left: 9px; + padding-left: 8px; + padding-right: 5px; + text-align: center; +} + +/*** Tooltip ***/ + +.comments-software-extra-fields .tooltip-inner { + display: block; +} diff --git a/src/noosfero-spb/noosfero-spb-theme/favicon.ico b/src/noosfero-spb/noosfero-spb-theme/favicon.ico new file mode 100644 index 0000000..f8c4036 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/favicon.ico differ diff --git a/src/noosfero-spb/noosfero-spb-theme/font-awesome.min.css b/src/noosfero-spb/noosfero-spb-theme/font-awesome.min.css new file mode 100644 index 0000000..ca0591c --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/font-awesome.min.css @@ -0,0 +1,4 @@ +/*! + * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:'FontAwesome';src:url('fonts/fontawesome-webfont.eot?v=4.3.0');src:url('fonts/fontawesome-webfont.eot?#iefix&v=4.3.0') format('embedded-opentype'),url('fonts/fontawesome-webfont.woff2?v=4.3.0') format('woff2'),url('fonts/fontawesome-webfont.woff?v=4.3.0') format('woff'),url('fonts/fontawesome-webfont.ttf?v=4.3.0') format('truetype'),url('fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;transform:translate(0, 0)}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-genderless:before,.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"} \ No newline at end of file diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/FontAwesome.otf b/src/noosfero-spb/noosfero-spb-theme/fonts/FontAwesome.otf new file mode 100644 index 0000000..f7936cc Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/fonts/FontAwesome.otf differ diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/fontawesome-webfont.eot b/src/noosfero-spb/noosfero-spb-theme/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000..33b2bb8 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/fonts/fontawesome-webfont.eot differ diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/fontawesome-webfont.svg b/src/noosfero-spb/noosfero-spb-theme/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000..1ee89d4 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/fonts/fontawesome-webfont.svg @@ -0,0 +1,565 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/fontawesome-webfont.ttf b/src/noosfero-spb/noosfero-spb-theme/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..ed9372f Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/fonts/fontawesome-webfont.ttf differ diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/fontawesome-webfont.woff b/src/noosfero-spb/noosfero-spb-theme/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..8b280b9 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/fonts/fontawesome-webfont.woff differ diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/fontawesome-webfont.woff2 b/src/noosfero-spb/noosfero-spb-theme/fonts/fontawesome-webfont.woff2 new file mode 100644 index 0000000..3311d58 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/fonts/fontawesome-webfont.woff2 differ diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-300-webfont.eot b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-300-webfont.eot new file mode 100755 index 0000000..abfdfa3 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-300-webfont.eot differ diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-300-webfont.svg b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-300-webfont.svg new file mode 100755 index 0000000..1fb17a5 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-300-webfont.svg @@ -0,0 +1,245 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-300-webfont.ttf b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-300-webfont.ttf new file mode 100755 index 0000000..c6d08b2 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-300-webfont.ttf differ diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-300-webfont.woff b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-300-webfont.woff new file mode 100755 index 0000000..b1020fd Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-300-webfont.woff differ diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-400-webfont.eot b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-400-webfont.eot new file mode 100755 index 0000000..58b80a7 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-400-webfont.eot differ diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-400-webfont.svg b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-400-webfont.svg new file mode 100755 index 0000000..b951665 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-400-webfont.svg @@ -0,0 +1,245 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-400-webfont.ttf b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-400-webfont.ttf new file mode 100755 index 0000000..78a9bf2 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-400-webfont.ttf differ diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-400-webfont.woff b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-400-webfont.woff new file mode 100755 index 0000000..4a54090 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-400-webfont.woff differ diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-600-webfont.eot b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-600-webfont.eot new file mode 100755 index 0000000..e99d282 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-600-webfont.eot differ diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-600-webfont.svg b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-600-webfont.svg new file mode 100755 index 0000000..6306b56 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-600-webfont.svg @@ -0,0 +1,245 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-600-webfont.ttf b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-600-webfont.ttf new file mode 100755 index 0000000..174bed4 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-600-webfont.ttf differ diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-600-webfont.woff b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-600-webfont.woff new file mode 100755 index 0000000..f24aeb4 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-600-webfont.woff differ diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-700-webfont.eot b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-700-webfont.eot new file mode 100755 index 0000000..dfbcb12 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-700-webfont.eot differ diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-700-webfont.svg b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-700-webfont.svg new file mode 100755 index 0000000..24c6ba3 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-700-webfont.svg @@ -0,0 +1,245 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-700-webfont.ttf b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-700-webfont.ttf new file mode 100755 index 0000000..5427c4d Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-700-webfont.ttf differ diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-700-webfont.woff b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-700-webfont.woff new file mode 100755 index 0000000..1a731f0 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-700-webfont.woff differ diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-800-webfont.eot b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-800-webfont.eot new file mode 100755 index 0000000..f687e2a Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-800-webfont.eot differ diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-800-webfont.svg b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-800-webfont.svg new file mode 100755 index 0000000..daf84f0 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-800-webfont.svg @@ -0,0 +1,245 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-800-webfont.ttf b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-800-webfont.ttf new file mode 100755 index 0000000..079934c Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-800-webfont.ttf differ diff --git a/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-800-webfont.woff b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-800-webfont.woff new file mode 100755 index 0000000..4a69fa6 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/fonts/opensans-800-webfont.woff differ diff --git a/src/noosfero-spb/noosfero-spb-theme/footer.html.erb b/src/noosfero-spb/noosfero-spb-theme/footer.html.erb new file mode 100644 index 0000000..8a7c49a --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/footer.html.erb @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + diff --git a/src/noosfero-spb/noosfero-spb-theme/header.html.erb b/src/noosfero-spb/noosfero-spb-theme/header.html.erb new file mode 100644 index 0000000..5c5a3cf --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/header.html.erb @@ -0,0 +1,97 @@ + + + + +
    + + +
    + <%= theme_include 'categories' %> +
    +
    diff --git a/src/noosfero-spb/noosfero-spb-theme/html-reference-resource/blog.html b/src/noosfero-spb/noosfero-spb-theme/html-reference-resource/blog.html new file mode 100644 index 0000000..b9d2d24 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/html-reference-resource/blog.html @@ -0,0 +1,86 @@ + +
    +
    +

    Blog

    +

    Desenvolvimento CACIC

    + +
    +
    +
    Hoje
    +
    Lorem ipsum dolor sit amlor sit amet, contur adipiscing elit
    +
    + +
    +
    Ambiente traz soluções que dispensam pagamentos de licença simples, de fácil utilização e com novas funcionalidades.
    +
    +
    +
    +
    +
    +
    Ontem
    +
    Lorem ipsum dolor sit amlor sit amet, contur adipiscing elit
    +
    Lorem ipsum dolor sit amlor sit amet, contur adipiscing elit.
    +
    +
    +
    +
    +
    +
    Ontem
    +
    Lorem ipsum dolor sit amlor sit amet, contur adipiscing elit
    +
    Lorem ipsum dolor sit amlor sit amet, contur adipiscing elit.
    +
    +
    +
    +
    +
    +
    Ontem
    +
    Lorem ipsum dolor sit amlor sit amet, contur adipiscing elit
    +
    Lorem ipsum dolor sit amlor sit amet, contur adipiscing elit.
    +
    +
    +
    + +
    + + + + + +
    +
    +
    + +
    +
    +

    CACIC - Configurador Automático e Coletor de Informações Computacionais

    +
    +
    +
    diff --git a/src/noosfero-spb/noosfero-spb-theme/html-reference-resource/event.html b/src/noosfero-spb/noosfero-spb-theme/html-reference-resource/event.html new file mode 100644 index 0000000..3f633b4 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/html-reference-resource/event.html @@ -0,0 +1,74 @@ + + + + +
    +

    Título do evento

    +
    + +
    +
    + +
    + 7 de fevereiro à 18 de março de 2015 + http://fga.unb.br/unb-gama/contato + + Área Especial de Indústria Projeção A + Gama - Setor Leste + Brasília + CEP: 72.444-240 + + +
    +
    + +
    +

    Morbi est est, blandit sit amet, sagittis vel, euismod vel, velit. Pellentesque egestas sem.

    +
    +

    Morbi in sem quis dui placerat ornare. Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu. Cras consequat.

    + +

    Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus.

    + +

    Phasellus ultrices nulla quis nibh. Quisque a lectus. Donec consectetuer ligula vulputate sem tristique cursus. Nam nulla quam, gravida non, commodo a, sodales sit amet, nisi.

    +
    +
    +
    + + +
    +
    + +
    +

    CACIC - Configurador Automático e Coletor de Informações Computacionais

    +
    +
    + +
    + + + + + + + + + + +
    Outros Eventos
    29/03 - Encontro dos colaboradores DF
    29/03 - Lançamento da versão 2.0
    +
    +
    \ No newline at end of file diff --git a/src/noosfero-spb/noosfero-spb-theme/html-reference-resource/list-item-initial-page.html b/src/noosfero-spb/noosfero-spb-theme/html-reference-resource/list-item-initial-page.html new file mode 100644 index 0000000..e2b8c0c --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/html-reference-resource/list-item-initial-page.html @@ -0,0 +1,21 @@ +
  • +
    Dezembro 11, 2014
    + +
  • \ No newline at end of file diff --git a/src/noosfero-spb/noosfero-spb-theme/images/503-logo.jpg b/src/noosfero-spb/noosfero-spb-theme/images/503-logo.jpg new file mode 100644 index 0000000..9abf016 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/503-logo.jpg differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/503-small.jpg b/src/noosfero-spb/noosfero-spb-theme/images/503-small.jpg new file mode 100644 index 0000000..c2c0efa Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/503-small.jpg differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/503.jpg b/src/noosfero-spb/noosfero-spb-theme/images/503.jpg new file mode 100644 index 0000000..5048c71 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/503.jpg differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/acesso-a-informacao.png b/src/noosfero-spb/noosfero-spb-theme/images/acesso-a-informacao.png new file mode 100644 index 0000000..fffec98 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/acesso-a-informacao.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/acesso-a-infornacao.png b/src/noosfero-spb/noosfero-spb-theme/images/acesso-a-infornacao.png new file mode 100644 index 0000000..fffec98 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/acesso-a-infornacao.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/alerta-cadastro16.jpg b/src/noosfero-spb/noosfero-spb-theme/images/alerta-cadastro16.jpg new file mode 100644 index 0000000..2ba5a10 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/alerta-cadastro16.jpg differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/arrow-globe-icon.png b/src/noosfero-spb/noosfero-spb-theme/images/arrow-globe-icon.png new file mode 100644 index 0000000..4446447 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/arrow-globe-icon.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/arrow_down.jpg b/src/noosfero-spb/noosfero-spb-theme/images/arrow_down.jpg new file mode 100644 index 0000000..ae93957 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/arrow_down.jpg differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/arrow_right.jpg b/src/noosfero-spb/noosfero-spb-theme/images/arrow_right.jpg new file mode 100644 index 0000000..c91c8d0 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/arrow_right.jpg differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/background_footer.png b/src/noosfero-spb/noosfero-spb-theme/images/background_footer.png new file mode 100644 index 0000000..2082c3e Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/background_footer.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/balao-amarelo.png b/src/noosfero-spb/noosfero-spb-theme/images/balao-amarelo.png new file mode 100644 index 0000000..a3adc03 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/balao-amarelo.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/balloon-icon.png b/src/noosfero-spb/noosfero-spb-theme/images/balloon-icon.png new file mode 100644 index 0000000..6974af1 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/balloon-icon.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/barra-menu-user-bg.png b/src/noosfero-spb/noosfero-spb-theme/images/barra-menu-user-bg.png new file mode 100644 index 0000000..08e7707 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/barra-menu-user-bg.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/barra-psocial-bg-contarste.png b/src/noosfero-spb/noosfero-spb-theme/images/barra-psocial-bg-contarste.png new file mode 100644 index 0000000..d533843 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/barra-psocial-bg-contarste.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/barra-psocial-bg.png b/src/noosfero-spb/noosfero-spb-theme/images/barra-psocial-bg.png new file mode 100644 index 0000000..c379867 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/barra-psocial-bg.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/barra-psocial.png b/src/noosfero-spb/noosfero-spb-theme/images/barra-psocial.png new file mode 100644 index 0000000..f2946eb Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/barra-psocial.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/beneficiados-icon.png b/src/noosfero-spb/noosfero-spb-theme/images/beneficiados-icon.png new file mode 100644 index 0000000..180191d Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/beneficiados-icon.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/bg-bloco-de-trilhas.png b/src/noosfero-spb/noosfero-spb-theme/images/bg-bloco-de-trilhas.png new file mode 100644 index 0000000..df72b20 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/bg-bloco-de-trilhas.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/bg-btn-ver-mais-1px.png b/src/noosfero-spb/noosfero-spb-theme/images/bg-btn-ver-mais-1px.png new file mode 100644 index 0000000..1ffab6a Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/bg-btn-ver-mais-1px.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/bg-fundo-verde-tags.png b/src/noosfero-spb/noosfero-spb-theme/images/bg-fundo-verde-tags.png new file mode 100644 index 0000000..82ca489 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/bg-fundo-verde-tags.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/bg-linhas-cinza.png b/src/noosfero-spb/noosfero-spb-theme/images/bg-linhas-cinza.png new file mode 100644 index 0000000..3dcb773 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/bg-linhas-cinza.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/bg-menu-mobile-panel.png b/src/noosfero-spb/noosfero-spb-theme/images/bg-menu-mobile-panel.png new file mode 100644 index 0000000..0a084bf Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/bg-menu-mobile-panel.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/bg-menu-mobile.png b/src/noosfero-spb/noosfero-spb-theme/images/bg-menu-mobile.png new file mode 100644 index 0000000..3b7954f Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/bg-menu-mobile.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/bg-paginacao-preto.png b/src/noosfero-spb/noosfero-spb-theme/images/bg-paginacao-preto.png new file mode 100644 index 0000000..5d8f15a Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/bg-paginacao-preto.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/bg-paginacao.png b/src/noosfero-spb/noosfero-spb-theme/images/bg-paginacao.png new file mode 100644 index 0000000..1362729 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/bg-paginacao.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/bg-palacio-do-planalto.jpg b/src/noosfero-spb/noosfero-spb-theme/images/bg-palacio-do-planalto.jpg new file mode 100644 index 0000000..7034432 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/bg-palacio-do-planalto.jpg differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/bg-titulo-interno.png b/src/noosfero-spb/noosfero-spb-theme/images/bg-titulo-interno.png new file mode 100644 index 0000000..b186658 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/bg-titulo-interno.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/bg-titulo-login.png b/src/noosfero-spb/noosfero-spb-theme/images/bg-titulo-login.png new file mode 100644 index 0000000..3672fa0 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/bg-titulo-login.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/bg_h1.gif b/src/noosfero-spb/noosfero-spb-theme/images/bg_h1.gif new file mode 100644 index 0000000..2f5414f Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/bg_h1.gif differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/bg_h3_busca.gif b/src/noosfero-spb/noosfero-spb-theme/images/bg_h3_busca.gif new file mode 100644 index 0000000..73faf7f Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/bg_h3_busca.gif differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/bg_tags.png b/src/noosfero-spb/noosfero-spb-theme/images/bg_tags.png new file mode 100644 index 0000000..2e30379 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/bg_tags.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/border-hor.png b/src/noosfero-spb/noosfero-spb-theme/images/border-hor.png new file mode 100644 index 0000000..8c1f185 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/border-hor.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/border-ver.png b/src/noosfero-spb/noosfero-spb-theme/images/border-ver.png new file mode 100644 index 0000000..037ebdb Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/border-ver.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/botao-enviar-pairwise.png b/src/noosfero-spb/noosfero-spb-theme/images/botao-enviar-pairwise.png new file mode 100644 index 0000000..9f5025b Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/botao-enviar-pairwise.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/bottom-arrow-black.png b/src/noosfero-spb/noosfero-spb-theme/images/bottom-arrow-black.png new file mode 100644 index 0000000..61b3730 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/bottom-arrow-black.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/bottom-arrow.png b/src/noosfero-spb/noosfero-spb-theme/images/bottom-arrow.png new file mode 100644 index 0000000..eb49326 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/bottom-arrow.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/brasil.png b/src/noosfero-spb/noosfero-spb-theme/images/brasil.png new file mode 100644 index 0000000..0ac6ed2 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/brasil.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/btn_busca.png b/src/noosfero-spb/noosfero-spb-theme/images/btn_busca.png new file mode 100644 index 0000000..5e3dd03 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/btn_busca.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/btn_cancelar_login.png b/src/noosfero-spb/noosfero-spb-theme/images/btn_cancelar_login.png new file mode 100644 index 0000000..b081e5e Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/btn_cancelar_login.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/btn_commit.png b/src/noosfero-spb/noosfero-spb-theme/images/btn_commit.png new file mode 100644 index 0000000..5e3dd03 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/btn_commit.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/btn_continue.png b/src/noosfero-spb/noosfero-spb-theme/images/btn_continue.png new file mode 100644 index 0000000..74445f1 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/btn_continue.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/btn_duvida_pairwise.png b/src/noosfero-spb/noosfero-spb-theme/images/btn_duvida_pairwise.png new file mode 100644 index 0000000..49f06ac Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/btn_duvida_pairwise.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/btn_duvida_pairwise_hover.png b/src/noosfero-spb/noosfero-spb-theme/images/btn_duvida_pairwise_hover.png new file mode 100644 index 0000000..666f105 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/btn_duvida_pairwise_hover.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/btn_entrar_login.png b/src/noosfero-spb/noosfero-spb-theme/images/btn_entrar_login.png new file mode 100644 index 0000000..7900127 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/btn_entrar_login.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/btn_entrar_login_hover.png b/src/noosfero-spb/noosfero-spb-theme/images/btn_entrar_login_hover.png new file mode 100644 index 0000000..e3bb0d7 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/btn_entrar_login_hover.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/bullet.png b/src/noosfero-spb/noosfero-spb-theme/images/bullet.png new file mode 100644 index 0000000..e5fb945 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/bullet.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/button-read-more-vazio-contraste.png b/src/noosfero-spb/noosfero-spb-theme/images/button-read-more-vazio-contraste.png new file mode 100755 index 0000000..0be02f4 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/button-read-more-vazio-contraste.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/button-read-more-vazio.png b/src/noosfero-spb/noosfero-spb-theme/images/button-read-more-vazio.png new file mode 100644 index 0000000..fe2488e Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/button-read-more-vazio.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/button-read-more2.png b/src/noosfero-spb/noosfero-spb-theme/images/button-read-more2.png new file mode 100644 index 0000000..6d0c0f0 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/button-read-more2.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/cabecalho_pairwise.png b/src/noosfero-spb/noosfero-spb-theme/images/cabecalho_pairwise.png new file mode 100755 index 0000000..6756212 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/cabecalho_pairwise.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/cadeado.png b/src/noosfero-spb/noosfero-spb-theme/images/cadeado.png new file mode 100644 index 0000000..f2e1c87 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/cadeado.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/calendar-icon.png b/src/noosfero-spb/noosfero-spb-theme/images/calendar-icon.png new file mode 100644 index 0000000..6ea0a2b Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/calendar-icon.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/carta-comentarios.png b/src/noosfero-spb/noosfero-spb-theme/images/carta-comentarios.png new file mode 100644 index 0000000..c72c4f2 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/carta-comentarios.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/chat-icon.png b/src/noosfero-spb/noosfero-spb-theme/images/chat-icon.png new file mode 100644 index 0000000..a79c397 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/chat-icon.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/coala.jpeg b/src/noosfero-spb/noosfero-spb-theme/images/coala.jpeg new file mode 100644 index 0000000..6e8eaac Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/coala.jpeg differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/comentarios.png b/src/noosfero-spb/noosfero-spb-theme/images/comentarios.png new file mode 100644 index 0000000..f1855a3 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/comentarios.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/comunidade-evento-imagem-evento.jpg b/src/noosfero-spb/noosfero-spb-theme/images/comunidade-evento-imagem-evento.jpg new file mode 100644 index 0000000..db178f2 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/comunidade-evento-imagem-evento.jpg differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/comunidade-evento-imagem-evento.png b/src/noosfero-spb/noosfero-spb-theme/images/comunidade-evento-imagem-evento.png new file mode 100644 index 0000000..838d29d Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/comunidade-evento-imagem-evento.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/docs-board-icon.png b/src/noosfero-spb/noosfero-spb-theme/images/docs-board-icon.png new file mode 100644 index 0000000..8f66ef5 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/docs-board-icon.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/download-icon.png b/src/noosfero-spb/noosfero-spb-theme/images/download-icon.png new file mode 100644 index 0000000..e47f2a3 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/download-icon.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/download-mini_icon.png b/src/noosfero-spb/noosfero-spb-theme/images/download-mini_icon.png new file mode 100644 index 0000000..eb1f5e0 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/download-mini_icon.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/downloads-icon.png b/src/noosfero-spb/noosfero-spb-theme/images/downloads-icon.png new file mode 100644 index 0000000..1973db5 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/downloads-icon.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/economizados-icon.png b/src/noosfero-spb/noosfero-spb-theme/images/economizados-icon.png new file mode 100644 index 0000000..75fa752 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/economizados-icon.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/em-destaque.png b/src/noosfero-spb/noosfero-spb-theme/images/em-destaque.png new file mode 100644 index 0000000..d729d35 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/em-destaque.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/enterprise-big.png b/src/noosfero-spb/noosfero-spb-theme/images/enterprise-big.png new file mode 100644 index 0000000..12746e8 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/enterprise-big.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/enterprise-icon.png b/src/noosfero-spb/noosfero-spb-theme/images/enterprise-icon.png new file mode 100644 index 0000000..8f31987 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/enterprise-icon.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/enterprise-minor.png b/src/noosfero-spb/noosfero-spb-theme/images/enterprise-minor.png new file mode 100644 index 0000000..4460368 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/enterprise-minor.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/enterprise-portrait.png b/src/noosfero-spb/noosfero-spb-theme/images/enterprise-portrait.png new file mode 100644 index 0000000..637515b Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/enterprise-portrait.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/enterprise-thumb.png b/src/noosfero-spb/noosfero-spb-theme/images/enterprise-thumb.png new file mode 100644 index 0000000..68f65e1 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/enterprise-thumb.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/facebook-widget.png b/src/noosfero-spb/noosfero-spb-theme/images/facebook-widget.png new file mode 100644 index 0000000..60fb8f8 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/facebook-widget.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/facebook.png b/src/noosfero-spb/noosfero-spb-theme/images/facebook.png new file mode 100644 index 0000000..5895cc6 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/facebook.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/favicon.ico b/src/noosfero-spb/noosfero-spb-theme/images/favicon.ico new file mode 100644 index 0000000..f8c4036 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/favicon.ico differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/flag-en.gif b/src/noosfero-spb/noosfero-spb-theme/images/flag-en.gif new file mode 100644 index 0000000..350aa05 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/flag-en.gif differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/flag-en.png b/src/noosfero-spb/noosfero-spb-theme/images/flag-en.png new file mode 100644 index 0000000..0f4fb95 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/flag-en.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/flag-es.gif b/src/noosfero-spb/noosfero-spb-theme/images/flag-es.gif new file mode 100644 index 0000000..b98c599 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/flag-es.gif differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/flag-pt_br.png b/src/noosfero-spb/noosfero-spb-theme/images/flag-pt_br.png new file mode 100644 index 0000000..f0e0221 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/flag-pt_br.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/flickr.png b/src/noosfero-spb/noosfero-spb-theme/images/flickr.png new file mode 100644 index 0000000..bc3aee7 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/flickr.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/fundo-de-tela-amarelo.png b/src/noosfero-spb/noosfero-spb-theme/images/fundo-de-tela-amarelo.png new file mode 100644 index 0000000..44ffb0d Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/fundo-de-tela-amarelo.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/globe-icon.png b/src/noosfero-spb/noosfero-spb-theme/images/globe-icon.png new file mode 100644 index 0000000..a15bbab Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/globe-icon.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/google_follow.png b/src/noosfero-spb/noosfero-spb-theme/images/google_follow.png new file mode 100644 index 0000000..385410f Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/google_follow.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/google_follow.svg b/src/noosfero-spb/noosfero-spb-theme/images/google_follow.svg new file mode 100644 index 0000000..bc1ee39 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/images/google_follow.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + diff --git a/src/noosfero-spb/noosfero-spb-theme/images/hdot2.gif b/src/noosfero-spb/noosfero-spb-theme/images/hdot2.gif new file mode 100644 index 0000000..b99f4ba Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/hdot2.gif differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/header.gif b/src/noosfero-spb/noosfero-spb-theme/images/header.gif new file mode 100644 index 0000000..9e231ba Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/header.gif differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/hub-arrow-right.png b/src/noosfero-spb/noosfero-spb-theme/images/hub-arrow-right.png new file mode 100644 index 0000000..6c65f4c Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/hub-arrow-right.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/hub-not-pinned-icon.png b/src/noosfero-spb/noosfero-spb-theme/images/hub-not-pinned-icon.png new file mode 100644 index 0000000..9b510c8 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/hub-not-pinned-icon.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/hub-not-promote-icon.png b/src/noosfero-spb/noosfero-spb-theme/images/hub-not-promote-icon.png new file mode 100644 index 0000000..4f57c4e Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/hub-not-promote-icon.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/hub-pinned-icon.png b/src/noosfero-spb/noosfero-spb-theme/images/hub-pinned-icon.png new file mode 100644 index 0000000..9b510c8 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/hub-pinned-icon.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/hub-promote-icon.png b/src/noosfero-spb/noosfero-spb-theme/images/hub-promote-icon.png new file mode 100644 index 0000000..4f57c4e Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/hub-promote-icon.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/hub-remove-icon.png b/src/noosfero-spb/noosfero-spb-theme/images/hub-remove-icon.png new file mode 100644 index 0000000..1246778 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/hub-remove-icon.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/hub-samarelo-a.png b/src/noosfero-spb/noosfero-spb-theme/images/hub-samarelo-a.png new file mode 100644 index 0000000..453d2a4 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/hub-samarelo-a.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/hub-samarelo-b.png b/src/noosfero-spb/noosfero-spb-theme/images/hub-samarelo-b.png new file mode 100644 index 0000000..936bf46 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/hub-samarelo-b.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/hub-samarelo.gif b/src/noosfero-spb/noosfero-spb-theme/images/hub-samarelo.gif new file mode 100644 index 0000000..2da3de2 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/hub-samarelo.gif differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/hub-sverde-a.png b/src/noosfero-spb/noosfero-spb-theme/images/hub-sverde-a.png new file mode 100644 index 0000000..5bc1c40 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/hub-sverde-a.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/hub-sverde-b.png b/src/noosfero-spb/noosfero-spb-theme/images/hub-sverde-b.png new file mode 100644 index 0000000..ee21942 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/hub-sverde-b.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/hub-svermelho-a.png b/src/noosfero-spb/noosfero-spb-theme/images/hub-svermelho-a.png new file mode 100644 index 0000000..36d4dfc Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/hub-svermelho-a.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/hub-svermelho-b.png b/src/noosfero-spb/noosfero-spb-theme/images/hub-svermelho-b.png new file mode 100644 index 0000000..6df643a Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/hub-svermelho-b.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/hub-time-bg.gif b/src/noosfero-spb/noosfero-spb-theme/images/hub-time-bg.gif new file mode 100644 index 0000000..43032c7 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/hub-time-bg.gif differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/ic-calendar.png b/src/noosfero-spb/noosfero-spb-theme/images/ic-calendar.png new file mode 100644 index 0000000..0f32291 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/ic-calendar.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/icone-branco-facebook.png b/src/noosfero-spb/noosfero-spb-theme/images/icone-branco-facebook.png new file mode 100644 index 0000000..5f4046c Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/icone-branco-facebook.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/icone-branco-flickr.png b/src/noosfero-spb/noosfero-spb-theme/images/icone-branco-flickr.png new file mode 100644 index 0000000..bf9b974 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/icone-branco-flickr.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/icone-branco-twitter.png b/src/noosfero-spb/noosfero-spb-theme/images/icone-branco-twitter.png new file mode 100644 index 0000000..b91d361 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/icone-branco-twitter.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/icone-branco-youtube.png b/src/noosfero-spb/noosfero-spb-theme/images/icone-branco-youtube.png new file mode 100644 index 0000000..345983e Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/icone-branco-youtube.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/icone-facebook.gif b/src/noosfero-spb/noosfero-spb-theme/images/icone-facebook.gif new file mode 100644 index 0000000..5cdbe68 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/icone-facebook.gif differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/icone-facebook.png b/src/noosfero-spb/noosfero-spb-theme/images/icone-facebook.png new file mode 100644 index 0000000..9e12698 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/icone-facebook.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/icone-flickr.png b/src/noosfero-spb/noosfero-spb-theme/images/icone-flickr.png new file mode 100644 index 0000000..fa805c1 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/icone-flickr.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/icone-related-items.png b/src/noosfero-spb/noosfero-spb-theme/images/icone-related-items.png new file mode 100644 index 0000000..59bac09 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/icone-related-items.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/icone-twitter.png b/src/noosfero-spb/noosfero-spb-theme/images/icone-twitter.png new file mode 100644 index 0000000..2538edc Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/icone-twitter.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/icone-verde-facebook.png b/src/noosfero-spb/noosfero-spb-theme/images/icone-verde-facebook.png new file mode 100644 index 0000000..18b907a Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/icone-verde-facebook.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/icone-verde-flickr.png b/src/noosfero-spb/noosfero-spb-theme/images/icone-verde-flickr.png new file mode 100644 index 0000000..0d997cf Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/icone-verde-flickr.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/icone-verde-twitter.png b/src/noosfero-spb/noosfero-spb-theme/images/icone-verde-twitter.png new file mode 100644 index 0000000..d0b3b5a Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/icone-verde-twitter.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/icone-verde-youtube.png b/src/noosfero-spb/noosfero-spb-theme/images/icone-verde-youtube.png new file mode 100644 index 0000000..4ed1206 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/icone-verde-youtube.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/icone-youtube.png b/src/noosfero-spb/noosfero-spb-theme/images/icone-youtube.png new file mode 100644 index 0000000..003c75b Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/icone-youtube.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/icone_pin.png b/src/noosfero-spb/noosfero-spb-theme/images/icone_pin.png new file mode 100644 index 0000000..3dcfed8 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/icone_pin.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/icones_home_branco.jpg b/src/noosfero-spb/noosfero-spb-theme/images/icones_home_branco.jpg new file mode 100644 index 0000000..15b9026 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/icones_home_branco.jpg differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/img_login_popUp.png b/src/noosfero-spb/noosfero-spb-theme/images/img_login_popUp.png new file mode 100644 index 0000000..ce82e38 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/img_login_popUp.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/instagram-widget.png b/src/noosfero-spb/noosfero-spb-theme/images/instagram-widget.png new file mode 100644 index 0000000..b51f7de Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/instagram-widget.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/left-arrow-black.png b/src/noosfero-spb/noosfero-spb-theme/images/left-arrow-black.png new file mode 100644 index 0000000..2697177 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/left-arrow-black.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/left-arrow.png b/src/noosfero-spb/noosfero-spb-theme/images/left-arrow.png new file mode 100644 index 0000000..89b144c Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/left-arrow.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/login16.png b/src/noosfero-spb/noosfero-spb-theme/images/login16.png new file mode 100644 index 0000000..1ffa50c Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/login16.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/logo-PS-barra-pb.png b/src/noosfero-spb/noosfero-spb-theme/images/logo-PS-barra-pb.png new file mode 100644 index 0000000..f9f9d42 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/logo-PS-barra-pb.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/logo-PS-barra.png b/src/noosfero-spb/noosfero-spb-theme/images/logo-PS-barra.png new file mode 100644 index 0000000..77c694e Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/logo-PS-barra.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/logo-participa.png b/src/noosfero-spb/noosfero-spb-theme/images/logo-participa.png new file mode 100644 index 0000000..436bceb Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/logo-participa.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/logo_facebook_50x50.png b/src/noosfero-spb/noosfero-spb-theme/images/logo_facebook_50x50.png new file mode 100644 index 0000000..7e5fdb3 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/logo_facebook_50x50.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/logo_twitter_50x50.png b/src/noosfero-spb/noosfero-spb-theme/images/logo_twitter_50x50.png new file mode 100644 index 0000000..4ffd721 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/logo_twitter_50x50.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/logo_twitter_bird_blue_50x50.png b/src/noosfero-spb/noosfero-spb-theme/images/logo_twitter_bird_blue_50x50.png new file mode 100644 index 0000000..a43574b Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/logo_twitter_bird_blue_50x50.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/logo_twitter_bird_white_50x50.png b/src/noosfero-spb/noosfero-spb-theme/images/logo_twitter_bird_white_50x50.png new file mode 100644 index 0000000..90fdebd Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/logo_twitter_bird_white_50x50.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/logotipo_spb.svg b/src/noosfero-spb/noosfero-spb-theme/images/logotipo_spb.svg new file mode 100644 index 0000000..b3088ec --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/images/logotipo_spb.svg @@ -0,0 +1,6 @@ + + \ No newline at end of file diff --git a/src/noosfero-spb/noosfero-spb-theme/images/logotipo_spb_ac.svg b/src/noosfero-spb/noosfero-spb-theme/images/logotipo_spb_ac.svg new file mode 100644 index 0000000..cc61c20 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/images/logotipo_spb_ac.svg @@ -0,0 +1,6 @@ + + \ No newline at end of file diff --git a/src/noosfero-spb/noosfero-spb-theme/images/logotipo_spb_beta.svg b/src/noosfero-spb/noosfero-spb-theme/images/logotipo_spb_beta.svg new file mode 100644 index 0000000..cb38bf8 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/images/logotipo_spb_beta.svg @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/src/noosfero-spb/noosfero-spb-theme/images/logotipo_spb_beta3.svg b/src/noosfero-spb/noosfero-spb-theme/images/logotipo_spb_beta3.svg new file mode 100644 index 0000000..fdf6df3 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/images/logotipo_spb_beta3.svg @@ -0,0 +1,6 @@ + + \ No newline at end of file diff --git a/src/noosfero-spb/noosfero-spb-theme/images/logotipo_spb_beta_ac.svg b/src/noosfero-spb/noosfero-spb-theme/images/logotipo_spb_beta_ac.svg new file mode 100644 index 0000000..2b7034b --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/images/logotipo_spb_beta_ac.svg @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/src/noosfero-spb/noosfero-spb-theme/images/logotipo_spb_beta_ac3.svg b/src/noosfero-spb/noosfero-spb-theme/images/logotipo_spb_beta_ac3.svg new file mode 100644 index 0000000..64e47e6 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/images/logotipo_spb_beta_ac3.svg @@ -0,0 +1,6 @@ + + \ No newline at end of file diff --git a/src/noosfero-spb/noosfero-spb-theme/images/mais_fotos.png b/src/noosfero-spb/noosfero-spb-theme/images/mais_fotos.png new file mode 100644 index 0000000..9aa88f0 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/mais_fotos.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/marca-participacao-social.png b/src/noosfero-spb/noosfero-spb-theme/images/marca-participacao-social.png new file mode 100644 index 0000000..4ad05e3 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/marca-participacao-social.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/mascote-bug.png b/src/noosfero-spb/noosfero-spb-theme/images/mascote-bug.png new file mode 100644 index 0000000..e9f98ec Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/mascote-bug.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/menu-ativo.gif b/src/noosfero-spb/noosfero-spb-theme/images/menu-ativo.gif new file mode 100644 index 0000000..89415eb Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/menu-ativo.gif differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/menu-mobile-item.png b/src/noosfero-spb/noosfero-spb-theme/images/menu-mobile-item.png new file mode 100644 index 0000000..d3fa756 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/menu-mobile-item.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/negative-hand.png b/src/noosfero-spb/noosfero-spb-theme/images/negative-hand.png new file mode 100644 index 0000000..59804b4 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/negative-hand.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/no-image.gif b/src/noosfero-spb/noosfero-spb-theme/images/no-image.gif new file mode 100644 index 0000000..e565824 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/no-image.gif differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/no-image.png b/src/noosfero-spb/noosfero-spb-theme/images/no-image.png new file mode 100644 index 0000000..34340e5 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/no-image.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/oops.png b/src/noosfero-spb/noosfero-spb-theme/images/oops.png new file mode 100644 index 0000000..ddeb2dd Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/oops.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/person-minor.png b/src/noosfero-spb/noosfero-spb-theme/images/person-minor.png new file mode 100644 index 0000000..b410d88 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/person-minor.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/person-minor_50.png b/src/noosfero-spb/noosfero-spb-theme/images/person-minor_50.png new file mode 100644 index 0000000..7bf25a3 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/person-minor_50.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/portlet-footer-textmore.png b/src/noosfero-spb/noosfero-spb-theme/images/portlet-footer-textmore.png new file mode 100644 index 0000000..777d1af Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/portlet-footer-textmore.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/portlet-header-expanded.gif b/src/noosfero-spb/noosfero-spb-theme/images/portlet-header-expanded.gif new file mode 100644 index 0000000..a46eb43 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/portlet-header-expanded.gif differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/portlet-header.gif b/src/noosfero-spb/noosfero-spb-theme/images/portlet-header.gif new file mode 100644 index 0000000..6aa5d3f Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/portlet-header.gif differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/positive-hand.png b/src/noosfero-spb/noosfero-spb-theme/images/positive-hand.png new file mode 100644 index 0000000..44c85ca Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/positive-hand.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/prompt_bg.png b/src/noosfero-spb/noosfero-spb-theme/images/prompt_bg.png new file mode 100644 index 0000000..5a8ce78 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/prompt_bg.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/prompt_bg_hover.png b/src/noosfero-spb/noosfero-spb-theme/images/prompt_bg_hover.png new file mode 100644 index 0000000..25eb01e Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/prompt_bg_hover.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/prompt_bg_normal.png b/src/noosfero-spb/noosfero-spb-theme/images/prompt_bg_normal.png new file mode 100644 index 0000000..c8cc9c1 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/prompt_bg_normal.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/read-more-home.png b/src/noosfero-spb/noosfero-spb-theme/images/read-more-home.png new file mode 100644 index 0000000..a39fcd0 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/read-more-home.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/readmoreblue.png b/src/noosfero-spb/noosfero-spb-theme/images/readmoreblue.png new file mode 100644 index 0000000..74408e3 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/readmoreblue.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/readmorebrown.png b/src/noosfero-spb/noosfero-spb-theme/images/readmorebrown.png new file mode 100644 index 0000000..291a6e8 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/readmorebrown.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/readmoredarkblue.png b/src/noosfero-spb/noosfero-spb-theme/images/readmoredarkblue.png new file mode 100644 index 0000000..18eacef Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/readmoredarkblue.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/readmoredarkgray.png b/src/noosfero-spb/noosfero-spb-theme/images/readmoredarkgray.png new file mode 100644 index 0000000..898ac8b Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/readmoredarkgray.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/readmoregray.png b/src/noosfero-spb/noosfero-spb-theme/images/readmoregray.png new file mode 100644 index 0000000..4ead1c0 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/readmoregray.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/readmoregreen.png b/src/noosfero-spb/noosfero-spb-theme/images/readmoregreen.png new file mode 100644 index 0000000..8c486b8 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/readmoregreen.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/readmoreorange.png b/src/noosfero-spb/noosfero-spb-theme/images/readmoreorange.png new file mode 100644 index 0000000..d5f5a01 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/readmoreorange.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/readmorepurple.png b/src/noosfero-spb/noosfero-spb-theme/images/readmorepurple.png new file mode 100644 index 0000000..ad9f569 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/readmorepurple.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/readmorewhiteblue.png b/src/noosfero-spb/noosfero-spb-theme/images/readmorewhiteblue.png new file mode 100644 index 0000000..98b89ba Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/readmorewhiteblue.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/reportar-erros.png b/src/noosfero-spb/noosfero-spb-theme/images/reportar-erros.png new file mode 100644 index 0000000..b28c2a1 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/reportar-erros.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/right-arrow-black.png b/src/noosfero-spb/noosfero-spb-theme/images/right-arrow-black.png new file mode 100644 index 0000000..a22badd Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/right-arrow-black.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/right-arrow.png b/src/noosfero-spb/noosfero-spb-theme/images/right-arrow.png new file mode 100644 index 0000000..b8c6940 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/right-arrow.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/rss.png b/src/noosfero-spb/noosfero-spb-theme/images/rss.png new file mode 100644 index 0000000..7661d92 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/rss.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/rss.svg b/src/noosfero-spb/noosfero-spb-theme/images/rss.svg new file mode 100644 index 0000000..8256f3b --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/images/rss.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/src/noosfero-spb/noosfero-spb-theme/images/search-buttom.gif b/src/noosfero-spb/noosfero-spb-theme/images/search-buttom.gif new file mode 100644 index 0000000..460a98e Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/search-buttom.gif differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/search-button-30px.gif b/src/noosfero-spb/noosfero-spb-theme/images/search-button-30px.gif new file mode 100644 index 0000000..3ea65f2 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/search-button-30px.gif differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/search-button.gif b/src/noosfero-spb/noosfero-spb-theme/images/search-button.gif new file mode 100644 index 0000000..460a98e Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/search-button.gif differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/search-button.png b/src/noosfero-spb/noosfero-spb-theme/images/search-button.png new file mode 100644 index 0000000..eb2130d Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/search-button.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/search-button10.png b/src/noosfero-spb/noosfero-spb-theme/images/search-button10.png new file mode 100644 index 0000000..cac2696 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/search-button10.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/search-button100.png b/src/noosfero-spb/noosfero-spb-theme/images/search-button100.png new file mode 100644 index 0000000..42b442b Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/search-button100.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/search-button2.gif b/src/noosfero-spb/noosfero-spb-theme/images/search-button2.gif new file mode 100644 index 0000000..460a98e Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/search-button2.gif differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/search-button2.png b/src/noosfero-spb/noosfero-spb-theme/images/search-button2.png new file mode 100644 index 0000000..42b442b Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/search-button2.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/search-button_oficial.png b/src/noosfero-spb/noosfero-spb-theme/images/search-button_oficial.png new file mode 100644 index 0000000..9ac6cb6 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/search-button_oficial.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/search-ico.png b/src/noosfero-spb/noosfero-spb-theme/images/search-ico.png new file mode 100644 index 0000000..6d102ce Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/search-ico.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/search.png b/src/noosfero-spb/noosfero-spb-theme/images/search.png new file mode 100644 index 0000000..757f6a5 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/search.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/sections-ico.png b/src/noosfero-spb/noosfero-spb-theme/images/sections-ico.png new file mode 100644 index 0000000..4ba2a1e Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/sections-ico.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/seta_cidadania_justica.png b/src/noosfero-spb/noosfero-spb-theme/images/seta_cidadania_justica.png new file mode 100644 index 0000000..242a3a2 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/seta_cidadania_justica.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/seta_ciencia_tecnologia.png b/src/noosfero-spb/noosfero-spb-theme/images/seta_ciencia_tecnologia.png new file mode 100644 index 0000000..ae05455 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/seta_ciencia_tecnologia.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/seta_cultura.png b/src/noosfero-spb/noosfero-spb-theme/images/seta_cultura.png new file mode 100644 index 0000000..d221d2c Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/seta_cultura.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/seta_defesa_seguranca.png b/src/noosfero-spb/noosfero-spb-theme/images/seta_defesa_seguranca.png new file mode 100644 index 0000000..2668bd1 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/seta_defesa_seguranca.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/seta_economia_emprego.png b/src/noosfero-spb/noosfero-spb-theme/images/seta_economia_emprego.png new file mode 100644 index 0000000..ff79913 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/seta_economia_emprego.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/seta_educacao.png b/src/noosfero-spb/noosfero-spb-theme/images/seta_educacao.png new file mode 100644 index 0000000..7934c02 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/seta_educacao.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/seta_esporte.png b/src/noosfero-spb/noosfero-spb-theme/images/seta_esporte.png new file mode 100644 index 0000000..dd484c6 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/seta_esporte.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/seta_governo.png b/src/noosfero-spb/noosfero-spb-theme/images/seta_governo.png new file mode 100644 index 0000000..7d6341d Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/seta_governo.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/seta_infraestrutura.png b/src/noosfero-spb/noosfero-spb-theme/images/seta_infraestrutura.png new file mode 100644 index 0000000..66cdff1 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/seta_infraestrutura.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/seta_meio_ambiente.png b/src/noosfero-spb/noosfero-spb-theme/images/seta_meio_ambiente.png new file mode 100644 index 0000000..2079b67 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/seta_meio_ambiente.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/seta_saude.png b/src/noosfero-spb/noosfero-spb-theme/images/seta_saude.png new file mode 100644 index 0000000..8cd6d10 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/seta_saude.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/seta_tursimo.png b/src/noosfero-spb/noosfero-spb-theme/images/seta_tursimo.png new file mode 100644 index 0000000..ed796e4 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/seta_tursimo.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/sgpr.png b/src/noosfero-spb/noosfero-spb-theme/images/sgpr.png new file mode 100644 index 0000000..0c6187e Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/sgpr.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/shadow-bottom.gif b/src/noosfero-spb/noosfero-spb-theme/images/shadow-bottom.gif new file mode 100644 index 0000000..f804faa Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/shadow-bottom.gif differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/site-footer.png b/src/noosfero-spb/noosfero-spb-theme/images/site-footer.png new file mode 100644 index 0000000..ce5e61d Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/site-footer.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/spb.png b/src/noosfero-spb/noosfero-spb-theme/images/spb.png new file mode 100644 index 0000000..addfc12 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/spb.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/sprite-icons.png b/src/noosfero-spb/noosfero-spb-theme/images/sprite-icons.png new file mode 100644 index 0000000..70781ca Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/sprite-icons.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/sprite-setas.png b/src/noosfero-spb/noosfero-spb-theme/images/sprite-setas.png new file mode 100644 index 0000000..4537a80 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/sprite-setas.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/sprite.png b/src/noosfero-spb/noosfero-spb-theme/images/sprite.png new file mode 100644 index 0000000..a3e1333 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/sprite.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/sprite2.png b/src/noosfero-spb/noosfero-spb-theme/images/sprite2.png new file mode 100644 index 0000000..440acbb Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/sprite2.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/sprite_social-2.png b/src/noosfero-spb/noosfero-spb-theme/images/sprite_social-2.png new file mode 100644 index 0000000..f9f90a6 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/sprite_social-2.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/sprite_social-verde.png b/src/noosfero-spb/noosfero-spb-theme/images/sprite_social-verde.png new file mode 100644 index 0000000..87eb3f5 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/sprite_social-verde.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/sprite_social.png b/src/noosfero-spb/noosfero-spb-theme/images/sprite_social.png new file mode 100644 index 0000000..300cb9d Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/sprite_social.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/star-negative-big.png b/src/noosfero-spb/noosfero-spb-theme/images/star-negative-big.png new file mode 100644 index 0000000..617dbe4 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/star-negative-big.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/star-negative-mini.png b/src/noosfero-spb/noosfero-spb-theme/images/star-negative-mini.png new file mode 100644 index 0000000..eabea40 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/star-negative-mini.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/star-negative.png b/src/noosfero-spb/noosfero-spb-theme/images/star-negative.png new file mode 100644 index 0000000..41973e7 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/star-negative.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/star-positive-big.png b/src/noosfero-spb/noosfero-spb-theme/images/star-positive-big.png new file mode 100644 index 0000000..d41a993 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/star-positive-big.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/star-positive-mini.png b/src/noosfero-spb/noosfero-spb-theme/images/star-positive-mini.png new file mode 100644 index 0000000..febf0de Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/star-positive-mini.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/star-positive.png b/src/noosfero-spb/noosfero-spb-theme/images/star-positive.png new file mode 100644 index 0000000..ca15335 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/star-positive.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/steps_bg.png b/src/noosfero-spb/noosfero-spb-theme/images/steps_bg.png new file mode 100644 index 0000000..430b99d Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/steps_bg.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/thin-logo.png b/src/noosfero-spb/noosfero-spb-theme/images/thin-logo.png new file mode 100644 index 0000000..1aeb9fc Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/thin-logo.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/top-arrow-black.png b/src/noosfero-spb/noosfero-spb-theme/images/top-arrow-black.png new file mode 100644 index 0000000..5744b53 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/top-arrow-black.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/top-arrow.png b/src/noosfero-spb/noosfero-spb-theme/images/top-arrow.png new file mode 100644 index 0000000..d4e3f01 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/top-arrow.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/touch_icon.png b/src/noosfero-spb/noosfero-spb-theme/images/touch_icon.png new file mode 100644 index 0000000..98c3ad4 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/touch_icon.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/twitter-widget.png b/src/noosfero-spb/noosfero-spb-theme/images/twitter-widget.png new file mode 100644 index 0000000..e0cd726 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/twitter-widget.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/twitter.png b/src/noosfero-spb/noosfero-spb-theme/images/twitter.png new file mode 100644 index 0000000..aededc4 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/twitter.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/upload-icon.png b/src/noosfero-spb/noosfero-spb-theme/images/upload-icon.png new file mode 100644 index 0000000..00c39e1 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/upload-icon.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/usuario_participa.png b/src/noosfero-spb/noosfero-spb-theme/images/usuario_participa.png new file mode 100644 index 0000000..a86a6a3 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/usuario_participa.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/visualizacoes.png b/src/noosfero-spb/noosfero-spb-theme/images/visualizacoes.png new file mode 100644 index 0000000..9a014d5 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/visualizacoes.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/voltar-topo.png b/src/noosfero-spb/noosfero-spb-theme/images/voltar-topo.png new file mode 100644 index 0000000..3303386 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/voltar-topo.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/images/youtube.png b/src/noosfero-spb/noosfero-spb-theme/images/youtube.png new file mode 100644 index 0000000..22b1fb7 Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/images/youtube.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/preview.png b/src/noosfero-spb/noosfero-spb-theme/preview.png new file mode 100644 index 0000000..8c3627e Binary files /dev/null and b/src/noosfero-spb/noosfero-spb-theme/preview.png differ diff --git a/src/noosfero-spb/noosfero-spb-theme/site_title.html.erb b/src/noosfero-spb/noosfero-spb-theme/site_title.html.erb new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/site_title.html.erb diff --git a/src/noosfero-spb/noosfero-spb-theme/style.css b/src/noosfero-spb/noosfero-spb-theme/style.css new file mode 100644 index 0000000..df03cbc --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/style.css @@ -0,0 +1,212 @@ +/*** Noosfero Base Theme ***/ +@import url(../profile-base/style.css); + +/*** Icon and animation resources***/ +@import url(../../icons/tango/style.css); +@import url(css/animate.css); +@import url(font-awesome.min.css); + + +/*** SPB Theme section styles ***/ +@import url(css/overwriting-base-theme.css); +@import url(css/header.css); +@import url(css/footer.css); +@import url(css/left-bar.css); +@import url(css/home-page.css); +@import url(css/main-content.css); +@import url(css/edition-pages.css); +@import url(css/administration-panel.css); +@import url(css/article-page.css); +@import url(css/software-pages.css); +@import url(css/community-pages.css); +@import url(css/use-report.css); +@import url(css/news-page.css); +@import url(css/search-pages.css); +@import url(css/software-catalog-page.css); +@import url(css/tooltip.css); +@import url(css/popover.css); + +@font-face{ + font-weight: normal; + font-style: normal; + font-family: "open_sanslight"; + src: url("fonts/opensans-300-webfont.eot"); + src: url("fonts/opensans-300-webfont.eot?#iefix") format("embedded-opentype"), + url("fonts/opensans-300-webfont.woff") format("woff"), + url("fonts/opensans-300-webfont.ttf") format("truetype"), + url("fonts/opensans-300-webfont.svg#open_sanslight") format("svg"); +} + +@font-face{ + font-weight: normal; + font-style: normal; + font-family: "open_sansregular"; + src: url("fonts/opensans-400-webfont.eot"); + src: url("fonts/opensans-400-webfont.eot?#iefix") format("embedded-opentype"), + url("fonts/opensans-400-webfont.woff") format("woff"), + url("fonts/opensans-400-webfont.ttf") format("truetype"), + url("fonts/opensans-400-webfont.svg#open_sansregular") format("svg"); +} + +@font-face{ + font-weight: normal; + font-style: normal; + font-family: "open_sanssemibold"; + src: url("fonts/opensans-600-webfont.eot"); + src: url("fonts/opensans-600-webfont.eot?#iefix") format("embedded-opentype"), + url("fonts/opensans-600-webfont.woff") format("woff"), + url("fonts/opensans-600-webfont.ttf") format("truetype"), + url("fonts/opensans-600-webfont.svg#open_sanssemibold") format("svg"); +} + +@font-face{ + font-weight: normal; + font-style: normal; + font-family: "open_sansbold"; + src: url("fonts/opensans-700-webfont.eot"); + src: url("fonts/opensans-700-webfont.eot?#iefix") format("embedded-opentype"), + url("fonts/opensans-700-webfont.woff") format("woff"), + url("fonts/opensans-700-webfont.ttf") format("truetype"), + url("fonts/opensans-700-webfont.svg#open_sansbold") format("svg"); +} + +@font-face{ + font-weight: normal; + font-style: normal; + font-family: "open_sansextrabold"; + src: url("fonts/opensans-800-webfont.eot"); + src: url("fonts/opensans-800-webfont.eot?#iefix") format("embedded-opentype"), + url("fonts/opensans-800-webfont.woff") format("woff"), + url("fonts/opensans-800-webfont.ttf") format("truetype"), + url("fonts/opensans-800-webfont.svg#open_sansextrabold") format("svg"); +} + +/*********** General Rules ************/ + +* { + margin: 0; + padding: 0; + list-style: none; + vertical-align: baseline; +} + +body { + background-color: #fff; + color: #172738; + font-size: 12px; + font-family: "open_sansregular", Arial, Helvetica, sans-serif; +} + +* :link,:visited { + text-decoration: none; +} + +* ul,ol { + list-style: none; +} + +* h1,h2,h3,h4,h5,h6 { + color: inherit; + font-family: Arial; + font-weight: 700; + margin-top: 20px; + margin-bottom: 10px; +} + +* h1{ + font-size: 34px; + line-height: 37px; +} + +* h2{ + font-size: 22px; + line-height: 21px; +} + +* h3{ + font-size: 18px; + line-height: 21px; +} + +* h4,h5,h6 { + font-size: 16px; + line-height: 21px; +} + +#content h1, #content h2, #content h3, #content h4, #content h5, #content h6{ + margin-top: 20px; + margin-bottom: 10px; + color: inherit; + font-family: Arial; + font-weight: 700; +} + +#content h1{ + font-size: 34px; + line-height: 37px; +} + +#content h2{ + font-size: 22px; + line-height: 21px; +} + +#content h3{ + font-size: 18px; + line-height: 21px; + font-weight: 700; +} + +#content h4, content h5, #content h6{ + font-size: 16px; + line-height: 21px; +} + +p{ + margin: 0px 0px 10px 0px; + line-height: 21px; + font-size: 15px; +} + + +* a img,:link img,:visited img{ + border: none +} + +a{ + outline: none; +} +a:link, #content a:link, dl.portlet a:link{ + color: #172738; +} + +a:visited, #content a:visited, dl.portlet a:visited{ + color:#172738; +} + +a:focus{ + outline: 2px solid #f1ca7f; +} + +/* Remove in all td gray backgroung hover */ +tr:hover td{ + background-color: transparent; +} + +#content a:hover, dl.portlet a:hover{ + color: #000; +} + +table{ + border-spacing: 0; +} + +img{ + vertical-align: text-bottom; +} + +iframe{ + border-width: 0; border-style:none; +} + + diff --git a/src/noosfero-spb/noosfero-spb-theme/theme.js b/src/noosfero-spb/noosfero-spb-theme/theme.js new file mode 100644 index 0000000..3ef8426 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/theme.js @@ -0,0 +1,280 @@ +function alignBlocks(containerIndex){ + //Needed to save the original reference to jQuery(this) + jt = jQuery(this); + longerBlock = 0; + jt.find(".block-outer").each(function () { + if(jQuery(this).height() > longerBlock) + longerBlock = jQuery(this).height(); + }); + + jt.find("#block-48504 .block-inner-2").height(492); + jt.find("#block-55304 .block-inner-2").height(378); + + //Aligns the blocks in the most common situations + jt.find(".block-outer").height(longerBlock); + //Only used for blocks with video, since it uses the size of the iframe + if(jt.find("iframe").length > 0){ + jt.find(".block-inner-1 .block-inner-2").each(function (idx) { + if(idx==2){ + jQuery(this).height(jt.find("iframe").height()); + } + }); + } +} + +(function($) { + // Run code + if($.cookie("high_contrast") === 'true'){ + $( "body" ).toggleClass( "contraste" ); + } + $( "#siteaction-contraste a" ).click(function() { + $( "body" ).toggleClass( "contraste" ); + if($('body').hasClass('contraste')){ + $.cookie('high_contrast', 'true', {path: '/'}); + } else { + $.cookie('high_contrast', null, { path: '/' }); + } + }); + + $( ".profile-image" ).prepend( "" ); + //insere a mensagem no bloco de trilhas na página inicial// + $( ".action-home-index #content .community-track-plugin_track-card-list-block .track_list" ).prepend( "Construa seu caminho de participação na elaboração de políticas públicas..." ); + //insere a mensagem no bloco de comunidades na página inicial// + $( ".action-home-index #content .communities-block .block-inner-2>div" ).prepend( "Participe dos dialogos entre governo e sociedade em comunidades temáticas..." ); + $( ".action-home-index #content .communities-block .block-inner-2>div.block-footer-content .msg_block" ).remove(); + $('.container-block-plugin_container-block').each(alignBlocks); + + $('#block-48500 > .block-inner-1 > .block-inner-2').append(''); + + + +// Foco no botao de busca + +$('#link-buscar').click(function(e) { + e.preventDefault(); + window.location.hash = '#portal-searchbox'; + $('.searchField').focus() +}) + +})(jQuery); + + +// Efeito Fade nos box de softwares + +(function($){ + "use strict";// Make javascript less intolerant to errors + + var TRANSITION_TIME = 250;// milliseconds + + + function show_finality() { + var finality = $(this).children(".software-block-finality"); + + //finality.stop().fadeTo(TRANSITION_TIME,1); + finality.stop().fadeTo('fast', 1); + //finality.stop().animate({"top" : "0%"}, TRANSITION_TIME); + } + + function hide_finality() { + var finality = $(this).children(".software-block-finality"); + + //finality.stop().fadeTo(TRANSITION_TIME,0); + finality.stop().fadeTo('fast', 0); + //finality.stop().animate({"top" : "100%"}, TRANSITION_TIME); + } + + function move_article_buttons(){ + var article_actions = $('#article-actions').clone(); + var report = $('.report-abuse-action').remove(); + var suggest = $('.icon-suggest').remove(); + + + $(article_actions).find('.icon-edit, .icon-new, .icon-delete, .icon-locale').remove(); + $('.article-body').append(article_actions); + } + + function add_link_to_article_div(){ + var list = $('.display-content-block').find('li'); + + list.each(function(){ + var link = $(this).find('.title').find('a').attr('href'); + var text = $(this).find('.lead').find('p').text(); + var leadLink = $(''); + + leadLink.attr('href', link); + leadLink.text(text); + + $(this).find('.lead').html(leadLink); + }); + } + + function insert_notice_div(){ + var notice = $('.display-content-block').find('li'); + notice.each(function(){ + var $set = $(this).children(); + for(var i=1, len = $set.length; i < len; i+=5){ + $set.slice(i, i+5).wrapAll('
    '); + } + for(var i=2, len = $set.length; i < len; i+=3){ + $set.slice(i, i+3).wrapAll('
    '); + } + //$('
    ').wrap($(this).find( '.image', '.title', '.lead', '.read_more')); + }); + + } + + //toggle filter options in catalog page + function setFilterCategoriesOptionClass() { + var filterOptions = $("#filter-categories-option"); + filterOptions.addClass("animated slideInDown"); + } + + function toggleFilterOptions(){ + var filterOptions = $("#filter-categories-option"); + var filterHeight = filterOptions[0].scrollHeight; + var showOptions = $("#filter-option-catalog-software"); + var hideOptions = $("#filter-option-catalog-close"); + if(hideOptions.is(":visible")){ + //filterOptions.slideUp(function() { + showOptions.show(); + hideOptions.hide(); + //}); + filterOptions.animate({ + height: 0 + },500); + } + else { + showOptions.hide(); + hideOptions.show(); + filterOptions.animate({ + height: filterHeight + },500); + } + } + + function setEvents(){ + // Fade css + $('.software-block-finality').css('opacity', 0); + $('.software-block-finality').css('top', 0); + // End Fade CSS + $(".software-block").mouseover(show_finality); + $(".software-block").mouseout(hide_finality); + + var showOptions = $("#filter-option-catalog-software"); + var hideOptions = $("#filter-option-catalog-close"); + showOptions.click(toggleFilterOptions); + hideOptions.click(toggleFilterOptions); + } + + /* Finds all uploaded files from manuals page and sets its names on the right format */ + function set_uploaded_files_names() { + try { + var article = document.getElementById('article'); + var folderList = article.getElementsByClassName('folder-content')[0]; + var folderItens = folderList.getElementsByClassName('item-description'); + + for(var i = 0; i < folderItens.length; i++) { + split_file_extension(folderItens[i].getElementsByTagName('a')[0]); + } + } catch(e) { + + } + } + + /* Splits a file name from its extension. Example: example.pdf becomes example - PDF */ + function split_file_extension(element) { + var tokens = element.innerHTML.split('.'); + if(tokens.length == 2) { + var fileName = tokens[0]; + var fileExtension = tokens[1].toUpperCase(); + element.innerHTML = fileName + " - " + fileExtension; + } + } + + function set_tooltip_content() { + $('.star-tooltip').html("?"); + } + + // TODO: fix calls for this function below + // TODO: comments-additional-information --> comments-display-fields + function set_arrow_direction() { + var additional_data_bar = $('.comments-display-fields'); + var arrow = $('.comments-arrow-down'); + var state = 0; + additional_data_bar.on('click', function() { + animateExtraFields(); + }); + } + + function animateExtraFields() { + var additional_data_bar = $('.comments-display-fields'); + var arrow = ($('.comments-arrow-down')[0])? $('.comments-arrow-down') : $('.comments-arrow-up'); + console.log(arrow); + var fields = $('.comments-software-extra-fields'); + if(fields) { + var innerHeight = fields[0].offsetHeight; + if(fields.height()!==0) { + arrow.attr('class', "comments-arrow-down"); + fields.animate({height: 0}); + } + else { + arrow.attr('class', "comments-arrow-up"); + fields.animate({height: 140}); + } + } + } + + function set_use_report_content() { + $('.make-report-block .make-report-container .button-bar a span').html('avaliar o software'); + $('.make-report-block .make-report-container .make-report-message').html('Relate sua experiência ou do órgão/empresa com relação ao software.'); + $('.ratings-list .see-more a.icon-arrow-right-p').html('veja todos os relatos'); + $('.main-content .star-rate-data .star-rate-form .star-comment-container .button-bar input').attr('value', 'enviar relato'); + $('.main-content .star-rate-data .star-rate-form .star-rate-text').html('Avalie o software'); + $('.main-content .star-rate-data .star-rate-form .star-comment-container .formlabel').html('Depoimento sobre o software'); + $('.star-rate-form .star-comment-container .comments-display-fields span#comments-additional-information').html('Dados adicionais (órgãos e empresas)'); + $('.star-rate-form .star-comment-container .comments-software-extra-fields #input_institution_comments label').html('Nome do órgão ou empresa'); + $('.star-rate-form .star-comment-container .comments-software-extra-fields .comments-software-people-benefited label').html('Número de beneficiados'); + $('.star-rate-form .star-comment-container .comments-software-extra-fields .comments-software-saved-values label').html('Recursos economizados'); + } + + function add_tooltips(){ + $('#content span[title]').attr("data-toggle","tooltip"); + + $('[data-toggle="tooltip"]').tooltip(); + } + + function add_popovers() { + var span = $('span[data-toggle="popover"]'); + var place = span.attr("data-placement"); + var elementClass = span.attr("data-class"); + if(span){ + var popover = span.popover({ + html:true, + placement: place, + content: function() { + return $(this).next().html(); + } + }) + .data('bs.popover'); + } + if(popover) { + popover.tip() + .addClass(elementClass); + $('a.toggle-popover').on("click",function() { + span.trigger("click"); + }); + } + } + + $(document).ready(function(){ + add_tooltips(); + add_popovers(); + move_article_buttons(); + insert_notice_div(); + set_uploaded_files_names(); + set_tooltip_content(); + set_arrow_direction(); + set_use_report_content(); + setEvents(); + }); +})(jQuery); diff --git a/src/noosfero-spb/noosfero-spb-theme/theme.yml b/src/noosfero-spb/noosfero-spb-theme/theme.yml new file mode 100644 index 0000000..f5721f4 --- /dev/null +++ b/src/noosfero-spb/noosfero-spb-theme/theme.yml @@ -0,0 +1,2 @@ +name: "Software Público" +layout: "application-ng" diff --git a/src/noosfero-spb/software_communities b/src/noosfero-spb/software_communities deleted file mode 160000 index b5a1769..0000000 --- a/src/noosfero-spb/software_communities +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b5a1769b875637268d2f9750697ca15ecdf8101f diff --git a/src/noosfero-spb/software_communities/.gitignore b/src/noosfero-spb/software_communities/.gitignore new file mode 100644 index 0000000..0675847 --- /dev/null +++ b/src/noosfero-spb/software_communities/.gitignore @@ -0,0 +1,6 @@ +# Backup files +*~ +*.swp +config/institutions_update +config/siorg.yml +locale diff --git a/src/noosfero-spb/software_communities/README.md b/src/noosfero-spb/software_communities/README.md new file mode 100644 index 0000000..e9c287a --- /dev/null +++ b/src/noosfero-spb/software_communities/README.md @@ -0,0 +1,94 @@ +[![Code Climate](https://codeclimate.com/github/fabio1079/noosfero-plugin/badges/gpa.svg)](https://codeclimate.com/github/fabio1079/noosfero-plugin) + +README - MPOG Software Público Plugin +================================ + +MPOG Software Público Plugin is a plugin that includes features to Novo Portal do Software Público Brasileiro (SPB). + +More information about SPB: https://www.participa.br/softwarepublico + +INSTALL +======= + +Enable Plugin +------------- + +Also, you need to enable MPOG Software Plugin on your Noosfero: + +cd +./script/noosfero-plugins enable software_communities + +Activate Plugin +--------------- + +As a Noosfero administrator user, go to administrator panel: + +- Execute the command to allow city and states to show up: + psql -U USERNAME -d NOOSFERO_DATABASE -a -f db/brazil_national_regions.sql +- Click on "Enable/disable plugins" option +- Click on "MPOG Software Plugin" check-box + +Schedule Institutions Update +---------------------------- + +./plugins/software_communities/script/schedule_institution_update.sh + + +Create Categories +------------------- + +To create the categories that a software can have run + +rake software:create_categories + +Create Licenses +----------------- + +This command populate the database with 71 licenses and it's links +rake software:create_licenses + +Translate Plugin +------------------ + +To translate the strings used in the plugin run + +ruby script/move-translations-to-plugins.rb +rake updatepo +rake noosfero:translations:compile + + +Running MPOG Software tests +-------------------- +$ ruby plugins/software_communities/test/unit/name_of_file.rb +$ cucumber plugins/software_communities/features/ + +Get Involved +============ + +If you find any bug and/or want to collaborate, please send an e-mail to arthurmde@gmail.com + +LICENSE +======= + +Copyright (c) The Author developers. + +See Noosfero license. + + +AUTHORS +======= + +Alex Campelo (campelo.al1 at gmail.com) +Arthur de Moura Del Esposte (arthurmde at gmail.com) +Daniel Bucher (daniel.bucher88 at gmail.com) +David Carlos (ddavidcarlos1392 at gmail.com) +Fabio Teixeira (fabio1079 at gmail.com) +Gustavo Jaruga (darksshades at gmail.com) +Luciano Prestes (lucianopcbr at gmail.com) +Matheus Faria (matheus.sousa.faria at gmail.com) + + +ACKNOWLEDGMENTS +=============== + +The authors have been supported by MPOG and UnB diff --git a/src/noosfero-spb/software_communities/Rakefile b/src/noosfero-spb/software_communities/Rakefile new file mode 100644 index 0000000..0de7903 --- /dev/null +++ b/src/noosfero-spb/software_communities/Rakefile @@ -0,0 +1,11 @@ +task :default => :makemo + +task :makemo do + require 'gettext' + require 'gettext/tools' + GetText.create_mofiles( + verbose: true, + po_root: 'po', + mo_root: 'locale', + ) +end diff --git a/src/noosfero-spb/software_communities/controllers/software_communities_plugin_controller.rb b/src/noosfero-spb/software_communities/controllers/software_communities_plugin_controller.rb new file mode 100644 index 0000000..d3bb2c5 --- /dev/null +++ b/src/noosfero-spb/software_communities/controllers/software_communities_plugin_controller.rb @@ -0,0 +1,54 @@ +# apenas software +require 'csv' +class SoftwareCommunitiesPluginController < ApplicationController + + def get_license_data + return render :json=>{} if !request.xhr? || params[:query].nil? + + data = if params[:query].empty? + LicenseInfo.all + else + LicenseInfo.where("version ILIKE ?", "%#{params[:query]}%").select("id, version") + end + render :json=> data.collect { |license| + {:id=>license.id, :label=>license.version} + } + + end + + def get_block_template + render 'box_organizer/_download_list_template', :layout => false + end + + def get_field_data + condition = !request.xhr? || params[:query].nil? || params[:field].nil? + return render :json=>{} if condition + + model = get_model_by_params_field + + data = model.where("name ILIKE ?", "%#{params[:query]}%").select("id, name") + .collect { |db| + {:id=>db.id, :label=>db.name} + } + + other = [model.select("id, name").last].collect { |db| + {:id=>db.id, :label=>db.name} + } + + # Always has other in the list + data |= other + + render :json=> data + end + + protected + + def get_model_by_params_field + case params[:field] + when "software_language" + return ProgrammingLanguage + else + return DatabaseDescription + end + end +end diff --git a/src/noosfero-spb/software_communities/controllers/software_communities_plugin_myprofile_controller.rb b/src/noosfero-spb/software_communities/controllers/software_communities_plugin_myprofile_controller.rb new file mode 100644 index 0000000..256539a --- /dev/null +++ b/src/noosfero-spb/software_communities/controllers/software_communities_plugin_myprofile_controller.rb @@ -0,0 +1,194 @@ +class SoftwareCommunitiesPluginMyprofileController < MyProfileController + append_view_path File.join(File.dirname(__FILE__) + '/../views') + + def index + end + + def new_software + set_software_as_template + + @community = Community.new(params[:community]) + @community.environment = environment + @software_info = SoftwareInfo.new(params[:software_info]) + + @license_info = if params[:license].blank? or params[:license][:license_infos_id].blank? + LicenseInfo.new + else + LicenseInfo.find(params[:license][:license_infos_id]) + end + + control_software_creation + update_new_software_errors + end + + def edit_software + update_software_atributes + + return unless request.post? + + @software_info = constroy_software + software_info_insert_models.call(@list_libraries, 'libraries') + software_info_insert_models.call(@list_languages, 'software_languages') + software_info_insert_models.call(@list_databases, 'software_databases') + software_info_insert_models.call(@list_operating_systems, 'operating_systems') + + begin + @software_info.save! + + @community = @software_info.community + @community.update_attributes!(params[:community]) + + if params[:commit] == _('Save and Configure Community') + redirect_to :controller => 'profile_editor', :action => 'edit' + else + redirect_to :controller => 'profile_editor', :action => 'index' + session[:notice] = _('Software updated successfully') + end + rescue ActiveRecord::RecordInvalid => invalid + update_new_software_errors + session[:notice] = _('Could not update software') + end + end + + def disabled_public_software_field + !environment.admins.include?(current_user.person) + end + + private + + def add_software_erros + @errors = [] + @errors |= @community.errors.full_messages if @community + @errors |= @software_info.errors.full_messages if @software_info + @errors |= @license_info.errors.full_messages if @license_info + end + + def control_software_creation + valid_models = request.post? && (@community.valid? && @software_info.valid? && @license_info.valid?) + if valid_models + send_software_to_moderation + else + add_software_erros + end + end + + def software_info_insert_models + proc { |list,model_attr| + @software_info.send(model_attr).destroy_all + list.collect!{|m| @software_info.send(model_attr) << m } unless list.nil? + } + end + + def constroy_software + @software_info = @profile.software_info + params[:software][:public_software] ||= false unless @software_info.public_software? + @license = LicenseInfo.find(params[:license][:license_infos_id]) + @software_info.license_info = @license + @software_info.update_attributes(params[:software]) + + another_license_version = nil + another_license_link = nil + if params[:license] + another_license_version = params[:license][:version] + another_license_link = params[:license][:link] + end + + @software_info.verify_license_info(another_license_version, another_license_link) + + create_list_model_helpers + + @software_info + end + + def create_list_model_helpers + @list_libraries = LibraryHelper.list_library(params[:library]) + @list_languages = SoftwareLanguageHelper.list_language(params[:language]) + @list_databases = DatabaseHelper.list_database(params[:database]) + @list_operating_systems = OperatingSystemHelper.list_operating_system(params[:operating_system]) + end + + def send_software_to_moderation + another_license_version = "" + another_license_link = "" + if params[:license] + another_license_version = params[:license][:version] + another_license_link = params[:license][:link] + end + @software_info = SoftwareInfo.create_after_moderation(user, + params[:software_info].merge({ + :environment => environment, + :name => params[:community][:name], + :identifier => params[:community][:identifier], + :image_builder => params[:community][:image_builder], + :license_info => @license_info, + :another_license_version => another_license_version, + :another_license_link => another_license_link })) + + add_admin_to_community + + if !environment.admins.include?(current_user.person) + session[:notice] = _('Your new software request will be evaluated by an'\ + 'administrator. You will be notified.') + redirect_to user.admin_url + else + redirect_to :controller => 'profile_editor', + :action => 'edit', + :profile => @community.identifier + end + end + + def update_software_atributes + @software_info = @profile.software_info + @list_libraries = @software_info.libraries + @list_databases = @software_info.software_databases + @list_languages = @software_info.software_languages + @list_operating_systems = @software_info.operating_systems + @disabled_public_software_field = disabled_public_software_field + + @license_version = @software_info.license_info.version + @license_id = @software_info.license_info.id + @another_license_version = "" + @another_license_link = "" + + license_another = LicenseInfo.find_by_version("Another") + if license_another && @software_info.license_info_id == license_another.id + @license_version = "Another" + @another_license_version = @software_info.license_info.version + @another_license_link = @software_info.license_info.link + end + end + + def set_software_as_template + software_template = Community['software'] + software_valid = !software_template.blank? && software_template.is_template && !params['community'].blank? + if software_valid + params['community']['template_id'] = software_template.id if software_valid + end + end + + def add_admin_to_community + unless params[:q].nil? + admins = params[:q].split(/,/).map{ |n| environment.people.find n.to_i } + admins.each do |admin| + @community.add_member(admin) + @community.add_admin(admin) + end + end + end + + def update_new_software_errors + if request.post? + @community.valid? if @community + @software_info.valid? if @software_info + @license_info.valid? if @license_info + add_software_erros + end + + + @error_community_name = @community.errors.include?(:name) ? "highlight-error" : "" if @community + @error_software_acronym = @software_info.errors.include?(:acronym) ? "highlight-error" : "" if @software_info + @error_software_domain = @community.errors.include?(:identifier) ? "highlight-error" : "" if @community + @error_software_finality = @software_info.errors.include?(:finality) ? "highlight-error" : "" if @software_info + @error_software_license = @license_info.errors.include?(:version) ? "highlight-error" : "" if @license_info + end +end diff --git a/src/noosfero-spb/software_communities/controllers/software_communities_plugin_profile_controller.rb b/src/noosfero-spb/software_communities/controllers/software_communities_plugin_profile_controller.rb new file mode 100644 index 0000000..9f80e73 --- /dev/null +++ b/src/noosfero-spb/software_communities/controllers/software_communities_plugin_profile_controller.rb @@ -0,0 +1,49 @@ +class SoftwareCommunitiesPluginProfileController < ProfileController + append_view_path File.join(File.dirname(__FILE__) + '/../views') + + before_filter :validate_download_params, only: [:download_file] + + ERROR_MESSAGES = { + :not_found => _("Could not find the download file"), + :invalid_params => _("Invalid download params") + } + + def download_file + download_block = DownloadBlock.find_by_id params[:block] + index = params[:download_index].to_i + + if download_block and (index < download_block.downloads.size) + download = Download.new(download_block.downloads[index]) + + download.total_downloads += 1 + download_block.downloads[index] = download.to_hash + download_block.save + + redirect_to download.link + else + session[:notice] = ERROR_MESSAGES[:not_found] + render_not_found + end + end + + private + + def validate_download_params + valid_block = (!params[:block].nil?) and (params[:block].to_i > 0) + valid_index = params[:download_index].to_i >= 0 + + if !valid_block or !valid_index + session[:notice] = ERROR_MESSAGES[:invalid_params] + safe_redirect_back + end + end + + def safe_redirect_back + begin + redirect_to :back + rescue ActionController::RedirectBackError + # There is no :back if it is a copied url + render_not_found + end + end +end diff --git a/src/noosfero-spb/software_communities/db/migrate/20140523132016_create_controlled_vocabulary_table.rb b/src/noosfero-spb/software_communities/db/migrate/20140523132016_create_controlled_vocabulary_table.rb new file mode 100644 index 0000000..8b5ec6e --- /dev/null +++ b/src/noosfero-spb/software_communities/db/migrate/20140523132016_create_controlled_vocabulary_table.rb @@ -0,0 +1,35 @@ +class CreateControlledVocabularyTable < ActiveRecord::Migration + def up + create_table :controlled_vocabulary do |t| + t.references :software_info + t.boolean :administration + t.boolean :agriculture + t.boolean :business_and_services + t.boolean :communication + t.boolean :culture + t.boolean :national_defense + t.boolean :economy_and_finances + t.boolean :education + t.boolean :energy + t.boolean :sports + t.boolean :habitation + t.boolean :industry + t.boolean :environment + t.boolean :research_and_development + t.boolean :social_security + t.boolean :social_protection + t.boolean :international_relations + t.boolean :sanitation + t.boolean :health + t.boolean :security_public_order + t.boolean :work + t.boolean :transportation + t.boolean :urbanism + + end + end + + def down + drop_table :controlled_vocabulary + end +end diff --git a/src/noosfero-spb/software_communities/db/migrate/20140528193902_create_license_infos_table.rb b/src/noosfero-spb/software_communities/db/migrate/20140528193902_create_license_infos_table.rb new file mode 100644 index 0000000..0024f7d --- /dev/null +++ b/src/noosfero-spb/software_communities/db/migrate/20140528193902_create_license_infos_table.rb @@ -0,0 +1,15 @@ +class CreateLicenseInfosTable < ActiveRecord::Migration + def self.up + create_table :license_infos do |t| + t.string :version + t.string :link + end + + link = "http://creativecommons.org/licenses/GPL/2.0/legalcode.pt" + LicenseInfo.create(:version => "CC-GPL-V2", :link => link) + end + + def self.down + drop_table :license_infos + end +end diff --git a/src/noosfero-spb/software_communities/db/migrate/20140528193905_create_software_infos_table.rb b/src/noosfero-spb/software_communities/db/migrate/20140528193905_create_software_infos_table.rb new file mode 100644 index 0000000..5d7944a --- /dev/null +++ b/src/noosfero-spb/software_communities/db/migrate/20140528193905_create_software_infos_table.rb @@ -0,0 +1,23 @@ +class CreateSoftwareInfosTable < ActiveRecord::Migration + def self.up + create_table :software_infos do |t| + t.references :license_info + t.references :community + t.boolean :e_mag, :default => false + t.boolean :icp_brasil,:default => false + t.boolean :intern, :default => false + t.boolean :e_ping, :default => false + t.boolean :e_arq, :default => false + t.string :name, :default => ' ' + t.string :operating_platform + t.string :demonstration_url + t.string :acronym + t.text :objectives + t.text :features + end + end + + def self.down + drop_table :software_infos + end +end diff --git a/src/noosfero-spb/software_communities/db/migrate/20140528193927_create_libraries_table.rb b/src/noosfero-spb/software_communities/db/migrate/20140528193927_create_libraries_table.rb new file mode 100644 index 0000000..3200454 --- /dev/null +++ b/src/noosfero-spb/software_communities/db/migrate/20140528193927_create_libraries_table.rb @@ -0,0 +1,14 @@ +class CreateLibrariesTable < ActiveRecord::Migration + def self.up + create_table :libraries do |t| + t.string :name + t.string :version + t.string :license + t.references :software_info + end + end + + def self.down + drop_table :libraries + end +end diff --git a/src/noosfero-spb/software_communities/db/migrate/20140528193956_create_programming_languages_table.rb b/src/noosfero-spb/software_communities/db/migrate/20140528193956_create_programming_languages_table.rb new file mode 100644 index 0000000..2c939eb --- /dev/null +++ b/src/noosfero-spb/software_communities/db/migrate/20140528193956_create_programming_languages_table.rb @@ -0,0 +1,13 @@ +class CreateProgrammingLanguagesTable < ActiveRecord::Migration + def self.up + create_table :programming_languages do |t| + t.string :name + end + + SoftwareHelper.create_list_with_file("plugins/software_communities/public/static/languages.txt", ProgrammingLanguage) + end + + def self.down + drop_table :programming_languages + end +end diff --git a/src/noosfero-spb/software_communities/db/migrate/20140528194044_create_database_descriptions_table.rb b/src/noosfero-spb/software_communities/db/migrate/20140528194044_create_database_descriptions_table.rb new file mode 100644 index 0000000..af2dda7 --- /dev/null +++ b/src/noosfero-spb/software_communities/db/migrate/20140528194044_create_database_descriptions_table.rb @@ -0,0 +1,14 @@ +class CreateDatabaseDescriptionsTable < ActiveRecord::Migration + def self.up + create_table :database_descriptions do |t| + t.string :name + end + + path_to_file = "plugins/software_communities/public/static/databases.txt" + SoftwareHelper.create_list_with_file(path_to_file, DatabaseDescription) + end + + def self.down + drop_table :database_descriptions + end +end diff --git a/src/noosfero-spb/software_communities/db/migrate/20140528194129_create_software_databases_table.rb b/src/noosfero-spb/software_communities/db/migrate/20140528194129_create_software_databases_table.rb new file mode 100644 index 0000000..a70c4b7 --- /dev/null +++ b/src/noosfero-spb/software_communities/db/migrate/20140528194129_create_software_databases_table.rb @@ -0,0 +1,14 @@ +class CreateSoftwareDatabasesTable < ActiveRecord::Migration + def self.up + create_table :software_databases do |t| + t.string :version + t.string :operating_system + t.references :database_description + t.references :software_info + end + end + + def self.down + drop_table :software_databases + end +end diff --git a/src/noosfero-spb/software_communities/db/migrate/20140528211914_create_software_languages_table.rb b/src/noosfero-spb/software_communities/db/migrate/20140528211914_create_software_languages_table.rb new file mode 100644 index 0000000..b08a37c --- /dev/null +++ b/src/noosfero-spb/software_communities/db/migrate/20140528211914_create_software_languages_table.rb @@ -0,0 +1,14 @@ +class CreateSoftwareLanguagesTable < ActiveRecord::Migration + def self.up + create_table :software_languages do |t| + t.references :software_info + t.references :programming_language + t.string :version + t.string :operating_system + end + end + + def self.down + drop_table :software_languages + end +end diff --git a/src/noosfero-spb/software_communities/db/migrate/20140710185444_create_operating_system_table.rb b/src/noosfero-spb/software_communities/db/migrate/20140710185444_create_operating_system_table.rb new file mode 100644 index 0000000..1d5bcdc --- /dev/null +++ b/src/noosfero-spb/software_communities/db/migrate/20140710185444_create_operating_system_table.rb @@ -0,0 +1,13 @@ +class CreateOperatingSystemTable < ActiveRecord::Migration + def up + create_table :operating_systems do |t| + t.string :name + t.string :version + t.references :software_info + end + end + + def down + drop_table :operating_systems + end +end diff --git a/src/noosfero-spb/software_communities/db/migrate/20140711144012_remove_name_from_software_info.rb b/src/noosfero-spb/software_communities/db/migrate/20140711144012_remove_name_from_software_info.rb new file mode 100644 index 0000000..4a72d82 --- /dev/null +++ b/src/noosfero-spb/software_communities/db/migrate/20140711144012_remove_name_from_software_info.rb @@ -0,0 +1,9 @@ +class RemoveNameFromSoftwareInfo < ActiveRecord::Migration + def up + remove_column :software_infos, :name + end + + def down + add_column :software_infos, :name, :string + end +end diff --git a/src/noosfero-spb/software_communities/db/migrate/20140714133901_create_operating_name_table.rb b/src/noosfero-spb/software_communities/db/migrate/20140714133901_create_operating_name_table.rb new file mode 100644 index 0000000..610bcec --- /dev/null +++ b/src/noosfero-spb/software_communities/db/migrate/20140714133901_create_operating_name_table.rb @@ -0,0 +1,14 @@ +class CreateOperatingNameTable < ActiveRecord::Migration + def up + create_table :operating_system_names do |t| + t.string :name + end + + path_to_file = "plugins/software_communities/public/static/operating_systems.txt" + SoftwareHelper.create_list_with_file(path_to_file, OperatingSystemName) + end + + def down + drop_table :operating_system_names + end +end diff --git a/src/noosfero-spb/software_communities/db/migrate/20140714135007_change_operating_systems_table.rb b/src/noosfero-spb/software_communities/db/migrate/20140714135007_change_operating_systems_table.rb new file mode 100644 index 0000000..313bb17 --- /dev/null +++ b/src/noosfero-spb/software_communities/db/migrate/20140714135007_change_operating_systems_table.rb @@ -0,0 +1,16 @@ +class ChangeOperatingSystemsTable < ActiveRecord::Migration + def up + change_table :operating_systems do |t| + t.remove :name + t.references :operating_system_name + end + + end + + def down + change_table :operating_systems do |t| + t.string :name + t.remove :operating_system_name_id + end + end +end diff --git a/src/noosfero-spb/software_communities/db/migrate/20140909185547_rename_controlled_vocabulary_to_software_categories.rb b/src/noosfero-spb/software_communities/db/migrate/20140909185547_rename_controlled_vocabulary_to_software_categories.rb new file mode 100644 index 0000000..0d9a7b1 --- /dev/null +++ b/src/noosfero-spb/software_communities/db/migrate/20140909185547_rename_controlled_vocabulary_to_software_categories.rb @@ -0,0 +1,9 @@ +class RenameControlledVocabularyToSoftwareCategories < ActiveRecord::Migration + def up + rename_table :controlled_vocabulary, :software_categories + end + + def down + rename_table :software_categories, :controlled_vocabulary + end +end diff --git a/src/noosfero-spb/software_communities/db/migrate/20141007140419_add_finality_field_to_software_table.rb b/src/noosfero-spb/software_communities/db/migrate/20141007140419_add_finality_field_to_software_table.rb new file mode 100644 index 0000000..941ce26 --- /dev/null +++ b/src/noosfero-spb/software_communities/db/migrate/20141007140419_add_finality_field_to_software_table.rb @@ -0,0 +1,9 @@ +class AddFinalityFieldToSoftwareTable < ActiveRecord::Migration + def up + add_column :software_infos, :finality, :string, :limit => 140 + end + + def down + remove_column :software_info, :finality + end +end diff --git a/src/noosfero-spb/software_communities/db/migrate/20141013193939_add_repository_link_to_software.rb b/src/noosfero-spb/software_communities/db/migrate/20141013193939_add_repository_link_to_software.rb new file mode 100644 index 0000000..61c557e --- /dev/null +++ b/src/noosfero-spb/software_communities/db/migrate/20141013193939_add_repository_link_to_software.rb @@ -0,0 +1,9 @@ +class AddRepositoryLinkToSoftware < ActiveRecord::Migration + def up + add_column :software_infos, :repository_link, :string + end + + def down + remove_column :software_infos, :repository_link + end +end diff --git a/src/noosfero-spb/software_communities/db/migrate/20141103180655_add_public_software_field_validation.rb b/src/noosfero-spb/software_communities/db/migrate/20141103180655_add_public_software_field_validation.rb new file mode 100644 index 0000000..563c2ee --- /dev/null +++ b/src/noosfero-spb/software_communities/db/migrate/20141103180655_add_public_software_field_validation.rb @@ -0,0 +1,9 @@ +class AddPublicSoftwareFieldValidation < ActiveRecord::Migration + def up + add_column :software_infos, :public_software, :boolean, :default => false + end + + def down + remove_column :software_infos, :public_software + end +end diff --git a/src/noosfero-spb/software_communities/db/migrate/20141105173616_add_first_edit_to_software.rb b/src/noosfero-spb/software_communities/db/migrate/20141105173616_add_first_edit_to_software.rb new file mode 100644 index 0000000..a8b058e --- /dev/null +++ b/src/noosfero-spb/software_communities/db/migrate/20141105173616_add_first_edit_to_software.rb @@ -0,0 +1,9 @@ +class AddFirstEditToSoftware < ActiveRecord::Migration + def up + add_column :software_infos, :first_edit, :boolean, :default => true + end + + def down + remove_column :software_infos, :first_edit + end +end diff --git a/src/noosfero-spb/software_communities/db/migrate/20141216183111_remove_operating_system_from_software_database.rb b/src/noosfero-spb/software_communities/db/migrate/20141216183111_remove_operating_system_from_software_database.rb new file mode 100644 index 0000000..6dcdf7e --- /dev/null +++ b/src/noosfero-spb/software_communities/db/migrate/20141216183111_remove_operating_system_from_software_database.rb @@ -0,0 +1,9 @@ +class RemoveOperatingSystemFromSoftwareDatabase < ActiveRecord::Migration + def up + remove_column :software_databases, :operating_system + end + + def down + add_column :software_databases, :operating_system, :string + end +end diff --git a/src/noosfero-spb/software_communities/db/migrate/20141216183459_remove_operating_system_from_software_language.rb b/src/noosfero-spb/software_communities/db/migrate/20141216183459_remove_operating_system_from_software_language.rb new file mode 100644 index 0000000..deb0f3f --- /dev/null +++ b/src/noosfero-spb/software_communities/db/migrate/20141216183459_remove_operating_system_from_software_language.rb @@ -0,0 +1,9 @@ +class RemoveOperatingSystemFromSoftwareLanguage < ActiveRecord::Migration + def up + remove_column :software_languages, :operating_system + end + + def down + add_column :software_languages, :operating_system, :string + end +end diff --git a/src/noosfero-spb/software_communities/db/migrate/20150209170529_add_settings_field_to_software_info.rb b/src/noosfero-spb/software_communities/db/migrate/20150209170529_add_settings_field_to_software_info.rb new file mode 100644 index 0000000..c75c536 --- /dev/null +++ b/src/noosfero-spb/software_communities/db/migrate/20150209170529_add_settings_field_to_software_info.rb @@ -0,0 +1,9 @@ +class AddSettingsFieldToSoftwareInfo < ActiveRecord::Migration + def up + add_column :software_infos, :settings, :text + end + + def down + remove_column :software_info, :settings + end +end diff --git a/src/noosfero-spb/software_communities/db/migrate/20150210182519_rename_cc_license.rb b/src/noosfero-spb/software_communities/db/migrate/20150210182519_rename_cc_license.rb new file mode 100644 index 0000000..9cc7fc8 --- /dev/null +++ b/src/noosfero-spb/software_communities/db/migrate/20150210182519_rename_cc_license.rb @@ -0,0 +1,13 @@ +class RenameCcLicense < ActiveRecord::Migration + def up + license = LicenseInfo.find_by_version "CC-GPL-V2" + license.version = "Creative Commons GPL V2" + license.save! + end + + def down + license = LicenseInfo.find_by_version "Creative Commons GPL V2" + license.version = "CC-GPL-V2" + license.save! + end +end diff --git a/src/noosfero-spb/software_communities/db/migrate/20150914185902_add_people_benefited_and_saved_value_to_organization_rating.rb b/src/noosfero-spb/software_communities/db/migrate/20150914185902_add_people_benefited_and_saved_value_to_organization_rating.rb new file mode 100644 index 0000000..d6c186c --- /dev/null +++ b/src/noosfero-spb/software_communities/db/migrate/20150914185902_add_people_benefited_and_saved_value_to_organization_rating.rb @@ -0,0 +1,11 @@ +class AddPeopleBenefitedAndSavedValueToOrganizationRating < ActiveRecord::Migration + def up + add_column :organization_ratings, :people_benefited, :integer + add_column :organization_ratings, :saved_value, :decimal + end + + def down + remove_column :organization_ratings, :people_benefited + remove_column :organization_ratings, :saved_value + end +end diff --git a/src/noosfero-spb/software_communities/features/deactivate_user.feature b/src/noosfero-spb/software_communities/features/deactivate_user.feature new file mode 100644 index 0000000..a6dccdc --- /dev/null +++ b/src/noosfero-spb/software_communities/features/deactivate_user.feature @@ -0,0 +1,45 @@ +Feature: deactivate user + As a environment admin + I want to be able deactivate my account + So that user data remains persisted and allows the reactivation of the account + + Background: + Given "SoftwareCommunitiesPlugin" plugin is enabled + And I am logged in as mpog_admin + And I go to /admin/plugins + And I check "SoftwareCommunitiesPlugin" + And I press "Save changes" + And I go to /account/logout + And the following users + | login | name | email | + | joaosilva | Joao Silva | joaosilva@example.com | + And I am logged in as "joaosilva" + + + @selenium-fixme + Scenario: successfull deactivation + Given I go to joaosilva's control panel + And I follow "Edit Profile" + And I follow "Delete profile" + And I follow "Yes, I am sure" + Then I am not logged in + When I go to /profile/joaosilva + Then I should see "This profile is inaccessible." + + @selenium-fixme + Scenario: successfull reactivation of account + Given I go to joaosilva's control panel + And I follow "Edit Profile" + And I follow "Delete profile" + And I follow "Yes, I am sure" + And I go to the homepage + When I follow "Login" + And I follow "New user" + And I fill in the following within ".no-boxes": + | e-Mail | joaosilva@example.com | + | Full name | 123 | + And I follow "Reactive account" + And I fill in the following within ".no-boxes": + | Username or Email | joaosilva@example.com | + And I press "Send instructions" + Then I should see "An e-mail was just sent to your e-mail address" diff --git a/src/noosfero-spb/software_communities/features/public_software_validation.feature b/src/noosfero-spb/software_communities/features/public_software_validation.feature new file mode 100644 index 0000000..6f26b1d --- /dev/null +++ b/src/noosfero-spb/software_communities/features/public_software_validation.feature @@ -0,0 +1,49 @@ +Feature: edit adherent fields + As a user + I want to edit adherent fields + to mantain my public software up to date. + + Background: + Given "SoftwareCommunitiesPlugin" plugin is enabled + And the following users + | login | name | email | + | joaosilva | Joao Silva | joaosilva@example.com | + | mariasilva | Maria Silva | mariasilva@example.com | + And the following softwares + | name | public_software | finality | + | basic software | true | basic software finality | + And SoftwareInfo has initial default values on database + And I am logged in as mpog_admin + And I go to /admin/plugins + And I check "SoftwareCommunitiesPlugin" + Then I press "Save changes" + + Scenario: Disable public software checkbox to non admin users + Given I am logged in as "joaosilva" + And I go to /myprofile/basic-software/plugin/software_communities/edit_software + And I follow "Specifications" + Then I should see "Public software" within ".public_software_disabled" + + Scenario: Enable public software checkbox to admin users + Given I am logged in as mpog_admin + And I go to /myprofile/basic-software/plugin/software_communities/edit_software + And I follow "Specifications" + Then I should see "Public software" within ".public_software_enabled" + + @selenium + Scenario: Show adherent fields when checkbox are checked + Given I am logged in as mpog_admin + And I go to /myprofile/basic-software/plugin/software_communities/edit_software + And I follow "Specifications" + And I uncheck "software[public_software]" + And I check "software[public_software]" + Then I should see "Adherent to e-ping ?" + + @selenium + Scenario: Don't show adherent fields when checkbox are not checked + Given I am logged in as mpog_admin + And I go to /myprofile/basic-software/plugin/software_communities/edit_software + And I follow "Specifications" + And I check "software[public_software]" + And I uncheck "software[public_software]" + Then I should not see "Adherent to e-ping ?" diff --git a/src/noosfero-spb/software_communities/features/software_block.feature b/src/noosfero-spb/software_communities/features/software_block.feature new file mode 100644 index 0000000..1f8cf8b --- /dev/null +++ b/src/noosfero-spb/software_communities/features/software_block.feature @@ -0,0 +1,48 @@ +Feature: edit adherent fields + As a user + I want to edit adherent fields + to mantain my public software up to date. + + Background: + Given "SoftwareCommunitiesPlugin" plugin is enabled + And I am logged in as mpog_admin + And I go to /admin/plugins + And I check "SoftwareCommunitiesPlugin" + And I press "Save changes" + And the following softwares + | name | public_software | finality | + | Public Software | true | some finality | + | Generic Software | false | some finality | + + Scenario: Add software block + Given I am logged in as mpog_admin + And I follow "Control panel" + And I follow "Edit sideboxes" + When I follow "Add a block" + And I choose "Softwares" + And I press "Add" + Then I should see "softwares" + + Scenario: Change software block to generic software block + Given I am logged in as mpog_admin + And I follow "Control panel" + And I follow "Edit sideboxes" + When I follow "Add a block" + And I choose "Softwares" + And I press "Add" + And I follow "Edit" within ".softwares-block" + And I select "Generic" from "block_software_type" + And I press "Save" + Then I should see "generic software" + + Scenario: Change software block to generic software block + Given I am logged in as mpog_admin + And I follow "Control panel" + And I follow "Edit sideboxes" + When I follow "Add a block" + And I choose "Softwares" + And I press "Add" + And I follow "Edit" within ".softwares-block" + And I select "Public" from "block_software_type" + And I press "Save" + Then I should see "public software" \ No newline at end of file diff --git a/src/noosfero-spb/software_communities/features/software_catalog.feature b/src/noosfero-spb/software_communities/features/software_catalog.feature new file mode 100644 index 0000000..e0988cf --- /dev/null +++ b/src/noosfero-spb/software_communities/features/software_catalog.feature @@ -0,0 +1,82 @@ +Feature: Search software + As a user + I want to be able to search catalogued software + So that I find a software that fit my needs + Background: + Given "SoftwareCommunitiesPlugin" plugin is enabled + And I am logged in as mpog_admin + And I go to /admin/plugins + And I check "SoftwareCommunitiesPlugin" + And I press "Save changes" + And I go to /account/logout + And the following categories + | name | display_in_menu | + | Software | true | + And the following categories + | parent | name | display_in_menu | + | Software | Health | true | + | Software | Education | true | + And the following softwares + | name | public_software | categories | finality | + | Software One | true | Health | some finality | + | Software Two | true | Health, Education | some finality | + | Software Three | false | Education | some finality | + + + Scenario: Show all "public_software" softwares when open search page + Given I go to /search/software_infos + Then I should see "Software One" + Then I should see "Software Two" + + Scenario: Show all "public_software" softwares when search software + Given I go to /search/software_infos + And I fill in "search-input" with "Software" + Then I should see "Software One" + Then I should see "Software Two" + + @selenium + Scenario: Show software "One" when searching for "Software One" + Given I go to /search/software_infos + And I fill in "search-input" with "One" + And I keyup on selector "#search-input" + Then I should see "Software One" + Then I should not see "Software Two" + + @selenium + Scenario: Show software ordered by name when "Name A-Z" is selected + Given I go to /search/software_infos + And I select "Name A-Z" from "sort" + And I press "Filter" + Then I should see "Software One" before "Software Two" + + @selenium + Scenario: Show software in reverse order by name when "Name Z-A" is selected + Given I go to /search/software_infos + And I select "Name Z-A" from "sort" + And I sleep for 3 seconds + Then I should see "Software Two" before "Software One" + + @selenium + Scenario: Show only "Software Two" when searching for "Education" category + Given I go to /search/software_infos + And I click on anything with selector "#filter-option-catalog-software" + And I check "Education" + Then I should see "Software Two" + And I should not see "Software One" + + @selenium + Scenario: Show both Software "One" and "Two" when searching for "Health" category + Given I go to /search/software_infos + And I click on anything with selector "#filter-option-catalog-software" + And I check "Health" + Then I should see "Software One" + And I should see "Software Two" + + @selenium + Scenario: Show not "public_software" when "Include in results" is checked + Given I go to /search/software_infos + And I click on anything with selector "#filter-option-catalog-software" + And I check "include_non_public" + Then I should see "Software One" + And I should see "Software Two" + And I should see "Software Three" diff --git a/src/noosfero-spb/software_communities/features/software_registration.feature b/src/noosfero-spb/software_communities/features/software_registration.feature new file mode 100644 index 0000000..86c7d7a --- /dev/null +++ b/src/noosfero-spb/software_communities/features/software_registration.feature @@ -0,0 +1,87 @@ +Feature: edit public software information + As a user + I want to add public software information to a software + So that I can have software communities on my network + + Background: + Given "SoftwareCommunitiesPlugin" plugin is enabled + And SoftwareInfo has initial default values on database + And I am logged in as mpog_admin + And I go to /admin/plugins + And I check "SoftwareCommunitiesPlugin" + And I press "Save changes" + And I go to /myprofile/mpog-admin + And the following softwares + | name | public_software | finality | + | basic software | true | basic software finality | + + @selenium + Scenario: Show SoftwareLangue fields when click in New Language + Given I go to /myprofile/basic-software/plugin/software_communities/edit_software + When I follow "Specifications" + And I follow "New language" + And I should see "3" of this selector ".software-language-table" + And I follow "Delete" + Then I should see "2" of this selector ".software-language-table" + #3 because one is always hidden + + @selenium + Scenario: Show databasefields when click in New database + Given I go to /myprofile/basic-software/plugin/software_communities/edit_software + When I follow "Specifications" + And I follow "New Database" + And I should see "3" of this selector ".database-table" + And I follow "Delete" + Then I should see "2" of this selector ".database-table" + #3 because one is always hidden + + @selenium + Scenario: Software database name should be an autocomplete + Given I go to /myprofile/basic-software/plugin/software_communities/edit_software + When I follow "Specifications" + And I follow "New Database" + And I type in "my" in autocomplete list ".database_autocomplete" and I choose "MySQL" + Then selector ".database_autocomplete" should have any "MySQL" + + @selenium + Scenario: Software database name should be an autocomplete + Given I go to /myprofile/basic-software/plugin/software_communities/edit_software + When I follow "Specifications" + And I follow "New language" + And I type in "py" in autocomplete list ".language_autocomplete" and I choose "Python" + Then selector ".database_autocomplete" should have any "Python" + + @selenium + Scenario: Create software with all dynamic table fields filled + Given I go to /myprofile/basic-software/plugin/software_communities/edit_software + When I follow "Specifications" + And I follow "New language" + And I type in "py" in autocomplete list ".language_autocomplete" and I choose "Python" + And I fill in "language__version" with "1.2.3" + And I follow "New Database" + And I type in "my" in autocomplete list ".database_autocomplete" and I choose "MySQL" + And I fill in "database__version" with "4.5.6" + Then I press "Save" + And I follow "Software Info" + And I follow "Specifications" + And selector ".language_autocomplete" should have any "Python" + And selector "#language__version" should have any "1.2.3" + And selector ".database_autocomplete" should have any "MySQL" + And selector "#database__version" should have any "4.5.6" + + @selenium + Scenario: Show license link when a license is selected + Given I am on mpog-admin's control panel + And I follow "Create a new software" + And I fill in "community_name_id" with "another software" + And I fill in "community-identifier" with "another-software" + And I fill in "software_info_finality" with "another software finality" + And I type in "gp" in autocomplete list "#license_info_version" and I choose "GPL-2" + And I should see "Read license" within "#version_link" + And I press "Create" + And I should see "Configure Software Community" + And I press "Save" + And I should see "Control Panel" + And I follow "Software Info" + And I type in "gp" in autocomplete list "#license_info_version" and I choose "GPL-3" + Then I should see "Read license" within "#version_link" diff --git a/src/noosfero-spb/software_communities/features/step_definitions/software_communities_steps.rb b/src/noosfero-spb/software_communities/features/step_definitions/software_communities_steps.rb new file mode 100644 index 0000000..e87447b --- /dev/null +++ b/src/noosfero-spb/software_communities/features/step_definitions/software_communities_steps.rb @@ -0,0 +1,202 @@ +Given /^SoftwareInfo has initial default values on database$/ do + LicenseInfo.create(:version=>"None", :link=>"") + LicenseInfo.create(:version=>"GPL-2", :link =>"www.gpl2.com") + LicenseInfo.create(:version=>"GPL-3", :link =>"www.gpl3.com") + + ProgrammingLanguage.create(:name=>"C") + ProgrammingLanguage.create(:name=>"C++") + ProgrammingLanguage.create(:name=>"Ruby") + ProgrammingLanguage.create(:name=>"Python") + + DatabaseDescription.create(:name => "Oracle") + DatabaseDescription.create(:name => "MySQL") + DatabaseDescription.create(:name => "Apache") + DatabaseDescription.create(:name => "PostgreSQL") + + OperatingSystemName.create(:name=>"Debian") + OperatingSystemName.create(:name=>"Fedora") + OperatingSystemName.create(:name=>"CentOS") +end + + +Given /^I type in "([^"]*)" in autocomplete list "([^"]*)" and I choose "([^"]*)"$/ do |typed, input_field_selector, should_select| + # Wait the page javascript load + sleep 1 + # Basicaly it, search for the input field, type something, wait for ajax end select an item + page.driver.browser.execute_script %Q{ + var search_query = "#{input_field_selector}.ui-autocomplete-input"; + var input = jQuery(search_query).first(); + + input.trigger('click'); + input.val('#{typed}'); + input.trigger('keydown'); + + window.setTimeout(function(){ + search_query = ".ui-menu-item a:contains('#{should_select}')"; + var typed = jQuery(search_query).first(); + + typed.trigger('mouseenter').trigger('click'); + console.log(jQuery('#license_info_id')); + }, 1000); + } + sleep 1 +end + + +Given /^the following software language$/ do |table| + table.hashes.each do |item| + programming_language = ProgrammingLanguage.where(:name=>item[:programing_language]).first + software_language = SoftwareLanguage::new + + software_language.programming_language = programming_language + software_language.version = item[:version] + software_language.operating_system = item[:operating_system] + + software_language.save! + end +end + +Given /^the following software databases$/ do |table| + table.hashes.each do |item| + database_description = DatabaseDescription.where(:name=>item[:database_name]).first + software_database = SoftwareDatabase::new + + software_database.database_description = database_description + software_database.version = item[:version] + software_database.operating_system = item[:operating_system] + + software_database.save! + end +end + + +Given /^the following operating systems$/ do |table| + table.hashes.each do |item| + operating_system_name = OperatingSystemName.where(:name=>item[:operating_system_name]).first + operating_system = OperatingSystem::new + + operating_system.operating_system_name = operating_system_name + operating_system.version = item[:version] + + operating_system.save! + end +end + +Given /^the following softwares$/ do |table| + table.hashes.each do |item| + software_info = SoftwareInfo.new + software_info.community = Community.create(:name=>item[:name]) + + software_info.finality = item[:finality] if item[:finality] + software_info.acronym = item[:acronym] if item[:acronym] + software_info.finality = item[:finality] if item[:finality] + software_info.finality ||= "something" + software_info.operating_platform = item[:operating_platform] if item[:operating_platform] + software_info.objectives = item[:objectives] if item[:objectives] + software_info.features = item[:features] if item[:features] + software_info.public_software = item[:public_software] == "true" if item[:public_software] + software_info.license_info = LicenseInfo.create :version=>"GPL - 1.0" + + if item[:software_language] + programming_language = ProgrammingLanguage.where(:name=>item[:software_language]).first + software_language = SoftwareLanguage.where(:programming_language_id=>programming_language).first + software_info.software_languages << software_language + end + + if item[:software_database] + database_description = DatabaseDescription.where(:name=>item[:software_database]).first + software_database = SoftwareDatabase.where(:database_description_id=>database_description).first + software_info.software_databases << software_database + end + + if item[:operating_system] + operating_system_name = OperatingSystemName.where(:name => item[:operating_system]).first + operating_system = OperatingSystem.where(:operating_system_name_id => operating_system_name).first + software_info.operating_systems << operating_system + end + + if item[:categories] + categories = item[:categories].split(",") + categories.map! {|category| category.strip} + + categories.each do |category_name| + category = Category.find_by_name category_name + software_info.community.categories << category + end + end + + software_info.save! + end +end + +# Dynamic table steps +Given /^I fill in first "([^"]*)" class with "([^"]*)"$/ do |selector, value| + evaluate_script "jQuery('#{selector}').first().attr('value', '#{value}') && true" +end + +Given /^I fill in last "([^"]*)" class with "([^"]*)"$/ do |selector, value| + evaluate_script "jQuery('#{selector}').last().attr('value', '#{value}') && true" +end + +Given /^I click on the first button with class "([^"]*)"$/ do |selector| + evaluate_script "jQuery('#{selector}').first().trigger('click') && true" +end + +Given /^I click on the last button with class "([^"]*)"$/ do |selector| + evaluate_script "jQuery('#{selector}').last().trigger('click') && true" +end + +Given /^the user "([^"]*)" has "([^"]*)" as secondary e\-mail$/ do |login, email| + User[login].update_attributes(:secondary_email => email) +end + +Given /^I click on anything with selector "([^"]*)"$/ do |selector| + evaluate_script "jQuery('#{selector}').trigger('click') && true" +end + +Given /^I should see "([^"]*)" of this selector "([^"]*)"$/ do |quantity, selector| + evaluate_script "jQuery('#{selector}').length == '#{quantity}'" +end + +Given /^selector "([^"]*)" should have any "([^"]*)"$/ do |selector, text| + evaluate_script "jQuery('#{selector}').html().indexOf('#{text}') != -1" +end + +Given /^I click on table number "([^"]*)" selector "([^"]*)" and select the value "([^"]*)"$/ do |number, selector, value| + evaluate_script "jQuery('#{selector}:nth-child(#{number}) select option:contains(\"#{value}\")').selected() && true" +end + +Given /^I fill with "([^"]*)" in field with name "([^"]*)" of table number "([^"]*)" with class "([^"]*)"$/ do |value, name, number, selector| + evaluate_script "jQuery('#{selector}:nth-child(#{number}) input[name=\"#{name}\"]').val('#{value}') && true" +end + +Given /^I sleep for (\d+) seconds$/ do |time| + sleep time.to_i +end + +Given /^I am logged in as mpog_admin$/ do + visit('/account/logout') + + user = User.new(:login => 'admin_user', :password => '123456', :password_confirmation => '123456', :email => 'admin_user@example.com') + person = Person.new :name=>"Mpog Admin", :identifier=>"mpog-admin" + user.person = person + user.save! + + user.activate + e = Environment.default + e.add_admin(user.person) + + visit('/account/login') + fill_in("Username", :with => user.login) + fill_in("Password", :with => '123456') + click_button("Log in") +end + +Given /^I should see "([^"]*)" before "([^"]*)"$/ do |before, after| + assert page.body.index("#{before}") < page.body.index("#{after}") +end + +Given /^I keyup on selector "([^"]*)"$/ do |selector| + selector_founded = evaluate_script("jQuery('#{selector}').trigger('keyup').length != 0") + selector_founded.should be_true +end diff --git a/src/noosfero-spb/software_communities/lib/categories_and_tags_block.rb b/src/noosfero-spb/software_communities/lib/categories_and_tags_block.rb new file mode 100644 index 0000000..e50f9c4 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/categories_and_tags_block.rb @@ -0,0 +1,29 @@ +class CategoriesAndTagsBlock < Block + + attr_accessible :show_name + + settings_items :show_name, :type => :boolean, :default => false + + def self.description + _('Categories and Tags') + end + + def help + _('This block displays the categories and tags of a software.') + end + + def content(args={}) + block = self + s = show_name + lambda do |object| + render( + :file => 'blocks/categories_and_tags', + :locals => { :block => block, :show_name => s } + ) + end + end + + def cacheable? + false + end +end diff --git a/src/noosfero-spb/software_communities/lib/categories_software_block.rb b/src/noosfero-spb/software_communities/lib/categories_software_block.rb new file mode 100644 index 0000000..97e1fda --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/categories_software_block.rb @@ -0,0 +1,35 @@ +class CategoriesSoftwareBlock < Block + + attr_accessible :show_name + + settings_items :show_name, :type => :boolean, :default => false + + def self.description + _('Categories Softwares') + end + + def help + _('This block displays the categories and the amount of softwares for + each category.') + end + + def content(args={}) + block = self + s = show_name + + software_category = Category.find_by_name("Software") + categories = [] + categories = software_category.children.sort if software_category + + lambda do |object| + render( + :file => 'blocks/categories_software', + :locals => { :block => block, :show_name => s, :categories => categories } + ) + end + end + + def cacheable? + false + end +end diff --git a/src/noosfero-spb/software_communities/lib/create_software.rb b/src/noosfero-spb/software_communities/lib/create_software.rb new file mode 100644 index 0000000..7b8b914 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/create_software.rb @@ -0,0 +1,113 @@ +class CreateSoftware < Task + include Rails.application.routes.url_helpers + + validates_presence_of :requestor_id, :target_id + validates_presence_of :name + + attr_accessible :name, :finality, :repository_link, :requestor, :environment, + :reject_explanation, :license_info + + alias :environment :target + alias :environment= :target= + + DATA_FIELDS = ['name', 'finality', 'license_info', 'repository_link'] + DATA_FIELDS.each do |field| + settings_items field.to_sym + end + + def perform + software_template = Community["software"] + if (!software_template.blank? && software_template.is_template) + template_id = software_template.id + end + + community = Community.create!(:name => self.name, + :template_id => template_id) + + community.environment = self.environment + community.add_admin(self.requestor) + + software = SoftwareInfo.create!(:finality => self.finality, + :repository_link => self.repository_link, :community_id => community.id, + :license_info => self.license_info) + end + + def title + _("New software") + end + + def subject + name + end + + def information + message = _('%{requestor} wants to create software %{subject} with') + if finality.blank? + { :message => message + _(' no finality.') } + else + { :message => message + _(' this finality:

    %{finality}

    '), + :variables => {:finality => finality} } + end + end + + def reject_details + true + end + + # tells if this request was rejected + def rejected? + self.status == Task::Status::CANCELLED + end + + # tells if this request was appoved + def approved? + self.status == Task::Status::FINISHED + end + + def target_notification_description + _('%{requestor} wants to create software %{subject}') % + {:requestor => requestor.name, :subject => subject} + end + + def target_notification_message + _("User \"%{user}\" just requested to create software %{software}. + You have to approve or reject it through the \"Pending Validations\" + section in your control panel.\n") % + { :user => self.requestor.name, :software => self.name } + end + + def task_created_message + _("Your request for registering software %{software} at %{environment} was + just sent. Environment administrator will receive it and will approve or + reject your request according to his methods and criteria. + + You will be notified as soon as environment administrator has a position + about your request.") % + { :software => self.name, :environment => self.target } + end + + def task_cancelled_message + _("Your request for registering software %{software} at %{environment} was + not approved by the environment administrator. The following explanation + was given: \n\n%{explanation}") % + { :software => self.name, + :environment => self.environment, + :explanation => self.reject_explanation } + end + + def task_finished_message + _('Your request for registering the software "%{software}" was approved. + You can access %{url} and finish the registration of your software.') % + { :software => self.name, :url => mount_url } + end + + private + + def mount_url + identifier = Community.where(:name => self.name).first.identifier + # The use of url_for doesn't allow the /social within the Public Software + # portal. That's why the url is mounted so 'hard coded' + url = "#{environment.top_url}/myprofile/#{identifier}/profile_editor/edit_software_community" + end + +end diff --git a/src/noosfero-spb/software_communities/lib/database_description.rb b/src/noosfero-spb/software_communities/lib/database_description.rb new file mode 100644 index 0000000..ff1e641 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/database_description.rb @@ -0,0 +1,15 @@ +class DatabaseDescription < ActiveRecord::Base + + SEARCHABLE_SOFTWARE_FIELDS = { + :name => 1 + } + + attr_accessible :name + + has_many :software_databases + has_many :software_infos, :through => :software_databases + + validates_presence_of :name + validates_uniqueness_of :name + +end diff --git a/src/noosfero-spb/software_communities/lib/database_helper.rb b/src/noosfero-spb/software_communities/lib/database_helper.rb new file mode 100644 index 0000000..af7f5e2 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/database_helper.rb @@ -0,0 +1,86 @@ +class DatabaseHelper < DynamicTableHelper + MODEL_NAME ="database" + FIELD_NAME = "database_description_id" + + def self.valid_database? database + return false if SoftwareHelper.all_table_is_empty?(database) + + database_description_id_list = DatabaseDescription.select(:id). + collect {|dd| dd.id} + + return database_description_id_list.include?( + database[:database_description_id].to_i + ) + end + + def self.list_database new_databases + return [] if new_databases.nil? or new_databases.length == 0 + list_databases = [] + + new_databases.each do |new_database| + if valid_database? new_database + database = SoftwareDatabase.new + + database.database_description_id = + new_database[:database_description_id] + + database.version = new_database[:version] + list_databases << database + end + end + + list_databases + end + + def self.valid_list_database? list_databases + return false if list_databases.nil? or list_databases.length == 0 + + list_databases.each do |database| + return false unless database.valid? + end + + true + end + + def self.database_as_tables(list_databases, disabled=false) + model_list = list_databases + model_list ||= [{:database_description_id => "", :version => ""}] + + models_as_tables model_list, "database_html_structure", disabled + end + + def self.database_html_structure(database_data, disabled) + database_id = database_data[:database_description_id] + database_name = if database_data[:database_description_id].blank? + "" + else + DatabaseDescription.find( + database_data[:database_description_id], + :select=>"name" + ).name + end + + data = { + model_name: MODEL_NAME, + field_name: FIELD_NAME, + name: { + value: database_name, + id: database_id, + hidden: true, + autocomplete: true, + select_field: false + }, + version: { + value: database_data[:version], + hidden: true, + delete: true + } + } + DATA[:license].delete(:value) + table_html_structure(data, disabled) + end + + def self.add_dynamic_table + database_as_tables(nil).first.call + end +end \ No newline at end of file diff --git a/src/noosfero-spb/software_communities/lib/download.rb b/src/noosfero-spb/software_communities/lib/download.rb new file mode 100644 index 0000000..0b63fed --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/download.rb @@ -0,0 +1,51 @@ +#FIX ME: Turn this into a proper model(next release) +class Download + def initialize data + @name = data[:name] + @link = data[:link] + @software_description = data[:software_description] + @minimum_requirements = data[:minimum_requirements] + @size = data[:size] + + @total_downloads = if data[:total_downloads] + data[:total_downloads] + else + 0 + end + end + + def self.validate_download_list download_list + download_list.select! do |download| + not download[:name].blank? + end + + download_list.map do |download| + Download.new(download).to_hash + end + end + + def to_hash + { + :name => @name, + :link => @link, + :software_description => @software_description, + :minimum_requirements => @minimum_requirements, + :size => @size, + :total_downloads => @total_downloads + } + end + + def total_downloads= value + if value.is_a? Integer + @total_downloads = value + end + end + + def total_downloads + @total_downloads + end + + def link + @link + end +end diff --git a/src/noosfero-spb/software_communities/lib/download_block.rb b/src/noosfero-spb/software_communities/lib/download_block.rb new file mode 100644 index 0000000..58048b7 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/download_block.rb @@ -0,0 +1,36 @@ +class DownloadBlock < Block + + attr_accessible :show_name, :downloads + + settings_items :show_name, :type => :boolean, :default => false + settings_items :downloads, :type => Array, :default => [] + + validate :download_values + + def download_values + self.downloads = Download.validate_download_list(self.downloads) + end + + def self.description + _('Download Stable Version') + end + + def help + _('This block displays the stable version of a software.') + end + + def content(args={}) + block = self + s = show_name + lambda do |object| + render( + :file => 'blocks/download', + :locals => { :block => block, :show_name => s } + ) + end + end + + def cacheable? + false + end +end diff --git a/src/noosfero-spb/software_communities/lib/dynamic_table_helper.rb b/src/noosfero-spb/software_communities/lib/dynamic_table_helper.rb new file mode 100644 index 0000000..1c9265e --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/dynamic_table_helper.rb @@ -0,0 +1,153 @@ +class DynamicTableHelper + extend( + ActionView::Helpers::TagHelper, + ActionView::Helpers::FormTagHelper, + ActionView::Helpers::FormOptionsHelper, + ActionView::Helpers::UrlHelper, + ApplicationHelper + ) + + COLLUMN_NAME = { + name: "name", + version: "version", + license: "license" + } + + LABEL_TEXT = { + :name => _("Name"), + :version => _("Version"), + :license => _("License") + } + + DATA = { + name: { + label: LABEL_TEXT[:name], + name: COLLUMN_NAME[:name] + }, + version: { + label: LABEL_TEXT[:version], + name: COLLUMN_NAME[:version] + } , + license: { + label: LABEL_TEXT[:license], + name: COLLUMN_NAME[:license], + delete: true + } + } + @@disabled = false + + def self.table_html_structure data={}, disabled=false + @@disabled = disabled + Proc::new do + content_tag :table , generate_table_lines(data), :class => "dynamic-table" + end + end + + def self.generate_table_lines data={} + @@model = data[:model_name] + @@field_name = data[:field_name] + @@hidden_label = data[:name][:value] + @@hidden_id = data[:name][:id] + + row_data = prepare_row_data data + + table_line_data = [ + self.table_line(row_data[:name]), + self.table_line(row_data[:version]) + ] + + if row_data[:license].has_key?(:value) + table_line_data << self.table_line(row_data[:license]) + end + + table_line_data.join() + end + + def self.table_line row_data={} + unless row_data.blank? + content_tag :tr, [ + self.label_collumn(row_data[:label]), + self.value_collumn( + row_data[:value], + row_data[:name], + row_data[:autocomplete], + row_data[:select_field], + row_data[:options] + ), + self.hidden_collumn(row_data[:delete], row_data[:hidden]) + ].join() + end + end + + def self.label_collumn label="" + content_tag :td, label_tag(label) + end + + def self.value_collumn value="", name="", autocomplete=false, select_field=false, options=[] + html_options = + if autocomplete + { + :class => "#{@@model}_autocomplete", + :placeholder => _("Autocomplete field, type something") + } + else + {} + end + + html_options[:disabled] = @@disabled + + content = if select_field + select_tag("#{@@model}[][#{@@field_name}]", options, html_options) + elsif autocomplete + text_field_tag("#{@@model}_autocomplete", value, html_options) + else + text_field_tag("#{@@model}[][#{name}]", value, html_options) + end + + content_tag :td, content + end + + def self.hidden_collumn delete=false, hidden_data=false + value = + if @@disabled + nil + elsif delete + button_without_text( + :delete, _('Delete'), "#" , :class=>"delete-dynamic-table" + ) + elsif hidden_data + hidden_field_tag( + "#{@@model}[][#{@@field_name}]", + @@hidden_id, + :class => "#{@@field_name}", + :data => {:label => @@hidden_label } #check how to get the name of an object of the current model + ) + else + nil + end + + content_tag(:td, value, :align => 'right') + end + + def self.prepare_row_data data + row_data = { + name: DATA[:name], + version: DATA[:version], + license: DATA[:license] + } + + row_data[:name].merge! data[:name] + row_data[:version].merge! data[:version] + row_data[:license].merge! data[:license] if data.has_key? :license + + row_data + end + + def self.models_as_tables models, callback, disabled=false + lambdas_list = [] + + models.map do |model| + send(callback, model, disabled) + end + end +end \ No newline at end of file diff --git a/src/noosfero-spb/software_communities/lib/ext/category.rb b/src/noosfero-spb/software_communities/lib/ext/category.rb new file mode 100644 index 0000000..0c3008c --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/ext/category.rb @@ -0,0 +1,35 @@ +require_dependency 'category' + +class Category + SOFTWARE_CATEGORIES = [ + _('Agriculture, Fisheries and Extraction'), + _('Science, Information and Communication'), + _('Economy and Finances'), + _('Public Administration'), + _('Habitation, Sanitation and Urbanism'), + _('Individual, Family and Society'), + _('Health'), + _('Social Welfare and Development'), + _('Defense and Security'), + _('Education'), + _('Government and Politics'), + _('Justice and Legislation'), + _('International Relationships'), + _('Transportation and Transit') + ] + + scope :software_categories, lambda { + software_category = Category.find_by_name("Software") + if software_category.nil? + [] + else + software_category.children + end + } + + def software_infos + software_list = self.communities + software_list.collect { |x| software_list.delete(x) unless x.software? } + software_list + end +end diff --git a/src/noosfero-spb/software_communities/lib/ext/communities_block.rb b/src/noosfero-spb/software_communities/lib/ext/communities_block.rb new file mode 100644 index 0000000..4a5fcaa --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/ext/communities_block.rb @@ -0,0 +1,45 @@ +require_dependency 'communities_block' + +class CommunitiesBlock + + def profile_list + result = get_visible_profiles + result.slice(0..get_limit-1) + end + + def profile_count + profile_list.count + end + + private + + def get_visible_profiles + visible_profiles = profiles.visible.includes( + [:image,:domains,:preferred_domain,:environment] + ) + + delete_communities = [] + valid_communities_string = Community.get_valid_communities_string + Community.all.each{|community| delete_communities << community.id unless eval(valid_communities_string)} + + visible_profiles = visible_profiles.where(["profiles.id NOT IN (?)", delete_communities]) unless delete_communities.empty? + + if !prioritize_profiles_with_image + return visible_profiles.all( + :limit => get_limit, + :order => 'profiles.updated_at DESC' + ).sort_by {rand} + elsif profiles.visible.with_image.count >= get_limit + return visible_profiles.with_image.all( + :limit => get_limit * 5, + :order => 'profiles.updated_at DESC' + ).sort_by {rand} + else + visible_profiles = visible_profiles.with_image.sort_by {rand} + + visible_profiles.without_image.all( + :limit => get_limit * 5, :order => 'profiles.updated_at DESC' + ).sort_by {rand} + return visible_profiles + end + end +end diff --git a/src/noosfero-spb/software_communities/lib/ext/community.rb b/src/noosfero-spb/software_communities/lib/ext/community.rb new file mode 100644 index 0000000..6f8602f --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/ext/community.rb @@ -0,0 +1,66 @@ +require_dependency 'community' + +class Community + + SEARCHABLE_SOFTWARE_FIELDS = { + :name => 1, + :identifier => 2, + :nickname => 3 + } + + attr_accessible :visible + + has_one :software_info, :dependent=>:destroy + + settings_items :hits, :type => :integer, :default => 0 + + def self.create_after_moderation(requestor, attributes = {}) + community = Community.new(attributes) + + if community.environment.enabled?('admin_must_approve_new_communities') && + !community.environment.admins.include?(requestor) + + cc = CreateCommunity.create(attributes.merge(:requestor => requestor)) + else + community = Community.create(attributes) + community.add_admin(requestor) + end + community + end + + def self.get_valid_communities_string + remove_of_communities_methods = Community.instance_methods.select{|m| m =~ /remove_of_community_search/} + valid_communities_string = "!(" + remove_of_communities_methods.each do |method| + valid_communities_string += "community.send('#{method}') || " + end + valid_communities_string = valid_communities_string[0..-5] + valid_communities_string += ")" + + valid_communities_string + end + + def software? + return !software_info.nil? + end + + def deactivate + self.visible = false + self.save! + end + + def activate + self.visible = true + self.save! + end + + def remove_of_community_search_software? + return software? + end + + def hit + self.hits += 1 + self.save! + end + +end diff --git a/src/noosfero-spb/software_communities/lib/ext/organization_rating.rb b/src/noosfero-spb/software_communities/lib/ext/organization_rating.rb new file mode 100644 index 0000000..cedb7ca --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/ext/organization_rating.rb @@ -0,0 +1,5 @@ +require_dependency "organization_rating" + +class OrganizationRating + attr_accessible :people_benefited, :saved_value +end diff --git a/src/noosfero-spb/software_communities/lib/ext/person.rb b/src/noosfero-spb/software_communities/lib/ext/person.rb new file mode 100644 index 0000000..2ccb9a2 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/ext/person.rb @@ -0,0 +1,24 @@ +# encoding: utf-8 + +require_dependency 'person' + +class Person + + delegate :login, :to => :user, :prefix => true + + def software? + false + end + + def softwares + softwares = [] + self.communities.each do |community| + if community.software? + softwares << community + end + end + + softwares + end + +end diff --git a/src/noosfero-spb/software_communities/lib/ext/profile_controller.rb b/src/noosfero-spb/software_communities/lib/ext/profile_controller.rb new file mode 100644 index 0000000..e0619f6 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/ext/profile_controller.rb @@ -0,0 +1,64 @@ +require_dependency 'profile_controller' + +class ProfileController + + before_filter :hit_view_page + + def communities + type = [] + params[:type].downcase! unless params[:type].nil? + + if params[:type] == "software" + type = profile.softwares + elsif params[:type] == "institution" + type = profile.institutions + else + profile.communities.select do |community| + type << community unless community.software? || community.institution? + end + end + + if is_cache_expired?(profile.communities_cache_key(params)) + @communities = type.paginate(:per_page => per_page, :page => params[:npage], :total_entries => type.count) + end + end + + def members + if is_cache_expired?(profile.members_cache_key(params)) + sort = (params[:sort] == 'desc') ? params[:sort] : 'asc' + @profile_admins = profile.admins.includes(relations_to_include).order("name #{sort}").paginate(:per_page => members_per_page, :page => params[:npage]) + @profile_members = profile.members.order("name #{sort}").paginate(:per_page => members_per_page, :page => params[:npage]) + @profile_members_url = url_for(:controller => 'profile', :action => 'members') + end + end + + def user_is_a_bot? + user_agent= request.env["HTTP_USER_AGENT"] + user_agent.blank? || + user_agent.match(/bot/) || + user_agent.match(/spider/) || + user_agent.match(/crawler/) || + user_agent.match(/\(.*https?:\/\/.*\)/) + end + + def already_visited?(element) + user_id = if user.nil? then -1 else current_user.id end + user_id = "#{user_id}_#{element.id}_#{element.class}" + + if cookies.signed[:visited] == user_id + return true + else + cookies.permanent.signed[:visited] = user_id + return false + end + end + + def hit_view_page + if profile + community = profile + community.hit unless user_is_a_bot? || + already_visited?(community) || + community.class != Community + end + end +end diff --git a/src/noosfero-spb/software_communities/lib/ext/profile_editor_controller.rb b/src/noosfero-spb/software_communities/lib/ext/profile_editor_controller.rb new file mode 100644 index 0000000..3645f1f --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/ext/profile_editor_controller.rb @@ -0,0 +1,28 @@ +require_dependency 'profile_editor_controller' + +class ProfileEditorController + + before_filter :redirect_to_edit_software_community, :only => [:edit] + + def edit_software_community + @profile_data = profile + @possible_domains = profile.possible_domains + @first_edit = profile.software_info.first_edit? + + if @first_edit + profile.software_info.first_edit = false + profile.software_info.save! + end + + edit if request.post? + end + + protected + + def redirect_to_edit_software_community + if profile.class == Community && profile.software? + redirect_to :action => 'edit_software_community' + end + end + +end diff --git a/src/noosfero-spb/software_communities/lib/ext/profile_helper.rb b/src/noosfero-spb/software_communities/lib/ext/profile_helper.rb new file mode 100644 index 0000000..7268d4b --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/ext/profile_helper.rb @@ -0,0 +1,26 @@ +require_dependency 'profile_helper' + +module ProfileHelper + PERSON_CATEGORIES[:mpog_profile_information] = [:secondary_email, + :institutions] + + def display_mpog_field(title, profile, field, force = false) + unless force || profile.may_display_field_to?(field, user) + return '' + end + value = profile.send(field) + if !value.blank? + if block_given? + value = yield(value) + end + content_tag( + 'tr', + content_tag('td', title, :class => 'field-name') + + content_tag('td', value) + ) + else + '' + end + end + +end diff --git a/src/noosfero-spb/software_communities/lib/ext/search_controller.rb b/src/noosfero-spb/software_communities/lib/ext/search_controller.rb new file mode 100644 index 0000000..e96cd63 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/ext/search_controller.rb @@ -0,0 +1,169 @@ +require_dependency 'search_controller' + +class SearchController + + def communities + delete_communities = [] + valid_communities_string = Community.get_valid_communities_string + Community.all.each{|community| delete_communities << community.id unless eval(valid_communities_string)} + + @scope = visible_profiles(Community) + @scope = @scope.where(["id NOT IN (?)", delete_communities]) unless delete_communities.empty? + + full_text_search + end + + def software_infos + prepare_software_search_page + results = filter_software_infos_list + @software_count = results.count + results = results.paginate(:per_page => @per_page, :page => params[:page]) + @searches[@asset] = {:results => results} + @search = results + + render :layout=>false if request.xhr? + end + + protected + + def filter_communities_list + unfiltered_list = visible_profiles(Community) + + unless params[:query].nil? + unfiltered_list = unfiltered_list.select do |com| + com.name.downcase =~ /#{params[:query].downcase}/ + end + end + + communities_list = [] + unfiltered_list.each do |profile| + if profile.class == Community && !profile.is_template? && yield(profile) + communities_list << profile + end + end + + communities_list + end + + def filter_software_infos_list + filtered_software_list = get_filtered_software_list + filtered_community_list = get_communities_list(filtered_software_list) + sort_communities_list filtered_community_list + end + + def get_filter_category_ids + category_ids = [] + unless params[:selected_categories_id].blank? + category_ids = params[:selected_categories_id] + end + category_ids.map(&:to_i) + end + + def get_filtered_software_list + params[:query] ||= "" + visible_communities = visible_profiles(Community) + + filtered_software_list = SoftwareInfo.search_by_query(params[:query]) + + if params[:only_softwares] + params[:only_softwares].collect!{ |software_name| software_name.to_slug } + filtered_software_list = SoftwareInfo.all.select{ |s| params[:only_softwares].include?(s.identifier) } + @public_software_selected = false + end + + filtered_software_list.select!{ |software| visible_communities.include?(software.community) } + category_ids = get_filter_category_ids + + unless category_ids.empty? + filtered_software_list.select! do |software| + if software.nil? || software.community.nil? + false + else + result_ids = (software.community.category_ids & category_ids).sort + result_ids == category_ids.sort + end + end + end + + filtered_software_list + end + + def get_communities_list software_list + filtered_community_list = [] + software_list.each do |software| + if !@public_software_selected || software.public_software? + filtered_community_list << software.community unless software.community.nil? + end + end + filtered_community_list + end + + def sort_communities_list communities_list + communities_list.sort! {|a, b| a.name.downcase <=> b.name.downcase} + + if params[:sort] && params[:sort] == "desc" + communities_list.reverse! + elsif params[:sort] && params[:sort] == "relevance" + communities_list = sort_by_relevance(communities_list, params[:query]){ |community| [community.software_info.finality, community.name] } + end + communities_list + end + + def prepare_software_search_page + prepare_software_infos_params + prepare_software_infos_message + prepare_software_infos_category_groups + prepare_software_infos_category_enable + end + + def prepare_software_infos_params + @titles[:software_infos] = _("Result Search") + @selected_categories_id = params[:selected_categories_id] + @selected_categories_id ||= [] + @selected_categories_id = @selected_categories_id.map(&:to_i) + @all_selected = params[:software_type] == "all" + @public_software_selected = !@all_selected + @per_page = prepare_per_page + end + + def prepare_per_page + return 15 if params[:software_display].nil? + + if params[:software_display] == "all" + SoftwareInfo.count + else + params[:software_display].to_i + end + end + + def prepare_software_infos_message + @message_selected_options = "" + + @selected_categories = [] + unless @selected_categories_id.empty? + @message_selected_options = _("Selected options: ") + + @selected_categories = Category.find(@selected_categories_id) + @message_selected_options += @selected_categories.collect { |category| + "#{category.name}; " + }.join() + end + end + + def prepare_software_infos_category_groups + @categories = Category.software_categories.sort{|a, b| a.name <=> b.name} + end + + def prepare_software_infos_category_enable + @enabled_check_box = Hash.new + categories = Category.software_categories + + categories.each do |category| + if category.software_infos.count > 0 + @enabled_check_box[category] = :enabled + else + @enabled_check_box[category] = :disabled + end + end + end +end diff --git a/src/noosfero-spb/software_communities/lib/ext/search_helper.rb b/src/noosfero-spb/software_communities/lib/ext/search_helper.rb new file mode 100644 index 0000000..025a3b8 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/ext/search_helper.rb @@ -0,0 +1,33 @@ +require_dependency 'search_helper' + +module SearchHelper + + COMMON_PROFILE_LIST_BLOCK ||= [] + COMMON_PROFILE_LIST_BLOCK << :software_infos + + def sort_by_relevance list, text + text_splited = text.split + + element_relevance = {} + + list.each do |element| + relevance = 1 + relevance_list = yield(element) + + text_splited.each do |t| + relevance_list.count.times do |i| + relevance = -1 * i if relevance_list[i].downcase.include?(t.downcase) + end + end + + element_relevance[element] = relevance + end + + list.sort! do |a, b| + element_relevance[a] <=> element_relevance[b] + end + + list + end + +end diff --git a/src/noosfero-spb/software_communities/lib/library.rb b/src/noosfero-spb/software_communities/lib/library.rb new file mode 100644 index 0000000..d4b2b56 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/library.rb @@ -0,0 +1,10 @@ +class Library < ActiveRecord::Base + attr_accessible :name, :version, :license, :software_info_id + + validates :name, :version, :license, + presence: { message: _("can't be blank") }, + length: { + maximum: 20, + too_long: _("Too long (maximum is 20 characters)") + } +end diff --git a/src/noosfero-spb/software_communities/lib/library_helper.rb b/src/noosfero-spb/software_communities/lib/library_helper.rb new file mode 100644 index 0000000..dfb0953 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/library_helper.rb @@ -0,0 +1,62 @@ +class LibraryHelper < DynamicTableHelper + MODEL_NAME = "library" + + def self.list_library new_libraries + return [] if new_libraries.nil? or new_libraries.length == 0 + list_libraries = [] + + new_libraries.each do |new_library| + unless SoftwareHelper.all_table_is_empty? new_library + library = Library.new + library.name = new_library[:name] + library.version = new_library[:version] + library.license = new_library[:license] + list_libraries << library + end + end + + list_libraries + end + + def self.valid_list_library? list_libraries + return true if list_libraries.nil? or list_libraries.length == 0 + + list_libraries.each do |library| + return false unless library.valid? + end + + true + end + + def self.libraries_as_tables list_libraries, disabled=false + model_list = list_libraries + model_list ||= [{:name=>"", :version=>"", :license=>""}] + + models_as_tables model_list, "library_html_structure", disabled + end + + def self.library_html_structure library_data, disabled + data = { + model_name: MODEL_NAME, + name: { + value: library_data[:name], + hidden: false, + autocomplete: false, + select_field: false + }, + version: { + value: library_data[:version], + delete: false + }, + license: { + value: library_data[:license] + } + } + + table_html_structure(data, disabled) + end + + def self.add_dynamic_table + libraries_as_tables(nil).first.call + end +end \ No newline at end of file diff --git a/src/noosfero-spb/software_communities/lib/license_helper.rb b/src/noosfero-spb/software_communities/lib/license_helper.rb new file mode 100644 index 0000000..af390cb --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/license_helper.rb @@ -0,0 +1,5 @@ +module LicenseHelper + def self.getListLicenses + LicenseInfo.all + end +end \ No newline at end of file diff --git a/src/noosfero-spb/software_communities/lib/license_info.rb b/src/noosfero-spb/software_communities/lib/license_info.rb new file mode 100644 index 0000000..6f9bfe7 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/license_info.rb @@ -0,0 +1,8 @@ +class LicenseInfo < ActiveRecord::Base + attr_accessible :version, :link + + validates_presence_of :version + + has_many :software_info + +end diff --git a/src/noosfero-spb/software_communities/lib/operating_system.rb b/src/noosfero-spb/software_communities/lib/operating_system.rb new file mode 100644 index 0000000..b2763e9 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/operating_system.rb @@ -0,0 +1,14 @@ +class OperatingSystem < ActiveRecord::Base + attr_accessible :version + + belongs_to :software_info + belongs_to :operating_system_name + + validates :operating_system_name, presence: true + validates :version, + presence: true, + length: { + maximum: 20, + too_long: _('too long (maximum is 20 characters)') + } +end diff --git a/src/noosfero-spb/software_communities/lib/operating_system_helper.rb b/src/noosfero-spb/software_communities/lib/operating_system_helper.rb new file mode 100644 index 0000000..d5bd9a9 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/operating_system_helper.rb @@ -0,0 +1,71 @@ +class OperatingSystemHelper < DynamicTableHelper + MODEL_NAME = "operating_system" + FIELD_NAME = "operating_system_name_id" + + def self.list_operating_system new_operating_systems + return [] if new_operating_systems.nil? or new_operating_systems.length == 0 + list_operating_system = [] + + new_operating_systems.each do |new_operating_system| + unless SoftwareHelper.all_table_is_empty?( + new_operating_system, + ["operating_system_name_id"] + ) + + operating_system = OperatingSystem.new + operating_system.operating_system_name = OperatingSystemName.find( + new_operating_system[:operating_system_name_id] + ) + + operating_system.version = new_operating_system[:version] + list_operating_system << operating_system + end + end + list_operating_system + end + + def self.valid_list_operating_system? list_operating_system + return !(list_operating_system.nil? || list_operating_system.length == 0) + + list_operating_system.each do |operating_system| + return false unless operating_system.valid? + end + true + end + + def self.operating_system_as_tables(list_operating_system, disabled=false) + model_list = list_operating_system + model_list ||= [{:operating_system_name_id => "", :version => ""}] + + models_as_tables model_list, "operating_system_html_structure", disabled + end + + def self.operating_system_html_structure (operating_system_data, disabled) + select_options = options_for_select( + OperatingSystemName.all.collect {|osn| [osn.name, osn.id]}, + operating_system_data[:operating_system_name_id] + ) + + data = { + model_name: MODEL_NAME, + field_name: FIELD_NAME, + name: { + hidden: false, + autocomplete: false, + select_field: true, + options: select_options + }, + version: { + value: operating_system_data[:version], + hidden: true, + delete: true + } + } + DATA[:license].delete(:value) + table_html_structure(data, disabled) + end + + def self.add_dynamic_table + operating_system_as_tables(nil).first.call + end +end diff --git a/src/noosfero-spb/software_communities/lib/operating_system_name.rb b/src/noosfero-spb/software_communities/lib/operating_system_name.rb new file mode 100644 index 0000000..cc59602 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/operating_system_name.rb @@ -0,0 +1,10 @@ +class OperatingSystemName < ActiveRecord::Base + attr_accessible :name + + validates_presence_of :name + validates_uniqueness_of :name + + has_many :operating_systems + has_many :software_infos, :through => :operating_systems + +end diff --git a/src/noosfero-spb/software_communities/lib/programming_language.rb b/src/noosfero-spb/software_communities/lib/programming_language.rb new file mode 100644 index 0000000..193225c --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/programming_language.rb @@ -0,0 +1,15 @@ +class ProgrammingLanguage < ActiveRecord::Base + + SEARCHABLE_SOFTWARE_FIELDS = { + :name => 1 + } + + attr_accessible :name + + validates_presence_of :name + validates_uniqueness_of :name + + has_many :software_languages + has_many :software_infos, :through => :software_languages + +end diff --git a/src/noosfero-spb/software_communities/lib/repository_block.rb b/src/noosfero-spb/software_communities/lib/repository_block.rb new file mode 100644 index 0000000..483da7a --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/repository_block.rb @@ -0,0 +1,29 @@ +class RepositoryBlock < Block + + attr_accessible :show_name + + settings_items :show_name, :type => :boolean, :default => false + + def self.description + _('Repository Link') + end + + def help + _('This block displays the repository link of a software.') + end + + def content(args={}) + block = self + s = show_name + lambda do |object| + render( + :file => 'blocks/repository', + :locals => { :block => block, :show_name => s } + ) + end + end + + def cacheable? + false + end +end diff --git a/src/noosfero-spb/software_communities/lib/search_catalog_block.rb b/src/noosfero-spb/software_communities/lib/search_catalog_block.rb new file mode 100644 index 0000000..4f7b517 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/search_catalog_block.rb @@ -0,0 +1,29 @@ +class SearchCatalogBlock < Block + + attr_accessible :show_name + + settings_items :show_name, :type => :boolean, :default => false + + def self.description + _('Search Softwares catalog') + end + + def help + _('This block displays the search categories field ') + end + + def content(args={}) + block = self + s = show_name + lambda do |object| + render( + :file => 'blocks/search_catalog', + :locals => { :block => block, :show_name => s } + ) + end + end + + def cacheable? + false + end +end diff --git a/src/noosfero-spb/software_communities/lib/software_communities_plugin.rb b/src/noosfero-spb/software_communities/lib/software_communities_plugin.rb new file mode 100644 index 0000000..d11c176 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/software_communities_plugin.rb @@ -0,0 +1,164 @@ +class SoftwareCommunitiesPlugin < Noosfero::Plugin + include ActionView::Helpers::TagHelper + include ActionView::Helpers::FormTagHelper + include ActionView::Helpers::FormOptionsHelper + include ActionView::Helpers::JavaScriptHelper + include ActionView::Helpers::AssetTagHelper + include FormsHelper + include ActionView::Helpers + include ActionDispatch::Routing + include Rails.application.routes.url_helpers + + def self.plugin_name + 'SoftwareCommunitiesPlugin' + end + + def self.plugin_description + _('Add Public Software and MPOG features.') + end + + def profile_tabs + if context.profile.community? + return profile_tabs_software if context.profile.software? + end + end + + def control_panel_buttons + if context.profile.software? + return software_info_button + elsif context.profile.person? + return create_new_software_button + end + end + + def self.extra_blocks + { + SoftwaresBlock => { :type => [Environment, Person] }, + SoftwareInformationBlock => { :type => [Community] }, + DownloadBlock => { :type => [Community] }, + RepositoryBlock => { :type => [Community] }, + CategoriesAndTagsBlock => { :type => [Community] }, + CategoriesSoftwareBlock => { :type => [Environment] }, + SearchCatalogBlock => { :type => [Environment] }, + SoftwareHighlightsBlock => { :type => [Environment] }, + SoftwareTabDataBlock => {:type => [Community], :position => 1}, + WikiBlock => {:type => [Community]}, + StatisticBlock => { :type => [Community] } + } + end + + def stylesheet? + true + end + + def js_files + %w( + vendor/jquery.maskedinput.min.js + vendor/modulejs-1.5.0.min.js + vendor/jquery.js + lib/noosfero-root.js + lib/select-element.js + lib/select-field-choices.js + lib/auto-complete.js + lib/software-catalog-component.js + views/control-panel.js + views/edit-software.js + views/new-software.js + views/search-software-catalog.js + views/profile-tabs-software.js + views/new-community.js + views/comments-software-extra-fields.js + blocks/software-download.js + initializer.js + app.js + ) + end + + module Hotspots + def display_organization_average_rating organization + nil + end + end + + def organization_ratings_plugin_comments_extra_fields + if context.profile.software? + Proc::new { render :file => 'comments_extra_fields' } + end + end + + def organization_ratings_plugin_star_message + Proc::new do _("Rate this software") end + end + + def organization_ratings_title + title = _('Use reports') + Proc::new do "

    #{title}

    " end + end + + def organization_ratings_plugin_extra_fields_show_data user_rating + Proc::new { + if logged_in? + is_admin = environment.admins.include?(current_user.person) + is_admin ||= user_rating.organization.admins.include?(current_user.person) + + if is_admin and profile.software? + + render :file => 'organization_ratings_extra_fields_show_data', + :locals => {:user_rating => user_rating} + end + end + } + end + + # FIXME - if in error log apears has_permission?, try to use this method + def has_permission?(person, permission, target) + person.has_permission_without_plugins?(permission, target) + end + + protected + + def software_info_transaction + SoftwareInfo.transaction do + context.profile. + software_info. + update_attributes!(context.params[:software_info]) + end + end + + def license_transaction + license = LicenseInfo.find(context.params[:version]) + context.profile.software_info.license_info = license + context.profile.software_info.save! + end + + private + + def software_info_button + { + :title => _('Software Info'), + :icon => 'edit-profile-group control-panel-software-link', + :url => { + :controller => 'software_communities_plugin_myprofile', + :action => 'edit_software' + } + } + end + + def create_new_software_button + { + :title => _('Create a new software'), + :icon => 'design-editor', + :url => { + :controller => 'software_communities_plugin_myprofile', + :action => 'new_software' + } + } + end + + def profile_tabs_software + { :title => _('Software'), + :id => 'software-fields', + :content => Proc::new do render :partial => 'profile/software_tab' end, + :start => true } + end +end diff --git a/src/noosfero-spb/software_communities/lib/software_database.rb b/src/noosfero-spb/software_communities/lib/software_database.rb new file mode 100644 index 0000000..6c7911f --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/software_database.rb @@ -0,0 +1,20 @@ +class SoftwareDatabase < ActiveRecord::Base + attr_accessible :version + + belongs_to :software_info + belongs_to :database_description + + validates_presence_of :database_description_id, :version + + validates_length_of( + :version, + :maximum => 20, + :too_long => _("Software database is too long (maximum is 20 characters)") + ) + + validates( + :database_description_id, + :numericality => {:greater_than_or_equal_to => 1} + ) + +end diff --git a/src/noosfero-spb/software_communities/lib/software_helper.rb b/src/noosfero-spb/software_communities/lib/software_helper.rb new file mode 100644 index 0000000..a406c64 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/software_helper.rb @@ -0,0 +1,44 @@ +module SoftwareHelper + def self.select_options programming_languages, selected = 0 + value = "" + + programming_languages.each do |language| + selected = selected == language.id ? 'selected' : '' + value += "" + end + + value + end + + def self.create_list_with_file file_name, model + list_file = File.open file_name, "r" + + list_file.each_line do |line| + model.create(:name=>line.strip) + end + + list_file.close + end + + def self.all_table_is_empty? table, ignored_fields=[] + filled_fields = [] + + table.each do |key, value| + unless ignored_fields.include? key + filled_fields << if value.empty? + false + else + true + end + end + end + + if filled_fields.include? true + false + else + true + end + end +end diff --git a/src/noosfero-spb/software_communities/lib/software_highlights_block.rb b/src/noosfero-spb/software_communities/lib/software_highlights_block.rb new file mode 100644 index 0000000..a8b2a1c --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/software_highlights_block.rb @@ -0,0 +1,20 @@ +class SoftwareHighlightsBlock < HighlightsBlock + + def self.description + _('Software Highlights Block') + end + + def help + _('This block displays the softwares icon into a highlight') + end + + def content(args={}) + softwares = self.settings[:images].collect {|h| h[:address].split('/').last} + block = self + proc do + render :file => 'blocks/software_highlights', :locals => { :block => block, :softwares => softwares} + end + end + + +end diff --git a/src/noosfero-spb/software_communities/lib/software_info.rb b/src/noosfero-spb/software_communities/lib/software_info.rb new file mode 100644 index 0000000..ffe5364 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/software_info.rb @@ -0,0 +1,261 @@ +class SoftwareInfo < ActiveRecord::Base + acts_as_having_settings :field => :settings + + SEARCHABLE_SOFTWARE_FIELDS = { + :acronym => 1, + :finality => 2, + } + + SEARCHABLE_SOFTWARE_CLASSES = [ + SoftwareInfo, + Community, + ProgrammingLanguage, + DatabaseDescription + ] + + scope :search_by_query, lambda { |query = ""| + filtered_query = query.gsub(/[\|\(\)\\\/\s\[\]'"*%&!:]/,' ').split.map{|w| w += ":*"}.join('|') + search_fields = SoftwareInfo.pg_search_plugin_fields + + if query.empty? + SoftwareInfo.joins(:community).where("profiles.visible = ?", true) + else + searchable_software_objects = SoftwareInfo.transform_list_in_methods_list(SEARCHABLE_SOFTWARE_CLASSES) + includes(searchable_software_objects).where("to_tsvector('simple', #{search_fields}) @@ to_tsquery('#{filtered_query}')").where("profiles.visible = ?", true) + end + } + + def self.transform_list_in_methods_list list + methods_list = [] + + list.each do |element| + if SoftwareInfo.instance_methods.include?(element.to_s.underscore.to_sym) + methods_list << element.to_s.underscore.to_sym + elsif SoftwareInfo.instance_methods.include?(element.to_s.underscore.pluralize.to_sym) + methods_list << element.to_s.underscore.pluralize.to_sym + end + end + + methods_list + end + + def self.pg_search_plugin_fields + SEARCHABLE_SOFTWARE_CLASSES.collect { |one_class| + self.get_searchable_fields(one_class) + }.join(" || ' ' || ") + end + + def self.get_searchable_fields one_class + searchable_fields = one_class::SEARCHABLE_SOFTWARE_FIELDS.keys.map(&:to_s).sort.map {|f| "coalesce(#{one_class.table_name}.#{f}, '')"}.join(" || ' ' || ") + searchable_fields + end + + SEARCH_FILTERS = { + :order => %w[], + :display => %w[full] + } + + def self.default_search_display + 'full' + end + + attr_accessible :e_mag, :icp_brasil, :intern, :e_ping, :e_arq, + :operating_platform + + attr_accessible :demonstration_url, :acronym, :objectives, :features, + :license_info + + attr_accessible :community_id, :finality, :repository_link, :public_software, + :first_edit + + has_many :libraries, :dependent => :destroy + has_many :software_databases + has_many :database_descriptions, :through => :software_databases + has_many :software_languages + has_many :operating_systems + has_many :programming_languages, :through => :software_languages + has_many :operating_system_names, :through => :operating_systems + + belongs_to :community, :dependent => :destroy + belongs_to :license_info + + has_one :software_categories + + validates_length_of :finality, :maximum => 120 + validates_length_of :objectives, :maximum => 4000 + validates_length_of :features, :maximum => 4000 + validates_presence_of :finality + + validate :validate_acronym + + settings_items :another_license_version, :another_license_link + + # used on find_by_contents + scope :like_search, lambda{ |name| + joins(:community).where( + "name ILIKE ? OR acronym ILIKE ? OR finality ILIKE ?", + "%#{name}%", "%#{name}%", "%#{name}%" + ) + } + + scope :search, lambda { |name="", database_description_id = "", + programming_language_id = "", operating_system_name_id = "", + license_info_id = "", e_ping = "", e_mag = "", internacionalizable = "", + icp_brasil = "", e_arq = "", software_categories = "" | + + like_sql = "" + values = [] + + unless name.blank? + like_sql << "name ILIKE ? OR identifier ILIKE ? AND " + values << "%#{name}%" << "%#{name}%" + end + + like_sql = like_sql[0..like_sql.length-5] + + { + :joins => [:community], + :conditions=>[like_sql, *values] + } + } + + def license_info + license = LicenseInfo.find_by_id self.license_info_id + license_another = LicenseInfo.find_by_version("Another") + + if license_another && license.id == license_another.id + LicenseInfo.new( + :version => self.another_license_version, + :link => self.another_license_link + ) + else + license + end + end + + def another_license(version, link) + license_another = LicenseInfo.find_by_version("Another") + + if license_another + self.another_license_version = version + self.another_license_link = link + self.license_info = license_another + self.save! + end + end + + def validate_name_lenght + if self.community.name.size > 100 + self.errors.add( + :base, + _("Name is too long (maximum is %{count} characters)") + ) + false + end + true + end + + # if create_after_moderation receive a model object, would be possible to reuse core method + def self.create_after_moderation(requestor, attributes = {}) + environment = attributes.delete(:environment) + name = attributes.delete(:name) + identifier = attributes.delete(:identifier) + image_builder = attributes.delete(:image_builder) + license_info = attributes.delete(:license_info) + another_license_version = attributes.delete(:another_license_version) + another_license_link = attributes.delete(:another_license_link) + + software_info = SoftwareInfo.new(attributes) + if !environment.admins.include? requestor + CreateSoftware.create!( + attributes.merge( + :requestor => requestor, + :environment => environment, + :name => name, + :license_info => license_info + ) + ) + else + software_template = Community["software"] + + community_hash = {:name => name} + community_hash[:identifier] = identifier + community_hash[:image_builder] = image_builder if image_builder + + community = Community.new(community_hash) + community.environment = environment + + if (!software_template.blank? && software_template.is_template) + community.template_id = software_template.id + end + + software_info.license_info = license_info + software_info.save + community.software_info = software_info + community.save! + community.add_admin(requestor) + end + + software_info.verify_license_info(another_license_version, another_license_link) + software_info.save! + software_info + end + + def verify_license_info another_license_version, another_license_link + license_another = LicenseInfo.find_by_version("Another") + + if license_another && self.license_info_id == license_another.id + version = another_license_version + link = another_license_link + + self.another_license(version, link) + end + end + + + def validate_acronym + self.acronym = "" if self.acronym.nil? + if self.acronym.length > 10 && self.errors.messages[:acronym].nil? + self.errors.add(:acronym, _("can't have more than 10 characteres")) + false + elsif self.acronym.match(/\s+/) + self.errors.add(:acronym, _("can't have whitespaces")) + false + end + true + end + + def valid_operating_systems + if self.operating_systems.empty? + self.errors.add(:operating_system, _(": at least one must be filled")) + end + end + + def valid_software_info + if self.software_languages.empty? + self.errors.add(:software_languages, _(": at least one must be filled")) + end + end + + def valid_databases + if self.software_databases.empty? + self.errors.add(:software_databases, _(": at least one must be filled")) + end + end + + def visible? + self.community.visible? + end + + def name + self.community.name + end + + def short_name + self.community.short_name + end + + def identifier + self.community.identifier + end +end diff --git a/src/noosfero-spb/software_communities/lib/software_information_block.rb b/src/noosfero-spb/software_communities/lib/software_information_block.rb new file mode 100644 index 0000000..a398c96 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/software_information_block.rb @@ -0,0 +1,37 @@ +class SoftwareInformationBlock < Block + + attr_accessible :show_name + + settings_items :show_name, :type => :boolean, :default => false + + def self.description + _('Basic Software Information') + end + + def help + _('This block displays the basic information of a software profile.') + end + + def content(args={}) + block = self + s = show_name + + lambda do |object| + render( + :file => 'blocks/software_information', + :locals => { :block => block, :show_name => s} + ) + end + end + + def cacheable? + false + end + + private + + def owner_has_ratings? + ratings = CommunityRating.where(community_id: block.owner.id) + !ratings.empty? + end +end diff --git a/src/noosfero-spb/software_communities/lib/software_language.rb b/src/noosfero-spb/software_communities/lib/software_language.rb new file mode 100644 index 0000000..29f23c4 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/software_language.rb @@ -0,0 +1,14 @@ +class SoftwareLanguage < ActiveRecord::Base + attr_accessible :version + + belongs_to :software_info + belongs_to :programming_language + + validates_length_of( + :version, + :maximum => 20, + :too_long => _("Software language is too long (maximum is 20 characters)") + ) + + validates_presence_of :version,:programming_language +end diff --git a/src/noosfero-spb/software_communities/lib/software_language_helper.rb b/src/noosfero-spb/software_communities/lib/software_language_helper.rb new file mode 100644 index 0000000..296088d --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/software_language_helper.rb @@ -0,0 +1,85 @@ +class SoftwareLanguageHelper < DynamicTableHelper + MODEL_NAME ="language" + FIELD_NAME = "programming_language_id" + + def self.valid_language? language + return false if SoftwareHelper.all_table_is_empty?(language) + + programming_language_id_list = ProgrammingLanguage. + select(:id). + collect { |dd| dd.id } + + return programming_language_id_list.include?( + language[:programming_language_id].to_i + ) + end + + def self.list_language new_languages + return [] if new_languages.nil? or new_languages.length == 0 + list_languages = [] + + new_languages.each do |new_language| + if valid_language? new_language + language = SoftwareLanguage.new + language.programming_language = + ProgrammingLanguage.find(new_language[:programming_language_id]) + language.version = new_language[:version] + list_languages << language + end + end + + list_languages + end + + def self.valid_list_language? list_languages + return false if list_languages.nil? or list_languages.length == 0 + + list_languages.each do |language| + return false unless language.valid? + end + + true + end + + def self.language_as_tables(list_languages, disabled=false) + model_list = list_languages + model_list ||= [{:programming_language_id => "", :version => ""}] + + models_as_tables model_list, "language_html_structure", disabled + end + + def self.language_html_structure(language_data, disabled) + language_id = language_data[:programming_language_id] + language_name = if language_data[:programming_language_id].blank? + "" + else + ProgrammingLanguage.find( + language_data[:programming_language_id], + :select=>"name" + ).name + end + + data = { + model_name: MODEL_NAME, + field_name: FIELD_NAME, + name: { + value: language_name, + id: language_id, + hidden: true, + autocomplete: true, + select_field: false + }, + version: { + value: language_data[:version], + hidden: true, + delete: true + } + } + DATA[:license].delete(:value) + table_html_structure(data, disabled) + end + + def self.add_dynamic_table + language_as_tables(nil).first.call + end +end diff --git a/src/noosfero-spb/software_communities/lib/software_tab_data_block.rb b/src/noosfero-spb/software_communities/lib/software_tab_data_block.rb new file mode 100644 index 0000000..b32eeb5 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/software_tab_data_block.rb @@ -0,0 +1,48 @@ +class SoftwareTabDataBlock < Block + attr_accessible :show_name, :displayed_blog + + settings_items :show_name, :type => :boolean, :default => false + settings_items :displayed_blog, :type => :integer, :default => 0 + + TOTAL_POSTS_DYSPLAYED = 5 + + def self.description + _('Software Tab Data') + end + + def help + _('This block is used by colab to insert data into Noosfero') + end + + def content(args={}) + block = self + + lambda do |object| + render( + :file => 'blocks/software_tab_data', + :locals => { + :block => block + } + ) + end + end + + def blogs + self.owner.blogs + end + + def actual_blog + # As :displayed_blog default value is 0, it falls to the first one + blogs.find_by_id(self.displayed_blog) || blogs.first + end + + def posts + blog = actual_blog + + if blog and (not blog.posts.empty?) + blog.posts.limit(TOTAL_POSTS_DYSPLAYED) + else + [] + end + end +end diff --git a/src/noosfero-spb/software_communities/lib/softwares_block.rb b/src/noosfero-spb/software_communities/lib/softwares_block.rb new file mode 100644 index 0000000..067345a --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/softwares_block.rb @@ -0,0 +1,105 @@ +class SoftwaresBlock < CommunitiesBlock + + settings_items :software_type, :default => "All" + attr_accessible :accessor_id, :accessor_type, :role_id, + :resource_id, :resource_type, :software_type + + def self.description + _('Softwares') + end + + def default_title + if self.software_type == "Generic" + return n_('{#} generic software', '{#} generic softwares', profile_count) + elsif self.software_type == "Public" + return n_('{#} public software', '{#} public softwares', profile_count) + else + return n_('{#} software', '{#} softwares', profile_count) + end + end + + def help + _('This block displays the softwares in which the user is a member.') + end + + def footer + self.software_type ||= "All" + owner = self.owner + case owner + when Profile + lambda do |context| + link_to s_('softwares|View all'), :profile => owner.identifier, + :controller => 'profile', :action => 'communities', + :type => 'Software' + end + when Environment + lambda do |context| + link_to s_('softwares|View all'), :controller => 'search', + :action => 'software_infos' + end + else + '' + end + end + + def profile_count + profile_list.count + end + + def profiles + owner.communities + end + + def profile_list + profiles = get_visible_profiles + + software_profiles = profiles.select do |profile| + profile.class == Community && profile.software? + end + + block_softwares = if self.software_type == "Public" + software_profiles.select { |profile| profile.software_info.public_software? } + elsif self.software_type == "Generic" + software_profiles.select { |profile| !profile.software_info.public_software? } + else # All + software_profiles + end + + block_softwares.slice(0..get_limit-1) + end + + def content(arg={}) + if self.box.owner_type == "Environment" && self.box.position == 1 + block = self + + proc do + render :file => 'blocks/main_area_softwares', + :locals => {:profiles=> block.profile_list(), :block => block} + end + else + super(arg) + end + end + + protected + + def get_visible_profiles + profile_include_list = [:image, :domains, :preferred_domain, :environment] + visible_profiles = profiles.visible.includes(profile_include_list) + + if !prioritize_profiles_with_image + visible_profiles.all( :limit => get_limit, + :order => 'profiles.updated_at DESC' + ).sort_by{ rand } + elsif profiles.visible.with_image.count >= get_limit + visible_profiles.with_image.all( :limit => get_limit * 5, + :order => 'profiles.updated_at DESC' + ).sort_by{ rand } + else + visible_profiles.with_image.sort_by{ rand } + + visible_profiles.without_image.all( :limit => get_limit * 5, + :order => 'profiles.updated_at DESC' + ).sort_by{ rand } + end + end +end diff --git a/src/noosfero-spb/software_communities/lib/statistic_block.rb b/src/noosfero-spb/software_communities/lib/statistic_block.rb new file mode 100644 index 0000000..fd45f4f --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/statistic_block.rb @@ -0,0 +1,52 @@ +class StatisticBlock < Block + + settings_items :benefited_people, :type => :integer, :default => 0 + settings_items :saved_resources, :type => :float, :default => 0.0 + + attr_accessible :benefited_people, :saved_resources + + def self.description + _('Software Statistics') + end + + def help + _('This block displays software statistics.') + end + + def content(args={}) + download_blocks = get_profile_download_blocks(self.owner) + downloads = download_blocks.map do |download_block| + get_downloads_from_block(download_block) + end + + block = self + + lambda do |object| + render( + :file => 'blocks/software_statistics', + :locals => { + :block => block, + :total_downloads => downloads.sum + } + ) + end + end + + def cacheable? + false + end + + private + + def get_profile_download_blocks profile + DownloadBlock.joins(:box).where("boxes.owner_id = ?", profile.id) + end + + def get_downloads_from_block download_block + downloads = download_block.downloads.map do |download| + download[:total_downloads] unless download[:total_downloads].nil? + end + downloads.select! {|value| not value.nil? } + downloads.sum + end +end diff --git a/src/noosfero-spb/software_communities/lib/tasks/create_categories.rake b/src/noosfero-spb/software_communities/lib/tasks/create_categories.rake new file mode 100644 index 0000000..29a1cf9 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/tasks/create_categories.rake @@ -0,0 +1,20 @@ +namespace :software do + desc "Create software categories" + task :create_categories => :environment do + Environment.all.each do |env| + if env.plugin_enabled?("SoftwareCommunitiesPlugin") or env.plugin_enabled?("SoftwareCommunities") + print 'Creating categories: ' + software = Category.create(:name => _("Software"), :environment => env) + Category::SOFTWARE_CATEGORIES.each do |category_name| + unless Category.find_by_name(category_name) + print '.' + Category.create(:name => category_name, :environment => env, :parent => software) + else + print 'F' + end + end + puts '' + end + end + end +end diff --git a/src/noosfero-spb/software_communities/lib/tasks/create_licenses.rake b/src/noosfero-spb/software_communities/lib/tasks/create_licenses.rake new file mode 100644 index 0000000..3df7c30 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/tasks/create_licenses.rake @@ -0,0 +1,42 @@ +namespace :software do + desc "Create software licences" + + task :create_licenses => :environment do + Environment.all.each do |env| + if env.plugin_enabled?("SoftwareCommunitiesPlugin") or env.plugin_enabled?("SoftwareCommunities") + list_file = File.open "plugins/software_communities/public/static/licences.txt", "r" + + version_or_link = 'version' + can_save = true + licence = nil + + print 'Creating Licenses: ' + list_file.each_line do |line| + data = line.strip + + if data.length != 0 + if version_or_link == 'version' + can_save = LicenseInfo.find_by_version(data) ? false : true + licence = LicenseInfo::new :version => data + version_or_link = 'link' + elsif version_or_link == 'link' + licence.link = data + + if can_save + licence.save! + print '.' + else + print 'F' + end + + version_or_link = 'version' + end + end + end + puts '' + + list_file.close + end + end + end +end diff --git a/src/noosfero-spb/software_communities/lib/tasks/create_sample_softwares.rake b/src/noosfero-spb/software_communities/lib/tasks/create_sample_softwares.rake new file mode 100644 index 0000000..1cd00cf --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/tasks/create_sample_softwares.rake @@ -0,0 +1,71 @@ +NUMBER_OF_SOFTWARES = 10 + +namespace :software do + desc "Create sample softwares" + task :create_sample_softwares => :environment do + Environment.all.each do |env| + if env.plugin_enabled?("SoftwareCommunitiesPlugin") or env.plugin_enabled?("SoftwareCommunities") + print "Creating softwares: " + + NUMBER_OF_SOFTWARES.times do |i| + number = i < 10 ? "0#{i}" : "#{i}" + software_name = "Software #{number}" + create_software_info(software_name) + end + + create_software_info("Ubuntu") + create_software_info("Debian") + create_software_info("Windows XP") + create_software_info("Windows Vista") + create_software_info("Windows 7") + create_software_info("Windows 8") + create_software_info("Disk Operating System", "DOS") + create_software_info("Sublime") + create_software_info("Vi IMproved", "Vim") + create_software_info("Nano") + create_software_info("Gedit") + create_software_info("Firefox") + create_software_info("InkScape") + create_software_info("Eclipse") + create_software_info("LibreOffice") + create_software_info("Tetris") + create_software_info("Mario") + create_software_info("Pong") + create_software_info("Sonic") + create_software_info("Astah") + create_software_info("Pokemom Red") + create_software_info("Mass Effect") + create_software_info("Deus EX") + create_software_info("Dragon Age") + + puts "" + end + end + end +end + +def create_community(name) + community = Community.new + community.name = name + community.save + community +end + +def create_software_info(name, acronym = "", finality = "default") + community = create_community(name) + software_info = SoftwareInfo.new + software_info.community = community + software_info.public_software = true + software_info.acronym = acronym + software_info.finality = finality + software_info.license_info = LicenseInfo.first + + if software_info.community.valid? && software_info.valid? + print "." + software_info.save + software_info + else + print "F" + nil + end +end diff --git a/src/noosfero-spb/software_communities/lib/tasks/export.rake b/src/noosfero-spb/software_communities/lib/tasks/export.rake new file mode 100644 index 0000000..224ae25 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/tasks/export.rake @@ -0,0 +1,133 @@ +require 'csv' + +namespace :export do + namespace :catalog do + desc "Export all softwares to CSV" + task :csv => :environment do + Environment.all.each do |env| + if env.plugin_enabled?("MpogSoftware") or env.plugin_enabled?("SoftwareCommunitiesPlugin") + softwares_to_csv + categories_to_csv + software_categories_to_csv + + compress_files + end + end + end + end + + def softwares_to_csv + print "Exporting softwares to softwares.csv: " + + CSV.open('/tmp/softwares.csv', 'w') do |csv| + csv << [ + "id", + "community_id", + "identifier", + "name", + "finality", + "acronym", + "created_at", + "image_filename", + "home_page_name", + "home_page_slug", + "home_page_path", + "home_page_body", + "home_page_abstract", + "home_page_published_at" + ] + + SoftwareInfo.all.each do |software| + if software.community + begin + csv << [ + software.id, + software.community.id, + software.community.identifier, + software.community.name, + software.finality, + software.acronym, + software.community.created_at, + (software.community.image.nil? ? nil : software.community.image.filename), + (software.community.home_page.nil? ? nil : software.community.home_page.name), + (software.community.home_page.nil? ? nil : software.community.home_page.slug), + (software.community.home_page.nil? ? nil : software.community.home_page.path), + (software.community.home_page.nil? ? nil : software.community.home_page.body), + (software.community.home_page.nil? ? nil : software.community.home_page.abstract), + (software.community.home_page.nil? ? nil : software.community.home_page.published_at), + ] + + print '.' + rescue + print 'F' + end + end + end + end + + print "\n" + end + + def categories_to_csv + print "Exporting categories to categories.csv: " + + CSV.open('/tmp/categories.csv', 'w') do |csv| + csv << [ + "id", + "name", + "path", + ] + + Category.all.each do |category| + begin + csv << [ + category.id, + category.name, + category.path, + ] + + print '.' + rescue + print 'F' + end + end + end + + print "\n" + end + + def software_categories_to_csv + print "Exporting software and categories relation to software_categories.csv: " + CSV.open('/tmp/software_categories.csv', 'w') do |csv| + csv << [ + "software_id", + "category_id" + ] + + SoftwareInfo.all.each do |software| + if software.community + software.community.categories.each do |category| + begin + csv << [ + software.id, + category.id + ] + + print '.' + rescue + print 'F' + end + end + end + end + end + + print "\n" + end + + def compress_files + `cd /tmp/ && tar -zcvf software_catalog_csvs.tar.gz softwares.csv categories.csv software_categories.csv` + + `cd /tmp/ && rm softwares.csv categories.csv software_categories.csv` + end +end \ No newline at end of file diff --git a/src/noosfero-spb/software_communities/lib/tasks/main_data.rake b/src/noosfero-spb/software_communities/lib/tasks/main_data.rake new file mode 100644 index 0000000..793ec38 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/tasks/main_data.rake @@ -0,0 +1,18 @@ +#!/bin/env ruby +# encoding: utf-8 + +namespace :main_data do + desc "Create the main community and its contents" + task :populate => :environment do + Rake::Task["templates:create:all"].invoke + Rake::Task["software:create_licenses"].invoke + Rake::Task["software:create_categories"].invoke + Rake::Task["software:create_sample_softwares"].invoke + end + + desc "Create the main community and its contents" + task :all => :environment do + Rake::Task["templates:destroy"].invoke + Rake::Task["main_data:populate"].invoke + end +end diff --git a/src/noosfero-spb/software_communities/lib/tasks/templates.rake b/src/noosfero-spb/software_communities/lib/tasks/templates.rake new file mode 100644 index 0000000..46ad264 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/tasks/templates.rake @@ -0,0 +1,42 @@ +#!/bin/env ruby +# encoding: utf-8 + +namespace :templates do + namespace :create do + + desc "Create new templates of software, intitution, person and community" + task :all => :environment do + Rake::Task["templates:create:software"].invoke + end + + desc "Create new templates of software" + task :software => :environment do + Environment.all.each do |env| + if env.plugin_enabled?("MpogSoftware") or env.plugin_enabled?("SoftwareCommunitiesPlugin") + software = Community["software"] + + if software.nil? + software = Community.create!(:name => "Software", :identifier => "software") + end + + software.layout_template = "default" + software.is_template = true + software.save! + + puts "Software Template successfully created!" + end + end + end + end + + desc "Destroy all templates created by this namespace" + task :destroy => :environment do + Environment.all.each do |env| + if env.plugin_enabled?("MpogSoftware") or env.plugin_enabled?("SoftwareCommunitiesPlugin") + Community["software"].destroy unless Community["software"].nil? + puts "Software template destoyed with success!" + end + end + end + +end diff --git a/src/noosfero-spb/software_communities/lib/wiki_block.rb b/src/noosfero-spb/software_communities/lib/wiki_block.rb new file mode 100644 index 0000000..3d7da90 --- /dev/null +++ b/src/noosfero-spb/software_communities/lib/wiki_block.rb @@ -0,0 +1,30 @@ +class WikiBlock < Block + + attr_accessible :show_name, :wiki_link + settings_items :show_name, :type => :boolean, :default => false + settings_items :wiki_link, :type => :string, :default => "" + + def self.description + _('Wiki Link') + end + + def help + _('This block displays a link to the software wiki.') + end + + def content(args={}) + block = self + s = show_name + + lambda do |object| + render( + :file => 'blocks/wiki', + :locals => { :block => block, :show_name => s } + ) + end + end + + def cacheable? + true + end +end diff --git a/src/noosfero-spb/software_communities/po/pt/software_communities.po b/src/noosfero-spb/software_communities/po/pt/software_communities.po new file mode 100644 index 0000000..037150c --- /dev/null +++ b/src/noosfero-spb/software_communities/po/pt/software_communities.po @@ -0,0 +1,1361 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: 1.2.1+spb4-2-ged0502e\n" +"POT-Creation-Date: 2015-09-14 14:29-0300\n" +"PO-Revision-Date: 2014-11-12 13:05-0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" + +#: plugins/software_communities/lib/search_catalog_block.rb:8 +msgid "Search Softwares catalog" +msgstr "Busca do catálogo de software" + +#: plugins/software_communities/lib/search_catalog_block.rb:12 +msgid "This block displays the search categories field " +msgstr "Este bloco apresenta a busca do campo de categorias" + +#: plugins/software_communities/lib/ext/category.rb:5 +msgid "Agriculture, Fisheries and Extraction" +msgstr "Agricultura, Extrativismo e Pesca" + +#: plugins/software_communities/lib/ext/category.rb:6 +msgid "Science, Information and Communication" +msgstr "Ciência, Informação e Comunicação " + +#: plugins/software_communities/lib/ext/category.rb:7 +msgid "Economy and Finances" +msgstr "Economia e Finanças" + +#: plugins/software_communities/lib/ext/category.rb:8 +msgid "Public Administration" +msgstr "Gestão Pública" + +#: plugins/software_communities/lib/ext/category.rb:9 +msgid "Habitation, Sanitation and Urbanism" +msgstr "Habitação, Saneamento e Urbanismo" + +#: plugins/software_communities/lib/ext/category.rb:10 +msgid "Individual, Family and Society" +msgstr "Pessoa, Família e Sociedade " + +#: plugins/software_communities/lib/ext/category.rb:11 +msgid "Health" +msgstr "Saúde" + +#: plugins/software_communities/lib/ext/category.rb:12 +msgid "Social Welfare and Development" +msgstr "Bem-estar e Desenvolvimento Social" + +#: plugins/software_communities/lib/ext/category.rb:13 +msgid "Defense and Security" +msgstr "Defesa e Segurança" + +#: plugins/software_communities/lib/ext/category.rb:14 +msgid "Education" +msgstr "Educação" + +#: plugins/software_communities/lib/ext/category.rb:15 +msgid "Government and Politics" +msgstr "Governo e Política" + +#: plugins/software_communities/lib/ext/category.rb:16 +msgid "Justice and Legislation" +msgstr "Justiça e Legislação" + +#: plugins/software_communities/lib/ext/category.rb:17 +msgid "International Relationships" +msgstr "Relações Internacionais" + +#: plugins/software_communities/lib/ext/category.rb:18 +msgid "Transportation and Transit" +msgstr "Transporte e Trânsito" + +#: plugins/software_communities/lib/ext/search_controller.rb:118 +msgid "Result Search" +msgstr "Resultado da pesquisa" + +#: plugins/software_communities/lib/ext/search_controller.rb:142 +msgid "Selected options: " +msgstr "Opções selecionadas:" + +#: plugins/software_communities/lib/repository_block.rb:8 +msgid "Repository Link" +msgstr "Link para o Repositório" + +#: plugins/software_communities/lib/repository_block.rb:12 +msgid "This block displays the repository link of a software." +msgstr "Este bloco apresenta o link para o repositório do software." + +#: plugins/software_communities/lib/wiki_block.rb:8 +msgid "Wiki Link" +msgstr "Link da wiki" + +#: plugins/software_communities/lib/wiki_block.rb:12 +msgid "This block displays a link to the software wiki." +msgstr "Este bloco apresenta o link para a wiki do software." + +#: plugins/software_communities/lib/statistic_block.rb:9 +msgid "Software Statistics" +msgstr "Estastísticas de software" + +#: plugins/software_communities/lib/statistic_block.rb:13 +msgid "This block displays software statistics." +msgstr "Este bloco apresenta a estatística de software" + +#: plugins/software_communities/lib/library.rb:5 +msgid "can't be blank" +msgstr "não pode ficar em branco" + +#: plugins/software_communities/lib/library.rb:8 +msgid "Too long (maximum is 20 characters)" +msgstr "Muito grande(máximo é 20 caracteres" + +#: plugins/software_communities/lib/software_info.rb:151 +msgid "Name is too long (maximum is %{count} characters)" +msgstr "Nome é muito longo(máximo é %{count} caracteres)" + +#: plugins/software_communities/lib/software_info.rb:219 +msgid "can't have more than 10 characteres" +msgstr "não pode ter mais de 10 caracteres" + +#: plugins/software_communities/lib/software_info.rb:222 +msgid "can't have whitespaces" +msgstr "não pode ter espaços em branco" + +#: plugins/software_communities/lib/software_info.rb:230 +#: plugins/software_communities/lib/software_info.rb:236 +#: plugins/software_communities/lib/software_info.rb:242 +msgid ": at least one must be filled" +msgstr ": ao menos um deve ser preenchido" + +#: plugins/software_communities/lib/dynamic_table_helper.rb:17 +#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:3 +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:37 +#: plugins/software_communities/views/box_organizer/_download_block.html.erb:3 +#: plugins/software_communities/views/_main_software_editor_extras.html.erb:3 +msgid "Name" +msgstr "Nome" + +#: plugins/software_communities/lib/dynamic_table_helper.rb:18 +msgid "Version" +msgstr "Versão" + +#: plugins/software_communities/lib/dynamic_table_helper.rb:19 +#: plugins/software_communities/views/profile/_software_tab.html.erb:18 +msgid "License" +msgstr "Licença" + +#: plugins/software_communities/lib/dynamic_table_helper.rb:91 +msgid "Autocomplete field, type something" +msgstr "Campo automático, digite algo" + +#: plugins/software_communities/lib/dynamic_table_helper.rb:116 +#: plugins/software_communities/views/box_organizer/_download_list_template.html.erb:8 +#: plugins/software_communities/views/box_organizer/_download_list.html.erb:8 +msgid "Delete" +msgstr "Deletar" + +#: plugins/software_communities/lib/create_software.rb:36 +msgid "New software" +msgstr "Novo software" + +#: plugins/software_communities/lib/create_software.rb:44 +msgid "%{requestor} wants to create software %{subject} with" +msgstr "%{requestor} deseja criar o software %{subject} com" + +#: plugins/software_communities/lib/create_software.rb:46 +msgid " no finality." +msgstr " campo finalidade em branco." + +#: plugins/software_communities/lib/create_software.rb:48 +msgid " this finality:

    %{finality}

    " +msgstr " esta finalidade:

    %{finality}

    " + +#: plugins/software_communities/lib/create_software.rb:68 +msgid "%{requestor} wants to create software %{subject}" +msgstr "%{requestor} deseja criar o software %{subject}" + +#: plugins/software_communities/lib/create_software.rb:73 +msgid "" +"User \"%{user}\" just requested to create software %{software}.\n" +" You have to approve or reject it through the \"Pending Validations\"\n" +" section in your control panel.\n" +msgstr "" +"Usuário \"%{user}\" acabou de requisitar a criação do software %{software}.\n" +" Você deve aprovar ou rejeitar pela seção \"Tarefas pendentes\"\n" +" no seu painel de controle.\n" + +#: plugins/software_communities/lib/create_software.rb:80 +msgid "" +"Your request for registering software %{software} at %{environment} was\n" +" just sent. Environment administrator will receive it and will approve " +"or\n" +" reject your request according to his methods and criteria.\n" +"\n" +" You will be notified as soon as environment administrator has a " +"position\n" +" about your request." +msgstr "" +"O seu pedido para registrar o software %{software} no %{environment} foi\n" +" enviada. O administrador do ambiente irá recebe-la e aprovará ou rejeitará " +"seu pedido de acordo com seus métodos e critérios.\n" +"\n" +" Você será notificado assim que o administrador do ambiente tiver uma " +"resposta sobre o seu pedido." + +#: plugins/software_communities/lib/create_software.rb:90 +msgid "" +"Your request for registering software %{software} at %{environment} was\n" +" not approved by the environment administrator. The following " +"explanation\n" +" was given: \n" +"\n" +"%{explanation}" +msgstr "" +"Seu pedido para registro do software %{software} no %{environment} não " +"foi\n" +" aprovado pelo administrador do ambiente. A seguinte explicação\n" +" foi fornecida:\n" +"\n" +"%{explanation}" + +#: plugins/software_communities/lib/create_software.rb:99 +msgid "" +"Your request for registering the software \"%{software}\" was approved.\n" +" You can access %{url} and finish the registration of your software." +msgstr "" +"Seu pedido para registro do software %{software} foi aprovada.\n" +" Você pode acessar %{url} e finalizar o registro do seu software. " + +#: plugins/software_communities/lib/operating_system.rb:12 +msgid "too long (maximum is 20 characters)" +msgstr "muito longo(máximo é 20 caracteres)" + +#: plugins/software_communities/lib/software_highlights_block.rb:4 +msgid "Software Highlights Block" +msgstr "Bloco de software em destaque" + +#: plugins/software_communities/lib/software_highlights_block.rb:8 +msgid "This block displays the softwares icon into a highlight" +msgstr "Esse bloco apresenta o ícone do software em destaque" + +#: plugins/software_communities/lib/categories_software_block.rb:8 +msgid "Categories Softwares" +msgstr "Categorias de Softwares" + +#: plugins/software_communities/lib/categories_software_block.rb:12 +msgid "" +"This block displays the categories and the amount of softwares for\n" +" each category." +msgstr "" +"Este bloco apresenta as categorias e a quantidade de softwares para \n" +" cada categoria." + +#: plugins/software_communities/lib/softwares_block.rb:8 +msgid "Softwares" +msgstr "Softwares" + +#: plugins/software_communities/lib/softwares_block.rb:13 +msgid "{#} generic software" +msgid_plural "{#} generic softwares" +msgstr[0] "{#} software genérico" +msgstr[1] "{#} softwares genéricos" + +#: plugins/software_communities/lib/softwares_block.rb:15 +msgid "{#} public software" +msgid_plural "{#} public softwares" +msgstr[0] "{#} software público" +msgstr[1] "{#} software públicos" + +#: plugins/software_communities/lib/softwares_block.rb:17 +msgid "{#} software" +msgid_plural "{#} softwares" +msgstr[0] "{#} software" +msgstr[1] "{#} softwares" + +#: plugins/software_communities/lib/softwares_block.rb:22 +msgid "This block displays the softwares in which the user is a member." +msgstr "Este bloco apresenta os softwares em que o usuário é membro." + +#: plugins/software_communities/lib/softwares_block.rb:31 +#: plugins/software_communities/lib/softwares_block.rb:37 +msgid "softwares|View all" +msgstr "softwares|Veja todos" + +#: plugins/software_communities/lib/software_communities_plugin.rb:17 +msgid "Add Public Software and MPOG features." +msgstr "Adicionar Software Público e Funcionalidades." + +#: plugins/software_communities/lib/software_communities_plugin.rb:90 +msgid "Rate this software" +msgstr "Avalie esse software" + +#: plugins/software_communities/lib/software_communities_plugin.rb:94 +msgid "Use reports" +msgstr "Relatos de uso" + +#: plugins/software_communities/lib/software_communities_plugin.rb:138 +msgid "Software Info" +msgstr "Informação de Software" + +#: plugins/software_communities/lib/software_communities_plugin.rb:149 +msgid "Create a new software" +msgstr "Criar um novo software" + +#: plugins/software_communities/lib/software_communities_plugin.rb:159 +msgid "Software" +msgstr "Software" + +#: plugins/software_communities/lib/software_language.rb:10 +msgid "Software language is too long (maximum is 20 characters)" +msgstr "Linguagem do software está muito grande (máximo de 20 caracteres)" + +#: plugins/software_communities/lib/software_tab_data_block.rb:10 +msgid "Software Tab Data" +msgstr "Aba de dados do software" + +#: plugins/software_communities/lib/software_tab_data_block.rb:14 +msgid "This block is used by colab to insert data into Noosfero" +msgstr "Esse bloco é usado pelo Colab para inserir dados no noosfero" + +#: plugins/software_communities/lib/download_block.rb:15 +msgid "Download Stable Version" +msgstr "Baixar Versão Estável" + +#: plugins/software_communities/lib/download_block.rb:19 +msgid "This block displays the stable version of a software." +msgstr "Este block apresenta a versão estável do software." + +#: plugins/software_communities/lib/software_database.rb:12 +msgid "Software database is too long (maximum is 20 characters)" +msgstr "Banco de dados do software está muito grande(máximo é 20 caracteres)" + +#: plugins/software_communities/lib/software_information_block.rb:8 +msgid "Basic Software Information" +msgstr "Informação Básica do Software" + +#: plugins/software_communities/lib/software_information_block.rb:12 +msgid "This block displays the basic information of a software profile." +msgstr "Este bloco apresenta a informação básica de um perfil de software." + +#: plugins/software_communities/lib/categories_and_tags_block.rb:8 +msgid "Categories and Tags" +msgstr "Categorias e Marcadores" + +#: plugins/software_communities/lib/categories_and_tags_block.rb:12 +msgid "This block displays the categories and tags of a software." +msgstr "Este block apresenta as categorias e marcadores de um software." + +#: plugins/software_communities/test/unit/software_info_validation_test.rb:108 +msgid "Features is too long (maximum is 4000 characters)" +msgstr "Funcionalidades está muito grande(máximo é 4000 caracteres)" + +#: plugins/software_communities/test/unit/software_info_validation_test.rb:116 +msgid "Objectives is too long (maximum is 4000 characters)" +msgstr "Objetivo está muito grande (máximo é 4000 caracteres)" + +#: plugins/software_communities/controllers/software_communities_plugin_myprofile_controller.rb:41 +#: plugins/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb:19 +msgid "Save and Configure Community" +msgstr "Salvar e Configurar Comunidade" + +#: plugins/software_communities/controllers/software_communities_plugin_myprofile_controller.rb:45 +msgid "Software updated successfully" +msgstr "Software atualizado com sucesso" + +#: plugins/software_communities/controllers/software_communities_plugin_myprofile_controller.rb:49 +msgid "Could not update software" +msgstr "Não foi possível atualizar o software" + +#: plugins/software_communities/controllers/software_communities_plugin_myprofile_controller.rb:130 +msgid "" +"Your new software request will be evaluated by anadministrator. You will be " +"notified." +msgstr "" +"Seu pedido para registro do software será avaliado por um administrador. " +"Você será notificado." + +#: plugins/software_communities/controllers/software_communities_plugin_profile_controller.rb:7 +msgid "Could not find the download file" +msgstr "Não foi possível encontrar o arquivo para download" + +#: plugins/software_communities/controllers/software_communities_plugin_profile_controller.rb:8 +msgid "Invalid download params" +msgstr "Parâmetros de Download inválidos" + +#: plugins/software_communities/views/profile_editor/_software_community.html.erb:1 +msgid "General information" +msgstr "Informação geral" + +#: plugins/software_communities/views/profile_editor/_software_community.html.erb:40 +msgid "Address" +msgstr "Endereço" + +#: plugins/software_communities/views/profile_editor/_software_community.html.erb:46 +msgid "WARNING!" +msgstr "PERIGO!" + +#: plugins/software_communities/views/profile_editor/_software_community.html.erb:47 +msgid "" +"You are about to change the address, and this will break external links to " +"the homepage or to content inside it. Do you really want to change?" +msgstr "" +"Você está prestes a mudar o endereço, e isso vai quebrar links externos para " +"a página inicial ou para o conteúdo dentro dela. Você realmente quer mudar?" + +#: plugins/software_communities/views/profile_editor/_software_community.html.erb:49 +#: plugins/software_communities/views/profile/_software_tab.html.erb:7 +#: plugins/software_communities/views/profile/_software_tab.html.erb:8 +#: plugins/software_communities/views/profile/_software_tab.html.erb:9 +#: plugins/software_communities/views/profile/_software_tab.html.erb:10 +#: plugins/software_communities/views/profile/_software_tab.html.erb:11 +msgid "Yes" +msgstr "Sim" + +#: plugins/software_communities/views/profile_editor/_software_community.html.erb:50 +#: plugins/software_communities/views/profile/_software_tab.html.erb:7 +#: plugins/software_communities/views/profile/_software_tab.html.erb:8 +#: plugins/software_communities/views/profile/_software_tab.html.erb:9 +#: plugins/software_communities/views/profile/_software_tab.html.erb:10 +#: plugins/software_communities/views/profile/_software_tab.html.erb:11 +msgid "No" +msgstr "Não" + +#: plugins/software_communities/views/profile_editor/_software_community.html.erb:63 +msgid "Enable \"contact us\"" +msgstr "Habilitar \"entre em contato\"" + +#: plugins/software_communities/views/profile_editor/_software_community.html.erb:68 +msgid "Products/Services catalog" +msgstr "Catálogo de Produtos/Serviços" + +#: plugins/software_communities/views/profile_editor/_software_community.html.erb:69 +msgid "Number of products/services displayed per page on catalog" +msgstr "Número de produtos/serviços mostrado por página no catálogo" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:4 +msgid "Configure Software Community" +msgstr "Configurar Comunidade do Software" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:8 +msgid "Set the basic settings of the software associated community" +msgstr "Defina as configurações básicas da comunidade do software" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:18 +msgid "This profile is a template" +msgstr "Este perfil é um template" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:24 +msgid "Privacy options" +msgstr "Opções de privacidade" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:28 +msgid "Public — show my contents to all internet users" +msgstr "Público — mostrar meus conteúdos a todos os usuários na internet" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:31 +msgid "Private — show my contents only to friends" +msgstr "Privado — mostrar meus conteudos apenas aos amigos" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:35 +msgid "Public — show content of this group to all internet users" +msgstr "" +"Público — mostrar conteudos deste grupo a todos os usuários na internet" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:38 +msgid "Private — show content of this group only to members" +msgstr "Privado — mostrar meus conteudos deste grupo apenas aos membros" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:43 +msgid "Page to redirect after login" +msgstr "Página para redirecionar após o login" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:47 +msgid "Translations" +msgstr "Traduções" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:49 +msgid "" +"Automaticaly redirect the visitor to the article translated to his/her " +"language" +msgstr "" +"Redirecionar automaticamente o visitante para o artigo traduzido para sua " +"língua" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:53 +msgid "Suggestions" +msgstr "Sugestões" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:55 +msgid "Send me relationship suggestions by email" +msgstr "Envie-me sugestões de relacionamento por e-mail" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:65 +#: plugins/software_communities/views/search/_full_community.html.erb:27 +msgid "Software Categories" +msgstr "Categorias de Software" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:68 +#: plugins/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb:18 +msgid "Save" +msgstr "Salvar" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:71 +#: plugins/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb:20 +msgid "Back to control panel" +msgstr "Voltar para o painel de controle" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:77 +msgid "Delete software and community" +msgstr "Remover software e comunidade" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:80 +msgid "Deactivate software and community" +msgstr "Desativar software e comunidade" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:80 +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:82 +msgid "Are you sure you want to deactivate this profile?" +msgstr "Tem certeza de que deseja desativar esse perfil?" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:82 +msgid "Activate software and community" +msgstr "Ativar software e comunidade" + +#: plugins/software_communities/views/profile_editor/_first_edit_software_community_extras.html.erb:3 +msgid "Step 1 - Software Creation" +msgstr "Passo 1 - Criação do Software" + +#: plugins/software_communities/views/profile_editor/_first_edit_software_community_extras.html.erb:7 +msgid "Step 2 - Community Settings" +msgstr "Passo 2 - Configuração da Comunidade" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_license_info_fields.html.erb:5 +msgid "Autocomplete field, type some license" +msgstr "Campo com auto completar, digite uma licença" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_license_info_fields.html.erb:8 +msgid "Read license" +msgstr "Ler licença" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:4 +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:7 +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:10 +#: plugins/software_communities/views/search/_software_search_form.html.erb:14 +msgid "Public Software" +msgstr "Software Público" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:4 +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:7 +msgid "Public software" +msgstr "Software Público" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:12 +msgid "Adherent to e-PING ?" +msgstr "Aderente ao e-PING ?" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:21 +msgid "Adherent to e-MAG ?" +msgstr "Aderente ao e-MAG ?" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:30 +msgid "Adherent to ICP-Brasil ?" +msgstr "Aderente ao ICP-Brasil ?" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:39 +msgid "Adherent to e-ARQ ?" +msgstr "Aderente ao e-ARQ ?" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:48 +msgid "Internacionalizable ?" +msgstr "Internacionalizável ?" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:59 +msgid "Operating Platform" +msgstr "Plataforma Operacional" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:64 +msgid "Features" +msgstr "Características" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:69 +msgid "Demonstration url" +msgstr "Url de demonstração" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:74 +#: plugins/software_communities/views/profile/_software_tab.html.erb:35 +msgid "Libraries" +msgstr "Bibliotecas" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:82 +msgid "Operating Systems" +msgstr "Sistemas Operacionais" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:90 +msgid "Programming languages" +msgstr "Linguagens de programação" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:97 +msgid "Databases" +msgstr "Banco de dados" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb:1 +msgid "Edit Software" +msgstr "Editar Software" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb:9 +msgid "Main Information" +msgstr "Informação" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb:12 +msgid "Specifications" +msgstr "Especificações" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_language_fields.html.erb:11 +msgid "New language" +msgstr "Nova linguagem" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_library_fields.html.erb:11 +msgid "New Library" +msgstr "Nova Biblioteca" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_operating_system_fields.html.erb:11 +msgid "New Operating System" +msgstr "Novo Sistema Operacional" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_database_fields.html.erb:11 +msgid "New Database" +msgstr "Novo Banco de Dados" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:8 +msgid "Short Name" +msgstr "Nome Curto" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:14 +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:56 +#: plugins/software_communities/views/_main_software_editor_extras.html.erb:10 +msgid "Finality" +msgstr "Finalidade" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:15 +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:57 +msgid "What is the software for?" +msgstr "Para quê serve o software?" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:21 +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:64 +msgid "Software Logo" +msgstr "Marca do Software" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:26 +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:69 +msgid "Image:" +msgstr "Imagem:" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:26 +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:69 +msgid "Max size: %s (.jpg, .gif, .png)" +msgstr "Tamanho máximo: %s (.jpg, .gif, .png)" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:33 +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:76 +msgid "License Version: " +msgstr "Versão da Licença: " + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:45 +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:89 +#: plugins/software_communities/views/_main_software_editor_extras.html.erb:29 +msgid "Link to Repository: " +msgstr "Link para o Repositório" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:5 +msgid "Creating new software" +msgstr "Criando novo software" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:9 +msgid "" +"Enter the basic information about the software.
    \n" +" You can add the details after you create it." +msgstr "" +"Entre com as informações básicas do software.
    \n" +" Você pode adicionar os detalhes após sua criação." + +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:16 +msgid "" +"Note that the creation of communities in this environment is restricted. " +"Your request to create this new community will be sent to %{environment} " +"administrators and will be approved or rejected according to their methods " +"and criteria." +msgstr "" +"Note que a criação de comunidades nesse ambiente é restrita. Sua requisição " +"para criar essa nova comunidade será enviada aos administradores do " +"%{environment} para ser aprovada ou rejeitada de acordo com os seus métodos " +"e critérios" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:22 +msgid "\"Can`t create new software: #{@errors.length} errors\"" +msgstr "\"Não foi possível criar o software: #{@errors.length} errors\"" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:45 +msgid "Domain" +msgstr "Domínio" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:97 +msgid "Create" +msgstr "Criar" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:98 +msgid "Cancel" +msgstr "Cancelar" + +#: plugins/software_communities/views/search/_catalog_result_list.html.erb:12 +msgid "see all (%d)" +msgstr "ver todos (%d)" + +#: plugins/software_communities/views/search/_catalog_result_list.html.erb:34 +msgid "No software found. Try more general filters" +msgstr "Nenhum software encontrado. Tente outros filtros" + +#: plugins/software_communities/views/search/_catalog_result_list.html.erb:36 +msgid "" +"No software found. Try more general filters or check the software category " +"individually" +msgstr "" +"Nenhum software encontrado. Tente outros filtros ou verifique a categoria do " +"software individualmente" + +#: plugins/software_communities/views/search/_catalog_result_list.html.erb:41 +#: plugins/software_communities/views/search/_full_community.html.erb:35 +#: plugins/software_communities/views/search/_catalog_filter.html.erb:10 +#: plugins/software_communities/views/blocks/categories_software.html.erb:15 +msgid "\"#{category.name}\"" +msgstr "\"#{category.name}\"" + +#: plugins/software_communities/views/search/_software_search_form.html.erb:3 +msgid "Search Public Software Catalog" +msgstr "Pesquisar Catálogo de Software Público" + +#: plugins/software_communities/views/search/_software_search_form.html.erb:15 +msgid "" +"Projects that have passed by the Avalia SPB process according to the " +"requirements of IN 01/2011." +msgstr "" +"Projetos que passaram pelo processo Avalia SPB de acordo com os Requisitos " +"da IN 01/2011." + +#: plugins/software_communities/views/search/_software_search_form.html.erb:18 +msgid "All" +msgstr "Todos" + +#: plugins/software_communities/views/search/_software_search_form.html.erb:19 +msgid "Projects included in the portal as cases provided by the IN 01/2011." +msgstr "Projetos incluidos no portal como os casos fornecidos pela IN 01/2011." + +#: plugins/software_communities/views/search/_software_search_form.html.erb:24 +msgid "" +"Type words about the software you're looking for (the search begins after 3 " +"characters)" +msgstr "" +"Digite palavras sobre o software que você está procurando (a busca começa " +"depois de 3 caracteres" + +#: plugins/software_communities/views/search/_software_search_form.html.erb:27 +msgid "Filter" +msgstr "Filtro" + +#: plugins/software_communities/views/search/_software_search_form.html.erb:52 +#: plugins/software_communities/views/profile/_profile_members_list.html.erb:5 +msgid "Name A-Z" +msgstr "Nome A-Z" + +#: plugins/software_communities/views/search/_software_search_form.html.erb:53 +#: plugins/software_communities/views/profile/_profile_members_list.html.erb:6 +msgid "Name Z-A" +msgstr "Nome Z-A" + +#: plugins/software_communities/views/search/_software_search_form.html.erb:54 +msgid "Relevance" +msgstr "Relevância" + +#: plugins/software_communities/views/search/software_infos.html.erb:6 +msgid "Type words about the %s you're looking for" +msgstr "Digite palavras sobre o %s que você está procurando" + +#: plugins/software_communities/views/search/_full_community.html.erb:46 +msgid "This software doesn't have categories" +msgstr "Este software nào contém categorias" + +#: plugins/software_communities/views/search/_catalog_filter.html.erb:4 +#: plugins/software_communities/views/blocks/categories_and_tags.html.erb:2 +msgid "Categories" +msgstr "Categorias" + +#: plugins/software_communities/views/search/_catalog_filter.html.erb:16 +msgid "More options" +msgstr "Mais opções" + +#: plugins/software_communities/views/search/_catalog_filter.html.erb:18 +msgid "Clean up" +msgstr "Limpar" + +#: plugins/software_communities/views/search/_catalog_filter.html.erb:19 +msgid "Close" +msgstr "Fechar" + +#: plugins/software_communities/views/comments_extra_fields.html.erb:3 +msgid "Additional informations" +msgstr "Informações adicionais" + +#: plugins/software_communities/views/comments_extra_fields.html.erb:11 +msgid "Number of Beneficiaries" +msgstr "Número de beneficiados" + +#: plugins/software_communities/views/comments_extra_fields.html.erb:17 +msgid "Saved resources" +msgstr "Recursos economizados" + +#: plugins/software_communities/views/box_organizer/_wiki_block.html.erb:3 +msgid "Wiki link" +msgstr "Link da wiki" + +#: plugins/software_communities/views/box_organizer/_software_tab_data_block.html.erb:5 +msgid "Which blog should have its posts displayed: " +msgstr "Qual blog deve ter seus posts exibidos: " + +#: plugins/software_communities/views/box_organizer/_software_tab_data_block.html.erb:13 +msgid "This community has no blogs" +msgstr "Essa comunidade não possui blogs" + +#: plugins/software_communities/views/box_organizer/_statistic_block.html.erb:5 +msgid "Benefited People" +msgstr "Pessoas Beneficiadas" + +#: plugins/software_communities/views/box_organizer/_statistic_block.html.erb:6 +#: plugins/software_communities/views/box_organizer/_statistic_block.html.erb:8 +msgid "Portal suggested value: " +msgstr "Valor sugerido pelo portal: " + +#: plugins/software_communities/views/box_organizer/_statistic_block.html.erb:7 +msgid "Saved Resources" +msgstr "Recursos economizados" + +#: plugins/software_communities/views/box_organizer/_download_block.html.erb:4 +msgid "Link" +msgstr "Link" + +#: plugins/software_communities/views/box_organizer/_download_block.html.erb:5 +msgid "Platforms" +msgstr "Plataformas" + +#: plugins/software_communities/views/box_organizer/_download_block.html.erb:6 +#: plugins/software_communities/views/blocks/download.html.erb:17 +msgid "Minimum Requirements" +msgstr "Requisitos Mínimos" + +#: plugins/software_communities/views/box_organizer/_download_block.html.erb:7 +msgid "Size:" +msgstr "Tamanho:" + +#: plugins/software_communities/views/box_organizer/_download_block.html.erb:16 +msgid "New link" +msgstr "Novo link" + +#: plugins/software_communities/views/box_organizer/_softwares_block.html.erb:2 +msgid "Limit of items" +msgstr "Limite de itens" + +#: plugins/software_communities/views/box_organizer/_softwares_block.html.erb:3 +msgid "Software Type:" +msgstr "Tipo de Software:" + +#: plugins/software_communities/views/_main_software_editor_extras.html.erb:1 +#: plugins/software_communities/views/profile/_software_tab.html.erb:3 +msgid "Software Information" +msgstr "Informação de Software" + +#: plugins/software_communities/views/_main_software_editor_extras.html.erb:15 +msgid "Licenses" +msgstr "Licenças" + +#: plugins/software_communities/views/_main_software_editor_extras.html.erb:20 +msgid "License link" +msgstr "Link para a licença" + +#: plugins/software_communities/views/profile/_profile_members_list.html.erb:2 +msgid "Sort by:" +msgstr "Ordenar por:" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:6 +msgid "Name:" +msgstr "Nome:" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:7 +msgid "Adherent to e_mag:" +msgstr "Aderente ao e_mag:" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:8 +msgid "Adherent to icp_brasil:" +msgstr "Aderente ao icp_brasil:" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:9 +msgid "Adherent to e_ping:" +msgstr "Aderente ao e_ping" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:10 +msgid "Adherent to e_arq:" +msgstr "Aderente ao e_arq" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:11 +msgid "Internacionalizable:" +msgstr "Internacionalizável:" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:12 +msgid "Operating Platform:" +msgstr "Plataforma Operacional:" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:13 +msgid "Demonstration URL:" +msgstr "URL de Demonstração:" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:14 +msgid "Short Name:" +msgstr "Nome Curto:" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:15 +msgid "Objectives:" +msgstr "Objetivos:" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:16 +msgid "Features:" +msgstr "Funcionalidades:" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:19 +msgid "Version:" +msgstr "Versão:" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:20 +msgid "Link:" +msgstr "Link:" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:25 +msgid "Show Libraries" +msgstr "Mostrar Bibliotecas" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:26 +msgid "Hide Libraries" +msgstr "Ocultar Bibliotecas" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:53 +msgid "Show Database" +msgstr "Mostrar Banco de Dados" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:54 +msgid "Hide Database" +msgstr "Ocultar Banco de Dados" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:63 +msgid "Software Databases" +msgstr "Bancos de Dados do Software" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:81 +msgid "Show Languages" +msgstr "Mostrar Linguagens" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:82 +msgid "Hide Languages" +msgstr "Ocultar Linguagens" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:91 +msgid "Software Languages" +msgstr "Linguagens do Software" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:109 +msgid "Show Operating Systems" +msgstr "Mostrar Sistema Operacional" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:110 +msgid "Hide Operating Systems" +msgstr "Ocultar Sistema Operacional" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:120 +msgid "Operating System" +msgstr "Sistema Operacional" + +#: plugins/software_communities/views/profile/members.html.erb:3 +#: plugins/software_communities/views/profile/members.html.erb:26 +msgid "Members" +msgstr "Membros" + +#: plugins/software_communities/views/profile/members.html.erb:4 +msgid "%s" +msgstr "" + +#: plugins/software_communities/views/profile/members.html.erb:43 +msgid "Administrators" +msgstr "Administradores" + +#: plugins/software_communities/views/profile/members.html.erb:57 +msgid "Go back" +msgstr "Voltar" + +#: plugins/software_communities/views/profile/members.html.erb:60 +msgid "Invite people to join" +msgstr "Convide pessoas para entrar" + +#: plugins/software_communities/views/profile/members.html.erb:63 +msgid "Send e-mail to members" +msgstr "Envie e-mail para os membros" + +#: plugins/software_communities/views/profile/index.html.erb:17 +msgid "Control Panel" +msgstr "Painel de Controle" + +#: plugins/software_communities/views/blocks/main_area_softwares.html.erb:23 +msgid "See More" +msgstr "Veja Mais" + +#: plugins/software_communities/views/blocks/_software_tab_blog.html.erb:5 +msgid "This community has no posts in its blog" +msgstr "Essa comunidade não possui posts nesse blog" + +#: plugins/software_communities/views/blocks/_software_tab_blog.html.erb:13 +msgid "Read more" +msgstr "Leia mais" + +#: plugins/software_communities/views/blocks/repository.html.erb:2 +#: plugins/software_communities/views/blocks/download.html.erb:2 +#: plugins/software_communities/views/blocks/software_tab_data.html.erb:2 +#: plugins/software_communities/views/blocks/wiki.html.erb:2 +#: plugins/software_communities/views/blocks/software_information.html.erb:4 +msgid "This community needs a software to use this block" +msgstr "Essa comunidade precisa de um software para usar este block" + +#: plugins/software_communities/views/blocks/repository.html.erb:4 +msgid "Repository" +msgstr "Repositório" + +#: plugins/software_communities/views/blocks/download.html.erb:4 +msgid "\"Download #{block.owner.software_info.community.name}\"" +msgstr "\"Baixar #{block.owner.software_info.community.name}\"" + +#: plugins/software_communities/views/blocks/download.html.erb:9 +msgid "Download the software" +msgstr "Baixar o software" + +#: plugins/software_communities/views/blocks/download.html.erb:15 +msgid "\"#{download[:name]}\"" +msgstr "\"#{download[:name]}\"" + +#: plugins/software_communities/views/blocks/download.html.erb:16 +msgid "\"Platform:#{download[:software_description]}\"" +msgstr "\"Platform:#{download[:software_description]}\"" + +#: plugins/software_communities/views/blocks/download.html.erb:23 +msgid "\"License: #{block.owner.software_info.license_info.version}\"" +msgstr "\"License: #{block.owner.software_info.license_info.version}\"" + +#: plugins/software_communities/views/blocks/categories_and_tags.html.erb:12 +msgid "Tags" +msgstr "Tags" + +#: plugins/software_communities/views/blocks/software_statistics.html.erb:5 +msgid " benefited people*" +msgstr " pessoas beneficiadas*" + +#: plugins/software_communities/views/blocks/software_statistics.html.erb:6 +msgid " saved resources*" +msgstr " recursos economizados*" + +#: plugins/software_communities/views/blocks/software_statistics.html.erb:10 +msgid "Data estimated by the software administrator." +msgstr "Dados estimados pelo administrador do software" + +#: plugins/software_communities/views/blocks/categories_software.html.erb:4 +msgid "See more Software" +msgstr "Veja mais softwares" + +#: plugins/software_communities/views/blocks/categories_software.html.erb:8 +msgid "Categories:" +msgstr "Categorias:" + +#: plugins/software_communities/views/blocks/categories_software.html.erb:23 +#: plugins/software_communities/views/blocks/search_catalog.html.erb:9 +msgid "Access the complete catalog" +msgstr "Acessar o catálogo completo" + +#: plugins/software_communities/views/blocks/software_tab_data.html.erb:6 +msgid "Discussions" +msgstr "Discussões" + +#: plugins/software_communities/views/blocks/software_tab_data.html.erb:7 +msgid "Blog" +msgstr "" + +#: plugins/software_communities/views/blocks/software_tab_data.html.erb:8 +msgid "Repository Feed" +msgstr "Feed do Repositório" + +#: plugins/software_communities/views/blocks/wiki.html.erb:4 +msgid "Wiki" +msgstr "" + +#: plugins/software_communities/views/blocks/software_highlights.html.erb:13 +msgid "See all" +msgstr "ver todos (%d)" + +#: plugins/software_communities/views/blocks/software_information.html.erb:16 +msgid "Control panel" +msgstr "Painel de Controle" + +#: plugins/software_communities/views/blocks/software_information.html.erb:24 +msgid "\"#{block.owner.software_info.acronym} - \"" +msgstr "\"#{block.owner.software_info.acronym} - \"" + +#: plugins/software_communities/views/blocks/software_information.html.erb:25 +msgid "\"#{block.owner.name}\"" +msgstr "\"#{block.owner.name}\"" + +#: plugins/software_communities/views/blocks/search_catalog.html.erb:2 +msgid "Catalog of Public Software" +msgstr "Catálogo de Software Público" + +#: plugins/software_communities/views/blocks/search_catalog.html.erb:5 +msgid "Search" +msgstr "Procurar" + +#~ msgid "Software Projects:" +#~ msgstr "Projetos de Software:" + +#~ msgid "Include in results" +#~ msgstr "Incluir em resultados" + +#~ msgid "" +#~ "Include software development projects that are not yet officially " +#~ "Brazilian Public Software." +#~ msgstr "" +#~ "Incluir projetos de desenvolvimento de software que não são ainda " +#~ "oficialmente Software Público Brasileiro" + +#~ msgid "Email must be different from secondary email." +#~ msgstr "Email deve ser diferente do email secundário." + +#~ msgid "E-mail or secondary e-mail already taken." +#~ msgstr "Email ou email secundário já foram escolhidos por outro usuário." + +#~ msgid "Invalid secondary email format." +#~ msgstr "Formato do email secundário inválido." + +#~ msgid "The governamental email must be the primary one." +#~ msgstr "O email governamental deve ser o email primário." + +#~ msgid "Institution is obligatory if user has a government email." +#~ msgstr "Instituição é obrigatório se usuário tem um email governamental." + +#~ msgid "Institution Catalog" +#~ msgstr "Catálogo de Instituição" + +#~ msgid "Create Institution" +#~ msgstr "Criar Instituição" + +#~ msgid "Institution Info" +#~ msgstr "Informação de Instituição" + +#~ msgid "Institution" +#~ msgstr "Instituição" + +#~ msgid "Institutions" +#~ msgstr "Instituições" + +#~ msgid "{#} institution" +#~ msgid_plural "{#} institutions" +#~ msgstr[0] "{#} instituição" +#~ msgstr[1] "{#} instituições" + +#~ msgid "This block displays the institutions in which the user is a member." +#~ msgstr "Este bloco apresenta as instituições em que o usuário é membro." + +#~ msgid "institutions|View all" +#~ msgstr "instituições|Veja todos" + +#~ msgid "invalid, only public and private institutions are allowed." +#~ msgstr "inválido, apenas instituições públicas e privadas são permitidas." + +#~ msgid "invalid format" +#~ msgstr "formato inválido" + +#~ msgid "Could not find Governmental Power or Governmental Sphere" +#~ msgstr "Não foi possível encontrar o poder ou esfera governamental" + +#~ msgid "Institution successful created!" +#~ msgstr "Instituição criada com sucesso!" + +#~ msgid "Institution could not be created!" +#~ msgstr "Instituição não pode ser criada!" + +#~ msgid "Name Should begin with a capital letter and no special characters" +#~ msgstr "" +#~ "Nome deve começar com letra maiúscula e não pode ter caracteres especiais" + +#~ msgid "Secondary e-mail" +#~ msgstr "Email secundário" + +#~ msgid "No institution found" +#~ msgstr "Nenhuma instituição encontrada" + +#~ msgid "Add new institution" +#~ msgstr "Adicionar nova instituiço" + +#~ msgid "Create new institution" +#~ msgstr "Criar nova instituição" + +#~ msgid "Should begin with a capital letter and no special characters" +#~ msgstr "Deve começar com letra maíuscula e sem caracteres especiais" + +#~ msgid "Email should have the following format: name@host.br" +#~ msgstr "Email deve ter o seguinte formato: name@host.br" + +#~ msgid "Site should have a valid format: http://name.hosts" +#~ msgstr "Site deve ter um formato válido: http://name.hosts" + +#~ msgid "If you work in a public agency use your government e-Mail" +#~ msgstr "Se você trabalha em um órgão público use seu e-Mail governamental" + +#~ msgid "New Institution" +#~ msgstr "Nova Instituição" + +#~ msgid "\"Can`t create new Institution: #{flash[:errors].length} errors\"" +#~ msgstr "" +#~ "\"Não foi possível criar a Instituição: #{flash[:errors].length} errors\"" + +#~ msgid "All fields with (*) are mandatory" +#~ msgstr "Todos os campos com (*) são obrigatórios" + +#~ msgid "Public Institution" +#~ msgstr "Insituição Pública" + +#~ msgid "Private Institution" +#~ msgstr "Instituição Privada" + +#~ msgid "Institution name already exists" +#~ msgstr "Instituição com o nome informado já existe" + +#~ msgid "Country" +#~ msgstr "País" + +#~ msgid "State" +#~ msgstr "Estado" + +#~ msgid "CNPJ" +#~ msgstr "CNPJ" + +#~ msgid "Acronym" +#~ msgstr "Sigla" + +#~ msgid "Fantasy name" +#~ msgstr "Nome fantasia" + +#~ msgid "Governmental Sphere:" +#~ msgstr "Esfera Governamental:" + +#~ msgid "Select a Governmental Sphere" +#~ msgstr "Selecione a Esfera Governamental" + +#~ msgid "Governmental Power:" +#~ msgstr "Poder Governamental:" + +#~ msgid "Select a Governmental Power" +#~ msgstr "Selecione um Poder Governamental" + +#~ msgid "Juridical Nature:" +#~ msgstr "Natureza Jurídica" + +#~ msgid "Select a Juridical Nature" +#~ msgstr "Selecione uma Natureza Jurídica" + +#~ msgid "SISP?" +#~ msgstr "SISP?" + +#~ msgid "Could not send the form data to the server" +#~ msgstr "Não foi possível enviar os dados do formulário ao servidor" + +#~ msgid "Creating institution" +#~ msgstr "Criando instituição" + +#~ msgid "Institution Information" +#~ msgstr "Informações de Instituição" + +#~ msgid "Type:" +#~ msgstr "Tipo:" + +#~ msgid "CNPJ:" +#~ msgstr "CNPJ:" + +#~ msgid "Last modification:" +#~ msgstr "Última modificação:" + +#~ msgid "Country:" +#~ msgstr "País" + +#~ msgid "State:" +#~ msgstr "Estado" + +#~ msgid "City:" +#~ msgstr "Cidade" + +#~ msgid "Fantasy Name:" +#~ msgstr "Nome Fantasia:" + +#~ msgid "Acronym:" +#~ msgstr "Sigla:" + +#~ msgid "SISP:" +#~ msgstr "SISP:" + +#~ msgid "Edit Institution" +#~ msgstr "Editar Instituíção" + +#~ msgid "Link to Repository" +#~ msgstr "Link para o Repositório" + +#~ msgid "Select the categories of your interest" +#~ msgstr "Selecione as categorias de seu interesse" + +#~ msgid "Delete profile" +#~ msgstr "Deletar perfil" + +#~ msgid "Deactivate profile" +#~ msgstr "Desativar perfil" + +#~ msgid "Activate profile" +#~ msgstr "Ativar perfil" + +#~ msgid "Complete Profile" +#~ msgstr "Completar Perfil" + +#~ msgid "Complete your profile" +#~ msgstr "Complete seu perfil" + +#~ msgid "Hide" +#~ msgstr "Esconder" + +#~ msgid "Most downloaded" +#~ msgstr "Mais baixado" + +#~ msgid "Top rated" +#~ msgstr "Mais Populares" + +#~ msgid "Recently updated" +#~ msgstr "Atualizado Recentemente" + +#~ msgid "New in portal" +#~ msgstr "Novo no portal" diff --git a/src/noosfero-spb/software_communities/po/software_communities.pot b/src/noosfero-spb/software_communities/po/software_communities.pot new file mode 100644 index 0000000..5885eee --- /dev/null +++ b/src/noosfero-spb/software_communities/po/software_communities.pot @@ -0,0 +1,1044 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 1.2-143-g8dfded9\n" +"POT-Creation-Date: 2015-09-11 17:15-0000\n" +"PO-Revision-Date: 2015-09-11 17:15-0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" + +#: plugins/software_communities/test/unit/software_info_validation_test.rb:108 +msgid "Features is too long (maximum is 4000 characters)" +msgstr "" + +#: plugins/software_communities/test/unit/software_info_validation_test.rb:116 +msgid "Objectives is too long (maximum is 4000 characters)" +msgstr "" + +#: plugins/software_communities/controllers/software_communities_plugin_myprofile_controller.rb:41 +#: plugins/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb:19 +msgid "Save and Configure Community" +msgstr "" + +#: plugins/software_communities/controllers/software_communities_plugin_myprofile_controller.rb:45 +msgid "Software updated successfully" +msgstr "" + +#: plugins/software_communities/controllers/software_communities_plugin_myprofile_controller.rb:49 +msgid "Could not update software" +msgstr "" + +#: plugins/software_communities/controllers/software_communities_plugin_myprofile_controller.rb:130 +msgid "Your new software request will be evaluated by anadministrator. You will be notified." +msgstr "" + +#: plugins/software_communities/controllers/software_communities_plugin_profile_controller.rb:7 +msgid "Could not find the download file" +msgstr "" + +#: plugins/software_communities/controllers/software_communities_plugin_profile_controller.rb:8 +msgid "Invalid download params" +msgstr "" + +#: plugins/software_communities/lib/operating_system.rb:12 +msgid "too long (maximum is 20 characters)" +msgstr "" + +#: plugins/software_communities/lib/statistic_block.rb:9 +msgid "Software Statistics" +msgstr "" + +#: plugins/software_communities/lib/statistic_block.rb:13 +msgid "This block displays software statistics." +msgstr "" + +#: plugins/software_communities/lib/categories_and_tags_block.rb:8 +msgid "Categories and Tags" +msgstr "" + +#: plugins/software_communities/lib/categories_and_tags_block.rb:12 +msgid "This block displays the categories and tags of a software." +msgstr "" + +#: plugins/software_communities/lib/wiki_block.rb:8 +msgid "Wiki Link" +msgstr "" + +#: plugins/software_communities/lib/wiki_block.rb:12 +msgid "This block displays a link to the software wiki." +msgstr "" + +#: plugins/software_communities/lib/library.rb:5 +msgid "can't be blank" +msgstr "" + +#: plugins/software_communities/lib/library.rb:8 +msgid "Too long (maximum is 20 characters)" +msgstr "" + +#: plugins/software_communities/lib/search_catalog_block.rb:8 +msgid "Search Softwares catalog" +msgstr "" + +#: plugins/software_communities/lib/search_catalog_block.rb:12 +msgid "This block displays the search categories field " +msgstr "" + +#: plugins/software_communities/lib/software_database.rb:12 +msgid "Software database is too long (maximum is 20 characters)" +msgstr "" + +#: plugins/software_communities/lib/ext/category.rb:5 +msgid "Agriculture, Fisheries and Extraction" +msgstr "" + +#: plugins/software_communities/lib/ext/category.rb:6 +msgid "Science, Information and Communication" +msgstr "" + +#: plugins/software_communities/lib/ext/category.rb:7 +msgid "Economy and Finances" +msgstr "" + +#: plugins/software_communities/lib/ext/category.rb:8 +msgid "Public Administration" +msgstr "" + +#: plugins/software_communities/lib/ext/category.rb:9 +msgid "Habitation, Sanitation and Urbanism" +msgstr "" + +#: plugins/software_communities/lib/ext/category.rb:10 +msgid "Individual, Family and Society" +msgstr "" + +#: plugins/software_communities/lib/ext/category.rb:11 +msgid "Health" +msgstr "" + +#: plugins/software_communities/lib/ext/category.rb:12 +msgid "Social Welfare and Development" +msgstr "" + +#: plugins/software_communities/lib/ext/category.rb:13 +msgid "Defense and Security" +msgstr "" + +#: plugins/software_communities/lib/ext/category.rb:14 +msgid "Education" +msgstr "" + +#: plugins/software_communities/lib/ext/category.rb:15 +msgid "Government and Politics" +msgstr "" + +#: plugins/software_communities/lib/ext/category.rb:16 +msgid "Justice and Legislation" +msgstr "" + +#: plugins/software_communities/lib/ext/category.rb:17 +msgid "International Relationships" +msgstr "" + +#: plugins/software_communities/lib/ext/category.rb:18 +msgid "Transportation and Transit" +msgstr "" + +#: plugins/software_communities/lib/ext/search_controller.rb:118 +msgid "Result Search" +msgstr "" + +#: plugins/software_communities/lib/ext/search_controller.rb:142 +msgid "Selected options: " +msgstr "" + +#: plugins/software_communities/lib/download_block.rb:15 +msgid "Download Stable Version" +msgstr "" + +#: plugins/software_communities/lib/download_block.rb:19 +msgid "This block displays the stable version of a software." +msgstr "" + +#: plugins/software_communities/lib/software_tab_data_block.rb:10 +msgid "Software Tab Data" +msgstr "" + +#: plugins/software_communities/lib/software_tab_data_block.rb:14 +msgid "This block is used by colab to insert data into Noosfero" +msgstr "" + +#: plugins/software_communities/lib/software_highlights_block.rb:4 +msgid "Software Highlights Block" +msgstr "" + +#: plugins/software_communities/lib/software_highlights_block.rb:8 +msgid "This block displays the softwares icon into a highlight" +msgstr "" + +#: plugins/software_communities/lib/dynamic_table_helper.rb:17 +#: plugins/software_communities/views/box_organizer/_download_block.html.erb:3 +#: plugins/software_communities/views/_main_software_editor_extras.html.erb:3 +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:37 +#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:3 +msgid "Name" +msgstr "" + +#: plugins/software_communities/lib/dynamic_table_helper.rb:18 +msgid "Version" +msgstr "" + +#: plugins/software_communities/lib/dynamic_table_helper.rb:19 +#: plugins/software_communities/views/profile/_software_tab.html.erb:18 +msgid "License" +msgstr "" + +#: plugins/software_communities/lib/dynamic_table_helper.rb:91 +msgid "Autocomplete field, type something" +msgstr "" + +#: plugins/software_communities/lib/dynamic_table_helper.rb:116 +#: plugins/software_communities/views/box_organizer/_download_list_template.html.erb:8 +#: plugins/software_communities/views/box_organizer/_download_list.html.erb:8 +msgid "Delete" +msgstr "" + +#: plugins/software_communities/lib/create_software.rb:36 +msgid "New software" +msgstr "" + +#: plugins/software_communities/lib/create_software.rb:44 +msgid "%{requestor} wants to create software %{subject} with" +msgstr "" + +#: plugins/software_communities/lib/create_software.rb:46 +msgid " no finality." +msgstr "" + +#: plugins/software_communities/lib/create_software.rb:48 +msgid " this finality:

    %{finality}

    " +msgstr "" + +#: plugins/software_communities/lib/create_software.rb:68 +msgid "%{requestor} wants to create software %{subject}" +msgstr "" + +#: plugins/software_communities/lib/create_software.rb:73 +msgid "User \"%{user}\" just requested to create software %{software}.\n You have to approve or reject it through the \"Pending Validations\"\n section in your control panel.\n" +msgstr "" + +#: plugins/software_communities/lib/create_software.rb:80 +msgid "Your request for registering software %{software} at %{environment} was\n just sent. Environment administrator will receive it and will approve or\n reject your request according to his methods and criteria.\n\n You will be notified as soon as environment administrator has a position\n about your request." +msgstr "" + +#: plugins/software_communities/lib/create_software.rb:90 +msgid "Your request for registering software %{software} at %{environment} was\n not approved by the environment administrator. The following explanation\n was given: \n\n%{explanation}" +msgstr "" + +#: plugins/software_communities/lib/create_software.rb:99 +msgid "Your request for registering the software \"%{software}\" was approved.\n You can access %{url} and finish the registration of your software." +msgstr "" + +#: plugins/software_communities/lib/software_communities_plugin.rb:17 +msgid "Add Public Software and MPOG features." +msgstr "" + +#: plugins/software_communities/lib/software_communities_plugin.rb:90 +msgid "Rate this software" +msgstr "" + +#: plugins/software_communities/lib/software_communities_plugin.rb:136 +msgid "Software Info" +msgstr "" + +#: plugins/software_communities/lib/software_communities_plugin.rb:147 +msgid "Create a new software" +msgstr "" + +#: plugins/software_communities/lib/software_communities_plugin.rb:157 +msgid "Software" +msgstr "" + +#: plugins/software_communities/lib/repository_block.rb:8 +msgid "Repository Link" +msgstr "" + +#: plugins/software_communities/lib/repository_block.rb:12 +msgid "This block displays the repository link of a software." +msgstr "" + +#: plugins/software_communities/lib/software_info.rb:151 +msgid "Name is too long (maximum is %{count} characters)" +msgstr "" + +#: plugins/software_communities/lib/software_info.rb:219 +msgid "can't have more than 10 characteres" +msgstr "" + +#: plugins/software_communities/lib/software_info.rb:222 +msgid "can't have whitespaces" +msgstr "" + +#: plugins/software_communities/lib/software_info.rb:230 plugins/software_communities/lib/software_info.rb:236 +#: plugins/software_communities/lib/software_info.rb:242 +msgid ": at least one must be filled" +msgstr "" + +#: plugins/software_communities/lib/software_information_block.rb:8 +msgid "Basic Software Information" +msgstr "" + +#: plugins/software_communities/lib/software_information_block.rb:12 +msgid "This block displays the basic information of a software profile." +msgstr "" + +#: plugins/software_communities/lib/software_language.rb:10 +msgid "Software language is too long (maximum is 20 characters)" +msgstr "" + +#: plugins/software_communities/lib/categories_software_block.rb:8 +msgid "Categories Softwares" +msgstr "" + +#: plugins/software_communities/lib/categories_software_block.rb:12 +msgid "This block displays the categories and the amount of softwares for\n each category." +msgstr "" + +#: plugins/software_communities/lib/softwares_block.rb:8 +msgid "Softwares" +msgstr "" + +#: plugins/software_communities/lib/softwares_block.rb:13 +msgid "{#} generic software" +msgid_plural "{#} generic softwares" +msgstr[0] "" +msgstr[1] "" + +#: plugins/software_communities/lib/softwares_block.rb:15 +msgid "{#} public software" +msgid_plural "{#} public softwares" +msgstr[0] "" +msgstr[1] "" + +#: plugins/software_communities/lib/softwares_block.rb:17 +msgid "{#} software" +msgid_plural "{#} softwares" +msgstr[0] "" +msgstr[1] "" + +#: plugins/software_communities/lib/softwares_block.rb:22 +msgid "This block displays the softwares in which the user is a member." +msgstr "" + +#: plugins/software_communities/lib/softwares_block.rb:31 plugins/software_communities/lib/softwares_block.rb:37 +msgid "softwares|View all" +msgstr "" + +#: plugins/software_communities/views/profile/members.html.erb:3 plugins/software_communities/views/profile/members.html.erb:26 +msgid "Members" +msgstr "" + +#: plugins/software_communities/views/profile/members.html.erb:4 +msgid "%s" +msgstr "" + +#: plugins/software_communities/views/profile/members.html.erb:43 +msgid "Administrators" +msgstr "" + +#: plugins/software_communities/views/profile/members.html.erb:57 +msgid "Go back" +msgstr "" + +#: plugins/software_communities/views/profile/members.html.erb:60 +msgid "Invite people to join" +msgstr "" + +#: plugins/software_communities/views/profile/members.html.erb:63 +msgid "Send e-mail to members" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:3 +#: plugins/software_communities/views/_main_software_editor_extras.html.erb:1 +msgid "Software Information" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:6 +msgid "Name:" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:7 +msgid "Adherent to e_mag:" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:7 plugins/software_communities/views/profile/_software_tab.html.erb:8 +#: plugins/software_communities/views/profile/_software_tab.html.erb:9 +#: plugins/software_communities/views/profile/_software_tab.html.erb:10 +#: plugins/software_communities/views/profile/_software_tab.html.erb:11 +#: plugins/software_communities/views/profile_editor/_software_community.html.erb:49 +msgid "Yes" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:7 plugins/software_communities/views/profile/_software_tab.html.erb:8 +#: plugins/software_communities/views/profile/_software_tab.html.erb:9 +#: plugins/software_communities/views/profile/_software_tab.html.erb:10 +#: plugins/software_communities/views/profile/_software_tab.html.erb:11 +#: plugins/software_communities/views/profile_editor/_software_community.html.erb:50 +msgid "No" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:8 +msgid "Adherent to icp_brasil:" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:9 +msgid "Adherent to e_ping:" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:10 +msgid "Adherent to e_arq:" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:11 +msgid "Internacionalizable:" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:12 +msgid "Operating Platform:" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:13 +msgid "Demonstration URL:" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:14 +msgid "Short Name:" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:15 +msgid "Objectives:" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:16 +msgid "Features:" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:19 +msgid "Version:" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:20 +msgid "Link:" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:25 +msgid "Show Libraries" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:26 +msgid "Hide Libraries" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:35 +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:74 +msgid "Libraries" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:53 +msgid "Show Database" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:54 +msgid "Hide Database" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:63 +msgid "Software Databases" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:81 +msgid "Show Languages" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:82 +msgid "Hide Languages" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:91 +msgid "Software Languages" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:109 +msgid "Show Operating Systems" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:110 +msgid "Hide Operating Systems" +msgstr "" + +#: plugins/software_communities/views/profile/_software_tab.html.erb:120 +msgid "Operating System" +msgstr "" + +#: plugins/software_communities/views/profile/index.html.erb:17 +msgid "Control Panel" +msgstr "" + +#: plugins/software_communities/views/profile/_profile_members_list.html.erb:2 +msgid "Sort by:" +msgstr "" + +#: plugins/software_communities/views/profile/_profile_members_list.html.erb:5 +#: plugins/software_communities/views/search/_software_search_form.html.erb:52 +msgid "Name A-Z" +msgstr "" + +#: plugins/software_communities/views/profile/_profile_members_list.html.erb:6 +#: plugins/software_communities/views/search/_software_search_form.html.erb:53 +msgid "Name Z-A" +msgstr "" + +#: plugins/software_communities/views/box_organizer/_software_tab_data_block.html.erb:5 +msgid "Which blog should have its posts displayed: " +msgstr "" + +#: plugins/software_communities/views/box_organizer/_software_tab_data_block.html.erb:13 +msgid "This community has no blogs" +msgstr "" + +#: plugins/software_communities/views/box_organizer/_softwares_block.html.erb:2 +msgid "Limit of items" +msgstr "" + +#: plugins/software_communities/views/box_organizer/_softwares_block.html.erb:3 +msgid "Software Type:" +msgstr "" + +#: plugins/software_communities/views/box_organizer/_statistic_block.html.erb:5 +msgid "Benefited People" +msgstr "" + +#: plugins/software_communities/views/box_organizer/_statistic_block.html.erb:6 +#: plugins/software_communities/views/box_organizer/_statistic_block.html.erb:8 +msgid "Portal suggested value: " +msgstr "" + +#: plugins/software_communities/views/box_organizer/_statistic_block.html.erb:7 +msgid "Saved Resources" +msgstr "" + +#: plugins/software_communities/views/box_organizer/_download_block.html.erb:4 +msgid "Link" +msgstr "" + +#: plugins/software_communities/views/box_organizer/_download_block.html.erb:5 +msgid "Platforms" +msgstr "" + +#: plugins/software_communities/views/box_organizer/_download_block.html.erb:6 plugins/software_communities/views/blocks/download.html.erb:17 +msgid "Minimum Requirements" +msgstr "" + +#: plugins/software_communities/views/box_organizer/_download_block.html.erb:7 +msgid "Size:" +msgstr "" + +#: plugins/software_communities/views/box_organizer/_download_block.html.erb:16 +msgid "New link" +msgstr "" + +#: plugins/software_communities/views/box_organizer/_wiki_block.html.erb:3 +msgid "Wiki link" +msgstr "" + +#: plugins/software_communities/views/search/_catalog_filter.html.erb:4 +#: plugins/software_communities/views/blocks/categories_and_tags.html.erb:2 +msgid "Categories" +msgstr "" + +#: plugins/software_communities/views/search/_catalog_filter.html.erb:10 +#: plugins/software_communities/views/search/_full_community.html.erb:35 +#: plugins/software_communities/views/search/_catalog_result_list.html.erb:41 +#: plugins/software_communities/views/blocks/categories_software.html.erb:15 +msgid "\"#{category.name}\"" +msgstr "" + +#: plugins/software_communities/views/search/_catalog_filter.html.erb:16 +msgid "More options" +msgstr "" + +#: plugins/software_communities/views/search/_catalog_filter.html.erb:18 +msgid "Clean up" +msgstr "" + +#: plugins/software_communities/views/search/_catalog_filter.html.erb:19 +msgid "Close" +msgstr "" + +#: plugins/software_communities/views/search/_full_community.html.erb:27 +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:65 +msgid "Software Categories" +msgstr "" + +#: plugins/software_communities/views/search/_full_community.html.erb:46 +msgid "This software doesn't have categories" +msgstr "" + +#: plugins/software_communities/views/search/_catalog_result_list.html.erb:12 +msgid "see all (%d)" +msgstr "" + +#: plugins/software_communities/views/search/_catalog_result_list.html.erb:34 +msgid "No software found. Try more general filters" +msgstr "" + +#: plugins/software_communities/views/search/_catalog_result_list.html.erb:36 +msgid "No software found. Try more general filters or check the software category individually" +msgstr "" + +#: plugins/software_communities/views/search/_software_search_form.html.erb:3 +msgid "Search Public Software Catalog" +msgstr "" + +#: plugins/software_communities/views/search/_software_search_form.html.erb:14 +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:4 +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:7 +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:10 +msgid "Public Software" +msgstr "" + +#: plugins/software_communities/views/search/_software_search_form.html.erb:15 +msgid "Projects that have passed by the Avalia SPB process according to the requirements of IN 01/2011." +msgstr "" + +#: plugins/software_communities/views/search/_software_search_form.html.erb:18 +msgid "All" +msgstr "" + +#: plugins/software_communities/views/search/_software_search_form.html.erb:19 +msgid "Projects included in the portal as cases provided by the IN 01/2011." +msgstr "" + +#: plugins/software_communities/views/search/_software_search_form.html.erb:24 +msgid "Type words about the software you're looking for (the search begins after 3 characters)" +msgstr "" + +#: plugins/software_communities/views/search/_software_search_form.html.erb:27 +msgid "Filter" +msgstr "" + +#: plugins/software_communities/views/search/_software_search_form.html.erb:54 +msgid "Relevance" +msgstr "" + +#: plugins/software_communities/views/search/software_infos.html.erb:6 +msgid "Type words about the %s you're looking for" +msgstr "" + +#: plugins/software_communities/views/_main_software_editor_extras.html.erb:10 +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:56 +#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:14 +msgid "Finality" +msgstr "" + +#: plugins/software_communities/views/_main_software_editor_extras.html.erb:15 +msgid "Licenses" +msgstr "" + +#: plugins/software_communities/views/_main_software_editor_extras.html.erb:20 +msgid "License link" +msgstr "" + +#: plugins/software_communities/views/_main_software_editor_extras.html.erb:29 +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:89 +#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:45 +msgid "Link to Repository: " +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:4 +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:7 +msgid "Public software" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:12 +msgid "Adherent to e-PING ?" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:21 +msgid "Adherent to e-MAG ?" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:30 +msgid "Adherent to ICP-Brasil ?" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:39 +msgid "Adherent to e-ARQ ?" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:48 +msgid "Internacionalizable ?" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:59 +msgid "Operating Platform" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:64 +msgid "Features" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:69 +msgid "Demonstration url" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:82 +msgid "Operating Systems" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:90 +msgid "Programming languages" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:97 +msgid "Databases" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_database_fields.html.erb:11 +msgid "New Database" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_license_info_fields.html.erb:5 +msgid "Autocomplete field, type some license" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_license_info_fields.html.erb:8 +msgid "Read license" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_language_fields.html.erb:11 +msgid "New language" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_operating_system_fields.html.erb:11 +msgid "New Operating System" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:5 +msgid "Creating new software" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:9 +msgid "Enter the basic information about the software.
    \n You can add the details after you create it." +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:16 +msgid "Note that the creation of communities in this environment is restricted. Your request to create this new community will be sent to %{environment} administrators and will be approved or rejected according to their methods and criteria." +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:22 +msgid "\"Can`t create new software: #{@errors.length} errors\"" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:45 +msgid "Domain" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:57 +#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:15 +msgid "What is the software for?" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:64 +#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:21 +msgid "Software Logo" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:69 +#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:26 +msgid "Image:" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:69 +#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:26 +msgid "Max size: %s (.jpg, .gif, .png)" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:76 +#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:33 +msgid "License Version: " +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:97 +msgid "Create" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:98 +msgid "Cancel" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:8 +msgid "Short Name" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb:1 +msgid "Edit Software" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb:9 +msgid "Main Information" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb:12 +msgid "Specifications" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb:18 +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:68 +msgid "Save" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb:20 +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:71 +msgid "Back to control panel" +msgstr "" + +#: plugins/software_communities/views/software_communities_plugin_myprofile/_library_fields.html.erb:11 +msgid "New Library" +msgstr "" + +#: plugins/software_communities/views/blocks/categories_software.html.erb:4 +msgid "See more Software" +msgstr "" + +#: plugins/software_communities/views/blocks/categories_software.html.erb:8 +msgid "Categories:" +msgstr "" + +#: plugins/software_communities/views/blocks/categories_software.html.erb:23 plugins/software_communities/views/blocks/search_catalog.html.erb:9 +msgid "Access the complete catalog" +msgstr "" + +#: plugins/software_communities/views/blocks/wiki.html.erb:2 +#: plugins/software_communities/views/blocks/software_tab_data.html.erb:2 plugins/software_communities/views/blocks/download.html.erb:2 +#: plugins/software_communities/views/blocks/software_information.html.erb:4 plugins/software_communities/views/blocks/repository.html.erb:2 +msgid "This community needs a software to use this block" +msgstr "" + +#: plugins/software_communities/views/blocks/wiki.html.erb:4 +msgid "Wiki" +msgstr "" + +#: plugins/software_communities/views/blocks/main_area_softwares.html.erb:23 +msgid "See More" +msgstr "" + +#: plugins/software_communities/views/blocks/search_catalog.html.erb:2 +msgid "Catalog of Public Software" +msgstr "" + +#: plugins/software_communities/views/blocks/search_catalog.html.erb:5 +msgid "Search" +msgstr "" + +#: plugins/software_communities/views/blocks/categories_and_tags.html.erb:12 +msgid "Tags" +msgstr "" + +#: plugins/software_communities/views/blocks/software_tab_data.html.erb:6 +msgid "Discussions" +msgstr "" + +#: plugins/software_communities/views/blocks/software_tab_data.html.erb:7 +msgid "Blog" +msgstr "" + +#: plugins/software_communities/views/blocks/software_tab_data.html.erb:8 +msgid "Repository Feed" +msgstr "" + +#: plugins/software_communities/views/blocks/software_statistics.html.erb:5 +msgid " benefited people*" +msgstr "" + +#: plugins/software_communities/views/blocks/software_statistics.html.erb:6 +msgid " saved resources*" +msgstr "" + +#: plugins/software_communities/views/blocks/software_statistics.html.erb:10 +msgid "Data estimated by the software administrator." +msgstr "" + +#: plugins/software_communities/views/blocks/download.html.erb:4 +msgid "\"Download #{block.owner.software_info.community.name}\"" +msgstr "" + +#: plugins/software_communities/views/blocks/download.html.erb:9 +msgid "Download the software" +msgstr "" + +#: plugins/software_communities/views/blocks/download.html.erb:15 +msgid "\"#{download[:name]}\"" +msgstr "" + +#: plugins/software_communities/views/blocks/download.html.erb:16 +msgid "\"Platform:#{download[:software_description]}\"" +msgstr "" + +#: plugins/software_communities/views/blocks/download.html.erb:23 +msgid "\"License: #{block.owner.software_info.license_info.version}\"" +msgstr "" + +#: plugins/software_communities/views/blocks/software_highlights.html.erb:13 +msgid "See all" +msgstr "" + +#: plugins/software_communities/views/blocks/_software_tab_blog.html.erb:5 +msgid "This community has no posts in its blog" +msgstr "" + +#: plugins/software_communities/views/blocks/_software_tab_blog.html.erb:13 +msgid "Read more" +msgstr "" + +#: plugins/software_communities/views/blocks/software_information.html.erb:16 +msgid "Control panel" +msgstr "" + +#: plugins/software_communities/views/blocks/software_information.html.erb:24 +msgid "\"#{block.owner.software_info.acronym} - \"" +msgstr "" + +#: plugins/software_communities/views/blocks/software_information.html.erb:25 +msgid "\"#{block.owner.name}\"" +msgstr "" + +#: plugins/software_communities/views/blocks/repository.html.erb:4 +msgid "Repository" +msgstr "" + +#: plugins/software_communities/views/profile_editor/_software_community.html.erb:1 +msgid "General information" +msgstr "" + +#: plugins/software_communities/views/profile_editor/_software_community.html.erb:40 +msgid "Address" +msgstr "" + +#: plugins/software_communities/views/profile_editor/_software_community.html.erb:46 +msgid "WARNING!" +msgstr "" + +#: plugins/software_communities/views/profile_editor/_software_community.html.erb:47 +msgid "You are about to change the address, and this will break external links to the homepage or to content inside it. Do you really want to change?" +msgstr "" + +#: plugins/software_communities/views/profile_editor/_software_community.html.erb:63 +msgid "Enable \"contact us\"" +msgstr "" + +#: plugins/software_communities/views/profile_editor/_software_community.html.erb:68 +msgid "Products/Services catalog" +msgstr "" + +#: plugins/software_communities/views/profile_editor/_software_community.html.erb:69 +msgid "Number of products/services displayed per page on catalog" +msgstr "" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:4 +msgid "Configure Software Community" +msgstr "" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:8 +msgid "Set the basic settings of the software associated community" +msgstr "" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:18 +msgid "This profile is a template" +msgstr "" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:24 +msgid "Privacy options" +msgstr "" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:28 +msgid "Public — show my contents to all internet users" +msgstr "" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:31 +msgid "Private — show my contents only to friends" +msgstr "" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:35 +msgid "Public — show content of this group to all internet users" +msgstr "" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:38 +msgid "Private — show content of this group only to members" +msgstr "" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:43 +msgid "Page to redirect after login" +msgstr "" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:47 +msgid "Translations" +msgstr "" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:49 +msgid "Automaticaly redirect the visitor to the article translated to his/her language" +msgstr "" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:53 +msgid "Suggestions" +msgstr "" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:55 +msgid "Send me relationship suggestions by email" +msgstr "" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:77 +msgid "Delete software and community" +msgstr "" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:80 +msgid "Deactivate software and community" +msgstr "" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:80 +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:82 +msgid "Are you sure you want to deactivate this profile?" +msgstr "" + +#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:82 +msgid "Activate software and community" +msgstr "" + +#: plugins/software_communities/views/profile_editor/_first_edit_software_community_extras.html.erb:3 +msgid "Step 1 - Software Creation" +msgstr "" + +#: plugins/software_communities/views/profile_editor/_first_edit_software_community_extras.html.erb:7 +msgid "Step 2 - Community Settings" +msgstr "" + +#: plugins/software_communities/views/comments_extra_fields.html.erb:3 +msgid "Additional informations" +msgstr "" + +#: plugins/software_communities/views/comments_extra_fields.html.erb:11 +msgid "Number of Beneficiaries" +msgstr "" + +#: plugins/software_communities/views/comments_extra_fields.html.erb:17 +msgid "Saved resources" +msgstr "" diff --git a/src/noosfero-spb/software_communities/public/app.js b/src/noosfero-spb/software_communities/public/app.js new file mode 100644 index 0000000..7e98375 --- /dev/null +++ b/src/noosfero-spb/software_communities/public/app.js @@ -0,0 +1,11 @@ +(function() { + 'use strict'; + + var $ = modulejs.require('jquery'); + var Initializer = modulejs.require('Initializer'); + + + $(document).ready(function() { + Initializer.init(); + }); +})(); diff --git a/src/noosfero-spb/software_communities/public/blocks/software-download.js b/src/noosfero-spb/software_communities/public/blocks/software-download.js new file mode 100644 index 0000000..94bda3f --- /dev/null +++ b/src/noosfero-spb/software_communities/public/blocks/software-download.js @@ -0,0 +1,51 @@ +modulejs.define('SoftwareDownload', ['jquery', 'NoosferoRoot'], function($, NoosferoRoot) { + 'use strict'; + + var AJAX_URL = { + get_download_template: + NoosferoRoot.urlWithSubDirectory("/plugin/software_communities/get_block_template") + }; + + var $download_html_template; + + function getDownloadListTemplate() { + var block_template = sessionStorage.getItem('download_list_block_template'); + + if(block_template && block_template.length > 0) { + $download_html_template = block_template; + } else { + $.get(AJAX_URL.get_download_template, function(response) { + $download_html_template = response; + sessionStorage.setItem('download_list_block_template', response); + }); + } + } + + + function SoftwareDownload() { + getDownloadListTemplate(); + } + + + SoftwareDownload.prototype.addNewDonwload = function() { + var new_download = $($download_html_template); + $("#droppable-list-downloads").append(new_download); + } + + + SoftwareDownload.prototype.deleteDownload = function(element) { + var delete_download = $(element).parent().parent().parent().remove(); + } + + + return { + isCurrentPage: function() { + return $('.download-block').length !== 0; + }, + + + init: function() { + window.softwareDownload = new SoftwareDownload(); + } + } +}); diff --git a/src/noosfero-spb/software_communities/public/initializer.js b/src/noosfero-spb/software_communities/public/initializer.js new file mode 100644 index 0000000..b0d3be6 --- /dev/null +++ b/src/noosfero-spb/software_communities/public/initializer.js @@ -0,0 +1,35 @@ +(function() { + 'use strict'; + + var dependencies = [ + 'ControlPanel', + 'EditSoftware', + 'NewSoftware', + 'SearchSoftwareCatalog', + 'SoftwareDownload', + 'ProfileTabsSoftware', + 'NewCommunity', + 'CommentsSoftwareExtraFields' + ]; + + + modulejs.define('Initializer', dependencies, function() { + var __dependencies = arguments; + + + function call_dependency(dependency) { + if( dependency.isCurrentPage() ) { + dependency.init(); + } + } + + + return { + init: function() { + for(var i=0, len = __dependencies.length; i < len; i++) { + call_dependency(__dependencies[i]); + } + } + }; + }); +})(); diff --git a/src/noosfero-spb/software_communities/public/lib/auto-complete.js b/src/noosfero-spb/software_communities/public/lib/auto-complete.js new file mode 100644 index 0000000..f96c04b --- /dev/null +++ b/src/noosfero-spb/software_communities/public/lib/auto-complete.js @@ -0,0 +1,64 @@ +modulejs.define('AutoComplete', ['jquery'], function($) { + 'use strict'; + + + function get_hidden_description_field(autocomplete_field, klass) { + var field = $(autocomplete_field); + field = field.parent().parent().find(klass); + return field; + } + + + function verify_autocomplete(field, klass) { + var field = $(field); + var selected = get_hidden_description_field(field, klass); + var message_error = $(field).parent().find(".autocomplete_validation_message"); + + if( field.length === 0 || selected.val().length === 0 ) { + message_error.removeClass("hide-field"); + selected.val(""); + + message_error.show(); + } else { + field.val(selected.attr("data-label")); + message_error.hide(); + } + } + + + function enable_autocomplete(field_name, field_value_class, autocomplete_class, ajax_url, select_callback) { + $(autocomplete_class).autocomplete({ + source : function(request, response){ + $.ajax({ + type: "GET", + url: ajax_url, + data: {query: request.term, field: field_name}, + success: function(result){ + response(result); + } + }); + }, + + minLength: 0, + + select : function (event, selected) { + var description = get_hidden_description_field(this, field_value_class); + description.val(selected.item.id); + description.attr("data-label", selected.item.label); + + if( select_callback !== undefined ) { + select_callback(selected); + } + } + }).blur(function(){ + verify_autocomplete(this, field_value_class); + }).click(function(){ + $(this).autocomplete("search", ""); + }); + } + + + return { + enable: enable_autocomplete + } +}); \ No newline at end of file diff --git a/src/noosfero-spb/software_communities/public/lib/noosfero-root.js b/src/noosfero-spb/software_communities/public/lib/noosfero-root.js new file mode 100644 index 0000000..cd3c8bf --- /dev/null +++ b/src/noosfero-spb/software_communities/public/lib/noosfero-root.js @@ -0,0 +1,13 @@ +modulejs.define('NoosferoRoot', function() { + 'use strict'; + + + function url_with_subdirectory(url) { + return noosfero_root() + url; + } + + + return { + urlWithSubDirectory: url_with_subdirectory + } +}); diff --git a/src/noosfero-spb/software_communities/public/lib/select-element.js b/src/noosfero-spb/software_communities/public/lib/select-element.js new file mode 100644 index 0000000..26880ae --- /dev/null +++ b/src/noosfero-spb/software_communities/public/lib/select-element.js @@ -0,0 +1,35 @@ +modulejs.define('SelectElement', function() { + 'use strict'; + + + function SelectElement(name, id) { + this.select = document.createElement("select"); + } + + + SelectElement.prototype.setAttr = function(attr, value) { + return this.select.setAttribute(attr, value); + }; + + + SelectElement.prototype.addOption = function(option) { + return this.select.add(option); + }; + + + SelectElement.prototype.getSelect = function() { + return this.select; + }; + + + SelectElement.generateOption = function(value, text) { + var option; + option = document.createElement("option"); + option.setAttribute("value", value); + option.text = text; + return option; + }; + + + return SelectElement; +}); diff --git a/src/noosfero-spb/software_communities/public/lib/select-field-choices.js b/src/noosfero-spb/software_communities/public/lib/select-field-choices.js new file mode 100644 index 0000000..095d4e1 --- /dev/null +++ b/src/noosfero-spb/software_communities/public/lib/select-field-choices.js @@ -0,0 +1,81 @@ +modulejs.define('SelectFieldChoices', ['jquery', 'SelectElement'], function($, SelectElement) { + 'use strict'; + + + function SelectFieldChoices(state_id, city_id, state_url) { + this.state_id = state_id; + this.input_html = $(state_id).parent().html(); + this.old_value = $(state_id).val(); + this.city_parent_div = $(city_id).parent().parent().parent(); + this.state_url = state_url; + } + + + SelectFieldChoices.prototype.getCurrentStateElement = function() { + return $(this.state_id); + }; + + + SelectFieldChoices.prototype.replaceWith = function(html) { + var parent_div = this.getCurrentStateElement().parent(); + parent_div.html(html); + }; + + + SelectFieldChoices.prototype.generateSelect = function(state_list) { + var select_element, option; + + select_element = new SelectElement(); + select_element.setAttr("name", "profile_data[state]"); + select_element.setAttr("id", "state_field"); + select_element.setAttr("class", "type-select valid"); + + state_list.forEach(function(state) { + option = SelectElement.generateOption(state, state); + select_element.addOption(option); + }); + + return select_element.getSelect(); + }; + + + SelectFieldChoices.prototype.replaceStateWithSelectElement = function() { + var klass = this; + + $.get(this.state_url, function(response) { + var select_html; + + if (response.length > 0) { + select_html = klass.generateSelect(response); + klass.replaceWith(select_html); + + if (klass.old_value.length !== 0 && response.include(klass.old_value)) { + klass.getCurrentStateElement().val(klass.old_value); + } + } + }); + }; + + + SelectFieldChoices.prototype.replaceStateWithInputElement = function() { + this.replaceWith(this.input_html); + }; + + + SelectFieldChoices.prototype.hideCity = function() { + this.city_parent_div.addClass("mpog_hidden_field"); + }; + + + SelectFieldChoices.prototype.showCity = function() { + this.city_parent_div.removeClass("mpog_hidden_field"); + }; + + + SelectFieldChoices.prototype.actualFieldIsInput = function() { + return this.getCurrentStateElement().attr("type") === "text"; + }; + + + return SelectFieldChoices; +}); diff --git a/src/noosfero-spb/software_communities/public/lib/software-catalog-component.js b/src/noosfero-spb/software_communities/public/lib/software-catalog-component.js new file mode 100644 index 0000000..c16e343 --- /dev/null +++ b/src/noosfero-spb/software_communities/public/lib/software-catalog-component.js @@ -0,0 +1,38 @@ +modulejs.define('SoftwareCatalogComponent', ['jquery'], function($) { + 'use strict'; + + var dispatch_ajax_function; + + function clearCatalogCheckbox() { + $("#group-categories input:checked").each(function() { + $(this).prop('checked', false); + }); + + dispatch_ajax_function(true); + } + + + function selectCheckboxCategory(dispatch_ajax) { + dispatch_ajax_function(true); + } + + + function selectProjectSoftwareCheckbox() { + dispatch_ajax_function(true); + } + + + function set_events() { + $("#cleanup-filter-catalg").click(clearCatalogCheckbox); + $(".categories-catalog").click(selectCheckboxCategory); + $(".project-software").click(selectProjectSoftwareCheckbox); + } + + return { + init: function(dispatch_ajax) { + dispatch_ajax_function = dispatch_ajax; + set_events(); + }, + } +}); + diff --git a/src/noosfero-spb/software_communities/public/static/databases.txt b/src/noosfero-spb/software_communities/public/static/databases.txt new file mode 100644 index 0000000..69efefa --- /dev/null +++ b/src/noosfero-spb/software_communities/public/static/databases.txt @@ -0,0 +1,101 @@ +Accumulo +Adabas +Aerospike +AllegroGraph +Altibase +Berkeley DB +Caché +Cassandra +CloudSearch +Cloudant +Coherence +CouchDB +Couchbase +D3 +DB2 +DataEase +Datameer +Db4o +Derby +Drizzle +DynamoDB +Ehcache +Elasticsearch +Endeca +EnterpriseDB +FileMaker +Firebird +GemFire +Google BigQuery +Google Search Appliance +Greenplum +H2 +HBase +Hazelcast +Hive +HyperSQL +IDMS +IMS +Infinispan +Infobright +Informix +Ingres +Interbase +Jackrabbit +Jena +LevelDB +MariaDB +MarkLogic +MaxDB +MemSQL +Memcached +Microsoft Access +Microsoft Azure SQL Database +Microsoft SQL Server +Mnesia +MongoDB +MySQL +Neo4j +Netezza +NuoDB +ObjectStore +OpenEdge +Oracle +Oracle NoSQL +OrientDB +ParAccel +Percona Server +PostgreSQL +RavenDB +Red Brick +Redis +Redshift +RethinkDB +Riak +SAP HANA +SQL Anywhere +SQLite +Sedna +Sesame +SimpleDB +Solr +Sparksee +Sphinx +Splunk +Sybase ADS +Sybase ASE +Sybase IQ +Teradata +Teradata Aster +TimesTen +Titan +UniData +UniVerse +Versant Object Database +Vertica +Virtuoso +VoltDB +dBASE +jBASE +mSQL +Other \ No newline at end of file diff --git a/src/noosfero-spb/software_communities/public/static/languages.txt b/src/noosfero-spb/software_communities/public/static/languages.txt new file mode 100644 index 0000000..a6ec626 --- /dev/null +++ b/src/noosfero-spb/software_communities/public/static/languages.txt @@ -0,0 +1,101 @@ +ASP +ActionScript +Ada +Apex +AppleScript +Arduino +Assembly +AutoHotkey +AutoIt +Awk +BlitzBasic +C +C# +C++ +CSS +Clojure +CoffeeScript +ColdFusion +Common Lisp +Coq +Cuda +D +DCPU-16 ASM +DOT +Dart +Delphi +Eiffel +Elixir +Elm +Emacs Lisp +Erlang +F# +FORTRAN +Go +Gosu +Groovy +HaXe +Haskell +Haxe +IDL +Io +Java +JavaScript +Julia +Kotlin +Lasso +LiveScript +Logos +Lua +M +Matlab +Max +Nemerle +Nimrod +OCaml +Objective-C +Objective-C++ +Objective-J +OpenEdge ABL +PHP +Parrot +Pascal +Perl +PowerShell +Processing +Prolog +Puppet +Pure Data +PureScript +Python +R +Racket +Ruby +Rust +SQL +Scala +Scheme +Scilab +Shell +Slash +Smalltalk +Standard ML +SuperCollider +Swift +Tcl +TeX +TypeScript +UnrealScript +VHDL +Vala +Verilog +VimL +Visual Basic +XC +XML +XQuery +XSLT +Xtend +nesC +xBase +Other \ No newline at end of file diff --git a/src/noosfero-spb/software_communities/public/static/licences.txt b/src/noosfero-spb/software_communities/public/static/licences.txt new file mode 100644 index 0000000..14e83c2 --- /dev/null +++ b/src/noosfero-spb/software_communities/public/static/licences.txt @@ -0,0 +1,212 @@ +Academic Free License 3.0 (AFL-3.0) +http://www.openfoundry.org/en/licenses/753-academic-free-license-version-30-afl + +Affero GNU Public License (AGPL-3.0) +http://www.gnu.org/licenses/agpl-3.0.html + +Adaptive Public License (APL-1.0) +http://opensource.org/licenses/APL-1.0 + +Apache License 2.0 (Apache-2.0) +http://www.apache.org/licenses/LICENSE-2.0 + +Apple Public Source License (APSL-2.0) +http://www.opensource.apple.com/license/apsl/ + +Artistic license 2.0 (Artistic-2.0) +http://opensource.org/licenses/Artistic-2.0 + +Attribution Assurance Licenses (AAL) +http://opensource.org/licenses/AAL + +BSD 3-Clause "New" or "Revised" License (BSD-3-Clause) +http://opensource.org/licenses/BSD-3-Clause + +BSD 2-Clause "Simplified" or "FreeBSD" License (BSD-2-Clause) +http://opensource.org/licenses/BSD-2-Clause + +Boost Software License (BSL-1.0) +http://www.boost.org/users/license.html + +Computer Associates Trusted Open Source License 1.1 (CATOSL-1.1) +http://opensource.org/licenses/CATOSL-1.1 + +Common Development and Distribution License 1.0 (CDDL-1.0) +http://opensource.org/licenses/CDDL-1.0 + +Common Public Attribution License 1.0 (CPAL-1.0) +http://opensource.org/licenses/CPAL-1.0 + +CUA Office Public License Version 1.0 (CUA-OPL-1.0) +http://opensource.org/licenses/CUA-OPL-1.0 + +EU DataGrid Software License (EUDatagrid) +http://opensource.org/licenses/EUDatagrid + +Eclipse Public License 1.0 (EPL-1.0) +https://www.eclipse.org/legal/epl-v10.html + +Educational Community License, Version 2.0 (ECL-2.0) +http://opensource.org/licenses/ECL-2.0 + +Eiffel Forum License V2.0 (EFL-2.0) +http://opensource.org/licenses/EFL-2.0 + +Entessa Public License (Entessa) +http://opensource.org/licenses/entessa.php + +European Union Public License, Version 1.1 (EUPL-1.1) +http://ec.europa.eu/idabc/eupl.html + +Fair License (FAIR) +http://opensource.org/licenses/Fair + +Frameworx License (Frameworx-1.0) +http://opensource.org/licenses/Frameworx-1.0 + +GNU Affero General Public License v3 (AGPL-3.0) +http://www.gnu.org/licenses/agpl-3.0.html + +GNU General Public License version 2.0 (GPL-2.0) +http://www.gnu.org/licenses/gpl-2.0.html + +GNU General Public License version 3.0 (GPL-3.0) +http://www.gnu.org/copyleft/gpl.html + +GNU Library or "Lesser" General Public License version 2.1 (LGPL-2.1) +https://www.gnu.org/licenses/lgpl-2.1.html + +GNU Library or "Lesser" General Public License version 3.0 (LGPL-3.0) +https://www.gnu.org/licenses/lgpl.html + +Historical Permission Notice and Disclaimer (HPND) +http://opensource.org/licenses/HPND + +IBM Public License 1.0 (IPL-1.0) +http://opensource.org/licenses/IPL-1.0 + +IPA Font License (IPA) +http://opensource.org/licenses/IPA + +ISC License (ISC) +#No-link-found + +LaTeX Project Public License 1.3c (LPPL-1.3c) +http://latex-project.org/lppl/lppl-1-3c.html + +Lucent Public License Version 1.02 (LPL-1.02) +http://opensource.org/licenses/LPL-1.02 + +MirOS Licence (MirOS) +http://opensource.org/licenses/MirOS + +Microsoft Public License (Ms-PL) +http://opensource.org/licenses/MS-PL + +Microsoft Reciprocal License (Ms-RL) +http://opensource.org/licenses/MS-RL + +MIT license (MIT) +http://opensource.org/licenses/MIT + +Motosoto License (Motosoto) +http://opensource.org/licenses/Motosoto + +Mozilla Public License 2.0 (MPL-2.0) +https://www.mozilla.org/MPL/2.0/ + +Multics License (Multics) +http://opensource.org/licenses/Multics + +NASA Open Source Agreement 1.3 (NASA 1.3) +http://worldwind.arc.nasa.gov/worldwind-nosa-1.3.html + +NTP License (NTP) +http://opensource.org/licenses/NTP + +Naumen Public License (Naumen) +http://opensource.org/licenses/Naumen + +Nethack General Public License (NGPL) +http://www.nethack.org/common/license.html + +Nokia Open Source License (Nokia) +http://opensource.org/licenses/nokia.php + +Non-Profit Open Software License 3.0 (NPOSL-3.0) +http://opensource.org/licenses/NPOSL-3.0 + +OCLC Research Public License 2.0 (OCLC-2.0) +http://opensource.org/licenses/OCLC-2.0 + +Open Font License 1.1 (OFL 1.1) +http://opensource.org/licenses/OFL-1.1 + +Open Group Test Suite License (OGTSL) +http://opensource.org/licenses/OGTSL + +Open Software License 3.0 (OSL-3.0) +http://opensource.org/licenses/OSL-3.0 + +PHP License v3.0 (PHP-3.0) +http://php.net/license/3_0.txt + +PHP License v3.01 (PHP 4, PHP 5) +http://php.net/license/3_01.txt + +The PostgreSQL License (PostgreSQL) +http://www.postgresql.org/about/licence/ + +Python License (Python-2.0) +http://opensource.org/licenses/Python-2.0 + +CNRI Python license (CNRI-Python) +http://www.openfoundry.org/en/licenses/35-python-license-python + +Q Public License (QPL-1.0) +http://opensource.org/licenses/QPL-1.0 + +RealNetworks Public Source License V1.0 (RPSL-1.0) +http://opensource.org/licenses/RPSL-1.0 + +Reciprocal Public License 1.5 (RPL-1.5) +http://opensource.org/licenses/RPL-1.5 + +Ricoh Source Code Public License (RSCPL) +http://opensource.org/licenses/RSCPL + +Simple Public License 2.0 (SimPL-2.0) +http://opensource.org/licenses/Simple-2.0 + +Sleepycat License (Sleepycat) +http://opensource.org/licenses/Sleepycat + +Sun Public License 1.0 (SPL-1.0) +http://opensource.org/licenses/SPL-1.0 + +Sybase Open Watcom Public License 1.0 (Watcom-1.0) +http://www.openwatcom.org/index.php/Open_Watcom_Public_License + +University of Illinois/NCSA Open Source License (NCSA) +http://otm.illinois.edu/uiuc_openSource + +Vovida Software License v. 1.0 (VSL-1.0) +http://opensource.org/licenses/VSL-1.0 + +W3C License (W3C) +http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +wxWindows Library License (WXwindows) +https://www.wxwidgets.org/about/licence/ + +X.Net License (Xnet) +http://opensource.org/licenses/xnet.php + +Zope Public License 2.0 (ZPL-2.0) +http://opensource.org/licenses/ZPL-2.0 + +zlib/libpng license (Zlib) +http://www.openfoundry.org/en/licenses/36-zliblibpng-license-zliblibpng + +Another +# \ No newline at end of file diff --git a/src/noosfero-spb/software_communities/public/static/operating_systems.txt b/src/noosfero-spb/software_communities/public/static/operating_systems.txt new file mode 100644 index 0000000..445ec6e --- /dev/null +++ b/src/noosfero-spb/software_communities/public/static/operating_systems.txt @@ -0,0 +1,9 @@ +Debian +Ubuntu +Windows +CentOS +RedHat +Mint +MacOS +Fedora +Arch \ No newline at end of file diff --git a/src/noosfero-spb/software_communities/public/style.css b/src/noosfero-spb/software_communities/public/style.css new file mode 100644 index 0000000..5d4c536 --- /dev/null +++ b/src/noosfero-spb/software_communities/public/style.css @@ -0,0 +1,112 @@ +.mpog_hidden_field { + display: none; +} + +.dynamic-table { + border: solid 1px #000; + margin-top: 5px; + margin-bottom: 15px; +} +.dynamic-table td, .dynamic-table tr { + border: none; +} +.dynamic-table input { + width: 220px; +} + +#institution_dialog { + display: none; +} + +.errorExplanation { + color: red; + margin-left: 10px; +} + +.hide-field { + display: none !important; +} + +.show-field { + display: block !important; +} + +.formfieldline { + margin-top: 10px; +} +.formfieldline input[type="text"] { + width: 180px; +} + +#profile-data .invalid { + border-color: rgb(127, 0, 0); + box-shadow: 0px 0px 7px red; +} + +#profile-data .validated { + box-shadow: 0px 0px 7px green; + border-color: rgb(0, 80, 0); +} + +#software-name-field { + padding-bottom: 10px; +} + +#software-hostname { + padding: 0px 7px; + font-size: 18px; +} + +.mandatory::after { + color: red; + content: ' (*)'; +} + +.autocomplete_validation_message { + color: red; +} + +#content .softwares-block ul { + min-width: 196px; + width: 192px; + margin: 0px 0px 0px -3px; + padding: 0px; +} + +#content .box-1 .softwares-block ul { + width: auto; + display: block; +} + +#content .softwares-block .block-footer-content a { + background: url(../../../designs/themes/base/imgs/arrow-right-p.png) 100% 50% no-repeat; +} + +/*FIX-ME: necessary while there is +* not a defined theme style for the +* forms */ +.improve_input_size { + width: 315px !important; +} + +.software-block { + position: relative; + float: left; + overflow: hidden; +} + +.software-block-content, .software-block-finality { + width: 100%; + position: absolute; +} + +/*===== Communities rate hotspot extra fields =====*/ + +.comments-software-extra-fields div { + display: none; +} + +#content .star-rate-form .star-comment-container .comments-display-fields { + cursor: pointer; +} + diff --git a/src/noosfero-spb/software_communities/public/vendor/jquery.js b/src/noosfero-spb/software_communities/public/vendor/jquery.js new file mode 100644 index 0000000..a3f4ebf --- /dev/null +++ b/src/noosfero-spb/software_communities/public/vendor/jquery.js @@ -0,0 +1,3 @@ +modulejs.define('jquery', function() { + return jQuery; +}); diff --git a/src/noosfero-spb/software_communities/public/vendor/jquery.maskedinput.min.js b/src/noosfero-spb/software_communities/public/vendor/jquery.maskedinput.min.js new file mode 100644 index 0000000..0d9ce6e --- /dev/null +++ b/src/noosfero-spb/software_communities/public/vendor/jquery.maskedinput.min.js @@ -0,0 +1,7 @@ +/* + Masked Input plugin for jQuery + Copyright (c) 2007-2013 Josh Bush (digitalbush.com) + Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license) + Version: 1.3.1 +*/ +(function(e){function t(){var e=document.createElement("input"),t="onpaste";return e.setAttribute(t,""),"function"==typeof e[t]?"paste":"input"}var n,a=t()+".mask",r=navigator.userAgent,i=/iphone/i.test(r),o=/android/i.test(r);e.mask={definitions:{9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},dataName:"rawMaskFn",placeholder:"_"},e.fn.extend({caret:function(e,t){var n;if(0!==this.length&&!this.is(":hidden"))return"number"==typeof e?(t="number"==typeof t?t:e,this.each(function(){this.setSelectionRange?this.setSelectionRange(e,t):this.createTextRange&&(n=this.createTextRange(),n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",e),n.select())})):(this[0].setSelectionRange?(e=this[0].selectionStart,t=this[0].selectionEnd):document.selection&&document.selection.createRange&&(n=document.selection.createRange(),e=0-n.duplicate().moveStart("character",-1e5),t=e+n.text.length),{begin:e,end:t})},unmask:function(){return this.trigger("unmask")},mask:function(t,r){var c,l,s,u,f,h;return!t&&this.length>0?(c=e(this[0]),c.data(e.mask.dataName)()):(r=e.extend({placeholder:e.mask.placeholder,completed:null},r),l=e.mask.definitions,s=[],u=h=t.length,f=null,e.each(t.split(""),function(e,t){"?"==t?(h--,u=e):l[t]?(s.push(RegExp(l[t])),null===f&&(f=s.length-1)):s.push(null)}),this.trigger("unmask").each(function(){function c(e){for(;h>++e&&!s[e];);return e}function d(e){for(;--e>=0&&!s[e];);return e}function m(e,t){var n,a;if(!(0>e)){for(n=e,a=c(t);h>n;n++)if(s[n]){if(!(h>a&&s[n].test(R[a])))break;R[n]=R[a],R[a]=r.placeholder,a=c(a)}b(),x.caret(Math.max(f,e))}}function p(e){var t,n,a,i;for(t=e,n=r.placeholder;h>t;t++)if(s[t]){if(a=c(t),i=R[t],R[t]=n,!(h>a&&s[a].test(i)))break;n=i}}function g(e){var t,n,a,r=e.which;8===r||46===r||i&&127===r?(t=x.caret(),n=t.begin,a=t.end,0===a-n&&(n=46!==r?d(n):a=c(n-1),a=46===r?c(a):a),k(n,a),m(n,a-1),e.preventDefault()):27==r&&(x.val(S),x.caret(0,y()),e.preventDefault())}function v(t){var n,a,i,l=t.which,u=x.caret();t.ctrlKey||t.altKey||t.metaKey||32>l||l&&(0!==u.end-u.begin&&(k(u.begin,u.end),m(u.begin,u.end-1)),n=c(u.begin-1),h>n&&(a=String.fromCharCode(l),s[n].test(a)&&(p(n),R[n]=a,b(),i=c(n),o?setTimeout(e.proxy(e.fn.caret,x,i),0):x.caret(i),r.completed&&i>=h&&r.completed.call(x))),t.preventDefault())}function k(e,t){var n;for(n=e;t>n&&h>n;n++)s[n]&&(R[n]=r.placeholder)}function b(){x.val(R.join(""))}function y(e){var t,n,a=x.val(),i=-1;for(t=0,pos=0;h>t;t++)if(s[t]){for(R[t]=r.placeholder;pos++a.length)break}else R[t]===a.charAt(pos)&&t!==u&&(pos++,i=t);return e?b():u>i+1?(x.val(""),k(0,h)):(b(),x.val(x.val().substring(0,i+1))),u?t:f}var x=e(this),R=e.map(t.split(""),function(e){return"?"!=e?l[e]?r.placeholder:e:void 0}),S=x.val();x.data(e.mask.dataName,function(){return e.map(R,function(e,t){return s[t]&&e!=r.placeholder?e:null}).join("")}),x.attr("readonly")||x.one("unmask",function(){x.unbind(".mask").removeData(e.mask.dataName)}).bind("focus.mask",function(){clearTimeout(n);var e;S=x.val(),e=y(),n=setTimeout(function(){b(),e==t.length?x.caret(0,e):x.caret(e)},10)}).bind("blur.mask",function(){y(),x.val()!=S&&x.change()}).bind("keydown.mask",g).bind("keypress.mask",v).bind(a,function(){setTimeout(function(){var e=y(!0);x.caret(e),r.completed&&e==x.val().length&&r.completed.call(x)},0)}),y()}))}})})(jQuery); \ No newline at end of file diff --git a/src/noosfero-spb/software_communities/public/vendor/modulejs-1.5.0.min.js b/src/noosfero-spb/software_communities/public/vendor/modulejs-1.5.0.min.js new file mode 100644 index 0000000..9905b63 --- /dev/null +++ b/src/noosfero-spb/software_communities/public/vendor/modulejs-1.5.0.min.js @@ -0,0 +1,2 @@ +/* modulejs 1.5.0 - http://larsjung.de/modulejs/ */ +!function(n){this.modulejs=n()}(function(){"use strict";function n(n){return function(r){return l.toString.call(r)==="[object "+n+"]"}}function r(n){return n===new Object(n)}function t(n,r){return l.hasOwnProperty.call(n,r)}function e(n,r,e){if(p&&n.forEach===p)n.forEach(r,e);else if(n.length===+n.length)for(var i=0,o=n.length;o>i;i+=1)r.call(e,n[i],i,n);else for(var u in n)t(n,u)&&r.call(e,n[u],u,n)}function i(n,r){for(var t=0,e=n.length;e>t;t+=1)if(n[t]===r)return!0;return!1}function o(n){var r={},i=[];return e(n,function(n){t(r,n)||(i.push(n),r[n]=1)}),i}function u(n,r,t){if(n){var e=new Error("[modulejs-"+r+"] "+t);throw e.code=r,e}}function c(n,r,a){if(u(!h(n),31,'id must be a string "'+n+'"'),!r&&t(b,n))return b[n];var f=y[n];u(!f,32,'id not defined "'+n+'"'),a=(a||[]).slice(0),a.push(n);var s=[];if(e(f.deps,function(n){u(i(a,n),33,"circular dependencies: "+a+" & "+n),r?(s=s.concat(c(n,r,a)),s.push(n)):s.push(c(n,r,a))}),r)return o(s);var d=f.fn.apply(void 0,s);return b[n]=d,d}function a(n,t,e){void 0===e&&(e=t,t=[]),u(!h(n),11,'id must be a string "'+n+'"'),u(y[n],12,'id already defined "'+n+'"'),u(!g(t),13,'dependencies for "'+n+'" must be an array "'+t+'"'),u(!r(e)&&!v(e),14,'arg for "'+n+'" must be object or function "'+e+'"'),y[n]={id:n,deps:t,fn:v(e)?e:function(){return e}}}function f(n){return c(n)}function s(){var n={};return e(y,function(r,e){n[e]={deps:r.deps.slice(0),reqs:c(e,!0),init:t(b,e)}}),e(y,function(r,t){var o=[];e(y,function(r,e){i(n[e].reqs,t)&&o.push(e)}),n[t].reqd=o}),n}function d(n){var r="\n";return e(s(),function(t,e){var i=n?t.reqd:t.reqs;r+=(t.init?"* ":" ")+e+" -> [ "+i.join(", ")+" ]\n"}),r}var l=Object.prototype,p=Array.prototype.forEach,h=n("String"),v=n("Function"),g=Array.isArray||n("Array"),y={},b={};return{define:a,require:f,state:s,log:d,_private:{isString:h,isFunction:v,isArray:g,isObject:r,has:t,each:e,contains:i,uniq:o,err:u,definitions:y,instances:b,resolve:c}}}); \ No newline at end of file diff --git a/src/noosfero-spb/software_communities/public/views/comments-software-extra-fields.js b/src/noosfero-spb/software_communities/public/views/comments-software-extra-fields.js new file mode 100644 index 0000000..c270cd9 --- /dev/null +++ b/src/noosfero-spb/software_communities/public/views/comments-software-extra-fields.js @@ -0,0 +1,30 @@ +modulejs.define('CommentsSoftwareExtraFields', ['jquery'], function($) { + 'use strict'; + + var DATA = { + information_display_state: "hidden" + } + + function set_show_additional_information() { + $(".comments-display-fields").on("click", function() { + if (DATA.information_display_state === "hidden") { + DATA.information_display_state = "show"; + $(".comments-software-extra-fields div").show(); + } else { + DATA.information_display_state = "hidden"; + $(".comments-software-extra-fields div").hide(); + } + }); + } + + return { + isCurrentPage: function() { + return $(".star-rate-form").length === 1; + }, + + + init: function() { + set_show_additional_information(); + } + } +}); diff --git a/src/noosfero-spb/software_communities/public/views/control-panel.js b/src/noosfero-spb/software_communities/public/views/control-panel.js new file mode 100644 index 0000000..e7d6e29 --- /dev/null +++ b/src/noosfero-spb/software_communities/public/views/control-panel.js @@ -0,0 +1,31 @@ +modulejs.define('ControlPanel', ['jquery'], function($) { + 'use strict'; + + function add_software_on_control_panel(control_panel) { + var software_link = $(".control-panel-software-link").remove(); + + if( software_link.size() > 0 ) { + control_panel.prepend(software_link); + } + } + + function add_itens_on_controla_panel() { + var control_panel = $(".control-panel"); + + if( control_panel.size() > 0 ) { + add_software_on_control_panel(control_panel); + } + } + + + return { + isCurrentPage: function() { + return $("#profile-editor-index").length === 1; + }, + + + init: function() { + add_itens_on_controla_panel(); + } + } +}); diff --git a/src/noosfero-spb/software_communities/public/views/edit-software.js b/src/noosfero-spb/software_communities/public/views/edit-software.js new file mode 100644 index 0000000..142077d --- /dev/null +++ b/src/noosfero-spb/software_communities/public/views/edit-software.js @@ -0,0 +1,111 @@ +modulejs.define('EditSoftware', ['jquery', 'NoosferoRoot', 'AutoComplete', 'NewSoftware'], function($, NoosferoRoot, AutoComplete, NewSoftware) { + 'use strict'; + + var AJAX_URL = { + get_field_data: + NoosferoRoot.urlWithSubDirectory("/plugin/software_communities/get_field_data") + }; + + + function database_autocomplete() { + AutoComplete.enable("database", ".database_description_id", ".database_autocomplete", AJAX_URL.get_field_data); + } + + + function language_autocomplete() { + AutoComplete.enable("software_language", ".programming_language_id", ".language_autocomplete", AJAX_URL.get_field_data); + } + + + function delete_dynamic_table() { + var button = $(".delete-dynamic-table"); + + button.each(function(){ + var table = $(this).parent().parent().parent().parent(); + var color = table.css("background-color"); + + $(this).click(function(){ + table.remove(); + return false; + }).mouseover(function(){ + table.css("background-color", "#eee"); + }).mouseout(function(){ + table.css("background-color", color); + }); + }); + } + + + function has_more_than_one(table_class) { + return ($("."+table_class).length > 2); // One is always added by defaul and its hidden + } + + + function add_dynamic_table(element_id, content) { + $("#"+element_id).append(content); + } + + + function hide_show_public_software_fields() { + if ($("#software_public_software").is(":checked")) { + $(".public-software-fields").show(); + } else { + $(".public-software-fields").hide(); + } + } + + + function replace_software_creations_step() { + var software_creation_step = $("#software_creation_step").remove(); + + if( software_creation_step.size() > 0 ) { + $("#profile-data").parent().prepend(software_creation_step); + } + } + + + return { + isCurrentPage: function() { + return $("#especific-info").length === 1; + }, + + + init: function() { + var dynamic_tables = ["dynamic-databases", "dynamic-languages", "dynamic-libraries","dynamic-operating_systems"]; + + delete_dynamic_table(); + database_autocomplete(); + language_autocomplete(); + + $(".new-dynamic-table").click(function(){ + var link = $(this); + + dynamic_tables.forEach(function(value){ + if( link.hasClass(value) ) { + var table_id = value.split("-")[1]; + + var table_html = $("#table_structure_"+table_id).html(); + + add_dynamic_table(table_id, table_html); + } + }); + + delete_dynamic_table(); + database_autocomplete(); + language_autocomplete(); + + return false; + }); + + + + + hide_show_public_software_fields(); + $("#software_public_software").click(hide_show_public_software_fields); + + replace_software_creations_step(); + + NewSoftware.init(); + } + } +}); diff --git a/src/noosfero-spb/software_communities/public/views/new-community.js b/src/noosfero-spb/software_communities/public/views/new-community.js new file mode 100644 index 0000000..b665e8f --- /dev/null +++ b/src/noosfero-spb/software_communities/public/views/new-community.js @@ -0,0 +1,28 @@ +modulejs.define("NewCommunity", ['jquery'], function($) { + + function replace_mandatory_message() { + $(".required-field").first() + .replaceWith(" Os campos em destaque são obrigatórios. "); + } + + function remove_image_builder_text() { + $("label:contains('Image builder')").hide(); + } + + function hide_organization_template_fields(){ + $('#template-options').hide(); + } + + return { + + isCurrentPage: function() { + return true; + }, + + init: function() { + replace_mandatory_message(); + remove_image_builder_text(); + hide_organization_template_fields(); + } + } +}) diff --git a/src/noosfero-spb/software_communities/public/views/new-software.js b/src/noosfero-spb/software_communities/public/views/new-software.js new file mode 100644 index 0000000..180ff70 --- /dev/null +++ b/src/noosfero-spb/software_communities/public/views/new-software.js @@ -0,0 +1,69 @@ +modulejs.define('NewSoftware', ['jquery', 'NoosferoRoot', 'AutoComplete', 'NewCommunity'], function($, NoosferoRoot, AutoComplete, Community) { + 'use strict'; + + var AJAX_URL = { + get_license_data: + NoosferoRoot.urlWithSubDirectory("/plugin/software_communities/get_license_data") + }; + + function replace_domain_and_repository_link(){ + var community_name = $("#community_name_id").val(); + var domain = 'https://'; + domain = domain.concat($("#software-hostname").text()); + + var slug_name = community_name.replace(/\s+/g, '-').toLowerCase(); + + var custom_domain = domain.concat(''); + custom_domain = custom_domain.concat('/'); + custom_domain = custom_domain.concat(slug_name); + + $("#community-identifier").val(slug_name); + $("#software-info-repository-link").val(custom_domain); + } + + function show_another_license_on_page_load() { + $("#license_info_id").trigger("change"); + } + + + function display_another_license_fields(selected) { + if( selected === "Another" ) { + $("#another_license").removeClass("hide-field"); + $("#version_link").addClass("hide-field"); + } else { + $("#another_license").addClass("hide-field"); + $("#version_link").removeClass("hide-field"); + } + } + + + function display_license_link_on_autocomplete(selected) { + var link = $("#version_" + selected.item.id).val(); + $("#version_link").attr("href", link); + + display_another_license_fields(selected.item.label); + } + + + function license_info_autocomplete() { + AutoComplete.enable( + "license_info", ".license_info_id", ".license_info_version", + AJAX_URL.get_license_data, display_license_link_on_autocomplete + ); + } + + + return { + isCurrentPage: function() { + return $('#new-software-page').length === 1; + }, + + + init: function() { + license_info_autocomplete(); + Community.init(); + + $("#community_name_id").blur(replace_domain_and_repository_link); + } + } +}); diff --git a/src/noosfero-spb/software_communities/public/views/profile-tabs-software.js b/src/noosfero-spb/software_communities/public/views/profile-tabs-software.js new file mode 100644 index 0000000..92ee237 --- /dev/null +++ b/src/noosfero-spb/software_communities/public/views/profile-tabs-software.js @@ -0,0 +1,86 @@ +modulejs.define("ProfileTabsSoftware", ["jquery"], function($) { + "use strict"; + + function hide_infos(){ + $(".language-info").hide(); + $(".database-info").hide(); + $(".libraries-info").hide(); + $(".operating-system-info").hide(); + $(".language-button-hide").hide(); + $(".database-button-hide").hide(); + $(".libraries-button-hide").hide(); + $(".operating-system-button-hide").hide(); + } + + + function set_show_hide_dynamic_table_events() { + $(".language-button-hide").click(function(event){ + event.preventDefault(); + $(".language-info").hide(); + $(".language-button-show").show(); + $(".language-button-hide").hide(); + }); + + $(".language-button-show").click(function(event){ + event.preventDefault(); + $(".language-info").show(); + $(".language-button-show").hide(); + $(".language-button-hide").show(); + }); + + $(".operating-system-button-hide").click(function(event){ + event.preventDefault(); + $(".operating-system-info").hide(); + $(".operating-system-button-show").show(); + $(".operating-system-button-hide").hide(); + }); + + $(".operating-system-button-show").click(function(event){ + event.preventDefault(); + $(".operating-system-info").show(); + $(".operating-system-button-show").hide(); + $(".operating-system-button-hide").show(); + }); + + $(".database-button-hide").click(function(event){ + event.preventDefault(); + $(".database-info").hide(); + $(".database-button-show").show(); + $(".database-button-hide").hide(); + }); + + $(".database-button-show").click(function(event){ + event.preventDefault(); + $(".database-info").show(); + $(".database-button-show").hide(); + $(".database-button-hide").show(); + }); + + $(".libraries-button-hide").click(function(event){ + event.preventDefault(); + $(".libraries-info").hide(); + $(".libraries-button-show").show(); + $(".libraries-button-hide").hide(); + }); + + $(".libraries-button-show").click(function(event){ + event.preventDefault(); + $(".libraries-info").show(); + $(".libraries-button-show").hide(); + $(".libraries-button-hide").show(); + }); + } + + + return { + isCurrentPage: function() { + return $("#software-fields").length === 1; + }, + + + init: function() { + hide_infos(); + set_show_hide_dynamic_table_events(); + } + } +}); diff --git a/src/noosfero-spb/software_communities/public/views/search-software-catalog.js b/src/noosfero-spb/software_communities/public/views/search-software-catalog.js new file mode 100644 index 0000000..552b055 --- /dev/null +++ b/src/noosfero-spb/software_communities/public/views/search-software-catalog.js @@ -0,0 +1,172 @@ +modulejs.define('SearchSoftwareCatalog', ['jquery', 'NoosferoRoot', 'SoftwareCatalogComponent'], function($, NoosferoRoot, SoftwareCatalogComponent) { + 'use strict'; + + var AJAX_URL = { + software_infos: + NoosferoRoot.urlWithSubDirectory("/search/software_infos") + }; + + + function dispatch_search_ajax(enable_load) { + var search_params = get_search_params(); + + if(enable_load) { + open_loading("Loading"); + } + + $.ajax({ + url: AJAX_URL.software_infos, + type: "GET", + data: search_params, + success: update_search_page_on_ajax, + error: function(){ + close_loading(); + } + }); + } + + + function get_search_params() { + var params = {}; + + params.query = $("#search-input").val(); + params.selected_categories_id = []; + + $(".categories-catalog:checked").each(function(index, element) { + params.selected_categories_id.push(element.value); + }); + + params.software_display = $("#software_display").val(); + params.sort = $("#sort").val(); + + if($("#all_radio_button").is(":checked")) { + params.software_type = $("#all_radio_button").val(); + } else { + params.software_type = $("#public_software_radio_button").val(); + } + + return params; + } + + + function get_result_div_core(message) { + $("#search-results-empty").html(message); + } + + + function catalog_message() { + var empty_result = $('#empty_result').val() === 'true'; + var user_selected_categories = $('.categories-catalog:checked').length !== 0; + + if(empty_result && !user_selected_categories) { + get_result_div_core($('#message-no-catalog-selected').val()); + } else if (empty_result && user_selected_categories) { + get_result_div_core($('#message-catalog-selected').val()); + } + } + + + function update_search_page_on_ajax(response) { + response = $(response); + + var search_list = $("#search-results"); + var selected_categories_field = $("#filter-categories-select-catalog"); + var pagination = $("#software-pagination"); + var software_count = $("#software-count"); + var individually_category = $("#individually-category"); + + var result_list = response.find("#search-results").html(); + var result_categories = response.find("#filter-categories-select-catalog").html(); + var result_pagination = response.find("#software-pagination").html(); + var result_software_count = response.find("#software-count").html(); + var result_individually_category = response.find("#individually-category").html(); + + search_list.html(result_list); + selected_categories_field.html(result_categories); + pagination.html(result_pagination); + software_count.html(result_software_count); + individually_category.html(result_individually_category); + + highlight_searched_terms(); + catalog_message(); + + hide_load_after_ajax(); + } + + + function hide_load_after_ajax() { + if ($("#overlay_loading_modal").is(":visible")) { + close_loading(); + setTimeout(hide_load_after_ajax, 1500); + } + } + + + function highlight_searched_terms() { + var searched_terms = $("#search-input").val(); + + if( searched_terms.length === 0 ) { + return undefined; + } + + var content_result = $(".search-content-result"); + var regex = new RegExp("("+searched_terms.replace(/\s/g, "|")+")", "gi"); + + content_result.each(function(i, e){ + var element = $(e); + + var new_text = element.text().replace(regex, function(text) { + return ""+text+""; + }); + + element.html(new_text); + }); + } + + + function update_page_by_ajax_on_select_change() { + dispatch_search_ajax(true); + } + + function update_page_by_text_filter() { + var text = this.value; + dispatch_search_ajax(false); + } + + + function search_input_keyup() { + var timer = null; + + $("#search-input").keyup(function() { + // Only start the search(with ajax) after 3 characters + if(this.value.length >= 3) { + timer = setTimeout(update_page_by_text_filter, 400); + } + }).keydown(function() { + clearTimeout(timer); + }); + } + + + function set_events() { + $("#software_display").change(update_page_by_ajax_on_select_change); + $("#sort").change(update_page_by_ajax_on_select_change); + + search_input_keyup(); + } + + + return { + isCurrentPage: function() { + return $('#software-search-container').length === 1; + }, + + + init: function() { + set_events(); + catalog_message(); + SoftwareCatalogComponent.init(dispatch_search_ajax); + } + } +}); + diff --git a/src/noosfero-spb/software_communities/script/schedule_institution_update.sh b/src/noosfero-spb/software_communities/script/schedule_institution_update.sh new file mode 100755 index 0000000..a5d1281 --- /dev/null +++ b/src/noosfero-spb/software_communities/script/schedule_institution_update.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +cp plugins/software_communities/config/institutions_update.example /etc/cron.d/institutions_update +echo "Created crontab file in /etc/cron.d/institution_update..." diff --git a/src/noosfero-spb/software_communities/test/functional/profile_controller_test.rb b/src/noosfero-spb/software_communities/test/functional/profile_controller_test.rb new file mode 100644 index 0000000..3805787 --- /dev/null +++ b/src/noosfero-spb/software_communities/test/functional/profile_controller_test.rb @@ -0,0 +1,40 @@ +require "test_helper" +require 'profile_controller' + +# Re-raise errors caught by the controller. +class ProfileController; def rescue_action(e) raise e end; end + +class ProfileControllerTest < ActionController::TestCase + def setup + Environment.default.enable('products_for_enterprises') + @profile = create_user('testuser').person + end + attr_reader :profile + + should 'not count a visit twice for the same user' do + profile = create_user('someone').person + login_as(@profile.identifier) + community = fast_create('Community') + + get :index, :profile => community.identifier + community.reload + assert_equal 1, community.hits + + get :index, :profile => community.identifier + community.reload + assert_equal 1, community.hits + end + + should 'not count a visit twice for unlogged users' do + profile = create_user('someone').person + community = fast_create('Community') + get :index, :profile => community.identifier + community.reload + assert_equal 1, community.hits + + get :index, :profile => community.identifier + community.reload + assert_equal 1, community.hits + end +end + diff --git a/src/noosfero-spb/software_communities/test/functional/profile_editor_controller_test.rb b/src/noosfero-spb/software_communities/test/functional/profile_editor_controller_test.rb new file mode 100644 index 0000000..b677a1d --- /dev/null +++ b/src/noosfero-spb/software_communities/test/functional/profile_editor_controller_test.rb @@ -0,0 +1,70 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require( + File.dirname(__FILE__) + + '/../../../../app/controllers/my_profile/profile_editor_controller' +) + +class ProfileEditorController; def rescue_action(e) raise e end; end + +class ProfileEditorControllerTest < ActionController::TestCase + + def setup + @controller = ProfileEditorController.new + @request = ActionController::TestRequest.new + @response = ActionController::TestResponse.new + @profile = create_user('default_user').person + + Environment.default.affiliate( + @profile, + [Environment::Roles.admin(Environment.default.id)] + + Profile::Roles.all_roles(Environment.default.id) + ) + + @environment = Environment.default + @environment.enabled_plugins = ['SoftwareCommunitiesPlugin'] + admin = create_user("adminuser").person + admin.stubs(:has_permission?).returns("true") + login_as('adminuser') + @environment.add_admin(admin) + @environment.save + end + + should "redirect to edit_software_community on edit community of software" do + software = create_software_info("Test Software") + + post :edit, :profile => software.community.identifier + + assert_redirected_to :controller => 'profile_editor', :action => 'edit_software_community' + end + + + protected + + def create_basic_user + user = fast_create(User) + user.person = fast_create(Person) + user.person.user = user + user.save! + user.person.save! + user + end + + def create_community name + community = fast_create(Community) + community.name = name + community.save + community + end + + def create_software_info name, finality = "something", acronym = "" + community = create_community(name) + software_info = SoftwareInfo.new + software_info.community = community + software_info.finality = finality + software_info.acronym = acronym + software_info.public_software = true + software_info.save + software_info + end + +end diff --git a/src/noosfero-spb/software_communities/test/functional/search_controller_test.rb b/src/noosfero-spb/software_communities/test/functional/search_controller_test.rb new file mode 100644 index 0000000..606337d --- /dev/null +++ b/src/noosfero-spb/software_communities/test/functional/search_controller_test.rb @@ -0,0 +1,304 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' +require( + File.dirname(__FILE__) + + '/../../../../app/controllers/public/search_controller' +) + +class SearchController; def rescue_action(e) raise e end; end + +class SearchControllerTest < ActionController::TestCase + include PluginTestHelper + + def setup + @environment = Environment.default + @environment.enabled_plugins = ['SoftwareCommunitiesPlugin'] + @environment.save + + @controller = SearchController.new + @request = ActionController::TestRequest.new + @request.stubs(:ssl?).returns(:false) + @response = ActionController::TestResponse.new + + @licenses = [ + LicenseInfo.create(:version => "GPL - 1"), + LicenseInfo.create(:version => "GPL - 2") + ] + + create_software_categories + + @softwares = [] + + @softwares << create_software_info("Software One", :acronym => "SFO", :finality => "Help") + @softwares << create_software_info("Software Two", :acronym => "SFT", :finality => "Task") + + @softwares[0].community.categories << Category.first + @softwares[1].community.categories << Category.last + + @softwares[0].license_info = @licenses.first + @softwares[1].license_info = @licenses.last + + @softwares[0].save! + @softwares[1].save! + end + + should "communities searches don't have software" do + community = create_community("Community One") + + get :communities, :query => "One" + + assert_includes assigns(:searches)[:communities][:results], community + assert_not_includes assigns(:searches)[:communities][:results], @softwares.first.community + end + + should "software_infos search don't have community" do + community = create_community("Community One") + + get :software_infos, :query => "One" + + assert_includes assigns(:searches)[:software_infos][:results], @softwares.first.community + assert_not_includes assigns(:searches)[:software_infos][:results], community + end + + + should "Don't have template in communities search result" do + communities = [] + communities << create_community("Community One") + communities << create_community("Community Two") + + community_template = create_community("Community Template") + community_template.is_template = true + community_template.visible = false + community_template.save! + + get :communities, :query => "Comm" + + assert_not_includes( + assigns(:searches)[:communities][:results], + community_template + ) + end + + should "software_infos search by category" do + get( + :software_infos, + :query => "", + :selected_categories_id => [Category.first.id] + ) + + assert_includes assigns(:searches)[:software_infos][:results], @softwares.first.community + assert_not_includes assigns(:searches)[:software_infos][:results], @softwares.last.community + end + + should "software_infos search by programming language" do + @softwares.first.software_languages << create_software_language("Python", "1.0") + @softwares.last.software_languages << create_software_language("Java", "8.1") + + @softwares.first.save! + @softwares.last.save! + + get( + :software_infos, + :query => "python", + ) + + assert_includes assigns(:searches)[:software_infos][:results], @softwares.first.community + assert_not_includes assigns(:searches)[:software_infos][:results], @softwares.last.community + end + + should "software_infos search by database description" do + @softwares.first.software_databases << create_software_database("MySQL", "1.0") + @softwares.last.software_databases << create_software_database("Postgrees", "8.1") + + @softwares.first.save! + @softwares.last.save! + + get( + :software_infos, + :query => "mysql", + ) + + assert_includes assigns(:searches)[:software_infos][:results], @softwares.first.community + assert_not_includes assigns(:searches)[:software_infos][:results], @softwares.last.community + end + + should "software_infos search by finality" do + get( + :software_infos, + :query => "help", + ) + + + assert_includes assigns(:searches)[:software_infos][:results], @softwares.first.community + assert_not_includes assigns(:searches)[:software_infos][:results], @softwares.last.community + end + + should "software_infos search by acronym" do + get( + :software_infos, + :query => "SFO", + ) + + assert_includes assigns(:searches)[:software_infos][:results], @softwares.first.community + assert_not_includes assigns(:searches)[:software_infos][:results], @softwares.last.community + end + + should "software_infos search by relevance" do + @softwares << create_software_info("Software Three", :acronym => "SFW", :finality => "Java") + @softwares.last.license_info = LicenseInfo.create :version => "GPL - 3.0" + + + @softwares.first.software_languages << create_software_language("Java", "8.0") + @softwares.first.save! + + @softwares[1].community.name = "Java" + @softwares[1].community.save! + + get( + :software_infos, + :sort => "relevance", + :query => "Java" + ) + + assert_equal assigns(:searches)[:software_infos][:results][0], @softwares[1].community + assert_equal assigns(:searches)[:software_infos][:results][1], @softwares[2].community + assert_equal assigns(:searches)[:software_infos][:results][2], @softwares[0].community + end + + should "software_infos search only public_software" do + software_one = create_software_info("Software One", :acronym => "SFO", :finality => "Help") + software_two = create_software_info("Java", :acronym => "SFT", :finality => "Task") + software_three = create_software_info("Software Three", :acronym => "SFW", :finality => "Java") + software_three.public_software = false + software_three.save! + + get( + :software_infos, + :software_type => "public_software" + ) + + assert_includes assigns(:searches)[:software_infos][:results], software_one.community + assert_includes assigns(:searches)[:software_infos][:results], software_two.community + assert_not_includes assigns(:searches)[:software_infos][:results], software_three.community + end + + should "software_infos search public_software and other all" do + software_one = create_software_info("Software One", :acronym => "SFO", :finality => "Help") + software_two = create_software_info("Java", :acronym => "SFT", :finality => "Task") + software_three = create_software_info("Software Three", :acronym => "SFW", :finality => "Java") + software_three.public_software = false + software_three.save! + + get( + :software_infos, + :software_type => "all" + ) + + assert_includes assigns(:searches)[:software_infos][:results], software_one.community + assert_includes assigns(:searches)[:software_infos][:results], software_two.community + assert_includes assigns(:searches)[:software_infos][:results], software_three.community + end + + should "software_infos search return only the software in params" do + software_one = create_software_info("Software One", :acronym => "SFO", :finality => "Help") + software_two = create_software_info("Java", :acronym => "SFT", :finality => "Task") + software_three = create_software_info("Software Three", :acronym => "SFW", :finality => "Java") + + get( + :software_infos, + :only_softwares => ["software-three", "java"] + ) + + assert_includes assigns(:searches)[:software_infos][:results], software_two.community + assert_includes assigns(:searches)[:software_infos][:results], software_three.community + assert_not_includes assigns(:searches)[:software_infos][:results], software_one.community + end + + should "software_infos search return only enabled softwares" do + s1 = SoftwareInfo.first + s2 = SoftwareInfo.last + + # First get them all normally + get( + :software_infos, + :query => "software" + ) + + assert_includes assigns(:searches)[:software_infos][:results], s1.community + assert_includes assigns(:searches)[:software_infos][:results], s2.community + + s2.community.disable + + # Now it should not contain the disabled community + get( + :software_infos, + :query => "software" + ) + + assert_includes assigns(:searches)[:software_infos][:results], s1.community + assert_not_includes assigns(:searches)[:software_infos][:results], s2.community + end + + should "software_infos search not return software with secret community" do + software_one = create_software_info("Software ABC", :acronym => "SFO", :finality => "Help") + software_two = create_software_info("Python", :acronym => "SFT", :finality => "Task") + software_three = create_software_info("Software DEF", :acronym => "SFW", :finality => "Java") + + software_one.community.secret = true + software_one.community.save! + + get( + :software_infos, + ) + + assert_includes assigns(:searches)[:software_infos][:results], software_two.community + assert_includes assigns(:searches)[:software_infos][:results], software_three.community + assert_not_includes assigns(:searches)[:software_infos][:results], software_one.community + end + + private + + def create_software_categories + category_software = Category.create!( + :name => "Software", + :environment => @environment + ) + Category.create( + :name => "Category One", + :environment => @environment, + :parent => category_software + ) + Category.create( + :name => "Category Two", + :environment => @environment, + :parent => category_software + ) + end + + def create_software_language(name, version) + unless ProgrammingLanguage.find_by_name(name) + ProgrammingLanguage.create(:name => name) + end + + software_language = SoftwareLanguage.new + software_language.programming_language = ProgrammingLanguage.find_by_name(name) + software_language.version = version + software_language.save! + + software_language + end + + def create_software_database(name, version) + unless DatabaseDescription.find_by_name(name) + DatabaseDescription.create(:name => name) + end + + software_database = SoftwareDatabase.new + software_database.database_description = DatabaseDescription.find_by_name(name) + software_database.version = version + software_database.save! + + software_database + end + +end diff --git a/src/noosfero-spb/software_communities/test/functional/software_communities_plugin_controller_test.rb b/src/noosfero-spb/software_communities/test/functional/software_communities_plugin_controller_test.rb new file mode 100644 index 0000000..78ae2e0 --- /dev/null +++ b/src/noosfero-spb/software_communities/test/functional/software_communities_plugin_controller_test.rb @@ -0,0 +1,116 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../../controllers/software_communities_plugin_controller' + +class SoftwareCommunitiesPluginController; def rescue_action(e) raise e end; end + +class SoftwareCommunitiesPluginControllerTest < ActionController::TestCase + def setup + @admin = create_user("adminuser").person + @admin.stubs(:has_permission?).returns("true") + @controller.stubs(:current_user).returns(@admin.user) + + @environment = Environment.default + @environment.enabled_plugins = ['SoftwareCommunitiesPlugin'] + @environment.add_admin(@admin) + @environment.save + + LicenseInfo.create(:version=>"CC-GPL-V2", :link=>"http://creativecommons.org/licenses/GPL/2.0/legalcode.pt") + LicenseInfo.create(:version=>"Academic Free License 3.0 (AFL-3.0)", :link=>"http://www.openfoundry.org/en/licenses/753-academic-free-license-version-30-afl") + LicenseInfo.create(:version=>"Apache License 2.0 (Apache-2.0)", :link=>"http://www.apache.org/licenses/LICENSE-2.0") + LicenseInfo.create(:version=>'BSD 2-Clause "Simplified" or "FreeBSD" License (BSD-2-Clause)', :link=>"http://opensource.org/licenses/BSD-2-Clause") + + ProgrammingLanguage.create(:name =>"Java") + ProgrammingLanguage.create(:name =>"Ruby") + ProgrammingLanguage.create(:name =>"C") + ProgrammingLanguage.create(:name =>"C++") + DatabaseDescription.create(:name => "PostgreSQL") + DatabaseDescription.create(:name => "MySQL") + DatabaseDescription.create(:name => "MongoDB") + DatabaseDescription.create(:name => "Oracle") + OperatingSystemName.create(:name=>"Debian") + + @response = ActionController::TestResponse.new + end + + should 'return the licenses datas' do + xhr :get, :get_license_data, :query => "" + + licenses = JSON.parse(@response.body) + + assert_equal 4, licenses.count + end + + should 'return licenses that has Free on their version name' do + xhr :get, :get_license_data, :query => "Free" + + licenses = JSON.parse(@response.body) + + assert_equal 2, licenses.count + end + + should 'return no licenses that has Common on their version name' do + xhr :get, :get_license_data, :query => "Common" + + licenses = JSON.parse(@response.body) + + assert_equal 0, licenses.count + end + + should 'render block template' do + xhr :get, :get_block_template + + assert_tag :tag => 'input', :attributes => { :class => "block_download_name" } + assert_tag :tag => 'input', :attributes => { :class => "block_download_link" } + assert_tag :tag => 'input', :attributes => { :class => "block_download_software_description" } + assert_tag :tag => 'input', :attributes => { :class => "block_download_minimum_requirements" } + assert_tag :tag => 'input', :attributes => { :class => "block_download_size" } + end + + should 'return the programming languages' do + xhr :get, :get_field_data, :query => "", :field => "software_language" + + languages = JSON.parse(@response.body) + + assert_equal 4, languages.count + end + + should 'return the programming languages that has C on their name' do + xhr :get, :get_field_data, :query => "C", :field => "software_language" + + languages = JSON.parse(@response.body) + + assert_equal 2, languages.count + end + + should 'dont return the programming languages that has HTML on their name' do + xhr :get, :get_field_data, :query => "HTML", :field => "software_language" + + languages = JSON.parse(@response.body) + + assert_equal 1, languages.count + end + + should 'return the databases' do + xhr :get, :get_field_data, :query => "", :field => "software_database" + + databases = JSON.parse(@response.body) + + assert_equal 4, databases.count + end + + should 'return the databases that has SQL on their name' do + xhr :get, :get_field_data, :query => "SQL", :field => "software_database" + + databases = JSON.parse(@response.body) + + assert_equal 3, databases.count + end + + should 'dont return the database that has on their name' do + xhr :get, :get_field_data, :query => "Cache", :field => "software_database" + + databases = JSON.parse(@response.body) + + assert_equal 1, databases.count + end +end diff --git a/src/noosfero-spb/software_communities/test/functional/software_communities_plugin_myprofile_controller_test.rb b/src/noosfero-spb/software_communities/test/functional/software_communities_plugin_myprofile_controller_test.rb new file mode 100644 index 0000000..bb72b8a --- /dev/null +++ b/src/noosfero-spb/software_communities/test/functional/software_communities_plugin_myprofile_controller_test.rb @@ -0,0 +1,154 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/software_test_helper' +require( + File.dirname(__FILE__) + + '/../../controllers/software_communities_plugin_myprofile_controller' +) + +class SoftwareCommunitiesPluginMyprofileController; def rescue_action(e) raise e end; +end + +class SoftwareCommunitiesPluginMyprofileControllerTest < ActionController::TestCase + include SoftwareTestHelper + def setup + @controller = SoftwareCommunitiesPluginMyprofileController.new + @request = ActionController::TestRequest.new + @response = ActionController::TestResponse.new + @person = create_user('person').person + @offer = create_user('Angela Silva') + @offer_1 = create_user('Ana de Souza') + @offer_2 = create_user('Angelo Roberto') + + LicenseInfo.create( + :version=>"CC-GPL-V2", + :link=>"http://creativecommons.org/licenses/GPL/2.0/legalcode.pt" + ) + + ProgrammingLanguage.create(:name =>"language") + DatabaseDescription.create(:name => "database") + OperatingSystemName.create(:name=>"Debian") + + login_as(@person.user_login) + @environment = Environment.default + @environment.enable_plugin('SoftwareCommunitiesPlugin') + @environment.save! + end + + attr_accessor :person, :offer + + should 'Add offer to admin in new software' do + @hash_list = software_fields + @software = create_software @hash_list + @software.community.add_admin(@offer.person) + @software.save + assert_equal @offer.person.id, @software.community.admins.last.id + end + + should 'create a new software with all fields filled in' do + fields = software_fields + @environment.add_admin(@person) + post( + :new_software, + :profile => @person.identifier, + :community => fields[1], + :license => fields[0], + :software_info => fields[2] + ) + assert_equal SoftwareInfo.last.community.name, "Debian" + end + + should 'edit a new software adding basic information' do + fields_software = software_fields + fields = software_edit_basic_fields + + software = create_software fields_software + post( + :edit_software, + :profile => software.community.identifier, + :license => fields[1], + :software => fields[0], + :library => {}, + :operating_system => {}, + :language => {}, + :database => {} + ) + assert_equal SoftwareInfo.last.repository_link, "www.github.com/test" + end + + should 'edit a new software adding specific information' do + fields_software = software_fields + fields = software_edit_specific_fields + + software = create_software fields_software + post( + :edit_software, + :profile => software.community.identifier, + :library => fields[0], + :language => fields[1], + :database => fields[2], + :operating_system => fields[3], + :software => fields[4], + :license => fields[5] + ) + assert_equal SoftwareInfo.last.acronym, "test" + end + + should 'upgrade a generic software to a public software' do + fields_software = software_fields + fields = software_edit_specific_fields + + fields[4]['public_software'] = true + software = create_software fields_software + + post( + :edit_software, + :profile => software.community.identifier, + :library => fields[0], + :language => fields[1], + :database => fields[2], + :operating_system => fields[3], + :software => fields[4], + :license => fields[5] + ) + + assert_equal true, SoftwareInfo.last.public_software? + end + + should "create software_info with existing license_info" do + @environment.add_admin(@person) + + post( + :new_software, + :community => {:name =>"New Software", :identifier => "new-software"}, + :software_info => {:finality => "something", :repository_link => ""}, + :license =>{:license_infos_id => LicenseInfo.last.id}, + :profile => @person.identifier + ) + + assert_equal SoftwareInfo.last.license_info, LicenseInfo.last + end + + should "create software_info with 'Another' license_info" do + license_another = LicenseInfo.create(:version => "Another", :link => "#") + @environment.add_admin(@person) + + another_license_version = "Different License" + another_license_link = "http://diferent.link" + + post( + :new_software, + :community => { :name => "New Software", :identifier => "new-software" }, + :software_info => { :finality => "something", :repository_link => "" }, + :license => { :license_infos_id => license_another.id, + :version => another_license_version, + :link=> another_license_link + }, + :profile => @person.identifier + ) + + assert_equal SoftwareInfo.last.license_info_id, license_another.id + assert_equal SoftwareInfo.last.license_info.id, nil + assert_equal SoftwareInfo.last.license_info.version, another_license_version + assert_equal SoftwareInfo.last.license_info.link, another_license_link + end +end diff --git a/src/noosfero-spb/software_communities/test/functional/software_communities_plugin_profile_controller_test.rb b/src/noosfero-spb/software_communities/test/functional/software_communities_plugin_profile_controller_test.rb new file mode 100644 index 0000000..00c715e --- /dev/null +++ b/src/noosfero-spb/software_communities/test/functional/software_communities_plugin_profile_controller_test.rb @@ -0,0 +1,67 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/software_test_helper' +require File.dirname(__FILE__) + '/../../controllers/software_communities_plugin_profile_controller' + +class SoftwareCommunitiesPluginProfileController; def rescue_action(e) raise e end; end + +class SoftwareCommunitiesPluginProfileControllerTest < ActionController::TestCase + include SoftwareTestHelper + + def setup + @controller = SoftwareCommunitiesPluginProfileController.new + @request = ActionController::TestRequest.new + @response = ActionController::TestResponse.new + + @environment = Environment.default + @environment.enable_plugin('SoftwareCommunitiesPlugin') + @environment.save! + + LicenseInfo.create( + :version=>"CC-GPL-V2", + :link=>"http://creativecommons.org/licenses/GPL/2.0/legalcode.pt" + ) + @download_data = { + :name=>"Google", + :link=>"http://google.com", + :software_description=>"all", + :minimum_requirements=>"none", + :size=>"?", + :total_downloads=>0 + } + + @software = create_software(software_fields) + @software.save! + + download_block = DownloadBlock.new + download_block.downloads = Download.validate_download_list([@download_data]) + download_block.save! + + @software.community.blocks << download_block + @software.community.save! + end + + should 'redirect to download link with correct params' do + download_block = DownloadBlock.last + get :download_file, :profile=>@software.community.identifier, + :block => download_block.id, :download_index => 0 + + assert_equal nil, session[:notice] + assert_redirected_to download_block.downloads[0][:link] + end + + should "notice when the download was not found" do + download_block = DownloadBlock.last + get :download_file, :profile=>@software.community.identifier, + :block => 123, :download_index => 0 + + assert_equal "Could not find the download file", session[:notice] + end + + should "notice when given invalid download params" do + download_block = DownloadBlock.last + get :download_file, :profile=>@software.community.identifier, + :block => download_block.id, :download_index => -5 + + assert_equal "Invalid download params", session[:notice] + end +end diff --git a/src/noosfero-spb/software_communities/test/helpers/plugin_test_helper.rb b/src/noosfero-spb/software_communities/test/helpers/plugin_test_helper.rb new file mode 100644 index 0000000..d7458ce --- /dev/null +++ b/src/noosfero-spb/software_communities/test/helpers/plugin_test_helper.rb @@ -0,0 +1,64 @@ +module PluginTestHelper + + def create_community name + community = fast_create(Community) + community.name = name + community.identifier = name.to_slug + community.save + community + end + + def create_software_info name, finality = "something", acronym = "" + community = create_community(name) + software_info = SoftwareInfo.new + software_info.community = community + software_info.finality = finality + software_info.acronym = acronym + software_info.public_software = true + software_info.save! + + software_info + end + + def create_person name, email, password, password_confirmation, state, city + user = create_user( + name.to_slug, + email, + password, + password_confirmation, + ) + person = Person::new + + user.person = person + person.user = user + + person.name = name + person.identifier = name.to_slug + person.state = state + person.city = city + + user.save + person.save + + person + end + + def create_user login, email, password, password_confirmation + user = User.new + + user.login = login + user.email = email + user.password = password + user.password_confirmation = password_confirmation + + user + end + + def create_license_info version, link = "" + license = LicenseInfo.create(:version => version) + license.link = link + license.save + + license + end +end diff --git a/src/noosfero-spb/software_communities/test/helpers/software_test_helper.rb b/src/noosfero-spb/software_communities/test/helpers/software_test_helper.rb new file mode 100644 index 0000000..285fd27 --- /dev/null +++ b/src/noosfero-spb/software_communities/test/helpers/software_test_helper.rb @@ -0,0 +1,193 @@ +module SoftwareTestHelper + + def create_language language_fields + language = SoftwareLanguage.new + + language_fields[0].each do |k,v| + language[k] = v + end + language.save! + language + end + + def create_database database_fields + + database = SoftwareDatabase.new + + database_fields[0].each do |k,v| + database[k] = v + end + + database.save! + database + end + + def create_library library_fields + library = Library.new + + library_fields[0].each do |k,v| + library[k] = v + end + library.save! + library + end + + def create_operating_system operating_system_hash + operating_system = OperatingSystem.new + + operating_system_hash[0].each do |k,v| + operating_system[k] = v + end + operating_system.save + operating_system + end + + def create_license license_hash + license_info = LicenseInfo.new + + license_hash.each do |k,v| + license_info[k] = v + end + license_info.save + license_info + end + + def create_categories categories_hash + software_categories = SoftwareCategories.new + + categories_hash.each do |k,v| + software_categories[k] = v + end + software_categories.save + software_categories + end + + def create_software fields + + software = SoftwareInfo.new + community = Community.new + software_hash = fields[2] + license_system_hash = fields[0] + community_hash = fields[1] + + software_hash.each do |k,v| + software[k] = v + end + + community_hash.each do |k,v| + community[k] = v + end + + community.save! + software.community = community + software.license_info_id = license_system_hash[:license_infos_id] + + software.save! + + software + end + + def software_edit_basic_fields + fields = Hash.new + fields_license = Hash.new + hash_list = [] + + fields['repository_link'] = 'www.github.com/test' + fields['finality'] = 'This is the new finality of the software' + hash_list << fields + + #Fields for license info + fields_license['license_infos_id'] = LicenseInfo.last.id + hash_list << fields_license + + hash_list + end + + def software_edit_specific_fields + fields_library = Hash.new + fields_language = Hash.new + fields_database = Hash.new + fields_operating_system = Hash.new + fields_software = Hash.new + fields_categories = Hash.new + fields_license = Hash.new + + hash_list = [] + list_database = [] + list_language = [] + list_operating_system = [] + list_library = [] + + #Fields for library + fields_library['version'] = 'test' + fields_library['name'] = 'test' + fields_library['license'] = 'test' + list_library << fields_library + list_library << {} + hash_list << list_library + + #Fields for software language + fields_language['version'] = 'test' + fields_language['programming_language_id'] = ProgrammingLanguage.last.id + fields_language['operating_system'] = 'test' + list_language << fields_language + list_language << {} + hash_list << list_language + + #Fields for database + fields_database['version'] = 'test' + fields_database['database_description_id'] = DatabaseDescription.last.id + fields_database['operating_system'] = 'test' + list_database << fields_database + list_database << {} + hash_list << list_database + + #Fields for operating system + fields_operating_system['version'] = 'version' + fields_operating_system['operating_system_name_id'] = OperatingSystemName.last.id + list_operating_system << fields_operating_system + list_operating_system << {} + hash_list << list_operating_system + + #software fields + fields_software['acronym'] = 'test' + fields_software['operating_platform'] = 'Linux' + fields_software['objectives'] = 'This is the objective of the software' + fields_software['features'] = 'This software does nothing' + fields_software['demonstration_url'] = 'www.test.com' + hash_list << fields_software + + #Fields for license + fields_license['license_infos_id'] = LicenseInfo.last.id + hash_list << fields_license + + hash_list + end + + def software_fields + hash_list = [] + + #Fields for license info + fields_license = { + license_infos_id: LicenseInfo.last.id + } + hash_list << fields_license + + #Fields for community + fields_community = { + name: 'Debian', + identifier: 'debian' + } + hash_list << fields_community + + #Fields for basic information + fields = { + finality: 'This is the finality of the software' + } + hash_list << fields + + hash_list + end +end +#version: LicenseInfo.last.version, +#id: LicenseInfo.last.id \ No newline at end of file diff --git a/src/noosfero-spb/software_communities/test/unit/categories_and_tags_block_test.rb b/src/noosfero-spb/software_communities/test/unit/categories_and_tags_block_test.rb new file mode 100644 index 0000000..a7e0bef --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/categories_and_tags_block_test.rb @@ -0,0 +1,19 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' + +class CategoriesAndTagsBlockTest < ActiveSupport::TestCase + include PluginTestHelper + should 'inherit from Block' do + assert_kind_of Block, CategoriesAndTagsBlock.new + end + + should 'declare its default title' do + CategoriesAndTagsBlock.any_instance.stubs(:profile_count).returns(0) + assert_equal Block.new.default_title, CategoriesAndTagsBlock.new.default_title + end + + should 'describe itself' do + assert_not_equal Block.description, CategoriesAndTagsBlock.description + end + +end diff --git a/src/noosfero-spb/software_communities/test/unit/categories_software_block_test.rb b/src/noosfero-spb/software_communities/test/unit/categories_software_block_test.rb new file mode 100644 index 0000000..b02f9b4 --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/categories_software_block_test.rb @@ -0,0 +1,19 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' + +class CategoriesSoftwareBlockTest < ActiveSupport::TestCase + include PluginTestHelper + should 'inherit from Block' do + assert_kind_of Block, CategoriesSoftwareBlock.new + end + + should 'declare its default title' do + CategoriesSoftwareBlock.any_instance.stubs(:profile_count).returns(0) + assert_equal Block.new.default_title, CategoriesSoftwareBlock.new.default_title + end + + should 'describe itself' do + assert_not_equal Block.description, CategoriesSoftwareBlock.description + end + +end diff --git a/src/noosfero-spb/software_communities/test/unit/communities_block_test.rb b/src/noosfero-spb/software_communities/test/unit/communities_block_test.rb new file mode 100644 index 0000000..e10251b --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/communities_block_test.rb @@ -0,0 +1,31 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' + +class CommunitiesBlockTest < ActiveSupport::TestCase + include PluginTestHelper + def setup + @person = create_person("My Name", "user@email.com", "123456", "123456", "Any State", "Some City") + + @software_info = create_software_info("Novo Software") + @software_info.community.add_member(@person) + + @community = create_community("Nova Comunidade") + @community.add_member(@person) + + + @comminities_block = CommunitiesBlock.new + @comminities_block.expects(:owner).at_least_once.returns(@person) + end + + def teardown + CommunitiesBlock.destroy_all + @person = nil + @community = nil + @software_info = nil + end + should "not have community of software or institution in block" do + assert_includes @comminities_block.profile_list, @community + assert_not_includes @comminities_block.profile_list, @software_info.community + end + +end diff --git a/src/noosfero-spb/software_communities/test/unit/database_helper_test.rb b/src/noosfero-spb/software_communities/test/unit/database_helper_test.rb new file mode 100644 index 0000000..d7f2444 --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/database_helper_test.rb @@ -0,0 +1,58 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' + +class DatabaseHelperTest < ActiveSupport::TestCase + + def setup + dd1 = DatabaseDescription.create(:name => "Oracle") + dd2 = DatabaseDescription.create!(:name => "MySQL") + + @database_objects = [ + {:database_description_id => dd1.id.to_s ,:version => "2.0"}, + {:database_description_id => dd2.id.to_s ,:version => "2.1"} + ] + end + + def teardown + @database_objects = nil + SoftwareDatabase.destroy_all + DatabaseDescription.destroy_all + end + + should "return an empty list" do + empty_list = [] + assert_equal [], DatabaseHelper.list_database(empty_list) + end + + should "return a list with current database objects" do + list_compare = [] + db_tables = DatabaseHelper.list_database(@database_objects) + assert_equal list_compare.class, db_tables.class + end + + should "have same information from the list passed as parameter" do + list_compare = DatabaseHelper.list_database(@database_objects) + db_objects_id = @database_objects.first[:database_description_id] + assert_equal db_objects_id.to_i, list_compare.first.database_description_id + end + + should "return a list with the same size of the parameter" do + list_compare = DatabaseHelper.list_database(@database_objects) + assert_equal @database_objects.count, list_compare.count + end + + should "return false if list_database are empty or null" do + list_compare = [] + assert_equal false,DatabaseHelper.valid_list_database?(list_compare) + end + + should "remove invalid tables from the list" do + @database_objects.push({ + :database_description_id => "I'm not a valid id", + :version => "2.5" + }) + + database_objects_length = @database_objects.count + list_compare = DatabaseHelper.list_database(@database_objects) + assert_equal list_compare.count, database_objects_length-1 + end +end diff --git a/src/noosfero-spb/software_communities/test/unit/database_validation_test.rb b/src/noosfero-spb/software_communities/test/unit/database_validation_test.rb new file mode 100644 index 0000000..5466779 --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/database_validation_test.rb @@ -0,0 +1,37 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' + +class DatabaseValidationTest < ActiveSupport::TestCase + + def setup + @database_desc = DatabaseDescription.create(:name => "ABC") + @database = SoftwareDatabase.new + @database.database_description = @database_desc + @database.version = "MYSQL" + @database + end + + def teardown + @database = nil + DatabaseDescription.destroy_all + SoftwareDatabase.destroy_all + end + + should "Save database if all fields are filled" do + assert_equal true, @database.save + end + + should "not save database if database_description is empty" do + @database.database_description = nil + assert_equal true, !@database.save + end + + should "not save database if version are empty" do + @database.version = " " + assert_equal true, !@database.save + end + + should "not save database if version is too long" do + @database.version = "A too long version to be a valid version for database" + assert !@database.save + end +end diff --git a/src/noosfero-spb/software_communities/test/unit/download_block_test.rb b/src/noosfero-spb/software_communities/test/unit/download_block_test.rb new file mode 100644 index 0000000..adfcdd3 --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/download_block_test.rb @@ -0,0 +1,34 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' + +class DownloadBlockTest < ActiveSupport::TestCase + include PluginTestHelper + should 'inherit from Block' do + assert_kind_of Block, DownloadBlock.new + end + + should 'declare its default title' do + DownloadBlock.any_instance.stubs(:profile_count).returns(0) + assert_equal Block.new.default_title, DownloadBlock.new.default_title + end + + should 'describe itself' do + assert_not_equal Block.description, DownloadBlock.description + end + + should 'have software info to download it' do + + link1 = "gitlab.com/teste" + name1 = "Test Software" + + link2 = "gitlab.com/teste/2" + name2 = "Test Software2" + + block = DownloadBlock.create(:downloads => [{:name => name1, :link => link1}, {:name => name2, :link => link2}]) + + assert_equal block.downloads[0][:link], link1, "Link should not be empty" + assert_equal block.downloads[0][:name], name1, "Name should not be empty" + assert_equal block.downloads[1][:link], link2, "Link should not be empty" + assert_equal block.downloads[1][:name], name2, "Name should not be empty" + end +end diff --git a/src/noosfero-spb/software_communities/test/unit/download_test.rb b/src/noosfero-spb/software_communities/test/unit/download_test.rb new file mode 100644 index 0000000..4b301fd --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/download_test.rb @@ -0,0 +1,53 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' + +class DownloadTest < ActiveSupport::TestCase + include PluginTestHelper + + def setup + @downloads_sample_data = [ + { + :name=>"Sample data A", + :link=>"http://some.url.com", + :software_description=>"all", + :minimum_requirements=>"none", + :size=>"10 mb", + :total_downloads=>0 + }, + { + :name=>"Sample data B", + :link=>"http://other.url", + :software_description=>"Linux", + :minimum_requirements=>"500 mb Ram", + :size=>"3 GB", + :total_downloads=>123 + } + ] + end + + should "Set as 0(zero) total_downloads if it is not given" do + without_total_downloads = Download.new({}) + with_total_downloads = Download.new(@downloads_sample_data.last) + + assert_equal 0, without_total_downloads.total_downloads + assert_equal @downloads_sample_data.last[:total_downloads], with_total_downloads.total_downloads + end + + should "Remove downloads without a name" do + @downloads_sample_data[1] = @downloads_sample_data[1].slice! :name + downloads = Download.validate_download_list @downloads_sample_data + + assert_equal 1, downloads.size + assert_equal @downloads_sample_data[0][:name], downloads[0][:name] + end + + should "Only set total_downloads if the value is integer" do + download = Download.new(@downloads_sample_data.last) + + download.total_downloads = "456" + assert_not_equal 456, download.total_downloads + + download.total_downloads = 456 + assert_equal 456, download.total_downloads + end +end diff --git a/src/noosfero-spb/software_communities/test/unit/library_helper_test.rb b/src/noosfero-spb/software_communities/test/unit/library_helper_test.rb new file mode 100644 index 0000000..28e58e3 --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/library_helper_test.rb @@ -0,0 +1,53 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' + +class LibraryHelperTest < ActiveSupport::TestCase + + def setup + @license_objects = [ + {"name" => "license1" ,"version" => "2.0", "license" => "debian", "software_id" => "1"}, + {"name" => "license2" ,"version" => "2.1", "license" => "debian", "software_id" => "1"}, + {"name" => "license3" ,"version" => "2.2", "license" => "debian", "software_id" => "1"}] + end + + def teardown + @license_objects = nil + end + + should "return an empty list" do + empty_list = [] + assert_equal [],LibraryHelper.list_library(empty_list) + end + + should "return a list with current library objects" do + list_compare = [] + lib_table = LibraryHelper.list_library(@license_objects) + assert_equal list_compare.class, lib_table.class + end + + should "have same information from the list passed as parameter" do + list_compare = LibraryHelper.list_library(@license_objects) + assert_equal @license_objects.first[:name], list_compare.first.name + end + + should "return a list with the same size of the parameter" do + list_compare = LibraryHelper.list_library(@license_objects) + assert_equal @license_objects.count, list_compare.count + end + + should "return false if list_database are empty or null" do + list_compare = [] + assert_equal true, LibraryHelper.valid_list_library?(list_compare) + end + + should "return a html text with license name equals to linux" do + libraries = [] + + library_description = Library.new + library_description.name = "Lib" + + libraries << library_description + lib_table = LibraryHelper.libraries_as_tables(libraries) + + assert_not_nil lib_table.first.call.index("lib") + end +end diff --git a/src/noosfero-spb/software_communities/test/unit/library_validation_test.rb b/src/noosfero-spb/software_communities/test/unit/library_validation_test.rb new file mode 100644 index 0000000..f45cc9e --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/library_validation_test.rb @@ -0,0 +1,49 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' + +class LibraryValidationTest < ActiveSupport::TestCase + + def setup + @library = Library.new + @library.name = "name" + @library.version = "version" + @library.license = "license" + end + + def teardown + @Libray = nil + end + + should "Save Libray if all fields are filled" do + assert @library.save + end + + should "Don't save Library of name are not filed" do + @library.name = "" + assert !@library.save + end + + should "Don't save Library of version are not filed" do + @library.version = "" + assert !@library.save + end + + should "Don't save Library of license are not filed" do + @library.license = "" + assert !@library.save + end + + should "Don't save Library if name is too long" do + @library.name = "A too long name to be a valid name for library" + assert !@library.save + end + + should "Don't save Library if version is too long" do + @library.version = "A too long version to be a valid version for library" + assert !@library.save + end + + should "Don't save Library if license is too long" do + @library.license = "A too long license to be a valid license for library" + assert !@library.save + end +end diff --git a/src/noosfero-spb/software_communities/test/unit/operating_system_helper_test.rb b/src/noosfero-spb/software_communities/test/unit/operating_system_helper_test.rb new file mode 100644 index 0000000..8b2e506 --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/operating_system_helper_test.rb @@ -0,0 +1,64 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' + +OperatingSystemName.create(:name=>"Debina") +OperatingSystemName.create(:name=>"Fedora") +OperatingSystemName.create(:name=>"CentOS") + +class OperatingSystemHelperTest < ActiveSupport::TestCase + + def setup + @operating_system_objects = [ + {:operating_system_name_id => "1" ,:version => "2.0"}, + {:operating_system_name_id => "2" ,"version" => "2.1"}, + {:operating_system_name_id => "3" ,"version" => "2.2"} + ] + @operating_system_objects + end + + def teardown + @operating_system_objects = nil + end + + should "return an empty list" do + empty_list = [] + assert_equal [],OperatingSystemHelper.list_operating_system(empty_list) + end + + should "return a list with current OperatingSystems" do + list_compare = [] + list_op = OperatingSystemHelper.list_operating_system(@operating_system_objects) + assert_equal list_compare.class, list_op.class + end + + should "have same information from the list passed as parameter" do + list_compare = OperatingSystemHelper.list_operating_system(@operating_system_objects) + first_operating = @operating_system_objects.first[:operating_system_name_id] + assert_equal first_operating, list_compare.first.operating_system_name_id.to_s + end + + should "return a list with the same size of the parameter" do + list_compare = OperatingSystemHelper.list_operating_system(@operating_system_objects) + assert_equal @operating_system_objects.count, list_compare.count + end + + should "return false if list_operating_system are empty or null" do + list_compare = [] + assert_equal false,OperatingSystemHelper.valid_list_operating_system?(list_compare) + end + + should "return a html text with operating system" do + operating_systems = [] + + operating_system = OperatingSystemName.new + operating_system.name = "teste" + + software_operating_system = OperatingSystem.new + software_operating_system.version = 2 + software_operating_system.operating_system_name = operating_system + + operating_systems << software_operating_system + op_table = OperatingSystemHelper.operating_system_as_tables(operating_systems) + + assert_not_nil op_table.first.call.index(OperatingSystemName.first.name) + end +end diff --git a/src/noosfero-spb/software_communities/test/unit/operating_system_validation_test.rb b/src/noosfero-spb/software_communities/test/unit/operating_system_validation_test.rb new file mode 100644 index 0000000..1f4a42b --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/operating_system_validation_test.rb @@ -0,0 +1,34 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' + +class OperatingSystemValidationTest < ActiveSupport::TestCase + + def setup + operating_system_name = OperatingSystemName::new :name=>"Linux" + @operating_system = OperatingSystem::new :version=>"3.0" + @operating_system.operating_system_name = operating_system_name + @operating_system + end + + def teardown + @operating_system.destroy + end + + should "save OperatingSystem if all fields are filled" do + assert_equal true, @operating_system.save + end + + should "not save if OperatingSystem does not have version" do + @operating_system.version = " " + assert_equal false, @operating_system.save + end + + should "not save if OperatingSystem does not have operating_system_name" do + @operating_system.operating_system_name = nil + assert_equal false, @operating_system.save + end + + should "not save if OperatingSystem have a version too long" do + @operating_system.version = "A too long version to be a valid" + assert_equal false, @operating_system.save + end +end diff --git a/src/noosfero-spb/software_communities/test/unit/repository_block_test.rb b/src/noosfero-spb/software_communities/test/unit/repository_block_test.rb new file mode 100644 index 0000000..2580e79 --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/repository_block_test.rb @@ -0,0 +1,19 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' + +class RepositoryBlockTest < ActiveSupport::TestCase + include PluginTestHelper + + should 'inherit from Block' do + assert_kind_of Block, RepositoryBlock.new + end + + should 'declare its default title' do + RepositoryBlock.any_instance.stubs(:profile_count).returns(0) + assert_equal Block.new.default_title, RepositoryBlock.new.default_title + end + + should 'describe itself' do + assert_not_equal Block.description, RepositoryBlock.description + end +end diff --git a/src/noosfero-spb/software_communities/test/unit/search_catalog_block_test.rb b/src/noosfero-spb/software_communities/test/unit/search_catalog_block_test.rb new file mode 100644 index 0000000..64376ef --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/search_catalog_block_test.rb @@ -0,0 +1,19 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' + +class SearchCatalogBlockTest < ActiveSupport::TestCase + include PluginTestHelper + should 'inherit from Block' do + assert_kind_of Block, SearchCatalogBlock.new + end + + should 'declare its default title' do + SearchCatalogBlock.any_instance.stubs(:profile_count).returns(0) + assert_equal Block.new.default_title, SearchCatalogBlock.new.default_title + end + + should 'describe itself' do + assert_not_equal Block.description, SearchCatalogBlock.description + end + +end diff --git a/src/noosfero-spb/software_communities/test/unit/search_helper_test.rb b/src/noosfero-spb/software_communities/test/unit/search_helper_test.rb new file mode 100644 index 0000000..f9a38f8 --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/search_helper_test.rb @@ -0,0 +1,53 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../../lib/ext/search_helper.rb' + +class SearchHelperTest < ActiveSupport::TestCase + + include SearchHelper + + should "return communities list with relevance by nickname" do + communities_list = [] + communities_list << Community.create(:name => "Help One", :nickname => "need") + communities_list << Community.create(:name => "Need Two", :nickname => "help") + communities_list << Community.create(:name => "Help Three", :nickname => "need") + communities_list << Community.create(:name => "Need Four", :nickname => "help") + + relevanced_list = sort_by_relevance(communities_list, "need") { |community| [community.nickname] } + + assert_equal relevanced_list[0].nickname, "need" + assert_equal relevanced_list[1].nickname, "need" + assert_equal relevanced_list[2].nickname, "help" + assert_equal relevanced_list[3].nickname, "help" + end + + should "return communities list with relevance by name" do + communities_list = [] + communities_list << Community.create(:name => "Help One", :nickname => "need") + communities_list << Community.create(:name => "Need Two", :nickname => "help") + communities_list << Community.create(:name => "Help Three", :nickname => "need") + communities_list << Community.create(:name => "Need Four", :nickname => "help") + + relevanced_list = sort_by_relevance(communities_list, "need") { |community| [community.name] } + + assert relevanced_list[0].name.include?("Need") + assert relevanced_list[1].name.include?("Need") + assert relevanced_list[2].name.include?("Help") + assert relevanced_list[3].name.include?("Help") + end + + should "return communities list with relevance by nickname first and custom_header second" do + communities_list = [] + communities_list << Community.create(:name => "Help One", :nickname => "need", :custom_header => "help") + communities_list << Community.create(:name => "Need Two", :nickname => "help", :custom_header => "need") + communities_list << Community.create(:name => "Help Three", :nickname => "need", :custom_header => "help") + communities_list << Community.create(:name => "Need Four", :nickname => "help", :custom_header => "help") + + relevanced_list = sort_by_relevance(communities_list, "need") { |community| [community.custom_header, community.nickname] } + + assert relevanced_list[0].nickname.include?("need") + assert relevanced_list[1].nickname.include?("need") + assert relevanced_list[2].custom_header.include?("need") + assert relevanced_list[3].custom_header.include?("help") + end + +end diff --git a/src/noosfero-spb/software_communities/test/unit/software_communities_person_test.rb b/src/noosfero-spb/software_communities/test/unit/software_communities_person_test.rb new file mode 100644 index 0000000..3db9473 --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/software_communities_person_test.rb @@ -0,0 +1,39 @@ +# encoding: utf-8 + +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' + +class GovUserPluginPersonTest < ActiveSupport::TestCase + include PluginTestHelper + + def setup + @plugin = SoftwareCommunitiesPlugin.new + + @user = fast_create(User) + @person = create_person( + "My Name", + "user@email.com", + "123456", + "123456", + "Any State", + "Some City" + ) + end + + def teardown + @plugin = nil + end + + should 'get a list of softwares of a person' do + software1 = create_software_info "noosfero" + software2 = create_software_info "colab" + community = create_community "simple_community" + + software1.community.add_member @person + software1.save! + community.add_member @person + community.save! + + assert_equal 1, @person.softwares.count + end +end diff --git a/src/noosfero-spb/software_communities/test/unit/software_database_test.rb b/src/noosfero-spb/software_communities/test/unit/software_database_test.rb new file mode 100644 index 0000000..c73a359 --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/software_database_test.rb @@ -0,0 +1,35 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' + +class SoftwareDatabaseTest < ActiveSupport::TestCase + def setup + DatabaseDescription.create!(name: "PostgreSQL") + @software_database = SoftwareDatabase.new( + :version => "1.0" + ) + @software_database.database_description_id = 1 + end + + def teardown + DatabaseDescription.destroy_all + SoftwareDatabase.destroy_all + end + + should "save if all informations of @software_database are filled" do + assert @software_database.save, "Database should have been saved" + end + + should "not save if database description id is empty" do + @software_database.database_description_id = nil + assert !@software_database.save, "Database description must be filled" + end + + should "not save if version is empty" do + @software_database.version = nil + assert !@software_database.save, "Version must be filled" + end + + should "not save if version has more than 20 characters" do + @software_database.version = "a"*21 + assert !@software_database.save, "Version must have until 20 characters" + end +end diff --git a/src/noosfero-spb/software_communities/test/unit/software_helper_test.rb b/src/noosfero-spb/software_communities/test/unit/software_helper_test.rb new file mode 100644 index 0000000..cddadea --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/software_helper_test.rb @@ -0,0 +1,20 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' + +class SoftwareHelperTest < ActiveSupport::TestCase + + include SoftwareHelper + + should "Create ProgrammingLanguages based on file with languages names" do + ProgrammingLanguage.delete_all + PATH_TO_FILE = "plugins/software_communities/public/static/languages.txt" + + SoftwareHelper.create_list_with_file(PATH_TO_FILE, ProgrammingLanguage) + + list = File.open(PATH_TO_FILE, "r") + count = list.readlines.count + list.close + + assert(ProgrammingLanguage.count == count) + end + +end diff --git a/src/noosfero-spb/software_communities/test/unit/software_info_test.rb b/src/noosfero-spb/software_communities/test/unit/software_info_test.rb new file mode 100644 index 0000000..930436c --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/software_info_test.rb @@ -0,0 +1,44 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' + +class SoftwareInfoValidationTest < ActiveSupport::TestCase + + include PluginTestHelper + + should "Return original license_info when license is not 'Another'" do + @software_info = create_software_info("software_test") + @license_info = create_license_info("license_test") + + @software_info.license_info = @license_info + @software_info.save! + + assert_equal @software_info.license_info, @license_info + end + + should "Return license_info with nil id when license is 'Another'" do + @software_info = create_software_info("software_test") + @license_another = create_license_info("Another") + + @software_info.license_info = @license_another + @software_info.save! + + assert_equal @software_info.license_info_id, @license_another.id + assert_equal @software_info.license_info.id, nil + end + + should "Return fake license_info when call method another_license" do + @software_info = create_software_info("software_test") + @license_another = create_license_info("Another") + + another_license_version = "Another Version" + another_license_link = "#another_link" + + @software_info.another_license(another_license_version, another_license_link) + + assert_equal @software_info.license_info_id, @license_another.id + assert_equal @software_info.license_info.id, nil + assert_equal @software_info.license_info.version, another_license_version + assert_equal @software_info.license_info.link, another_license_link + end + +end \ No newline at end of file diff --git a/src/noosfero-spb/software_communities/test/unit/software_info_validation_test.rb b/src/noosfero-spb/software_communities/test/unit/software_info_validation_test.rb new file mode 100644 index 0000000..e42bf9b --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/software_info_validation_test.rb @@ -0,0 +1,121 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' + +class SoftwareInfoValidationTest < ActiveSupport::TestCase + + def setup + @community = fast_create( + Community, + :identifier => 'new-software', + :name => 'New Software' + ) + + @language = ProgrammingLanguage.new(:name => 'C++') + @language.save + @software_language = SoftwareLanguage.new( + :version => '1' + ) + @software_language.programming_language = @language + @software_language.save + + @database = DatabaseDescription.new(:name => 'Oracle') + @database.save + @software_database = SoftwareDatabase.new( + :version => '2' + ) + @software_database.database_description = @database + @software_database.save + + @operating_system_name = OperatingSystemName.new(:name => 'Debian') + @operating_system_name.save + @operating_system = OperatingSystem.new(:version => '1.0') + @operating_system.operating_system_name = @operating_system_name + @operating_system.save + + @software_info = SoftwareInfo.new( + :acronym => "SFTW", + :e_mag => true, + :icp_brasil => true, + :intern => true, + :e_ping => true, + :e_arq => true, + :operating_platform => true, + :objectives => "", + :features => "", + :finality => "something" + ) + @software_info.software_languages << @software_language + @software_info.software_databases << @software_database + @software_info.operating_systems << @operating_system + + @software_info.features = "Do a lot of things" + @software_info.objectives = "All tests should pass !" + end + + def teardown + ProgrammingLanguage.destroy_all + SoftwareLanguage.destroy_all + DatabaseDescription.destroy_all + SoftwareDatabase.destroy_all + OperatingSystem.destroy_all + OperatingSystemName.destroy_all + SoftwareInfo.destroy_all + end + + should 'Save SoftwareInfo if all fields are filled' do + assert_equal true, @software_info.save + end + + should 'Save SoftwareInfo if operating_platform is blank' do + @software_info.operating_platform = '' + assert_equal true, @software_info.save + end + + should 'Save SoftwareInfo without demonstration_url be filled' do + @software_info.demonstration_url = '' + assert_equal true, @software_info.save + end + + should "Save SoftwareInfo if acronym is blank" do + @software_info.acronym = "" + + assert_equal true, @software_info.save + end + + should "Not save SoftwareInfo if acronym has more than 8 characters" do + @software_info.acronym = "12345678901" + assert_equal false, @software_info.save + end + + should "Save SoftwareInfo if acronym has whitespaces" do + @software_info.acronym = "AC DC" + assert_equal false, @software_info.save + end + + should "Save if objectives are empty" do + @software_info.objectives = "" + + assert_equal true, @software_info.save + end + + should "Save if features are empty" do + @software_info.features = "" + + assert_equal true, @software_info.save + end + + should "Not save if features are longer than 4000" do + @software_info.features = "a"*4001 + error_msg = _("Features is too long (maximum is 4000 characters)") + + assert_equal false, @software_info.save + assert_equal true, @software_info.errors.full_messages.include?(error_msg) + end + + should "Not save if objectives are longer than 4000" do + @software_info.objectives = "a"*4001 + error_msg = _("Objectives is too long (maximum is 4000 characters)") + + assert_equal false, @software_info.save + assert_equal true, @software_info.errors.full_messages.include?(error_msg) + end +end diff --git a/src/noosfero-spb/software_communities/test/unit/software_language_helper_test.rb b/src/noosfero-spb/software_communities/test/unit/software_language_helper_test.rb new file mode 100644 index 0000000..9465f91 --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/software_language_helper_test.rb @@ -0,0 +1,60 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' + +class SoftwareLanguageHelperTest < ActiveSupport::TestCase + + def setup + pl1 = ProgrammingLanguage.create(:name => "Python") + pl2 = ProgrammingLanguage.create(:name => "Java") + + @software_language_objects = [ + {:programming_language_id => pl1.id.to_s ,:version => "2.0"}, + {:programming_language_id => pl2.id.to_s ,:version => "2.1"}, + {:programming_language_id => pl1.id.to_s ,:version => "2.2"}] + @software_language_objects + end + + def teardown + @software_language_objects = nil + ProgrammingLanguage.destroy_all + end + + should "return an empty list" do + empty_list = [] + assert_equal [], SoftwareLanguageHelper.list_language(empty_list) + end + + should "return a list with current software language objects" do + list_compare = [] + softwares = SoftwareLanguageHelper.list_language(@software_language_objects) + assert_equal list_compare.class, softwares.class + end + + should "have same information from the list passed as parameter" do + list_compare = SoftwareLanguageHelper.list_language(@software_language_objects) + lang_id = @software_language_objects.first[:programming_language_id].to_i + + assert_equal lang_id, list_compare.first.programming_language_id + end + + should "return a list with the same size of the parameter" do + list_compare = SoftwareLanguageHelper.list_language(@software_language_objects) + assert_equal @software_language_objects.count, list_compare.count + end + + should "return false if list_language are empty or null" do + list_compare = [] + assert_equal false,SoftwareLanguageHelper.valid_list_language?(list_compare) + end + + should "remove invalid tables from the list" do + @software_language_objects.push({ + :programming_language_id => "I'm not a valid id", + :version => "2.0" + }) + + software_language_objects_length = @software_language_objects.count + list_compare = SoftwareLanguageHelper.list_language(@software_language_objects) + + assert_equal software_language_objects_length-1, list_compare.count + end +end diff --git a/src/noosfero-spb/software_communities/test/unit/software_language_validation.rb b/src/noosfero-spb/software_communities/test/unit/software_language_validation.rb new file mode 100644 index 0000000..8a1b21d --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/software_language_validation.rb @@ -0,0 +1,69 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' + +class SoftwareLanguageValidationTest < ActiveSupport::TestCase + def setup + create_programming_language + @software_info = create_software_info + @software_info.save + end + + def teardown + @software_info = nil + SoftwareInfo.destroy_all + end + + should "Save SoftwareLanguage if version and prog_language are filled" do + @software_language = create_software_language + assert_equal true, @software_language.save + end + + should "Don't save SoftwareLanguage if programming_language is not filed" do + @software_language = create_software_language + @software_language.programming_language = nil + assert_equal true, !@software_language.save + end + + should "Don't save SoftwareLanguage if version is not filed" do + @software_language = create_software_language + @software_language.version = "" + assert_equal true, !@software_language.save + end + + should "Don't save SoftwareLanguage if version is too long" do + @software_language = create_software_language + @software_language.version = "A too long version to be valid as a version" + assert_equal true, !@software_language.save + end + + private + + def create_software_language + software_language = SoftwareLanguage.new + software_language.software_info = @software_info + software_language.programming_language = ProgrammingLanguage.last + software_language.version = "version" + software_language + end + + def create_software_info + software_info = SoftwareInfo.new + software_info.community_id = fast_create(Community).id + software_info.community.name = 'Noosfero' + software_info.e_mag = true + software_info.icp_brasil = true + software_info.intern = true + software_info.e_ping = true + software_info.e_arq = true + software_info.operating_platform = 'GNU/Linux' + software_info.features = "Do a lot of things" + software_info.objectives = "All tests should pass !" + software_info + end + + def create_programming_language + ProgrammingLanguage.create(:name=>"C") + ProgrammingLanguage.create(:name=>"C++") + ProgrammingLanguage.create(:name=>"Ruby") + ProgrammingLanguage.create(:name=>"Python") + end +end diff --git a/src/noosfero-spb/software_communities/test/unit/software_license_info_test.rb b/src/noosfero-spb/software_communities/test/unit/software_license_info_test.rb new file mode 100644 index 0000000..81ab2ee --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/software_license_info_test.rb @@ -0,0 +1,29 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' + +class SoftwareDatabaseTest < ActiveSupport::TestCase + + should "save if all informations are filled" do + @software_license_info = LicenseInfo.create( + :version => "GPL", + :link => "www.gpl2.com" + ) + assert @software_license_info.save!, "License Info should have been saved" + end + + should "not save if license info version is empty" do + @software_license_info = LicenseInfo.create( + :version => "GPL", + :link => "www.gpl2.com" + ) + @software_license_info.version = nil + assert !@software_license_info.save, "Version can't be blank" + end + + should "save if link is empty" do + @software_license_info = LicenseInfo.create( + :version => "GPL", + :link => "www.gpl2.com") + @software_license_info.link = nil + assert @software_license_info.save, "License info should have been saved" + end +end diff --git a/src/noosfero-spb/software_communities/test/unit/software_registration_test.rb b/src/noosfero-spb/software_communities/test/unit/software_registration_test.rb new file mode 100644 index 0000000..397adf7 --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/software_registration_test.rb @@ -0,0 +1,42 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' + +class SoftwareRegistrationTest < ActiveSupport::TestCase + + def setup + @environment = Environment.default + @environment.enable_plugin(SoftwareCommunitiesPlugin) + end + + def teardown + Community.destroy_all + SoftwareInfo.destroy_all + Task.destroy_all + end + + should 'include software registration task if is admin' do + person = create_user('molly').person + @environment.add_admin(person) + task = CreateSoftware.create!( + :name => "Teste One", + :requestor => person, + :environment => @environment + ) + assert_equal [task], Task.to(person).pending + end + + should 'create software when admin accept software create task' do + person = create_user('Pedro').person + @environment.add_admin(person) + task = CreateSoftware.create!( + :name => "Teste Two", + :requestor => person, + :environment => @environment, + :finality => "something" + ) + + software_count = SoftwareInfo.count + task.finish + + assert_equal software_count+1, SoftwareInfo.count + end +end diff --git a/src/noosfero-spb/software_communities/test/unit/software_tab_data_block_test.rb b/src/noosfero-spb/software_communities/test/unit/software_tab_data_block_test.rb new file mode 100644 index 0000000..aad8c8c --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/software_tab_data_block_test.rb @@ -0,0 +1,66 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' + +class SoftwareTabDataBlockTest < ActiveSupport::TestCase + include PluginTestHelper + + def setup + @software_info = create_software_info("A new Software") + @software_info.save! + + @soft_community = @software_info.community + + @soft_community.blogs << Blog.new(:name=>"First blog") + @soft_community.blogs << Blog.new(:name=>"Second blog") + @soft_community.save! + + SoftwareTabDataBlock.any_instance.stubs(:owner).returns(@soft_community) + end + + should "get its owner blogs" do + assert_equal @soft_community.blogs, SoftwareTabDataBlock.new.blogs + end + + should "actual_blog get the first blog if it is not defined" do + assert_equal @soft_community.blogs.first, SoftwareTabDataBlock.new.actual_blog + end + + should "actual_blog get the defined community blog" do + last_blog = @soft_community.blogs.last + soft_tab_data = create_software_tab_data_block(last_blog) + + assert_equal last_blog, soft_tab_data.actual_blog + end + + should "get the actual_blog posts" do + last_blog = @soft_community.blogs.last + soft_tab_data = create_software_tab_data_block(last_blog) + craete_sample_posts(last_blog, 2) + + assert_equal last_blog.posts.first.id, soft_tab_data.posts.first.id + assert_equal last_blog.posts.last.id, soft_tab_data.posts.last.id + end + + should "limit the number of posts" do + last_blog = @soft_community.blogs.last + soft_tab_data = create_software_tab_data_block(last_blog) + craete_sample_posts(last_blog, 6) + + assert_equal SoftwareTabDataBlock::TOTAL_POSTS_DYSPLAYED, soft_tab_data.posts.count + end + + private + + def create_software_tab_data_block blog + soft_tab_data = SoftwareTabDataBlock.new + soft_tab_data.displayed_blog = blog.id + soft_tab_data + end + + def craete_sample_posts blog, quantity=1 + quantity.times do |number| + TinyMceArticle.create! :name=>"Simple post #{number}", :body=>"Simple post #{number}", + :parent=> blog, :profile=>@soft_community + end + end +end diff --git a/src/noosfero-spb/software_communities/test/unit/softwares_block_test.rb b/src/noosfero-spb/software_communities/test/unit/softwares_block_test.rb new file mode 100644 index 0000000..44b5064 --- /dev/null +++ b/src/noosfero-spb/software_communities/test/unit/softwares_block_test.rb @@ -0,0 +1,43 @@ +require File.dirname(__FILE__) + '/../../../../test/test_helper' +require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' + +class SoftwaresBlockTest < ActiveSupport::TestCase + include PluginTestHelper + should 'inherit from ProfileListBlock' do + assert_kind_of ProfileListBlock, SoftwaresBlock.new + end + + should 'declare its default title' do + SoftwaresBlock.any_instance.stubs(:profile_count).returns(0) + assert_not_equal ProfileListBlock.new.default_title, SoftwaresBlock.new.default_title + end + + should 'describe itself' do + assert_not_equal ProfileListBlock.description, SoftwaresBlock.description + end + + should 'give empty footer on unsupported owner type' do + block = SoftwaresBlock.new + block.expects(:owner).returns(1) + assert_equal '', block.footer + end + + should 'list softwares' do + user = create_person("Jose_Augusto", + "jose_augusto@email.com", + "aaaaaaa", + "aaaaaaa", + "DF", + "Gama" + ) + + software_info = create_software_info("new software") + software_info.community.add_member(user) + + block = SoftwaresBlock.new + block.expects(:owner).at_least_once.returns(user) + + assert_equivalent [software_info.community], block.profiles + end + +end diff --git a/src/noosfero-spb/software_communities/views/_main_software_editor_extras.html.erb b/src/noosfero-spb/software_communities/views/_main_software_editor_extras.html.erb new file mode 100644 index 0000000..942256d --- /dev/null +++ b/src/noosfero-spb/software_communities/views/_main_software_editor_extras.html.erb @@ -0,0 +1,32 @@ +

    <%= _('Software Information') %>

    + +<%= label_tag("name", _('Name'), {:class => 'formlabel'}) %> + +
    + <%= context.profile.environment.default_hostname %>/ + <%= text_field_tag(:name, context.profile.software_info.community.name) %> +
    + +

    <%= _("Finality") %>

    +
    + <%= text_field_tag(:finality, context.profile.software_info.finality) %> +
    + +

    <%= _("Licenses") %>

    +
    + <%= select_tag(:id, options_for_select(LicenseHelper.getListLicenses.collect{|l| [l.version, l.id]}, :selected => context.profile.software_info.license_info.id), :onchange => "get_license_link('version')") %> +
    + +

    <%= _("License link") %>

    + <% LicenseHelper.getListLicenses.each do | license | %> + + <% end %> + + <%= context.profile.software_info.license_info.link %> +
    + +
    + <%= label_tag "repository_url", _("Link to Repository: ") %> + <%= text_field_tag(:reository_url) %> +
    + diff --git a/src/noosfero-spb/software_communities/views/blocks/_software_tab_blog.html.erb b/src/noosfero-spb/software_communities/views/blocks/_software_tab_blog.html.erb new file mode 100644 index 0000000..ec1f867 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/blocks/_software_tab_blog.html.erb @@ -0,0 +1,17 @@ +
    +
    + <% if block.posts.empty? %> +
    + <%= _("This community has no posts in its blog") %> +
    + <% else %> +
    + <%= list_posts(block.posts, format: "short+pic", paginate: false) %> +
    + +
    + <%= link_to _("Read more"), block.actual_blog.url %> +
    + <% end %> +
    +
    diff --git a/src/noosfero-spb/software_communities/views/blocks/categories_and_tags.html.erb b/src/noosfero-spb/software_communities/views/blocks/categories_and_tags.html.erb new file mode 100644 index 0000000..507ddbf --- /dev/null +++ b/src/noosfero-spb/software_communities/views/blocks/categories_and_tags.html.erb @@ -0,0 +1,19 @@ +<% if block.owner.categories.count > 0 %> +

    <%= _("Categories:") %>

    + +
    + <% block.owner.categories.each do |category| %> + <%= link_to category.name , category.path, :id => "select-category-1-link", :class => "select-subcategory-link", :target => "_blank" %> + <% end %> +
    +<% end %> + +<% if block.owner.tag_list.count > 0 %> +

    <%= _("Tags") %>

    + +
    + <% block.owner.tag_list.each do |tag| %> + <%= link_to tag , "#", :id => "select-category-1-link", :class => "select-subcategory-link"%> + <% end %> +
    +<% end %> \ No newline at end of file diff --git a/src/noosfero-spb/software_communities/views/blocks/categories_software.html.erb b/src/noosfero-spb/software_communities/views/blocks/categories_software.html.erb new file mode 100644 index 0000000..6e914de --- /dev/null +++ b/src/noosfero-spb/software_communities/views/blocks/categories_software.html.erb @@ -0,0 +1,22 @@ +
    +
    + +

    <%= _("See more Software") %>

    +
    + +
    +

    <%= _("Categories:") %>

    +
      + + <% categories.each do |category| %> + <% unless category.software_infos.count < 1 %> +
    • <%= link_to _("#{category.name}") + " (#{category.software_infos.count})", {:controller => :search, :action => :software_infos, :selected_categories_id => [category.id]} %>
    • + <% end %> + <% end %> +
    +
    + + +
    diff --git a/src/noosfero-spb/software_communities/views/blocks/download.html.erb b/src/noosfero-spb/software_communities/views/blocks/download.html.erb new file mode 100644 index 0000000..ffab889 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/blocks/download.html.erb @@ -0,0 +1,25 @@ +<% if block.owner.software_info.nil? %> + <%= _("This community needs a software to use this block") %> +<% else %> +

    <%= _("Download #{block.owner.software_info.community.name}") %>

    +
      + <% block.downloads.each_with_index do |download, index| %> +
    • +
      + <%= link_to :controller => 'software_communities_plugin_profile', :action=> 'download_file', :block=>block.id, :download_index=> index , title: _("Download the software") do %> + + <%= download[:size] %> + <% end %> +
      +
      + <%= _("#{download[:name]}") %> + <%= _("Platform:#{download[:software_description]}") %> + <%= link_to _("Minimum Requirements"), download[:minimum_requirements] %> +
      +
    • + <% end %> +
    +
    + <%= link_to _("License: #{block.owner.software_info.license_info.version}"), block.owner.software_info.license_info.link %> +
    +<% end %> diff --git a/src/noosfero-spb/software_communities/views/blocks/main_area_softwares.html.erb b/src/noosfero-spb/software_communities/views/blocks/main_area_softwares.html.erb new file mode 100644 index 0000000..155a021 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/blocks/main_area_softwares.html.erb @@ -0,0 +1,27 @@ +<%= block_title(block.title) %> +<% profiles.each do |profile| %> + <%= link_to profile.url do %> +
    +
    + + +
    +
    +

    <%=profile.name%>

    +
    +
    <%= profile.description %>
    +
    +
    + +
    +

    + <%= profile.software_info.finality %> +

    + + <%= _("See More") %> +
    +
    + <% end %> +<% end %> diff --git a/src/noosfero-spb/software_communities/views/blocks/repository.html.erb b/src/noosfero-spb/software_communities/views/blocks/repository.html.erb new file mode 100644 index 0000000..dd9817d --- /dev/null +++ b/src/noosfero-spb/software_communities/views/blocks/repository.html.erb @@ -0,0 +1,5 @@ +<% if block.owner.software_info.nil? %> + <%= _("This community needs a software to use this block") %> +<% else %> + <%= link_to _("Repository") , block.owner.software_info.repository_link, :id => "bt_repositorio", :target => "_blank" %> +<% end %> diff --git a/src/noosfero-spb/software_communities/views/blocks/search_catalog.html.erb b/src/noosfero-spb/software_communities/views/blocks/search_catalog.html.erb new file mode 100644 index 0000000..2ea3ffc --- /dev/null +++ b/src/noosfero-spb/software_communities/views/blocks/search_catalog.html.erb @@ -0,0 +1,11 @@ + diff --git a/src/noosfero-spb/software_communities/views/blocks/software_highlights.html.erb b/src/noosfero-spb/software_communities/views/blocks/software_highlights.html.erb new file mode 100644 index 0000000..fc1e650 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/blocks/software_highlights.html.erb @@ -0,0 +1,20 @@ +<%= render :file => 'blocks/highlights.html.erb', :locals => { :block => block } %> + + + +mais informações + +? + + diff --git a/src/noosfero-spb/software_communities/views/blocks/software_information.html.erb b/src/noosfero-spb/software_communities/views/blocks/software_information.html.erb new file mode 100644 index 0000000..dd82bea --- /dev/null +++ b/src/noosfero-spb/software_communities/views/blocks/software_information.html.erb @@ -0,0 +1,36 @@ +
    + +<% if block.owner.software_info.nil? %> + <%= _("This community needs a software to use this block") %> +<% else %> + + + + + +
    +
    +
    + + <%= link_to profile_image(block.owner, :big) +"\n", profile.url %> + + +
    +
    +
    +

    + <%= _("#{block.owner.software_info.acronym} - ") unless block.owner.software_info.acronym.blank? %> + <%= _("#{block.owner.name}") %> +

    + + <%= block.owner.software_info.finality %> + + + <%= @plugins.dispatch(:display_organization_average_rating, block.owner).collect { |content| instance_exec(&content) }.join("") %> +
    +<% end %> +
    diff --git a/src/noosfero-spb/software_communities/views/blocks/software_statistics.html.erb b/src/noosfero-spb/software_communities/views/blocks/software_statistics.html.erb new file mode 100644 index 0000000..b9f1cd1 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/blocks/software_statistics.html.erb @@ -0,0 +1,36 @@ +
    +
      +
    • + + + <%= pluralize(profile.hits, 'visita', 'visitas') %> + +
    • +
    • + + + <%= pluralize(total_downloads, 'download', 'downloads') %> + +
    • +
    • + + + <%= block.benefited_people.to_s + _(' benefited people*') %> + +
    • +
    • + + + + <%= number_to_currency(block.saved_resources, unit: 'R$ ', + separator: ',', delimiter: '.') %> + + <%= _(' saved resources*') %> + +
    • +
    + +
    + * <%= _("Data estimated by the software administrator.") %> +
    +
    diff --git a/src/noosfero-spb/software_communities/views/blocks/software_tab_data.html.erb b/src/noosfero-spb/software_communities/views/blocks/software_tab_data.html.erb new file mode 100644 index 0000000..3b0a1ce --- /dev/null +++ b/src/noosfero-spb/software_communities/views/blocks/software_tab_data.html.erb @@ -0,0 +1,13 @@ +<% if block.owner.software_info.nil? %> + <%= _("This community needs a software to use this block") %> +<% else %> +
    + <% tabs = [] %> + <% tabs << {:title => _("Discussions"), :id => 'discussions-tab', :content => ""} %> + <% tabs << {:title => _("Blog"), :id => 'blog-tab', :content => (render partial: "blocks/software_tab_blog", :locals => {block: block})} %> + <% tabs << {:title => _("Repository Feed"), :id => 'repository-feed-tab', :content => ""} %> + + <%= render_tabs(tabs) %> +
    +<% end %> + diff --git a/src/noosfero-spb/software_communities/views/blocks/wiki.html.erb b/src/noosfero-spb/software_communities/views/blocks/wiki.html.erb new file mode 100644 index 0000000..24cda6f --- /dev/null +++ b/src/noosfero-spb/software_communities/views/blocks/wiki.html.erb @@ -0,0 +1,6 @@ +<% if block.owner.software_info.nil? %> + <%= _("This community needs a software to use this block") %> +<% else %> + <%= link_to _("Wiki") , block.wiki_link, :id => "bt_wiki", :target => "_blank" %> +<% end %> + diff --git a/src/noosfero-spb/software_communities/views/box_organizer/_download_block.html.erb b/src/noosfero-spb/software_communities/views/box_organizer/_download_block.html.erb new file mode 100644 index 0000000..6a621ec --- /dev/null +++ b/src/noosfero-spb/software_communities/views/box_organizer/_download_block.html.erb @@ -0,0 +1,17 @@ +
    + + +
    + <% @block.downloads.each do |download| %> + <%= render :partial => 'download_list', :locals => {:download => download} %> + <% end %> +
    + + <%= link_to_function _('New link'), 'softwareDownload.addNewDonwload(); return false', :class => 'button icon-add with-text download-new-link-button' %> +
    diff --git a/src/noosfero-spb/software_communities/views/box_organizer/_download_list.html.erb b/src/noosfero-spb/software_communities/views/box_organizer/_download_list.html.erb new file mode 100644 index 0000000..1cbd524 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/box_organizer/_download_list.html.erb @@ -0,0 +1,10 @@ +
  • +
      +
    • <%= text_field_tag('block[downloads][][name]', download[:name], :class => "block_download_name") %>
    • +
    • <%= text_field_tag('block[downloads][][link]', download[:link], :class => "block_download_link") %>
    • +
    • <%= text_field_tag('block[downloads][][software_description]', download[:software_description], :class => "block_download_software_description") %>
    • +
    • <%= text_field_tag('block[downloads][][minimum_requirements]', download[:minimum_requirements], :class => "block_download_minimum_requirements") %>
    • +
    • <%= text_field_tag('block[downloads][][size]', download[:size], :class => "block_download_size") %>
    • +
    • <%= button_without_text(:delete, _('Delete'), "#" , { :onclick => 'softwareDownload.deleteDownload(this); return false', :class=>"delete-link-list-row" }) %>
    • +
    +
  • diff --git a/src/noosfero-spb/software_communities/views/box_organizer/_download_list_template.html.erb b/src/noosfero-spb/software_communities/views/box_organizer/_download_list_template.html.erb new file mode 100644 index 0000000..eb9e4cf --- /dev/null +++ b/src/noosfero-spb/software_communities/views/box_organizer/_download_list_template.html.erb @@ -0,0 +1,10 @@ +
  • +
      +
    • <%= text_field_tag('block[downloads][][name]', '', :class => "block_download_name") %>
    • +
    • <%= text_field_tag('block[downloads][][link]', '', :class => "block_download_link") %>
    • +
    • <%= text_field_tag('block[downloads][][software_description]', '', :class => "block_download_software_description") %>
    • +
    • <%= text_field_tag('block[downloads][][minimum_requirements]', '', :class => "block_download_minimum_requirements") %>
    • +
    • <%= text_field_tag('block[downloads][][size]', '', :class => "block_download_size") %>
    • +
    • <%= button_without_text(:delete, _('Delete'), "#" , { :onclick => 'softwareDownload.deleteDownload(this); return false', :class=>"delete-link-list-row" }) %>
    • +
    +
  • diff --git a/src/noosfero-spb/software_communities/views/box_organizer/_software_tab_data_block.html.erb b/src/noosfero-spb/software_communities/views/box_organizer/_software_tab_data_block.html.erb new file mode 100644 index 0000000..a4d5147 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/box_organizer/_software_tab_data_block.html.erb @@ -0,0 +1,15 @@ +
    + +<% if not @block.blogs.empty? %> + + +
    + + <%= select_tag 'block[displayed_blog]', options_from_collection_for_select(@block.blogs, :id, :name, @block.actual_blog.id) %> +<% else %> +
    +

    <%= _("This community has no blogs") %>

    +
    +<% end %> diff --git a/src/noosfero-spb/software_communities/views/box_organizer/_softwares_block.html.erb b/src/noosfero-spb/software_communities/views/box_organizer/_softwares_block.html.erb new file mode 100644 index 0000000..2a54c32 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/box_organizer/_softwares_block.html.erb @@ -0,0 +1,4 @@ +
    + <%= labelled_form_field _('Limit of items'), text_field(:block, :limit, :size => 3) %> + <%= labelled_form_field _('Software Type:'), select_tag('block[software_type]', options_for_select(["Public", "Generic", "All"], @block.software_type) )%> +
    diff --git a/src/noosfero-spb/software_communities/views/box_organizer/_statistic_block.html.erb b/src/noosfero-spb/software_communities/views/box_organizer/_statistic_block.html.erb new file mode 100644 index 0000000..48037c8 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/box_organizer/_statistic_block.html.erb @@ -0,0 +1,10 @@ +
    + <% suggestion_benefited_people = @block.owner.organization_ratings.collect{ |r| r.people_benefited.to_f }.inject(:+) || 0.0 %> + <% suggestion_saved_resources = @block.owner.organization_ratings.collect{ |r| r.saved_value.to_f }.inject(:+) || 0.0 %> + + <%= labelled_form_field _('Benefited People'), text_field(:block, :benefited_people) %> +

    <%= _("Portal suggested value: ") %> <%= "%d" % (suggestion_benefited_people) %>

    + <%= labelled_form_field _('Saved Resources'), text_field(:block, :saved_resources) %> +

    <%= _("Portal suggested value: ") %> <%= "R$%.2f" % (suggestion_saved_resources) %>

    +
    + diff --git a/src/noosfero-spb/software_communities/views/box_organizer/_wiki_block.html.erb b/src/noosfero-spb/software_communities/views/box_organizer/_wiki_block.html.erb new file mode 100644 index 0000000..489b85d --- /dev/null +++ b/src/noosfero-spb/software_communities/views/box_organizer/_wiki_block.html.erb @@ -0,0 +1,10 @@ +
    + + +
    + <%= text_field_tag "block[wiki_link]", value=@block.wiki_link %> +
    +
    + diff --git a/src/noosfero-spb/software_communities/views/comments_extra_fields.html.erb b/src/noosfero-spb/software_communities/views/comments_extra_fields.html.erb new file mode 100644 index 0000000..f50992a --- /dev/null +++ b/src/noosfero-spb/software_communities/views/comments_extra_fields.html.erb @@ -0,0 +1,21 @@ +
    + + <%= _("Additional informations") %> + + + +
    + +
    +
    + <%= label_tag "comments_people_benefited", _("Number of Beneficiaries")%> + + <%= text_field_tag "organization_rating[people_benefited]", "" %> +
    + +
    + <%= label_tag "comments_saved_value", _("Saved resources")%> + + <%= text_field_tag "organization_rating[saved_value]", "", :placeholder=>"R$"%> +
    +
    diff --git a/src/noosfero-spb/software_communities/views/environment_design b/src/noosfero-spb/software_communities/views/environment_design new file mode 120000 index 0000000..a75d184 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/environment_design @@ -0,0 +1 @@ +box_organizer \ No newline at end of file diff --git a/src/noosfero-spb/software_communities/views/organization_ratings_extra_fields_show_data.html.erb b/src/noosfero-spb/software_communities/views/organization_ratings_extra_fields_show_data.html.erb new file mode 100644 index 0000000..0e57615 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/organization_ratings_extra_fields_show_data.html.erb @@ -0,0 +1,10 @@ +
    +
    + <%=_("Benefited People")%> : <%= user_rating.people_benefited unless user_rating.nil? %> +
    + +
    + <%=_("Saved Resources")%> : <%= user_rating.saved_value unless user_rating.nil? %> +
    +
    + diff --git a/src/noosfero-spb/software_communities/views/profile/_profile_members_list.html.erb b/src/noosfero-spb/software_communities/views/profile/_profile_members_list.html.erb new file mode 100644 index 0000000..0e6c700 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/profile/_profile_members_list.html.erb @@ -0,0 +1,14 @@ +
    + <%= label_tag("sort-#{role}", _("Sort by:")) %> + <%= select_tag("sort-#{role}", + options_for_select([ + [_("Name A-Z"), 'asc'], + [_("Name Z-A"), 'desc'], + ], :selected=>params[:sort]) + ) %> +
    +
      + <% users.each do |u| %> + <%= profile_image_link(u) %> + <% end %> +
    diff --git a/src/noosfero-spb/software_communities/views/profile/_software_tab.html.erb b/src/noosfero-spb/software_communities/views/profile/_software_tab.html.erb new file mode 100644 index 0000000..805c656 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/profile/_software_tab.html.erb @@ -0,0 +1,138 @@ + + + + + + <%= display_mpog_field(_('Name:'), profile, :name, true) %> + <%= content_tag('tr', content_tag('td', _("Adherent to e_mag:")) + content_tag('td', profile.software_info.e_mag ? _("Yes") : _("No"))) %> + <%= content_tag('tr', content_tag('td', _("Adherent to icp_brasil:")) + content_tag('td', profile.software_info.icp_brasil ? _("Yes") : _("No"))) %> + <%= content_tag('tr', content_tag('td', _("Adherent to e_ping:")) + content_tag('td', profile.software_info.e_ping ? _("Yes") : _("No"))) %> + <%= content_tag('tr', content_tag('td', _("Adherent to e_arq:")) + content_tag('td', profile.software_info.e_arq ? _("Yes") : _("No"))) %> + <%= content_tag('tr', content_tag('td', _("Internacionalizable:")) + content_tag('td', profile.software_info.intern ? _("Yes") : _("No"))) %> + <%= display_mpog_field(_('Operating Platform:'), profile.software_info, :operating_platform, true) %> + <%= display_mpog_field(_('Demonstration URL:'), profile.software_info, :demonstration_url, true) %> + <%= display_mpog_field(_('Short Name:'), profile.software_info, :acronym, true) %> + <%= display_mpog_field(_('Objectives:'), profile.software_info, :objectives, true) %> + <%= display_mpog_field(_('Features:'), profile.software_info, :features, true) %> + + <%= content_tag('tr', content_tag('td', _("License"))) %> + <%= display_mpog_field(_('Version:'), profile.software_info.license_info, :version, true) %> + <%= display_mpog_field(_('Link:'), profile.software_info.license_info, :link, true) %> +
    <%= _('Software Information')%>
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    <%= _('Show Libraries') %> + <%= _('Hide Libraries') %> +
    + + + + + + + + + + + +
    <%= _("Libraries") %>
    + <% libraries = profile.software_info.libraries %> + <% LibraryHelper.libraries_as_tables(libraries, true).each do |tab| %> + <%= tab.call %> + <%end%> +
    +
    <%= _('Show Database') %> + <%= _('Hide Database') %> +
    + + + + + + + + + + + +
    <%= _("Software Databases") %>
    + <% databases = profile.software_info.software_databases %> + <% DatabaseHelper.database_as_tables(databases, true).each do |tab| %> + <%= tab.call %> + <%end%> +
    +
    <%= _('Show Languages') %> + <%= _('Hide Languages') %> +
    + + + + + + + + + + + +
    <%= _("Software Languages") %>
    + <% languages = profile.software_info.software_languages %> + <% SoftwareLanguageHelper.language_as_tables(languages, true).each do |tab| %> + <%= tab.call %> + <%end%> +
    +
    <%= _('Show Operating Systems') %> + <%= _('Hide Operating Systems') %> +
    + + + + + + + + + + + +
    <%= _("Operating System") %>
    + <% operating_systems = profile.software_info.operating_systems %> + <% OperatingSystemHelper.operating_system_as_tables(operating_systems, true).each do |tab| %> + <%= tab.call %> + <%end%> +
    +
    diff --git a/src/noosfero-spb/software_communities/views/profile/index.html.erb b/src/noosfero-spb/software_communities/views/profile/index.html.erb new file mode 100644 index 0000000..6e2d6c2 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/profile/index.html.erb @@ -0,0 +1,26 @@ +

    <%= h profile.name %>

    + +<% if @action %> + <%= render :partial => 'private_profile' %> +<% else %> + <% unless profile.description.blank? %> +
    + <%= profile.description %> +
    + <% end %> +<% end %> + +
    + <%= render "blocks/profile_info_actions/join_leave_community" if profile.class == "Community" %> + <% if !user.nil? && user.has_permission?('edit_profile', profile) %> +
    + <%= button :control_panel, _('Control Panel'), profile.admin_url %> +
    + <% end %> +
    + +<% if @profile.public? || (logged_in? && current_person.follows?(@profile)) %> + + +
    +<% end %> diff --git a/src/noosfero-spb/software_communities/views/profile/members.html.erb b/src/noosfero-spb/software_communities/views/profile/members.html.erb new file mode 100644 index 0000000..2b1280b --- /dev/null +++ b/src/noosfero-spb/software_communities/views/profile/members.html.erb @@ -0,0 +1,58 @@ +
    + +
    +

    <%= _("Members (%d)") % @profile_members.total_entries %>

    +

    <%= profile.name %>

    + <%= render "blocks/profile_info_actions/community" %> +
    + +<% cache_timeout(profile.members_cache_key(params), 4.hours) do %> +
    + <% tabs = [] %> + + <% div_members = content_tag :div, :class => "profile-members" do + render :partial => 'profile_members_list', + :locals => { + :users => @profile_members, + :role => "members" + } + end %> + + <% tabs << {:title => _("%d Members") % @profile_members.total_entries, + :id => "members-tab", + :content => div_members + } %> + + <% div_admins = content_tag :div, :class => "profile-admins" do + render :partial => 'profile_members_list', + :locals => { + :users => @profile_admins, + :role => "admins" + } + end %> + + <% tabs << {:title => _("%d Administrators") % @profile_admins.total_entries, + :id => "admins-tab", + :content => div_admins + } %> + + <%= render_tabs(tabs) %> +
    +<% end %> + +<% button_bar do %> + <%= button :back, _('Go back'), { :controller => 'profile' } %> + <% if profile.community? and user %> + <% if user.has_permission?(:invite_members, profile) %> + <%= button :person, _('Invite people to join'), :controller => 'invite', :action => 'invite_friends' %> + <% end %> + <% if user.has_permission?(:send_mail_to_members, profile) %> + <%= button :send, _('Send e-mail to members'), :controller => 'profile', :action => 'send_mail' %> + <% end %> + <% end %> +<% end %> + +<%= hidden_field_tag "profile_url", @profile_members_url %> +
    + +<%= javascript_include_tag "members_page.js" %> diff --git a/src/noosfero-spb/software_communities/views/profile_design b/src/noosfero-spb/software_communities/views/profile_design new file mode 120000 index 0000000..a75d184 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/profile_design @@ -0,0 +1 @@ +box_organizer \ No newline at end of file diff --git a/src/noosfero-spb/software_communities/views/profile_editor/_first_edit_software_community_extras.html.erb b/src/noosfero-spb/software_communities/views/profile_editor/_first_edit_software_community_extras.html.erb new file mode 100644 index 0000000..86ed273 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/profile_editor/_first_edit_software_community_extras.html.erb @@ -0,0 +1,9 @@ +
    +
    > +

    <%= _("Step 1 - Software Creation")%>

    +
    + +
    > +

    <%= _("Step 2 - Community Settings")%>

    +
    +
    diff --git a/src/noosfero-spb/software_communities/views/profile_editor/_software_community.html.erb b/src/noosfero-spb/software_communities/views/profile_editor/_software_community.html.erb new file mode 100644 index 0000000..f4d0281 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/profile_editor/_software_community.html.erb @@ -0,0 +1,70 @@ +

    <%= _('General information') %>

    + + <%= required_fields_message %> + + <%= @plugins.dispatch(:profile_info_extra_contents).collect { |content| instance_exec(&content) }.join("") %> + +<% if @environment.enabled?('enable_organization_url_change') %> + +<% end %> + +<% if @environment.enabled?('enable_organization_url_change') %> + + + <%= hidden_field_tag 'old_profile_identifier', @profile.identifier %> +
    + <%= required labelled_form_field( _('Address'), + content_tag('code', + url_for(profile.url).gsub(/#{profile.identifier}$/, '') + + text_field(:profile_data, :identifier, :onchange => "warn_value_change()", :size => 25) + ) + + content_tag('div', + content_tag('strong', _('WARNING!')) + ' ' + + _("You are about to change the address, and this will break external links to the homepage or to content inside it. Do you really want to change?") + + content_tag('div', + button_to_function(:ok, _("Yes"), "confirm_change()") + ' ' + + button_to_function(:cancel, _('No'), 'no_change()') + ), + :id => 'identifier-change-confirmation', + :class => 'change-confirmation', + :style => 'display: none;' + ) + ) + %> +
    +<% end %> + +<%= render :partial => 'shared/organization_custom_fields', :locals => { :f => f, :object_name => 'profile_data', :profile => @profile } %> + +<%= labelled_check_box(_('Enable "contact us"'), 'profile_data[enable_contact_us]', "1", @profile.enable_contact_us) if @profile.enterprise? %> + +<%= render :partial => 'moderation', :locals => { :profile => @profile } %> + +<% if profile.enterprise? && profile.environment.enabled?('products_for_enterprises') %> +

    <%=_('Products/Services catalog')%>

    + <%= labelled_form_field(_('Number of products/services displayed per page on catalog'), text_field(:profile_data, :products_per_catalog_page, :size => 3)) %> +<% end %> diff --git a/src/noosfero-spb/software_communities/views/profile_editor/edit_software_community.html.erb b/src/noosfero-spb/software_communities/views/profile_editor/edit_software_community.html.erb new file mode 100644 index 0000000..5c181b8 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/profile_editor/edit_software_community.html.erb @@ -0,0 +1,90 @@ + +<%= render :partial => 'first_edit_software_community_extras', :locals => {:class_step_one => "another-step", :class_step_two => "current-step"} if @first_edit %> + +

    <%= _('Configure Software Community') %>

    + +
    + + <%= _('Set the basic settings of the software associated community') %> + +
    + +<%= error_messages_for :profile_data %> + +<%= labelled_form_for :profile_data, :html => { :id => 'profile-data', :multipart => true } do |f| %> + + <% if environment.admins.include?(user) %> +
    + <%= labelled_check_box(_('This profile is a template'), 'profile_data[is_template]', true, @profile.is_template) %> +
    + <% end %> + + <%= render :partial => 'software_community', :locals => { :f => f } %> + +

    <%= _('Privacy options') %>

    + + <% if profile.person? %> +
    + <%= labelled_radio_button _('Public — show my contents to all internet users'), 'profile_data[public_profile]', true, @profile.public_profile? %> +
    +
    + <%= labelled_radio_button _('Private — show my contents only to friends'), 'profile_data[public_profile]', false, !@profile.public_profile? %> +
    + <% else %> +
    + <%= labelled_check_box _("Secret — hide the community and all its contents for non members and other people can't join this community unless they are invited to."), 'profile_data[secret]', true, profile.secret, :class => "profile-secret-box" %> +
    +
    + <%= labelled_radio_button _('Public — show content of this group to all internet users'), 'profile_data[public_profile]', true, @profile.public_profile? %> +
    +
    + <%= labelled_radio_button _('Private — show content of this group only to members'), 'profile_data[public_profile]', false, !@profile.public_profile? %> +
    + <% end %> + + <% if environment.enabled?('allow_change_of_redirection_after_login') %> +

    <%= _('Page to redirect after login') %>

    + <%= select 'profile_data', 'redirection_after_login', Environment.login_redirection_options.map{|key,value|[value,key]}, { :selected => @profile.preferred_login_redirection} %> + <% end %> + +

    <%= _('Translations') %>

    + <%= labelled_check_box( + _('Automaticaly redirect the visitor to the article translated to his/her language'), + 'profile_data[redirect_l10n]', true, @profile.redirect_l10n + )%> + +

    <%= _('Suggestions') %>

    + <%= labelled_check_box( + _('Send me relationship suggestions by email'), + 'profile_data[email_suggestions]', true, @profile.email_suggestions + )%> + + <%= + @plugins.dispatch(:profile_editor_extras).map do |content| + content.kind_of?(Proc) ? self.instance_exec(&content) : content + end.join("\n") + %> + + <%= select_categories(:profile_data, _('Software Categories'), 2) %> + + <% button_bar do %> + <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %> + + <% unless @first_edit %> + <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %> + <% end %> + <% end %> + + <% if user && user.has_permission?('destroy_profile', profile) && !@first_edit %> + <% button_bar(:id => 'delete-profile') do %> + <%= button(:remove, _('Delete software and community'), {:action => :destroy_profile}) %> + <% if environment.admins.include?(current_person) %> + <% if profile.visible? %> + <%= button(:remove, _('Deactivate software and community'), {:action => :deactivate_profile, :id=>profile.id}, :id=>'deactivate_profile_button', :data => {:confirm=>_("Are you sure you want to deactivate this profile?")}) %> + <% else %> + <%= button(:add, _('Activate software and community'), {:action => :activate_profile, :id=>profile.id}, :data => {:confirm=>_("Are you sure you want to deactivate this profile?")}) %> + <% end %> + <% end %> + <% end %> + <% end %> +<% end %> diff --git a/src/noosfero-spb/software_communities/views/search/_catalog_filter.html.erb b/src/noosfero-spb/software_communities/views/search/_catalog_filter.html.erb new file mode 100644 index 0000000..e6a9dd7 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/search/_catalog_filter.html.erb @@ -0,0 +1,20 @@ +
    + +
    +

    <%= _("Categories") %>

    +
    +
      + <% @categories.each do |category| %> +
    • + <%= check_box_tag("selected_categories_id[]", category.id, @selected_categories_id.include?(category.id), :class => "categories-catalog", @enabled_check_box[category] => "true") %> + <%= _("#{category.name}") %> +
    • + <% end %> +
    +
    +
    +
    <%= _("More options") %>
    +
    + <%= button_tag _("Clean up"), :id => "cleanup-filter-catalg", :type => "button" %> + <%= button_tag _("Close"), :id => "close-filter-catalog", :type => "button" %> +
    diff --git a/src/noosfero-spb/software_communities/views/search/_catalog_result_list.html.erb b/src/noosfero-spb/software_communities/views/search/_catalog_result_list.html.erb new file mode 100644 index 0000000..976a13d --- /dev/null +++ b/src/noosfero-spb/software_communities/views/search/_catalog_result_list.html.erb @@ -0,0 +1,51 @@ +
    + <% @assets.each do |name| %> + <% search = @searches[name] %> + + + + <% if !search[:results].blank? %> + + <% if multiple_search?(@searches) %> +

    <%= @names[name] %>

    + <% if search[:results].total_entries > SearchController::MULTIPLE_SEARCH_LIMIT %> + <%= link_to(_("see all (%d)") % search[:results].total_entries, params.merge(:action => name), :class => 'see-more' ) %> + <% end %> + <% end %> + + <% display = display_filter(name, params[:display]) %> + +
    +
      + <% search[:results].each do |hit| %> + <% partial = partial_for_class(hit.class, display) %> + <% variable_name = partial.gsub("#{display}_", '').to_sym %> + <%= render :partial => partial, :locals => {variable_name => hit} %> + <% end %> +
    +
    + <% else %> + <% if multiple_search? %> +

    <%= @names[name] %>

    + <% end %> + +
    + + + + + +
    + <% @selected_categories.each do |category| %> +
    + <%= link_to _("#{category.name}") + " (#{category.software_infos.count})", {:controller => :search, :action => :software_infos, :selected_categories_id => [category.id]} %> + <% end %> +
    + + <% end %> + <% end %> + +
    + + <%= add_zoom_to_images %> +
    diff --git a/src/noosfero-spb/software_communities/views/search/_full_community.html.erb b/src/noosfero-spb/software_communities/views/search/_full_community.html.erb new file mode 100644 index 0000000..23e2b14 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/search/_full_community.html.erb @@ -0,0 +1,53 @@ +<% software = community.software_info %> +
  • +
    + <%= profile_image_link community, :portrait, 'div', community.send(@order + '_label') + show_date(community.created_at) %> +
    + +
    + +
    + + <% link_name = software.acronym.blank? ? community.name : "#{software.acronym} - #{community.name}" %> +

    + <%= link_to_homepage(link_name, community.identifier) %> +

    +
    + + <% body_stripped = strip_tags(software.finality) %> + <%= excerpt(body_stripped, body_stripped.first(3), 200) if body_stripped %> + +
    + +
    + +
    + + + <%= _("Software Categories") %>: + + + + <% if !community.categories.empty? %> +
      + <% community.categories.each do |category| %> +
    • + <%= link_to _("#{category.name}"), { + :controller => :search, + :action => :software_infos, + :selected_categories_id => [category.id], + :software_type => params[:software_type] + } %> +
    • + <% end %> +
    + <% else %> + + <%= _("This software doesn't have categories") %> + + <% end %> +
    +
    + +
    +
  • diff --git a/src/noosfero-spb/software_communities/views/search/_software_search_form.html.erb b/src/noosfero-spb/software_communities/views/search/_software_search_form.html.erb new file mode 100644 index 0000000..f400c66 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/search/_software_search_form.html.erb @@ -0,0 +1,67 @@ +
    +
    +

    <%= _("Search Public Software Catalog") %>

    + + <%= form_tag( { :controller => 'search', :action => @asset ? @asset : 'index', :asset => nil, :category_path => ( @category ? @category.path : nil ) }, + :method => 'get') do %> + +
    +
    + + <%= hidden_field_tag :display, params[:display] %> + <%= hidden_field_tag :filter, params[:filter] %> + + <%= labelled_radio_button _('Public Software'), :software_type, 'public_software', @public_software_selected, :id => "public_software_radio_button", :class => "project-software" %> + ? + + + <%= labelled_radio_button _('All'), :software_type, 'all', @all_selected, :id => "all_radio_button", :class => "project-software" %> + ? + + +
    + + <%= text_field_tag 'query', @query, :id => 'search-input', :size => 50, :placeholder=>_("Type words about the software you're looking for (the search begins after 3 characters)") %> + + + <%= submit_button(:search, _('Filter')) %> +
    + <%= render :partial => 'search_form_extra_fields' %> + <%= render :partial => 'catalog_filter' %> + <% end %> +
    + +
    +
    + <%= "#{@software_count} Software(s)" %> +
    + +
    +
    + Show: + <%= select_tag("software_display", + options_for_select(['15', '30', '90', 'All'], :selected=>params[:display]) + ) %> +
    + +
    + Sort by: + <%= select_tag("sort", + options_for_select( + [ + [_("Name A-Z"), 'asc'], + [_("Name Z-A"), 'desc'], + [_("Relevance"), 'relevance'] + ], :selected=>params[:sort]) + ) %> +
    +
    +
    +
    + +<% if @empty_query %> + <% hint = environment.search_hints[@asset] %> + <% if hint and !hint.blank? %> +
    <%= hint %>
    + <% end %> +<% end %> diff --git a/src/noosfero-spb/software_communities/views/search/software_infos.html.erb b/src/noosfero-spb/software_communities/views/search/software_infos.html.erb new file mode 100644 index 0000000..c68f6fc --- /dev/null +++ b/src/noosfero-spb/software_communities/views/search/software_infos.html.erb @@ -0,0 +1,21 @@ +

    Catálogo de Software Público

    + +
    + <%= search_page_title( @titles[@asset], @category ) %> + + <%= render :partial => 'software_search_form', :locals => { :hint => _("Type words about the %s you're looking for") % @asset.to_s.singularize } %> + + <% if @asset == :product %> + <%= javascript_tag do %> + jQuery('.search-product-price-details').altBeautify(); + <% end %> + <% end %> +
    + +<%= render partial:"catalog_result_list" %> + +
    + <% if params[:display] != 'map' %> + <%= pagination_links @searches[@asset][:results] %> + <% end %> +
    diff --git a/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/_database_fields.html.erb b/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/_database_fields.html.erb new file mode 100644 index 0000000..e0b994e --- /dev/null +++ b/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/_database_fields.html.erb @@ -0,0 +1,12 @@ +<%= fields_for :database_description, @database_description do |db| %> + +
    + <% database = [] if database.blank? %> + <% DatabaseHelper.database_as_tables(database).each do |tab| %> + <%= tab.call %> + <%end%> +
    + + +<%= link_to _('New Database'), "#", :class=>"button icon-add with-text new-dynamic-table dynamic-databases"%> +<% end %> diff --git a/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/_language_fields.html.erb b/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/_language_fields.html.erb new file mode 100644 index 0000000..a7d31a1 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/_language_fields.html.erb @@ -0,0 +1,12 @@ +<%= fields_for :software_language, @software_language do |lng| %> + +
    + <% languages = [] if languages.blank? %> + <% SoftwareLanguageHelper.language_as_tables(languages).each do |tab| %> + <%= tab.call %> + <%end%> +
    + + +<%= link_to _('New language'), "#", :class=>"button icon-add with-text new-dynamic-table dynamic-languages"%> +<% end %> \ No newline at end of file diff --git a/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/_library_fields.html.erb b/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/_library_fields.html.erb new file mode 100644 index 0000000..332654b --- /dev/null +++ b/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/_library_fields.html.erb @@ -0,0 +1,12 @@ +<%= fields_for :library ,@library do |lib| %> + +
    + <% libraries = [] if libraries.blank? %> + <% LibraryHelper.libraries_as_tables(libraries).each do |tab| %> + <%= tab.call %> + <% end %> +
    + + +<%= link_to _('New Library'), "#", :class=>"button icon-add with-text new-dynamic-table dynamic-libraries"%> +<% end %> diff --git a/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/_license_info_fields.html.erb b/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/_license_info_fields.html.erb new file mode 100644 index 0000000..3cde616 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/_license_info_fields.html.erb @@ -0,0 +1,14 @@ +<% LicenseHelper.getListLicenses.each do | license | %> + +<% end %> + +<%= text_field_tag "license_info[version]", license_version, :id=>"license_info_version", :class=>"license_info_version", :placeholder=>_('Autocomplete field, type some license') %> +<%= hidden_field_tag "license[license_infos_id]", license_id, :id=>"license_info_id", :class=>"license_info_id", :data => {:label=>license_version} %> + +<%= _("Read license") %> + +
    + <%= labelled_text_field "Licence version", "license[version]", another_version, :id=>"licence_version" %> +
    + <%= labelled_text_field "Licence link", "license[link]", another_link, :id=>"licence_link" %> +
    diff --git a/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb b/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb new file mode 100644 index 0000000..a40b62d --- /dev/null +++ b/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb @@ -0,0 +1,47 @@ + +
    > + <%= label_tag("community[name]", _('Name'), {:class => 'formlabel mandatory'}) %> + <%= text_field_tag("community[name]", @profile.name, :id => 'community_name_id') %> +
    + +
    > + <%= label_tag("software[acronym]", _('Short Name'), {:class => 'formlabel mandatory'}) %> + <%= text_field_tag("software[acronym]", @profile.software_info.acronym, :id => 'software_acronym_id', :maxlength=>"10") %> +
    + +
    > +
    + <%= label_tag("software[finality]", _('Finality'), {:class => 'formlabel mandatory'}) %> + <%= text_area_tag "software[finality]", @profile.software_info.finality, :placeholder => _("What is the software for?"), :maxlength => 120 %> +
    +
    + +
    + +
    +
    + <%= f.fields_for :image_builder, @profile.image do |i| %> + <%= file_field_or_thumbnail(_('Image:'), @profile.image, i) %><%= _("Max size: %s (.jpg, .gif, .png)")% Image.max_size.to_humanreadable %> + <% end %> +
    + +
    > +
    + + <%= render :partial => "license_info_fields", :locals => { + :license_version => @license_version, + :license_id => @license_id, + :another_version => @another_license_version, + :another_link => @another_license_link + } %> +
    +
    + +
    + <%= label_tag("software[repository_link]", _('Link to Repository: '), {:class => 'formlabel'}) %> + <%= text_field_tag("software[repository_link]", @profile.software_info.repository_link, :class => "improve_input_size", :id => "software-info-repository-link") %> +
    diff --git a/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/_operating_system_fields.html.erb b/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/_operating_system_fields.html.erb new file mode 100644 index 0000000..7585db5 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/_operating_system_fields.html.erb @@ -0,0 +1,12 @@ +<%= fields_for :operating_systems ,@operating_systems do |lib| %> + +
    + <% operating_systems_fields = [] if operating_systems_fields.nil? %> + <% OperatingSystemHelper.operating_system_as_tables(operating_systems_fields).each do |tab| %> + <%= tab.call %> + <% end %> +
    + + +<%= link_to _('New Operating System'), "#", :class=>"button icon-add with-text new-dynamic-table dynamic-operating_systems"%> +<% end %> diff --git a/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb b/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb new file mode 100644 index 0000000..1f3466c --- /dev/null +++ b/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb @@ -0,0 +1,102 @@ +
    + <% if @disabled_public_software_field == true %> + <%= check_box_tag("software[public_software]", "true", @software_info.public_software?, :disabled => "disabled") %> + <%= label_tag _("Public Software"), _("Public software"), :class => "public_software_disabled" %> + <% else %> + <%= check_box_tag("software[public_software]", "true", @software_info.public_software?) %> + <%= label_tag _("Public Software"), _("Public software"), :class => "public_software_enabled" %> + <% end %> +
    +

    <%= _("Public Software") %>

    +
    + <%= label_tag _("Adherent to e-PING ?") %> + + <%= label_tag "e_ping_true", "Yes" %> + <%= radio_button_tag("software[e_ping]", true, @software_info.e_ping)%> + <%= label_tag "e_ping_false", "No"%> + <%= radio_button_tag("software[e_ping]", false, !@software_info.e_ping)%> +
    + +
    + <%= label_tag _("Adherent to e-MAG ?") %> + + <%= label_tag "e_mag_true", "Yes"%> + <%= radio_button_tag("software[e_mag]", true, @software_info.e_mag)%> + <%= label_tag "e_mag_false", "No"%> + <%= radio_button_tag("software[e_mag]", false, !@software_info.e_mag)%> +
    + +
    + <%= label_tag _("Adherent to ICP-Brasil ?") %> + + <%= label_tag "icp_brasil_true", "Yes"%> + <%= radio_button_tag("software[icp_brasil]", true, @software_info.icp_brasil)%> + <%= label_tag "icp_brasil_false", "No"%> + <%= radio_button_tag("software[icp_brasil]", false, !@software_info.icp_brasil)%> +
    + +
    + <%= label_tag _("Adherent to e-ARQ ?") %> + + <%= label_tag "e_arq_true", "Yes"%> + <%= radio_button_tag("software[e_arq]", true, @software_info.e_arq)%> + <%= label_tag "e_arq_false", "No"%> + <%= radio_button_tag("software[e_arq]", false, !@software_info.e_arq)%> +
    + +
    + <%= label_tag _("Internacionalizable ?") %> + + <%= label_tag "intern_true", "Yes" %> + <%= radio_button_tag("software[intern]", true, @software_info.intern)%> + <%= label_tag "intern_false", "No"%> + <%= radio_button_tag("software[intern]", false, !@software_info.intern)%> +
    +
    +
    + +
    +

    <%= _("Operating Platform") %>

    + <%= text_area_tag "software[operating_platform]", @software_info.operating_platform, :cols => 40, :rows => 5%> +
    + +
    +

    <%= _("Features") %>

    + <%= text_area_tag "software[features]", @software_info.features, :maxlength=>"4000", :cols => 40, :rows => 5%> +
    + +
    +

    <%= _("Demonstration url") %>

    + <%= text_field_tag("software[demonstration_url]", @software_info.demonstration_url) %> +
    + +
    +

    <%= _("Libraries") %>

    + + <%= render :partial => 'library_fields', :locals => {:object_name => 'community', :profile => @community, :libraries => @list_libraries } %> +
    + +
    + +
    +

    <%= _("Operating Systems") %>

    + + <%= render :partial => 'operating_system_fields', :locals => {:object_name => 'community', :profile => @community, :operating_systems_fields => @list_operating_systems} %> +
    +
    + +
    +
    +

    <%= _("Programming languages") %>

    + + <%= render :partial => 'language_fields', :locals => { :object_name => 'community', :profile => @community, :languages => @list_languages } %> +
    + +
    +
    +

    <%= _("Databases") %>

    + + <%= render :partial => 'database_fields', :locals => {:object_name => 'community', :profile => @community, :database => @list_databases } %> +
    + +
    diff --git a/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb b/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb new file mode 100644 index 0000000..0b25696 --- /dev/null +++ b/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb @@ -0,0 +1,22 @@ +

    <%= _('Edit Software') %>

    + +<% tabs = [] %> + +<%= error_messages_for :software_info, :community %> + +<%= labelled_form_for :community, :html => { :multipart => true, :id => 'edit-form' } do |f| %> + + <% tabs << {:title => _("Main Information"), :id => 'basic-info', + :content => (render :partial => 'main_software_editor_extras', :locals => {:f => f})} %> + + <% tabs << {:title => _("Specifications"), :id => 'especific-info', + :content => (render :partial => 'public_software_info')} %> + + <%= render_tabs(tabs) %> + + <% button_bar do %> + <%= submit_button(:save, _('Save')) %> + <%= submit_button(:save, _('Save and Configure Community')) %> + <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %> + <% end %> +<% end %> diff --git a/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb b/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb new file mode 100644 index 0000000..ad9795d --- /dev/null +++ b/src/noosfero-spb/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb @@ -0,0 +1,103 @@ + + +<%= render :partial => 'profile_editor/first_edit_software_community_extras', :locals => {:class_step_one => "current-step", :class_step_two => "another-step"} %> + +

    <%= _('Creating new software') %>

    + +
    + + <%= _('Enter the basic information about the software.
    + You can add the details after you create it.') %> +
    +
    + +<% if environment.enabled?('admin_must_approve_new_communities') %> +
    + <%= _("Note that the creation of communities in this environment is restricted. Your request to create this new community will be sent to %{environment} administrators and will be approved or rejected according to their methods and criteria.") % { :environment => environment.name }%> +
    +<%end %> + +<% unless @errors.blank? %> +
    +

    <%= _("Can`t create new software: #{@errors.length} errors") %>

    +
      + <% @errors.each do |error| %> +
    • <%= error %>
    • + <% end %> +
    +
    +<% end %> + +
    + <%= labelled_form_for :community, :html => { :multipart => true } do |f| %> + + <%= required_fields_message %> + +
    > + <%= label("name", _('Name'), {:class => 'formlabel mandatory'}) %> + <%= required text_field(:community, :name, :size => 30, :maxlength => 100, :id => 'community_name_id') %> +
    + +
    +
    + +
    > + <%= label("domain", _('Domain'), {:class => "formlabel mandatory"}) %> +
    + + <%= environment.default_hostname %>/ + <%= required text_field(:community, :identifier, :size => 30, :maxlength => 100, :id => 'community-identifier') %> +
    +
    + +
    > + <%= fields_for @software_info do |swf| %> +
    + <%= swf.label("finality" ,_("Finality"), :class=>"formlabel mandatory") %> + <%= required swf.text_area(:finality, :placeholder => _("What is the software for?"), :maxlength => 120) %> +
    + <% end %> +
    + +
    + +
    +
    + <%= f.fields_for :image_builder, @community.image do |i| %> + <%= file_field_or_thumbnail(_('Image:'), @community.image, i) %><%= _("Max size: %s (.jpg, .gif, .png)")% Image.max_size.to_humanreadable %> + <% end %> +
    + +
    > +
    + + <%= render :partial => "license_info_fields", :locals => { + :license_version => "", + :license_id => "", + :another_version=>"", + :another_link=>"" + } %> +
    +
    + + <%= fields_for @software_info do |swf| %> +
    + <%= swf.label "repository_url", _("Link to Repository: "), :class => "formlabel"%> + <%= swf.text_field :repository_link, :class => "improve_input_size", :id => "software-info-repository-link" %> +
    + <% end %> + + <%= hidden_field_tag('back_to', @back_to) %> + + <% button_bar do %> + <%= submit_button(:save, _('Create')) %> + <%= button(:cancel, _('Cancel'), @back_to ) %> + <% end %> + + <% end %> + +
    diff --git a/src/noosfero-spb/software_communities/views/software_editor_extras.rhtml b/src/noosfero-spb/software_communities/views/software_editor_extras.rhtml new file mode 100644 index 0000000..c4a119e --- /dev/null +++ b/src/noosfero-spb/software_communities/views/software_editor_extras.rhtml @@ -0,0 +1,35 @@ +

    <%= _('Software Information') %>

    + +
    + <%= _("Adherent to e-PING?") %> + <%= labelled_radio_button(_('Sim'), 'software_info[e_ping]', 'sim', context.profile.software_info.e_ping == 'sim')%> + <%= labelled_radio_button(_('Não'), 'software_info[e_ping]', 'nao', context.profile.software_info.e_ping == 'nao')%> +
    +
    + <%= _("Adherent to e-MAG?") %> + <%= labelled_radio_button(_('Sim'), 'software_info[e_mag]', 'sim', context.profile.software_info.e_mag == 'sim')%> + <%= labelled_radio_button(_('Não'), 'software_info[e_mag]', 'nao', context.profile.software_info.e_mag == 'nao')%> +
    +
    + <%= _("Adherent to ICP-Brasil?") %> + <%= labelled_radio_button(_('Sim'), 'software_info[icp_brasil]', 'sim', context.profile.software_info.icp_brasil == 'sim')%> + <%= labelled_radio_button(_('Não'), 'software_info[icp_brasil]', 'nao', context.profile.software_info.icp_brasil == 'nao')%> +
    +
    + <%= _("Adherent to e-ARQ?") %> + <%= labelled_radio_button(_('Sim'), 'software_info[e_arq]', 'sim', context.profile.software_info.e_arq == 'sim')%> + <%= labelled_radio_button(_('Não'), 'software_info[e_arq]', 'nao', context.profile.software_info.e_arq == 'nao')%> +
    +
    + <%= _("Internacionalizable") %> + <%= labelled_radio_button(_('Sim'), 'software_info[intern]', 'sim', context.profile.software_info.intern == 'sim')%> + <%= labelled_radio_button(_('Não'), 'software_info[intern]', 'nao', context.profile.software_info.intern == 'nao')%> +
    + +
    + <%= label_tag('software_info[operating_platform]', 'Operating Platform:') %> + <%= text_area_tag('software_info[operating_platform]', context.profile.software_info.operating_platform, :size => '40x20') %> +
    +
    + <%= labelled_text_field('Demonstration URL', 'software_info[demonstration_url]', context.profile.software_info.demonstration_url) %> +
    diff --git a/src/noosfero-spb/spb_migrations b/src/noosfero-spb/spb_migrations deleted file mode 160000 index 9cd1d18..0000000 --- a/src/noosfero-spb/spb_migrations +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9cd1d18c6374e24f769adaa7abb912ecf794cc5a diff --git a/src/noosfero-spb/spb_migrations/db/migrate/20150720180509_software_release_date.rb b/src/noosfero-spb/spb_migrations/db/migrate/20150720180509_software_release_date.rb new file mode 100644 index 0000000..7ee7a16 --- /dev/null +++ b/src/noosfero-spb/spb_migrations/db/migrate/20150720180509_software_release_date.rb @@ -0,0 +1,34 @@ +class SoftwareReleaseDate < ActiveRecord::Migration + def up + softwares = SoftwareInfo.all + softwares.each do |software| + if software.community + name = software.community.name.strip + software.community.name = name + software.community.save + else + software.destroy + end + end + + file = File.new("plugins/spb_migrations/files/date-communities.txt", "r") + while (line = file.gets) + result = line.split('|') + software_name = result[2].gsub("/n", "") + software = Community.find(:first, :conditions => ["lower(name) = ?", software_name.strip.downcase]) + software.created_at = Time.zone.parse(result[1]) if software + if software && software.save + print "." + else + print "F" + puts software_name + end + end + file.close + puts "" + end + + def down + say "This can't be reverted" + end +end diff --git a/src/noosfero-spb/spb_migrations/db/migrate/20150720190133_change_blocks_mirror_option.rb b/src/noosfero-spb/spb_migrations/db/migrate/20150720190133_change_blocks_mirror_option.rb new file mode 100644 index 0000000..a809624 --- /dev/null +++ b/src/noosfero-spb/spb_migrations/db/migrate/20150720190133_change_blocks_mirror_option.rb @@ -0,0 +1,43 @@ +class ChangeBlocksMirrorOption < ActiveRecord::Migration + def up + blocks = Block.where(:type => LinkListBlock) + institution = Community["institution"] + software = Community["software"] + + if institution + boxTemplateInstitution = institution.boxes.where(:position => 2).first + + boxTemplateInstitution.blocks.each do |block| + block.mirror = true + print "." if block.save + end + end + + if software + boxTemplateSoftware = software.boxes.where(:position => 2).first + + boxTemplateSoftware.blocks.each do |block| + block.mirror = true + print "." if block.save + end + end + + blocks.each do |block| + if !(block.owner.class == Environment) && block.owner.organization? && !block.owner.enterprise? + if software && block.owner.software? + software_block = boxTemplateSoftware.blocks.where(:title => block.title).first + block.mirror_block_id = software_block.id if software_block + elsif institution && block.owner.institution? + institution_block = boxTemplateInstitution.blocks.where(:title => block.title).first + block.mirror_block_id = institution_block.id if institution_block + end + end + print "." if block.save + end + puts "" + end + + def down + say "This can't be reverted" + end +end diff --git a/src/noosfero-spb/spb_migrations/db/migrate/20150727161511_change_software_layout.rb b/src/noosfero-spb/spb_migrations/db/migrate/20150727161511_change_software_layout.rb new file mode 100644 index 0000000..414adc7 --- /dev/null +++ b/src/noosfero-spb/spb_migrations/db/migrate/20150727161511_change_software_layout.rb @@ -0,0 +1,31 @@ +class ChangeSoftwareLayout < ActiveRecord::Migration + def up + software_template = Community["software"] + if software_template + change_layout(software_template) + end + + softwares = SoftwareInfo.all + softwares.each do |software| + if software.community + change_layout(software.community) + end + end + puts "" + end + + def down + end + + def change_layout(community) + community.layout_template = "lefttopright" + print "." if community.save + boxToMove = community.boxes.where(:position => 1).first + blockToMove = boxToMove.blocks.where(:type => "SoftwareInformationBlock").first + if blockToMove + newBox = community.boxes.where(:position => 4).first + blockToMove.box = newBox + print "." if blockToMove.save + end + end +end diff --git a/src/noosfero-spb/spb_migrations/db/migrate/20150828201023_second_software_release_date.rb b/src/noosfero-spb/spb_migrations/db/migrate/20150828201023_second_software_release_date.rb new file mode 100644 index 0000000..2fb7b2c --- /dev/null +++ b/src/noosfero-spb/spb_migrations/db/migrate/20150828201023_second_software_release_date.rb @@ -0,0 +1,40 @@ +class SecondSoftwareReleaseDate < ActiveRecord::Migration + def up + softwares = SoftwareInfo.all + softwares.each do |software| + if software.community + name = software.community.name.strip + software.community.name = name + software.community.save + else + software.destroy + end + end + + file = File.new("plugins/spb_migrations/files/date-communities.txt", "r") + while (line = file.gets) + result = line.split('|') + software_name = result[2].gsub("/n", "") + software = Community.where("name ILIKE ?", software_name.strip) + + if software && software.count == 1 + software = software.first + software.created_at = Time.zone.parse(result[1]) + if software.save + print "." + else + print "F" + end + else + print "F" + puts software_name + end + end + file.close + puts "" + end + + def down + say "This can't be reverted" + end +end diff --git a/src/noosfero-spb/spb_migrations/db/migrate/20150904174335_swap_softwares_blocks_between_areas_2_and_3.rb b/src/noosfero-spb/spb_migrations/db/migrate/20150904174335_swap_softwares_blocks_between_areas_2_and_3.rb new file mode 100644 index 0000000..745fcef --- /dev/null +++ b/src/noosfero-spb/spb_migrations/db/migrate/20150904174335_swap_softwares_blocks_between_areas_2_and_3.rb @@ -0,0 +1,35 @@ +class SwapSoftwaresBlocksBetweenAreas2And3 < ActiveRecord::Migration + def up + software_template = Community["software"] + if software_template + swap_software_blocks_between_areas_2_and_3(software_template) + end + + Community.joins(:software_info).each do |software_community| + swap_software_blocks_between_areas_2_and_3(software_community) + end + puts "" + end + + def down + say "This can't be reverted" + end + + def swap_software_blocks_between_areas_2_and_3(software_community) + print "." + + # Get areas 2 and 3 + box_area_two = software_community.boxes.find_by_position 2 + box_area_three = software_community.boxes.find_by_position 3 + + # Get all ids of blocks from areas 2 and 3 + blocks_ids_from_area_two = box_area_two.blocks.select(:id).map(&:id) + blocks_ids_from_area_three = box_area_three.blocks.select(:id).map(&:id) + + # Swap blocks from area 2 to 3 + Block.update_all({:box_id=>box_area_three.id}, ["id IN (?)", blocks_ids_from_area_two]) + + # Swap blocks from area 3 to 2 + Block.update_all({:box_id=>box_area_two.id}, ["id IN (?)", blocks_ids_from_area_three]) + end +end diff --git a/src/noosfero-spb/spb_migrations/db/migrate/20150904181508_add_organization_ratings_block_to_all_softwares_communities.rb b/src/noosfero-spb/spb_migrations/db/migrate/20150904181508_add_organization_ratings_block_to_all_softwares_communities.rb new file mode 100644 index 0000000..d5b7087 --- /dev/null +++ b/src/noosfero-spb/spb_migrations/db/migrate/20150904181508_add_organization_ratings_block_to_all_softwares_communities.rb @@ -0,0 +1,53 @@ +class AddOrganizationRatingsBlockToAllSoftwaresCommunities < ActiveRecord::Migration + def up + software_template = Community["software"] + + if software_template + software_area_one = software_template.boxes.find_by_position 1 + + template_ratings_block = OrganizationRatingsBlock.new :mirror => true, :move_modes => "none", :edit_modes => "none" + template_ratings_block.settings[:fixed] = true + template_ratings_block.display = "home_page_only" + template_ratings_block.save! + print "." + + software_area_one.blocks << template_ratings_block + software_area_one.save! + print "." + + # Puts the ratings block as the last one on area one + last_block_position = software_area_one.blocks.order(:position).last.position + template_ratings_block.position = last_block_position + 1 + template_ratings_block.save! + print "." + end + + Community.joins(:software_info).each do |software_community| + software_area_one = software_community.boxes.find_by_position 1 + print "." + + ratings_block = OrganizationRatingsBlock.new :move_modes => "none", :edit_modes => "none" + ratings_block.settings[:fixed] = true + ratings_block.display = "home_page_only" + ratings_block.mirror_block_id = template_ratings_block.id + ratings_block.save! + print "." + + software_area_one.blocks << ratings_block + software_area_one.save! + print "." + + # Puts the ratings block as the last one on area one + last_block_position = software_area_one.blocks.order(:position).last.position + ratings_block.position = last_block_position + 1 + ratings_block.save! + print "." + end + + puts "" + end + + def down + say "This can't be reverted" + end +end diff --git a/src/noosfero-spb/spb_migrations/db/migrate/20150904202116_add_software_tab_data_block_to_all_softwares.rb b/src/noosfero-spb/spb_migrations/db/migrate/20150904202116_add_software_tab_data_block_to_all_softwares.rb new file mode 100644 index 0000000..579caa2 --- /dev/null +++ b/src/noosfero-spb/spb_migrations/db/migrate/20150904202116_add_software_tab_data_block_to_all_softwares.rb @@ -0,0 +1,52 @@ +class AddSoftwareTabDataBlockToAllSoftwares < ActiveRecord::Migration + def up + software_template = Community["software"] + if software_template + software_area_one = software_template.boxes.find_by_position 1 + + template_soft_tab_block = SoftwareTabDataBlock.new :mirror => true, :move_modes => "none", :edit_modes => "none" + template_soft_tab_block.settings[:fixed] = true + template_soft_tab_block.display = "except_home_page" + template_soft_tab_block.save! + print "." + + software_area_one.blocks << template_soft_tab_block + software_area_one.save! + print "." + + # Puts the ratings block as the last one on area one + last_block_position = software_area_one.blocks.order(:position).last.position + template_soft_tab_block.position = last_block_position + 1 + template_soft_tab_block.save! + print "." + end + + Community.joins(:software_info).each do |software_community| + software_area_one = software_community.boxes.find_by_position 1 + print "." + + soft_tab_block = SoftwareTabDataBlock.new :move_modes => "none", :edit_modes => "none" + soft_tab_block.settings[:fixed] = true + soft_tab_block.display = "except_home_page" + soft_tab_block.mirror_block_id = template_soft_tab_block.id + soft_tab_block.save! + print "." + + software_area_one.blocks << soft_tab_block + software_area_one.save! + print "." + + # Puts the ratings block as the last one on area one + last_block_position = software_area_one.blocks.order(:position).last.position + soft_tab_block.position = last_block_position + 1 + soft_tab_block.save! + print "." + end + + puts "" + end + + def down + say "This can't be reverted" + end +end diff --git a/src/noosfero-spb/spb_migrations/db/migrate/20150907190532_add_statistic_block_to_all_softwares.rb b/src/noosfero-spb/spb_migrations/db/migrate/20150907190532_add_statistic_block_to_all_softwares.rb new file mode 100644 index 0000000..4c4a3c7 --- /dev/null +++ b/src/noosfero-spb/spb_migrations/db/migrate/20150907190532_add_statistic_block_to_all_softwares.rb @@ -0,0 +1,53 @@ +class AddStatisticBlockToAllSoftwares < ActiveRecord::Migration + def up + software_template = Community["software"] + + if software_template + software_area_two = software_template.boxes.find_by_position 2 + + statistic_block_template = StatisticBlock.new :mirror => true, :move_modes => "none", :edit_modes => "none" + statistic_block_template.settings[:fixed] = true + statistic_block_template.display = "home_page_only" + statistic_block_template.save! + print "." + + software_area_two.blocks << statistic_block_template + software_area_two.save! + print "." + + # Puts the ratings block as the last one on area one + first_block_position = software_area_two.blocks.order(:position).first.position + statistic_block_template.position = first_block_position + 1 + statistic_block_template.save! + print "." + end + + Community.joins(:software_info).each do |software_community| + software_area_two = software_community.boxes.find_by_position 2 + print "." + + statistic_block = StatisticBlock.new :move_modes => "none", :edit_modes => "none" + statistic_block.settings[:fixed] = true + statistic_block.display = "home_page_only" + statistic_block.mirror_block_id = statistic_block_template.id + statistic_block.save! + print "." + + software_area_two.blocks << statistic_block + software_area_two.save! + print "." + + # Puts the ratings block as the last one on area one + first_block_position = software_area_two.blocks.order(:position).first.position + statistic_block.position = first_block_position + 1 + statistic_block.save! + print "." + end + + puts "" + end + + def down + say "This can't be reverted" + end +end diff --git a/src/noosfero-spb/spb_migrations/db/migrate/20150909191415_add_wiki_block_to_all_softwares_communities.rb b/src/noosfero-spb/spb_migrations/db/migrate/20150909191415_add_wiki_block_to_all_softwares_communities.rb new file mode 100644 index 0000000..e86f18b --- /dev/null +++ b/src/noosfero-spb/spb_migrations/db/migrate/20150909191415_add_wiki_block_to_all_softwares_communities.rb @@ -0,0 +1,54 @@ +class AddWikiBlockToAllSoftwaresCommunities < ActiveRecord::Migration + def up + software_template = Community["software"] + + if software_template + software_area_two = software_template.boxes.find_by_position 2 + + wiki_block_template = WikiBlock.new :mirror => true, :move_modes => "none", :edit_modes => "none" + wiki_block_template.settings[:fixed] = true + wiki_block_template.save! + print "." + + software_area_two.blocks << wiki_block_template + software_area_two.save! + print "." + + # Puts the ratings block as the last one on area one + repository_block = software_area_two.blocks.find_by_type("RepositoryBlock") + if !repository_block.nil? + wiki_block_template.position = repository_block.position + 1 + wiki_block_template.save! + print "." + end + end + + Community.joins(:software_info).each do |software_community| + software_area_two = software_community.boxes.find_by_position 2 + print "." + + wiki_block = WikiBlock.new :move_modes => "none", :edit_modes => "none" + wiki_block.settings[:fixed] = true + wiki_block.mirror_block_id = wiki_block_template.id + wiki_block.save! + print "." + + software_area_two.blocks << wiki_block + software_area_two.save! + print "." + + repository_block = software_area_two.blocks.find_by_type("RepositoryBlock") + if !repository_block.nil? + wiki_block.position = repository_block.position + wiki_block.save! + print "." + end + end + + puts "" + end + + def down + say "This can't be reverted" + end +end diff --git a/src/noosfero-spb/spb_migrations/db/migrate/20150910133925_add_community_block_in_place_of_profile_image_block.rb b/src/noosfero-spb/spb_migrations/db/migrate/20150910133925_add_community_block_in_place_of_profile_image_block.rb new file mode 100644 index 0000000..e2a5a5f --- /dev/null +++ b/src/noosfero-spb/spb_migrations/db/migrate/20150910133925_add_community_block_in_place_of_profile_image_block.rb @@ -0,0 +1,65 @@ +class AddCommunityBlockInPlaceOfProfileImageBlock < ActiveRecord::Migration + def up + software_template = Community['software'] + + if software_template + software_area_two = software_template.boxes.find_by_position 2 + + community_block_template = CommunityBlock.new :mirror => true, :move_modes => "none", :edit_modes => "none" + community_block_template.settings[:fixed] = true + community_block_template.display = "except_home_page" + community_block_template.save! + print "." + + software_area_two.blocks << community_block_template + software_area_two.save! + print "." + + profile_image_block = software_area_two.blocks.find_by_type("ProfileImageBlock") + if !profile_image_block.nil? + community_block_template.position = profile_image_block.position + community_block_template.save! + print "." + + profile_image_block.destroy + print "." + end + end + + Community.joins(:software_info).each do |software_community| + software_area_two = software_community.boxes.find_by_position 2 + print "." + + community_block = CommunityBlock.new :mirror => true, :move_modes => "none", :edit_modes => "none" + community_block.settings[:fixed] = true + community_block.display = "except_home_page" + community_block.mirror_block_id = community_block_template.id if community_block_template + community_block.save! + print "." + + software_area_two.blocks << community_block + software_area_two.save! + print "." + + profile_image_block = software_area_two.blocks.find_by_type("ProfileImageBlock") + if !profile_image_block.nil? + community_block.position = profile_image_block.position + community_block.save! + print "." + + profile_image_block.destroy + print "." + + # Put all link list blocks to behind + link_list_blocks = software_area_two.blocks.where(:type=>"LinkListBlock", :position=>1) + link_list_blocks.update_all :position => 3 + end + end + + puts "" + end + + def down + say "This can't be reverted" + end +end diff --git a/src/noosfero-spb/spb_migrations/db/migrate/20150915141403_apply_short_plus_pic_to_all_communities_blogs.rb b/src/noosfero-spb/spb_migrations/db/migrate/20150915141403_apply_short_plus_pic_to_all_communities_blogs.rb new file mode 100644 index 0000000..24de7bb --- /dev/null +++ b/src/noosfero-spb/spb_migrations/db/migrate/20150915141403_apply_short_plus_pic_to_all_communities_blogs.rb @@ -0,0 +1,23 @@ +class ApplyShortPlusPicToAllCommunitiesBlogs < ActiveRecord::Migration + def up + Community.all.each do |community| + set_short_plus_pic_to_blog community.blog + end + + puts "" + end + + def down + say "This can't be reverted" + end + + private + + def set_short_plus_pic_to_blog blog + if blog + blog.visualization_format = "short+pic" + blog.save! + print "." + end + end +end diff --git a/src/noosfero-spb/spb_migrations/db/migrate/20150916134427_change_members_page_link_in_all_softwares_communities.rb b/src/noosfero-spb/spb_migrations/db/migrate/20150916134427_change_members_page_link_in_all_softwares_communities.rb new file mode 100644 index 0000000..cb9515c --- /dev/null +++ b/src/noosfero-spb/spb_migrations/db/migrate/20150916134427_change_members_page_link_in_all_softwares_communities.rb @@ -0,0 +1,24 @@ +# encoding: utf-8 + +class ChangeMembersPageLinkInAllSoftwaresCommunities < ActiveRecord::Migration + def up + Community.joins(:software_info).each do |software_community| + collaboration_block = Block.joins(:box).where("boxes.owner_id = ? AND blocks.type = ? AND blocks.title = ?", software_community.id, "LinkListBlock", "Colaboração").readonly(false).first + + if collaboration_block + collaboration_block.links.each do |link| + link["address"] = "/profile/#{software_community.identifier}/members" if link["name"] == "Usuários" + end + collaboration_block.save! + print "." + end + end + + puts "" + end + + def down + say "This can't be reverted" + end +end + diff --git a/src/noosfero-spb/spb_migrations/db/migrate/20151002175358_change_all_blocks_position_in_area_2.rb b/src/noosfero-spb/spb_migrations/db/migrate/20151002175358_change_all_blocks_position_in_area_2.rb new file mode 100644 index 0000000..7806537 --- /dev/null +++ b/src/noosfero-spb/spb_migrations/db/migrate/20151002175358_change_all_blocks_position_in_area_2.rb @@ -0,0 +1,60 @@ +class ChangeAllBlocksPositionInArea2 < ActiveRecord::Migration + def up + software_template = Community['software'] + print "." + + if software_template + software_area_two = software_template.boxes.find_by_position 2 + print "." + + change_blocks_position software_area_two.blocks if software_area_two + end + + Community.joins(:software_info).each do |software_community| + software_area_two = software_community.boxes.find_by_position 2 + print "." + + change_blocks_position software_area_two.blocks if software_area_two + end + + puts "" + end + + def down + say "This can't be reverted" + end + + private + + def change_blocks_position blocks + blocks.each do |block| + block.position = get_block_position(block) + block.save! + print "." + end + end + + def get_block_position block + case block.type + when "CommunityBlock" + 1 + when "StatisticBlock" + 2 + when "RepositoryBlock" + 4 + when "WikiBlock" + 5 + when "MembersBlock" + 7 + when "LinkListBlock" + if block.title == "Ajuda" + 3 + else + 6 + end + else + 8 + end + end +end + diff --git a/src/noosfero-spb/spb_migrations/db/migrate/20151002180659_create_siorg_institutions.rb b/src/noosfero-spb/spb_migrations/db/migrate/20151002180659_create_siorg_institutions.rb new file mode 100644 index 0000000..db059da --- /dev/null +++ b/src/noosfero-spb/spb_migrations/db/migrate/20151002180659_create_siorg_institutions.rb @@ -0,0 +1,73 @@ +#encoding: utf-8 +require "i18n" + +class CreateSiorgInstitutions < ActiveRecord::Migration + def up + governmental_power = GovernmentalPower.where("name ILIKE ?", "Executivo").first + governmental_sphere = GovernmentalSphere.where("name ILIKE ?", "Federal").first + env = Environment.default + + if env && governmental_power && governmental_sphere + CSV.foreach("plugins/spb_migrations/files/orgaos_siorg.csv", :headers => true) do |row| + template = Community["institution"] + + community = Community.where("identifier ILIKE ?", row["Nome"].to_slug).first + unless community + institution = Institution.where("acronym ILIKE ?", row["Sigla"]).first + community = institution.community if institution + end + + community = Community.new unless community + + community.environment = env if community.environment.blank? + community.name = row["Nome"].rstrip + community.country = row["Pais"] + community.state = row["Estado"] + community.city = row["Cidade"] + community.template = template if template + + unless community.save + print "F" + next + end + + juridical_nature = JuridicalNature.where("name ILIKE ? OR name ILIKE ?", "#{I18n.transliterate(row['Natureza Jurídica'].rstrip)}", "#{row['Natureza Jurídica'].rstrip}").first + + juridical_nature = JuridicalNature.create!(name: row['Natureza Jurídica'].rstrip) unless juridical_nature + + + institution = Hash.new + + institution[:name] = row["Nome"] + institution[:siorg_code] = row["Código do SIORG"] + institution[:acronym] = row["Sigla"] + institution[:governmental_sphere] = governmental_sphere + institution[:governmental_power] = governmental_power + institution[:juridical_nature] = juridical_nature + institution[:sisp] = (row["SISP"] == "Sim") + institution[:cnpj] = row["CNPJ"] + institution[:community] = community + + if community.institution + community.institution.update_attributes(institution) + else + institution[:community] = community + community.institution = PublicInstitution.create!(institution) + end + + if community.save + print "." + else + print "F" + end + + end + end + puts "" + end + + def down + say "This can't be reverted" + end + +end diff --git a/src/noosfero-spb/spb_migrations/files/date-communities.txt b/src/noosfero-spb/spb_migrations/files/date-communities.txt new file mode 100644 index 0000000..f141a71 --- /dev/null +++ b/src/noosfero-spb/spb_migrations/files/date-communities.txt @@ -0,0 +1,68 @@ + 56443993 | 2012-07-24 09:36:30.348122-03 | Ação + 9677539 | 2009-03-05 13:45:38.24475-03 | Amadeus + 10374226 | 2009-04-01 15:02:56.691053-03 | Apoena + 8265263 | 2008-12-18 08:35:49.864072-02 | ASES + 10157501 | 2009-03-20 10:56:23.37942-03 | Banco de Talentos + 3585 | 2007-02-06 12:17:18.221666-02 | CACIC - Configurador Automático e Coletor de Informações Computacionais + 48535178 | 2012-03-07 10:33:23.788233-03 | CAU - Central de Atendimento ao Usuário + 98687140 | 2014-01-20 15:20:59.784404-02 | Citsmart + 11791260 | 2009-06-16 17:13:08.465927-03 | CMS - Controle de Marcas e Sinais + 133801 | 2007-04-03 16:31:16.047284-03 | Cocar + 27016128 | 2010-12-07 09:28:26.601182-02 | Cortex + 3632535 | 2008-04-07 15:34:10.143308-03 | Curupira + 27886394 | 2010-12-22 14:48:39.54407-02 | Demoiselle + 42650664 | 2011-10-24 18:08:56.902343-02 | DIM - Dispensação Individualizada de Medicamentos + 15315976 | 2009-10-09 15:15:52.554301-03 | e-cidade + 21650445 | 2010-06-11 15:04:50.470888-03 | EdiTom + 20675454 | 2010-04-28 16:57:25.907169-03 | EducatuX + 22297303 | 2010-07-19 10:29:05.349868-03 | e-ISS + 24188584 | 2010-09-03 15:05:17.470815-03 | e-Nota + 31042 | 2007-03-12 09:47:54.97039-03 | e-Proinfo + 23731755 | 2010-08-24 12:17:02.069138-03 | ERP5 BR + 126403824 | 2014-12-08 10:28:11.812721-02 | e-Sic Livre + 11809545 | 2009-06-17 09:19:30.697619-03 | Fila + 44509627 | 2011-11-30 16:11:20.487561-02 | FormDin + 30726269 | 2011-03-25 18:15:38.333798-03 | Geosan + 20483099 | 2010-04-16 14:53:04.201919-03 | Geplanes + 33752093 | 2011-05-25 13:08:28.449124-03 | GGAS + 1101545 | 2007-06-18 15:31:22.060335-03 | Ginga + 30724784 | 2011-03-25 17:44:11.373481-03 | Gnuteca + 31574974 | 2011-04-15 15:57:57.260004-03 | gpweb + 1593449 | 2007-08-30 16:51:38.073906-03 | Gsan - Sistema Integrado de Gestão de Serviços de Saneamento + 66594611 | 2013-04-23 15:06:59.865025-03 | Guarux + 1444332 | 2007-08-07 08:15:42.941934-03 | i3GEO + 6552490 | 2008-09-29 13:26:07.553951-03 | i-Educar + 626732 | 2007-05-07 14:31:51.222225-03 | InVesalius + 25913900 | 2010-11-09 15:33:43.132943-02 | Jaguar + 18068594 | 2010-01-06 16:28:29.99099-02 | Koruja + 601158 | 2007-05-03 14:49:32.350206-03 | KyaPanel + 3673574 | 2008-04-09 15:18:24.118203-03 | LightBase + 11809207 | 2009-06-17 09:18:46.708981-03 | Linux Educacional + 9022831 | 2009-02-04 15:21:13.18503-02 | MDArte + 11808514 | 2009-06-17 09:10:36.619105-03 | Minuano + 60993607 | 2012-11-30 10:37:59.581285-02 | NAVi + 8566986 | 2009-01-14 14:14:24.306736-02 | OASIS + 4449 | 2007-02-07 10:23:59.658958-02 | OpenACS + 12702936 | 2009-07-14 09:56:30.44857-03 | Pandorga GNU/Linux + 9066433 | 2009-02-06 13:37:26.116692-02 | Prefeitura Livre + 25956481 | 2010-11-11 11:24:24.2039-02 | Provinha Brasil + 12815452 | 2009-07-20 15:30:32.189921-03 | PW3270 + 18016032 | 2010-01-05 09:51:29.030808-02 | REDECA + 30725662 | 2011-03-25 17:59:59.551252-03 | Sagu – gestão acadêmica unificada + 3695494 | 2008-04-11 10:38:11.361528-03 | Sagui + 15719494 | 2009-10-20 10:38:37.237684-02 | SGA LIVRE - Sistema de Gerenciamento do Atendimento + 63022108 | 2013-01-30 11:22:50.327218-02 | SGDoc + 51261 | 2007-03-23 15:10:36.399602-03 | SGD – Sistema de Gestão de Demandas + 23369799 | 2010-08-13 14:04:43.562233-03 | SGF - Sistema de Gestão de Frotas + 93658 | 2007-03-29 08:41:09.667033-03 | Sigati + 3485513 | 2008-03-26 16:45:51.301379-03 | SIMEC - Sistema Integrado de Planejamento Orçamento e Finanças + 5482 | 2007-02-09 10:05:23.803077-02 | Sisau-Saci-Contra + 42365353 | 2011-10-19 16:17:57.49005-02 | SAELE + 44620010 | 2011-12-05 18:03:30.046532-02 | Sistema de Ouvidoria + 54650395 | 2012-06-29 15:24:43.920424-03 | SIVAC - Sistema on-line de Vacinação + 26934301 | 2010-12-02 17:40:23.960186-02 | SNEP PBX IP + 7283318 | 2008-11-11 14:31:33.260701-02 | SPED - Sistema de protocolo eletrônico + 51053337 | 2012-04-27 13:49:25.11419-03 | Tucunaré + 103459100 | 2014-02-17 11:28:47.085822-03 | Urbem CNM + 5986695 | 2008-09-10 15:26:48.814791-03 | WebIntegrator- Produtividade Java WEB + 4215419 | 2008-05-21 16:57:49.092527-03 | Xemelê diff --git a/src/noosfero-spb/spb_migrations/files/orgaos_siorg.csv b/src/noosfero-spb/spb_migrations/files/orgaos_siorg.csv new file mode 100644 index 0000000..b8c1cdf --- /dev/null +++ b/src/noosfero-spb/spb_migrations/files/orgaos_siorg.csv @@ -0,0 +1,258 @@ +Código do SIORG,Nome,Sigla,Tipo de Instituição,Pais,Estado,Cidade,Esfera,Poder,Natureza Jurídica,SISP,CNPJ +46,Advocacia Geral da União,AGU,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.411/0008-85 +45104,Agência Brasileira de Inteligência,ABIN,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,01.175.497/0001-41 +4243,Agência Espacial Brasileira,AEB,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,86.900.545/0001-70 +46876,Agência Nacional de Águas,ANA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,26.994.558/0001-23 +86144,Agência Nacional de Aviação Civil,ANAC,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,07.947.821/0001-89 +21089,Agência Nacional de Energia Elétrica ,ANEEL,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,02.270.669/0001-29 +45013,Agência Nacional de Saúde Suplementar ,ANS,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,03.589.068/0001-46 +25064,Agência Nacional de Telecomunicações ,ANATEL,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,02.030.715/0001-12 +54843,Agência Nacional de Transportes Aquaviários,ANTAG,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,04.903.587/0001-08 +54793,Agência Nacional de Transportes Terrestres ,ANTT,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,04.898.488/0001-77 +36687,Agência Nacional de Vigilância Sanitária ,ANVISA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,03.112.386/0001-11 +57682,Agência Nacional do Cinema ,ANCINE,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,04.884.574/0001-20 +25281,"Agência Nacional do Petróleo, Gás Natural e Biocombustíveis ",ANP,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,02.313.673/0001-27 +334,Arquivo Nacional ,AN,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Empresa Pública,Sim,04.374.067/0001-47 +89,Banco Central do Brasil ,BCB,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,00.038.166/0001-05 +57952,Centro de Tecnologia da Informação Renato Archer ,CTI,Pública,Brasil,SP,Campinas,Federal,Executivo,Empresa Pública,Sim,04.822.500/0002-40 +448,Centro Federal de Educação Tecnológica ´Celso Suckow da Fonseca´,CEFET-RJ,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,42.441.758/0001-05 +445,Centro Federal de Educação Tecnológica de Minas Gerais ,CEFET-MG,Pública,Brasil,MG,Belo Horizonte,Federal,Executivo,Autarquia,Sim,17.220.203/0001-96 +256,Colégio Pedro II ,CP II,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,42.414.284/0001-02 +48,Comando da Aeronáutica ,COMAER,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.429/0001-00 +185,Comando da Marinha ,CMAR,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.502/0001-44 +94,Comando do Exército ,CEX,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.452/0001-03 +478,Comissão de Valores Mobiliários ,CVM,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,29.507.878/0002-80 +223,Comissão Nacional de Energia Nuclear ,CNEM,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,00.402.552/0001-26 +322,Conselho Administrativo de Defesa Econômica,CADE,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.418.993/0001-16 +8,Conselho Nacional de Desenvolvimento Científico e Tecnológico,CNPG,Pública,Brasil,DF,Brasilia,Federal,Executivo,Fundação,Sim,33.654.831/0001-36 +3620,Controladoria Geral da União ,CGU,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,05.914.685/0001-03 +250,Coordenação de Aperfeiçoamento de Pessoal de Nível Superior ,CAPES,Pública,Brasil,DF,Brasilia,Federal,Executivo,Empresa Pública,Sim,00.889.834/0001-08 +324,Departamento de Polícia Federal ,DPF,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,00.394.494/0014-50 +704,Departamento de Polícia Rodoviária Federal ,DPRF,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,00.394.494/0014-50 +54844,Departamento nacional de Infraestrutura de Transportes,DNIT,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,04.892.707/0001-00 +367,Departamento Nacional de Obras Contra as Secas ,DNOCS,Pública,Brasil,CE,Fortaleza,Federal,Executivo,Autarquia,Sim,00.043.711/0001-43 +1918,Departamento Nacional de Produção Mineral ,DNPM,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,00.381.056/0001-33 +86567,Empresa Brasil de Comunicação,EBC,Pública,Brasil,DF,Brasilia,Federal,Executivo,Empresa Pública,Sim,09.168.704/0001-42 +119672,Empresa de Planejamento e Logística ,EPL,Pública,Brasil,DF,Brasilia,Federal,Executivo,Empresa Pública,Sim,15.763.423/0001-30 +1013,Empresa Gerencial de Projetos Navais ,EMGEPRON,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Empresa Pública,Sim,27.816.487/0001-31 +344,Escola de Administração Fazendária ,ESAF,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,02.317.176/0001-05 +299,Fundação Alexandre de Gusmão,FUNAG,Pública,Brasil,DF,Brasilia,Federal,Executivo,Fundação,Sim,00.662.197/0001-24 +984,Fundação Biblioteca Nacional ,FBN,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Fundação,Sim,40.176.679/0001-99 +261,Fundação Casa de Rui Barbosa ,FCRB,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Fundação,Sim,42.519.488/0001-08 +1782,Fundação Cultural Palmares ,FCP,Pública,Brasil,DF,Brasilia,Federal,Executivo,Fundação,Sim,32.901.688/0001-77 +956,Fundação Escola Nacional de Administração Pública ,ENAP,Pública,Brasil,DF,Brasilia,Federal,Executivo,Fundação,Sim,00.627.612/0001-09 +3,Fundação Instituto Brasileiro de Geografia e Estátistica ,IBGE,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Fundação,Sim,33.787.094/0001-40 +7,Fundação Instituto de Pesquisa Econômica Aplicada ,IPEA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Fundação,Sim,03.892.175/0001-00 +257,Fundação Joaquim Nabuco ,FUNDAJ,Pública,Brasil,PE,Recife,Federal,Executivo,Fundação,Sim,09.773.169/0001-59 +221,"Fundação Jorge Duprat Figueiredo, de Segurança e Medicina do Trabalho ",FUNDACENTRO,Pública,Brasil,SP,São Paulo,Federal,Executivo,Fundação,Sim,62.428.073/0001-36 +2330,Fundação Nacional de Artes ,FUNARTE,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Fundação,Sim,26.963.660/0002-42 +2207,Fundação Nacional de Saúde ,FUNASA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Fundação,Sim,26.989.350/0001-16 +173,Fundação Nacional do Índio ,FUNAI,Pública,Brasil,DF,Brasilia,Federal,Executivo,Fundação,Sim,00.059.311/0001-26 +315,Fundação Oswaldo Cruz ,FIOCRUZ,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Fundação,Sim,33.781.055/0012-98 +470,Fundação Universidade de Brasília,UNB,Pública,Brasil,DF,Brasilia,Federal,Executivo,Fundação,Sim,00.038.174/0001-43 +465,Fundação Universidade do Amazonas ,UFAM,Pública,Brasil,AM,Manaus,Federal,Executivo,Fundação,Sim,04.378.626/0001-97 +84712,Fundação Universidade Federal da Grande Dourados ,UFGD,Pública,Brasil,MS,Dourados,Federal,Executivo,Fundação,Sim,07.775.847/0001-97 +970,Fundação Universidade Federal de Ciências da Saúde de Porto Alegre ,UFCSPA,Pública,Brasil,RS,Porto Alegre,Federal,Executivo,Fundação,Sim,92.967.595/0001-77 +471,Fundação Universidade de Mato Grosso ,UFMT,Pública,Brasil,MT,Cuiabá,Federal,Executivo,Fundação,Sim,33.004.540/0001-00 +827,Fundação Universidade Federal do Mato Grosso do Sul ,UFMS,Pública,Brasil,MS,Campo Grande,Federal,Executivo,Fundação,Sim,15.461.510/0001-33 +477,Fundação Universidade Federal de Pelotas ,UFPel,Pública,Brasil,RS,Pelotas,Federal,Executivo,Fundação,Sim,92.242.080/0001-00 +1209,Fundação Universidade Federal de Rondônia ,UNIR,Pública,Brasil,RO,Porto Velho,Federal,Executivo,Fundação,Sim,04.418.943/0001-90 +1605,Fundação Universidade Federal de Roraima ,UFRR,Pública,Brasil,RR,Boa Vista,Federal,Executivo,Fundação,Sim,34.792.077/0001-63 +475,Fundação Universidade Federal de São Carlos ,UFSCar,Pública,Brasil,SP,Sorocaba,Federal,Executivo,Fundação,Sim,45.358.058/0001-40 +1734,Fundação Universidade Federal de São João Del Rei ,FUNREI,Pública,Brasil,MG,São João del-Rei,Federal,Executivo,Fundação,Sim,00.394.445/0518-65 +469,Fundação Universidade Federal de Sergipe ,UFS,Pública,Brasil,SE,São Cristóvão,Federal,Executivo,Fundação,Sim,13.031.547/0001-04 +474,Fundação Universidade de Viçosa ,UFV,Pública,Brasil,MG,Viçosa,Federal,Executivo,Fundação,Sim,25.944.455/0001-96 +84703,Fundação Universidade Federal do ABC ,UFABC,Pública,Brasil,SP,Santo André,Federal,Executivo,Fundação,Sim,07.722.779/0001-06 +466,Fundação Universidade Federal do Acre ,UFAC,Pública,Brasil,AC,Rio Branco,Federal,Executivo,Fundação,Sim,04.071.106/0001-37 +1710,Fundação Universidade Federal do Amapá,UNIFAP,Pública,Brasil,AP,Macapá,Federal,Executivo,Fundação,Sim,34.868.257/0001-81 +467,Fundação Universidade Federal do Maranhão ,UFMA,Pública,Brasil,MA,São Luis,Federal,Executivo,Fundação,Sim,06.279.103/0001-19 +94739,Fundação Universidade Federal do Pampa ,UNIPAMPA,Pública,Brasil,RS,Bagé,Federal,Executivo,Fundação,Sim,09.341.233/0001-22 +468,Fundação Universidade Federal do Piauí ,UFPI,Pública,Brasil,PI,Teresina,Federal,Executivo,Fundação,Sim,06.517.387/0001-34 +476,Fundação Universidade do Rio Grande ,FURG,Pública,Brasil,RS,Rio Grande,Federal,Executivo,Fundação,Sim,94.877.586/0001-10 +52702,Fundação Universidade Federal do Tocantins ,UFT,Pública,Brasil,TO,Palmas,Federal,Executivo,Fundação,Sim,05.149.726/0001-04 +69624,Fundação Universidade Federal do Vale do São Francisco ,UNIVASF,Pública,Brasil,PE,Petrolina,Federal,Executivo,Fundação,Sim,05.440.725/0001-14 +253,Fundo Nacional de Desenvolvimento da Educação ,FNDE,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,00.378.257/0001-81 +35,Hospital das Forças Armadas ,HFA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,03.568.867/0001-36 +332,Imprensa Nacional ,IN,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,04.196.645/0001-00 +12,Instituto Brasileiro de Informação em Ciência e Tecnologia ,IBICT,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,04.082.993/0001-49 +100584,Instituto Brasileiro de Museus ,IBRAM,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,10.898.596/0001-42 +241,Instituto Brasileiro de Turismo ,EMBRATUR,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,33.741.794/0001-01 +1812,Instituto Brasileiro do Meio Ambiente e dos Recursos Naturais Renováveis ,IBAMA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,03.659.166/0028-22 +91842,Instituto Chico Mendes de Conservação da Biodiversidade ,ICMBio,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,08.829.974/0001-94 +1913,Instituto de Pesquisas Jardim Botânico do Rio de Janeiro ,JBRJ,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,04.936.616/0001-20 +2045,Instituto do Patrimônio Histórico e Artístico Nacional ,IPHAN,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,26.474.056/0001-71 +456,"Instituto Federal de Educação, Ciência e Tecnologia Sul-Rio-Grandense",IFSUL,Pública,Brasil,RS,Pelotas,Federal,Executivo,Autarquia,Sim,10.729.992/0004-99 +100920,"Instituto Federal de Educação, Ciência e Tecnologia Baiano ",IFBAIANO,Pública,Brasil,BA,Salvador,Federal,Executivo,Autarquia,Sim,10.724.903/0001-79 +100919,"Instituto Federal de Educação, Ciência e Tecnologia Catarinense ",IFC,Pública,Brasil,SO,Blumenau,Federal,Executivo,Autarquia,Sim,10.635.424/0001-86 +444,"Instituto Federal de Educação, Ciência e Tecnologia da Bahia ",IFBA ,Pública,Brasil,BA,Salvador,Federal,Executivo,Autarquia,Sim,10.764.307/0001-12 +100905,"Instituto Federal de Educação, Ciência e Tecnologia da Paraíba ",IFPB,Pública,Brasil,PB,João Pessoa,Federal,Executivo,Autarquia,Sim,10.783.898/0001-75 +100900,"Instituto Federal de Educação, Ciência e Tecnologia de Alagoas ",IFAL,Pública,Brasil,AL,Maceió,Federal,Executivo,Autarquia,Sim,10.825.373/0001-55 +94430,"Instituto Federal de Educação, Ciência e Tecnologia de Brasília ",IFB,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,10.791.831/0001-82 +451,"Instituto Federal de Educação, Ciência e Tecnologia de Goiás ",IFGO,Pública,Brasil,GO,Goiânia,Federal,Executivo,Autarquia,Sim,10.870.883/0001-44 +100914,"Instituto Federal de Educação, Ciência e Tecnologia de Minas Gerais ",IFMG,Pública,Brasil,MG,Belo Horizonte,Federal,Executivo,Autarquia,Sim,10.626.896/0001-72 +100922,"Instituto Federal de Educação, Ciência e Tecnologia de Pernambuco ",IFPE,Pública,Brasil,PE,Recife,Federal,Executivo,Autarquia,Sim,10.767.239/0001-45 +100907,"Instituto Federal de Educação, Ciência e Tecnologia de Rondônia ",IFRO,Pública,Brasil,RO,Porto Velho,Federal,Executivo,Autarquia,Sim,10.817.343/0001-05 +3561,"Instituto Federal de Educação, Ciência e Tecnologia de Roraima ",IFRR,Pública,Brasil,RR,Boa Vista,Federal,Executivo,Autarquia,Sim,10.839.508/0001-31 +455,"Instituto Federal de Educação, Ciência e Tecnologia de Santa Catarina ",IFSC,Pública,Brasil,SC,Florianópolis,Federal,Executivo,Autarquia,Sim,11.402.887/0001-60 +453,"Instituto Federal de Educação, Ciência e Tecnologia de São Paulo",IFSP,Pública,Brasil,SP,São Paulo,Federal,Executivo,Autarquia,Sim,10.882.594/0001-65 +100909,"Instituto Federal de Educação, Ciência e Tecnologia de Sergipe ",IFS,Pública,Brasil,SE,Aracaju,Federal,Executivo,Autarquia,Sim,10.728.444/0001-00 +94427,"Instituto Federal de Educação, Ciência e Tecnologia do Acre ",IFAC,Pública,Brasil,AC,Rio Branco,Federal,Executivo,Autarquia,Sim,10.918.674/0001-23 +94428,"Instituto Federal de Educação, Ciência e Tecnologia do Amapá ",IFAP,Pública,Brasil,AP,Macapá,Federal,Executivo,Autarquia,Sim,10.820.882/0001-95 +100910,"Instituto Federal de Educação, Ciência e Tecnologia do Amazonas ",IFAM,Pública,Brasil,AM,Manaus,Federal,Executivo,Autarquia,Sim,10.792.928/0001-00 +100911,"Instituto Federal de Educação, Ciência e Tecnologia do Ceará ",IFCE,Pública,Brasil,CE,Fortaleza,Federal,Executivo,Autarquia,Sim,10.744.098/0001-45 +100912,"Instituto Federal de Educação, Ciência e Tecnologia do Espírito Santo ",IFES,Pública,Brasil,ES,Vitória,Federal,Executivo,Autarquia,Sim,10.838.653/0001-06 +100921,"Instituto Federal de Educação, Ciência e Tecnologia do Maranhão ",IFMA,Pública,Brasil,MA,São Luis,Federal,Executivo,Autarquia,Sim,10.735.145/0001-94 +100916,"Instituto Federal de Educação, Ciência e Tecnologia de Mato Grosso ",IFMT,Pública,Brasil,MT,Cuiabá,Federal,Executivo,Autarquia,Sim,10.784.782/0001-50 +100904,"Instituto Federal de Educação, Ciência e Tecnologia do Mato Grosso do Sul ",IFMS,Pública,Brasil,MS,Campo Grande,Federal,Executivo,Autarquia,Sim,10.673.078/0001-20 +100901,"Instituto Federal de Educação, Ciência e Tecnologia do Norte de Minas Gerais ",IFNMG,Pública,Brasil,MG,Montes Claros,Federal,Executivo,Autarquia,Sim,10.727.655/0001-10 +100917,"Instituto Federal de Educação, Ciência e Tecnologia do Pará ",IFPA,Pública,Brasil,PA,Belém,Federal,Executivo,Autarquia,Sim,10.763.998/0001-30 +49103,"Instituto Federal de Educação, Ciência e Tecnologia do Paraná ",IFPR,Pública,Brasil,PR,Curitiba,Federal,Executivo,Autarquia,Sim,10.652.179/0001-15 +434,"Instituto Federal de Educação, Ciência e Tecnologia do Piauí ",IFPI,Pública,Brasil,PI,Teresina,Federal,Executivo,Autarquia,Sim,10.806.496/0001-49 +100930,"Instituto Federal de Educação, Ciência e Tecnologia do Rio de Janeiro ",IFRJ,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,10.952.708/0001-04 +439,"Instituto Federal de Educação, Ciência e Tecnologia do Rio Grande do Norte ",IFRN,Pública,Brasil,RN,Natal,Federal,Executivo,Autarquia,Sim,10.877.412/0001-68 +100918,"Instituto Federal de Educação, Ciência e Tecnologia do Rio Grande do Sul ",IFRS,Pública,Brasil,RS,Bento Gonçalves,Federal,Executivo,Autarquia,Sim,10.637.926/0001-46 +46784,"Instituto Federal de Educação, Ciência e Tecnologia do Sertão Pernambucano ",IFSERTAO-PE,Pública,Brasil,PE,Petrolina,Federal,Executivo,Autarquia,Sim,10.830.301/0001-04 +100902,"Instituto Federal de Educação, Ciência e Tecnologia do Sudeste de Minas Gerais ",IFMGSE,Pública,Brasil,MG,Juiz de Fora,Federal,Executivo,Autarquia,Sim,10.723.648/0002-20 +100915,"Instituto Federal de Educação, Ciência e Tecnologia do Sul de Minas Gerais ",IFSuldeminas,Pública,Brasil,MG,Pouso Alegre,Federal,Executivo,Autarquia,Sim,10.648.539/0001-05 +100908,"Instituto Federal de Educação, Ciência e Tecnologia doTocantins ",IFTO,Pública,Brasil,TO,Palmas,Federal,Executivo,Autarquia,Sim,10.742.006/0001-98 +100903,"Instituto Federal de Educação, Ciência e Tecnologia do Triângulo Mineiro ",IFTM,Pública,Brasil,MG,Uberaba,Federal,Executivo,Autarquia,Sim,10.695.891/0001-00 +100906,"Instituto Federal de Educação, Ciência e Tecnologia Farroupilha ",IFFarroupilha,Pública,Brasil,RS,São Vicente do Sul,Federal,Executivo,Autarquia,Sim,10.662.072/0001-58 +100931,"Instituto Federal de Educação, Ciência e Tecnologia Fluminense ",IFFluminense,Pública,Brasil,RJ,Campos dos Goytacazes,Federal,Executivo,Autarquia,Sim,10.779.511/0001-07 +100913,"Instituto Federal de Educação, Ciência e Tecnologia Goiano ",IFgoiano,Pública,Brasil,GO,Goiânia,Federal,Executivo,Autarquia,Sim,10.651.417/0001-78 +382,Instituto Nacional da Propriedade Industrial ,INPI,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,42.521.088/0009-94 +2409,Instituto Nacional de Câncer José Alencar Gomes da Silva ,INCA,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,00.394.544/0171-50 +14769,Instituto Nacional de Cardiologia ,INC/SAS,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,00.394.544/0213-44 +1799,Instituto Nacional de Colonização e Reforma Agrária ,INCRA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,00.375.972/0002-41 +249,Instituto Nacional de Estudos e Pesquisas Educacionais Anísio Teixeira ,INEP,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,01.678.363/0001-43 +2030,Instituto Nacional de Meteorologia ,INMET,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,00.396.895/0010-86 +240,"Instituto Nacional de Metrologia, Qualidade e Tecnologia ",INMETRO,Pública,Brasil,RJ,Duque de Caxias,Federal,Executivo,Autarquia,Sim,00.662.270/0003-20 +10,Instituto Nacional de Pesquisas Espaciais ,INPE,Pública,Brasil,SP,São José dos Campos,Federal,Executivo,Autarquia,Sim,01.263.896/0005-98 +11,Instituto Nacional de Pesquisas da Amazônia ,INPA,Pública,Brasil,AM,Manaus,Federal,Executivo,Autarquia,Sim,01.263.896/0015-60 +232,Instituto Nacional de Tecnologia ,INT,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,01.263.896/0004-07 +47388,Instituto Nacional de Tecnologia da Informação ,ITI,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,04.039.532/0002-74 +1934,Instituto Nacional do Seguro Social ,INSS,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,00.394.528/0004-35 +982,Laboratório Nacional de Computação Científica ,LNCC,Pública,Brasil,RJ,Petrópolis,Federal,Executivo,Administração Direta,Sim,04.079.233/0001-82 +14,"Ministério da Agricultura, Pecuária e Abastecimento ",MAPA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.396.895/0072-19 +1988,"Ministério da Ciência, Tecnologia e Inovação ",MCTI,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,03.132.745/0001-00 +1926,Ministério da Cultura ,MinC,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,01.264.142/0007-14 +41066,Ministério da Defesa ,MD,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.411/0005-32 +244,Ministério da Educação ,MEC,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.445/0001-01 +1929,Ministério da Fazenda ,MF,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.460/0185-12 +42670,Ministério da Integração Nacional ,MI ,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,03.353.358/0001-96 +316,Ministério da Justiça ,MJ,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.494/0018-84 +72083,Ministério da Pesca e Aquicultura ,MPA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,05.482.692/0001-75 +1930,Ministério da Previdência Social ,MPS,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.528/0001-92 +304,Ministério da Saúde ,MS,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.544/0127-87 +42672,Ministério das Cidades ,Mcidades,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,05.465.986/0001-99 +3159,Ministério das Comunicações ,MC,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.437/0004-08 +263,Ministério das Relações Exteriores ,MRE,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.437/0004-08 +2852,Ministério de Minas e Energia ,MME,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,37.115.383/0001-53 +17125,Ministério do Desenvolvimento Agrário ,MDA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,01.612.452/0001-97 +1945,Ministério do Desenvolvimento Social e Combate à Fome ,MDS,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,05.756.246/0001-01 +3162,"Ministério do Desenvolvimento, Indústria e Comércio Exterior ",MDIC,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.478/0001-43 +36670,Ministério do Esporte ,ME ,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,28.523.215/0001-06 +1927,Ministério do Meio Ambiente ,MMA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.411/0043-68 +2981,"Ministério do Planejamento, Orçamento e Gestão ",MPOG,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.489.828/0002-36 +2844,Ministério do Trabalho e Emprego ,MTE,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,37.115.367/0001-60 +72084,Ministério do Turismo ,Mtur,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,05.457.283/0001-19 +2846,Ministério dos Transportes,MT,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,37.115.342/0032-63 +24755,Museu de Astronomia e Ciências Afins ,MAST,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Administração Direta,Sim,16.714.695/0001-03 +24712,Museu Paraense Emílio Goeldi ,MPEG,Pública,Brasil,PA,Belém,Federal,Executivo,Administração Direta,Sim,04.108.782/0001-38 +346,Observatório Nacional ,ON,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Administração Direta,Sim,04.053.755/0001-05 +78,Procuradoria-Geral da Fazenda Nacional,PGFN,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.460/0216-53 +77,Secretaria da Receita Federal ,SRF,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.460/0058-53 +115257,Secretaria de Aviação Civil ,SAC,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,07.947.821/0001-89 +1801,Secretaria de Direitos Humanos ,SDH,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,05.478.625/0001-87 +3495,Secretaria de Logística e Tecnologia da Informação ,SLTI,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,10.498.974/0001-09 +119335,Secretaria Nacional do Consumidor ,SENACON,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.494/0005-60 +2032,Secretaria de Orçamento Federal ,SOF,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.489.828/0008-21 +92748,Secretaria de Portos da Presidência da República,SEP,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,08.855.874/0001-32 +1986,Secretaria do Patrimônio da União ,SPU,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.489.828/0009-02 +1696,Secretaria do Tesouro Nacional ,STN,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.460/0409-50 +42673,Secretaria-Geral da Presidência da República,SGPR,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,07.490.910/0001-49 +89539,Serviço Florestal Brasileiro ,SFB,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,37.115.375/0008-83 +166,Superintendência da Zona Franca de Manaus ,SUFRAMA,Pública,Brasil,AM,Manaus,Federal,Executivo,Autarquia,Sim,04.407.029/0001-43 +235,Superintendência de Seguros Privados ,SUSEP,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,42.354.068/0008-95 +91138,Superintendência do Desenvolvimento da Amazônia ,SUDAM,Pública,Brasil,PA,Belém,Federal,Executivo,Autarquia,Sim,09.203.665/0001-77 +100113,Superintendência do Desenvolvimento do Centro-Oeste ,SUDECO,Pública,Brasil,DF,Brasília,Federal,Executivo,Autarquia,Sim,13.802.028/0001-94 +91144,Superintendência do Desenvolvimento do Nordeste ,SUDENE,Pública,Brasil,PE,Recife,Federal,Executivo,Autarquia,Sim,09.263.130/0001-91 +105915,Superintendência Nacional de Previdência Complementar ,PREVIC,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,07.290.290/0004-47 +109912,Universidade da Integração Internacional da Lusofonia Afro-Brasileira,UNILAB,Pública,Brasil,CE,Fortaleza,Federal,Executivo,Autarquia,Sim,12.397.930/0001-00 +421,Universidade Federal da Bahia ,UFBA,Pública,Brasil,BA,Salvador,Federal,Executivo,Autarquia,Sim,15.180.714/0001-04 +103730,Universidade Federal da Fronteira Sul ,UFFS,Pública,Brasil,SC,Chapecó,Federal,Executivo,Autarquia,Sim,11.234.780/0001-50 +105793,Universidade Federal da Integração Latino-Americana ,UNILA ,Pública,Brasil,PR,Foz Do Iguaçu,Federal,Executivo,Autarquia,Sim,11.806.275/0001-33 +419,Universidade Federal da Paraíba ,UFPB,Pública,Brasil,PB,João Pessoa,Federal,Executivo,Autarquia,Sim,24.098.477/0001-10 +420,Universidade Federal de Alagoas ,UFAL,Pública,Brasil,AL,Maceió,Federal,Executivo,Autarquia,Sim,24.464.109/0001-48 +461,Universidade Federal de Alfenas ,UNIFAL-MG,Pública,Brasil,MG,Alfenas,Federal,Executivo,Autarquia,Sim,17.879.859/0001-15 +67671,Universidade Federal de Campina Grande ,UFCG,Pública,Brasil,PB,Campina Grande,Federal,Executivo,Autarquia,Sim,05.055.128/0001-76 +422,Universidade Federal de Goiás ,UFG,Pública,Brasil,GO,Goiânia,Federal,Executivo,Autarquia,Sim,01.567.601/0001-43 +462,Universidade Federal de Itajubá ,UNIFEI,Pública,Brasil,MG,Itajubá,Federal,Executivo,Autarquia,Sim,21.040.001/0001-30 +424,Universidade Federal de Juiz de Fora ,UFJF,Pública,Brasil,MG,Juiz de Fora,Federal,Executivo,Autarquia,Sim,21.195.755/0001-69 +463,Universidade Federal de Lavras ,UFLA,Pública,Brasil,MG,Lavras,Federal,Executivo,Autarquia,Sim,22.078.679/0001-74 +423,Universidade Federal de Minas Gerais ,UFMG,Pública,Brasil,MG,Belo Horizonte,Federal,Executivo,Autarquia,Sim,17.217.985/0001-04 +473,Universidade Federal de Ouro Preto ,UFOP,Pública,Brasil,MG,Ouro Preto,Federal,Executivo,Autarquia,Sim,23.070.659/0001-10 +418,Universidade Federal de Pernambuco ,UFPE,Pública,Brasil,PE,Recife,Federal,Executivo,Autarquia,Sim,24.134.488/0001-08 +429,Universidade Federal de Santa Catarina ,UFSC,Pública,Brasil,SC,Florianópolis,Federal,Executivo,Autarquia,Sim,83.899.526/0001-82 +431,Universidade Federal de Santa Maria ,UFSM,Pública,Brasil,RS,Santa Maria,Federal,Executivo,Autarquia,Sim,95.591.764/0001-05 +464,Universidade Federal de São Paulo ,UNIFESP,Pública,Brasil,SP,São Paulo,Federal,Executivo,Autarquia,Sim,60.453.032/0001-74 +472,Universidade Federal de Uberlândia ,UFU,Pública,Brasil,MG,Uberlândia,Federal,Executivo,Autarquia,Sim,25.648.387/0001-18 +122391,Universidade Federal do Cariri ,UFCA,Pública,Brasil,CE,Juazeiro do Norte,Federal,Executivo,Autarquia,Sim,18.621.825/0001-99 +416,Universidade Federal do Ceará ,UFC,Pública,Brasil,CE,Fortaleza,Federal,Executivo,Autarquia,Sim,07.272.636/0001-31 +425,Universidade Federal do Espírito Santo ,UFES,Pública,Brasil,ES,Vitória,Federal,Executivo,Autarquia,Sim,32.479.123/0001-43 +260,Universidade Federal do Estado do Rio de Janeiro ,UNIRIO,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,34.023.077/0001-07 +104667,Universidade Federal do Oeste do Pará ,UFOPA,Pública,Brasil,PA,Santarém,Federal,Executivo,Autarquia,Sim,11.118.393/0001-59 +415,Universidade Federal do Pará ,UFPA,Pública,Brasil,PA,Belém,Federal,Executivo,Autarquia,Sim,34.621.748/0001-23 +428,Universidade Federal do Paraná ,UFPR,Pública,Brasil,PR,Curitiba,Federal,Executivo,Autarquia,Sim,75.095.679/0001-49 +84710,Universidade Federal do Recôncavo da Bahia ,UFRB,Pública,Brasil,BA,Cruz das Almas,Federal,Executivo,Autarquia,Sim,07.777.800/0001-62 +426,Universidade Federal do Rio de Janeiro ,UFRJ,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,33.663.683/0001-16 +417,Universidade Federal do Rio Grande do Norte ,UFRN,Pública,Brasil,RN,Natal,Federal,Executivo,Autarquia,Sim,24.365.710/0001-83 +430,Universidade Federal do Rio Grande do Sul ,UFRGS,Pública,Brasil,RS,Porto Alegre,Federal,Executivo,Autarquia,Sim,92.969.856/0001-98 +122381,Universidade Federal do Sul e Sudeste do Pará ,UNIFESSPA,Pública,Brasil,PA,Marabá,Federal,Executivo,Autarquia,Sim,18.657.063/0001-80 +459,Universidade Federal do Triângulo Mineiro ,UFTM,Pública,Brasil,MG,Uberaba,Federal,Executivo,Autarquia,Sim,25.437.484/0002-42 +460,Universidade Federal dos Vales do Jequitinhonha e Mucuri ,UFVJM,Pública,Brasil,MG,Diamantina,Federal,Executivo,Autarquia,Sim,16.888.315/0001-57 +427,Universidade Federal Fluminense ,UFF ,Pública,Brasil,RJ,Niterói,Federal,Executivo,Autarquia,Sim,28.523.215/0001-06 +457,Universidade Federal Rural da Amazônia ,UFRA,Pública,Brasil,PA,Belém,Federal,Executivo,Autarquia,Sim,05.200.001/0001-01 +433,Universidade Federal Rural de Pernambuco ,UFRPE,Pública,Brasil,PE,Recife,Federal,Executivo,Autarquia,Sim,24.416.174/0001-06 +432,Universidade Federal Rural do Rio de Janeiro ,UFRRJ,Pública,Brasil,RJ,Seropédica,Federal,Executivo,Autarquia,Sim,29.427.465/0001-05 +458,Universidade Federal Rural do Semi-Árido ,UFERSA-RN,Pública,Brasil,RN,Mossoró,Federal,Executivo,Autarquia,Sim,24.529.265/0001-40 +454,Universidade Tecnológica Federal do Paraná ,UTFPR,Pública,Brasil,PR,Curitiba,Federal,Executivo,Autarquia,Sim,75.101.873/0001-90 +1800,"Engenharia, Construções e Ferrovias S.A",VALEC,Pública,Brasil,DF,Brasilia,Federal,Executivo,Empresa Pública,Sim,42.150.664/0001-87 +27,Gabinete de Segurança Institucional ,GSI,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,09.399.736/0001-59 +2837,Casa Civil da Presidência da República,CC-PR,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Não,00.394.411/0001-09 +68487,Secretaria de Políticas de Promoção da Igualdade Racial da Presidência da República,SEPPIR,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Não,06.064.438/0001-10 +121813,Secretaria da Micro e Pequena Empresa,SMPE,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Não,18.299.670/0001-16 +91624,Secretaria de Comunicação Social da Presidência da República,SECOM-PR,Pública,Brasil,PR,Curitiba,Federal,Executivo,Administração Direta,Não,09.234.494/0001-43 +73212,Secretaria de Assuntos Estratégicos da Presidência da República,SAE/PR,Pública,Brasil,PR,Curitiba,Federal,Executivo,Administração Direta,Não,10.246.869/0001-74 +76917,Secretaria de Relações Institucionais da Presidência da República,SEPPIR,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Não,10.433.248/0001-08 +68487,Secretaria de Políticas para as Mulheres da Presidência da República,SPM,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Não,05.510.958/0001-46 +1408,Vice-Presidência da República,VPR,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Não,00.894.355/0001-71 +72582,Secretaria Nacional de Articulação,SNAS-SGPR,Pública,Brasil,PR,Brasilia,Federal,Executivo,Administração Direta,Não,08.962.126/0001-59 +81129,Conselho Nacional de Juventude,CNJ,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Não,07.421.906/0001-29 +115549,Secretaria de Aeroportos,SA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Não,00.394.460/0133-91 +473,Fundação Universidade Federal de Ouro Preto,UFOP,Pública,Brasil,MG,Ouro Preto,Federal,Executivo,Fundação,Não,23.070.659/0001-10 +476,Fundação Universidade Federal do Rio Grande,FURG,Pública,Brasil,RG,Rio Grande,Federal,Executivo,Fundação,Não,94.877.586/0001-10 +258,Hospital de Clínicas de Porto Alegre,HCPA,Pública,Brasil,RG,Porto Alegre,Federal,Executivo,Empresa Pública,Não,87.020.517/0001-20 +100902,"Instituto Federal de Educação, Ciência e Tecnologia Sudeste de Minas Gerais",IFMGSE,Pública,Brasil,MG,João Monlevade,Federal,Executivo,Autarquia,Não,10.723.648/0001-40 +456,"Instituto Federal de Educação, Ciência e Tecnologia Sul-Rio-Grandense",IFSul,Pública,Brasil,RS,Osório,Federal,Executivo,Autarquia,Não,10.729.992/0001-46 +100906,"Instituto Federal de Educação, Ciência e Tecnologia de Farroupilha",IFFAR,Pública,Brasil,RS,Santa Maria,Federal,Executivo,Autarquia,Não,10.662.072/0001-58 +100908,"Instituto Federal de Educação, Ciência e Tecnologia de Tocantins",IFTO,Pública,Brasil,TO,Palmas,Federal,Executivo,Autarquia,Não,10.742.006/0001-98 +47838,Centrais de Abastecimento de Minas Gerais S.A.,CEASA-MG,Pública,Brasil,MG,Governador Valadares,Federal,Executivo,Sociedade de Economia Mista,Não,17.504.325/0001-04 +2114,Companhia Nacional de Abastecimento,CONAB,Pública,Brasil,DF,Brasilia,Federal,Executivo,Empresa Pública,Não,26.461.699/0001-80 +47839,Companhia de Armazéns e Silos do Estado de Minas Gerais,CASEMG,Pública,Brasil,MG,Passos,Federal,Executivo,Sociedade de Economia Mista,Não,17.186.370/0065-22 +29415,Companhia de Entrepostos e Armazéns Gerais de São Paulo,CEAGESP,Pública,Brasil,SP,Vila Leopoldina,Federal,Executivo,Sociedade de Economia Mista,Não,62.463.005/0001-08 +25,Empresa Brasileira de Pesquisa Agropecuária,EMBRAPA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Empresa Pública,Não,00.348.003/0001-10 +98519,Centro Nacional de Tecnologia Eletrônica Avançada S. A,CEITEC/S.A.,Pública,Brasil,RS,Lomba Pinheiro,Federal,Executivo,Empresa Pública,Não,05.114.927/0001-76 +223,Comissão Nacional de Energia Nuclear,CNEN,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Não,00.402.552/0001-26 +228,Indústrias Nucleares do Brasil S/A,INB,Pública,Brasil,DF,Brasilia,Federal,Executivo,Sociedade de Economia Mista,Não,00.322.818/0038-12 +48739,Nuclebrás Equipamentos Pesados S/A,NUCLEP,Pública,Brasil,RJ,Castelo,Federal,Executivo,Sociedade de Economia Mista,Não,42.515.882/0003-30 +1,Financiadora de Estudos e Projetos,FINEP,Pública,Brasil,DF,Brasilia,Federal,Executivo,Empresa Pública,Não,88.630.413/0002-81 +1782,Fundação Cultural Palmares,FCP,Pública,Brasil,DF,Brasilia,Federal,Executivo,Fundação,Não,32.901.688/0001-77 +930,Caixa de Financiamento Imobiliário da Aeronáutica,CFIAE,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Não,30.496.004/0001-73 +185,Comando da Marinha,CMAR,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Não,00.394.502/0001-44 +200949,Amazônia Azul Tecnologias de Defesa S.A.,AMAZUL,Pública,Brasil,DF,Brasilia,Federal,Executivo,Empresa Pública,Não,18.910.028/0001-21 +208,Caixa de Construções de Casas para o Pessoal da Marinha,CCCPCM,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Não,03.332.937/0001-52 +957,Fundação Habitacional do Exército,FHE,Pública,Brasil,DF,Brasilia,Federal,Executivo,Fundação Pública,Não,00.643.742/0001-35 +8406,Fundação Osório,FOSORIO,Pública,Brasil,DF,Brasilia,Federal,Executivo,Fundação Pública,Não,34.143.842/0001-14 +134,Indústria de Material Bélico do Brasil,IMBEL,Pública,Brasil,DF,Brasilia,Federal,Executivo,Empresa Pública,Não,00.444.232/0001-39 +445,Centro Federal de Educação Tecnológica de Minas Gerais,CEFET-MG,Pública,Brasil,MG,Belo Horizonte,Federal,Executivo,Autarquia,Não,17.220.203/0001-96 +117267,Empresa Brasileira de Serviços Hospitalares,EBSERH,Pública,Brasil,MG,Belo Horizonte,Federal,Executivo,Empresa Pública,Não,15.126.437/0001-43 diff --git a/src/noosfero-spb/spb_migrations/lib/spb_migrations_plugin.rb b/src/noosfero-spb/spb_migrations/lib/spb_migrations_plugin.rb new file mode 100644 index 0000000..fc7c7d2 --- /dev/null +++ b/src/noosfero-spb/spb_migrations/lib/spb_migrations_plugin.rb @@ -0,0 +1,13 @@ +class SpbMigrationsPlugin < Noosfero::Plugin + + def self.plugin_name + # FIXME + "SpbMigrationsPlugin" + end + + def self.plugin_description + # FIXME + _("A plugin that does this and that.") + end + +end diff --git a/src/software_communities/.gitignore b/src/software_communities/.gitignore deleted file mode 100644 index 0675847..0000000 --- a/src/software_communities/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -# Backup files -*~ -*.swp -config/institutions_update -config/siorg.yml -locale diff --git a/src/software_communities/README.md b/src/software_communities/README.md deleted file mode 100644 index e9c287a..0000000 --- a/src/software_communities/README.md +++ /dev/null @@ -1,94 +0,0 @@ -[![Code Climate](https://codeclimate.com/github/fabio1079/noosfero-plugin/badges/gpa.svg)](https://codeclimate.com/github/fabio1079/noosfero-plugin) - -README - MPOG Software Público Plugin -================================ - -MPOG Software Público Plugin is a plugin that includes features to Novo Portal do Software Público Brasileiro (SPB). - -More information about SPB: https://www.participa.br/softwarepublico - -INSTALL -======= - -Enable Plugin -------------- - -Also, you need to enable MPOG Software Plugin on your Noosfero: - -cd -./script/noosfero-plugins enable software_communities - -Activate Plugin ---------------- - -As a Noosfero administrator user, go to administrator panel: - -- Execute the command to allow city and states to show up: - psql -U USERNAME -d NOOSFERO_DATABASE -a -f db/brazil_national_regions.sql -- Click on "Enable/disable plugins" option -- Click on "MPOG Software Plugin" check-box - -Schedule Institutions Update ----------------------------- - -./plugins/software_communities/script/schedule_institution_update.sh - - -Create Categories -------------------- - -To create the categories that a software can have run - -rake software:create_categories - -Create Licenses ------------------ - -This command populate the database with 71 licenses and it's links -rake software:create_licenses - -Translate Plugin ------------------- - -To translate the strings used in the plugin run - -ruby script/move-translations-to-plugins.rb -rake updatepo -rake noosfero:translations:compile - - -Running MPOG Software tests --------------------- -$ ruby plugins/software_communities/test/unit/name_of_file.rb -$ cucumber plugins/software_communities/features/ - -Get Involved -============ - -If you find any bug and/or want to collaborate, please send an e-mail to arthurmde@gmail.com - -LICENSE -======= - -Copyright (c) The Author developers. - -See Noosfero license. - - -AUTHORS -======= - -Alex Campelo (campelo.al1 at gmail.com) -Arthur de Moura Del Esposte (arthurmde at gmail.com) -Daniel Bucher (daniel.bucher88 at gmail.com) -David Carlos (ddavidcarlos1392 at gmail.com) -Fabio Teixeira (fabio1079 at gmail.com) -Gustavo Jaruga (darksshades at gmail.com) -Luciano Prestes (lucianopcbr at gmail.com) -Matheus Faria (matheus.sousa.faria at gmail.com) - - -ACKNOWLEDGMENTS -=============== - -The authors have been supported by MPOG and UnB diff --git a/src/software_communities/Rakefile b/src/software_communities/Rakefile deleted file mode 100644 index 0de7903..0000000 --- a/src/software_communities/Rakefile +++ /dev/null @@ -1,11 +0,0 @@ -task :default => :makemo - -task :makemo do - require 'gettext' - require 'gettext/tools' - GetText.create_mofiles( - verbose: true, - po_root: 'po', - mo_root: 'locale', - ) -end diff --git a/src/software_communities/controllers/software_communities_plugin_controller.rb b/src/software_communities/controllers/software_communities_plugin_controller.rb deleted file mode 100644 index d3bb2c5..0000000 --- a/src/software_communities/controllers/software_communities_plugin_controller.rb +++ /dev/null @@ -1,54 +0,0 @@ -# apenas software -require 'csv' -class SoftwareCommunitiesPluginController < ApplicationController - - def get_license_data - return render :json=>{} if !request.xhr? || params[:query].nil? - - data = if params[:query].empty? - LicenseInfo.all - else - LicenseInfo.where("version ILIKE ?", "%#{params[:query]}%").select("id, version") - end - render :json=> data.collect { |license| - {:id=>license.id, :label=>license.version} - } - - end - - def get_block_template - render 'box_organizer/_download_list_template', :layout => false - end - - def get_field_data - condition = !request.xhr? || params[:query].nil? || params[:field].nil? - return render :json=>{} if condition - - model = get_model_by_params_field - - data = model.where("name ILIKE ?", "%#{params[:query]}%").select("id, name") - .collect { |db| - {:id=>db.id, :label=>db.name} - } - - other = [model.select("id, name").last].collect { |db| - {:id=>db.id, :label=>db.name} - } - - # Always has other in the list - data |= other - - render :json=> data - end - - protected - - def get_model_by_params_field - case params[:field] - when "software_language" - return ProgrammingLanguage - else - return DatabaseDescription - end - end -end diff --git a/src/software_communities/controllers/software_communities_plugin_myprofile_controller.rb b/src/software_communities/controllers/software_communities_plugin_myprofile_controller.rb deleted file mode 100644 index 256539a..0000000 --- a/src/software_communities/controllers/software_communities_plugin_myprofile_controller.rb +++ /dev/null @@ -1,194 +0,0 @@ -class SoftwareCommunitiesPluginMyprofileController < MyProfileController - append_view_path File.join(File.dirname(__FILE__) + '/../views') - - def index - end - - def new_software - set_software_as_template - - @community = Community.new(params[:community]) - @community.environment = environment - @software_info = SoftwareInfo.new(params[:software_info]) - - @license_info = if params[:license].blank? or params[:license][:license_infos_id].blank? - LicenseInfo.new - else - LicenseInfo.find(params[:license][:license_infos_id]) - end - - control_software_creation - update_new_software_errors - end - - def edit_software - update_software_atributes - - return unless request.post? - - @software_info = constroy_software - software_info_insert_models.call(@list_libraries, 'libraries') - software_info_insert_models.call(@list_languages, 'software_languages') - software_info_insert_models.call(@list_databases, 'software_databases') - software_info_insert_models.call(@list_operating_systems, 'operating_systems') - - begin - @software_info.save! - - @community = @software_info.community - @community.update_attributes!(params[:community]) - - if params[:commit] == _('Save and Configure Community') - redirect_to :controller => 'profile_editor', :action => 'edit' - else - redirect_to :controller => 'profile_editor', :action => 'index' - session[:notice] = _('Software updated successfully') - end - rescue ActiveRecord::RecordInvalid => invalid - update_new_software_errors - session[:notice] = _('Could not update software') - end - end - - def disabled_public_software_field - !environment.admins.include?(current_user.person) - end - - private - - def add_software_erros - @errors = [] - @errors |= @community.errors.full_messages if @community - @errors |= @software_info.errors.full_messages if @software_info - @errors |= @license_info.errors.full_messages if @license_info - end - - def control_software_creation - valid_models = request.post? && (@community.valid? && @software_info.valid? && @license_info.valid?) - if valid_models - send_software_to_moderation - else - add_software_erros - end - end - - def software_info_insert_models - proc { |list,model_attr| - @software_info.send(model_attr).destroy_all - list.collect!{|m| @software_info.send(model_attr) << m } unless list.nil? - } - end - - def constroy_software - @software_info = @profile.software_info - params[:software][:public_software] ||= false unless @software_info.public_software? - @license = LicenseInfo.find(params[:license][:license_infos_id]) - @software_info.license_info = @license - @software_info.update_attributes(params[:software]) - - another_license_version = nil - another_license_link = nil - if params[:license] - another_license_version = params[:license][:version] - another_license_link = params[:license][:link] - end - - @software_info.verify_license_info(another_license_version, another_license_link) - - create_list_model_helpers - - @software_info - end - - def create_list_model_helpers - @list_libraries = LibraryHelper.list_library(params[:library]) - @list_languages = SoftwareLanguageHelper.list_language(params[:language]) - @list_databases = DatabaseHelper.list_database(params[:database]) - @list_operating_systems = OperatingSystemHelper.list_operating_system(params[:operating_system]) - end - - def send_software_to_moderation - another_license_version = "" - another_license_link = "" - if params[:license] - another_license_version = params[:license][:version] - another_license_link = params[:license][:link] - end - @software_info = SoftwareInfo.create_after_moderation(user, - params[:software_info].merge({ - :environment => environment, - :name => params[:community][:name], - :identifier => params[:community][:identifier], - :image_builder => params[:community][:image_builder], - :license_info => @license_info, - :another_license_version => another_license_version, - :another_license_link => another_license_link })) - - add_admin_to_community - - if !environment.admins.include?(current_user.person) - session[:notice] = _('Your new software request will be evaluated by an'\ - 'administrator. You will be notified.') - redirect_to user.admin_url - else - redirect_to :controller => 'profile_editor', - :action => 'edit', - :profile => @community.identifier - end - end - - def update_software_atributes - @software_info = @profile.software_info - @list_libraries = @software_info.libraries - @list_databases = @software_info.software_databases - @list_languages = @software_info.software_languages - @list_operating_systems = @software_info.operating_systems - @disabled_public_software_field = disabled_public_software_field - - @license_version = @software_info.license_info.version - @license_id = @software_info.license_info.id - @another_license_version = "" - @another_license_link = "" - - license_another = LicenseInfo.find_by_version("Another") - if license_another && @software_info.license_info_id == license_another.id - @license_version = "Another" - @another_license_version = @software_info.license_info.version - @another_license_link = @software_info.license_info.link - end - end - - def set_software_as_template - software_template = Community['software'] - software_valid = !software_template.blank? && software_template.is_template && !params['community'].blank? - if software_valid - params['community']['template_id'] = software_template.id if software_valid - end - end - - def add_admin_to_community - unless params[:q].nil? - admins = params[:q].split(/,/).map{ |n| environment.people.find n.to_i } - admins.each do |admin| - @community.add_member(admin) - @community.add_admin(admin) - end - end - end - - def update_new_software_errors - if request.post? - @community.valid? if @community - @software_info.valid? if @software_info - @license_info.valid? if @license_info - add_software_erros - end - - - @error_community_name = @community.errors.include?(:name) ? "highlight-error" : "" if @community - @error_software_acronym = @software_info.errors.include?(:acronym) ? "highlight-error" : "" if @software_info - @error_software_domain = @community.errors.include?(:identifier) ? "highlight-error" : "" if @community - @error_software_finality = @software_info.errors.include?(:finality) ? "highlight-error" : "" if @software_info - @error_software_license = @license_info.errors.include?(:version) ? "highlight-error" : "" if @license_info - end -end diff --git a/src/software_communities/controllers/software_communities_plugin_profile_controller.rb b/src/software_communities/controllers/software_communities_plugin_profile_controller.rb deleted file mode 100644 index 9f80e73..0000000 --- a/src/software_communities/controllers/software_communities_plugin_profile_controller.rb +++ /dev/null @@ -1,49 +0,0 @@ -class SoftwareCommunitiesPluginProfileController < ProfileController - append_view_path File.join(File.dirname(__FILE__) + '/../views') - - before_filter :validate_download_params, only: [:download_file] - - ERROR_MESSAGES = { - :not_found => _("Could not find the download file"), - :invalid_params => _("Invalid download params") - } - - def download_file - download_block = DownloadBlock.find_by_id params[:block] - index = params[:download_index].to_i - - if download_block and (index < download_block.downloads.size) - download = Download.new(download_block.downloads[index]) - - download.total_downloads += 1 - download_block.downloads[index] = download.to_hash - download_block.save - - redirect_to download.link - else - session[:notice] = ERROR_MESSAGES[:not_found] - render_not_found - end - end - - private - - def validate_download_params - valid_block = (!params[:block].nil?) and (params[:block].to_i > 0) - valid_index = params[:download_index].to_i >= 0 - - if !valid_block or !valid_index - session[:notice] = ERROR_MESSAGES[:invalid_params] - safe_redirect_back - end - end - - def safe_redirect_back - begin - redirect_to :back - rescue ActionController::RedirectBackError - # There is no :back if it is a copied url - render_not_found - end - end -end diff --git a/src/software_communities/db/migrate/20140523132016_create_controlled_vocabulary_table.rb b/src/software_communities/db/migrate/20140523132016_create_controlled_vocabulary_table.rb deleted file mode 100644 index 8b5ec6e..0000000 --- a/src/software_communities/db/migrate/20140523132016_create_controlled_vocabulary_table.rb +++ /dev/null @@ -1,35 +0,0 @@ -class CreateControlledVocabularyTable < ActiveRecord::Migration - def up - create_table :controlled_vocabulary do |t| - t.references :software_info - t.boolean :administration - t.boolean :agriculture - t.boolean :business_and_services - t.boolean :communication - t.boolean :culture - t.boolean :national_defense - t.boolean :economy_and_finances - t.boolean :education - t.boolean :energy - t.boolean :sports - t.boolean :habitation - t.boolean :industry - t.boolean :environment - t.boolean :research_and_development - t.boolean :social_security - t.boolean :social_protection - t.boolean :international_relations - t.boolean :sanitation - t.boolean :health - t.boolean :security_public_order - t.boolean :work - t.boolean :transportation - t.boolean :urbanism - - end - end - - def down - drop_table :controlled_vocabulary - end -end diff --git a/src/software_communities/db/migrate/20140528193902_create_license_infos_table.rb b/src/software_communities/db/migrate/20140528193902_create_license_infos_table.rb deleted file mode 100644 index 0024f7d..0000000 --- a/src/software_communities/db/migrate/20140528193902_create_license_infos_table.rb +++ /dev/null @@ -1,15 +0,0 @@ -class CreateLicenseInfosTable < ActiveRecord::Migration - def self.up - create_table :license_infos do |t| - t.string :version - t.string :link - end - - link = "http://creativecommons.org/licenses/GPL/2.0/legalcode.pt" - LicenseInfo.create(:version => "CC-GPL-V2", :link => link) - end - - def self.down - drop_table :license_infos - end -end diff --git a/src/software_communities/db/migrate/20140528193905_create_software_infos_table.rb b/src/software_communities/db/migrate/20140528193905_create_software_infos_table.rb deleted file mode 100644 index 5d7944a..0000000 --- a/src/software_communities/db/migrate/20140528193905_create_software_infos_table.rb +++ /dev/null @@ -1,23 +0,0 @@ -class CreateSoftwareInfosTable < ActiveRecord::Migration - def self.up - create_table :software_infos do |t| - t.references :license_info - t.references :community - t.boolean :e_mag, :default => false - t.boolean :icp_brasil,:default => false - t.boolean :intern, :default => false - t.boolean :e_ping, :default => false - t.boolean :e_arq, :default => false - t.string :name, :default => ' ' - t.string :operating_platform - t.string :demonstration_url - t.string :acronym - t.text :objectives - t.text :features - end - end - - def self.down - drop_table :software_infos - end -end diff --git a/src/software_communities/db/migrate/20140528193927_create_libraries_table.rb b/src/software_communities/db/migrate/20140528193927_create_libraries_table.rb deleted file mode 100644 index 3200454..0000000 --- a/src/software_communities/db/migrate/20140528193927_create_libraries_table.rb +++ /dev/null @@ -1,14 +0,0 @@ -class CreateLibrariesTable < ActiveRecord::Migration - def self.up - create_table :libraries do |t| - t.string :name - t.string :version - t.string :license - t.references :software_info - end - end - - def self.down - drop_table :libraries - end -end diff --git a/src/software_communities/db/migrate/20140528193956_create_programming_languages_table.rb b/src/software_communities/db/migrate/20140528193956_create_programming_languages_table.rb deleted file mode 100644 index 2c939eb..0000000 --- a/src/software_communities/db/migrate/20140528193956_create_programming_languages_table.rb +++ /dev/null @@ -1,13 +0,0 @@ -class CreateProgrammingLanguagesTable < ActiveRecord::Migration - def self.up - create_table :programming_languages do |t| - t.string :name - end - - SoftwareHelper.create_list_with_file("plugins/software_communities/public/static/languages.txt", ProgrammingLanguage) - end - - def self.down - drop_table :programming_languages - end -end diff --git a/src/software_communities/db/migrate/20140528194044_create_database_descriptions_table.rb b/src/software_communities/db/migrate/20140528194044_create_database_descriptions_table.rb deleted file mode 100644 index af2dda7..0000000 --- a/src/software_communities/db/migrate/20140528194044_create_database_descriptions_table.rb +++ /dev/null @@ -1,14 +0,0 @@ -class CreateDatabaseDescriptionsTable < ActiveRecord::Migration - def self.up - create_table :database_descriptions do |t| - t.string :name - end - - path_to_file = "plugins/software_communities/public/static/databases.txt" - SoftwareHelper.create_list_with_file(path_to_file, DatabaseDescription) - end - - def self.down - drop_table :database_descriptions - end -end diff --git a/src/software_communities/db/migrate/20140528194129_create_software_databases_table.rb b/src/software_communities/db/migrate/20140528194129_create_software_databases_table.rb deleted file mode 100644 index a70c4b7..0000000 --- a/src/software_communities/db/migrate/20140528194129_create_software_databases_table.rb +++ /dev/null @@ -1,14 +0,0 @@ -class CreateSoftwareDatabasesTable < ActiveRecord::Migration - def self.up - create_table :software_databases do |t| - t.string :version - t.string :operating_system - t.references :database_description - t.references :software_info - end - end - - def self.down - drop_table :software_databases - end -end diff --git a/src/software_communities/db/migrate/20140528211914_create_software_languages_table.rb b/src/software_communities/db/migrate/20140528211914_create_software_languages_table.rb deleted file mode 100644 index b08a37c..0000000 --- a/src/software_communities/db/migrate/20140528211914_create_software_languages_table.rb +++ /dev/null @@ -1,14 +0,0 @@ -class CreateSoftwareLanguagesTable < ActiveRecord::Migration - def self.up - create_table :software_languages do |t| - t.references :software_info - t.references :programming_language - t.string :version - t.string :operating_system - end - end - - def self.down - drop_table :software_languages - end -end diff --git a/src/software_communities/db/migrate/20140710185444_create_operating_system_table.rb b/src/software_communities/db/migrate/20140710185444_create_operating_system_table.rb deleted file mode 100644 index 1d5bcdc..0000000 --- a/src/software_communities/db/migrate/20140710185444_create_operating_system_table.rb +++ /dev/null @@ -1,13 +0,0 @@ -class CreateOperatingSystemTable < ActiveRecord::Migration - def up - create_table :operating_systems do |t| - t.string :name - t.string :version - t.references :software_info - end - end - - def down - drop_table :operating_systems - end -end diff --git a/src/software_communities/db/migrate/20140711144012_remove_name_from_software_info.rb b/src/software_communities/db/migrate/20140711144012_remove_name_from_software_info.rb deleted file mode 100644 index 4a72d82..0000000 --- a/src/software_communities/db/migrate/20140711144012_remove_name_from_software_info.rb +++ /dev/null @@ -1,9 +0,0 @@ -class RemoveNameFromSoftwareInfo < ActiveRecord::Migration - def up - remove_column :software_infos, :name - end - - def down - add_column :software_infos, :name, :string - end -end diff --git a/src/software_communities/db/migrate/20140714133901_create_operating_name_table.rb b/src/software_communities/db/migrate/20140714133901_create_operating_name_table.rb deleted file mode 100644 index 610bcec..0000000 --- a/src/software_communities/db/migrate/20140714133901_create_operating_name_table.rb +++ /dev/null @@ -1,14 +0,0 @@ -class CreateOperatingNameTable < ActiveRecord::Migration - def up - create_table :operating_system_names do |t| - t.string :name - end - - path_to_file = "plugins/software_communities/public/static/operating_systems.txt" - SoftwareHelper.create_list_with_file(path_to_file, OperatingSystemName) - end - - def down - drop_table :operating_system_names - end -end diff --git a/src/software_communities/db/migrate/20140714135007_change_operating_systems_table.rb b/src/software_communities/db/migrate/20140714135007_change_operating_systems_table.rb deleted file mode 100644 index 313bb17..0000000 --- a/src/software_communities/db/migrate/20140714135007_change_operating_systems_table.rb +++ /dev/null @@ -1,16 +0,0 @@ -class ChangeOperatingSystemsTable < ActiveRecord::Migration - def up - change_table :operating_systems do |t| - t.remove :name - t.references :operating_system_name - end - - end - - def down - change_table :operating_systems do |t| - t.string :name - t.remove :operating_system_name_id - end - end -end diff --git a/src/software_communities/db/migrate/20140909185547_rename_controlled_vocabulary_to_software_categories.rb b/src/software_communities/db/migrate/20140909185547_rename_controlled_vocabulary_to_software_categories.rb deleted file mode 100644 index 0d9a7b1..0000000 --- a/src/software_communities/db/migrate/20140909185547_rename_controlled_vocabulary_to_software_categories.rb +++ /dev/null @@ -1,9 +0,0 @@ -class RenameControlledVocabularyToSoftwareCategories < ActiveRecord::Migration - def up - rename_table :controlled_vocabulary, :software_categories - end - - def down - rename_table :software_categories, :controlled_vocabulary - end -end diff --git a/src/software_communities/db/migrate/20141007140419_add_finality_field_to_software_table.rb b/src/software_communities/db/migrate/20141007140419_add_finality_field_to_software_table.rb deleted file mode 100644 index 941ce26..0000000 --- a/src/software_communities/db/migrate/20141007140419_add_finality_field_to_software_table.rb +++ /dev/null @@ -1,9 +0,0 @@ -class AddFinalityFieldToSoftwareTable < ActiveRecord::Migration - def up - add_column :software_infos, :finality, :string, :limit => 140 - end - - def down - remove_column :software_info, :finality - end -end diff --git a/src/software_communities/db/migrate/20141013193939_add_repository_link_to_software.rb b/src/software_communities/db/migrate/20141013193939_add_repository_link_to_software.rb deleted file mode 100644 index 61c557e..0000000 --- a/src/software_communities/db/migrate/20141013193939_add_repository_link_to_software.rb +++ /dev/null @@ -1,9 +0,0 @@ -class AddRepositoryLinkToSoftware < ActiveRecord::Migration - def up - add_column :software_infos, :repository_link, :string - end - - def down - remove_column :software_infos, :repository_link - end -end diff --git a/src/software_communities/db/migrate/20141103180655_add_public_software_field_validation.rb b/src/software_communities/db/migrate/20141103180655_add_public_software_field_validation.rb deleted file mode 100644 index 563c2ee..0000000 --- a/src/software_communities/db/migrate/20141103180655_add_public_software_field_validation.rb +++ /dev/null @@ -1,9 +0,0 @@ -class AddPublicSoftwareFieldValidation < ActiveRecord::Migration - def up - add_column :software_infos, :public_software, :boolean, :default => false - end - - def down - remove_column :software_infos, :public_software - end -end diff --git a/src/software_communities/db/migrate/20141105173616_add_first_edit_to_software.rb b/src/software_communities/db/migrate/20141105173616_add_first_edit_to_software.rb deleted file mode 100644 index a8b058e..0000000 --- a/src/software_communities/db/migrate/20141105173616_add_first_edit_to_software.rb +++ /dev/null @@ -1,9 +0,0 @@ -class AddFirstEditToSoftware < ActiveRecord::Migration - def up - add_column :software_infos, :first_edit, :boolean, :default => true - end - - def down - remove_column :software_infos, :first_edit - end -end diff --git a/src/software_communities/db/migrate/20141216183111_remove_operating_system_from_software_database.rb b/src/software_communities/db/migrate/20141216183111_remove_operating_system_from_software_database.rb deleted file mode 100644 index 6dcdf7e..0000000 --- a/src/software_communities/db/migrate/20141216183111_remove_operating_system_from_software_database.rb +++ /dev/null @@ -1,9 +0,0 @@ -class RemoveOperatingSystemFromSoftwareDatabase < ActiveRecord::Migration - def up - remove_column :software_databases, :operating_system - end - - def down - add_column :software_databases, :operating_system, :string - end -end diff --git a/src/software_communities/db/migrate/20141216183459_remove_operating_system_from_software_language.rb b/src/software_communities/db/migrate/20141216183459_remove_operating_system_from_software_language.rb deleted file mode 100644 index deb0f3f..0000000 --- a/src/software_communities/db/migrate/20141216183459_remove_operating_system_from_software_language.rb +++ /dev/null @@ -1,9 +0,0 @@ -class RemoveOperatingSystemFromSoftwareLanguage < ActiveRecord::Migration - def up - remove_column :software_languages, :operating_system - end - - def down - add_column :software_languages, :operating_system, :string - end -end diff --git a/src/software_communities/db/migrate/20150209170529_add_settings_field_to_software_info.rb b/src/software_communities/db/migrate/20150209170529_add_settings_field_to_software_info.rb deleted file mode 100644 index c75c536..0000000 --- a/src/software_communities/db/migrate/20150209170529_add_settings_field_to_software_info.rb +++ /dev/null @@ -1,9 +0,0 @@ -class AddSettingsFieldToSoftwareInfo < ActiveRecord::Migration - def up - add_column :software_infos, :settings, :text - end - - def down - remove_column :software_info, :settings - end -end diff --git a/src/software_communities/db/migrate/20150210182519_rename_cc_license.rb b/src/software_communities/db/migrate/20150210182519_rename_cc_license.rb deleted file mode 100644 index 9cc7fc8..0000000 --- a/src/software_communities/db/migrate/20150210182519_rename_cc_license.rb +++ /dev/null @@ -1,13 +0,0 @@ -class RenameCcLicense < ActiveRecord::Migration - def up - license = LicenseInfo.find_by_version "CC-GPL-V2" - license.version = "Creative Commons GPL V2" - license.save! - end - - def down - license = LicenseInfo.find_by_version "Creative Commons GPL V2" - license.version = "CC-GPL-V2" - license.save! - end -end diff --git a/src/software_communities/db/migrate/20150914185902_add_people_benefited_and_saved_value_to_organization_rating.rb b/src/software_communities/db/migrate/20150914185902_add_people_benefited_and_saved_value_to_organization_rating.rb deleted file mode 100644 index d6c186c..0000000 --- a/src/software_communities/db/migrate/20150914185902_add_people_benefited_and_saved_value_to_organization_rating.rb +++ /dev/null @@ -1,11 +0,0 @@ -class AddPeopleBenefitedAndSavedValueToOrganizationRating < ActiveRecord::Migration - def up - add_column :organization_ratings, :people_benefited, :integer - add_column :organization_ratings, :saved_value, :decimal - end - - def down - remove_column :organization_ratings, :people_benefited - remove_column :organization_ratings, :saved_value - end -end diff --git a/src/software_communities/features/deactivate_user.feature b/src/software_communities/features/deactivate_user.feature deleted file mode 100644 index a6dccdc..0000000 --- a/src/software_communities/features/deactivate_user.feature +++ /dev/null @@ -1,45 +0,0 @@ -Feature: deactivate user - As a environment admin - I want to be able deactivate my account - So that user data remains persisted and allows the reactivation of the account - - Background: - Given "SoftwareCommunitiesPlugin" plugin is enabled - And I am logged in as mpog_admin - And I go to /admin/plugins - And I check "SoftwareCommunitiesPlugin" - And I press "Save changes" - And I go to /account/logout - And the following users - | login | name | email | - | joaosilva | Joao Silva | joaosilva@example.com | - And I am logged in as "joaosilva" - - - @selenium-fixme - Scenario: successfull deactivation - Given I go to joaosilva's control panel - And I follow "Edit Profile" - And I follow "Delete profile" - And I follow "Yes, I am sure" - Then I am not logged in - When I go to /profile/joaosilva - Then I should see "This profile is inaccessible." - - @selenium-fixme - Scenario: successfull reactivation of account - Given I go to joaosilva's control panel - And I follow "Edit Profile" - And I follow "Delete profile" - And I follow "Yes, I am sure" - And I go to the homepage - When I follow "Login" - And I follow "New user" - And I fill in the following within ".no-boxes": - | e-Mail | joaosilva@example.com | - | Full name | 123 | - And I follow "Reactive account" - And I fill in the following within ".no-boxes": - | Username or Email | joaosilva@example.com | - And I press "Send instructions" - Then I should see "An e-mail was just sent to your e-mail address" diff --git a/src/software_communities/features/public_software_validation.feature b/src/software_communities/features/public_software_validation.feature deleted file mode 100644 index 6f26b1d..0000000 --- a/src/software_communities/features/public_software_validation.feature +++ /dev/null @@ -1,49 +0,0 @@ -Feature: edit adherent fields - As a user - I want to edit adherent fields - to mantain my public software up to date. - - Background: - Given "SoftwareCommunitiesPlugin" plugin is enabled - And the following users - | login | name | email | - | joaosilva | Joao Silva | joaosilva@example.com | - | mariasilva | Maria Silva | mariasilva@example.com | - And the following softwares - | name | public_software | finality | - | basic software | true | basic software finality | - And SoftwareInfo has initial default values on database - And I am logged in as mpog_admin - And I go to /admin/plugins - And I check "SoftwareCommunitiesPlugin" - Then I press "Save changes" - - Scenario: Disable public software checkbox to non admin users - Given I am logged in as "joaosilva" - And I go to /myprofile/basic-software/plugin/software_communities/edit_software - And I follow "Specifications" - Then I should see "Public software" within ".public_software_disabled" - - Scenario: Enable public software checkbox to admin users - Given I am logged in as mpog_admin - And I go to /myprofile/basic-software/plugin/software_communities/edit_software - And I follow "Specifications" - Then I should see "Public software" within ".public_software_enabled" - - @selenium - Scenario: Show adherent fields when checkbox are checked - Given I am logged in as mpog_admin - And I go to /myprofile/basic-software/plugin/software_communities/edit_software - And I follow "Specifications" - And I uncheck "software[public_software]" - And I check "software[public_software]" - Then I should see "Adherent to e-ping ?" - - @selenium - Scenario: Don't show adherent fields when checkbox are not checked - Given I am logged in as mpog_admin - And I go to /myprofile/basic-software/plugin/software_communities/edit_software - And I follow "Specifications" - And I check "software[public_software]" - And I uncheck "software[public_software]" - Then I should not see "Adherent to e-ping ?" diff --git a/src/software_communities/features/software_block.feature b/src/software_communities/features/software_block.feature deleted file mode 100644 index 1f8cf8b..0000000 --- a/src/software_communities/features/software_block.feature +++ /dev/null @@ -1,48 +0,0 @@ -Feature: edit adherent fields - As a user - I want to edit adherent fields - to mantain my public software up to date. - - Background: - Given "SoftwareCommunitiesPlugin" plugin is enabled - And I am logged in as mpog_admin - And I go to /admin/plugins - And I check "SoftwareCommunitiesPlugin" - And I press "Save changes" - And the following softwares - | name | public_software | finality | - | Public Software | true | some finality | - | Generic Software | false | some finality | - - Scenario: Add software block - Given I am logged in as mpog_admin - And I follow "Control panel" - And I follow "Edit sideboxes" - When I follow "Add a block" - And I choose "Softwares" - And I press "Add" - Then I should see "softwares" - - Scenario: Change software block to generic software block - Given I am logged in as mpog_admin - And I follow "Control panel" - And I follow "Edit sideboxes" - When I follow "Add a block" - And I choose "Softwares" - And I press "Add" - And I follow "Edit" within ".softwares-block" - And I select "Generic" from "block_software_type" - And I press "Save" - Then I should see "generic software" - - Scenario: Change software block to generic software block - Given I am logged in as mpog_admin - And I follow "Control panel" - And I follow "Edit sideboxes" - When I follow "Add a block" - And I choose "Softwares" - And I press "Add" - And I follow "Edit" within ".softwares-block" - And I select "Public" from "block_software_type" - And I press "Save" - Then I should see "public software" \ No newline at end of file diff --git a/src/software_communities/features/software_catalog.feature b/src/software_communities/features/software_catalog.feature deleted file mode 100644 index e0988cf..0000000 --- a/src/software_communities/features/software_catalog.feature +++ /dev/null @@ -1,82 +0,0 @@ -Feature: Search software - As a user - I want to be able to search catalogued software - So that I find a software that fit my needs - Background: - Given "SoftwareCommunitiesPlugin" plugin is enabled - And I am logged in as mpog_admin - And I go to /admin/plugins - And I check "SoftwareCommunitiesPlugin" - And I press "Save changes" - And I go to /account/logout - And the following categories - | name | display_in_menu | - | Software | true | - And the following categories - | parent | name | display_in_menu | - | Software | Health | true | - | Software | Education | true | - And the following softwares - | name | public_software | categories | finality | - | Software One | true | Health | some finality | - | Software Two | true | Health, Education | some finality | - | Software Three | false | Education | some finality | - - - Scenario: Show all "public_software" softwares when open search page - Given I go to /search/software_infos - Then I should see "Software One" - Then I should see "Software Two" - - Scenario: Show all "public_software" softwares when search software - Given I go to /search/software_infos - And I fill in "search-input" with "Software" - Then I should see "Software One" - Then I should see "Software Two" - - @selenium - Scenario: Show software "One" when searching for "Software One" - Given I go to /search/software_infos - And I fill in "search-input" with "One" - And I keyup on selector "#search-input" - Then I should see "Software One" - Then I should not see "Software Two" - - @selenium - Scenario: Show software ordered by name when "Name A-Z" is selected - Given I go to /search/software_infos - And I select "Name A-Z" from "sort" - And I press "Filter" - Then I should see "Software One" before "Software Two" - - @selenium - Scenario: Show software in reverse order by name when "Name Z-A" is selected - Given I go to /search/software_infos - And I select "Name Z-A" from "sort" - And I sleep for 3 seconds - Then I should see "Software Two" before "Software One" - - @selenium - Scenario: Show only "Software Two" when searching for "Education" category - Given I go to /search/software_infos - And I click on anything with selector "#filter-option-catalog-software" - And I check "Education" - Then I should see "Software Two" - And I should not see "Software One" - - @selenium - Scenario: Show both Software "One" and "Two" when searching for "Health" category - Given I go to /search/software_infos - And I click on anything with selector "#filter-option-catalog-software" - And I check "Health" - Then I should see "Software One" - And I should see "Software Two" - - @selenium - Scenario: Show not "public_software" when "Include in results" is checked - Given I go to /search/software_infos - And I click on anything with selector "#filter-option-catalog-software" - And I check "include_non_public" - Then I should see "Software One" - And I should see "Software Two" - And I should see "Software Three" diff --git a/src/software_communities/features/software_registration.feature b/src/software_communities/features/software_registration.feature deleted file mode 100644 index 86c7d7a..0000000 --- a/src/software_communities/features/software_registration.feature +++ /dev/null @@ -1,87 +0,0 @@ -Feature: edit public software information - As a user - I want to add public software information to a software - So that I can have software communities on my network - - Background: - Given "SoftwareCommunitiesPlugin" plugin is enabled - And SoftwareInfo has initial default values on database - And I am logged in as mpog_admin - And I go to /admin/plugins - And I check "SoftwareCommunitiesPlugin" - And I press "Save changes" - And I go to /myprofile/mpog-admin - And the following softwares - | name | public_software | finality | - | basic software | true | basic software finality | - - @selenium - Scenario: Show SoftwareLangue fields when click in New Language - Given I go to /myprofile/basic-software/plugin/software_communities/edit_software - When I follow "Specifications" - And I follow "New language" - And I should see "3" of this selector ".software-language-table" - And I follow "Delete" - Then I should see "2" of this selector ".software-language-table" - #3 because one is always hidden - - @selenium - Scenario: Show databasefields when click in New database - Given I go to /myprofile/basic-software/plugin/software_communities/edit_software - When I follow "Specifications" - And I follow "New Database" - And I should see "3" of this selector ".database-table" - And I follow "Delete" - Then I should see "2" of this selector ".database-table" - #3 because one is always hidden - - @selenium - Scenario: Software database name should be an autocomplete - Given I go to /myprofile/basic-software/plugin/software_communities/edit_software - When I follow "Specifications" - And I follow "New Database" - And I type in "my" in autocomplete list ".database_autocomplete" and I choose "MySQL" - Then selector ".database_autocomplete" should have any "MySQL" - - @selenium - Scenario: Software database name should be an autocomplete - Given I go to /myprofile/basic-software/plugin/software_communities/edit_software - When I follow "Specifications" - And I follow "New language" - And I type in "py" in autocomplete list ".language_autocomplete" and I choose "Python" - Then selector ".database_autocomplete" should have any "Python" - - @selenium - Scenario: Create software with all dynamic table fields filled - Given I go to /myprofile/basic-software/plugin/software_communities/edit_software - When I follow "Specifications" - And I follow "New language" - And I type in "py" in autocomplete list ".language_autocomplete" and I choose "Python" - And I fill in "language__version" with "1.2.3" - And I follow "New Database" - And I type in "my" in autocomplete list ".database_autocomplete" and I choose "MySQL" - And I fill in "database__version" with "4.5.6" - Then I press "Save" - And I follow "Software Info" - And I follow "Specifications" - And selector ".language_autocomplete" should have any "Python" - And selector "#language__version" should have any "1.2.3" - And selector ".database_autocomplete" should have any "MySQL" - And selector "#database__version" should have any "4.5.6" - - @selenium - Scenario: Show license link when a license is selected - Given I am on mpog-admin's control panel - And I follow "Create a new software" - And I fill in "community_name_id" with "another software" - And I fill in "community-identifier" with "another-software" - And I fill in "software_info_finality" with "another software finality" - And I type in "gp" in autocomplete list "#license_info_version" and I choose "GPL-2" - And I should see "Read license" within "#version_link" - And I press "Create" - And I should see "Configure Software Community" - And I press "Save" - And I should see "Control Panel" - And I follow "Software Info" - And I type in "gp" in autocomplete list "#license_info_version" and I choose "GPL-3" - Then I should see "Read license" within "#version_link" diff --git a/src/software_communities/features/step_definitions/software_communities_steps.rb b/src/software_communities/features/step_definitions/software_communities_steps.rb deleted file mode 100644 index e87447b..0000000 --- a/src/software_communities/features/step_definitions/software_communities_steps.rb +++ /dev/null @@ -1,202 +0,0 @@ -Given /^SoftwareInfo has initial default values on database$/ do - LicenseInfo.create(:version=>"None", :link=>"") - LicenseInfo.create(:version=>"GPL-2", :link =>"www.gpl2.com") - LicenseInfo.create(:version=>"GPL-3", :link =>"www.gpl3.com") - - ProgrammingLanguage.create(:name=>"C") - ProgrammingLanguage.create(:name=>"C++") - ProgrammingLanguage.create(:name=>"Ruby") - ProgrammingLanguage.create(:name=>"Python") - - DatabaseDescription.create(:name => "Oracle") - DatabaseDescription.create(:name => "MySQL") - DatabaseDescription.create(:name => "Apache") - DatabaseDescription.create(:name => "PostgreSQL") - - OperatingSystemName.create(:name=>"Debian") - OperatingSystemName.create(:name=>"Fedora") - OperatingSystemName.create(:name=>"CentOS") -end - - -Given /^I type in "([^"]*)" in autocomplete list "([^"]*)" and I choose "([^"]*)"$/ do |typed, input_field_selector, should_select| - # Wait the page javascript load - sleep 1 - # Basicaly it, search for the input field, type something, wait for ajax end select an item - page.driver.browser.execute_script %Q{ - var search_query = "#{input_field_selector}.ui-autocomplete-input"; - var input = jQuery(search_query).first(); - - input.trigger('click'); - input.val('#{typed}'); - input.trigger('keydown'); - - window.setTimeout(function(){ - search_query = ".ui-menu-item a:contains('#{should_select}')"; - var typed = jQuery(search_query).first(); - - typed.trigger('mouseenter').trigger('click'); - console.log(jQuery('#license_info_id')); - }, 1000); - } - sleep 1 -end - - -Given /^the following software language$/ do |table| - table.hashes.each do |item| - programming_language = ProgrammingLanguage.where(:name=>item[:programing_language]).first - software_language = SoftwareLanguage::new - - software_language.programming_language = programming_language - software_language.version = item[:version] - software_language.operating_system = item[:operating_system] - - software_language.save! - end -end - -Given /^the following software databases$/ do |table| - table.hashes.each do |item| - database_description = DatabaseDescription.where(:name=>item[:database_name]).first - software_database = SoftwareDatabase::new - - software_database.database_description = database_description - software_database.version = item[:version] - software_database.operating_system = item[:operating_system] - - software_database.save! - end -end - - -Given /^the following operating systems$/ do |table| - table.hashes.each do |item| - operating_system_name = OperatingSystemName.where(:name=>item[:operating_system_name]).first - operating_system = OperatingSystem::new - - operating_system.operating_system_name = operating_system_name - operating_system.version = item[:version] - - operating_system.save! - end -end - -Given /^the following softwares$/ do |table| - table.hashes.each do |item| - software_info = SoftwareInfo.new - software_info.community = Community.create(:name=>item[:name]) - - software_info.finality = item[:finality] if item[:finality] - software_info.acronym = item[:acronym] if item[:acronym] - software_info.finality = item[:finality] if item[:finality] - software_info.finality ||= "something" - software_info.operating_platform = item[:operating_platform] if item[:operating_platform] - software_info.objectives = item[:objectives] if item[:objectives] - software_info.features = item[:features] if item[:features] - software_info.public_software = item[:public_software] == "true" if item[:public_software] - software_info.license_info = LicenseInfo.create :version=>"GPL - 1.0" - - if item[:software_language] - programming_language = ProgrammingLanguage.where(:name=>item[:software_language]).first - software_language = SoftwareLanguage.where(:programming_language_id=>programming_language).first - software_info.software_languages << software_language - end - - if item[:software_database] - database_description = DatabaseDescription.where(:name=>item[:software_database]).first - software_database = SoftwareDatabase.where(:database_description_id=>database_description).first - software_info.software_databases << software_database - end - - if item[:operating_system] - operating_system_name = OperatingSystemName.where(:name => item[:operating_system]).first - operating_system = OperatingSystem.where(:operating_system_name_id => operating_system_name).first - software_info.operating_systems << operating_system - end - - if item[:categories] - categories = item[:categories].split(",") - categories.map! {|category| category.strip} - - categories.each do |category_name| - category = Category.find_by_name category_name - software_info.community.categories << category - end - end - - software_info.save! - end -end - -# Dynamic table steps -Given /^I fill in first "([^"]*)" class with "([^"]*)"$/ do |selector, value| - evaluate_script "jQuery('#{selector}').first().attr('value', '#{value}') && true" -end - -Given /^I fill in last "([^"]*)" class with "([^"]*)"$/ do |selector, value| - evaluate_script "jQuery('#{selector}').last().attr('value', '#{value}') && true" -end - -Given /^I click on the first button with class "([^"]*)"$/ do |selector| - evaluate_script "jQuery('#{selector}').first().trigger('click') && true" -end - -Given /^I click on the last button with class "([^"]*)"$/ do |selector| - evaluate_script "jQuery('#{selector}').last().trigger('click') && true" -end - -Given /^the user "([^"]*)" has "([^"]*)" as secondary e\-mail$/ do |login, email| - User[login].update_attributes(:secondary_email => email) -end - -Given /^I click on anything with selector "([^"]*)"$/ do |selector| - evaluate_script "jQuery('#{selector}').trigger('click') && true" -end - -Given /^I should see "([^"]*)" of this selector "([^"]*)"$/ do |quantity, selector| - evaluate_script "jQuery('#{selector}').length == '#{quantity}'" -end - -Given /^selector "([^"]*)" should have any "([^"]*)"$/ do |selector, text| - evaluate_script "jQuery('#{selector}').html().indexOf('#{text}') != -1" -end - -Given /^I click on table number "([^"]*)" selector "([^"]*)" and select the value "([^"]*)"$/ do |number, selector, value| - evaluate_script "jQuery('#{selector}:nth-child(#{number}) select option:contains(\"#{value}\")').selected() && true" -end - -Given /^I fill with "([^"]*)" in field with name "([^"]*)" of table number "([^"]*)" with class "([^"]*)"$/ do |value, name, number, selector| - evaluate_script "jQuery('#{selector}:nth-child(#{number}) input[name=\"#{name}\"]').val('#{value}') && true" -end - -Given /^I sleep for (\d+) seconds$/ do |time| - sleep time.to_i -end - -Given /^I am logged in as mpog_admin$/ do - visit('/account/logout') - - user = User.new(:login => 'admin_user', :password => '123456', :password_confirmation => '123456', :email => 'admin_user@example.com') - person = Person.new :name=>"Mpog Admin", :identifier=>"mpog-admin" - user.person = person - user.save! - - user.activate - e = Environment.default - e.add_admin(user.person) - - visit('/account/login') - fill_in("Username", :with => user.login) - fill_in("Password", :with => '123456') - click_button("Log in") -end - -Given /^I should see "([^"]*)" before "([^"]*)"$/ do |before, after| - assert page.body.index("#{before}") < page.body.index("#{after}") -end - -Given /^I keyup on selector "([^"]*)"$/ do |selector| - selector_founded = evaluate_script("jQuery('#{selector}').trigger('keyup').length != 0") - selector_founded.should be_true -end diff --git a/src/software_communities/lib/categories_and_tags_block.rb b/src/software_communities/lib/categories_and_tags_block.rb deleted file mode 100644 index e50f9c4..0000000 --- a/src/software_communities/lib/categories_and_tags_block.rb +++ /dev/null @@ -1,29 +0,0 @@ -class CategoriesAndTagsBlock < Block - - attr_accessible :show_name - - settings_items :show_name, :type => :boolean, :default => false - - def self.description - _('Categories and Tags') - end - - def help - _('This block displays the categories and tags of a software.') - end - - def content(args={}) - block = self - s = show_name - lambda do |object| - render( - :file => 'blocks/categories_and_tags', - :locals => { :block => block, :show_name => s } - ) - end - end - - def cacheable? - false - end -end diff --git a/src/software_communities/lib/categories_software_block.rb b/src/software_communities/lib/categories_software_block.rb deleted file mode 100644 index 97e1fda..0000000 --- a/src/software_communities/lib/categories_software_block.rb +++ /dev/null @@ -1,35 +0,0 @@ -class CategoriesSoftwareBlock < Block - - attr_accessible :show_name - - settings_items :show_name, :type => :boolean, :default => false - - def self.description - _('Categories Softwares') - end - - def help - _('This block displays the categories and the amount of softwares for - each category.') - end - - def content(args={}) - block = self - s = show_name - - software_category = Category.find_by_name("Software") - categories = [] - categories = software_category.children.sort if software_category - - lambda do |object| - render( - :file => 'blocks/categories_software', - :locals => { :block => block, :show_name => s, :categories => categories } - ) - end - end - - def cacheable? - false - end -end diff --git a/src/software_communities/lib/create_software.rb b/src/software_communities/lib/create_software.rb deleted file mode 100644 index 7b8b914..0000000 --- a/src/software_communities/lib/create_software.rb +++ /dev/null @@ -1,113 +0,0 @@ -class CreateSoftware < Task - include Rails.application.routes.url_helpers - - validates_presence_of :requestor_id, :target_id - validates_presence_of :name - - attr_accessible :name, :finality, :repository_link, :requestor, :environment, - :reject_explanation, :license_info - - alias :environment :target - alias :environment= :target= - - DATA_FIELDS = ['name', 'finality', 'license_info', 'repository_link'] - DATA_FIELDS.each do |field| - settings_items field.to_sym - end - - def perform - software_template = Community["software"] - if (!software_template.blank? && software_template.is_template) - template_id = software_template.id - end - - community = Community.create!(:name => self.name, - :template_id => template_id) - - community.environment = self.environment - community.add_admin(self.requestor) - - software = SoftwareInfo.create!(:finality => self.finality, - :repository_link => self.repository_link, :community_id => community.id, - :license_info => self.license_info) - end - - def title - _("New software") - end - - def subject - name - end - - def information - message = _('%{requestor} wants to create software %{subject} with') - if finality.blank? - { :message => message + _(' no finality.') } - else - { :message => message + _(' this finality:

    %{finality}

    '), - :variables => {:finality => finality} } - end - end - - def reject_details - true - end - - # tells if this request was rejected - def rejected? - self.status == Task::Status::CANCELLED - end - - # tells if this request was appoved - def approved? - self.status == Task::Status::FINISHED - end - - def target_notification_description - _('%{requestor} wants to create software %{subject}') % - {:requestor => requestor.name, :subject => subject} - end - - def target_notification_message - _("User \"%{user}\" just requested to create software %{software}. - You have to approve or reject it through the \"Pending Validations\" - section in your control panel.\n") % - { :user => self.requestor.name, :software => self.name } - end - - def task_created_message - _("Your request for registering software %{software} at %{environment} was - just sent. Environment administrator will receive it and will approve or - reject your request according to his methods and criteria. - - You will be notified as soon as environment administrator has a position - about your request.") % - { :software => self.name, :environment => self.target } - end - - def task_cancelled_message - _("Your request for registering software %{software} at %{environment} was - not approved by the environment administrator. The following explanation - was given: \n\n%{explanation}") % - { :software => self.name, - :environment => self.environment, - :explanation => self.reject_explanation } - end - - def task_finished_message - _('Your request for registering the software "%{software}" was approved. - You can access %{url} and finish the registration of your software.') % - { :software => self.name, :url => mount_url } - end - - private - - def mount_url - identifier = Community.where(:name => self.name).first.identifier - # The use of url_for doesn't allow the /social within the Public Software - # portal. That's why the url is mounted so 'hard coded' - url = "#{environment.top_url}/myprofile/#{identifier}/profile_editor/edit_software_community" - end - -end diff --git a/src/software_communities/lib/database_description.rb b/src/software_communities/lib/database_description.rb deleted file mode 100644 index ff1e641..0000000 --- a/src/software_communities/lib/database_description.rb +++ /dev/null @@ -1,15 +0,0 @@ -class DatabaseDescription < ActiveRecord::Base - - SEARCHABLE_SOFTWARE_FIELDS = { - :name => 1 - } - - attr_accessible :name - - has_many :software_databases - has_many :software_infos, :through => :software_databases - - validates_presence_of :name - validates_uniqueness_of :name - -end diff --git a/src/software_communities/lib/database_helper.rb b/src/software_communities/lib/database_helper.rb deleted file mode 100644 index af7f5e2..0000000 --- a/src/software_communities/lib/database_helper.rb +++ /dev/null @@ -1,86 +0,0 @@ -class DatabaseHelper < DynamicTableHelper - MODEL_NAME ="database" - FIELD_NAME = "database_description_id" - - def self.valid_database? database - return false if SoftwareHelper.all_table_is_empty?(database) - - database_description_id_list = DatabaseDescription.select(:id). - collect {|dd| dd.id} - - return database_description_id_list.include?( - database[:database_description_id].to_i - ) - end - - def self.list_database new_databases - return [] if new_databases.nil? or new_databases.length == 0 - list_databases = [] - - new_databases.each do |new_database| - if valid_database? new_database - database = SoftwareDatabase.new - - database.database_description_id = - new_database[:database_description_id] - - database.version = new_database[:version] - list_databases << database - end - end - - list_databases - end - - def self.valid_list_database? list_databases - return false if list_databases.nil? or list_databases.length == 0 - - list_databases.each do |database| - return false unless database.valid? - end - - true - end - - def self.database_as_tables(list_databases, disabled=false) - model_list = list_databases - model_list ||= [{:database_description_id => "", :version => ""}] - - models_as_tables model_list, "database_html_structure", disabled - end - - def self.database_html_structure(database_data, disabled) - database_id = database_data[:database_description_id] - database_name = if database_data[:database_description_id].blank? - "" - else - DatabaseDescription.find( - database_data[:database_description_id], - :select=>"name" - ).name - end - - data = { - model_name: MODEL_NAME, - field_name: FIELD_NAME, - name: { - value: database_name, - id: database_id, - hidden: true, - autocomplete: true, - select_field: false - }, - version: { - value: database_data[:version], - hidden: true, - delete: true - } - } - DATA[:license].delete(:value) - table_html_structure(data, disabled) - end - - def self.add_dynamic_table - database_as_tables(nil).first.call - end -end \ No newline at end of file diff --git a/src/software_communities/lib/download.rb b/src/software_communities/lib/download.rb deleted file mode 100644 index 0b63fed..0000000 --- a/src/software_communities/lib/download.rb +++ /dev/null @@ -1,51 +0,0 @@ -#FIX ME: Turn this into a proper model(next release) -class Download - def initialize data - @name = data[:name] - @link = data[:link] - @software_description = data[:software_description] - @minimum_requirements = data[:minimum_requirements] - @size = data[:size] - - @total_downloads = if data[:total_downloads] - data[:total_downloads] - else - 0 - end - end - - def self.validate_download_list download_list - download_list.select! do |download| - not download[:name].blank? - end - - download_list.map do |download| - Download.new(download).to_hash - end - end - - def to_hash - { - :name => @name, - :link => @link, - :software_description => @software_description, - :minimum_requirements => @minimum_requirements, - :size => @size, - :total_downloads => @total_downloads - } - end - - def total_downloads= value - if value.is_a? Integer - @total_downloads = value - end - end - - def total_downloads - @total_downloads - end - - def link - @link - end -end diff --git a/src/software_communities/lib/download_block.rb b/src/software_communities/lib/download_block.rb deleted file mode 100644 index 58048b7..0000000 --- a/src/software_communities/lib/download_block.rb +++ /dev/null @@ -1,36 +0,0 @@ -class DownloadBlock < Block - - attr_accessible :show_name, :downloads - - settings_items :show_name, :type => :boolean, :default => false - settings_items :downloads, :type => Array, :default => [] - - validate :download_values - - def download_values - self.downloads = Download.validate_download_list(self.downloads) - end - - def self.description - _('Download Stable Version') - end - - def help - _('This block displays the stable version of a software.') - end - - def content(args={}) - block = self - s = show_name - lambda do |object| - render( - :file => 'blocks/download', - :locals => { :block => block, :show_name => s } - ) - end - end - - def cacheable? - false - end -end diff --git a/src/software_communities/lib/dynamic_table_helper.rb b/src/software_communities/lib/dynamic_table_helper.rb deleted file mode 100644 index 1c9265e..0000000 --- a/src/software_communities/lib/dynamic_table_helper.rb +++ /dev/null @@ -1,153 +0,0 @@ -class DynamicTableHelper - extend( - ActionView::Helpers::TagHelper, - ActionView::Helpers::FormTagHelper, - ActionView::Helpers::FormOptionsHelper, - ActionView::Helpers::UrlHelper, - ApplicationHelper - ) - - COLLUMN_NAME = { - name: "name", - version: "version", - license: "license" - } - - LABEL_TEXT = { - :name => _("Name"), - :version => _("Version"), - :license => _("License") - } - - DATA = { - name: { - label: LABEL_TEXT[:name], - name: COLLUMN_NAME[:name] - }, - version: { - label: LABEL_TEXT[:version], - name: COLLUMN_NAME[:version] - } , - license: { - label: LABEL_TEXT[:license], - name: COLLUMN_NAME[:license], - delete: true - } - } - @@disabled = false - - def self.table_html_structure data={}, disabled=false - @@disabled = disabled - Proc::new do - content_tag :table , generate_table_lines(data), :class => "dynamic-table" - end - end - - def self.generate_table_lines data={} - @@model = data[:model_name] - @@field_name = data[:field_name] - @@hidden_label = data[:name][:value] - @@hidden_id = data[:name][:id] - - row_data = prepare_row_data data - - table_line_data = [ - self.table_line(row_data[:name]), - self.table_line(row_data[:version]) - ] - - if row_data[:license].has_key?(:value) - table_line_data << self.table_line(row_data[:license]) - end - - table_line_data.join() - end - - def self.table_line row_data={} - unless row_data.blank? - content_tag :tr, [ - self.label_collumn(row_data[:label]), - self.value_collumn( - row_data[:value], - row_data[:name], - row_data[:autocomplete], - row_data[:select_field], - row_data[:options] - ), - self.hidden_collumn(row_data[:delete], row_data[:hidden]) - ].join() - end - end - - def self.label_collumn label="" - content_tag :td, label_tag(label) - end - - def self.value_collumn value="", name="", autocomplete=false, select_field=false, options=[] - html_options = - if autocomplete - { - :class => "#{@@model}_autocomplete", - :placeholder => _("Autocomplete field, type something") - } - else - {} - end - - html_options[:disabled] = @@disabled - - content = if select_field - select_tag("#{@@model}[][#{@@field_name}]", options, html_options) - elsif autocomplete - text_field_tag("#{@@model}_autocomplete", value, html_options) - else - text_field_tag("#{@@model}[][#{name}]", value, html_options) - end - - content_tag :td, content - end - - def self.hidden_collumn delete=false, hidden_data=false - value = - if @@disabled - nil - elsif delete - button_without_text( - :delete, _('Delete'), "#" , :class=>"delete-dynamic-table" - ) - elsif hidden_data - hidden_field_tag( - "#{@@model}[][#{@@field_name}]", - @@hidden_id, - :class => "#{@@field_name}", - :data => {:label => @@hidden_label } #check how to get the name of an object of the current model - ) - else - nil - end - - content_tag(:td, value, :align => 'right') - end - - def self.prepare_row_data data - row_data = { - name: DATA[:name], - version: DATA[:version], - license: DATA[:license] - } - - row_data[:name].merge! data[:name] - row_data[:version].merge! data[:version] - row_data[:license].merge! data[:license] if data.has_key? :license - - row_data - end - - def self.models_as_tables models, callback, disabled=false - lambdas_list = [] - - models.map do |model| - send(callback, model, disabled) - end - end -end \ No newline at end of file diff --git a/src/software_communities/lib/ext/category.rb b/src/software_communities/lib/ext/category.rb deleted file mode 100644 index 0c3008c..0000000 --- a/src/software_communities/lib/ext/category.rb +++ /dev/null @@ -1,35 +0,0 @@ -require_dependency 'category' - -class Category - SOFTWARE_CATEGORIES = [ - _('Agriculture, Fisheries and Extraction'), - _('Science, Information and Communication'), - _('Economy and Finances'), - _('Public Administration'), - _('Habitation, Sanitation and Urbanism'), - _('Individual, Family and Society'), - _('Health'), - _('Social Welfare and Development'), - _('Defense and Security'), - _('Education'), - _('Government and Politics'), - _('Justice and Legislation'), - _('International Relationships'), - _('Transportation and Transit') - ] - - scope :software_categories, lambda { - software_category = Category.find_by_name("Software") - if software_category.nil? - [] - else - software_category.children - end - } - - def software_infos - software_list = self.communities - software_list.collect { |x| software_list.delete(x) unless x.software? } - software_list - end -end diff --git a/src/software_communities/lib/ext/communities_block.rb b/src/software_communities/lib/ext/communities_block.rb deleted file mode 100644 index 4a5fcaa..0000000 --- a/src/software_communities/lib/ext/communities_block.rb +++ /dev/null @@ -1,45 +0,0 @@ -require_dependency 'communities_block' - -class CommunitiesBlock - - def profile_list - result = get_visible_profiles - result.slice(0..get_limit-1) - end - - def profile_count - profile_list.count - end - - private - - def get_visible_profiles - visible_profiles = profiles.visible.includes( - [:image,:domains,:preferred_domain,:environment] - ) - - delete_communities = [] - valid_communities_string = Community.get_valid_communities_string - Community.all.each{|community| delete_communities << community.id unless eval(valid_communities_string)} - - visible_profiles = visible_profiles.where(["profiles.id NOT IN (?)", delete_communities]) unless delete_communities.empty? - - if !prioritize_profiles_with_image - return visible_profiles.all( - :limit => get_limit, - :order => 'profiles.updated_at DESC' - ).sort_by {rand} - elsif profiles.visible.with_image.count >= get_limit - return visible_profiles.with_image.all( - :limit => get_limit * 5, - :order => 'profiles.updated_at DESC' - ).sort_by {rand} - else - visible_profiles = visible_profiles.with_image.sort_by {rand} + - visible_profiles.without_image.all( - :limit => get_limit * 5, :order => 'profiles.updated_at DESC' - ).sort_by {rand} - return visible_profiles - end - end -end diff --git a/src/software_communities/lib/ext/community.rb b/src/software_communities/lib/ext/community.rb deleted file mode 100644 index 6f8602f..0000000 --- a/src/software_communities/lib/ext/community.rb +++ /dev/null @@ -1,66 +0,0 @@ -require_dependency 'community' - -class Community - - SEARCHABLE_SOFTWARE_FIELDS = { - :name => 1, - :identifier => 2, - :nickname => 3 - } - - attr_accessible :visible - - has_one :software_info, :dependent=>:destroy - - settings_items :hits, :type => :integer, :default => 0 - - def self.create_after_moderation(requestor, attributes = {}) - community = Community.new(attributes) - - if community.environment.enabled?('admin_must_approve_new_communities') && - !community.environment.admins.include?(requestor) - - cc = CreateCommunity.create(attributes.merge(:requestor => requestor)) - else - community = Community.create(attributes) - community.add_admin(requestor) - end - community - end - - def self.get_valid_communities_string - remove_of_communities_methods = Community.instance_methods.select{|m| m =~ /remove_of_community_search/} - valid_communities_string = "!(" - remove_of_communities_methods.each do |method| - valid_communities_string += "community.send('#{method}') || " - end - valid_communities_string = valid_communities_string[0..-5] - valid_communities_string += ")" - - valid_communities_string - end - - def software? - return !software_info.nil? - end - - def deactivate - self.visible = false - self.save! - end - - def activate - self.visible = true - self.save! - end - - def remove_of_community_search_software? - return software? - end - - def hit - self.hits += 1 - self.save! - end - -end diff --git a/src/software_communities/lib/ext/organization_rating.rb b/src/software_communities/lib/ext/organization_rating.rb deleted file mode 100644 index cedb7ca..0000000 --- a/src/software_communities/lib/ext/organization_rating.rb +++ /dev/null @@ -1,5 +0,0 @@ -require_dependency "organization_rating" - -class OrganizationRating - attr_accessible :people_benefited, :saved_value -end diff --git a/src/software_communities/lib/ext/person.rb b/src/software_communities/lib/ext/person.rb deleted file mode 100644 index 2ccb9a2..0000000 --- a/src/software_communities/lib/ext/person.rb +++ /dev/null @@ -1,24 +0,0 @@ -# encoding: utf-8 - -require_dependency 'person' - -class Person - - delegate :login, :to => :user, :prefix => true - - def software? - false - end - - def softwares - softwares = [] - self.communities.each do |community| - if community.software? - softwares << community - end - end - - softwares - end - -end diff --git a/src/software_communities/lib/ext/profile_controller.rb b/src/software_communities/lib/ext/profile_controller.rb deleted file mode 100644 index e0619f6..0000000 --- a/src/software_communities/lib/ext/profile_controller.rb +++ /dev/null @@ -1,64 +0,0 @@ -require_dependency 'profile_controller' - -class ProfileController - - before_filter :hit_view_page - - def communities - type = [] - params[:type].downcase! unless params[:type].nil? - - if params[:type] == "software" - type = profile.softwares - elsif params[:type] == "institution" - type = profile.institutions - else - profile.communities.select do |community| - type << community unless community.software? || community.institution? - end - end - - if is_cache_expired?(profile.communities_cache_key(params)) - @communities = type.paginate(:per_page => per_page, :page => params[:npage], :total_entries => type.count) - end - end - - def members - if is_cache_expired?(profile.members_cache_key(params)) - sort = (params[:sort] == 'desc') ? params[:sort] : 'asc' - @profile_admins = profile.admins.includes(relations_to_include).order("name #{sort}").paginate(:per_page => members_per_page, :page => params[:npage]) - @profile_members = profile.members.order("name #{sort}").paginate(:per_page => members_per_page, :page => params[:npage]) - @profile_members_url = url_for(:controller => 'profile', :action => 'members') - end - end - - def user_is_a_bot? - user_agent= request.env["HTTP_USER_AGENT"] - user_agent.blank? || - user_agent.match(/bot/) || - user_agent.match(/spider/) || - user_agent.match(/crawler/) || - user_agent.match(/\(.*https?:\/\/.*\)/) - end - - def already_visited?(element) - user_id = if user.nil? then -1 else current_user.id end - user_id = "#{user_id}_#{element.id}_#{element.class}" - - if cookies.signed[:visited] == user_id - return true - else - cookies.permanent.signed[:visited] = user_id - return false - end - end - - def hit_view_page - if profile - community = profile - community.hit unless user_is_a_bot? || - already_visited?(community) || - community.class != Community - end - end -end diff --git a/src/software_communities/lib/ext/profile_editor_controller.rb b/src/software_communities/lib/ext/profile_editor_controller.rb deleted file mode 100644 index 3645f1f..0000000 --- a/src/software_communities/lib/ext/profile_editor_controller.rb +++ /dev/null @@ -1,28 +0,0 @@ -require_dependency 'profile_editor_controller' - -class ProfileEditorController - - before_filter :redirect_to_edit_software_community, :only => [:edit] - - def edit_software_community - @profile_data = profile - @possible_domains = profile.possible_domains - @first_edit = profile.software_info.first_edit? - - if @first_edit - profile.software_info.first_edit = false - profile.software_info.save! - end - - edit if request.post? - end - - protected - - def redirect_to_edit_software_community - if profile.class == Community && profile.software? - redirect_to :action => 'edit_software_community' - end - end - -end diff --git a/src/software_communities/lib/ext/profile_helper.rb b/src/software_communities/lib/ext/profile_helper.rb deleted file mode 100644 index 7268d4b..0000000 --- a/src/software_communities/lib/ext/profile_helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -require_dependency 'profile_helper' - -module ProfileHelper - PERSON_CATEGORIES[:mpog_profile_information] = [:secondary_email, - :institutions] - - def display_mpog_field(title, profile, field, force = false) - unless force || profile.may_display_field_to?(field, user) - return '' - end - value = profile.send(field) - if !value.blank? - if block_given? - value = yield(value) - end - content_tag( - 'tr', - content_tag('td', title, :class => 'field-name') + - content_tag('td', value) - ) - else - '' - end - end - -end diff --git a/src/software_communities/lib/ext/search_controller.rb b/src/software_communities/lib/ext/search_controller.rb deleted file mode 100644 index e96cd63..0000000 --- a/src/software_communities/lib/ext/search_controller.rb +++ /dev/null @@ -1,169 +0,0 @@ -require_dependency 'search_controller' - -class SearchController - - def communities - delete_communities = [] - valid_communities_string = Community.get_valid_communities_string - Community.all.each{|community| delete_communities << community.id unless eval(valid_communities_string)} - - @scope = visible_profiles(Community) - @scope = @scope.where(["id NOT IN (?)", delete_communities]) unless delete_communities.empty? - - full_text_search - end - - def software_infos - prepare_software_search_page - results = filter_software_infos_list - @software_count = results.count - results = results.paginate(:per_page => @per_page, :page => params[:page]) - @searches[@asset] = {:results => results} - @search = results - - render :layout=>false if request.xhr? - end - - protected - - def filter_communities_list - unfiltered_list = visible_profiles(Community) - - unless params[:query].nil? - unfiltered_list = unfiltered_list.select do |com| - com.name.downcase =~ /#{params[:query].downcase}/ - end - end - - communities_list = [] - unfiltered_list.each do |profile| - if profile.class == Community && !profile.is_template? && yield(profile) - communities_list << profile - end - end - - communities_list - end - - def filter_software_infos_list - filtered_software_list = get_filtered_software_list - filtered_community_list = get_communities_list(filtered_software_list) - sort_communities_list filtered_community_list - end - - def get_filter_category_ids - category_ids = [] - unless params[:selected_categories_id].blank? - category_ids = params[:selected_categories_id] - end - category_ids.map(&:to_i) - end - - def get_filtered_software_list - params[:query] ||= "" - visible_communities = visible_profiles(Community) - - filtered_software_list = SoftwareInfo.search_by_query(params[:query]) - - if params[:only_softwares] - params[:only_softwares].collect!{ |software_name| software_name.to_slug } - filtered_software_list = SoftwareInfo.all.select{ |s| params[:only_softwares].include?(s.identifier) } - @public_software_selected = false - end - - filtered_software_list.select!{ |software| visible_communities.include?(software.community) } - category_ids = get_filter_category_ids - - unless category_ids.empty? - filtered_software_list.select! do |software| - if software.nil? || software.community.nil? - false - else - result_ids = (software.community.category_ids & category_ids).sort - result_ids == category_ids.sort - end - end - end - - filtered_software_list - end - - def get_communities_list software_list - filtered_community_list = [] - software_list.each do |software| - if !@public_software_selected || software.public_software? - filtered_community_list << software.community unless software.community.nil? - end - end - filtered_community_list - end - - def sort_communities_list communities_list - communities_list.sort! {|a, b| a.name.downcase <=> b.name.downcase} - - if params[:sort] && params[:sort] == "desc" - communities_list.reverse! - elsif params[:sort] && params[:sort] == "relevance" - communities_list = sort_by_relevance(communities_list, params[:query]){ |community| [community.software_info.finality, community.name] } - end - communities_list - end - - def prepare_software_search_page - prepare_software_infos_params - prepare_software_infos_message - prepare_software_infos_category_groups - prepare_software_infos_category_enable - end - - def prepare_software_infos_params - @titles[:software_infos] = _("Result Search") - @selected_categories_id = params[:selected_categories_id] - @selected_categories_id ||= [] - @selected_categories_id = @selected_categories_id.map(&:to_i) - @all_selected = params[:software_type] == "all" - @public_software_selected = !@all_selected - @per_page = prepare_per_page - end - - def prepare_per_page - return 15 if params[:software_display].nil? - - if params[:software_display] == "all" - SoftwareInfo.count - else - params[:software_display].to_i - end - end - - def prepare_software_infos_message - @message_selected_options = "" - - @selected_categories = [] - unless @selected_categories_id.empty? - @message_selected_options = _("Selected options: ") - - @selected_categories = Category.find(@selected_categories_id) - @message_selected_options += @selected_categories.collect { |category| - "#{category.name}; " - }.join() - end - end - - def prepare_software_infos_category_groups - @categories = Category.software_categories.sort{|a, b| a.name <=> b.name} - end - - def prepare_software_infos_category_enable - @enabled_check_box = Hash.new - categories = Category.software_categories - - categories.each do |category| - if category.software_infos.count > 0 - @enabled_check_box[category] = :enabled - else - @enabled_check_box[category] = :disabled - end - end - end -end diff --git a/src/software_communities/lib/ext/search_helper.rb b/src/software_communities/lib/ext/search_helper.rb deleted file mode 100644 index 025a3b8..0000000 --- a/src/software_communities/lib/ext/search_helper.rb +++ /dev/null @@ -1,33 +0,0 @@ -require_dependency 'search_helper' - -module SearchHelper - - COMMON_PROFILE_LIST_BLOCK ||= [] - COMMON_PROFILE_LIST_BLOCK << :software_infos - - def sort_by_relevance list, text - text_splited = text.split - - element_relevance = {} - - list.each do |element| - relevance = 1 - relevance_list = yield(element) - - text_splited.each do |t| - relevance_list.count.times do |i| - relevance = -1 * i if relevance_list[i].downcase.include?(t.downcase) - end - end - - element_relevance[element] = relevance - end - - list.sort! do |a, b| - element_relevance[a] <=> element_relevance[b] - end - - list - end - -end diff --git a/src/software_communities/lib/library.rb b/src/software_communities/lib/library.rb deleted file mode 100644 index d4b2b56..0000000 --- a/src/software_communities/lib/library.rb +++ /dev/null @@ -1,10 +0,0 @@ -class Library < ActiveRecord::Base - attr_accessible :name, :version, :license, :software_info_id - - validates :name, :version, :license, - presence: { message: _("can't be blank") }, - length: { - maximum: 20, - too_long: _("Too long (maximum is 20 characters)") - } -end diff --git a/src/software_communities/lib/library_helper.rb b/src/software_communities/lib/library_helper.rb deleted file mode 100644 index dfb0953..0000000 --- a/src/software_communities/lib/library_helper.rb +++ /dev/null @@ -1,62 +0,0 @@ -class LibraryHelper < DynamicTableHelper - MODEL_NAME = "library" - - def self.list_library new_libraries - return [] if new_libraries.nil? or new_libraries.length == 0 - list_libraries = [] - - new_libraries.each do |new_library| - unless SoftwareHelper.all_table_is_empty? new_library - library = Library.new - library.name = new_library[:name] - library.version = new_library[:version] - library.license = new_library[:license] - list_libraries << library - end - end - - list_libraries - end - - def self.valid_list_library? list_libraries - return true if list_libraries.nil? or list_libraries.length == 0 - - list_libraries.each do |library| - return false unless library.valid? - end - - true - end - - def self.libraries_as_tables list_libraries, disabled=false - model_list = list_libraries - model_list ||= [{:name=>"", :version=>"", :license=>""}] - - models_as_tables model_list, "library_html_structure", disabled - end - - def self.library_html_structure library_data, disabled - data = { - model_name: MODEL_NAME, - name: { - value: library_data[:name], - hidden: false, - autocomplete: false, - select_field: false - }, - version: { - value: library_data[:version], - delete: false - }, - license: { - value: library_data[:license] - } - } - - table_html_structure(data, disabled) - end - - def self.add_dynamic_table - libraries_as_tables(nil).first.call - end -end \ No newline at end of file diff --git a/src/software_communities/lib/license_helper.rb b/src/software_communities/lib/license_helper.rb deleted file mode 100644 index af390cb..0000000 --- a/src/software_communities/lib/license_helper.rb +++ /dev/null @@ -1,5 +0,0 @@ -module LicenseHelper - def self.getListLicenses - LicenseInfo.all - end -end \ No newline at end of file diff --git a/src/software_communities/lib/license_info.rb b/src/software_communities/lib/license_info.rb deleted file mode 100644 index 6f9bfe7..0000000 --- a/src/software_communities/lib/license_info.rb +++ /dev/null @@ -1,8 +0,0 @@ -class LicenseInfo < ActiveRecord::Base - attr_accessible :version, :link - - validates_presence_of :version - - has_many :software_info - -end diff --git a/src/software_communities/lib/operating_system.rb b/src/software_communities/lib/operating_system.rb deleted file mode 100644 index b2763e9..0000000 --- a/src/software_communities/lib/operating_system.rb +++ /dev/null @@ -1,14 +0,0 @@ -class OperatingSystem < ActiveRecord::Base - attr_accessible :version - - belongs_to :software_info - belongs_to :operating_system_name - - validates :operating_system_name, presence: true - validates :version, - presence: true, - length: { - maximum: 20, - too_long: _('too long (maximum is 20 characters)') - } -end diff --git a/src/software_communities/lib/operating_system_helper.rb b/src/software_communities/lib/operating_system_helper.rb deleted file mode 100644 index d5bd9a9..0000000 --- a/src/software_communities/lib/operating_system_helper.rb +++ /dev/null @@ -1,71 +0,0 @@ -class OperatingSystemHelper < DynamicTableHelper - MODEL_NAME = "operating_system" - FIELD_NAME = "operating_system_name_id" - - def self.list_operating_system new_operating_systems - return [] if new_operating_systems.nil? or new_operating_systems.length == 0 - list_operating_system = [] - - new_operating_systems.each do |new_operating_system| - unless SoftwareHelper.all_table_is_empty?( - new_operating_system, - ["operating_system_name_id"] - ) - - operating_system = OperatingSystem.new - operating_system.operating_system_name = OperatingSystemName.find( - new_operating_system[:operating_system_name_id] - ) - - operating_system.version = new_operating_system[:version] - list_operating_system << operating_system - end - end - list_operating_system - end - - def self.valid_list_operating_system? list_operating_system - return !(list_operating_system.nil? || list_operating_system.length == 0) - - list_operating_system.each do |operating_system| - return false unless operating_system.valid? - end - true - end - - def self.operating_system_as_tables(list_operating_system, disabled=false) - model_list = list_operating_system - model_list ||= [{:operating_system_name_id => "", :version => ""}] - - models_as_tables model_list, "operating_system_html_structure", disabled - end - - def self.operating_system_html_structure (operating_system_data, disabled) - select_options = options_for_select( - OperatingSystemName.all.collect {|osn| [osn.name, osn.id]}, - operating_system_data[:operating_system_name_id] - ) - - data = { - model_name: MODEL_NAME, - field_name: FIELD_NAME, - name: { - hidden: false, - autocomplete: false, - select_field: true, - options: select_options - }, - version: { - value: operating_system_data[:version], - hidden: true, - delete: true - } - } - DATA[:license].delete(:value) - table_html_structure(data, disabled) - end - - def self.add_dynamic_table - operating_system_as_tables(nil).first.call - end -end diff --git a/src/software_communities/lib/operating_system_name.rb b/src/software_communities/lib/operating_system_name.rb deleted file mode 100644 index cc59602..0000000 --- a/src/software_communities/lib/operating_system_name.rb +++ /dev/null @@ -1,10 +0,0 @@ -class OperatingSystemName < ActiveRecord::Base - attr_accessible :name - - validates_presence_of :name - validates_uniqueness_of :name - - has_many :operating_systems - has_many :software_infos, :through => :operating_systems - -end diff --git a/src/software_communities/lib/programming_language.rb b/src/software_communities/lib/programming_language.rb deleted file mode 100644 index 193225c..0000000 --- a/src/software_communities/lib/programming_language.rb +++ /dev/null @@ -1,15 +0,0 @@ -class ProgrammingLanguage < ActiveRecord::Base - - SEARCHABLE_SOFTWARE_FIELDS = { - :name => 1 - } - - attr_accessible :name - - validates_presence_of :name - validates_uniqueness_of :name - - has_many :software_languages - has_many :software_infos, :through => :software_languages - -end diff --git a/src/software_communities/lib/repository_block.rb b/src/software_communities/lib/repository_block.rb deleted file mode 100644 index 483da7a..0000000 --- a/src/software_communities/lib/repository_block.rb +++ /dev/null @@ -1,29 +0,0 @@ -class RepositoryBlock < Block - - attr_accessible :show_name - - settings_items :show_name, :type => :boolean, :default => false - - def self.description - _('Repository Link') - end - - def help - _('This block displays the repository link of a software.') - end - - def content(args={}) - block = self - s = show_name - lambda do |object| - render( - :file => 'blocks/repository', - :locals => { :block => block, :show_name => s } - ) - end - end - - def cacheable? - false - end -end diff --git a/src/software_communities/lib/search_catalog_block.rb b/src/software_communities/lib/search_catalog_block.rb deleted file mode 100644 index 4f7b517..0000000 --- a/src/software_communities/lib/search_catalog_block.rb +++ /dev/null @@ -1,29 +0,0 @@ -class SearchCatalogBlock < Block - - attr_accessible :show_name - - settings_items :show_name, :type => :boolean, :default => false - - def self.description - _('Search Softwares catalog') - end - - def help - _('This block displays the search categories field ') - end - - def content(args={}) - block = self - s = show_name - lambda do |object| - render( - :file => 'blocks/search_catalog', - :locals => { :block => block, :show_name => s } - ) - end - end - - def cacheable? - false - end -end diff --git a/src/software_communities/lib/software_communities_plugin.rb b/src/software_communities/lib/software_communities_plugin.rb deleted file mode 100644 index d11c176..0000000 --- a/src/software_communities/lib/software_communities_plugin.rb +++ /dev/null @@ -1,164 +0,0 @@ -class SoftwareCommunitiesPlugin < Noosfero::Plugin - include ActionView::Helpers::TagHelper - include ActionView::Helpers::FormTagHelper - include ActionView::Helpers::FormOptionsHelper - include ActionView::Helpers::JavaScriptHelper - include ActionView::Helpers::AssetTagHelper - include FormsHelper - include ActionView::Helpers - include ActionDispatch::Routing - include Rails.application.routes.url_helpers - - def self.plugin_name - 'SoftwareCommunitiesPlugin' - end - - def self.plugin_description - _('Add Public Software and MPOG features.') - end - - def profile_tabs - if context.profile.community? - return profile_tabs_software if context.profile.software? - end - end - - def control_panel_buttons - if context.profile.software? - return software_info_button - elsif context.profile.person? - return create_new_software_button - end - end - - def self.extra_blocks - { - SoftwaresBlock => { :type => [Environment, Person] }, - SoftwareInformationBlock => { :type => [Community] }, - DownloadBlock => { :type => [Community] }, - RepositoryBlock => { :type => [Community] }, - CategoriesAndTagsBlock => { :type => [Community] }, - CategoriesSoftwareBlock => { :type => [Environment] }, - SearchCatalogBlock => { :type => [Environment] }, - SoftwareHighlightsBlock => { :type => [Environment] }, - SoftwareTabDataBlock => {:type => [Community], :position => 1}, - WikiBlock => {:type => [Community]}, - StatisticBlock => { :type => [Community] } - } - end - - def stylesheet? - true - end - - def js_files - %w( - vendor/jquery.maskedinput.min.js - vendor/modulejs-1.5.0.min.js - vendor/jquery.js - lib/noosfero-root.js - lib/select-element.js - lib/select-field-choices.js - lib/auto-complete.js - lib/software-catalog-component.js - views/control-panel.js - views/edit-software.js - views/new-software.js - views/search-software-catalog.js - views/profile-tabs-software.js - views/new-community.js - views/comments-software-extra-fields.js - blocks/software-download.js - initializer.js - app.js - ) - end - - module Hotspots - def display_organization_average_rating organization - nil - end - end - - def organization_ratings_plugin_comments_extra_fields - if context.profile.software? - Proc::new { render :file => 'comments_extra_fields' } - end - end - - def organization_ratings_plugin_star_message - Proc::new do _("Rate this software") end - end - - def organization_ratings_title - title = _('Use reports') - Proc::new do "

    #{title}

    " end - end - - def organization_ratings_plugin_extra_fields_show_data user_rating - Proc::new { - if logged_in? - is_admin = environment.admins.include?(current_user.person) - is_admin ||= user_rating.organization.admins.include?(current_user.person) - - if is_admin and profile.software? - - render :file => 'organization_ratings_extra_fields_show_data', - :locals => {:user_rating => user_rating} - end - end - } - end - - # FIXME - if in error log apears has_permission?, try to use this method - def has_permission?(person, permission, target) - person.has_permission_without_plugins?(permission, target) - end - - protected - - def software_info_transaction - SoftwareInfo.transaction do - context.profile. - software_info. - update_attributes!(context.params[:software_info]) - end - end - - def license_transaction - license = LicenseInfo.find(context.params[:version]) - context.profile.software_info.license_info = license - context.profile.software_info.save! - end - - private - - def software_info_button - { - :title => _('Software Info'), - :icon => 'edit-profile-group control-panel-software-link', - :url => { - :controller => 'software_communities_plugin_myprofile', - :action => 'edit_software' - } - } - end - - def create_new_software_button - { - :title => _('Create a new software'), - :icon => 'design-editor', - :url => { - :controller => 'software_communities_plugin_myprofile', - :action => 'new_software' - } - } - end - - def profile_tabs_software - { :title => _('Software'), - :id => 'software-fields', - :content => Proc::new do render :partial => 'profile/software_tab' end, - :start => true } - end -end diff --git a/src/software_communities/lib/software_database.rb b/src/software_communities/lib/software_database.rb deleted file mode 100644 index 6c7911f..0000000 --- a/src/software_communities/lib/software_database.rb +++ /dev/null @@ -1,20 +0,0 @@ -class SoftwareDatabase < ActiveRecord::Base - attr_accessible :version - - belongs_to :software_info - belongs_to :database_description - - validates_presence_of :database_description_id, :version - - validates_length_of( - :version, - :maximum => 20, - :too_long => _("Software database is too long (maximum is 20 characters)") - ) - - validates( - :database_description_id, - :numericality => {:greater_than_or_equal_to => 1} - ) - -end diff --git a/src/software_communities/lib/software_helper.rb b/src/software_communities/lib/software_helper.rb deleted file mode 100644 index a406c64..0000000 --- a/src/software_communities/lib/software_helper.rb +++ /dev/null @@ -1,44 +0,0 @@ -module SoftwareHelper - def self.select_options programming_languages, selected = 0 - value = "" - - programming_languages.each do |language| - selected = selected == language.id ? 'selected' : '' - value += "" - end - - value - end - - def self.create_list_with_file file_name, model - list_file = File.open file_name, "r" - - list_file.each_line do |line| - model.create(:name=>line.strip) - end - - list_file.close - end - - def self.all_table_is_empty? table, ignored_fields=[] - filled_fields = [] - - table.each do |key, value| - unless ignored_fields.include? key - filled_fields << if value.empty? - false - else - true - end - end - end - - if filled_fields.include? true - false - else - true - end - end -end diff --git a/src/software_communities/lib/software_highlights_block.rb b/src/software_communities/lib/software_highlights_block.rb deleted file mode 100644 index a8b2a1c..0000000 --- a/src/software_communities/lib/software_highlights_block.rb +++ /dev/null @@ -1,20 +0,0 @@ -class SoftwareHighlightsBlock < HighlightsBlock - - def self.description - _('Software Highlights Block') - end - - def help - _('This block displays the softwares icon into a highlight') - end - - def content(args={}) - softwares = self.settings[:images].collect {|h| h[:address].split('/').last} - block = self - proc do - render :file => 'blocks/software_highlights', :locals => { :block => block, :softwares => softwares} - end - end - - -end diff --git a/src/software_communities/lib/software_info.rb b/src/software_communities/lib/software_info.rb deleted file mode 100644 index ffe5364..0000000 --- a/src/software_communities/lib/software_info.rb +++ /dev/null @@ -1,261 +0,0 @@ -class SoftwareInfo < ActiveRecord::Base - acts_as_having_settings :field => :settings - - SEARCHABLE_SOFTWARE_FIELDS = { - :acronym => 1, - :finality => 2, - } - - SEARCHABLE_SOFTWARE_CLASSES = [ - SoftwareInfo, - Community, - ProgrammingLanguage, - DatabaseDescription - ] - - scope :search_by_query, lambda { |query = ""| - filtered_query = query.gsub(/[\|\(\)\\\/\s\[\]'"*%&!:]/,' ').split.map{|w| w += ":*"}.join('|') - search_fields = SoftwareInfo.pg_search_plugin_fields - - if query.empty? - SoftwareInfo.joins(:community).where("profiles.visible = ?", true) - else - searchable_software_objects = SoftwareInfo.transform_list_in_methods_list(SEARCHABLE_SOFTWARE_CLASSES) - includes(searchable_software_objects).where("to_tsvector('simple', #{search_fields}) @@ to_tsquery('#{filtered_query}')").where("profiles.visible = ?", true) - end - } - - def self.transform_list_in_methods_list list - methods_list = [] - - list.each do |element| - if SoftwareInfo.instance_methods.include?(element.to_s.underscore.to_sym) - methods_list << element.to_s.underscore.to_sym - elsif SoftwareInfo.instance_methods.include?(element.to_s.underscore.pluralize.to_sym) - methods_list << element.to_s.underscore.pluralize.to_sym - end - end - - methods_list - end - - def self.pg_search_plugin_fields - SEARCHABLE_SOFTWARE_CLASSES.collect { |one_class| - self.get_searchable_fields(one_class) - }.join(" || ' ' || ") - end - - def self.get_searchable_fields one_class - searchable_fields = one_class::SEARCHABLE_SOFTWARE_FIELDS.keys.map(&:to_s).sort.map {|f| "coalesce(#{one_class.table_name}.#{f}, '')"}.join(" || ' ' || ") - searchable_fields - end - - SEARCH_FILTERS = { - :order => %w[], - :display => %w[full] - } - - def self.default_search_display - 'full' - end - - attr_accessible :e_mag, :icp_brasil, :intern, :e_ping, :e_arq, - :operating_platform - - attr_accessible :demonstration_url, :acronym, :objectives, :features, - :license_info - - attr_accessible :community_id, :finality, :repository_link, :public_software, - :first_edit - - has_many :libraries, :dependent => :destroy - has_many :software_databases - has_many :database_descriptions, :through => :software_databases - has_many :software_languages - has_many :operating_systems - has_many :programming_languages, :through => :software_languages - has_many :operating_system_names, :through => :operating_systems - - belongs_to :community, :dependent => :destroy - belongs_to :license_info - - has_one :software_categories - - validates_length_of :finality, :maximum => 120 - validates_length_of :objectives, :maximum => 4000 - validates_length_of :features, :maximum => 4000 - validates_presence_of :finality - - validate :validate_acronym - - settings_items :another_license_version, :another_license_link - - # used on find_by_contents - scope :like_search, lambda{ |name| - joins(:community).where( - "name ILIKE ? OR acronym ILIKE ? OR finality ILIKE ?", - "%#{name}%", "%#{name}%", "%#{name}%" - ) - } - - scope :search, lambda { |name="", database_description_id = "", - programming_language_id = "", operating_system_name_id = "", - license_info_id = "", e_ping = "", e_mag = "", internacionalizable = "", - icp_brasil = "", e_arq = "", software_categories = "" | - - like_sql = "" - values = [] - - unless name.blank? - like_sql << "name ILIKE ? OR identifier ILIKE ? AND " - values << "%#{name}%" << "%#{name}%" - end - - like_sql = like_sql[0..like_sql.length-5] - - { - :joins => [:community], - :conditions=>[like_sql, *values] - } - } - - def license_info - license = LicenseInfo.find_by_id self.license_info_id - license_another = LicenseInfo.find_by_version("Another") - - if license_another && license.id == license_another.id - LicenseInfo.new( - :version => self.another_license_version, - :link => self.another_license_link - ) - else - license - end - end - - def another_license(version, link) - license_another = LicenseInfo.find_by_version("Another") - - if license_another - self.another_license_version = version - self.another_license_link = link - self.license_info = license_another - self.save! - end - end - - def validate_name_lenght - if self.community.name.size > 100 - self.errors.add( - :base, - _("Name is too long (maximum is %{count} characters)") - ) - false - end - true - end - - # if create_after_moderation receive a model object, would be possible to reuse core method - def self.create_after_moderation(requestor, attributes = {}) - environment = attributes.delete(:environment) - name = attributes.delete(:name) - identifier = attributes.delete(:identifier) - image_builder = attributes.delete(:image_builder) - license_info = attributes.delete(:license_info) - another_license_version = attributes.delete(:another_license_version) - another_license_link = attributes.delete(:another_license_link) - - software_info = SoftwareInfo.new(attributes) - if !environment.admins.include? requestor - CreateSoftware.create!( - attributes.merge( - :requestor => requestor, - :environment => environment, - :name => name, - :license_info => license_info - ) - ) - else - software_template = Community["software"] - - community_hash = {:name => name} - community_hash[:identifier] = identifier - community_hash[:image_builder] = image_builder if image_builder - - community = Community.new(community_hash) - community.environment = environment - - if (!software_template.blank? && software_template.is_template) - community.template_id = software_template.id - end - - software_info.license_info = license_info - software_info.save - community.software_info = software_info - community.save! - community.add_admin(requestor) - end - - software_info.verify_license_info(another_license_version, another_license_link) - software_info.save! - software_info - end - - def verify_license_info another_license_version, another_license_link - license_another = LicenseInfo.find_by_version("Another") - - if license_another && self.license_info_id == license_another.id - version = another_license_version - link = another_license_link - - self.another_license(version, link) - end - end - - - def validate_acronym - self.acronym = "" if self.acronym.nil? - if self.acronym.length > 10 && self.errors.messages[:acronym].nil? - self.errors.add(:acronym, _("can't have more than 10 characteres")) - false - elsif self.acronym.match(/\s+/) - self.errors.add(:acronym, _("can't have whitespaces")) - false - end - true - end - - def valid_operating_systems - if self.operating_systems.empty? - self.errors.add(:operating_system, _(": at least one must be filled")) - end - end - - def valid_software_info - if self.software_languages.empty? - self.errors.add(:software_languages, _(": at least one must be filled")) - end - end - - def valid_databases - if self.software_databases.empty? - self.errors.add(:software_databases, _(": at least one must be filled")) - end - end - - def visible? - self.community.visible? - end - - def name - self.community.name - end - - def short_name - self.community.short_name - end - - def identifier - self.community.identifier - end -end diff --git a/src/software_communities/lib/software_information_block.rb b/src/software_communities/lib/software_information_block.rb deleted file mode 100644 index a398c96..0000000 --- a/src/software_communities/lib/software_information_block.rb +++ /dev/null @@ -1,37 +0,0 @@ -class SoftwareInformationBlock < Block - - attr_accessible :show_name - - settings_items :show_name, :type => :boolean, :default => false - - def self.description - _('Basic Software Information') - end - - def help - _('This block displays the basic information of a software profile.') - end - - def content(args={}) - block = self - s = show_name - - lambda do |object| - render( - :file => 'blocks/software_information', - :locals => { :block => block, :show_name => s} - ) - end - end - - def cacheable? - false - end - - private - - def owner_has_ratings? - ratings = CommunityRating.where(community_id: block.owner.id) - !ratings.empty? - end -end diff --git a/src/software_communities/lib/software_language.rb b/src/software_communities/lib/software_language.rb deleted file mode 100644 index 29f23c4..0000000 --- a/src/software_communities/lib/software_language.rb +++ /dev/null @@ -1,14 +0,0 @@ -class SoftwareLanguage < ActiveRecord::Base - attr_accessible :version - - belongs_to :software_info - belongs_to :programming_language - - validates_length_of( - :version, - :maximum => 20, - :too_long => _("Software language is too long (maximum is 20 characters)") - ) - - validates_presence_of :version,:programming_language -end diff --git a/src/software_communities/lib/software_language_helper.rb b/src/software_communities/lib/software_language_helper.rb deleted file mode 100644 index 296088d..0000000 --- a/src/software_communities/lib/software_language_helper.rb +++ /dev/null @@ -1,85 +0,0 @@ -class SoftwareLanguageHelper < DynamicTableHelper - MODEL_NAME ="language" - FIELD_NAME = "programming_language_id" - - def self.valid_language? language - return false if SoftwareHelper.all_table_is_empty?(language) - - programming_language_id_list = ProgrammingLanguage. - select(:id). - collect { |dd| dd.id } - - return programming_language_id_list.include?( - language[:programming_language_id].to_i - ) - end - - def self.list_language new_languages - return [] if new_languages.nil? or new_languages.length == 0 - list_languages = [] - - new_languages.each do |new_language| - if valid_language? new_language - language = SoftwareLanguage.new - language.programming_language = - ProgrammingLanguage.find(new_language[:programming_language_id]) - language.version = new_language[:version] - list_languages << language - end - end - - list_languages - end - - def self.valid_list_language? list_languages - return false if list_languages.nil? or list_languages.length == 0 - - list_languages.each do |language| - return false unless language.valid? - end - - true - end - - def self.language_as_tables(list_languages, disabled=false) - model_list = list_languages - model_list ||= [{:programming_language_id => "", :version => ""}] - - models_as_tables model_list, "language_html_structure", disabled - end - - def self.language_html_structure(language_data, disabled) - language_id = language_data[:programming_language_id] - language_name = if language_data[:programming_language_id].blank? - "" - else - ProgrammingLanguage.find( - language_data[:programming_language_id], - :select=>"name" - ).name - end - - data = { - model_name: MODEL_NAME, - field_name: FIELD_NAME, - name: { - value: language_name, - id: language_id, - hidden: true, - autocomplete: true, - select_field: false - }, - version: { - value: language_data[:version], - hidden: true, - delete: true - } - } - DATA[:license].delete(:value) - table_html_structure(data, disabled) - end - - def self.add_dynamic_table - language_as_tables(nil).first.call - end -end diff --git a/src/software_communities/lib/software_tab_data_block.rb b/src/software_communities/lib/software_tab_data_block.rb deleted file mode 100644 index b32eeb5..0000000 --- a/src/software_communities/lib/software_tab_data_block.rb +++ /dev/null @@ -1,48 +0,0 @@ -class SoftwareTabDataBlock < Block - attr_accessible :show_name, :displayed_blog - - settings_items :show_name, :type => :boolean, :default => false - settings_items :displayed_blog, :type => :integer, :default => 0 - - TOTAL_POSTS_DYSPLAYED = 5 - - def self.description - _('Software Tab Data') - end - - def help - _('This block is used by colab to insert data into Noosfero') - end - - def content(args={}) - block = self - - lambda do |object| - render( - :file => 'blocks/software_tab_data', - :locals => { - :block => block - } - ) - end - end - - def blogs - self.owner.blogs - end - - def actual_blog - # As :displayed_blog default value is 0, it falls to the first one - blogs.find_by_id(self.displayed_blog) || blogs.first - end - - def posts - blog = actual_blog - - if blog and (not blog.posts.empty?) - blog.posts.limit(TOTAL_POSTS_DYSPLAYED) - else - [] - end - end -end diff --git a/src/software_communities/lib/softwares_block.rb b/src/software_communities/lib/softwares_block.rb deleted file mode 100644 index 067345a..0000000 --- a/src/software_communities/lib/softwares_block.rb +++ /dev/null @@ -1,105 +0,0 @@ -class SoftwaresBlock < CommunitiesBlock - - settings_items :software_type, :default => "All" - attr_accessible :accessor_id, :accessor_type, :role_id, - :resource_id, :resource_type, :software_type - - def self.description - _('Softwares') - end - - def default_title - if self.software_type == "Generic" - return n_('{#} generic software', '{#} generic softwares', profile_count) - elsif self.software_type == "Public" - return n_('{#} public software', '{#} public softwares', profile_count) - else - return n_('{#} software', '{#} softwares', profile_count) - end - end - - def help - _('This block displays the softwares in which the user is a member.') - end - - def footer - self.software_type ||= "All" - owner = self.owner - case owner - when Profile - lambda do |context| - link_to s_('softwares|View all'), :profile => owner.identifier, - :controller => 'profile', :action => 'communities', - :type => 'Software' - end - when Environment - lambda do |context| - link_to s_('softwares|View all'), :controller => 'search', - :action => 'software_infos' - end - else - '' - end - end - - def profile_count - profile_list.count - end - - def profiles - owner.communities - end - - def profile_list - profiles = get_visible_profiles - - software_profiles = profiles.select do |profile| - profile.class == Community && profile.software? - end - - block_softwares = if self.software_type == "Public" - software_profiles.select { |profile| profile.software_info.public_software? } - elsif self.software_type == "Generic" - software_profiles.select { |profile| !profile.software_info.public_software? } - else # All - software_profiles - end - - block_softwares.slice(0..get_limit-1) - end - - def content(arg={}) - if self.box.owner_type == "Environment" && self.box.position == 1 - block = self - - proc do - render :file => 'blocks/main_area_softwares', - :locals => {:profiles=> block.profile_list(), :block => block} - end - else - super(arg) - end - end - - protected - - def get_visible_profiles - profile_include_list = [:image, :domains, :preferred_domain, :environment] - visible_profiles = profiles.visible.includes(profile_include_list) - - if !prioritize_profiles_with_image - visible_profiles.all( :limit => get_limit, - :order => 'profiles.updated_at DESC' - ).sort_by{ rand } - elsif profiles.visible.with_image.count >= get_limit - visible_profiles.with_image.all( :limit => get_limit * 5, - :order => 'profiles.updated_at DESC' - ).sort_by{ rand } - else - visible_profiles.with_image.sort_by{ rand } + - visible_profiles.without_image.all( :limit => get_limit * 5, - :order => 'profiles.updated_at DESC' - ).sort_by{ rand } - end - end -end diff --git a/src/software_communities/lib/statistic_block.rb b/src/software_communities/lib/statistic_block.rb deleted file mode 100644 index fd45f4f..0000000 --- a/src/software_communities/lib/statistic_block.rb +++ /dev/null @@ -1,52 +0,0 @@ -class StatisticBlock < Block - - settings_items :benefited_people, :type => :integer, :default => 0 - settings_items :saved_resources, :type => :float, :default => 0.0 - - attr_accessible :benefited_people, :saved_resources - - def self.description - _('Software Statistics') - end - - def help - _('This block displays software statistics.') - end - - def content(args={}) - download_blocks = get_profile_download_blocks(self.owner) - downloads = download_blocks.map do |download_block| - get_downloads_from_block(download_block) - end - - block = self - - lambda do |object| - render( - :file => 'blocks/software_statistics', - :locals => { - :block => block, - :total_downloads => downloads.sum - } - ) - end - end - - def cacheable? - false - end - - private - - def get_profile_download_blocks profile - DownloadBlock.joins(:box).where("boxes.owner_id = ?", profile.id) - end - - def get_downloads_from_block download_block - downloads = download_block.downloads.map do |download| - download[:total_downloads] unless download[:total_downloads].nil? - end - downloads.select! {|value| not value.nil? } - downloads.sum - end -end diff --git a/src/software_communities/lib/tasks/create_categories.rake b/src/software_communities/lib/tasks/create_categories.rake deleted file mode 100644 index 29a1cf9..0000000 --- a/src/software_communities/lib/tasks/create_categories.rake +++ /dev/null @@ -1,20 +0,0 @@ -namespace :software do - desc "Create software categories" - task :create_categories => :environment do - Environment.all.each do |env| - if env.plugin_enabled?("SoftwareCommunitiesPlugin") or env.plugin_enabled?("SoftwareCommunities") - print 'Creating categories: ' - software = Category.create(:name => _("Software"), :environment => env) - Category::SOFTWARE_CATEGORIES.each do |category_name| - unless Category.find_by_name(category_name) - print '.' - Category.create(:name => category_name, :environment => env, :parent => software) - else - print 'F' - end - end - puts '' - end - end - end -end diff --git a/src/software_communities/lib/tasks/create_licenses.rake b/src/software_communities/lib/tasks/create_licenses.rake deleted file mode 100644 index 3df7c30..0000000 --- a/src/software_communities/lib/tasks/create_licenses.rake +++ /dev/null @@ -1,42 +0,0 @@ -namespace :software do - desc "Create software licences" - - task :create_licenses => :environment do - Environment.all.each do |env| - if env.plugin_enabled?("SoftwareCommunitiesPlugin") or env.plugin_enabled?("SoftwareCommunities") - list_file = File.open "plugins/software_communities/public/static/licences.txt", "r" - - version_or_link = 'version' - can_save = true - licence = nil - - print 'Creating Licenses: ' - list_file.each_line do |line| - data = line.strip - - if data.length != 0 - if version_or_link == 'version' - can_save = LicenseInfo.find_by_version(data) ? false : true - licence = LicenseInfo::new :version => data - version_or_link = 'link' - elsif version_or_link == 'link' - licence.link = data - - if can_save - licence.save! - print '.' - else - print 'F' - end - - version_or_link = 'version' - end - end - end - puts '' - - list_file.close - end - end - end -end diff --git a/src/software_communities/lib/tasks/create_sample_softwares.rake b/src/software_communities/lib/tasks/create_sample_softwares.rake deleted file mode 100644 index 1cd00cf..0000000 --- a/src/software_communities/lib/tasks/create_sample_softwares.rake +++ /dev/null @@ -1,71 +0,0 @@ -NUMBER_OF_SOFTWARES = 10 - -namespace :software do - desc "Create sample softwares" - task :create_sample_softwares => :environment do - Environment.all.each do |env| - if env.plugin_enabled?("SoftwareCommunitiesPlugin") or env.plugin_enabled?("SoftwareCommunities") - print "Creating softwares: " - - NUMBER_OF_SOFTWARES.times do |i| - number = i < 10 ? "0#{i}" : "#{i}" - software_name = "Software #{number}" - create_software_info(software_name) - end - - create_software_info("Ubuntu") - create_software_info("Debian") - create_software_info("Windows XP") - create_software_info("Windows Vista") - create_software_info("Windows 7") - create_software_info("Windows 8") - create_software_info("Disk Operating System", "DOS") - create_software_info("Sublime") - create_software_info("Vi IMproved", "Vim") - create_software_info("Nano") - create_software_info("Gedit") - create_software_info("Firefox") - create_software_info("InkScape") - create_software_info("Eclipse") - create_software_info("LibreOffice") - create_software_info("Tetris") - create_software_info("Mario") - create_software_info("Pong") - create_software_info("Sonic") - create_software_info("Astah") - create_software_info("Pokemom Red") - create_software_info("Mass Effect") - create_software_info("Deus EX") - create_software_info("Dragon Age") - - puts "" - end - end - end -end - -def create_community(name) - community = Community.new - community.name = name - community.save - community -end - -def create_software_info(name, acronym = "", finality = "default") - community = create_community(name) - software_info = SoftwareInfo.new - software_info.community = community - software_info.public_software = true - software_info.acronym = acronym - software_info.finality = finality - software_info.license_info = LicenseInfo.first - - if software_info.community.valid? && software_info.valid? - print "." - software_info.save - software_info - else - print "F" - nil - end -end diff --git a/src/software_communities/lib/tasks/export.rake b/src/software_communities/lib/tasks/export.rake deleted file mode 100644 index 224ae25..0000000 --- a/src/software_communities/lib/tasks/export.rake +++ /dev/null @@ -1,133 +0,0 @@ -require 'csv' - -namespace :export do - namespace :catalog do - desc "Export all softwares to CSV" - task :csv => :environment do - Environment.all.each do |env| - if env.plugin_enabled?("MpogSoftware") or env.plugin_enabled?("SoftwareCommunitiesPlugin") - softwares_to_csv - categories_to_csv - software_categories_to_csv - - compress_files - end - end - end - end - - def softwares_to_csv - print "Exporting softwares to softwares.csv: " - - CSV.open('/tmp/softwares.csv', 'w') do |csv| - csv << [ - "id", - "community_id", - "identifier", - "name", - "finality", - "acronym", - "created_at", - "image_filename", - "home_page_name", - "home_page_slug", - "home_page_path", - "home_page_body", - "home_page_abstract", - "home_page_published_at" - ] - - SoftwareInfo.all.each do |software| - if software.community - begin - csv << [ - software.id, - software.community.id, - software.community.identifier, - software.community.name, - software.finality, - software.acronym, - software.community.created_at, - (software.community.image.nil? ? nil : software.community.image.filename), - (software.community.home_page.nil? ? nil : software.community.home_page.name), - (software.community.home_page.nil? ? nil : software.community.home_page.slug), - (software.community.home_page.nil? ? nil : software.community.home_page.path), - (software.community.home_page.nil? ? nil : software.community.home_page.body), - (software.community.home_page.nil? ? nil : software.community.home_page.abstract), - (software.community.home_page.nil? ? nil : software.community.home_page.published_at), - ] - - print '.' - rescue - print 'F' - end - end - end - end - - print "\n" - end - - def categories_to_csv - print "Exporting categories to categories.csv: " - - CSV.open('/tmp/categories.csv', 'w') do |csv| - csv << [ - "id", - "name", - "path", - ] - - Category.all.each do |category| - begin - csv << [ - category.id, - category.name, - category.path, - ] - - print '.' - rescue - print 'F' - end - end - end - - print "\n" - end - - def software_categories_to_csv - print "Exporting software and categories relation to software_categories.csv: " - CSV.open('/tmp/software_categories.csv', 'w') do |csv| - csv << [ - "software_id", - "category_id" - ] - - SoftwareInfo.all.each do |software| - if software.community - software.community.categories.each do |category| - begin - csv << [ - software.id, - category.id - ] - - print '.' - rescue - print 'F' - end - end - end - end - end - - print "\n" - end - - def compress_files - `cd /tmp/ && tar -zcvf software_catalog_csvs.tar.gz softwares.csv categories.csv software_categories.csv` - - `cd /tmp/ && rm softwares.csv categories.csv software_categories.csv` - end -end \ No newline at end of file diff --git a/src/software_communities/lib/tasks/main_data.rake b/src/software_communities/lib/tasks/main_data.rake deleted file mode 100644 index 793ec38..0000000 --- a/src/software_communities/lib/tasks/main_data.rake +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/env ruby -# encoding: utf-8 - -namespace :main_data do - desc "Create the main community and its contents" - task :populate => :environment do - Rake::Task["templates:create:all"].invoke - Rake::Task["software:create_licenses"].invoke - Rake::Task["software:create_categories"].invoke - Rake::Task["software:create_sample_softwares"].invoke - end - - desc "Create the main community and its contents" - task :all => :environment do - Rake::Task["templates:destroy"].invoke - Rake::Task["main_data:populate"].invoke - end -end diff --git a/src/software_communities/lib/tasks/templates.rake b/src/software_communities/lib/tasks/templates.rake deleted file mode 100644 index 46ad264..0000000 --- a/src/software_communities/lib/tasks/templates.rake +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/env ruby -# encoding: utf-8 - -namespace :templates do - namespace :create do - - desc "Create new templates of software, intitution, person and community" - task :all => :environment do - Rake::Task["templates:create:software"].invoke - end - - desc "Create new templates of software" - task :software => :environment do - Environment.all.each do |env| - if env.plugin_enabled?("MpogSoftware") or env.plugin_enabled?("SoftwareCommunitiesPlugin") - software = Community["software"] - - if software.nil? - software = Community.create!(:name => "Software", :identifier => "software") - end - - software.layout_template = "default" - software.is_template = true - software.save! - - puts "Software Template successfully created!" - end - end - end - end - - desc "Destroy all templates created by this namespace" - task :destroy => :environment do - Environment.all.each do |env| - if env.plugin_enabled?("MpogSoftware") or env.plugin_enabled?("SoftwareCommunitiesPlugin") - Community["software"].destroy unless Community["software"].nil? - puts "Software template destoyed with success!" - end - end - end - -end diff --git a/src/software_communities/lib/wiki_block.rb b/src/software_communities/lib/wiki_block.rb deleted file mode 100644 index 3d7da90..0000000 --- a/src/software_communities/lib/wiki_block.rb +++ /dev/null @@ -1,30 +0,0 @@ -class WikiBlock < Block - - attr_accessible :show_name, :wiki_link - settings_items :show_name, :type => :boolean, :default => false - settings_items :wiki_link, :type => :string, :default => "" - - def self.description - _('Wiki Link') - end - - def help - _('This block displays a link to the software wiki.') - end - - def content(args={}) - block = self - s = show_name - - lambda do |object| - render( - :file => 'blocks/wiki', - :locals => { :block => block, :show_name => s } - ) - end - end - - def cacheable? - true - end -end diff --git a/src/software_communities/po/pt/software_communities.po b/src/software_communities/po/pt/software_communities.po deleted file mode 100644 index 037150c..0000000 --- a/src/software_communities/po/pt/software_communities.po +++ /dev/null @@ -1,1361 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: 1.2.1+spb4-2-ged0502e\n" -"POT-Creation-Date: 2015-09-14 14:29-0300\n" -"PO-Revision-Date: 2014-11-12 13:05-0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" - -#: plugins/software_communities/lib/search_catalog_block.rb:8 -msgid "Search Softwares catalog" -msgstr "Busca do catálogo de software" - -#: plugins/software_communities/lib/search_catalog_block.rb:12 -msgid "This block displays the search categories field " -msgstr "Este bloco apresenta a busca do campo de categorias" - -#: plugins/software_communities/lib/ext/category.rb:5 -msgid "Agriculture, Fisheries and Extraction" -msgstr "Agricultura, Extrativismo e Pesca" - -#: plugins/software_communities/lib/ext/category.rb:6 -msgid "Science, Information and Communication" -msgstr "Ciência, Informação e Comunicação " - -#: plugins/software_communities/lib/ext/category.rb:7 -msgid "Economy and Finances" -msgstr "Economia e Finanças" - -#: plugins/software_communities/lib/ext/category.rb:8 -msgid "Public Administration" -msgstr "Gestão Pública" - -#: plugins/software_communities/lib/ext/category.rb:9 -msgid "Habitation, Sanitation and Urbanism" -msgstr "Habitação, Saneamento e Urbanismo" - -#: plugins/software_communities/lib/ext/category.rb:10 -msgid "Individual, Family and Society" -msgstr "Pessoa, Família e Sociedade " - -#: plugins/software_communities/lib/ext/category.rb:11 -msgid "Health" -msgstr "Saúde" - -#: plugins/software_communities/lib/ext/category.rb:12 -msgid "Social Welfare and Development" -msgstr "Bem-estar e Desenvolvimento Social" - -#: plugins/software_communities/lib/ext/category.rb:13 -msgid "Defense and Security" -msgstr "Defesa e Segurança" - -#: plugins/software_communities/lib/ext/category.rb:14 -msgid "Education" -msgstr "Educação" - -#: plugins/software_communities/lib/ext/category.rb:15 -msgid "Government and Politics" -msgstr "Governo e Política" - -#: plugins/software_communities/lib/ext/category.rb:16 -msgid "Justice and Legislation" -msgstr "Justiça e Legislação" - -#: plugins/software_communities/lib/ext/category.rb:17 -msgid "International Relationships" -msgstr "Relações Internacionais" - -#: plugins/software_communities/lib/ext/category.rb:18 -msgid "Transportation and Transit" -msgstr "Transporte e Trânsito" - -#: plugins/software_communities/lib/ext/search_controller.rb:118 -msgid "Result Search" -msgstr "Resultado da pesquisa" - -#: plugins/software_communities/lib/ext/search_controller.rb:142 -msgid "Selected options: " -msgstr "Opções selecionadas:" - -#: plugins/software_communities/lib/repository_block.rb:8 -msgid "Repository Link" -msgstr "Link para o Repositório" - -#: plugins/software_communities/lib/repository_block.rb:12 -msgid "This block displays the repository link of a software." -msgstr "Este bloco apresenta o link para o repositório do software." - -#: plugins/software_communities/lib/wiki_block.rb:8 -msgid "Wiki Link" -msgstr "Link da wiki" - -#: plugins/software_communities/lib/wiki_block.rb:12 -msgid "This block displays a link to the software wiki." -msgstr "Este bloco apresenta o link para a wiki do software." - -#: plugins/software_communities/lib/statistic_block.rb:9 -msgid "Software Statistics" -msgstr "Estastísticas de software" - -#: plugins/software_communities/lib/statistic_block.rb:13 -msgid "This block displays software statistics." -msgstr "Este bloco apresenta a estatística de software" - -#: plugins/software_communities/lib/library.rb:5 -msgid "can't be blank" -msgstr "não pode ficar em branco" - -#: plugins/software_communities/lib/library.rb:8 -msgid "Too long (maximum is 20 characters)" -msgstr "Muito grande(máximo é 20 caracteres" - -#: plugins/software_communities/lib/software_info.rb:151 -msgid "Name is too long (maximum is %{count} characters)" -msgstr "Nome é muito longo(máximo é %{count} caracteres)" - -#: plugins/software_communities/lib/software_info.rb:219 -msgid "can't have more than 10 characteres" -msgstr "não pode ter mais de 10 caracteres" - -#: plugins/software_communities/lib/software_info.rb:222 -msgid "can't have whitespaces" -msgstr "não pode ter espaços em branco" - -#: plugins/software_communities/lib/software_info.rb:230 -#: plugins/software_communities/lib/software_info.rb:236 -#: plugins/software_communities/lib/software_info.rb:242 -msgid ": at least one must be filled" -msgstr ": ao menos um deve ser preenchido" - -#: plugins/software_communities/lib/dynamic_table_helper.rb:17 -#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:3 -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:37 -#: plugins/software_communities/views/box_organizer/_download_block.html.erb:3 -#: plugins/software_communities/views/_main_software_editor_extras.html.erb:3 -msgid "Name" -msgstr "Nome" - -#: plugins/software_communities/lib/dynamic_table_helper.rb:18 -msgid "Version" -msgstr "Versão" - -#: plugins/software_communities/lib/dynamic_table_helper.rb:19 -#: plugins/software_communities/views/profile/_software_tab.html.erb:18 -msgid "License" -msgstr "Licença" - -#: plugins/software_communities/lib/dynamic_table_helper.rb:91 -msgid "Autocomplete field, type something" -msgstr "Campo automático, digite algo" - -#: plugins/software_communities/lib/dynamic_table_helper.rb:116 -#: plugins/software_communities/views/box_organizer/_download_list_template.html.erb:8 -#: plugins/software_communities/views/box_organizer/_download_list.html.erb:8 -msgid "Delete" -msgstr "Deletar" - -#: plugins/software_communities/lib/create_software.rb:36 -msgid "New software" -msgstr "Novo software" - -#: plugins/software_communities/lib/create_software.rb:44 -msgid "%{requestor} wants to create software %{subject} with" -msgstr "%{requestor} deseja criar o software %{subject} com" - -#: plugins/software_communities/lib/create_software.rb:46 -msgid " no finality." -msgstr " campo finalidade em branco." - -#: plugins/software_communities/lib/create_software.rb:48 -msgid " this finality:

    %{finality}

    " -msgstr " esta finalidade:

    %{finality}

    " - -#: plugins/software_communities/lib/create_software.rb:68 -msgid "%{requestor} wants to create software %{subject}" -msgstr "%{requestor} deseja criar o software %{subject}" - -#: plugins/software_communities/lib/create_software.rb:73 -msgid "" -"User \"%{user}\" just requested to create software %{software}.\n" -" You have to approve or reject it through the \"Pending Validations\"\n" -" section in your control panel.\n" -msgstr "" -"Usuário \"%{user}\" acabou de requisitar a criação do software %{software}.\n" -" Você deve aprovar ou rejeitar pela seção \"Tarefas pendentes\"\n" -" no seu painel de controle.\n" - -#: plugins/software_communities/lib/create_software.rb:80 -msgid "" -"Your request for registering software %{software} at %{environment} was\n" -" just sent. Environment administrator will receive it and will approve " -"or\n" -" reject your request according to his methods and criteria.\n" -"\n" -" You will be notified as soon as environment administrator has a " -"position\n" -" about your request." -msgstr "" -"O seu pedido para registrar o software %{software} no %{environment} foi\n" -" enviada. O administrador do ambiente irá recebe-la e aprovará ou rejeitará " -"seu pedido de acordo com seus métodos e critérios.\n" -"\n" -" Você será notificado assim que o administrador do ambiente tiver uma " -"resposta sobre o seu pedido." - -#: plugins/software_communities/lib/create_software.rb:90 -msgid "" -"Your request for registering software %{software} at %{environment} was\n" -" not approved by the environment administrator. The following " -"explanation\n" -" was given: \n" -"\n" -"%{explanation}" -msgstr "" -"Seu pedido para registro do software %{software} no %{environment} não " -"foi\n" -" aprovado pelo administrador do ambiente. A seguinte explicação\n" -" foi fornecida:\n" -"\n" -"%{explanation}" - -#: plugins/software_communities/lib/create_software.rb:99 -msgid "" -"Your request for registering the software \"%{software}\" was approved.\n" -" You can access %{url} and finish the registration of your software." -msgstr "" -"Seu pedido para registro do software %{software} foi aprovada.\n" -" Você pode acessar %{url} e finalizar o registro do seu software. " - -#: plugins/software_communities/lib/operating_system.rb:12 -msgid "too long (maximum is 20 characters)" -msgstr "muito longo(máximo é 20 caracteres)" - -#: plugins/software_communities/lib/software_highlights_block.rb:4 -msgid "Software Highlights Block" -msgstr "Bloco de software em destaque" - -#: plugins/software_communities/lib/software_highlights_block.rb:8 -msgid "This block displays the softwares icon into a highlight" -msgstr "Esse bloco apresenta o ícone do software em destaque" - -#: plugins/software_communities/lib/categories_software_block.rb:8 -msgid "Categories Softwares" -msgstr "Categorias de Softwares" - -#: plugins/software_communities/lib/categories_software_block.rb:12 -msgid "" -"This block displays the categories and the amount of softwares for\n" -" each category." -msgstr "" -"Este bloco apresenta as categorias e a quantidade de softwares para \n" -" cada categoria." - -#: plugins/software_communities/lib/softwares_block.rb:8 -msgid "Softwares" -msgstr "Softwares" - -#: plugins/software_communities/lib/softwares_block.rb:13 -msgid "{#} generic software" -msgid_plural "{#} generic softwares" -msgstr[0] "{#} software genérico" -msgstr[1] "{#} softwares genéricos" - -#: plugins/software_communities/lib/softwares_block.rb:15 -msgid "{#} public software" -msgid_plural "{#} public softwares" -msgstr[0] "{#} software público" -msgstr[1] "{#} software públicos" - -#: plugins/software_communities/lib/softwares_block.rb:17 -msgid "{#} software" -msgid_plural "{#} softwares" -msgstr[0] "{#} software" -msgstr[1] "{#} softwares" - -#: plugins/software_communities/lib/softwares_block.rb:22 -msgid "This block displays the softwares in which the user is a member." -msgstr "Este bloco apresenta os softwares em que o usuário é membro." - -#: plugins/software_communities/lib/softwares_block.rb:31 -#: plugins/software_communities/lib/softwares_block.rb:37 -msgid "softwares|View all" -msgstr "softwares|Veja todos" - -#: plugins/software_communities/lib/software_communities_plugin.rb:17 -msgid "Add Public Software and MPOG features." -msgstr "Adicionar Software Público e Funcionalidades." - -#: plugins/software_communities/lib/software_communities_plugin.rb:90 -msgid "Rate this software" -msgstr "Avalie esse software" - -#: plugins/software_communities/lib/software_communities_plugin.rb:94 -msgid "Use reports" -msgstr "Relatos de uso" - -#: plugins/software_communities/lib/software_communities_plugin.rb:138 -msgid "Software Info" -msgstr "Informação de Software" - -#: plugins/software_communities/lib/software_communities_plugin.rb:149 -msgid "Create a new software" -msgstr "Criar um novo software" - -#: plugins/software_communities/lib/software_communities_plugin.rb:159 -msgid "Software" -msgstr "Software" - -#: plugins/software_communities/lib/software_language.rb:10 -msgid "Software language is too long (maximum is 20 characters)" -msgstr "Linguagem do software está muito grande (máximo de 20 caracteres)" - -#: plugins/software_communities/lib/software_tab_data_block.rb:10 -msgid "Software Tab Data" -msgstr "Aba de dados do software" - -#: plugins/software_communities/lib/software_tab_data_block.rb:14 -msgid "This block is used by colab to insert data into Noosfero" -msgstr "Esse bloco é usado pelo Colab para inserir dados no noosfero" - -#: plugins/software_communities/lib/download_block.rb:15 -msgid "Download Stable Version" -msgstr "Baixar Versão Estável" - -#: plugins/software_communities/lib/download_block.rb:19 -msgid "This block displays the stable version of a software." -msgstr "Este block apresenta a versão estável do software." - -#: plugins/software_communities/lib/software_database.rb:12 -msgid "Software database is too long (maximum is 20 characters)" -msgstr "Banco de dados do software está muito grande(máximo é 20 caracteres)" - -#: plugins/software_communities/lib/software_information_block.rb:8 -msgid "Basic Software Information" -msgstr "Informação Básica do Software" - -#: plugins/software_communities/lib/software_information_block.rb:12 -msgid "This block displays the basic information of a software profile." -msgstr "Este bloco apresenta a informação básica de um perfil de software." - -#: plugins/software_communities/lib/categories_and_tags_block.rb:8 -msgid "Categories and Tags" -msgstr "Categorias e Marcadores" - -#: plugins/software_communities/lib/categories_and_tags_block.rb:12 -msgid "This block displays the categories and tags of a software." -msgstr "Este block apresenta as categorias e marcadores de um software." - -#: plugins/software_communities/test/unit/software_info_validation_test.rb:108 -msgid "Features is too long (maximum is 4000 characters)" -msgstr "Funcionalidades está muito grande(máximo é 4000 caracteres)" - -#: plugins/software_communities/test/unit/software_info_validation_test.rb:116 -msgid "Objectives is too long (maximum is 4000 characters)" -msgstr "Objetivo está muito grande (máximo é 4000 caracteres)" - -#: plugins/software_communities/controllers/software_communities_plugin_myprofile_controller.rb:41 -#: plugins/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb:19 -msgid "Save and Configure Community" -msgstr "Salvar e Configurar Comunidade" - -#: plugins/software_communities/controllers/software_communities_plugin_myprofile_controller.rb:45 -msgid "Software updated successfully" -msgstr "Software atualizado com sucesso" - -#: plugins/software_communities/controllers/software_communities_plugin_myprofile_controller.rb:49 -msgid "Could not update software" -msgstr "Não foi possível atualizar o software" - -#: plugins/software_communities/controllers/software_communities_plugin_myprofile_controller.rb:130 -msgid "" -"Your new software request will be evaluated by anadministrator. You will be " -"notified." -msgstr "" -"Seu pedido para registro do software será avaliado por um administrador. " -"Você será notificado." - -#: plugins/software_communities/controllers/software_communities_plugin_profile_controller.rb:7 -msgid "Could not find the download file" -msgstr "Não foi possível encontrar o arquivo para download" - -#: plugins/software_communities/controllers/software_communities_plugin_profile_controller.rb:8 -msgid "Invalid download params" -msgstr "Parâmetros de Download inválidos" - -#: plugins/software_communities/views/profile_editor/_software_community.html.erb:1 -msgid "General information" -msgstr "Informação geral" - -#: plugins/software_communities/views/profile_editor/_software_community.html.erb:40 -msgid "Address" -msgstr "Endereço" - -#: plugins/software_communities/views/profile_editor/_software_community.html.erb:46 -msgid "WARNING!" -msgstr "PERIGO!" - -#: plugins/software_communities/views/profile_editor/_software_community.html.erb:47 -msgid "" -"You are about to change the address, and this will break external links to " -"the homepage or to content inside it. Do you really want to change?" -msgstr "" -"Você está prestes a mudar o endereço, e isso vai quebrar links externos para " -"a página inicial ou para o conteúdo dentro dela. Você realmente quer mudar?" - -#: plugins/software_communities/views/profile_editor/_software_community.html.erb:49 -#: plugins/software_communities/views/profile/_software_tab.html.erb:7 -#: plugins/software_communities/views/profile/_software_tab.html.erb:8 -#: plugins/software_communities/views/profile/_software_tab.html.erb:9 -#: plugins/software_communities/views/profile/_software_tab.html.erb:10 -#: plugins/software_communities/views/profile/_software_tab.html.erb:11 -msgid "Yes" -msgstr "Sim" - -#: plugins/software_communities/views/profile_editor/_software_community.html.erb:50 -#: plugins/software_communities/views/profile/_software_tab.html.erb:7 -#: plugins/software_communities/views/profile/_software_tab.html.erb:8 -#: plugins/software_communities/views/profile/_software_tab.html.erb:9 -#: plugins/software_communities/views/profile/_software_tab.html.erb:10 -#: plugins/software_communities/views/profile/_software_tab.html.erb:11 -msgid "No" -msgstr "Não" - -#: plugins/software_communities/views/profile_editor/_software_community.html.erb:63 -msgid "Enable \"contact us\"" -msgstr "Habilitar \"entre em contato\"" - -#: plugins/software_communities/views/profile_editor/_software_community.html.erb:68 -msgid "Products/Services catalog" -msgstr "Catálogo de Produtos/Serviços" - -#: plugins/software_communities/views/profile_editor/_software_community.html.erb:69 -msgid "Number of products/services displayed per page on catalog" -msgstr "Número de produtos/serviços mostrado por página no catálogo" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:4 -msgid "Configure Software Community" -msgstr "Configurar Comunidade do Software" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:8 -msgid "Set the basic settings of the software associated community" -msgstr "Defina as configurações básicas da comunidade do software" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:18 -msgid "This profile is a template" -msgstr "Este perfil é um template" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:24 -msgid "Privacy options" -msgstr "Opções de privacidade" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:28 -msgid "Public — show my contents to all internet users" -msgstr "Público — mostrar meus conteúdos a todos os usuários na internet" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:31 -msgid "Private — show my contents only to friends" -msgstr "Privado — mostrar meus conteudos apenas aos amigos" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:35 -msgid "Public — show content of this group to all internet users" -msgstr "" -"Público — mostrar conteudos deste grupo a todos os usuários na internet" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:38 -msgid "Private — show content of this group only to members" -msgstr "Privado — mostrar meus conteudos deste grupo apenas aos membros" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:43 -msgid "Page to redirect after login" -msgstr "Página para redirecionar após o login" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:47 -msgid "Translations" -msgstr "Traduções" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:49 -msgid "" -"Automaticaly redirect the visitor to the article translated to his/her " -"language" -msgstr "" -"Redirecionar automaticamente o visitante para o artigo traduzido para sua " -"língua" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:53 -msgid "Suggestions" -msgstr "Sugestões" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:55 -msgid "Send me relationship suggestions by email" -msgstr "Envie-me sugestões de relacionamento por e-mail" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:65 -#: plugins/software_communities/views/search/_full_community.html.erb:27 -msgid "Software Categories" -msgstr "Categorias de Software" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:68 -#: plugins/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb:18 -msgid "Save" -msgstr "Salvar" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:71 -#: plugins/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb:20 -msgid "Back to control panel" -msgstr "Voltar para o painel de controle" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:77 -msgid "Delete software and community" -msgstr "Remover software e comunidade" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:80 -msgid "Deactivate software and community" -msgstr "Desativar software e comunidade" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:80 -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:82 -msgid "Are you sure you want to deactivate this profile?" -msgstr "Tem certeza de que deseja desativar esse perfil?" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:82 -msgid "Activate software and community" -msgstr "Ativar software e comunidade" - -#: plugins/software_communities/views/profile_editor/_first_edit_software_community_extras.html.erb:3 -msgid "Step 1 - Software Creation" -msgstr "Passo 1 - Criação do Software" - -#: plugins/software_communities/views/profile_editor/_first_edit_software_community_extras.html.erb:7 -msgid "Step 2 - Community Settings" -msgstr "Passo 2 - Configuração da Comunidade" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_license_info_fields.html.erb:5 -msgid "Autocomplete field, type some license" -msgstr "Campo com auto completar, digite uma licença" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_license_info_fields.html.erb:8 -msgid "Read license" -msgstr "Ler licença" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:4 -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:7 -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:10 -#: plugins/software_communities/views/search/_software_search_form.html.erb:14 -msgid "Public Software" -msgstr "Software Público" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:4 -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:7 -msgid "Public software" -msgstr "Software Público" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:12 -msgid "Adherent to e-PING ?" -msgstr "Aderente ao e-PING ?" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:21 -msgid "Adherent to e-MAG ?" -msgstr "Aderente ao e-MAG ?" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:30 -msgid "Adherent to ICP-Brasil ?" -msgstr "Aderente ao ICP-Brasil ?" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:39 -msgid "Adherent to e-ARQ ?" -msgstr "Aderente ao e-ARQ ?" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:48 -msgid "Internacionalizable ?" -msgstr "Internacionalizável ?" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:59 -msgid "Operating Platform" -msgstr "Plataforma Operacional" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:64 -msgid "Features" -msgstr "Características" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:69 -msgid "Demonstration url" -msgstr "Url de demonstração" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:74 -#: plugins/software_communities/views/profile/_software_tab.html.erb:35 -msgid "Libraries" -msgstr "Bibliotecas" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:82 -msgid "Operating Systems" -msgstr "Sistemas Operacionais" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:90 -msgid "Programming languages" -msgstr "Linguagens de programação" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:97 -msgid "Databases" -msgstr "Banco de dados" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb:1 -msgid "Edit Software" -msgstr "Editar Software" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb:9 -msgid "Main Information" -msgstr "Informação" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb:12 -msgid "Specifications" -msgstr "Especificações" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_language_fields.html.erb:11 -msgid "New language" -msgstr "Nova linguagem" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_library_fields.html.erb:11 -msgid "New Library" -msgstr "Nova Biblioteca" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_operating_system_fields.html.erb:11 -msgid "New Operating System" -msgstr "Novo Sistema Operacional" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_database_fields.html.erb:11 -msgid "New Database" -msgstr "Novo Banco de Dados" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:8 -msgid "Short Name" -msgstr "Nome Curto" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:14 -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:56 -#: plugins/software_communities/views/_main_software_editor_extras.html.erb:10 -msgid "Finality" -msgstr "Finalidade" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:15 -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:57 -msgid "What is the software for?" -msgstr "Para quê serve o software?" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:21 -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:64 -msgid "Software Logo" -msgstr "Marca do Software" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:26 -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:69 -msgid "Image:" -msgstr "Imagem:" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:26 -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:69 -msgid "Max size: %s (.jpg, .gif, .png)" -msgstr "Tamanho máximo: %s (.jpg, .gif, .png)" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:33 -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:76 -msgid "License Version: " -msgstr "Versão da Licença: " - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:45 -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:89 -#: plugins/software_communities/views/_main_software_editor_extras.html.erb:29 -msgid "Link to Repository: " -msgstr "Link para o Repositório" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:5 -msgid "Creating new software" -msgstr "Criando novo software" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:9 -msgid "" -"Enter the basic information about the software.
    \n" -" You can add the details after you create it." -msgstr "" -"Entre com as informações básicas do software.
    \n" -" Você pode adicionar os detalhes após sua criação." - -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:16 -msgid "" -"Note that the creation of communities in this environment is restricted. " -"Your request to create this new community will be sent to %{environment} " -"administrators and will be approved or rejected according to their methods " -"and criteria." -msgstr "" -"Note que a criação de comunidades nesse ambiente é restrita. Sua requisição " -"para criar essa nova comunidade será enviada aos administradores do " -"%{environment} para ser aprovada ou rejeitada de acordo com os seus métodos " -"e critérios" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:22 -msgid "\"Can`t create new software: #{@errors.length} errors\"" -msgstr "\"Não foi possível criar o software: #{@errors.length} errors\"" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:45 -msgid "Domain" -msgstr "Domínio" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:97 -msgid "Create" -msgstr "Criar" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:98 -msgid "Cancel" -msgstr "Cancelar" - -#: plugins/software_communities/views/search/_catalog_result_list.html.erb:12 -msgid "see all (%d)" -msgstr "ver todos (%d)" - -#: plugins/software_communities/views/search/_catalog_result_list.html.erb:34 -msgid "No software found. Try more general filters" -msgstr "Nenhum software encontrado. Tente outros filtros" - -#: plugins/software_communities/views/search/_catalog_result_list.html.erb:36 -msgid "" -"No software found. Try more general filters or check the software category " -"individually" -msgstr "" -"Nenhum software encontrado. Tente outros filtros ou verifique a categoria do " -"software individualmente" - -#: plugins/software_communities/views/search/_catalog_result_list.html.erb:41 -#: plugins/software_communities/views/search/_full_community.html.erb:35 -#: plugins/software_communities/views/search/_catalog_filter.html.erb:10 -#: plugins/software_communities/views/blocks/categories_software.html.erb:15 -msgid "\"#{category.name}\"" -msgstr "\"#{category.name}\"" - -#: plugins/software_communities/views/search/_software_search_form.html.erb:3 -msgid "Search Public Software Catalog" -msgstr "Pesquisar Catálogo de Software Público" - -#: plugins/software_communities/views/search/_software_search_form.html.erb:15 -msgid "" -"Projects that have passed by the Avalia SPB process according to the " -"requirements of IN 01/2011." -msgstr "" -"Projetos que passaram pelo processo Avalia SPB de acordo com os Requisitos " -"da IN 01/2011." - -#: plugins/software_communities/views/search/_software_search_form.html.erb:18 -msgid "All" -msgstr "Todos" - -#: plugins/software_communities/views/search/_software_search_form.html.erb:19 -msgid "Projects included in the portal as cases provided by the IN 01/2011." -msgstr "Projetos incluidos no portal como os casos fornecidos pela IN 01/2011." - -#: plugins/software_communities/views/search/_software_search_form.html.erb:24 -msgid "" -"Type words about the software you're looking for (the search begins after 3 " -"characters)" -msgstr "" -"Digite palavras sobre o software que você está procurando (a busca começa " -"depois de 3 caracteres" - -#: plugins/software_communities/views/search/_software_search_form.html.erb:27 -msgid "Filter" -msgstr "Filtro" - -#: plugins/software_communities/views/search/_software_search_form.html.erb:52 -#: plugins/software_communities/views/profile/_profile_members_list.html.erb:5 -msgid "Name A-Z" -msgstr "Nome A-Z" - -#: plugins/software_communities/views/search/_software_search_form.html.erb:53 -#: plugins/software_communities/views/profile/_profile_members_list.html.erb:6 -msgid "Name Z-A" -msgstr "Nome Z-A" - -#: plugins/software_communities/views/search/_software_search_form.html.erb:54 -msgid "Relevance" -msgstr "Relevância" - -#: plugins/software_communities/views/search/software_infos.html.erb:6 -msgid "Type words about the %s you're looking for" -msgstr "Digite palavras sobre o %s que você está procurando" - -#: plugins/software_communities/views/search/_full_community.html.erb:46 -msgid "This software doesn't have categories" -msgstr "Este software nào contém categorias" - -#: plugins/software_communities/views/search/_catalog_filter.html.erb:4 -#: plugins/software_communities/views/blocks/categories_and_tags.html.erb:2 -msgid "Categories" -msgstr "Categorias" - -#: plugins/software_communities/views/search/_catalog_filter.html.erb:16 -msgid "More options" -msgstr "Mais opções" - -#: plugins/software_communities/views/search/_catalog_filter.html.erb:18 -msgid "Clean up" -msgstr "Limpar" - -#: plugins/software_communities/views/search/_catalog_filter.html.erb:19 -msgid "Close" -msgstr "Fechar" - -#: plugins/software_communities/views/comments_extra_fields.html.erb:3 -msgid "Additional informations" -msgstr "Informações adicionais" - -#: plugins/software_communities/views/comments_extra_fields.html.erb:11 -msgid "Number of Beneficiaries" -msgstr "Número de beneficiados" - -#: plugins/software_communities/views/comments_extra_fields.html.erb:17 -msgid "Saved resources" -msgstr "Recursos economizados" - -#: plugins/software_communities/views/box_organizer/_wiki_block.html.erb:3 -msgid "Wiki link" -msgstr "Link da wiki" - -#: plugins/software_communities/views/box_organizer/_software_tab_data_block.html.erb:5 -msgid "Which blog should have its posts displayed: " -msgstr "Qual blog deve ter seus posts exibidos: " - -#: plugins/software_communities/views/box_organizer/_software_tab_data_block.html.erb:13 -msgid "This community has no blogs" -msgstr "Essa comunidade não possui blogs" - -#: plugins/software_communities/views/box_organizer/_statistic_block.html.erb:5 -msgid "Benefited People" -msgstr "Pessoas Beneficiadas" - -#: plugins/software_communities/views/box_organizer/_statistic_block.html.erb:6 -#: plugins/software_communities/views/box_organizer/_statistic_block.html.erb:8 -msgid "Portal suggested value: " -msgstr "Valor sugerido pelo portal: " - -#: plugins/software_communities/views/box_organizer/_statistic_block.html.erb:7 -msgid "Saved Resources" -msgstr "Recursos economizados" - -#: plugins/software_communities/views/box_organizer/_download_block.html.erb:4 -msgid "Link" -msgstr "Link" - -#: plugins/software_communities/views/box_organizer/_download_block.html.erb:5 -msgid "Platforms" -msgstr "Plataformas" - -#: plugins/software_communities/views/box_organizer/_download_block.html.erb:6 -#: plugins/software_communities/views/blocks/download.html.erb:17 -msgid "Minimum Requirements" -msgstr "Requisitos Mínimos" - -#: plugins/software_communities/views/box_organizer/_download_block.html.erb:7 -msgid "Size:" -msgstr "Tamanho:" - -#: plugins/software_communities/views/box_organizer/_download_block.html.erb:16 -msgid "New link" -msgstr "Novo link" - -#: plugins/software_communities/views/box_organizer/_softwares_block.html.erb:2 -msgid "Limit of items" -msgstr "Limite de itens" - -#: plugins/software_communities/views/box_organizer/_softwares_block.html.erb:3 -msgid "Software Type:" -msgstr "Tipo de Software:" - -#: plugins/software_communities/views/_main_software_editor_extras.html.erb:1 -#: plugins/software_communities/views/profile/_software_tab.html.erb:3 -msgid "Software Information" -msgstr "Informação de Software" - -#: plugins/software_communities/views/_main_software_editor_extras.html.erb:15 -msgid "Licenses" -msgstr "Licenças" - -#: plugins/software_communities/views/_main_software_editor_extras.html.erb:20 -msgid "License link" -msgstr "Link para a licença" - -#: plugins/software_communities/views/profile/_profile_members_list.html.erb:2 -msgid "Sort by:" -msgstr "Ordenar por:" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:6 -msgid "Name:" -msgstr "Nome:" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:7 -msgid "Adherent to e_mag:" -msgstr "Aderente ao e_mag:" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:8 -msgid "Adherent to icp_brasil:" -msgstr "Aderente ao icp_brasil:" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:9 -msgid "Adherent to e_ping:" -msgstr "Aderente ao e_ping" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:10 -msgid "Adherent to e_arq:" -msgstr "Aderente ao e_arq" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:11 -msgid "Internacionalizable:" -msgstr "Internacionalizável:" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:12 -msgid "Operating Platform:" -msgstr "Plataforma Operacional:" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:13 -msgid "Demonstration URL:" -msgstr "URL de Demonstração:" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:14 -msgid "Short Name:" -msgstr "Nome Curto:" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:15 -msgid "Objectives:" -msgstr "Objetivos:" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:16 -msgid "Features:" -msgstr "Funcionalidades:" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:19 -msgid "Version:" -msgstr "Versão:" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:20 -msgid "Link:" -msgstr "Link:" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:25 -msgid "Show Libraries" -msgstr "Mostrar Bibliotecas" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:26 -msgid "Hide Libraries" -msgstr "Ocultar Bibliotecas" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:53 -msgid "Show Database" -msgstr "Mostrar Banco de Dados" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:54 -msgid "Hide Database" -msgstr "Ocultar Banco de Dados" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:63 -msgid "Software Databases" -msgstr "Bancos de Dados do Software" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:81 -msgid "Show Languages" -msgstr "Mostrar Linguagens" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:82 -msgid "Hide Languages" -msgstr "Ocultar Linguagens" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:91 -msgid "Software Languages" -msgstr "Linguagens do Software" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:109 -msgid "Show Operating Systems" -msgstr "Mostrar Sistema Operacional" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:110 -msgid "Hide Operating Systems" -msgstr "Ocultar Sistema Operacional" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:120 -msgid "Operating System" -msgstr "Sistema Operacional" - -#: plugins/software_communities/views/profile/members.html.erb:3 -#: plugins/software_communities/views/profile/members.html.erb:26 -msgid "Members" -msgstr "Membros" - -#: plugins/software_communities/views/profile/members.html.erb:4 -msgid "%s" -msgstr "" - -#: plugins/software_communities/views/profile/members.html.erb:43 -msgid "Administrators" -msgstr "Administradores" - -#: plugins/software_communities/views/profile/members.html.erb:57 -msgid "Go back" -msgstr "Voltar" - -#: plugins/software_communities/views/profile/members.html.erb:60 -msgid "Invite people to join" -msgstr "Convide pessoas para entrar" - -#: plugins/software_communities/views/profile/members.html.erb:63 -msgid "Send e-mail to members" -msgstr "Envie e-mail para os membros" - -#: plugins/software_communities/views/profile/index.html.erb:17 -msgid "Control Panel" -msgstr "Painel de Controle" - -#: plugins/software_communities/views/blocks/main_area_softwares.html.erb:23 -msgid "See More" -msgstr "Veja Mais" - -#: plugins/software_communities/views/blocks/_software_tab_blog.html.erb:5 -msgid "This community has no posts in its blog" -msgstr "Essa comunidade não possui posts nesse blog" - -#: plugins/software_communities/views/blocks/_software_tab_blog.html.erb:13 -msgid "Read more" -msgstr "Leia mais" - -#: plugins/software_communities/views/blocks/repository.html.erb:2 -#: plugins/software_communities/views/blocks/download.html.erb:2 -#: plugins/software_communities/views/blocks/software_tab_data.html.erb:2 -#: plugins/software_communities/views/blocks/wiki.html.erb:2 -#: plugins/software_communities/views/blocks/software_information.html.erb:4 -msgid "This community needs a software to use this block" -msgstr "Essa comunidade precisa de um software para usar este block" - -#: plugins/software_communities/views/blocks/repository.html.erb:4 -msgid "Repository" -msgstr "Repositório" - -#: plugins/software_communities/views/blocks/download.html.erb:4 -msgid "\"Download #{block.owner.software_info.community.name}\"" -msgstr "\"Baixar #{block.owner.software_info.community.name}\"" - -#: plugins/software_communities/views/blocks/download.html.erb:9 -msgid "Download the software" -msgstr "Baixar o software" - -#: plugins/software_communities/views/blocks/download.html.erb:15 -msgid "\"#{download[:name]}\"" -msgstr "\"#{download[:name]}\"" - -#: plugins/software_communities/views/blocks/download.html.erb:16 -msgid "\"Platform:#{download[:software_description]}\"" -msgstr "\"Platform:#{download[:software_description]}\"" - -#: plugins/software_communities/views/blocks/download.html.erb:23 -msgid "\"License: #{block.owner.software_info.license_info.version}\"" -msgstr "\"License: #{block.owner.software_info.license_info.version}\"" - -#: plugins/software_communities/views/blocks/categories_and_tags.html.erb:12 -msgid "Tags" -msgstr "Tags" - -#: plugins/software_communities/views/blocks/software_statistics.html.erb:5 -msgid " benefited people*" -msgstr " pessoas beneficiadas*" - -#: plugins/software_communities/views/blocks/software_statistics.html.erb:6 -msgid " saved resources*" -msgstr " recursos economizados*" - -#: plugins/software_communities/views/blocks/software_statistics.html.erb:10 -msgid "Data estimated by the software administrator." -msgstr "Dados estimados pelo administrador do software" - -#: plugins/software_communities/views/blocks/categories_software.html.erb:4 -msgid "See more Software" -msgstr "Veja mais softwares" - -#: plugins/software_communities/views/blocks/categories_software.html.erb:8 -msgid "Categories:" -msgstr "Categorias:" - -#: plugins/software_communities/views/blocks/categories_software.html.erb:23 -#: plugins/software_communities/views/blocks/search_catalog.html.erb:9 -msgid "Access the complete catalog" -msgstr "Acessar o catálogo completo" - -#: plugins/software_communities/views/blocks/software_tab_data.html.erb:6 -msgid "Discussions" -msgstr "Discussões" - -#: plugins/software_communities/views/blocks/software_tab_data.html.erb:7 -msgid "Blog" -msgstr "" - -#: plugins/software_communities/views/blocks/software_tab_data.html.erb:8 -msgid "Repository Feed" -msgstr "Feed do Repositório" - -#: plugins/software_communities/views/blocks/wiki.html.erb:4 -msgid "Wiki" -msgstr "" - -#: plugins/software_communities/views/blocks/software_highlights.html.erb:13 -msgid "See all" -msgstr "ver todos (%d)" - -#: plugins/software_communities/views/blocks/software_information.html.erb:16 -msgid "Control panel" -msgstr "Painel de Controle" - -#: plugins/software_communities/views/blocks/software_information.html.erb:24 -msgid "\"#{block.owner.software_info.acronym} - \"" -msgstr "\"#{block.owner.software_info.acronym} - \"" - -#: plugins/software_communities/views/blocks/software_information.html.erb:25 -msgid "\"#{block.owner.name}\"" -msgstr "\"#{block.owner.name}\"" - -#: plugins/software_communities/views/blocks/search_catalog.html.erb:2 -msgid "Catalog of Public Software" -msgstr "Catálogo de Software Público" - -#: plugins/software_communities/views/blocks/search_catalog.html.erb:5 -msgid "Search" -msgstr "Procurar" - -#~ msgid "Software Projects:" -#~ msgstr "Projetos de Software:" - -#~ msgid "Include in results" -#~ msgstr "Incluir em resultados" - -#~ msgid "" -#~ "Include software development projects that are not yet officially " -#~ "Brazilian Public Software." -#~ msgstr "" -#~ "Incluir projetos de desenvolvimento de software que não são ainda " -#~ "oficialmente Software Público Brasileiro" - -#~ msgid "Email must be different from secondary email." -#~ msgstr "Email deve ser diferente do email secundário." - -#~ msgid "E-mail or secondary e-mail already taken." -#~ msgstr "Email ou email secundário já foram escolhidos por outro usuário." - -#~ msgid "Invalid secondary email format." -#~ msgstr "Formato do email secundário inválido." - -#~ msgid "The governamental email must be the primary one." -#~ msgstr "O email governamental deve ser o email primário." - -#~ msgid "Institution is obligatory if user has a government email." -#~ msgstr "Instituição é obrigatório se usuário tem um email governamental." - -#~ msgid "Institution Catalog" -#~ msgstr "Catálogo de Instituição" - -#~ msgid "Create Institution" -#~ msgstr "Criar Instituição" - -#~ msgid "Institution Info" -#~ msgstr "Informação de Instituição" - -#~ msgid "Institution" -#~ msgstr "Instituição" - -#~ msgid "Institutions" -#~ msgstr "Instituições" - -#~ msgid "{#} institution" -#~ msgid_plural "{#} institutions" -#~ msgstr[0] "{#} instituição" -#~ msgstr[1] "{#} instituições" - -#~ msgid "This block displays the institutions in which the user is a member." -#~ msgstr "Este bloco apresenta as instituições em que o usuário é membro." - -#~ msgid "institutions|View all" -#~ msgstr "instituições|Veja todos" - -#~ msgid "invalid, only public and private institutions are allowed." -#~ msgstr "inválido, apenas instituições públicas e privadas são permitidas." - -#~ msgid "invalid format" -#~ msgstr "formato inválido" - -#~ msgid "Could not find Governmental Power or Governmental Sphere" -#~ msgstr "Não foi possível encontrar o poder ou esfera governamental" - -#~ msgid "Institution successful created!" -#~ msgstr "Instituição criada com sucesso!" - -#~ msgid "Institution could not be created!" -#~ msgstr "Instituição não pode ser criada!" - -#~ msgid "Name Should begin with a capital letter and no special characters" -#~ msgstr "" -#~ "Nome deve começar com letra maiúscula e não pode ter caracteres especiais" - -#~ msgid "Secondary e-mail" -#~ msgstr "Email secundário" - -#~ msgid "No institution found" -#~ msgstr "Nenhuma instituição encontrada" - -#~ msgid "Add new institution" -#~ msgstr "Adicionar nova instituiço" - -#~ msgid "Create new institution" -#~ msgstr "Criar nova instituição" - -#~ msgid "Should begin with a capital letter and no special characters" -#~ msgstr "Deve começar com letra maíuscula e sem caracteres especiais" - -#~ msgid "Email should have the following format: name@host.br" -#~ msgstr "Email deve ter o seguinte formato: name@host.br" - -#~ msgid "Site should have a valid format: http://name.hosts" -#~ msgstr "Site deve ter um formato válido: http://name.hosts" - -#~ msgid "If you work in a public agency use your government e-Mail" -#~ msgstr "Se você trabalha em um órgão público use seu e-Mail governamental" - -#~ msgid "New Institution" -#~ msgstr "Nova Instituição" - -#~ msgid "\"Can`t create new Institution: #{flash[:errors].length} errors\"" -#~ msgstr "" -#~ "\"Não foi possível criar a Instituição: #{flash[:errors].length} errors\"" - -#~ msgid "All fields with (*) are mandatory" -#~ msgstr "Todos os campos com (*) são obrigatórios" - -#~ msgid "Public Institution" -#~ msgstr "Insituição Pública" - -#~ msgid "Private Institution" -#~ msgstr "Instituição Privada" - -#~ msgid "Institution name already exists" -#~ msgstr "Instituição com o nome informado já existe" - -#~ msgid "Country" -#~ msgstr "País" - -#~ msgid "State" -#~ msgstr "Estado" - -#~ msgid "CNPJ" -#~ msgstr "CNPJ" - -#~ msgid "Acronym" -#~ msgstr "Sigla" - -#~ msgid "Fantasy name" -#~ msgstr "Nome fantasia" - -#~ msgid "Governmental Sphere:" -#~ msgstr "Esfera Governamental:" - -#~ msgid "Select a Governmental Sphere" -#~ msgstr "Selecione a Esfera Governamental" - -#~ msgid "Governmental Power:" -#~ msgstr "Poder Governamental:" - -#~ msgid "Select a Governmental Power" -#~ msgstr "Selecione um Poder Governamental" - -#~ msgid "Juridical Nature:" -#~ msgstr "Natureza Jurídica" - -#~ msgid "Select a Juridical Nature" -#~ msgstr "Selecione uma Natureza Jurídica" - -#~ msgid "SISP?" -#~ msgstr "SISP?" - -#~ msgid "Could not send the form data to the server" -#~ msgstr "Não foi possível enviar os dados do formulário ao servidor" - -#~ msgid "Creating institution" -#~ msgstr "Criando instituição" - -#~ msgid "Institution Information" -#~ msgstr "Informações de Instituição" - -#~ msgid "Type:" -#~ msgstr "Tipo:" - -#~ msgid "CNPJ:" -#~ msgstr "CNPJ:" - -#~ msgid "Last modification:" -#~ msgstr "Última modificação:" - -#~ msgid "Country:" -#~ msgstr "País" - -#~ msgid "State:" -#~ msgstr "Estado" - -#~ msgid "City:" -#~ msgstr "Cidade" - -#~ msgid "Fantasy Name:" -#~ msgstr "Nome Fantasia:" - -#~ msgid "Acronym:" -#~ msgstr "Sigla:" - -#~ msgid "SISP:" -#~ msgstr "SISP:" - -#~ msgid "Edit Institution" -#~ msgstr "Editar Instituíção" - -#~ msgid "Link to Repository" -#~ msgstr "Link para o Repositório" - -#~ msgid "Select the categories of your interest" -#~ msgstr "Selecione as categorias de seu interesse" - -#~ msgid "Delete profile" -#~ msgstr "Deletar perfil" - -#~ msgid "Deactivate profile" -#~ msgstr "Desativar perfil" - -#~ msgid "Activate profile" -#~ msgstr "Ativar perfil" - -#~ msgid "Complete Profile" -#~ msgstr "Completar Perfil" - -#~ msgid "Complete your profile" -#~ msgstr "Complete seu perfil" - -#~ msgid "Hide" -#~ msgstr "Esconder" - -#~ msgid "Most downloaded" -#~ msgstr "Mais baixado" - -#~ msgid "Top rated" -#~ msgstr "Mais Populares" - -#~ msgid "Recently updated" -#~ msgstr "Atualizado Recentemente" - -#~ msgid "New in portal" -#~ msgstr "Novo no portal" diff --git a/src/software_communities/po/software_communities.pot b/src/software_communities/po/software_communities.pot deleted file mode 100644 index 5885eee..0000000 --- a/src/software_communities/po/software_communities.pot +++ /dev/null @@ -1,1044 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: 1.2-143-g8dfded9\n" -"POT-Creation-Date: 2015-09-11 17:15-0000\n" -"PO-Revision-Date: 2015-09-11 17:15-0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" - -#: plugins/software_communities/test/unit/software_info_validation_test.rb:108 -msgid "Features is too long (maximum is 4000 characters)" -msgstr "" - -#: plugins/software_communities/test/unit/software_info_validation_test.rb:116 -msgid "Objectives is too long (maximum is 4000 characters)" -msgstr "" - -#: plugins/software_communities/controllers/software_communities_plugin_myprofile_controller.rb:41 -#: plugins/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb:19 -msgid "Save and Configure Community" -msgstr "" - -#: plugins/software_communities/controllers/software_communities_plugin_myprofile_controller.rb:45 -msgid "Software updated successfully" -msgstr "" - -#: plugins/software_communities/controllers/software_communities_plugin_myprofile_controller.rb:49 -msgid "Could not update software" -msgstr "" - -#: plugins/software_communities/controllers/software_communities_plugin_myprofile_controller.rb:130 -msgid "Your new software request will be evaluated by anadministrator. You will be notified." -msgstr "" - -#: plugins/software_communities/controllers/software_communities_plugin_profile_controller.rb:7 -msgid "Could not find the download file" -msgstr "" - -#: plugins/software_communities/controllers/software_communities_plugin_profile_controller.rb:8 -msgid "Invalid download params" -msgstr "" - -#: plugins/software_communities/lib/operating_system.rb:12 -msgid "too long (maximum is 20 characters)" -msgstr "" - -#: plugins/software_communities/lib/statistic_block.rb:9 -msgid "Software Statistics" -msgstr "" - -#: plugins/software_communities/lib/statistic_block.rb:13 -msgid "This block displays software statistics." -msgstr "" - -#: plugins/software_communities/lib/categories_and_tags_block.rb:8 -msgid "Categories and Tags" -msgstr "" - -#: plugins/software_communities/lib/categories_and_tags_block.rb:12 -msgid "This block displays the categories and tags of a software." -msgstr "" - -#: plugins/software_communities/lib/wiki_block.rb:8 -msgid "Wiki Link" -msgstr "" - -#: plugins/software_communities/lib/wiki_block.rb:12 -msgid "This block displays a link to the software wiki." -msgstr "" - -#: plugins/software_communities/lib/library.rb:5 -msgid "can't be blank" -msgstr "" - -#: plugins/software_communities/lib/library.rb:8 -msgid "Too long (maximum is 20 characters)" -msgstr "" - -#: plugins/software_communities/lib/search_catalog_block.rb:8 -msgid "Search Softwares catalog" -msgstr "" - -#: plugins/software_communities/lib/search_catalog_block.rb:12 -msgid "This block displays the search categories field " -msgstr "" - -#: plugins/software_communities/lib/software_database.rb:12 -msgid "Software database is too long (maximum is 20 characters)" -msgstr "" - -#: plugins/software_communities/lib/ext/category.rb:5 -msgid "Agriculture, Fisheries and Extraction" -msgstr "" - -#: plugins/software_communities/lib/ext/category.rb:6 -msgid "Science, Information and Communication" -msgstr "" - -#: plugins/software_communities/lib/ext/category.rb:7 -msgid "Economy and Finances" -msgstr "" - -#: plugins/software_communities/lib/ext/category.rb:8 -msgid "Public Administration" -msgstr "" - -#: plugins/software_communities/lib/ext/category.rb:9 -msgid "Habitation, Sanitation and Urbanism" -msgstr "" - -#: plugins/software_communities/lib/ext/category.rb:10 -msgid "Individual, Family and Society" -msgstr "" - -#: plugins/software_communities/lib/ext/category.rb:11 -msgid "Health" -msgstr "" - -#: plugins/software_communities/lib/ext/category.rb:12 -msgid "Social Welfare and Development" -msgstr "" - -#: plugins/software_communities/lib/ext/category.rb:13 -msgid "Defense and Security" -msgstr "" - -#: plugins/software_communities/lib/ext/category.rb:14 -msgid "Education" -msgstr "" - -#: plugins/software_communities/lib/ext/category.rb:15 -msgid "Government and Politics" -msgstr "" - -#: plugins/software_communities/lib/ext/category.rb:16 -msgid "Justice and Legislation" -msgstr "" - -#: plugins/software_communities/lib/ext/category.rb:17 -msgid "International Relationships" -msgstr "" - -#: plugins/software_communities/lib/ext/category.rb:18 -msgid "Transportation and Transit" -msgstr "" - -#: plugins/software_communities/lib/ext/search_controller.rb:118 -msgid "Result Search" -msgstr "" - -#: plugins/software_communities/lib/ext/search_controller.rb:142 -msgid "Selected options: " -msgstr "" - -#: plugins/software_communities/lib/download_block.rb:15 -msgid "Download Stable Version" -msgstr "" - -#: plugins/software_communities/lib/download_block.rb:19 -msgid "This block displays the stable version of a software." -msgstr "" - -#: plugins/software_communities/lib/software_tab_data_block.rb:10 -msgid "Software Tab Data" -msgstr "" - -#: plugins/software_communities/lib/software_tab_data_block.rb:14 -msgid "This block is used by colab to insert data into Noosfero" -msgstr "" - -#: plugins/software_communities/lib/software_highlights_block.rb:4 -msgid "Software Highlights Block" -msgstr "" - -#: plugins/software_communities/lib/software_highlights_block.rb:8 -msgid "This block displays the softwares icon into a highlight" -msgstr "" - -#: plugins/software_communities/lib/dynamic_table_helper.rb:17 -#: plugins/software_communities/views/box_organizer/_download_block.html.erb:3 -#: plugins/software_communities/views/_main_software_editor_extras.html.erb:3 -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:37 -#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:3 -msgid "Name" -msgstr "" - -#: plugins/software_communities/lib/dynamic_table_helper.rb:18 -msgid "Version" -msgstr "" - -#: plugins/software_communities/lib/dynamic_table_helper.rb:19 -#: plugins/software_communities/views/profile/_software_tab.html.erb:18 -msgid "License" -msgstr "" - -#: plugins/software_communities/lib/dynamic_table_helper.rb:91 -msgid "Autocomplete field, type something" -msgstr "" - -#: plugins/software_communities/lib/dynamic_table_helper.rb:116 -#: plugins/software_communities/views/box_organizer/_download_list_template.html.erb:8 -#: plugins/software_communities/views/box_organizer/_download_list.html.erb:8 -msgid "Delete" -msgstr "" - -#: plugins/software_communities/lib/create_software.rb:36 -msgid "New software" -msgstr "" - -#: plugins/software_communities/lib/create_software.rb:44 -msgid "%{requestor} wants to create software %{subject} with" -msgstr "" - -#: plugins/software_communities/lib/create_software.rb:46 -msgid " no finality." -msgstr "" - -#: plugins/software_communities/lib/create_software.rb:48 -msgid " this finality:

    %{finality}

    " -msgstr "" - -#: plugins/software_communities/lib/create_software.rb:68 -msgid "%{requestor} wants to create software %{subject}" -msgstr "" - -#: plugins/software_communities/lib/create_software.rb:73 -msgid "User \"%{user}\" just requested to create software %{software}.\n You have to approve or reject it through the \"Pending Validations\"\n section in your control panel.\n" -msgstr "" - -#: plugins/software_communities/lib/create_software.rb:80 -msgid "Your request for registering software %{software} at %{environment} was\n just sent. Environment administrator will receive it and will approve or\n reject your request according to his methods and criteria.\n\n You will be notified as soon as environment administrator has a position\n about your request." -msgstr "" - -#: plugins/software_communities/lib/create_software.rb:90 -msgid "Your request for registering software %{software} at %{environment} was\n not approved by the environment administrator. The following explanation\n was given: \n\n%{explanation}" -msgstr "" - -#: plugins/software_communities/lib/create_software.rb:99 -msgid "Your request for registering the software \"%{software}\" was approved.\n You can access %{url} and finish the registration of your software." -msgstr "" - -#: plugins/software_communities/lib/software_communities_plugin.rb:17 -msgid "Add Public Software and MPOG features." -msgstr "" - -#: plugins/software_communities/lib/software_communities_plugin.rb:90 -msgid "Rate this software" -msgstr "" - -#: plugins/software_communities/lib/software_communities_plugin.rb:136 -msgid "Software Info" -msgstr "" - -#: plugins/software_communities/lib/software_communities_plugin.rb:147 -msgid "Create a new software" -msgstr "" - -#: plugins/software_communities/lib/software_communities_plugin.rb:157 -msgid "Software" -msgstr "" - -#: plugins/software_communities/lib/repository_block.rb:8 -msgid "Repository Link" -msgstr "" - -#: plugins/software_communities/lib/repository_block.rb:12 -msgid "This block displays the repository link of a software." -msgstr "" - -#: plugins/software_communities/lib/software_info.rb:151 -msgid "Name is too long (maximum is %{count} characters)" -msgstr "" - -#: plugins/software_communities/lib/software_info.rb:219 -msgid "can't have more than 10 characteres" -msgstr "" - -#: plugins/software_communities/lib/software_info.rb:222 -msgid "can't have whitespaces" -msgstr "" - -#: plugins/software_communities/lib/software_info.rb:230 plugins/software_communities/lib/software_info.rb:236 -#: plugins/software_communities/lib/software_info.rb:242 -msgid ": at least one must be filled" -msgstr "" - -#: plugins/software_communities/lib/software_information_block.rb:8 -msgid "Basic Software Information" -msgstr "" - -#: plugins/software_communities/lib/software_information_block.rb:12 -msgid "This block displays the basic information of a software profile." -msgstr "" - -#: plugins/software_communities/lib/software_language.rb:10 -msgid "Software language is too long (maximum is 20 characters)" -msgstr "" - -#: plugins/software_communities/lib/categories_software_block.rb:8 -msgid "Categories Softwares" -msgstr "" - -#: plugins/software_communities/lib/categories_software_block.rb:12 -msgid "This block displays the categories and the amount of softwares for\n each category." -msgstr "" - -#: plugins/software_communities/lib/softwares_block.rb:8 -msgid "Softwares" -msgstr "" - -#: plugins/software_communities/lib/softwares_block.rb:13 -msgid "{#} generic software" -msgid_plural "{#} generic softwares" -msgstr[0] "" -msgstr[1] "" - -#: plugins/software_communities/lib/softwares_block.rb:15 -msgid "{#} public software" -msgid_plural "{#} public softwares" -msgstr[0] "" -msgstr[1] "" - -#: plugins/software_communities/lib/softwares_block.rb:17 -msgid "{#} software" -msgid_plural "{#} softwares" -msgstr[0] "" -msgstr[1] "" - -#: plugins/software_communities/lib/softwares_block.rb:22 -msgid "This block displays the softwares in which the user is a member." -msgstr "" - -#: plugins/software_communities/lib/softwares_block.rb:31 plugins/software_communities/lib/softwares_block.rb:37 -msgid "softwares|View all" -msgstr "" - -#: plugins/software_communities/views/profile/members.html.erb:3 plugins/software_communities/views/profile/members.html.erb:26 -msgid "Members" -msgstr "" - -#: plugins/software_communities/views/profile/members.html.erb:4 -msgid "%s" -msgstr "" - -#: plugins/software_communities/views/profile/members.html.erb:43 -msgid "Administrators" -msgstr "" - -#: plugins/software_communities/views/profile/members.html.erb:57 -msgid "Go back" -msgstr "" - -#: plugins/software_communities/views/profile/members.html.erb:60 -msgid "Invite people to join" -msgstr "" - -#: plugins/software_communities/views/profile/members.html.erb:63 -msgid "Send e-mail to members" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:3 -#: plugins/software_communities/views/_main_software_editor_extras.html.erb:1 -msgid "Software Information" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:6 -msgid "Name:" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:7 -msgid "Adherent to e_mag:" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:7 plugins/software_communities/views/profile/_software_tab.html.erb:8 -#: plugins/software_communities/views/profile/_software_tab.html.erb:9 -#: plugins/software_communities/views/profile/_software_tab.html.erb:10 -#: plugins/software_communities/views/profile/_software_tab.html.erb:11 -#: plugins/software_communities/views/profile_editor/_software_community.html.erb:49 -msgid "Yes" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:7 plugins/software_communities/views/profile/_software_tab.html.erb:8 -#: plugins/software_communities/views/profile/_software_tab.html.erb:9 -#: plugins/software_communities/views/profile/_software_tab.html.erb:10 -#: plugins/software_communities/views/profile/_software_tab.html.erb:11 -#: plugins/software_communities/views/profile_editor/_software_community.html.erb:50 -msgid "No" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:8 -msgid "Adherent to icp_brasil:" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:9 -msgid "Adherent to e_ping:" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:10 -msgid "Adherent to e_arq:" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:11 -msgid "Internacionalizable:" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:12 -msgid "Operating Platform:" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:13 -msgid "Demonstration URL:" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:14 -msgid "Short Name:" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:15 -msgid "Objectives:" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:16 -msgid "Features:" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:19 -msgid "Version:" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:20 -msgid "Link:" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:25 -msgid "Show Libraries" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:26 -msgid "Hide Libraries" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:35 -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:74 -msgid "Libraries" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:53 -msgid "Show Database" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:54 -msgid "Hide Database" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:63 -msgid "Software Databases" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:81 -msgid "Show Languages" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:82 -msgid "Hide Languages" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:91 -msgid "Software Languages" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:109 -msgid "Show Operating Systems" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:110 -msgid "Hide Operating Systems" -msgstr "" - -#: plugins/software_communities/views/profile/_software_tab.html.erb:120 -msgid "Operating System" -msgstr "" - -#: plugins/software_communities/views/profile/index.html.erb:17 -msgid "Control Panel" -msgstr "" - -#: plugins/software_communities/views/profile/_profile_members_list.html.erb:2 -msgid "Sort by:" -msgstr "" - -#: plugins/software_communities/views/profile/_profile_members_list.html.erb:5 -#: plugins/software_communities/views/search/_software_search_form.html.erb:52 -msgid "Name A-Z" -msgstr "" - -#: plugins/software_communities/views/profile/_profile_members_list.html.erb:6 -#: plugins/software_communities/views/search/_software_search_form.html.erb:53 -msgid "Name Z-A" -msgstr "" - -#: plugins/software_communities/views/box_organizer/_software_tab_data_block.html.erb:5 -msgid "Which blog should have its posts displayed: " -msgstr "" - -#: plugins/software_communities/views/box_organizer/_software_tab_data_block.html.erb:13 -msgid "This community has no blogs" -msgstr "" - -#: plugins/software_communities/views/box_organizer/_softwares_block.html.erb:2 -msgid "Limit of items" -msgstr "" - -#: plugins/software_communities/views/box_organizer/_softwares_block.html.erb:3 -msgid "Software Type:" -msgstr "" - -#: plugins/software_communities/views/box_organizer/_statistic_block.html.erb:5 -msgid "Benefited People" -msgstr "" - -#: plugins/software_communities/views/box_organizer/_statistic_block.html.erb:6 -#: plugins/software_communities/views/box_organizer/_statistic_block.html.erb:8 -msgid "Portal suggested value: " -msgstr "" - -#: plugins/software_communities/views/box_organizer/_statistic_block.html.erb:7 -msgid "Saved Resources" -msgstr "" - -#: plugins/software_communities/views/box_organizer/_download_block.html.erb:4 -msgid "Link" -msgstr "" - -#: plugins/software_communities/views/box_organizer/_download_block.html.erb:5 -msgid "Platforms" -msgstr "" - -#: plugins/software_communities/views/box_organizer/_download_block.html.erb:6 plugins/software_communities/views/blocks/download.html.erb:17 -msgid "Minimum Requirements" -msgstr "" - -#: plugins/software_communities/views/box_organizer/_download_block.html.erb:7 -msgid "Size:" -msgstr "" - -#: plugins/software_communities/views/box_organizer/_download_block.html.erb:16 -msgid "New link" -msgstr "" - -#: plugins/software_communities/views/box_organizer/_wiki_block.html.erb:3 -msgid "Wiki link" -msgstr "" - -#: plugins/software_communities/views/search/_catalog_filter.html.erb:4 -#: plugins/software_communities/views/blocks/categories_and_tags.html.erb:2 -msgid "Categories" -msgstr "" - -#: plugins/software_communities/views/search/_catalog_filter.html.erb:10 -#: plugins/software_communities/views/search/_full_community.html.erb:35 -#: plugins/software_communities/views/search/_catalog_result_list.html.erb:41 -#: plugins/software_communities/views/blocks/categories_software.html.erb:15 -msgid "\"#{category.name}\"" -msgstr "" - -#: plugins/software_communities/views/search/_catalog_filter.html.erb:16 -msgid "More options" -msgstr "" - -#: plugins/software_communities/views/search/_catalog_filter.html.erb:18 -msgid "Clean up" -msgstr "" - -#: plugins/software_communities/views/search/_catalog_filter.html.erb:19 -msgid "Close" -msgstr "" - -#: plugins/software_communities/views/search/_full_community.html.erb:27 -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:65 -msgid "Software Categories" -msgstr "" - -#: plugins/software_communities/views/search/_full_community.html.erb:46 -msgid "This software doesn't have categories" -msgstr "" - -#: plugins/software_communities/views/search/_catalog_result_list.html.erb:12 -msgid "see all (%d)" -msgstr "" - -#: plugins/software_communities/views/search/_catalog_result_list.html.erb:34 -msgid "No software found. Try more general filters" -msgstr "" - -#: plugins/software_communities/views/search/_catalog_result_list.html.erb:36 -msgid "No software found. Try more general filters or check the software category individually" -msgstr "" - -#: plugins/software_communities/views/search/_software_search_form.html.erb:3 -msgid "Search Public Software Catalog" -msgstr "" - -#: plugins/software_communities/views/search/_software_search_form.html.erb:14 -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:4 -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:7 -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:10 -msgid "Public Software" -msgstr "" - -#: plugins/software_communities/views/search/_software_search_form.html.erb:15 -msgid "Projects that have passed by the Avalia SPB process according to the requirements of IN 01/2011." -msgstr "" - -#: plugins/software_communities/views/search/_software_search_form.html.erb:18 -msgid "All" -msgstr "" - -#: plugins/software_communities/views/search/_software_search_form.html.erb:19 -msgid "Projects included in the portal as cases provided by the IN 01/2011." -msgstr "" - -#: plugins/software_communities/views/search/_software_search_form.html.erb:24 -msgid "Type words about the software you're looking for (the search begins after 3 characters)" -msgstr "" - -#: plugins/software_communities/views/search/_software_search_form.html.erb:27 -msgid "Filter" -msgstr "" - -#: plugins/software_communities/views/search/_software_search_form.html.erb:54 -msgid "Relevance" -msgstr "" - -#: plugins/software_communities/views/search/software_infos.html.erb:6 -msgid "Type words about the %s you're looking for" -msgstr "" - -#: plugins/software_communities/views/_main_software_editor_extras.html.erb:10 -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:56 -#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:14 -msgid "Finality" -msgstr "" - -#: plugins/software_communities/views/_main_software_editor_extras.html.erb:15 -msgid "Licenses" -msgstr "" - -#: plugins/software_communities/views/_main_software_editor_extras.html.erb:20 -msgid "License link" -msgstr "" - -#: plugins/software_communities/views/_main_software_editor_extras.html.erb:29 -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:89 -#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:45 -msgid "Link to Repository: " -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:4 -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:7 -msgid "Public software" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:12 -msgid "Adherent to e-PING ?" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:21 -msgid "Adherent to e-MAG ?" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:30 -msgid "Adherent to ICP-Brasil ?" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:39 -msgid "Adherent to e-ARQ ?" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:48 -msgid "Internacionalizable ?" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:59 -msgid "Operating Platform" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:64 -msgid "Features" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:69 -msgid "Demonstration url" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:82 -msgid "Operating Systems" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:90 -msgid "Programming languages" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb:97 -msgid "Databases" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_database_fields.html.erb:11 -msgid "New Database" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_license_info_fields.html.erb:5 -msgid "Autocomplete field, type some license" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_license_info_fields.html.erb:8 -msgid "Read license" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_language_fields.html.erb:11 -msgid "New language" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_operating_system_fields.html.erb:11 -msgid "New Operating System" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:5 -msgid "Creating new software" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:9 -msgid "Enter the basic information about the software.
    \n You can add the details after you create it." -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:16 -msgid "Note that the creation of communities in this environment is restricted. Your request to create this new community will be sent to %{environment} administrators and will be approved or rejected according to their methods and criteria." -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:22 -msgid "\"Can`t create new software: #{@errors.length} errors\"" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:45 -msgid "Domain" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:57 -#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:15 -msgid "What is the software for?" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:64 -#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:21 -msgid "Software Logo" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:69 -#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:26 -msgid "Image:" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:69 -#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:26 -msgid "Max size: %s (.jpg, .gif, .png)" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:76 -#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:33 -msgid "License Version: " -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:97 -msgid "Create" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb:98 -msgid "Cancel" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb:8 -msgid "Short Name" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb:1 -msgid "Edit Software" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb:9 -msgid "Main Information" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb:12 -msgid "Specifications" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb:18 -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:68 -msgid "Save" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb:20 -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:71 -msgid "Back to control panel" -msgstr "" - -#: plugins/software_communities/views/software_communities_plugin_myprofile/_library_fields.html.erb:11 -msgid "New Library" -msgstr "" - -#: plugins/software_communities/views/blocks/categories_software.html.erb:4 -msgid "See more Software" -msgstr "" - -#: plugins/software_communities/views/blocks/categories_software.html.erb:8 -msgid "Categories:" -msgstr "" - -#: plugins/software_communities/views/blocks/categories_software.html.erb:23 plugins/software_communities/views/blocks/search_catalog.html.erb:9 -msgid "Access the complete catalog" -msgstr "" - -#: plugins/software_communities/views/blocks/wiki.html.erb:2 -#: plugins/software_communities/views/blocks/software_tab_data.html.erb:2 plugins/software_communities/views/blocks/download.html.erb:2 -#: plugins/software_communities/views/blocks/software_information.html.erb:4 plugins/software_communities/views/blocks/repository.html.erb:2 -msgid "This community needs a software to use this block" -msgstr "" - -#: plugins/software_communities/views/blocks/wiki.html.erb:4 -msgid "Wiki" -msgstr "" - -#: plugins/software_communities/views/blocks/main_area_softwares.html.erb:23 -msgid "See More" -msgstr "" - -#: plugins/software_communities/views/blocks/search_catalog.html.erb:2 -msgid "Catalog of Public Software" -msgstr "" - -#: plugins/software_communities/views/blocks/search_catalog.html.erb:5 -msgid "Search" -msgstr "" - -#: plugins/software_communities/views/blocks/categories_and_tags.html.erb:12 -msgid "Tags" -msgstr "" - -#: plugins/software_communities/views/blocks/software_tab_data.html.erb:6 -msgid "Discussions" -msgstr "" - -#: plugins/software_communities/views/blocks/software_tab_data.html.erb:7 -msgid "Blog" -msgstr "" - -#: plugins/software_communities/views/blocks/software_tab_data.html.erb:8 -msgid "Repository Feed" -msgstr "" - -#: plugins/software_communities/views/blocks/software_statistics.html.erb:5 -msgid " benefited people*" -msgstr "" - -#: plugins/software_communities/views/blocks/software_statistics.html.erb:6 -msgid " saved resources*" -msgstr "" - -#: plugins/software_communities/views/blocks/software_statistics.html.erb:10 -msgid "Data estimated by the software administrator." -msgstr "" - -#: plugins/software_communities/views/blocks/download.html.erb:4 -msgid "\"Download #{block.owner.software_info.community.name}\"" -msgstr "" - -#: plugins/software_communities/views/blocks/download.html.erb:9 -msgid "Download the software" -msgstr "" - -#: plugins/software_communities/views/blocks/download.html.erb:15 -msgid "\"#{download[:name]}\"" -msgstr "" - -#: plugins/software_communities/views/blocks/download.html.erb:16 -msgid "\"Platform:#{download[:software_description]}\"" -msgstr "" - -#: plugins/software_communities/views/blocks/download.html.erb:23 -msgid "\"License: #{block.owner.software_info.license_info.version}\"" -msgstr "" - -#: plugins/software_communities/views/blocks/software_highlights.html.erb:13 -msgid "See all" -msgstr "" - -#: plugins/software_communities/views/blocks/_software_tab_blog.html.erb:5 -msgid "This community has no posts in its blog" -msgstr "" - -#: plugins/software_communities/views/blocks/_software_tab_blog.html.erb:13 -msgid "Read more" -msgstr "" - -#: plugins/software_communities/views/blocks/software_information.html.erb:16 -msgid "Control panel" -msgstr "" - -#: plugins/software_communities/views/blocks/software_information.html.erb:24 -msgid "\"#{block.owner.software_info.acronym} - \"" -msgstr "" - -#: plugins/software_communities/views/blocks/software_information.html.erb:25 -msgid "\"#{block.owner.name}\"" -msgstr "" - -#: plugins/software_communities/views/blocks/repository.html.erb:4 -msgid "Repository" -msgstr "" - -#: plugins/software_communities/views/profile_editor/_software_community.html.erb:1 -msgid "General information" -msgstr "" - -#: plugins/software_communities/views/profile_editor/_software_community.html.erb:40 -msgid "Address" -msgstr "" - -#: plugins/software_communities/views/profile_editor/_software_community.html.erb:46 -msgid "WARNING!" -msgstr "" - -#: plugins/software_communities/views/profile_editor/_software_community.html.erb:47 -msgid "You are about to change the address, and this will break external links to the homepage or to content inside it. Do you really want to change?" -msgstr "" - -#: plugins/software_communities/views/profile_editor/_software_community.html.erb:63 -msgid "Enable \"contact us\"" -msgstr "" - -#: plugins/software_communities/views/profile_editor/_software_community.html.erb:68 -msgid "Products/Services catalog" -msgstr "" - -#: plugins/software_communities/views/profile_editor/_software_community.html.erb:69 -msgid "Number of products/services displayed per page on catalog" -msgstr "" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:4 -msgid "Configure Software Community" -msgstr "" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:8 -msgid "Set the basic settings of the software associated community" -msgstr "" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:18 -msgid "This profile is a template" -msgstr "" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:24 -msgid "Privacy options" -msgstr "" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:28 -msgid "Public — show my contents to all internet users" -msgstr "" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:31 -msgid "Private — show my contents only to friends" -msgstr "" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:35 -msgid "Public — show content of this group to all internet users" -msgstr "" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:38 -msgid "Private — show content of this group only to members" -msgstr "" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:43 -msgid "Page to redirect after login" -msgstr "" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:47 -msgid "Translations" -msgstr "" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:49 -msgid "Automaticaly redirect the visitor to the article translated to his/her language" -msgstr "" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:53 -msgid "Suggestions" -msgstr "" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:55 -msgid "Send me relationship suggestions by email" -msgstr "" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:77 -msgid "Delete software and community" -msgstr "" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:80 -msgid "Deactivate software and community" -msgstr "" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:80 -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:82 -msgid "Are you sure you want to deactivate this profile?" -msgstr "" - -#: plugins/software_communities/views/profile_editor/edit_software_community.html.erb:82 -msgid "Activate software and community" -msgstr "" - -#: plugins/software_communities/views/profile_editor/_first_edit_software_community_extras.html.erb:3 -msgid "Step 1 - Software Creation" -msgstr "" - -#: plugins/software_communities/views/profile_editor/_first_edit_software_community_extras.html.erb:7 -msgid "Step 2 - Community Settings" -msgstr "" - -#: plugins/software_communities/views/comments_extra_fields.html.erb:3 -msgid "Additional informations" -msgstr "" - -#: plugins/software_communities/views/comments_extra_fields.html.erb:11 -msgid "Number of Beneficiaries" -msgstr "" - -#: plugins/software_communities/views/comments_extra_fields.html.erb:17 -msgid "Saved resources" -msgstr "" diff --git a/src/software_communities/public/app.js b/src/software_communities/public/app.js deleted file mode 100644 index 7e98375..0000000 --- a/src/software_communities/public/app.js +++ /dev/null @@ -1,11 +0,0 @@ -(function() { - 'use strict'; - - var $ = modulejs.require('jquery'); - var Initializer = modulejs.require('Initializer'); - - - $(document).ready(function() { - Initializer.init(); - }); -})(); diff --git a/src/software_communities/public/blocks/software-download.js b/src/software_communities/public/blocks/software-download.js deleted file mode 100644 index 94bda3f..0000000 --- a/src/software_communities/public/blocks/software-download.js +++ /dev/null @@ -1,51 +0,0 @@ -modulejs.define('SoftwareDownload', ['jquery', 'NoosferoRoot'], function($, NoosferoRoot) { - 'use strict'; - - var AJAX_URL = { - get_download_template: - NoosferoRoot.urlWithSubDirectory("/plugin/software_communities/get_block_template") - }; - - var $download_html_template; - - function getDownloadListTemplate() { - var block_template = sessionStorage.getItem('download_list_block_template'); - - if(block_template && block_template.length > 0) { - $download_html_template = block_template; - } else { - $.get(AJAX_URL.get_download_template, function(response) { - $download_html_template = response; - sessionStorage.setItem('download_list_block_template', response); - }); - } - } - - - function SoftwareDownload() { - getDownloadListTemplate(); - } - - - SoftwareDownload.prototype.addNewDonwload = function() { - var new_download = $($download_html_template); - $("#droppable-list-downloads").append(new_download); - } - - - SoftwareDownload.prototype.deleteDownload = function(element) { - var delete_download = $(element).parent().parent().parent().remove(); - } - - - return { - isCurrentPage: function() { - return $('.download-block').length !== 0; - }, - - - init: function() { - window.softwareDownload = new SoftwareDownload(); - } - } -}); diff --git a/src/software_communities/public/initializer.js b/src/software_communities/public/initializer.js deleted file mode 100644 index b0d3be6..0000000 --- a/src/software_communities/public/initializer.js +++ /dev/null @@ -1,35 +0,0 @@ -(function() { - 'use strict'; - - var dependencies = [ - 'ControlPanel', - 'EditSoftware', - 'NewSoftware', - 'SearchSoftwareCatalog', - 'SoftwareDownload', - 'ProfileTabsSoftware', - 'NewCommunity', - 'CommentsSoftwareExtraFields' - ]; - - - modulejs.define('Initializer', dependencies, function() { - var __dependencies = arguments; - - - function call_dependency(dependency) { - if( dependency.isCurrentPage() ) { - dependency.init(); - } - } - - - return { - init: function() { - for(var i=0, len = __dependencies.length; i < len; i++) { - call_dependency(__dependencies[i]); - } - } - }; - }); -})(); diff --git a/src/software_communities/public/lib/auto-complete.js b/src/software_communities/public/lib/auto-complete.js deleted file mode 100644 index f96c04b..0000000 --- a/src/software_communities/public/lib/auto-complete.js +++ /dev/null @@ -1,64 +0,0 @@ -modulejs.define('AutoComplete', ['jquery'], function($) { - 'use strict'; - - - function get_hidden_description_field(autocomplete_field, klass) { - var field = $(autocomplete_field); - field = field.parent().parent().find(klass); - return field; - } - - - function verify_autocomplete(field, klass) { - var field = $(field); - var selected = get_hidden_description_field(field, klass); - var message_error = $(field).parent().find(".autocomplete_validation_message"); - - if( field.length === 0 || selected.val().length === 0 ) { - message_error.removeClass("hide-field"); - selected.val(""); - - message_error.show(); - } else { - field.val(selected.attr("data-label")); - message_error.hide(); - } - } - - - function enable_autocomplete(field_name, field_value_class, autocomplete_class, ajax_url, select_callback) { - $(autocomplete_class).autocomplete({ - source : function(request, response){ - $.ajax({ - type: "GET", - url: ajax_url, - data: {query: request.term, field: field_name}, - success: function(result){ - response(result); - } - }); - }, - - minLength: 0, - - select : function (event, selected) { - var description = get_hidden_description_field(this, field_value_class); - description.val(selected.item.id); - description.attr("data-label", selected.item.label); - - if( select_callback !== undefined ) { - select_callback(selected); - } - } - }).blur(function(){ - verify_autocomplete(this, field_value_class); - }).click(function(){ - $(this).autocomplete("search", ""); - }); - } - - - return { - enable: enable_autocomplete - } -}); \ No newline at end of file diff --git a/src/software_communities/public/lib/noosfero-root.js b/src/software_communities/public/lib/noosfero-root.js deleted file mode 100644 index cd3c8bf..0000000 --- a/src/software_communities/public/lib/noosfero-root.js +++ /dev/null @@ -1,13 +0,0 @@ -modulejs.define('NoosferoRoot', function() { - 'use strict'; - - - function url_with_subdirectory(url) { - return noosfero_root() + url; - } - - - return { - urlWithSubDirectory: url_with_subdirectory - } -}); diff --git a/src/software_communities/public/lib/select-element.js b/src/software_communities/public/lib/select-element.js deleted file mode 100644 index 26880ae..0000000 --- a/src/software_communities/public/lib/select-element.js +++ /dev/null @@ -1,35 +0,0 @@ -modulejs.define('SelectElement', function() { - 'use strict'; - - - function SelectElement(name, id) { - this.select = document.createElement("select"); - } - - - SelectElement.prototype.setAttr = function(attr, value) { - return this.select.setAttribute(attr, value); - }; - - - SelectElement.prototype.addOption = function(option) { - return this.select.add(option); - }; - - - SelectElement.prototype.getSelect = function() { - return this.select; - }; - - - SelectElement.generateOption = function(value, text) { - var option; - option = document.createElement("option"); - option.setAttribute("value", value); - option.text = text; - return option; - }; - - - return SelectElement; -}); diff --git a/src/software_communities/public/lib/select-field-choices.js b/src/software_communities/public/lib/select-field-choices.js deleted file mode 100644 index 095d4e1..0000000 --- a/src/software_communities/public/lib/select-field-choices.js +++ /dev/null @@ -1,81 +0,0 @@ -modulejs.define('SelectFieldChoices', ['jquery', 'SelectElement'], function($, SelectElement) { - 'use strict'; - - - function SelectFieldChoices(state_id, city_id, state_url) { - this.state_id = state_id; - this.input_html = $(state_id).parent().html(); - this.old_value = $(state_id).val(); - this.city_parent_div = $(city_id).parent().parent().parent(); - this.state_url = state_url; - } - - - SelectFieldChoices.prototype.getCurrentStateElement = function() { - return $(this.state_id); - }; - - - SelectFieldChoices.prototype.replaceWith = function(html) { - var parent_div = this.getCurrentStateElement().parent(); - parent_div.html(html); - }; - - - SelectFieldChoices.prototype.generateSelect = function(state_list) { - var select_element, option; - - select_element = new SelectElement(); - select_element.setAttr("name", "profile_data[state]"); - select_element.setAttr("id", "state_field"); - select_element.setAttr("class", "type-select valid"); - - state_list.forEach(function(state) { - option = SelectElement.generateOption(state, state); - select_element.addOption(option); - }); - - return select_element.getSelect(); - }; - - - SelectFieldChoices.prototype.replaceStateWithSelectElement = function() { - var klass = this; - - $.get(this.state_url, function(response) { - var select_html; - - if (response.length > 0) { - select_html = klass.generateSelect(response); - klass.replaceWith(select_html); - - if (klass.old_value.length !== 0 && response.include(klass.old_value)) { - klass.getCurrentStateElement().val(klass.old_value); - } - } - }); - }; - - - SelectFieldChoices.prototype.replaceStateWithInputElement = function() { - this.replaceWith(this.input_html); - }; - - - SelectFieldChoices.prototype.hideCity = function() { - this.city_parent_div.addClass("mpog_hidden_field"); - }; - - - SelectFieldChoices.prototype.showCity = function() { - this.city_parent_div.removeClass("mpog_hidden_field"); - }; - - - SelectFieldChoices.prototype.actualFieldIsInput = function() { - return this.getCurrentStateElement().attr("type") === "text"; - }; - - - return SelectFieldChoices; -}); diff --git a/src/software_communities/public/lib/software-catalog-component.js b/src/software_communities/public/lib/software-catalog-component.js deleted file mode 100644 index c16e343..0000000 --- a/src/software_communities/public/lib/software-catalog-component.js +++ /dev/null @@ -1,38 +0,0 @@ -modulejs.define('SoftwareCatalogComponent', ['jquery'], function($) { - 'use strict'; - - var dispatch_ajax_function; - - function clearCatalogCheckbox() { - $("#group-categories input:checked").each(function() { - $(this).prop('checked', false); - }); - - dispatch_ajax_function(true); - } - - - function selectCheckboxCategory(dispatch_ajax) { - dispatch_ajax_function(true); - } - - - function selectProjectSoftwareCheckbox() { - dispatch_ajax_function(true); - } - - - function set_events() { - $("#cleanup-filter-catalg").click(clearCatalogCheckbox); - $(".categories-catalog").click(selectCheckboxCategory); - $(".project-software").click(selectProjectSoftwareCheckbox); - } - - return { - init: function(dispatch_ajax) { - dispatch_ajax_function = dispatch_ajax; - set_events(); - }, - } -}); - diff --git a/src/software_communities/public/static/databases.txt b/src/software_communities/public/static/databases.txt deleted file mode 100644 index 69efefa..0000000 --- a/src/software_communities/public/static/databases.txt +++ /dev/null @@ -1,101 +0,0 @@ -Accumulo -Adabas -Aerospike -AllegroGraph -Altibase -Berkeley DB -Caché -Cassandra -CloudSearch -Cloudant -Coherence -CouchDB -Couchbase -D3 -DB2 -DataEase -Datameer -Db4o -Derby -Drizzle -DynamoDB -Ehcache -Elasticsearch -Endeca -EnterpriseDB -FileMaker -Firebird -GemFire -Google BigQuery -Google Search Appliance -Greenplum -H2 -HBase -Hazelcast -Hive -HyperSQL -IDMS -IMS -Infinispan -Infobright -Informix -Ingres -Interbase -Jackrabbit -Jena -LevelDB -MariaDB -MarkLogic -MaxDB -MemSQL -Memcached -Microsoft Access -Microsoft Azure SQL Database -Microsoft SQL Server -Mnesia -MongoDB -MySQL -Neo4j -Netezza -NuoDB -ObjectStore -OpenEdge -Oracle -Oracle NoSQL -OrientDB -ParAccel -Percona Server -PostgreSQL -RavenDB -Red Brick -Redis -Redshift -RethinkDB -Riak -SAP HANA -SQL Anywhere -SQLite -Sedna -Sesame -SimpleDB -Solr -Sparksee -Sphinx -Splunk -Sybase ADS -Sybase ASE -Sybase IQ -Teradata -Teradata Aster -TimesTen -Titan -UniData -UniVerse -Versant Object Database -Vertica -Virtuoso -VoltDB -dBASE -jBASE -mSQL -Other \ No newline at end of file diff --git a/src/software_communities/public/static/languages.txt b/src/software_communities/public/static/languages.txt deleted file mode 100644 index a6ec626..0000000 --- a/src/software_communities/public/static/languages.txt +++ /dev/null @@ -1,101 +0,0 @@ -ASP -ActionScript -Ada -Apex -AppleScript -Arduino -Assembly -AutoHotkey -AutoIt -Awk -BlitzBasic -C -C# -C++ -CSS -Clojure -CoffeeScript -ColdFusion -Common Lisp -Coq -Cuda -D -DCPU-16 ASM -DOT -Dart -Delphi -Eiffel -Elixir -Elm -Emacs Lisp -Erlang -F# -FORTRAN -Go -Gosu -Groovy -HaXe -Haskell -Haxe -IDL -Io -Java -JavaScript -Julia -Kotlin -Lasso -LiveScript -Logos -Lua -M -Matlab -Max -Nemerle -Nimrod -OCaml -Objective-C -Objective-C++ -Objective-J -OpenEdge ABL -PHP -Parrot -Pascal -Perl -PowerShell -Processing -Prolog -Puppet -Pure Data -PureScript -Python -R -Racket -Ruby -Rust -SQL -Scala -Scheme -Scilab -Shell -Slash -Smalltalk -Standard ML -SuperCollider -Swift -Tcl -TeX -TypeScript -UnrealScript -VHDL -Vala -Verilog -VimL -Visual Basic -XC -XML -XQuery -XSLT -Xtend -nesC -xBase -Other \ No newline at end of file diff --git a/src/software_communities/public/static/licences.txt b/src/software_communities/public/static/licences.txt deleted file mode 100644 index 14e83c2..0000000 --- a/src/software_communities/public/static/licences.txt +++ /dev/null @@ -1,212 +0,0 @@ -Academic Free License 3.0 (AFL-3.0) -http://www.openfoundry.org/en/licenses/753-academic-free-license-version-30-afl - -Affero GNU Public License (AGPL-3.0) -http://www.gnu.org/licenses/agpl-3.0.html - -Adaptive Public License (APL-1.0) -http://opensource.org/licenses/APL-1.0 - -Apache License 2.0 (Apache-2.0) -http://www.apache.org/licenses/LICENSE-2.0 - -Apple Public Source License (APSL-2.0) -http://www.opensource.apple.com/license/apsl/ - -Artistic license 2.0 (Artistic-2.0) -http://opensource.org/licenses/Artistic-2.0 - -Attribution Assurance Licenses (AAL) -http://opensource.org/licenses/AAL - -BSD 3-Clause "New" or "Revised" License (BSD-3-Clause) -http://opensource.org/licenses/BSD-3-Clause - -BSD 2-Clause "Simplified" or "FreeBSD" License (BSD-2-Clause) -http://opensource.org/licenses/BSD-2-Clause - -Boost Software License (BSL-1.0) -http://www.boost.org/users/license.html - -Computer Associates Trusted Open Source License 1.1 (CATOSL-1.1) -http://opensource.org/licenses/CATOSL-1.1 - -Common Development and Distribution License 1.0 (CDDL-1.0) -http://opensource.org/licenses/CDDL-1.0 - -Common Public Attribution License 1.0 (CPAL-1.0) -http://opensource.org/licenses/CPAL-1.0 - -CUA Office Public License Version 1.0 (CUA-OPL-1.0) -http://opensource.org/licenses/CUA-OPL-1.0 - -EU DataGrid Software License (EUDatagrid) -http://opensource.org/licenses/EUDatagrid - -Eclipse Public License 1.0 (EPL-1.0) -https://www.eclipse.org/legal/epl-v10.html - -Educational Community License, Version 2.0 (ECL-2.0) -http://opensource.org/licenses/ECL-2.0 - -Eiffel Forum License V2.0 (EFL-2.0) -http://opensource.org/licenses/EFL-2.0 - -Entessa Public License (Entessa) -http://opensource.org/licenses/entessa.php - -European Union Public License, Version 1.1 (EUPL-1.1) -http://ec.europa.eu/idabc/eupl.html - -Fair License (FAIR) -http://opensource.org/licenses/Fair - -Frameworx License (Frameworx-1.0) -http://opensource.org/licenses/Frameworx-1.0 - -GNU Affero General Public License v3 (AGPL-3.0) -http://www.gnu.org/licenses/agpl-3.0.html - -GNU General Public License version 2.0 (GPL-2.0) -http://www.gnu.org/licenses/gpl-2.0.html - -GNU General Public License version 3.0 (GPL-3.0) -http://www.gnu.org/copyleft/gpl.html - -GNU Library or "Lesser" General Public License version 2.1 (LGPL-2.1) -https://www.gnu.org/licenses/lgpl-2.1.html - -GNU Library or "Lesser" General Public License version 3.0 (LGPL-3.0) -https://www.gnu.org/licenses/lgpl.html - -Historical Permission Notice and Disclaimer (HPND) -http://opensource.org/licenses/HPND - -IBM Public License 1.0 (IPL-1.0) -http://opensource.org/licenses/IPL-1.0 - -IPA Font License (IPA) -http://opensource.org/licenses/IPA - -ISC License (ISC) -#No-link-found - -LaTeX Project Public License 1.3c (LPPL-1.3c) -http://latex-project.org/lppl/lppl-1-3c.html - -Lucent Public License Version 1.02 (LPL-1.02) -http://opensource.org/licenses/LPL-1.02 - -MirOS Licence (MirOS) -http://opensource.org/licenses/MirOS - -Microsoft Public License (Ms-PL) -http://opensource.org/licenses/MS-PL - -Microsoft Reciprocal License (Ms-RL) -http://opensource.org/licenses/MS-RL - -MIT license (MIT) -http://opensource.org/licenses/MIT - -Motosoto License (Motosoto) -http://opensource.org/licenses/Motosoto - -Mozilla Public License 2.0 (MPL-2.0) -https://www.mozilla.org/MPL/2.0/ - -Multics License (Multics) -http://opensource.org/licenses/Multics - -NASA Open Source Agreement 1.3 (NASA 1.3) -http://worldwind.arc.nasa.gov/worldwind-nosa-1.3.html - -NTP License (NTP) -http://opensource.org/licenses/NTP - -Naumen Public License (Naumen) -http://opensource.org/licenses/Naumen - -Nethack General Public License (NGPL) -http://www.nethack.org/common/license.html - -Nokia Open Source License (Nokia) -http://opensource.org/licenses/nokia.php - -Non-Profit Open Software License 3.0 (NPOSL-3.0) -http://opensource.org/licenses/NPOSL-3.0 - -OCLC Research Public License 2.0 (OCLC-2.0) -http://opensource.org/licenses/OCLC-2.0 - -Open Font License 1.1 (OFL 1.1) -http://opensource.org/licenses/OFL-1.1 - -Open Group Test Suite License (OGTSL) -http://opensource.org/licenses/OGTSL - -Open Software License 3.0 (OSL-3.0) -http://opensource.org/licenses/OSL-3.0 - -PHP License v3.0 (PHP-3.0) -http://php.net/license/3_0.txt - -PHP License v3.01 (PHP 4, PHP 5) -http://php.net/license/3_01.txt - -The PostgreSQL License (PostgreSQL) -http://www.postgresql.org/about/licence/ - -Python License (Python-2.0) -http://opensource.org/licenses/Python-2.0 - -CNRI Python license (CNRI-Python) -http://www.openfoundry.org/en/licenses/35-python-license-python - -Q Public License (QPL-1.0) -http://opensource.org/licenses/QPL-1.0 - -RealNetworks Public Source License V1.0 (RPSL-1.0) -http://opensource.org/licenses/RPSL-1.0 - -Reciprocal Public License 1.5 (RPL-1.5) -http://opensource.org/licenses/RPL-1.5 - -Ricoh Source Code Public License (RSCPL) -http://opensource.org/licenses/RSCPL - -Simple Public License 2.0 (SimPL-2.0) -http://opensource.org/licenses/Simple-2.0 - -Sleepycat License (Sleepycat) -http://opensource.org/licenses/Sleepycat - -Sun Public License 1.0 (SPL-1.0) -http://opensource.org/licenses/SPL-1.0 - -Sybase Open Watcom Public License 1.0 (Watcom-1.0) -http://www.openwatcom.org/index.php/Open_Watcom_Public_License - -University of Illinois/NCSA Open Source License (NCSA) -http://otm.illinois.edu/uiuc_openSource - -Vovida Software License v. 1.0 (VSL-1.0) -http://opensource.org/licenses/VSL-1.0 - -W3C License (W3C) -http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 - -wxWindows Library License (WXwindows) -https://www.wxwidgets.org/about/licence/ - -X.Net License (Xnet) -http://opensource.org/licenses/xnet.php - -Zope Public License 2.0 (ZPL-2.0) -http://opensource.org/licenses/ZPL-2.0 - -zlib/libpng license (Zlib) -http://www.openfoundry.org/en/licenses/36-zliblibpng-license-zliblibpng - -Another -# \ No newline at end of file diff --git a/src/software_communities/public/static/operating_systems.txt b/src/software_communities/public/static/operating_systems.txt deleted file mode 100644 index 445ec6e..0000000 --- a/src/software_communities/public/static/operating_systems.txt +++ /dev/null @@ -1,9 +0,0 @@ -Debian -Ubuntu -Windows -CentOS -RedHat -Mint -MacOS -Fedora -Arch \ No newline at end of file diff --git a/src/software_communities/public/style.css b/src/software_communities/public/style.css deleted file mode 100644 index 5d4c536..0000000 --- a/src/software_communities/public/style.css +++ /dev/null @@ -1,112 +0,0 @@ -.mpog_hidden_field { - display: none; -} - -.dynamic-table { - border: solid 1px #000; - margin-top: 5px; - margin-bottom: 15px; -} -.dynamic-table td, .dynamic-table tr { - border: none; -} -.dynamic-table input { - width: 220px; -} - -#institution_dialog { - display: none; -} - -.errorExplanation { - color: red; - margin-left: 10px; -} - -.hide-field { - display: none !important; -} - -.show-field { - display: block !important; -} - -.formfieldline { - margin-top: 10px; -} -.formfieldline input[type="text"] { - width: 180px; -} - -#profile-data .invalid { - border-color: rgb(127, 0, 0); - box-shadow: 0px 0px 7px red; -} - -#profile-data .validated { - box-shadow: 0px 0px 7px green; - border-color: rgb(0, 80, 0); -} - -#software-name-field { - padding-bottom: 10px; -} - -#software-hostname { - padding: 0px 7px; - font-size: 18px; -} - -.mandatory::after { - color: red; - content: ' (*)'; -} - -.autocomplete_validation_message { - color: red; -} - -#content .softwares-block ul { - min-width: 196px; - width: 192px; - margin: 0px 0px 0px -3px; - padding: 0px; -} - -#content .box-1 .softwares-block ul { - width: auto; - display: block; -} - -#content .softwares-block .block-footer-content a { - background: url(../../../designs/themes/base/imgs/arrow-right-p.png) 100% 50% no-repeat; -} - -/*FIX-ME: necessary while there is -* not a defined theme style for the -* forms */ -.improve_input_size { - width: 315px !important; -} - -.software-block { - position: relative; - float: left; - overflow: hidden; -} - -.software-block-content, .software-block-finality { - width: 100%; - position: absolute; -} - -/*===== Communities rate hotspot extra fields =====*/ - -.comments-software-extra-fields div { - display: none; -} - -#content .star-rate-form .star-comment-container .comments-display-fields { - cursor: pointer; -} - diff --git a/src/software_communities/public/vendor/jquery.js b/src/software_communities/public/vendor/jquery.js deleted file mode 100644 index a3f4ebf..0000000 --- a/src/software_communities/public/vendor/jquery.js +++ /dev/null @@ -1,3 +0,0 @@ -modulejs.define('jquery', function() { - return jQuery; -}); diff --git a/src/software_communities/public/vendor/jquery.maskedinput.min.js b/src/software_communities/public/vendor/jquery.maskedinput.min.js deleted file mode 100644 index 0d9ce6e..0000000 --- a/src/software_communities/public/vendor/jquery.maskedinput.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - Masked Input plugin for jQuery - Copyright (c) 2007-2013 Josh Bush (digitalbush.com) - Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license) - Version: 1.3.1 -*/ -(function(e){function t(){var e=document.createElement("input"),t="onpaste";return e.setAttribute(t,""),"function"==typeof e[t]?"paste":"input"}var n,a=t()+".mask",r=navigator.userAgent,i=/iphone/i.test(r),o=/android/i.test(r);e.mask={definitions:{9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},dataName:"rawMaskFn",placeholder:"_"},e.fn.extend({caret:function(e,t){var n;if(0!==this.length&&!this.is(":hidden"))return"number"==typeof e?(t="number"==typeof t?t:e,this.each(function(){this.setSelectionRange?this.setSelectionRange(e,t):this.createTextRange&&(n=this.createTextRange(),n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",e),n.select())})):(this[0].setSelectionRange?(e=this[0].selectionStart,t=this[0].selectionEnd):document.selection&&document.selection.createRange&&(n=document.selection.createRange(),e=0-n.duplicate().moveStart("character",-1e5),t=e+n.text.length),{begin:e,end:t})},unmask:function(){return this.trigger("unmask")},mask:function(t,r){var c,l,s,u,f,h;return!t&&this.length>0?(c=e(this[0]),c.data(e.mask.dataName)()):(r=e.extend({placeholder:e.mask.placeholder,completed:null},r),l=e.mask.definitions,s=[],u=h=t.length,f=null,e.each(t.split(""),function(e,t){"?"==t?(h--,u=e):l[t]?(s.push(RegExp(l[t])),null===f&&(f=s.length-1)):s.push(null)}),this.trigger("unmask").each(function(){function c(e){for(;h>++e&&!s[e];);return e}function d(e){for(;--e>=0&&!s[e];);return e}function m(e,t){var n,a;if(!(0>e)){for(n=e,a=c(t);h>n;n++)if(s[n]){if(!(h>a&&s[n].test(R[a])))break;R[n]=R[a],R[a]=r.placeholder,a=c(a)}b(),x.caret(Math.max(f,e))}}function p(e){var t,n,a,i;for(t=e,n=r.placeholder;h>t;t++)if(s[t]){if(a=c(t),i=R[t],R[t]=n,!(h>a&&s[a].test(i)))break;n=i}}function g(e){var t,n,a,r=e.which;8===r||46===r||i&&127===r?(t=x.caret(),n=t.begin,a=t.end,0===a-n&&(n=46!==r?d(n):a=c(n-1),a=46===r?c(a):a),k(n,a),m(n,a-1),e.preventDefault()):27==r&&(x.val(S),x.caret(0,y()),e.preventDefault())}function v(t){var n,a,i,l=t.which,u=x.caret();t.ctrlKey||t.altKey||t.metaKey||32>l||l&&(0!==u.end-u.begin&&(k(u.begin,u.end),m(u.begin,u.end-1)),n=c(u.begin-1),h>n&&(a=String.fromCharCode(l),s[n].test(a)&&(p(n),R[n]=a,b(),i=c(n),o?setTimeout(e.proxy(e.fn.caret,x,i),0):x.caret(i),r.completed&&i>=h&&r.completed.call(x))),t.preventDefault())}function k(e,t){var n;for(n=e;t>n&&h>n;n++)s[n]&&(R[n]=r.placeholder)}function b(){x.val(R.join(""))}function y(e){var t,n,a=x.val(),i=-1;for(t=0,pos=0;h>t;t++)if(s[t]){for(R[t]=r.placeholder;pos++a.length)break}else R[t]===a.charAt(pos)&&t!==u&&(pos++,i=t);return e?b():u>i+1?(x.val(""),k(0,h)):(b(),x.val(x.val().substring(0,i+1))),u?t:f}var x=e(this),R=e.map(t.split(""),function(e){return"?"!=e?l[e]?r.placeholder:e:void 0}),S=x.val();x.data(e.mask.dataName,function(){return e.map(R,function(e,t){return s[t]&&e!=r.placeholder?e:null}).join("")}),x.attr("readonly")||x.one("unmask",function(){x.unbind(".mask").removeData(e.mask.dataName)}).bind("focus.mask",function(){clearTimeout(n);var e;S=x.val(),e=y(),n=setTimeout(function(){b(),e==t.length?x.caret(0,e):x.caret(e)},10)}).bind("blur.mask",function(){y(),x.val()!=S&&x.change()}).bind("keydown.mask",g).bind("keypress.mask",v).bind(a,function(){setTimeout(function(){var e=y(!0);x.caret(e),r.completed&&e==x.val().length&&r.completed.call(x)},0)}),y()}))}})})(jQuery); \ No newline at end of file diff --git a/src/software_communities/public/vendor/modulejs-1.5.0.min.js b/src/software_communities/public/vendor/modulejs-1.5.0.min.js deleted file mode 100644 index 9905b63..0000000 --- a/src/software_communities/public/vendor/modulejs-1.5.0.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* modulejs 1.5.0 - http://larsjung.de/modulejs/ */ -!function(n){this.modulejs=n()}(function(){"use strict";function n(n){return function(r){return l.toString.call(r)==="[object "+n+"]"}}function r(n){return n===new Object(n)}function t(n,r){return l.hasOwnProperty.call(n,r)}function e(n,r,e){if(p&&n.forEach===p)n.forEach(r,e);else if(n.length===+n.length)for(var i=0,o=n.length;o>i;i+=1)r.call(e,n[i],i,n);else for(var u in n)t(n,u)&&r.call(e,n[u],u,n)}function i(n,r){for(var t=0,e=n.length;e>t;t+=1)if(n[t]===r)return!0;return!1}function o(n){var r={},i=[];return e(n,function(n){t(r,n)||(i.push(n),r[n]=1)}),i}function u(n,r,t){if(n){var e=new Error("[modulejs-"+r+"] "+t);throw e.code=r,e}}function c(n,r,a){if(u(!h(n),31,'id must be a string "'+n+'"'),!r&&t(b,n))return b[n];var f=y[n];u(!f,32,'id not defined "'+n+'"'),a=(a||[]).slice(0),a.push(n);var s=[];if(e(f.deps,function(n){u(i(a,n),33,"circular dependencies: "+a+" & "+n),r?(s=s.concat(c(n,r,a)),s.push(n)):s.push(c(n,r,a))}),r)return o(s);var d=f.fn.apply(void 0,s);return b[n]=d,d}function a(n,t,e){void 0===e&&(e=t,t=[]),u(!h(n),11,'id must be a string "'+n+'"'),u(y[n],12,'id already defined "'+n+'"'),u(!g(t),13,'dependencies for "'+n+'" must be an array "'+t+'"'),u(!r(e)&&!v(e),14,'arg for "'+n+'" must be object or function "'+e+'"'),y[n]={id:n,deps:t,fn:v(e)?e:function(){return e}}}function f(n){return c(n)}function s(){var n={};return e(y,function(r,e){n[e]={deps:r.deps.slice(0),reqs:c(e,!0),init:t(b,e)}}),e(y,function(r,t){var o=[];e(y,function(r,e){i(n[e].reqs,t)&&o.push(e)}),n[t].reqd=o}),n}function d(n){var r="\n";return e(s(),function(t,e){var i=n?t.reqd:t.reqs;r+=(t.init?"* ":" ")+e+" -> [ "+i.join(", ")+" ]\n"}),r}var l=Object.prototype,p=Array.prototype.forEach,h=n("String"),v=n("Function"),g=Array.isArray||n("Array"),y={},b={};return{define:a,require:f,state:s,log:d,_private:{isString:h,isFunction:v,isArray:g,isObject:r,has:t,each:e,contains:i,uniq:o,err:u,definitions:y,instances:b,resolve:c}}}); \ No newline at end of file diff --git a/src/software_communities/public/views/comments-software-extra-fields.js b/src/software_communities/public/views/comments-software-extra-fields.js deleted file mode 100644 index c270cd9..0000000 --- a/src/software_communities/public/views/comments-software-extra-fields.js +++ /dev/null @@ -1,30 +0,0 @@ -modulejs.define('CommentsSoftwareExtraFields', ['jquery'], function($) { - 'use strict'; - - var DATA = { - information_display_state: "hidden" - } - - function set_show_additional_information() { - $(".comments-display-fields").on("click", function() { - if (DATA.information_display_state === "hidden") { - DATA.information_display_state = "show"; - $(".comments-software-extra-fields div").show(); - } else { - DATA.information_display_state = "hidden"; - $(".comments-software-extra-fields div").hide(); - } - }); - } - - return { - isCurrentPage: function() { - return $(".star-rate-form").length === 1; - }, - - - init: function() { - set_show_additional_information(); - } - } -}); diff --git a/src/software_communities/public/views/control-panel.js b/src/software_communities/public/views/control-panel.js deleted file mode 100644 index e7d6e29..0000000 --- a/src/software_communities/public/views/control-panel.js +++ /dev/null @@ -1,31 +0,0 @@ -modulejs.define('ControlPanel', ['jquery'], function($) { - 'use strict'; - - function add_software_on_control_panel(control_panel) { - var software_link = $(".control-panel-software-link").remove(); - - if( software_link.size() > 0 ) { - control_panel.prepend(software_link); - } - } - - function add_itens_on_controla_panel() { - var control_panel = $(".control-panel"); - - if( control_panel.size() > 0 ) { - add_software_on_control_panel(control_panel); - } - } - - - return { - isCurrentPage: function() { - return $("#profile-editor-index").length === 1; - }, - - - init: function() { - add_itens_on_controla_panel(); - } - } -}); diff --git a/src/software_communities/public/views/edit-software.js b/src/software_communities/public/views/edit-software.js deleted file mode 100644 index 142077d..0000000 --- a/src/software_communities/public/views/edit-software.js +++ /dev/null @@ -1,111 +0,0 @@ -modulejs.define('EditSoftware', ['jquery', 'NoosferoRoot', 'AutoComplete', 'NewSoftware'], function($, NoosferoRoot, AutoComplete, NewSoftware) { - 'use strict'; - - var AJAX_URL = { - get_field_data: - NoosferoRoot.urlWithSubDirectory("/plugin/software_communities/get_field_data") - }; - - - function database_autocomplete() { - AutoComplete.enable("database", ".database_description_id", ".database_autocomplete", AJAX_URL.get_field_data); - } - - - function language_autocomplete() { - AutoComplete.enable("software_language", ".programming_language_id", ".language_autocomplete", AJAX_URL.get_field_data); - } - - - function delete_dynamic_table() { - var button = $(".delete-dynamic-table"); - - button.each(function(){ - var table = $(this).parent().parent().parent().parent(); - var color = table.css("background-color"); - - $(this).click(function(){ - table.remove(); - return false; - }).mouseover(function(){ - table.css("background-color", "#eee"); - }).mouseout(function(){ - table.css("background-color", color); - }); - }); - } - - - function has_more_than_one(table_class) { - return ($("."+table_class).length > 2); // One is always added by defaul and its hidden - } - - - function add_dynamic_table(element_id, content) { - $("#"+element_id).append(content); - } - - - function hide_show_public_software_fields() { - if ($("#software_public_software").is(":checked")) { - $(".public-software-fields").show(); - } else { - $(".public-software-fields").hide(); - } - } - - - function replace_software_creations_step() { - var software_creation_step = $("#software_creation_step").remove(); - - if( software_creation_step.size() > 0 ) { - $("#profile-data").parent().prepend(software_creation_step); - } - } - - - return { - isCurrentPage: function() { - return $("#especific-info").length === 1; - }, - - - init: function() { - var dynamic_tables = ["dynamic-databases", "dynamic-languages", "dynamic-libraries","dynamic-operating_systems"]; - - delete_dynamic_table(); - database_autocomplete(); - language_autocomplete(); - - $(".new-dynamic-table").click(function(){ - var link = $(this); - - dynamic_tables.forEach(function(value){ - if( link.hasClass(value) ) { - var table_id = value.split("-")[1]; - - var table_html = $("#table_structure_"+table_id).html(); - - add_dynamic_table(table_id, table_html); - } - }); - - delete_dynamic_table(); - database_autocomplete(); - language_autocomplete(); - - return false; - }); - - - - - hide_show_public_software_fields(); - $("#software_public_software").click(hide_show_public_software_fields); - - replace_software_creations_step(); - - NewSoftware.init(); - } - } -}); diff --git a/src/software_communities/public/views/new-community.js b/src/software_communities/public/views/new-community.js deleted file mode 100644 index b665e8f..0000000 --- a/src/software_communities/public/views/new-community.js +++ /dev/null @@ -1,28 +0,0 @@ -modulejs.define("NewCommunity", ['jquery'], function($) { - - function replace_mandatory_message() { - $(".required-field").first() - .replaceWith(" Os campos em destaque são obrigatórios. "); - } - - function remove_image_builder_text() { - $("label:contains('Image builder')").hide(); - } - - function hide_organization_template_fields(){ - $('#template-options').hide(); - } - - return { - - isCurrentPage: function() { - return true; - }, - - init: function() { - replace_mandatory_message(); - remove_image_builder_text(); - hide_organization_template_fields(); - } - } -}) diff --git a/src/software_communities/public/views/new-software.js b/src/software_communities/public/views/new-software.js deleted file mode 100644 index 180ff70..0000000 --- a/src/software_communities/public/views/new-software.js +++ /dev/null @@ -1,69 +0,0 @@ -modulejs.define('NewSoftware', ['jquery', 'NoosferoRoot', 'AutoComplete', 'NewCommunity'], function($, NoosferoRoot, AutoComplete, Community) { - 'use strict'; - - var AJAX_URL = { - get_license_data: - NoosferoRoot.urlWithSubDirectory("/plugin/software_communities/get_license_data") - }; - - function replace_domain_and_repository_link(){ - var community_name = $("#community_name_id").val(); - var domain = 'https://'; - domain = domain.concat($("#software-hostname").text()); - - var slug_name = community_name.replace(/\s+/g, '-').toLowerCase(); - - var custom_domain = domain.concat(''); - custom_domain = custom_domain.concat('/'); - custom_domain = custom_domain.concat(slug_name); - - $("#community-identifier").val(slug_name); - $("#software-info-repository-link").val(custom_domain); - } - - function show_another_license_on_page_load() { - $("#license_info_id").trigger("change"); - } - - - function display_another_license_fields(selected) { - if( selected === "Another" ) { - $("#another_license").removeClass("hide-field"); - $("#version_link").addClass("hide-field"); - } else { - $("#another_license").addClass("hide-field"); - $("#version_link").removeClass("hide-field"); - } - } - - - function display_license_link_on_autocomplete(selected) { - var link = $("#version_" + selected.item.id).val(); - $("#version_link").attr("href", link); - - display_another_license_fields(selected.item.label); - } - - - function license_info_autocomplete() { - AutoComplete.enable( - "license_info", ".license_info_id", ".license_info_version", - AJAX_URL.get_license_data, display_license_link_on_autocomplete - ); - } - - - return { - isCurrentPage: function() { - return $('#new-software-page').length === 1; - }, - - - init: function() { - license_info_autocomplete(); - Community.init(); - - $("#community_name_id").blur(replace_domain_and_repository_link); - } - } -}); diff --git a/src/software_communities/public/views/profile-tabs-software.js b/src/software_communities/public/views/profile-tabs-software.js deleted file mode 100644 index 92ee237..0000000 --- a/src/software_communities/public/views/profile-tabs-software.js +++ /dev/null @@ -1,86 +0,0 @@ -modulejs.define("ProfileTabsSoftware", ["jquery"], function($) { - "use strict"; - - function hide_infos(){ - $(".language-info").hide(); - $(".database-info").hide(); - $(".libraries-info").hide(); - $(".operating-system-info").hide(); - $(".language-button-hide").hide(); - $(".database-button-hide").hide(); - $(".libraries-button-hide").hide(); - $(".operating-system-button-hide").hide(); - } - - - function set_show_hide_dynamic_table_events() { - $(".language-button-hide").click(function(event){ - event.preventDefault(); - $(".language-info").hide(); - $(".language-button-show").show(); - $(".language-button-hide").hide(); - }); - - $(".language-button-show").click(function(event){ - event.preventDefault(); - $(".language-info").show(); - $(".language-button-show").hide(); - $(".language-button-hide").show(); - }); - - $(".operating-system-button-hide").click(function(event){ - event.preventDefault(); - $(".operating-system-info").hide(); - $(".operating-system-button-show").show(); - $(".operating-system-button-hide").hide(); - }); - - $(".operating-system-button-show").click(function(event){ - event.preventDefault(); - $(".operating-system-info").show(); - $(".operating-system-button-show").hide(); - $(".operating-system-button-hide").show(); - }); - - $(".database-button-hide").click(function(event){ - event.preventDefault(); - $(".database-info").hide(); - $(".database-button-show").show(); - $(".database-button-hide").hide(); - }); - - $(".database-button-show").click(function(event){ - event.preventDefault(); - $(".database-info").show(); - $(".database-button-show").hide(); - $(".database-button-hide").show(); - }); - - $(".libraries-button-hide").click(function(event){ - event.preventDefault(); - $(".libraries-info").hide(); - $(".libraries-button-show").show(); - $(".libraries-button-hide").hide(); - }); - - $(".libraries-button-show").click(function(event){ - event.preventDefault(); - $(".libraries-info").show(); - $(".libraries-button-show").hide(); - $(".libraries-button-hide").show(); - }); - } - - - return { - isCurrentPage: function() { - return $("#software-fields").length === 1; - }, - - - init: function() { - hide_infos(); - set_show_hide_dynamic_table_events(); - } - } -}); diff --git a/src/software_communities/public/views/search-software-catalog.js b/src/software_communities/public/views/search-software-catalog.js deleted file mode 100644 index 552b055..0000000 --- a/src/software_communities/public/views/search-software-catalog.js +++ /dev/null @@ -1,172 +0,0 @@ -modulejs.define('SearchSoftwareCatalog', ['jquery', 'NoosferoRoot', 'SoftwareCatalogComponent'], function($, NoosferoRoot, SoftwareCatalogComponent) { - 'use strict'; - - var AJAX_URL = { - software_infos: - NoosferoRoot.urlWithSubDirectory("/search/software_infos") - }; - - - function dispatch_search_ajax(enable_load) { - var search_params = get_search_params(); - - if(enable_load) { - open_loading("Loading"); - } - - $.ajax({ - url: AJAX_URL.software_infos, - type: "GET", - data: search_params, - success: update_search_page_on_ajax, - error: function(){ - close_loading(); - } - }); - } - - - function get_search_params() { - var params = {}; - - params.query = $("#search-input").val(); - params.selected_categories_id = []; - - $(".categories-catalog:checked").each(function(index, element) { - params.selected_categories_id.push(element.value); - }); - - params.software_display = $("#software_display").val(); - params.sort = $("#sort").val(); - - if($("#all_radio_button").is(":checked")) { - params.software_type = $("#all_radio_button").val(); - } else { - params.software_type = $("#public_software_radio_button").val(); - } - - return params; - } - - - function get_result_div_core(message) { - $("#search-results-empty").html(message); - } - - - function catalog_message() { - var empty_result = $('#empty_result').val() === 'true'; - var user_selected_categories = $('.categories-catalog:checked').length !== 0; - - if(empty_result && !user_selected_categories) { - get_result_div_core($('#message-no-catalog-selected').val()); - } else if (empty_result && user_selected_categories) { - get_result_div_core($('#message-catalog-selected').val()); - } - } - - - function update_search_page_on_ajax(response) { - response = $(response); - - var search_list = $("#search-results"); - var selected_categories_field = $("#filter-categories-select-catalog"); - var pagination = $("#software-pagination"); - var software_count = $("#software-count"); - var individually_category = $("#individually-category"); - - var result_list = response.find("#search-results").html(); - var result_categories = response.find("#filter-categories-select-catalog").html(); - var result_pagination = response.find("#software-pagination").html(); - var result_software_count = response.find("#software-count").html(); - var result_individually_category = response.find("#individually-category").html(); - - search_list.html(result_list); - selected_categories_field.html(result_categories); - pagination.html(result_pagination); - software_count.html(result_software_count); - individually_category.html(result_individually_category); - - highlight_searched_terms(); - catalog_message(); - - hide_load_after_ajax(); - } - - - function hide_load_after_ajax() { - if ($("#overlay_loading_modal").is(":visible")) { - close_loading(); - setTimeout(hide_load_after_ajax, 1500); - } - } - - - function highlight_searched_terms() { - var searched_terms = $("#search-input").val(); - - if( searched_terms.length === 0 ) { - return undefined; - } - - var content_result = $(".search-content-result"); - var regex = new RegExp("("+searched_terms.replace(/\s/g, "|")+")", "gi"); - - content_result.each(function(i, e){ - var element = $(e); - - var new_text = element.text().replace(regex, function(text) { - return ""+text+""; - }); - - element.html(new_text); - }); - } - - - function update_page_by_ajax_on_select_change() { - dispatch_search_ajax(true); - } - - function update_page_by_text_filter() { - var text = this.value; - dispatch_search_ajax(false); - } - - - function search_input_keyup() { - var timer = null; - - $("#search-input").keyup(function() { - // Only start the search(with ajax) after 3 characters - if(this.value.length >= 3) { - timer = setTimeout(update_page_by_text_filter, 400); - } - }).keydown(function() { - clearTimeout(timer); - }); - } - - - function set_events() { - $("#software_display").change(update_page_by_ajax_on_select_change); - $("#sort").change(update_page_by_ajax_on_select_change); - - search_input_keyup(); - } - - - return { - isCurrentPage: function() { - return $('#software-search-container').length === 1; - }, - - - init: function() { - set_events(); - catalog_message(); - SoftwareCatalogComponent.init(dispatch_search_ajax); - } - } -}); - diff --git a/src/software_communities/script/schedule_institution_update.sh b/src/software_communities/script/schedule_institution_update.sh deleted file mode 100755 index a5d1281..0000000 --- a/src/software_communities/script/schedule_institution_update.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -cp plugins/software_communities/config/institutions_update.example /etc/cron.d/institutions_update -echo "Created crontab file in /etc/cron.d/institution_update..." diff --git a/src/software_communities/test/functional/profile_controller_test.rb b/src/software_communities/test/functional/profile_controller_test.rb deleted file mode 100644 index 3805787..0000000 --- a/src/software_communities/test/functional/profile_controller_test.rb +++ /dev/null @@ -1,40 +0,0 @@ -require "test_helper" -require 'profile_controller' - -# Re-raise errors caught by the controller. -class ProfileController; def rescue_action(e) raise e end; end - -class ProfileControllerTest < ActionController::TestCase - def setup - Environment.default.enable('products_for_enterprises') - @profile = create_user('testuser').person - end - attr_reader :profile - - should 'not count a visit twice for the same user' do - profile = create_user('someone').person - login_as(@profile.identifier) - community = fast_create('Community') - - get :index, :profile => community.identifier - community.reload - assert_equal 1, community.hits - - get :index, :profile => community.identifier - community.reload - assert_equal 1, community.hits - end - - should 'not count a visit twice for unlogged users' do - profile = create_user('someone').person - community = fast_create('Community') - get :index, :profile => community.identifier - community.reload - assert_equal 1, community.hits - - get :index, :profile => community.identifier - community.reload - assert_equal 1, community.hits - end -end - diff --git a/src/software_communities/test/functional/profile_editor_controller_test.rb b/src/software_communities/test/functional/profile_editor_controller_test.rb deleted file mode 100644 index b677a1d..0000000 --- a/src/software_communities/test/functional/profile_editor_controller_test.rb +++ /dev/null @@ -1,70 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require( - File.dirname(__FILE__) + - '/../../../../app/controllers/my_profile/profile_editor_controller' -) - -class ProfileEditorController; def rescue_action(e) raise e end; end - -class ProfileEditorControllerTest < ActionController::TestCase - - def setup - @controller = ProfileEditorController.new - @request = ActionController::TestRequest.new - @response = ActionController::TestResponse.new - @profile = create_user('default_user').person - - Environment.default.affiliate( - @profile, - [Environment::Roles.admin(Environment.default.id)] + - Profile::Roles.all_roles(Environment.default.id) - ) - - @environment = Environment.default - @environment.enabled_plugins = ['SoftwareCommunitiesPlugin'] - admin = create_user("adminuser").person - admin.stubs(:has_permission?).returns("true") - login_as('adminuser') - @environment.add_admin(admin) - @environment.save - end - - should "redirect to edit_software_community on edit community of software" do - software = create_software_info("Test Software") - - post :edit, :profile => software.community.identifier - - assert_redirected_to :controller => 'profile_editor', :action => 'edit_software_community' - end - - - protected - - def create_basic_user - user = fast_create(User) - user.person = fast_create(Person) - user.person.user = user - user.save! - user.person.save! - user - end - - def create_community name - community = fast_create(Community) - community.name = name - community.save - community - end - - def create_software_info name, finality = "something", acronym = "" - community = create_community(name) - software_info = SoftwareInfo.new - software_info.community = community - software_info.finality = finality - software_info.acronym = acronym - software_info.public_software = true - software_info.save - software_info - end - -end diff --git a/src/software_communities/test/functional/search_controller_test.rb b/src/software_communities/test/functional/search_controller_test.rb deleted file mode 100644 index 606337d..0000000 --- a/src/software_communities/test/functional/search_controller_test.rb +++ /dev/null @@ -1,304 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' -require( - File.dirname(__FILE__) + - '/../../../../app/controllers/public/search_controller' -) - -class SearchController; def rescue_action(e) raise e end; end - -class SearchControllerTest < ActionController::TestCase - include PluginTestHelper - - def setup - @environment = Environment.default - @environment.enabled_plugins = ['SoftwareCommunitiesPlugin'] - @environment.save - - @controller = SearchController.new - @request = ActionController::TestRequest.new - @request.stubs(:ssl?).returns(:false) - @response = ActionController::TestResponse.new - - @licenses = [ - LicenseInfo.create(:version => "GPL - 1"), - LicenseInfo.create(:version => "GPL - 2") - ] - - create_software_categories - - @softwares = [] - - @softwares << create_software_info("Software One", :acronym => "SFO", :finality => "Help") - @softwares << create_software_info("Software Two", :acronym => "SFT", :finality => "Task") - - @softwares[0].community.categories << Category.first - @softwares[1].community.categories << Category.last - - @softwares[0].license_info = @licenses.first - @softwares[1].license_info = @licenses.last - - @softwares[0].save! - @softwares[1].save! - end - - should "communities searches don't have software" do - community = create_community("Community One") - - get :communities, :query => "One" - - assert_includes assigns(:searches)[:communities][:results], community - assert_not_includes assigns(:searches)[:communities][:results], @softwares.first.community - end - - should "software_infos search don't have community" do - community = create_community("Community One") - - get :software_infos, :query => "One" - - assert_includes assigns(:searches)[:software_infos][:results], @softwares.first.community - assert_not_includes assigns(:searches)[:software_infos][:results], community - end - - - should "Don't have template in communities search result" do - communities = [] - communities << create_community("Community One") - communities << create_community("Community Two") - - community_template = create_community("Community Template") - community_template.is_template = true - community_template.visible = false - community_template.save! - - get :communities, :query => "Comm" - - assert_not_includes( - assigns(:searches)[:communities][:results], - community_template - ) - end - - should "software_infos search by category" do - get( - :software_infos, - :query => "", - :selected_categories_id => [Category.first.id] - ) - - assert_includes assigns(:searches)[:software_infos][:results], @softwares.first.community - assert_not_includes assigns(:searches)[:software_infos][:results], @softwares.last.community - end - - should "software_infos search by programming language" do - @softwares.first.software_languages << create_software_language("Python", "1.0") - @softwares.last.software_languages << create_software_language("Java", "8.1") - - @softwares.first.save! - @softwares.last.save! - - get( - :software_infos, - :query => "python", - ) - - assert_includes assigns(:searches)[:software_infos][:results], @softwares.first.community - assert_not_includes assigns(:searches)[:software_infos][:results], @softwares.last.community - end - - should "software_infos search by database description" do - @softwares.first.software_databases << create_software_database("MySQL", "1.0") - @softwares.last.software_databases << create_software_database("Postgrees", "8.1") - - @softwares.first.save! - @softwares.last.save! - - get( - :software_infos, - :query => "mysql", - ) - - assert_includes assigns(:searches)[:software_infos][:results], @softwares.first.community - assert_not_includes assigns(:searches)[:software_infos][:results], @softwares.last.community - end - - should "software_infos search by finality" do - get( - :software_infos, - :query => "help", - ) - - - assert_includes assigns(:searches)[:software_infos][:results], @softwares.first.community - assert_not_includes assigns(:searches)[:software_infos][:results], @softwares.last.community - end - - should "software_infos search by acronym" do - get( - :software_infos, - :query => "SFO", - ) - - assert_includes assigns(:searches)[:software_infos][:results], @softwares.first.community - assert_not_includes assigns(:searches)[:software_infos][:results], @softwares.last.community - end - - should "software_infos search by relevance" do - @softwares << create_software_info("Software Three", :acronym => "SFW", :finality => "Java") - @softwares.last.license_info = LicenseInfo.create :version => "GPL - 3.0" - - - @softwares.first.software_languages << create_software_language("Java", "8.0") - @softwares.first.save! - - @softwares[1].community.name = "Java" - @softwares[1].community.save! - - get( - :software_infos, - :sort => "relevance", - :query => "Java" - ) - - assert_equal assigns(:searches)[:software_infos][:results][0], @softwares[1].community - assert_equal assigns(:searches)[:software_infos][:results][1], @softwares[2].community - assert_equal assigns(:searches)[:software_infos][:results][2], @softwares[0].community - end - - should "software_infos search only public_software" do - software_one = create_software_info("Software One", :acronym => "SFO", :finality => "Help") - software_two = create_software_info("Java", :acronym => "SFT", :finality => "Task") - software_three = create_software_info("Software Three", :acronym => "SFW", :finality => "Java") - software_three.public_software = false - software_three.save! - - get( - :software_infos, - :software_type => "public_software" - ) - - assert_includes assigns(:searches)[:software_infos][:results], software_one.community - assert_includes assigns(:searches)[:software_infos][:results], software_two.community - assert_not_includes assigns(:searches)[:software_infos][:results], software_three.community - end - - should "software_infos search public_software and other all" do - software_one = create_software_info("Software One", :acronym => "SFO", :finality => "Help") - software_two = create_software_info("Java", :acronym => "SFT", :finality => "Task") - software_three = create_software_info("Software Three", :acronym => "SFW", :finality => "Java") - software_three.public_software = false - software_three.save! - - get( - :software_infos, - :software_type => "all" - ) - - assert_includes assigns(:searches)[:software_infos][:results], software_one.community - assert_includes assigns(:searches)[:software_infos][:results], software_two.community - assert_includes assigns(:searches)[:software_infos][:results], software_three.community - end - - should "software_infos search return only the software in params" do - software_one = create_software_info("Software One", :acronym => "SFO", :finality => "Help") - software_two = create_software_info("Java", :acronym => "SFT", :finality => "Task") - software_three = create_software_info("Software Three", :acronym => "SFW", :finality => "Java") - - get( - :software_infos, - :only_softwares => ["software-three", "java"] - ) - - assert_includes assigns(:searches)[:software_infos][:results], software_two.community - assert_includes assigns(:searches)[:software_infos][:results], software_three.community - assert_not_includes assigns(:searches)[:software_infos][:results], software_one.community - end - - should "software_infos search return only enabled softwares" do - s1 = SoftwareInfo.first - s2 = SoftwareInfo.last - - # First get them all normally - get( - :software_infos, - :query => "software" - ) - - assert_includes assigns(:searches)[:software_infos][:results], s1.community - assert_includes assigns(:searches)[:software_infos][:results], s2.community - - s2.community.disable - - # Now it should not contain the disabled community - get( - :software_infos, - :query => "software" - ) - - assert_includes assigns(:searches)[:software_infos][:results], s1.community - assert_not_includes assigns(:searches)[:software_infos][:results], s2.community - end - - should "software_infos search not return software with secret community" do - software_one = create_software_info("Software ABC", :acronym => "SFO", :finality => "Help") - software_two = create_software_info("Python", :acronym => "SFT", :finality => "Task") - software_three = create_software_info("Software DEF", :acronym => "SFW", :finality => "Java") - - software_one.community.secret = true - software_one.community.save! - - get( - :software_infos, - ) - - assert_includes assigns(:searches)[:software_infos][:results], software_two.community - assert_includes assigns(:searches)[:software_infos][:results], software_three.community - assert_not_includes assigns(:searches)[:software_infos][:results], software_one.community - end - - private - - def create_software_categories - category_software = Category.create!( - :name => "Software", - :environment => @environment - ) - Category.create( - :name => "Category One", - :environment => @environment, - :parent => category_software - ) - Category.create( - :name => "Category Two", - :environment => @environment, - :parent => category_software - ) - end - - def create_software_language(name, version) - unless ProgrammingLanguage.find_by_name(name) - ProgrammingLanguage.create(:name => name) - end - - software_language = SoftwareLanguage.new - software_language.programming_language = ProgrammingLanguage.find_by_name(name) - software_language.version = version - software_language.save! - - software_language - end - - def create_software_database(name, version) - unless DatabaseDescription.find_by_name(name) - DatabaseDescription.create(:name => name) - end - - software_database = SoftwareDatabase.new - software_database.database_description = DatabaseDescription.find_by_name(name) - software_database.version = version - software_database.save! - - software_database - end - -end diff --git a/src/software_communities/test/functional/software_communities_plugin_controller_test.rb b/src/software_communities/test/functional/software_communities_plugin_controller_test.rb deleted file mode 100644 index 78ae2e0..0000000 --- a/src/software_communities/test/functional/software_communities_plugin_controller_test.rb +++ /dev/null @@ -1,116 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../../controllers/software_communities_plugin_controller' - -class SoftwareCommunitiesPluginController; def rescue_action(e) raise e end; end - -class SoftwareCommunitiesPluginControllerTest < ActionController::TestCase - def setup - @admin = create_user("adminuser").person - @admin.stubs(:has_permission?).returns("true") - @controller.stubs(:current_user).returns(@admin.user) - - @environment = Environment.default - @environment.enabled_plugins = ['SoftwareCommunitiesPlugin'] - @environment.add_admin(@admin) - @environment.save - - LicenseInfo.create(:version=>"CC-GPL-V2", :link=>"http://creativecommons.org/licenses/GPL/2.0/legalcode.pt") - LicenseInfo.create(:version=>"Academic Free License 3.0 (AFL-3.0)", :link=>"http://www.openfoundry.org/en/licenses/753-academic-free-license-version-30-afl") - LicenseInfo.create(:version=>"Apache License 2.0 (Apache-2.0)", :link=>"http://www.apache.org/licenses/LICENSE-2.0") - LicenseInfo.create(:version=>'BSD 2-Clause "Simplified" or "FreeBSD" License (BSD-2-Clause)', :link=>"http://opensource.org/licenses/BSD-2-Clause") - - ProgrammingLanguage.create(:name =>"Java") - ProgrammingLanguage.create(:name =>"Ruby") - ProgrammingLanguage.create(:name =>"C") - ProgrammingLanguage.create(:name =>"C++") - DatabaseDescription.create(:name => "PostgreSQL") - DatabaseDescription.create(:name => "MySQL") - DatabaseDescription.create(:name => "MongoDB") - DatabaseDescription.create(:name => "Oracle") - OperatingSystemName.create(:name=>"Debian") - - @response = ActionController::TestResponse.new - end - - should 'return the licenses datas' do - xhr :get, :get_license_data, :query => "" - - licenses = JSON.parse(@response.body) - - assert_equal 4, licenses.count - end - - should 'return licenses that has Free on their version name' do - xhr :get, :get_license_data, :query => "Free" - - licenses = JSON.parse(@response.body) - - assert_equal 2, licenses.count - end - - should 'return no licenses that has Common on their version name' do - xhr :get, :get_license_data, :query => "Common" - - licenses = JSON.parse(@response.body) - - assert_equal 0, licenses.count - end - - should 'render block template' do - xhr :get, :get_block_template - - assert_tag :tag => 'input', :attributes => { :class => "block_download_name" } - assert_tag :tag => 'input', :attributes => { :class => "block_download_link" } - assert_tag :tag => 'input', :attributes => { :class => "block_download_software_description" } - assert_tag :tag => 'input', :attributes => { :class => "block_download_minimum_requirements" } - assert_tag :tag => 'input', :attributes => { :class => "block_download_size" } - end - - should 'return the programming languages' do - xhr :get, :get_field_data, :query => "", :field => "software_language" - - languages = JSON.parse(@response.body) - - assert_equal 4, languages.count - end - - should 'return the programming languages that has C on their name' do - xhr :get, :get_field_data, :query => "C", :field => "software_language" - - languages = JSON.parse(@response.body) - - assert_equal 2, languages.count - end - - should 'dont return the programming languages that has HTML on their name' do - xhr :get, :get_field_data, :query => "HTML", :field => "software_language" - - languages = JSON.parse(@response.body) - - assert_equal 1, languages.count - end - - should 'return the databases' do - xhr :get, :get_field_data, :query => "", :field => "software_database" - - databases = JSON.parse(@response.body) - - assert_equal 4, databases.count - end - - should 'return the databases that has SQL on their name' do - xhr :get, :get_field_data, :query => "SQL", :field => "software_database" - - databases = JSON.parse(@response.body) - - assert_equal 3, databases.count - end - - should 'dont return the database that has on their name' do - xhr :get, :get_field_data, :query => "Cache", :field => "software_database" - - databases = JSON.parse(@response.body) - - assert_equal 1, databases.count - end -end diff --git a/src/software_communities/test/functional/software_communities_plugin_myprofile_controller_test.rb b/src/software_communities/test/functional/software_communities_plugin_myprofile_controller_test.rb deleted file mode 100644 index bb72b8a..0000000 --- a/src/software_communities/test/functional/software_communities_plugin_myprofile_controller_test.rb +++ /dev/null @@ -1,154 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/software_test_helper' -require( - File.dirname(__FILE__) + - '/../../controllers/software_communities_plugin_myprofile_controller' -) - -class SoftwareCommunitiesPluginMyprofileController; def rescue_action(e) raise e end; -end - -class SoftwareCommunitiesPluginMyprofileControllerTest < ActionController::TestCase - include SoftwareTestHelper - def setup - @controller = SoftwareCommunitiesPluginMyprofileController.new - @request = ActionController::TestRequest.new - @response = ActionController::TestResponse.new - @person = create_user('person').person - @offer = create_user('Angela Silva') - @offer_1 = create_user('Ana de Souza') - @offer_2 = create_user('Angelo Roberto') - - LicenseInfo.create( - :version=>"CC-GPL-V2", - :link=>"http://creativecommons.org/licenses/GPL/2.0/legalcode.pt" - ) - - ProgrammingLanguage.create(:name =>"language") - DatabaseDescription.create(:name => "database") - OperatingSystemName.create(:name=>"Debian") - - login_as(@person.user_login) - @environment = Environment.default - @environment.enable_plugin('SoftwareCommunitiesPlugin') - @environment.save! - end - - attr_accessor :person, :offer - - should 'Add offer to admin in new software' do - @hash_list = software_fields - @software = create_software @hash_list - @software.community.add_admin(@offer.person) - @software.save - assert_equal @offer.person.id, @software.community.admins.last.id - end - - should 'create a new software with all fields filled in' do - fields = software_fields - @environment.add_admin(@person) - post( - :new_software, - :profile => @person.identifier, - :community => fields[1], - :license => fields[0], - :software_info => fields[2] - ) - assert_equal SoftwareInfo.last.community.name, "Debian" - end - - should 'edit a new software adding basic information' do - fields_software = software_fields - fields = software_edit_basic_fields - - software = create_software fields_software - post( - :edit_software, - :profile => software.community.identifier, - :license => fields[1], - :software => fields[0], - :library => {}, - :operating_system => {}, - :language => {}, - :database => {} - ) - assert_equal SoftwareInfo.last.repository_link, "www.github.com/test" - end - - should 'edit a new software adding specific information' do - fields_software = software_fields - fields = software_edit_specific_fields - - software = create_software fields_software - post( - :edit_software, - :profile => software.community.identifier, - :library => fields[0], - :language => fields[1], - :database => fields[2], - :operating_system => fields[3], - :software => fields[4], - :license => fields[5] - ) - assert_equal SoftwareInfo.last.acronym, "test" - end - - should 'upgrade a generic software to a public software' do - fields_software = software_fields - fields = software_edit_specific_fields - - fields[4]['public_software'] = true - software = create_software fields_software - - post( - :edit_software, - :profile => software.community.identifier, - :library => fields[0], - :language => fields[1], - :database => fields[2], - :operating_system => fields[3], - :software => fields[4], - :license => fields[5] - ) - - assert_equal true, SoftwareInfo.last.public_software? - end - - should "create software_info with existing license_info" do - @environment.add_admin(@person) - - post( - :new_software, - :community => {:name =>"New Software", :identifier => "new-software"}, - :software_info => {:finality => "something", :repository_link => ""}, - :license =>{:license_infos_id => LicenseInfo.last.id}, - :profile => @person.identifier - ) - - assert_equal SoftwareInfo.last.license_info, LicenseInfo.last - end - - should "create software_info with 'Another' license_info" do - license_another = LicenseInfo.create(:version => "Another", :link => "#") - @environment.add_admin(@person) - - another_license_version = "Different License" - another_license_link = "http://diferent.link" - - post( - :new_software, - :community => { :name => "New Software", :identifier => "new-software" }, - :software_info => { :finality => "something", :repository_link => "" }, - :license => { :license_infos_id => license_another.id, - :version => another_license_version, - :link=> another_license_link - }, - :profile => @person.identifier - ) - - assert_equal SoftwareInfo.last.license_info_id, license_another.id - assert_equal SoftwareInfo.last.license_info.id, nil - assert_equal SoftwareInfo.last.license_info.version, another_license_version - assert_equal SoftwareInfo.last.license_info.link, another_license_link - end -end diff --git a/src/software_communities/test/functional/software_communities_plugin_profile_controller_test.rb b/src/software_communities/test/functional/software_communities_plugin_profile_controller_test.rb deleted file mode 100644 index 00c715e..0000000 --- a/src/software_communities/test/functional/software_communities_plugin_profile_controller_test.rb +++ /dev/null @@ -1,67 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/software_test_helper' -require File.dirname(__FILE__) + '/../../controllers/software_communities_plugin_profile_controller' - -class SoftwareCommunitiesPluginProfileController; def rescue_action(e) raise e end; end - -class SoftwareCommunitiesPluginProfileControllerTest < ActionController::TestCase - include SoftwareTestHelper - - def setup - @controller = SoftwareCommunitiesPluginProfileController.new - @request = ActionController::TestRequest.new - @response = ActionController::TestResponse.new - - @environment = Environment.default - @environment.enable_plugin('SoftwareCommunitiesPlugin') - @environment.save! - - LicenseInfo.create( - :version=>"CC-GPL-V2", - :link=>"http://creativecommons.org/licenses/GPL/2.0/legalcode.pt" - ) - @download_data = { - :name=>"Google", - :link=>"http://google.com", - :software_description=>"all", - :minimum_requirements=>"none", - :size=>"?", - :total_downloads=>0 - } - - @software = create_software(software_fields) - @software.save! - - download_block = DownloadBlock.new - download_block.downloads = Download.validate_download_list([@download_data]) - download_block.save! - - @software.community.blocks << download_block - @software.community.save! - end - - should 'redirect to download link with correct params' do - download_block = DownloadBlock.last - get :download_file, :profile=>@software.community.identifier, - :block => download_block.id, :download_index => 0 - - assert_equal nil, session[:notice] - assert_redirected_to download_block.downloads[0][:link] - end - - should "notice when the download was not found" do - download_block = DownloadBlock.last - get :download_file, :profile=>@software.community.identifier, - :block => 123, :download_index => 0 - - assert_equal "Could not find the download file", session[:notice] - end - - should "notice when given invalid download params" do - download_block = DownloadBlock.last - get :download_file, :profile=>@software.community.identifier, - :block => download_block.id, :download_index => -5 - - assert_equal "Invalid download params", session[:notice] - end -end diff --git a/src/software_communities/test/helpers/plugin_test_helper.rb b/src/software_communities/test/helpers/plugin_test_helper.rb deleted file mode 100644 index d7458ce..0000000 --- a/src/software_communities/test/helpers/plugin_test_helper.rb +++ /dev/null @@ -1,64 +0,0 @@ -module PluginTestHelper - - def create_community name - community = fast_create(Community) - community.name = name - community.identifier = name.to_slug - community.save - community - end - - def create_software_info name, finality = "something", acronym = "" - community = create_community(name) - software_info = SoftwareInfo.new - software_info.community = community - software_info.finality = finality - software_info.acronym = acronym - software_info.public_software = true - software_info.save! - - software_info - end - - def create_person name, email, password, password_confirmation, state, city - user = create_user( - name.to_slug, - email, - password, - password_confirmation, - ) - person = Person::new - - user.person = person - person.user = user - - person.name = name - person.identifier = name.to_slug - person.state = state - person.city = city - - user.save - person.save - - person - end - - def create_user login, email, password, password_confirmation - user = User.new - - user.login = login - user.email = email - user.password = password - user.password_confirmation = password_confirmation - - user - end - - def create_license_info version, link = "" - license = LicenseInfo.create(:version => version) - license.link = link - license.save - - license - end -end diff --git a/src/software_communities/test/helpers/software_test_helper.rb b/src/software_communities/test/helpers/software_test_helper.rb deleted file mode 100644 index 285fd27..0000000 --- a/src/software_communities/test/helpers/software_test_helper.rb +++ /dev/null @@ -1,193 +0,0 @@ -module SoftwareTestHelper - - def create_language language_fields - language = SoftwareLanguage.new - - language_fields[0].each do |k,v| - language[k] = v - end - language.save! - language - end - - def create_database database_fields - - database = SoftwareDatabase.new - - database_fields[0].each do |k,v| - database[k] = v - end - - database.save! - database - end - - def create_library library_fields - library = Library.new - - library_fields[0].each do |k,v| - library[k] = v - end - library.save! - library - end - - def create_operating_system operating_system_hash - operating_system = OperatingSystem.new - - operating_system_hash[0].each do |k,v| - operating_system[k] = v - end - operating_system.save - operating_system - end - - def create_license license_hash - license_info = LicenseInfo.new - - license_hash.each do |k,v| - license_info[k] = v - end - license_info.save - license_info - end - - def create_categories categories_hash - software_categories = SoftwareCategories.new - - categories_hash.each do |k,v| - software_categories[k] = v - end - software_categories.save - software_categories - end - - def create_software fields - - software = SoftwareInfo.new - community = Community.new - software_hash = fields[2] - license_system_hash = fields[0] - community_hash = fields[1] - - software_hash.each do |k,v| - software[k] = v - end - - community_hash.each do |k,v| - community[k] = v - end - - community.save! - software.community = community - software.license_info_id = license_system_hash[:license_infos_id] - - software.save! - - software - end - - def software_edit_basic_fields - fields = Hash.new - fields_license = Hash.new - hash_list = [] - - fields['repository_link'] = 'www.github.com/test' - fields['finality'] = 'This is the new finality of the software' - hash_list << fields - - #Fields for license info - fields_license['license_infos_id'] = LicenseInfo.last.id - hash_list << fields_license - - hash_list - end - - def software_edit_specific_fields - fields_library = Hash.new - fields_language = Hash.new - fields_database = Hash.new - fields_operating_system = Hash.new - fields_software = Hash.new - fields_categories = Hash.new - fields_license = Hash.new - - hash_list = [] - list_database = [] - list_language = [] - list_operating_system = [] - list_library = [] - - #Fields for library - fields_library['version'] = 'test' - fields_library['name'] = 'test' - fields_library['license'] = 'test' - list_library << fields_library - list_library << {} - hash_list << list_library - - #Fields for software language - fields_language['version'] = 'test' - fields_language['programming_language_id'] = ProgrammingLanguage.last.id - fields_language['operating_system'] = 'test' - list_language << fields_language - list_language << {} - hash_list << list_language - - #Fields for database - fields_database['version'] = 'test' - fields_database['database_description_id'] = DatabaseDescription.last.id - fields_database['operating_system'] = 'test' - list_database << fields_database - list_database << {} - hash_list << list_database - - #Fields for operating system - fields_operating_system['version'] = 'version' - fields_operating_system['operating_system_name_id'] = OperatingSystemName.last.id - list_operating_system << fields_operating_system - list_operating_system << {} - hash_list << list_operating_system - - #software fields - fields_software['acronym'] = 'test' - fields_software['operating_platform'] = 'Linux' - fields_software['objectives'] = 'This is the objective of the software' - fields_software['features'] = 'This software does nothing' - fields_software['demonstration_url'] = 'www.test.com' - hash_list << fields_software - - #Fields for license - fields_license['license_infos_id'] = LicenseInfo.last.id - hash_list << fields_license - - hash_list - end - - def software_fields - hash_list = [] - - #Fields for license info - fields_license = { - license_infos_id: LicenseInfo.last.id - } - hash_list << fields_license - - #Fields for community - fields_community = { - name: 'Debian', - identifier: 'debian' - } - hash_list << fields_community - - #Fields for basic information - fields = { - finality: 'This is the finality of the software' - } - hash_list << fields - - hash_list - end -end -#version: LicenseInfo.last.version, -#id: LicenseInfo.last.id \ No newline at end of file diff --git a/src/software_communities/test/unit/categories_and_tags_block_test.rb b/src/software_communities/test/unit/categories_and_tags_block_test.rb deleted file mode 100644 index a7e0bef..0000000 --- a/src/software_communities/test/unit/categories_and_tags_block_test.rb +++ /dev/null @@ -1,19 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' - -class CategoriesAndTagsBlockTest < ActiveSupport::TestCase - include PluginTestHelper - should 'inherit from Block' do - assert_kind_of Block, CategoriesAndTagsBlock.new - end - - should 'declare its default title' do - CategoriesAndTagsBlock.any_instance.stubs(:profile_count).returns(0) - assert_equal Block.new.default_title, CategoriesAndTagsBlock.new.default_title - end - - should 'describe itself' do - assert_not_equal Block.description, CategoriesAndTagsBlock.description - end - -end diff --git a/src/software_communities/test/unit/categories_software_block_test.rb b/src/software_communities/test/unit/categories_software_block_test.rb deleted file mode 100644 index b02f9b4..0000000 --- a/src/software_communities/test/unit/categories_software_block_test.rb +++ /dev/null @@ -1,19 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' - -class CategoriesSoftwareBlockTest < ActiveSupport::TestCase - include PluginTestHelper - should 'inherit from Block' do - assert_kind_of Block, CategoriesSoftwareBlock.new - end - - should 'declare its default title' do - CategoriesSoftwareBlock.any_instance.stubs(:profile_count).returns(0) - assert_equal Block.new.default_title, CategoriesSoftwareBlock.new.default_title - end - - should 'describe itself' do - assert_not_equal Block.description, CategoriesSoftwareBlock.description - end - -end diff --git a/src/software_communities/test/unit/communities_block_test.rb b/src/software_communities/test/unit/communities_block_test.rb deleted file mode 100644 index e10251b..0000000 --- a/src/software_communities/test/unit/communities_block_test.rb +++ /dev/null @@ -1,31 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' - -class CommunitiesBlockTest < ActiveSupport::TestCase - include PluginTestHelper - def setup - @person = create_person("My Name", "user@email.com", "123456", "123456", "Any State", "Some City") - - @software_info = create_software_info("Novo Software") - @software_info.community.add_member(@person) - - @community = create_community("Nova Comunidade") - @community.add_member(@person) - - - @comminities_block = CommunitiesBlock.new - @comminities_block.expects(:owner).at_least_once.returns(@person) - end - - def teardown - CommunitiesBlock.destroy_all - @person = nil - @community = nil - @software_info = nil - end - should "not have community of software or institution in block" do - assert_includes @comminities_block.profile_list, @community - assert_not_includes @comminities_block.profile_list, @software_info.community - end - -end diff --git a/src/software_communities/test/unit/database_helper_test.rb b/src/software_communities/test/unit/database_helper_test.rb deleted file mode 100644 index d7f2444..0000000 --- a/src/software_communities/test/unit/database_helper_test.rb +++ /dev/null @@ -1,58 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' - -class DatabaseHelperTest < ActiveSupport::TestCase - - def setup - dd1 = DatabaseDescription.create(:name => "Oracle") - dd2 = DatabaseDescription.create!(:name => "MySQL") - - @database_objects = [ - {:database_description_id => dd1.id.to_s ,:version => "2.0"}, - {:database_description_id => dd2.id.to_s ,:version => "2.1"} - ] - end - - def teardown - @database_objects = nil - SoftwareDatabase.destroy_all - DatabaseDescription.destroy_all - end - - should "return an empty list" do - empty_list = [] - assert_equal [], DatabaseHelper.list_database(empty_list) - end - - should "return a list with current database objects" do - list_compare = [] - db_tables = DatabaseHelper.list_database(@database_objects) - assert_equal list_compare.class, db_tables.class - end - - should "have same information from the list passed as parameter" do - list_compare = DatabaseHelper.list_database(@database_objects) - db_objects_id = @database_objects.first[:database_description_id] - assert_equal db_objects_id.to_i, list_compare.first.database_description_id - end - - should "return a list with the same size of the parameter" do - list_compare = DatabaseHelper.list_database(@database_objects) - assert_equal @database_objects.count, list_compare.count - end - - should "return false if list_database are empty or null" do - list_compare = [] - assert_equal false,DatabaseHelper.valid_list_database?(list_compare) - end - - should "remove invalid tables from the list" do - @database_objects.push({ - :database_description_id => "I'm not a valid id", - :version => "2.5" - }) - - database_objects_length = @database_objects.count - list_compare = DatabaseHelper.list_database(@database_objects) - assert_equal list_compare.count, database_objects_length-1 - end -end diff --git a/src/software_communities/test/unit/database_validation_test.rb b/src/software_communities/test/unit/database_validation_test.rb deleted file mode 100644 index 5466779..0000000 --- a/src/software_communities/test/unit/database_validation_test.rb +++ /dev/null @@ -1,37 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' - -class DatabaseValidationTest < ActiveSupport::TestCase - - def setup - @database_desc = DatabaseDescription.create(:name => "ABC") - @database = SoftwareDatabase.new - @database.database_description = @database_desc - @database.version = "MYSQL" - @database - end - - def teardown - @database = nil - DatabaseDescription.destroy_all - SoftwareDatabase.destroy_all - end - - should "Save database if all fields are filled" do - assert_equal true, @database.save - end - - should "not save database if database_description is empty" do - @database.database_description = nil - assert_equal true, !@database.save - end - - should "not save database if version are empty" do - @database.version = " " - assert_equal true, !@database.save - end - - should "not save database if version is too long" do - @database.version = "A too long version to be a valid version for database" - assert !@database.save - end -end diff --git a/src/software_communities/test/unit/download_block_test.rb b/src/software_communities/test/unit/download_block_test.rb deleted file mode 100644 index adfcdd3..0000000 --- a/src/software_communities/test/unit/download_block_test.rb +++ /dev/null @@ -1,34 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' - -class DownloadBlockTest < ActiveSupport::TestCase - include PluginTestHelper - should 'inherit from Block' do - assert_kind_of Block, DownloadBlock.new - end - - should 'declare its default title' do - DownloadBlock.any_instance.stubs(:profile_count).returns(0) - assert_equal Block.new.default_title, DownloadBlock.new.default_title - end - - should 'describe itself' do - assert_not_equal Block.description, DownloadBlock.description - end - - should 'have software info to download it' do - - link1 = "gitlab.com/teste" - name1 = "Test Software" - - link2 = "gitlab.com/teste/2" - name2 = "Test Software2" - - block = DownloadBlock.create(:downloads => [{:name => name1, :link => link1}, {:name => name2, :link => link2}]) - - assert_equal block.downloads[0][:link], link1, "Link should not be empty" - assert_equal block.downloads[0][:name], name1, "Name should not be empty" - assert_equal block.downloads[1][:link], link2, "Link should not be empty" - assert_equal block.downloads[1][:name], name2, "Name should not be empty" - end -end diff --git a/src/software_communities/test/unit/download_test.rb b/src/software_communities/test/unit/download_test.rb deleted file mode 100644 index 4b301fd..0000000 --- a/src/software_communities/test/unit/download_test.rb +++ /dev/null @@ -1,53 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' - -class DownloadTest < ActiveSupport::TestCase - include PluginTestHelper - - def setup - @downloads_sample_data = [ - { - :name=>"Sample data A", - :link=>"http://some.url.com", - :software_description=>"all", - :minimum_requirements=>"none", - :size=>"10 mb", - :total_downloads=>0 - }, - { - :name=>"Sample data B", - :link=>"http://other.url", - :software_description=>"Linux", - :minimum_requirements=>"500 mb Ram", - :size=>"3 GB", - :total_downloads=>123 - } - ] - end - - should "Set as 0(zero) total_downloads if it is not given" do - without_total_downloads = Download.new({}) - with_total_downloads = Download.new(@downloads_sample_data.last) - - assert_equal 0, without_total_downloads.total_downloads - assert_equal @downloads_sample_data.last[:total_downloads], with_total_downloads.total_downloads - end - - should "Remove downloads without a name" do - @downloads_sample_data[1] = @downloads_sample_data[1].slice! :name - downloads = Download.validate_download_list @downloads_sample_data - - assert_equal 1, downloads.size - assert_equal @downloads_sample_data[0][:name], downloads[0][:name] - end - - should "Only set total_downloads if the value is integer" do - download = Download.new(@downloads_sample_data.last) - - download.total_downloads = "456" - assert_not_equal 456, download.total_downloads - - download.total_downloads = 456 - assert_equal 456, download.total_downloads - end -end diff --git a/src/software_communities/test/unit/library_helper_test.rb b/src/software_communities/test/unit/library_helper_test.rb deleted file mode 100644 index 28e58e3..0000000 --- a/src/software_communities/test/unit/library_helper_test.rb +++ /dev/null @@ -1,53 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' - -class LibraryHelperTest < ActiveSupport::TestCase - - def setup - @license_objects = [ - {"name" => "license1" ,"version" => "2.0", "license" => "debian", "software_id" => "1"}, - {"name" => "license2" ,"version" => "2.1", "license" => "debian", "software_id" => "1"}, - {"name" => "license3" ,"version" => "2.2", "license" => "debian", "software_id" => "1"}] - end - - def teardown - @license_objects = nil - end - - should "return an empty list" do - empty_list = [] - assert_equal [],LibraryHelper.list_library(empty_list) - end - - should "return a list with current library objects" do - list_compare = [] - lib_table = LibraryHelper.list_library(@license_objects) - assert_equal list_compare.class, lib_table.class - end - - should "have same information from the list passed as parameter" do - list_compare = LibraryHelper.list_library(@license_objects) - assert_equal @license_objects.first[:name], list_compare.first.name - end - - should "return a list with the same size of the parameter" do - list_compare = LibraryHelper.list_library(@license_objects) - assert_equal @license_objects.count, list_compare.count - end - - should "return false if list_database are empty or null" do - list_compare = [] - assert_equal true, LibraryHelper.valid_list_library?(list_compare) - end - - should "return a html text with license name equals to linux" do - libraries = [] - - library_description = Library.new - library_description.name = "Lib" - - libraries << library_description - lib_table = LibraryHelper.libraries_as_tables(libraries) - - assert_not_nil lib_table.first.call.index("lib") - end -end diff --git a/src/software_communities/test/unit/library_validation_test.rb b/src/software_communities/test/unit/library_validation_test.rb deleted file mode 100644 index f45cc9e..0000000 --- a/src/software_communities/test/unit/library_validation_test.rb +++ /dev/null @@ -1,49 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' - -class LibraryValidationTest < ActiveSupport::TestCase - - def setup - @library = Library.new - @library.name = "name" - @library.version = "version" - @library.license = "license" - end - - def teardown - @Libray = nil - end - - should "Save Libray if all fields are filled" do - assert @library.save - end - - should "Don't save Library of name are not filed" do - @library.name = "" - assert !@library.save - end - - should "Don't save Library of version are not filed" do - @library.version = "" - assert !@library.save - end - - should "Don't save Library of license are not filed" do - @library.license = "" - assert !@library.save - end - - should "Don't save Library if name is too long" do - @library.name = "A too long name to be a valid name for library" - assert !@library.save - end - - should "Don't save Library if version is too long" do - @library.version = "A too long version to be a valid version for library" - assert !@library.save - end - - should "Don't save Library if license is too long" do - @library.license = "A too long license to be a valid license for library" - assert !@library.save - end -end diff --git a/src/software_communities/test/unit/operating_system_helper_test.rb b/src/software_communities/test/unit/operating_system_helper_test.rb deleted file mode 100644 index 8b2e506..0000000 --- a/src/software_communities/test/unit/operating_system_helper_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' - -OperatingSystemName.create(:name=>"Debina") -OperatingSystemName.create(:name=>"Fedora") -OperatingSystemName.create(:name=>"CentOS") - -class OperatingSystemHelperTest < ActiveSupport::TestCase - - def setup - @operating_system_objects = [ - {:operating_system_name_id => "1" ,:version => "2.0"}, - {:operating_system_name_id => "2" ,"version" => "2.1"}, - {:operating_system_name_id => "3" ,"version" => "2.2"} - ] - @operating_system_objects - end - - def teardown - @operating_system_objects = nil - end - - should "return an empty list" do - empty_list = [] - assert_equal [],OperatingSystemHelper.list_operating_system(empty_list) - end - - should "return a list with current OperatingSystems" do - list_compare = [] - list_op = OperatingSystemHelper.list_operating_system(@operating_system_objects) - assert_equal list_compare.class, list_op.class - end - - should "have same information from the list passed as parameter" do - list_compare = OperatingSystemHelper.list_operating_system(@operating_system_objects) - first_operating = @operating_system_objects.first[:operating_system_name_id] - assert_equal first_operating, list_compare.first.operating_system_name_id.to_s - end - - should "return a list with the same size of the parameter" do - list_compare = OperatingSystemHelper.list_operating_system(@operating_system_objects) - assert_equal @operating_system_objects.count, list_compare.count - end - - should "return false if list_operating_system are empty or null" do - list_compare = [] - assert_equal false,OperatingSystemHelper.valid_list_operating_system?(list_compare) - end - - should "return a html text with operating system" do - operating_systems = [] - - operating_system = OperatingSystemName.new - operating_system.name = "teste" - - software_operating_system = OperatingSystem.new - software_operating_system.version = 2 - software_operating_system.operating_system_name = operating_system - - operating_systems << software_operating_system - op_table = OperatingSystemHelper.operating_system_as_tables(operating_systems) - - assert_not_nil op_table.first.call.index(OperatingSystemName.first.name) - end -end diff --git a/src/software_communities/test/unit/operating_system_validation_test.rb b/src/software_communities/test/unit/operating_system_validation_test.rb deleted file mode 100644 index 1f4a42b..0000000 --- a/src/software_communities/test/unit/operating_system_validation_test.rb +++ /dev/null @@ -1,34 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' - -class OperatingSystemValidationTest < ActiveSupport::TestCase - - def setup - operating_system_name = OperatingSystemName::new :name=>"Linux" - @operating_system = OperatingSystem::new :version=>"3.0" - @operating_system.operating_system_name = operating_system_name - @operating_system - end - - def teardown - @operating_system.destroy - end - - should "save OperatingSystem if all fields are filled" do - assert_equal true, @operating_system.save - end - - should "not save if OperatingSystem does not have version" do - @operating_system.version = " " - assert_equal false, @operating_system.save - end - - should "not save if OperatingSystem does not have operating_system_name" do - @operating_system.operating_system_name = nil - assert_equal false, @operating_system.save - end - - should "not save if OperatingSystem have a version too long" do - @operating_system.version = "A too long version to be a valid" - assert_equal false, @operating_system.save - end -end diff --git a/src/software_communities/test/unit/repository_block_test.rb b/src/software_communities/test/unit/repository_block_test.rb deleted file mode 100644 index 2580e79..0000000 --- a/src/software_communities/test/unit/repository_block_test.rb +++ /dev/null @@ -1,19 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' - -class RepositoryBlockTest < ActiveSupport::TestCase - include PluginTestHelper - - should 'inherit from Block' do - assert_kind_of Block, RepositoryBlock.new - end - - should 'declare its default title' do - RepositoryBlock.any_instance.stubs(:profile_count).returns(0) - assert_equal Block.new.default_title, RepositoryBlock.new.default_title - end - - should 'describe itself' do - assert_not_equal Block.description, RepositoryBlock.description - end -end diff --git a/src/software_communities/test/unit/search_catalog_block_test.rb b/src/software_communities/test/unit/search_catalog_block_test.rb deleted file mode 100644 index 64376ef..0000000 --- a/src/software_communities/test/unit/search_catalog_block_test.rb +++ /dev/null @@ -1,19 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' - -class SearchCatalogBlockTest < ActiveSupport::TestCase - include PluginTestHelper - should 'inherit from Block' do - assert_kind_of Block, SearchCatalogBlock.new - end - - should 'declare its default title' do - SearchCatalogBlock.any_instance.stubs(:profile_count).returns(0) - assert_equal Block.new.default_title, SearchCatalogBlock.new.default_title - end - - should 'describe itself' do - assert_not_equal Block.description, SearchCatalogBlock.description - end - -end diff --git a/src/software_communities/test/unit/search_helper_test.rb b/src/software_communities/test/unit/search_helper_test.rb deleted file mode 100644 index f9a38f8..0000000 --- a/src/software_communities/test/unit/search_helper_test.rb +++ /dev/null @@ -1,53 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../../lib/ext/search_helper.rb' - -class SearchHelperTest < ActiveSupport::TestCase - - include SearchHelper - - should "return communities list with relevance by nickname" do - communities_list = [] - communities_list << Community.create(:name => "Help One", :nickname => "need") - communities_list << Community.create(:name => "Need Two", :nickname => "help") - communities_list << Community.create(:name => "Help Three", :nickname => "need") - communities_list << Community.create(:name => "Need Four", :nickname => "help") - - relevanced_list = sort_by_relevance(communities_list, "need") { |community| [community.nickname] } - - assert_equal relevanced_list[0].nickname, "need" - assert_equal relevanced_list[1].nickname, "need" - assert_equal relevanced_list[2].nickname, "help" - assert_equal relevanced_list[3].nickname, "help" - end - - should "return communities list with relevance by name" do - communities_list = [] - communities_list << Community.create(:name => "Help One", :nickname => "need") - communities_list << Community.create(:name => "Need Two", :nickname => "help") - communities_list << Community.create(:name => "Help Three", :nickname => "need") - communities_list << Community.create(:name => "Need Four", :nickname => "help") - - relevanced_list = sort_by_relevance(communities_list, "need") { |community| [community.name] } - - assert relevanced_list[0].name.include?("Need") - assert relevanced_list[1].name.include?("Need") - assert relevanced_list[2].name.include?("Help") - assert relevanced_list[3].name.include?("Help") - end - - should "return communities list with relevance by nickname first and custom_header second" do - communities_list = [] - communities_list << Community.create(:name => "Help One", :nickname => "need", :custom_header => "help") - communities_list << Community.create(:name => "Need Two", :nickname => "help", :custom_header => "need") - communities_list << Community.create(:name => "Help Three", :nickname => "need", :custom_header => "help") - communities_list << Community.create(:name => "Need Four", :nickname => "help", :custom_header => "help") - - relevanced_list = sort_by_relevance(communities_list, "need") { |community| [community.custom_header, community.nickname] } - - assert relevanced_list[0].nickname.include?("need") - assert relevanced_list[1].nickname.include?("need") - assert relevanced_list[2].custom_header.include?("need") - assert relevanced_list[3].custom_header.include?("help") - end - -end diff --git a/src/software_communities/test/unit/software_communities_person_test.rb b/src/software_communities/test/unit/software_communities_person_test.rb deleted file mode 100644 index 3db9473..0000000 --- a/src/software_communities/test/unit/software_communities_person_test.rb +++ /dev/null @@ -1,39 +0,0 @@ -# encoding: utf-8 - -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' - -class GovUserPluginPersonTest < ActiveSupport::TestCase - include PluginTestHelper - - def setup - @plugin = SoftwareCommunitiesPlugin.new - - @user = fast_create(User) - @person = create_person( - "My Name", - "user@email.com", - "123456", - "123456", - "Any State", - "Some City" - ) - end - - def teardown - @plugin = nil - end - - should 'get a list of softwares of a person' do - software1 = create_software_info "noosfero" - software2 = create_software_info "colab" - community = create_community "simple_community" - - software1.community.add_member @person - software1.save! - community.add_member @person - community.save! - - assert_equal 1, @person.softwares.count - end -end diff --git a/src/software_communities/test/unit/software_database_test.rb b/src/software_communities/test/unit/software_database_test.rb deleted file mode 100644 index c73a359..0000000 --- a/src/software_communities/test/unit/software_database_test.rb +++ /dev/null @@ -1,35 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' - -class SoftwareDatabaseTest < ActiveSupport::TestCase - def setup - DatabaseDescription.create!(name: "PostgreSQL") - @software_database = SoftwareDatabase.new( - :version => "1.0" - ) - @software_database.database_description_id = 1 - end - - def teardown - DatabaseDescription.destroy_all - SoftwareDatabase.destroy_all - end - - should "save if all informations of @software_database are filled" do - assert @software_database.save, "Database should have been saved" - end - - should "not save if database description id is empty" do - @software_database.database_description_id = nil - assert !@software_database.save, "Database description must be filled" - end - - should "not save if version is empty" do - @software_database.version = nil - assert !@software_database.save, "Version must be filled" - end - - should "not save if version has more than 20 characters" do - @software_database.version = "a"*21 - assert !@software_database.save, "Version must have until 20 characters" - end -end diff --git a/src/software_communities/test/unit/software_helper_test.rb b/src/software_communities/test/unit/software_helper_test.rb deleted file mode 100644 index cddadea..0000000 --- a/src/software_communities/test/unit/software_helper_test.rb +++ /dev/null @@ -1,20 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' - -class SoftwareHelperTest < ActiveSupport::TestCase - - include SoftwareHelper - - should "Create ProgrammingLanguages based on file with languages names" do - ProgrammingLanguage.delete_all - PATH_TO_FILE = "plugins/software_communities/public/static/languages.txt" - - SoftwareHelper.create_list_with_file(PATH_TO_FILE, ProgrammingLanguage) - - list = File.open(PATH_TO_FILE, "r") - count = list.readlines.count - list.close - - assert(ProgrammingLanguage.count == count) - end - -end diff --git a/src/software_communities/test/unit/software_info_test.rb b/src/software_communities/test/unit/software_info_test.rb deleted file mode 100644 index 930436c..0000000 --- a/src/software_communities/test/unit/software_info_test.rb +++ /dev/null @@ -1,44 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' - -class SoftwareInfoValidationTest < ActiveSupport::TestCase - - include PluginTestHelper - - should "Return original license_info when license is not 'Another'" do - @software_info = create_software_info("software_test") - @license_info = create_license_info("license_test") - - @software_info.license_info = @license_info - @software_info.save! - - assert_equal @software_info.license_info, @license_info - end - - should "Return license_info with nil id when license is 'Another'" do - @software_info = create_software_info("software_test") - @license_another = create_license_info("Another") - - @software_info.license_info = @license_another - @software_info.save! - - assert_equal @software_info.license_info_id, @license_another.id - assert_equal @software_info.license_info.id, nil - end - - should "Return fake license_info when call method another_license" do - @software_info = create_software_info("software_test") - @license_another = create_license_info("Another") - - another_license_version = "Another Version" - another_license_link = "#another_link" - - @software_info.another_license(another_license_version, another_license_link) - - assert_equal @software_info.license_info_id, @license_another.id - assert_equal @software_info.license_info.id, nil - assert_equal @software_info.license_info.version, another_license_version - assert_equal @software_info.license_info.link, another_license_link - end - -end \ No newline at end of file diff --git a/src/software_communities/test/unit/software_info_validation_test.rb b/src/software_communities/test/unit/software_info_validation_test.rb deleted file mode 100644 index e42bf9b..0000000 --- a/src/software_communities/test/unit/software_info_validation_test.rb +++ /dev/null @@ -1,121 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' - -class SoftwareInfoValidationTest < ActiveSupport::TestCase - - def setup - @community = fast_create( - Community, - :identifier => 'new-software', - :name => 'New Software' - ) - - @language = ProgrammingLanguage.new(:name => 'C++') - @language.save - @software_language = SoftwareLanguage.new( - :version => '1' - ) - @software_language.programming_language = @language - @software_language.save - - @database = DatabaseDescription.new(:name => 'Oracle') - @database.save - @software_database = SoftwareDatabase.new( - :version => '2' - ) - @software_database.database_description = @database - @software_database.save - - @operating_system_name = OperatingSystemName.new(:name => 'Debian') - @operating_system_name.save - @operating_system = OperatingSystem.new(:version => '1.0') - @operating_system.operating_system_name = @operating_system_name - @operating_system.save - - @software_info = SoftwareInfo.new( - :acronym => "SFTW", - :e_mag => true, - :icp_brasil => true, - :intern => true, - :e_ping => true, - :e_arq => true, - :operating_platform => true, - :objectives => "", - :features => "", - :finality => "something" - ) - @software_info.software_languages << @software_language - @software_info.software_databases << @software_database - @software_info.operating_systems << @operating_system - - @software_info.features = "Do a lot of things" - @software_info.objectives = "All tests should pass !" - end - - def teardown - ProgrammingLanguage.destroy_all - SoftwareLanguage.destroy_all - DatabaseDescription.destroy_all - SoftwareDatabase.destroy_all - OperatingSystem.destroy_all - OperatingSystemName.destroy_all - SoftwareInfo.destroy_all - end - - should 'Save SoftwareInfo if all fields are filled' do - assert_equal true, @software_info.save - end - - should 'Save SoftwareInfo if operating_platform is blank' do - @software_info.operating_platform = '' - assert_equal true, @software_info.save - end - - should 'Save SoftwareInfo without demonstration_url be filled' do - @software_info.demonstration_url = '' - assert_equal true, @software_info.save - end - - should "Save SoftwareInfo if acronym is blank" do - @software_info.acronym = "" - - assert_equal true, @software_info.save - end - - should "Not save SoftwareInfo if acronym has more than 8 characters" do - @software_info.acronym = "12345678901" - assert_equal false, @software_info.save - end - - should "Save SoftwareInfo if acronym has whitespaces" do - @software_info.acronym = "AC DC" - assert_equal false, @software_info.save - end - - should "Save if objectives are empty" do - @software_info.objectives = "" - - assert_equal true, @software_info.save - end - - should "Save if features are empty" do - @software_info.features = "" - - assert_equal true, @software_info.save - end - - should "Not save if features are longer than 4000" do - @software_info.features = "a"*4001 - error_msg = _("Features is too long (maximum is 4000 characters)") - - assert_equal false, @software_info.save - assert_equal true, @software_info.errors.full_messages.include?(error_msg) - end - - should "Not save if objectives are longer than 4000" do - @software_info.objectives = "a"*4001 - error_msg = _("Objectives is too long (maximum is 4000 characters)") - - assert_equal false, @software_info.save - assert_equal true, @software_info.errors.full_messages.include?(error_msg) - end -end diff --git a/src/software_communities/test/unit/software_language_helper_test.rb b/src/software_communities/test/unit/software_language_helper_test.rb deleted file mode 100644 index 9465f91..0000000 --- a/src/software_communities/test/unit/software_language_helper_test.rb +++ /dev/null @@ -1,60 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' - -class SoftwareLanguageHelperTest < ActiveSupport::TestCase - - def setup - pl1 = ProgrammingLanguage.create(:name => "Python") - pl2 = ProgrammingLanguage.create(:name => "Java") - - @software_language_objects = [ - {:programming_language_id => pl1.id.to_s ,:version => "2.0"}, - {:programming_language_id => pl2.id.to_s ,:version => "2.1"}, - {:programming_language_id => pl1.id.to_s ,:version => "2.2"}] - @software_language_objects - end - - def teardown - @software_language_objects = nil - ProgrammingLanguage.destroy_all - end - - should "return an empty list" do - empty_list = [] - assert_equal [], SoftwareLanguageHelper.list_language(empty_list) - end - - should "return a list with current software language objects" do - list_compare = [] - softwares = SoftwareLanguageHelper.list_language(@software_language_objects) - assert_equal list_compare.class, softwares.class - end - - should "have same information from the list passed as parameter" do - list_compare = SoftwareLanguageHelper.list_language(@software_language_objects) - lang_id = @software_language_objects.first[:programming_language_id].to_i - - assert_equal lang_id, list_compare.first.programming_language_id - end - - should "return a list with the same size of the parameter" do - list_compare = SoftwareLanguageHelper.list_language(@software_language_objects) - assert_equal @software_language_objects.count, list_compare.count - end - - should "return false if list_language are empty or null" do - list_compare = [] - assert_equal false,SoftwareLanguageHelper.valid_list_language?(list_compare) - end - - should "remove invalid tables from the list" do - @software_language_objects.push({ - :programming_language_id => "I'm not a valid id", - :version => "2.0" - }) - - software_language_objects_length = @software_language_objects.count - list_compare = SoftwareLanguageHelper.list_language(@software_language_objects) - - assert_equal software_language_objects_length-1, list_compare.count - end -end diff --git a/src/software_communities/test/unit/software_language_validation.rb b/src/software_communities/test/unit/software_language_validation.rb deleted file mode 100644 index 8a1b21d..0000000 --- a/src/software_communities/test/unit/software_language_validation.rb +++ /dev/null @@ -1,69 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' - -class SoftwareLanguageValidationTest < ActiveSupport::TestCase - def setup - create_programming_language - @software_info = create_software_info - @software_info.save - end - - def teardown - @software_info = nil - SoftwareInfo.destroy_all - end - - should "Save SoftwareLanguage if version and prog_language are filled" do - @software_language = create_software_language - assert_equal true, @software_language.save - end - - should "Don't save SoftwareLanguage if programming_language is not filed" do - @software_language = create_software_language - @software_language.programming_language = nil - assert_equal true, !@software_language.save - end - - should "Don't save SoftwareLanguage if version is not filed" do - @software_language = create_software_language - @software_language.version = "" - assert_equal true, !@software_language.save - end - - should "Don't save SoftwareLanguage if version is too long" do - @software_language = create_software_language - @software_language.version = "A too long version to be valid as a version" - assert_equal true, !@software_language.save - end - - private - - def create_software_language - software_language = SoftwareLanguage.new - software_language.software_info = @software_info - software_language.programming_language = ProgrammingLanguage.last - software_language.version = "version" - software_language - end - - def create_software_info - software_info = SoftwareInfo.new - software_info.community_id = fast_create(Community).id - software_info.community.name = 'Noosfero' - software_info.e_mag = true - software_info.icp_brasil = true - software_info.intern = true - software_info.e_ping = true - software_info.e_arq = true - software_info.operating_platform = 'GNU/Linux' - software_info.features = "Do a lot of things" - software_info.objectives = "All tests should pass !" - software_info - end - - def create_programming_language - ProgrammingLanguage.create(:name=>"C") - ProgrammingLanguage.create(:name=>"C++") - ProgrammingLanguage.create(:name=>"Ruby") - ProgrammingLanguage.create(:name=>"Python") - end -end diff --git a/src/software_communities/test/unit/software_license_info_test.rb b/src/software_communities/test/unit/software_license_info_test.rb deleted file mode 100644 index 81ab2ee..0000000 --- a/src/software_communities/test/unit/software_license_info_test.rb +++ /dev/null @@ -1,29 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' - -class SoftwareDatabaseTest < ActiveSupport::TestCase - - should "save if all informations are filled" do - @software_license_info = LicenseInfo.create( - :version => "GPL", - :link => "www.gpl2.com" - ) - assert @software_license_info.save!, "License Info should have been saved" - end - - should "not save if license info version is empty" do - @software_license_info = LicenseInfo.create( - :version => "GPL", - :link => "www.gpl2.com" - ) - @software_license_info.version = nil - assert !@software_license_info.save, "Version can't be blank" - end - - should "save if link is empty" do - @software_license_info = LicenseInfo.create( - :version => "GPL", - :link => "www.gpl2.com") - @software_license_info.link = nil - assert @software_license_info.save, "License info should have been saved" - end -end diff --git a/src/software_communities/test/unit/software_registration_test.rb b/src/software_communities/test/unit/software_registration_test.rb deleted file mode 100644 index 397adf7..0000000 --- a/src/software_communities/test/unit/software_registration_test.rb +++ /dev/null @@ -1,42 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' - -class SoftwareRegistrationTest < ActiveSupport::TestCase - - def setup - @environment = Environment.default - @environment.enable_plugin(SoftwareCommunitiesPlugin) - end - - def teardown - Community.destroy_all - SoftwareInfo.destroy_all - Task.destroy_all - end - - should 'include software registration task if is admin' do - person = create_user('molly').person - @environment.add_admin(person) - task = CreateSoftware.create!( - :name => "Teste One", - :requestor => person, - :environment => @environment - ) - assert_equal [task], Task.to(person).pending - end - - should 'create software when admin accept software create task' do - person = create_user('Pedro').person - @environment.add_admin(person) - task = CreateSoftware.create!( - :name => "Teste Two", - :requestor => person, - :environment => @environment, - :finality => "something" - ) - - software_count = SoftwareInfo.count - task.finish - - assert_equal software_count+1, SoftwareInfo.count - end -end diff --git a/src/software_communities/test/unit/software_tab_data_block_test.rb b/src/software_communities/test/unit/software_tab_data_block_test.rb deleted file mode 100644 index aad8c8c..0000000 --- a/src/software_communities/test/unit/software_tab_data_block_test.rb +++ /dev/null @@ -1,66 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' - -class SoftwareTabDataBlockTest < ActiveSupport::TestCase - include PluginTestHelper - - def setup - @software_info = create_software_info("A new Software") - @software_info.save! - - @soft_community = @software_info.community - - @soft_community.blogs << Blog.new(:name=>"First blog") - @soft_community.blogs << Blog.new(:name=>"Second blog") - @soft_community.save! - - SoftwareTabDataBlock.any_instance.stubs(:owner).returns(@soft_community) - end - - should "get its owner blogs" do - assert_equal @soft_community.blogs, SoftwareTabDataBlock.new.blogs - end - - should "actual_blog get the first blog if it is not defined" do - assert_equal @soft_community.blogs.first, SoftwareTabDataBlock.new.actual_blog - end - - should "actual_blog get the defined community blog" do - last_blog = @soft_community.blogs.last - soft_tab_data = create_software_tab_data_block(last_blog) - - assert_equal last_blog, soft_tab_data.actual_blog - end - - should "get the actual_blog posts" do - last_blog = @soft_community.blogs.last - soft_tab_data = create_software_tab_data_block(last_blog) - craete_sample_posts(last_blog, 2) - - assert_equal last_blog.posts.first.id, soft_tab_data.posts.first.id - assert_equal last_blog.posts.last.id, soft_tab_data.posts.last.id - end - - should "limit the number of posts" do - last_blog = @soft_community.blogs.last - soft_tab_data = create_software_tab_data_block(last_blog) - craete_sample_posts(last_blog, 6) - - assert_equal SoftwareTabDataBlock::TOTAL_POSTS_DYSPLAYED, soft_tab_data.posts.count - end - - private - - def create_software_tab_data_block blog - soft_tab_data = SoftwareTabDataBlock.new - soft_tab_data.displayed_blog = blog.id - soft_tab_data - end - - def craete_sample_posts blog, quantity=1 - quantity.times do |number| - TinyMceArticle.create! :name=>"Simple post #{number}", :body=>"Simple post #{number}", - :parent=> blog, :profile=>@soft_community - end - end -end diff --git a/src/software_communities/test/unit/softwares_block_test.rb b/src/software_communities/test/unit/softwares_block_test.rb deleted file mode 100644 index 44b5064..0000000 --- a/src/software_communities/test/unit/softwares_block_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' - -class SoftwaresBlockTest < ActiveSupport::TestCase - include PluginTestHelper - should 'inherit from ProfileListBlock' do - assert_kind_of ProfileListBlock, SoftwaresBlock.new - end - - should 'declare its default title' do - SoftwaresBlock.any_instance.stubs(:profile_count).returns(0) - assert_not_equal ProfileListBlock.new.default_title, SoftwaresBlock.new.default_title - end - - should 'describe itself' do - assert_not_equal ProfileListBlock.description, SoftwaresBlock.description - end - - should 'give empty footer on unsupported owner type' do - block = SoftwaresBlock.new - block.expects(:owner).returns(1) - assert_equal '', block.footer - end - - should 'list softwares' do - user = create_person("Jose_Augusto", - "jose_augusto@email.com", - "aaaaaaa", - "aaaaaaa", - "DF", - "Gama" - ) - - software_info = create_software_info("new software") - software_info.community.add_member(user) - - block = SoftwaresBlock.new - block.expects(:owner).at_least_once.returns(user) - - assert_equivalent [software_info.community], block.profiles - end - -end diff --git a/src/software_communities/views/_main_software_editor_extras.html.erb b/src/software_communities/views/_main_software_editor_extras.html.erb deleted file mode 100644 index 942256d..0000000 --- a/src/software_communities/views/_main_software_editor_extras.html.erb +++ /dev/null @@ -1,32 +0,0 @@ -

    <%= _('Software Information') %>

    - -<%= label_tag("name", _('Name'), {:class => 'formlabel'}) %> - -
    - <%= context.profile.environment.default_hostname %>/ - <%= text_field_tag(:name, context.profile.software_info.community.name) %> -
    - -

    <%= _("Finality") %>

    -
    - <%= text_field_tag(:finality, context.profile.software_info.finality) %> -
    - -

    <%= _("Licenses") %>

    -
    - <%= select_tag(:id, options_for_select(LicenseHelper.getListLicenses.collect{|l| [l.version, l.id]}, :selected => context.profile.software_info.license_info.id), :onchange => "get_license_link('version')") %> -
    - -

    <%= _("License link") %>

    - <% LicenseHelper.getListLicenses.each do | license | %> - - <% end %> - - <%= context.profile.software_info.license_info.link %> -
    - -
    - <%= label_tag "repository_url", _("Link to Repository: ") %> - <%= text_field_tag(:reository_url) %> -
    - diff --git a/src/software_communities/views/blocks/_software_tab_blog.html.erb b/src/software_communities/views/blocks/_software_tab_blog.html.erb deleted file mode 100644 index ec1f867..0000000 --- a/src/software_communities/views/blocks/_software_tab_blog.html.erb +++ /dev/null @@ -1,17 +0,0 @@ -
    -
    - <% if block.posts.empty? %> -
    - <%= _("This community has no posts in its blog") %> -
    - <% else %> -
    - <%= list_posts(block.posts, format: "short+pic", paginate: false) %> -
    - -
    - <%= link_to _("Read more"), block.actual_blog.url %> -
    - <% end %> -
    -
    diff --git a/src/software_communities/views/blocks/categories_and_tags.html.erb b/src/software_communities/views/blocks/categories_and_tags.html.erb deleted file mode 100644 index 507ddbf..0000000 --- a/src/software_communities/views/blocks/categories_and_tags.html.erb +++ /dev/null @@ -1,19 +0,0 @@ -<% if block.owner.categories.count > 0 %> -

    <%= _("Categories:") %>

    - -
    - <% block.owner.categories.each do |category| %> - <%= link_to category.name , category.path, :id => "select-category-1-link", :class => "select-subcategory-link", :target => "_blank" %> - <% end %> -
    -<% end %> - -<% if block.owner.tag_list.count > 0 %> -

    <%= _("Tags") %>

    - -
    - <% block.owner.tag_list.each do |tag| %> - <%= link_to tag , "#", :id => "select-category-1-link", :class => "select-subcategory-link"%> - <% end %> -
    -<% end %> \ No newline at end of file diff --git a/src/software_communities/views/blocks/categories_software.html.erb b/src/software_communities/views/blocks/categories_software.html.erb deleted file mode 100644 index 6e914de..0000000 --- a/src/software_communities/views/blocks/categories_software.html.erb +++ /dev/null @@ -1,22 +0,0 @@ -
    -
    - -

    <%= _("See more Software") %>

    -
    - -
    -

    <%= _("Categories:") %>

    -
      - - <% categories.each do |category| %> - <% unless category.software_infos.count < 1 %> -
    • <%= link_to _("#{category.name}") + " (#{category.software_infos.count})", {:controller => :search, :action => :software_infos, :selected_categories_id => [category.id]} %>
    • - <% end %> - <% end %> -
    -
    - - -
    diff --git a/src/software_communities/views/blocks/download.html.erb b/src/software_communities/views/blocks/download.html.erb deleted file mode 100644 index ffab889..0000000 --- a/src/software_communities/views/blocks/download.html.erb +++ /dev/null @@ -1,25 +0,0 @@ -<% if block.owner.software_info.nil? %> - <%= _("This community needs a software to use this block") %> -<% else %> -

    <%= _("Download #{block.owner.software_info.community.name}") %>

    -
      - <% block.downloads.each_with_index do |download, index| %> -
    • -
      - <%= link_to :controller => 'software_communities_plugin_profile', :action=> 'download_file', :block=>block.id, :download_index=> index , title: _("Download the software") do %> - - <%= download[:size] %> - <% end %> -
      -
      - <%= _("#{download[:name]}") %> - <%= _("Platform:#{download[:software_description]}") %> - <%= link_to _("Minimum Requirements"), download[:minimum_requirements] %> -
      -
    • - <% end %> -
    -
    - <%= link_to _("License: #{block.owner.software_info.license_info.version}"), block.owner.software_info.license_info.link %> -
    -<% end %> diff --git a/src/software_communities/views/blocks/main_area_softwares.html.erb b/src/software_communities/views/blocks/main_area_softwares.html.erb deleted file mode 100644 index 155a021..0000000 --- a/src/software_communities/views/blocks/main_area_softwares.html.erb +++ /dev/null @@ -1,27 +0,0 @@ -<%= block_title(block.title) %> -<% profiles.each do |profile| %> - <%= link_to profile.url do %> -
    -
    - - -
    -
    -

    <%=profile.name%>

    -
    -
    <%= profile.description %>
    -
    -
    - -
    -

    - <%= profile.software_info.finality %> -

    - - <%= _("See More") %> -
    -
    - <% end %> -<% end %> diff --git a/src/software_communities/views/blocks/repository.html.erb b/src/software_communities/views/blocks/repository.html.erb deleted file mode 100644 index dd9817d..0000000 --- a/src/software_communities/views/blocks/repository.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -<% if block.owner.software_info.nil? %> - <%= _("This community needs a software to use this block") %> -<% else %> - <%= link_to _("Repository") , block.owner.software_info.repository_link, :id => "bt_repositorio", :target => "_blank" %> -<% end %> diff --git a/src/software_communities/views/blocks/search_catalog.html.erb b/src/software_communities/views/blocks/search_catalog.html.erb deleted file mode 100644 index 2ea3ffc..0000000 --- a/src/software_communities/views/blocks/search_catalog.html.erb +++ /dev/null @@ -1,11 +0,0 @@ - diff --git a/src/software_communities/views/blocks/software_highlights.html.erb b/src/software_communities/views/blocks/software_highlights.html.erb deleted file mode 100644 index fc1e650..0000000 --- a/src/software_communities/views/blocks/software_highlights.html.erb +++ /dev/null @@ -1,20 +0,0 @@ -<%= render :file => 'blocks/highlights.html.erb', :locals => { :block => block } %> - - - -mais informações - -? - - diff --git a/src/software_communities/views/blocks/software_information.html.erb b/src/software_communities/views/blocks/software_information.html.erb deleted file mode 100644 index dd82bea..0000000 --- a/src/software_communities/views/blocks/software_information.html.erb +++ /dev/null @@ -1,36 +0,0 @@ -
    - -<% if block.owner.software_info.nil? %> - <%= _("This community needs a software to use this block") %> -<% else %> - - - - - -
    -
    -
    - - <%= link_to profile_image(block.owner, :big) +"\n", profile.url %> - - -
    -
    -
    -

    - <%= _("#{block.owner.software_info.acronym} - ") unless block.owner.software_info.acronym.blank? %> - <%= _("#{block.owner.name}") %> -

    - - <%= block.owner.software_info.finality %> - - - <%= @plugins.dispatch(:display_organization_average_rating, block.owner).collect { |content| instance_exec(&content) }.join("") %> -
    -<% end %> -
    diff --git a/src/software_communities/views/blocks/software_statistics.html.erb b/src/software_communities/views/blocks/software_statistics.html.erb deleted file mode 100644 index b9f1cd1..0000000 --- a/src/software_communities/views/blocks/software_statistics.html.erb +++ /dev/null @@ -1,36 +0,0 @@ -
    -
      -
    • - - - <%= pluralize(profile.hits, 'visita', 'visitas') %> - -
    • -
    • - - - <%= pluralize(total_downloads, 'download', 'downloads') %> - -
    • -
    • - - - <%= block.benefited_people.to_s + _(' benefited people*') %> - -
    • -
    • - - - - <%= number_to_currency(block.saved_resources, unit: 'R$ ', - separator: ',', delimiter: '.') %> - - <%= _(' saved resources*') %> - -
    • -
    - -
    - * <%= _("Data estimated by the software administrator.") %> -
    -
    diff --git a/src/software_communities/views/blocks/software_tab_data.html.erb b/src/software_communities/views/blocks/software_tab_data.html.erb deleted file mode 100644 index 3b0a1ce..0000000 --- a/src/software_communities/views/blocks/software_tab_data.html.erb +++ /dev/null @@ -1,13 +0,0 @@ -<% if block.owner.software_info.nil? %> - <%= _("This community needs a software to use this block") %> -<% else %> -
    - <% tabs = [] %> - <% tabs << {:title => _("Discussions"), :id => 'discussions-tab', :content => ""} %> - <% tabs << {:title => _("Blog"), :id => 'blog-tab', :content => (render partial: "blocks/software_tab_blog", :locals => {block: block})} %> - <% tabs << {:title => _("Repository Feed"), :id => 'repository-feed-tab', :content => ""} %> - - <%= render_tabs(tabs) %> -
    -<% end %> - diff --git a/src/software_communities/views/blocks/wiki.html.erb b/src/software_communities/views/blocks/wiki.html.erb deleted file mode 100644 index 24cda6f..0000000 --- a/src/software_communities/views/blocks/wiki.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -<% if block.owner.software_info.nil? %> - <%= _("This community needs a software to use this block") %> -<% else %> - <%= link_to _("Wiki") , block.wiki_link, :id => "bt_wiki", :target => "_blank" %> -<% end %> - diff --git a/src/software_communities/views/box_organizer/_download_block.html.erb b/src/software_communities/views/box_organizer/_download_block.html.erb deleted file mode 100644 index 6a621ec..0000000 --- a/src/software_communities/views/box_organizer/_download_block.html.erb +++ /dev/null @@ -1,17 +0,0 @@ -
    - - -
    - <% @block.downloads.each do |download| %> - <%= render :partial => 'download_list', :locals => {:download => download} %> - <% end %> -
    - - <%= link_to_function _('New link'), 'softwareDownload.addNewDonwload(); return false', :class => 'button icon-add with-text download-new-link-button' %> -
    diff --git a/src/software_communities/views/box_organizer/_download_list.html.erb b/src/software_communities/views/box_organizer/_download_list.html.erb deleted file mode 100644 index 1cbd524..0000000 --- a/src/software_communities/views/box_organizer/_download_list.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -
  • -
      -
    • <%= text_field_tag('block[downloads][][name]', download[:name], :class => "block_download_name") %>
    • -
    • <%= text_field_tag('block[downloads][][link]', download[:link], :class => "block_download_link") %>
    • -
    • <%= text_field_tag('block[downloads][][software_description]', download[:software_description], :class => "block_download_software_description") %>
    • -
    • <%= text_field_tag('block[downloads][][minimum_requirements]', download[:minimum_requirements], :class => "block_download_minimum_requirements") %>
    • -
    • <%= text_field_tag('block[downloads][][size]', download[:size], :class => "block_download_size") %>
    • -
    • <%= button_without_text(:delete, _('Delete'), "#" , { :onclick => 'softwareDownload.deleteDownload(this); return false', :class=>"delete-link-list-row" }) %>
    • -
    -
  • diff --git a/src/software_communities/views/box_organizer/_download_list_template.html.erb b/src/software_communities/views/box_organizer/_download_list_template.html.erb deleted file mode 100644 index eb9e4cf..0000000 --- a/src/software_communities/views/box_organizer/_download_list_template.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -
  • -
      -
    • <%= text_field_tag('block[downloads][][name]', '', :class => "block_download_name") %>
    • -
    • <%= text_field_tag('block[downloads][][link]', '', :class => "block_download_link") %>
    • -
    • <%= text_field_tag('block[downloads][][software_description]', '', :class => "block_download_software_description") %>
    • -
    • <%= text_field_tag('block[downloads][][minimum_requirements]', '', :class => "block_download_minimum_requirements") %>
    • -
    • <%= text_field_tag('block[downloads][][size]', '', :class => "block_download_size") %>
    • -
    • <%= button_without_text(:delete, _('Delete'), "#" , { :onclick => 'softwareDownload.deleteDownload(this); return false', :class=>"delete-link-list-row" }) %>
    • -
    -
  • diff --git a/src/software_communities/views/box_organizer/_software_tab_data_block.html.erb b/src/software_communities/views/box_organizer/_software_tab_data_block.html.erb deleted file mode 100644 index a4d5147..0000000 --- a/src/software_communities/views/box_organizer/_software_tab_data_block.html.erb +++ /dev/null @@ -1,15 +0,0 @@ -
    - -<% if not @block.blogs.empty? %> - - -
    - - <%= select_tag 'block[displayed_blog]', options_from_collection_for_select(@block.blogs, :id, :name, @block.actual_blog.id) %> -<% else %> -
    -

    <%= _("This community has no blogs") %>

    -
    -<% end %> diff --git a/src/software_communities/views/box_organizer/_softwares_block.html.erb b/src/software_communities/views/box_organizer/_softwares_block.html.erb deleted file mode 100644 index 2a54c32..0000000 --- a/src/software_communities/views/box_organizer/_softwares_block.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -
    - <%= labelled_form_field _('Limit of items'), text_field(:block, :limit, :size => 3) %> - <%= labelled_form_field _('Software Type:'), select_tag('block[software_type]', options_for_select(["Public", "Generic", "All"], @block.software_type) )%> -
    diff --git a/src/software_communities/views/box_organizer/_statistic_block.html.erb b/src/software_communities/views/box_organizer/_statistic_block.html.erb deleted file mode 100644 index 48037c8..0000000 --- a/src/software_communities/views/box_organizer/_statistic_block.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -
    - <% suggestion_benefited_people = @block.owner.organization_ratings.collect{ |r| r.people_benefited.to_f }.inject(:+) || 0.0 %> - <% suggestion_saved_resources = @block.owner.organization_ratings.collect{ |r| r.saved_value.to_f }.inject(:+) || 0.0 %> - - <%= labelled_form_field _('Benefited People'), text_field(:block, :benefited_people) %> -

    <%= _("Portal suggested value: ") %> <%= "%d" % (suggestion_benefited_people) %>

    - <%= labelled_form_field _('Saved Resources'), text_field(:block, :saved_resources) %> -

    <%= _("Portal suggested value: ") %> <%= "R$%.2f" % (suggestion_saved_resources) %>

    -
    - diff --git a/src/software_communities/views/box_organizer/_wiki_block.html.erb b/src/software_communities/views/box_organizer/_wiki_block.html.erb deleted file mode 100644 index 489b85d..0000000 --- a/src/software_communities/views/box_organizer/_wiki_block.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -
    - - -
    - <%= text_field_tag "block[wiki_link]", value=@block.wiki_link %> -
    -
    - diff --git a/src/software_communities/views/comments_extra_fields.html.erb b/src/software_communities/views/comments_extra_fields.html.erb deleted file mode 100644 index f50992a..0000000 --- a/src/software_communities/views/comments_extra_fields.html.erb +++ /dev/null @@ -1,21 +0,0 @@ -
    - - <%= _("Additional informations") %> - - - -
    - -
    -
    - <%= label_tag "comments_people_benefited", _("Number of Beneficiaries")%> - - <%= text_field_tag "organization_rating[people_benefited]", "" %> -
    - -
    - <%= label_tag "comments_saved_value", _("Saved resources")%> - - <%= text_field_tag "organization_rating[saved_value]", "", :placeholder=>"R$"%> -
    -
    diff --git a/src/software_communities/views/environment_design b/src/software_communities/views/environment_design deleted file mode 120000 index a75d184..0000000 --- a/src/software_communities/views/environment_design +++ /dev/null @@ -1 +0,0 @@ -box_organizer \ No newline at end of file diff --git a/src/software_communities/views/organization_ratings_extra_fields_show_data.html.erb b/src/software_communities/views/organization_ratings_extra_fields_show_data.html.erb deleted file mode 100644 index 0e57615..0000000 --- a/src/software_communities/views/organization_ratings_extra_fields_show_data.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -
    -
    - <%=_("Benefited People")%> : <%= user_rating.people_benefited unless user_rating.nil? %> -
    - -
    - <%=_("Saved Resources")%> : <%= user_rating.saved_value unless user_rating.nil? %> -
    -
    - diff --git a/src/software_communities/views/profile/_profile_members_list.html.erb b/src/software_communities/views/profile/_profile_members_list.html.erb deleted file mode 100644 index 0e6c700..0000000 --- a/src/software_communities/views/profile/_profile_members_list.html.erb +++ /dev/null @@ -1,14 +0,0 @@ -
    - <%= label_tag("sort-#{role}", _("Sort by:")) %> - <%= select_tag("sort-#{role}", - options_for_select([ - [_("Name A-Z"), 'asc'], - [_("Name Z-A"), 'desc'], - ], :selected=>params[:sort]) - ) %> -
    -
      - <% users.each do |u| %> - <%= profile_image_link(u) %> - <% end %> -
    diff --git a/src/software_communities/views/profile/_software_tab.html.erb b/src/software_communities/views/profile/_software_tab.html.erb deleted file mode 100644 index 805c656..0000000 --- a/src/software_communities/views/profile/_software_tab.html.erb +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - <%= display_mpog_field(_('Name:'), profile, :name, true) %> - <%= content_tag('tr', content_tag('td', _("Adherent to e_mag:")) + content_tag('td', profile.software_info.e_mag ? _("Yes") : _("No"))) %> - <%= content_tag('tr', content_tag('td', _("Adherent to icp_brasil:")) + content_tag('td', profile.software_info.icp_brasil ? _("Yes") : _("No"))) %> - <%= content_tag('tr', content_tag('td', _("Adherent to e_ping:")) + content_tag('td', profile.software_info.e_ping ? _("Yes") : _("No"))) %> - <%= content_tag('tr', content_tag('td', _("Adherent to e_arq:")) + content_tag('td', profile.software_info.e_arq ? _("Yes") : _("No"))) %> - <%= content_tag('tr', content_tag('td', _("Internacionalizable:")) + content_tag('td', profile.software_info.intern ? _("Yes") : _("No"))) %> - <%= display_mpog_field(_('Operating Platform:'), profile.software_info, :operating_platform, true) %> - <%= display_mpog_field(_('Demonstration URL:'), profile.software_info, :demonstration_url, true) %> - <%= display_mpog_field(_('Short Name:'), profile.software_info, :acronym, true) %> - <%= display_mpog_field(_('Objectives:'), profile.software_info, :objectives, true) %> - <%= display_mpog_field(_('Features:'), profile.software_info, :features, true) %> - - <%= content_tag('tr', content_tag('td', _("License"))) %> - <%= display_mpog_field(_('Version:'), profile.software_info.license_info, :version, true) %> - <%= display_mpog_field(_('Link:'), profile.software_info.license_info, :link, true) %> -
    <%= _('Software Information')%>
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    <%= _('Show Libraries') %> - <%= _('Hide Libraries') %> -
    - - - - - - - - - - - -
    <%= _("Libraries") %>
    - <% libraries = profile.software_info.libraries %> - <% LibraryHelper.libraries_as_tables(libraries, true).each do |tab| %> - <%= tab.call %> - <%end%> -
    -
    <%= _('Show Database') %> - <%= _('Hide Database') %> -
    - - - - - - - - - - - -
    <%= _("Software Databases") %>
    - <% databases = profile.software_info.software_databases %> - <% DatabaseHelper.database_as_tables(databases, true).each do |tab| %> - <%= tab.call %> - <%end%> -
    -
    <%= _('Show Languages') %> - <%= _('Hide Languages') %> -
    - - - - - - - - - - - -
    <%= _("Software Languages") %>
    - <% languages = profile.software_info.software_languages %> - <% SoftwareLanguageHelper.language_as_tables(languages, true).each do |tab| %> - <%= tab.call %> - <%end%> -
    -
    <%= _('Show Operating Systems') %> - <%= _('Hide Operating Systems') %> -
    - - - - - - - - - - - -
    <%= _("Operating System") %>
    - <% operating_systems = profile.software_info.operating_systems %> - <% OperatingSystemHelper.operating_system_as_tables(operating_systems, true).each do |tab| %> - <%= tab.call %> - <%end%> -
    -
    diff --git a/src/software_communities/views/profile/index.html.erb b/src/software_communities/views/profile/index.html.erb deleted file mode 100644 index 6e2d6c2..0000000 --- a/src/software_communities/views/profile/index.html.erb +++ /dev/null @@ -1,26 +0,0 @@ -

    <%= h profile.name %>

    - -<% if @action %> - <%= render :partial => 'private_profile' %> -<% else %> - <% unless profile.description.blank? %> -
    - <%= profile.description %> -
    - <% end %> -<% end %> - -
    - <%= render "blocks/profile_info_actions/join_leave_community" if profile.class == "Community" %> - <% if !user.nil? && user.has_permission?('edit_profile', profile) %> -
    - <%= button :control_panel, _('Control Panel'), profile.admin_url %> -
    - <% end %> -
    - -<% if @profile.public? || (logged_in? && current_person.follows?(@profile)) %> - - -
    -<% end %> diff --git a/src/software_communities/views/profile/members.html.erb b/src/software_communities/views/profile/members.html.erb deleted file mode 100644 index 2b1280b..0000000 --- a/src/software_communities/views/profile/members.html.erb +++ /dev/null @@ -1,58 +0,0 @@ -
    - -
    -

    <%= _("Members (%d)") % @profile_members.total_entries %>

    -

    <%= profile.name %>

    - <%= render "blocks/profile_info_actions/community" %> -
    - -<% cache_timeout(profile.members_cache_key(params), 4.hours) do %> -
    - <% tabs = [] %> - - <% div_members = content_tag :div, :class => "profile-members" do - render :partial => 'profile_members_list', - :locals => { - :users => @profile_members, - :role => "members" - } - end %> - - <% tabs << {:title => _("%d Members") % @profile_members.total_entries, - :id => "members-tab", - :content => div_members - } %> - - <% div_admins = content_tag :div, :class => "profile-admins" do - render :partial => 'profile_members_list', - :locals => { - :users => @profile_admins, - :role => "admins" - } - end %> - - <% tabs << {:title => _("%d Administrators") % @profile_admins.total_entries, - :id => "admins-tab", - :content => div_admins - } %> - - <%= render_tabs(tabs) %> -
    -<% end %> - -<% button_bar do %> - <%= button :back, _('Go back'), { :controller => 'profile' } %> - <% if profile.community? and user %> - <% if user.has_permission?(:invite_members, profile) %> - <%= button :person, _('Invite people to join'), :controller => 'invite', :action => 'invite_friends' %> - <% end %> - <% if user.has_permission?(:send_mail_to_members, profile) %> - <%= button :send, _('Send e-mail to members'), :controller => 'profile', :action => 'send_mail' %> - <% end %> - <% end %> -<% end %> - -<%= hidden_field_tag "profile_url", @profile_members_url %> -
    - -<%= javascript_include_tag "members_page.js" %> diff --git a/src/software_communities/views/profile_design b/src/software_communities/views/profile_design deleted file mode 120000 index a75d184..0000000 --- a/src/software_communities/views/profile_design +++ /dev/null @@ -1 +0,0 @@ -box_organizer \ No newline at end of file diff --git a/src/software_communities/views/profile_editor/_first_edit_software_community_extras.html.erb b/src/software_communities/views/profile_editor/_first_edit_software_community_extras.html.erb deleted file mode 100644 index 86ed273..0000000 --- a/src/software_communities/views/profile_editor/_first_edit_software_community_extras.html.erb +++ /dev/null @@ -1,9 +0,0 @@ -
    -
    > -

    <%= _("Step 1 - Software Creation")%>

    -
    - -
    > -

    <%= _("Step 2 - Community Settings")%>

    -
    -
    diff --git a/src/software_communities/views/profile_editor/_software_community.html.erb b/src/software_communities/views/profile_editor/_software_community.html.erb deleted file mode 100644 index f4d0281..0000000 --- a/src/software_communities/views/profile_editor/_software_community.html.erb +++ /dev/null @@ -1,70 +0,0 @@ -

    <%= _('General information') %>

    - - <%= required_fields_message %> - - <%= @plugins.dispatch(:profile_info_extra_contents).collect { |content| instance_exec(&content) }.join("") %> - -<% if @environment.enabled?('enable_organization_url_change') %> - -<% end %> - -<% if @environment.enabled?('enable_organization_url_change') %> - - - <%= hidden_field_tag 'old_profile_identifier', @profile.identifier %> -
    - <%= required labelled_form_field( _('Address'), - content_tag('code', - url_for(profile.url).gsub(/#{profile.identifier}$/, '') + - text_field(:profile_data, :identifier, :onchange => "warn_value_change()", :size => 25) - ) + - content_tag('div', - content_tag('strong', _('WARNING!')) + ' ' + - _("You are about to change the address, and this will break external links to the homepage or to content inside it. Do you really want to change?") + - content_tag('div', - button_to_function(:ok, _("Yes"), "confirm_change()") + ' ' + - button_to_function(:cancel, _('No'), 'no_change()') - ), - :id => 'identifier-change-confirmation', - :class => 'change-confirmation', - :style => 'display: none;' - ) - ) - %> -
    -<% end %> - -<%= render :partial => 'shared/organization_custom_fields', :locals => { :f => f, :object_name => 'profile_data', :profile => @profile } %> - -<%= labelled_check_box(_('Enable "contact us"'), 'profile_data[enable_contact_us]', "1", @profile.enable_contact_us) if @profile.enterprise? %> - -<%= render :partial => 'moderation', :locals => { :profile => @profile } %> - -<% if profile.enterprise? && profile.environment.enabled?('products_for_enterprises') %> -

    <%=_('Products/Services catalog')%>

    - <%= labelled_form_field(_('Number of products/services displayed per page on catalog'), text_field(:profile_data, :products_per_catalog_page, :size => 3)) %> -<% end %> diff --git a/src/software_communities/views/profile_editor/edit_software_community.html.erb b/src/software_communities/views/profile_editor/edit_software_community.html.erb deleted file mode 100644 index 5c181b8..0000000 --- a/src/software_communities/views/profile_editor/edit_software_community.html.erb +++ /dev/null @@ -1,90 +0,0 @@ - -<%= render :partial => 'first_edit_software_community_extras', :locals => {:class_step_one => "another-step", :class_step_two => "current-step"} if @first_edit %> - -

    <%= _('Configure Software Community') %>

    - -
    - - <%= _('Set the basic settings of the software associated community') %> - -
    - -<%= error_messages_for :profile_data %> - -<%= labelled_form_for :profile_data, :html => { :id => 'profile-data', :multipart => true } do |f| %> - - <% if environment.admins.include?(user) %> -
    - <%= labelled_check_box(_('This profile is a template'), 'profile_data[is_template]', true, @profile.is_template) %> -
    - <% end %> - - <%= render :partial => 'software_community', :locals => { :f => f } %> - -

    <%= _('Privacy options') %>

    - - <% if profile.person? %> -
    - <%= labelled_radio_button _('Public — show my contents to all internet users'), 'profile_data[public_profile]', true, @profile.public_profile? %> -
    -
    - <%= labelled_radio_button _('Private — show my contents only to friends'), 'profile_data[public_profile]', false, !@profile.public_profile? %> -
    - <% else %> -
    - <%= labelled_check_box _("Secret — hide the community and all its contents for non members and other people can't join this community unless they are invited to."), 'profile_data[secret]', true, profile.secret, :class => "profile-secret-box" %> -
    -
    - <%= labelled_radio_button _('Public — show content of this group to all internet users'), 'profile_data[public_profile]', true, @profile.public_profile? %> -
    -
    - <%= labelled_radio_button _('Private — show content of this group only to members'), 'profile_data[public_profile]', false, !@profile.public_profile? %> -
    - <% end %> - - <% if environment.enabled?('allow_change_of_redirection_after_login') %> -

    <%= _('Page to redirect after login') %>

    - <%= select 'profile_data', 'redirection_after_login', Environment.login_redirection_options.map{|key,value|[value,key]}, { :selected => @profile.preferred_login_redirection} %> - <% end %> - -

    <%= _('Translations') %>

    - <%= labelled_check_box( - _('Automaticaly redirect the visitor to the article translated to his/her language'), - 'profile_data[redirect_l10n]', true, @profile.redirect_l10n - )%> - -

    <%= _('Suggestions') %>

    - <%= labelled_check_box( - _('Send me relationship suggestions by email'), - 'profile_data[email_suggestions]', true, @profile.email_suggestions - )%> - - <%= - @plugins.dispatch(:profile_editor_extras).map do |content| - content.kind_of?(Proc) ? self.instance_exec(&content) : content - end.join("\n") - %> - - <%= select_categories(:profile_data, _('Software Categories'), 2) %> - - <% button_bar do %> - <%= submit_button('save', _('Save'), :cancel => {:action => 'index'}) %> - - <% unless @first_edit %> - <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %> - <% end %> - <% end %> - - <% if user && user.has_permission?('destroy_profile', profile) && !@first_edit %> - <% button_bar(:id => 'delete-profile') do %> - <%= button(:remove, _('Delete software and community'), {:action => :destroy_profile}) %> - <% if environment.admins.include?(current_person) %> - <% if profile.visible? %> - <%= button(:remove, _('Deactivate software and community'), {:action => :deactivate_profile, :id=>profile.id}, :id=>'deactivate_profile_button', :data => {:confirm=>_("Are you sure you want to deactivate this profile?")}) %> - <% else %> - <%= button(:add, _('Activate software and community'), {:action => :activate_profile, :id=>profile.id}, :data => {:confirm=>_("Are you sure you want to deactivate this profile?")}) %> - <% end %> - <% end %> - <% end %> - <% end %> -<% end %> diff --git a/src/software_communities/views/search/_catalog_filter.html.erb b/src/software_communities/views/search/_catalog_filter.html.erb deleted file mode 100644 index e6a9dd7..0000000 --- a/src/software_communities/views/search/_catalog_filter.html.erb +++ /dev/null @@ -1,20 +0,0 @@ -
    - -
    -

    <%= _("Categories") %>

    -
    -
      - <% @categories.each do |category| %> -
    • - <%= check_box_tag("selected_categories_id[]", category.id, @selected_categories_id.include?(category.id), :class => "categories-catalog", @enabled_check_box[category] => "true") %> - <%= _("#{category.name}") %> -
    • - <% end %> -
    -
    -
    -
    <%= _("More options") %>
    -
    - <%= button_tag _("Clean up"), :id => "cleanup-filter-catalg", :type => "button" %> - <%= button_tag _("Close"), :id => "close-filter-catalog", :type => "button" %> -
    diff --git a/src/software_communities/views/search/_catalog_result_list.html.erb b/src/software_communities/views/search/_catalog_result_list.html.erb deleted file mode 100644 index 976a13d..0000000 --- a/src/software_communities/views/search/_catalog_result_list.html.erb +++ /dev/null @@ -1,51 +0,0 @@ -
    - <% @assets.each do |name| %> - <% search = @searches[name] %> - - - - <% if !search[:results].blank? %> - - <% if multiple_search?(@searches) %> -

    <%= @names[name] %>

    - <% if search[:results].total_entries > SearchController::MULTIPLE_SEARCH_LIMIT %> - <%= link_to(_("see all (%d)") % search[:results].total_entries, params.merge(:action => name), :class => 'see-more' ) %> - <% end %> - <% end %> - - <% display = display_filter(name, params[:display]) %> - -
    -
      - <% search[:results].each do |hit| %> - <% partial = partial_for_class(hit.class, display) %> - <% variable_name = partial.gsub("#{display}_", '').to_sym %> - <%= render :partial => partial, :locals => {variable_name => hit} %> - <% end %> -
    -
    - <% else %> - <% if multiple_search? %> -

    <%= @names[name] %>

    - <% end %> - -
    - - - - - -
    - <% @selected_categories.each do |category| %> -
    - <%= link_to _("#{category.name}") + " (#{category.software_infos.count})", {:controller => :search, :action => :software_infos, :selected_categories_id => [category.id]} %> - <% end %> -
    - - <% end %> - <% end %> - -
    - - <%= add_zoom_to_images %> -
    diff --git a/src/software_communities/views/search/_full_community.html.erb b/src/software_communities/views/search/_full_community.html.erb deleted file mode 100644 index 23e2b14..0000000 --- a/src/software_communities/views/search/_full_community.html.erb +++ /dev/null @@ -1,53 +0,0 @@ -<% software = community.software_info %> -
  • -
    - <%= profile_image_link community, :portrait, 'div', community.send(@order + '_label') + show_date(community.created_at) %> -
    - -
    - -
    - - <% link_name = software.acronym.blank? ? community.name : "#{software.acronym} - #{community.name}" %> -

    - <%= link_to_homepage(link_name, community.identifier) %> -

    -
    - - <% body_stripped = strip_tags(software.finality) %> - <%= excerpt(body_stripped, body_stripped.first(3), 200) if body_stripped %> - -
    - -
    - -
    - - - <%= _("Software Categories") %>: - - - - <% if !community.categories.empty? %> -
      - <% community.categories.each do |category| %> -
    • - <%= link_to _("#{category.name}"), { - :controller => :search, - :action => :software_infos, - :selected_categories_id => [category.id], - :software_type => params[:software_type] - } %> -
    • - <% end %> -
    - <% else %> - - <%= _("This software doesn't have categories") %> - - <% end %> -
    -
    - -
    -
  • diff --git a/src/software_communities/views/search/_software_search_form.html.erb b/src/software_communities/views/search/_software_search_form.html.erb deleted file mode 100644 index f400c66..0000000 --- a/src/software_communities/views/search/_software_search_form.html.erb +++ /dev/null @@ -1,67 +0,0 @@ -
    -
    -

    <%= _("Search Public Software Catalog") %>

    - - <%= form_tag( { :controller => 'search', :action => @asset ? @asset : 'index', :asset => nil, :category_path => ( @category ? @category.path : nil ) }, - :method => 'get') do %> - -
    -
    - - <%= hidden_field_tag :display, params[:display] %> - <%= hidden_field_tag :filter, params[:filter] %> - - <%= labelled_radio_button _('Public Software'), :software_type, 'public_software', @public_software_selected, :id => "public_software_radio_button", :class => "project-software" %> - ? - - - <%= labelled_radio_button _('All'), :software_type, 'all', @all_selected, :id => "all_radio_button", :class => "project-software" %> - ? - - -
    - - <%= text_field_tag 'query', @query, :id => 'search-input', :size => 50, :placeholder=>_("Type words about the software you're looking for (the search begins after 3 characters)") %> - - - <%= submit_button(:search, _('Filter')) %> -
    - <%= render :partial => 'search_form_extra_fields' %> - <%= render :partial => 'catalog_filter' %> - <% end %> -
    - -
    -
    - <%= "#{@software_count} Software(s)" %> -
    - -
    -
    - Show: - <%= select_tag("software_display", - options_for_select(['15', '30', '90', 'All'], :selected=>params[:display]) - ) %> -
    - -
    - Sort by: - <%= select_tag("sort", - options_for_select( - [ - [_("Name A-Z"), 'asc'], - [_("Name Z-A"), 'desc'], - [_("Relevance"), 'relevance'] - ], :selected=>params[:sort]) - ) %> -
    -
    -
    -
    - -<% if @empty_query %> - <% hint = environment.search_hints[@asset] %> - <% if hint and !hint.blank? %> -
    <%= hint %>
    - <% end %> -<% end %> diff --git a/src/software_communities/views/search/software_infos.html.erb b/src/software_communities/views/search/software_infos.html.erb deleted file mode 100644 index c68f6fc..0000000 --- a/src/software_communities/views/search/software_infos.html.erb +++ /dev/null @@ -1,21 +0,0 @@ -

    Catálogo de Software Público

    - -
    - <%= search_page_title( @titles[@asset], @category ) %> - - <%= render :partial => 'software_search_form', :locals => { :hint => _("Type words about the %s you're looking for") % @asset.to_s.singularize } %> - - <% if @asset == :product %> - <%= javascript_tag do %> - jQuery('.search-product-price-details').altBeautify(); - <% end %> - <% end %> -
    - -<%= render partial:"catalog_result_list" %> - -
    - <% if params[:display] != 'map' %> - <%= pagination_links @searches[@asset][:results] %> - <% end %> -
    diff --git a/src/software_communities/views/software_communities_plugin_myprofile/_database_fields.html.erb b/src/software_communities/views/software_communities_plugin_myprofile/_database_fields.html.erb deleted file mode 100644 index e0b994e..0000000 --- a/src/software_communities/views/software_communities_plugin_myprofile/_database_fields.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -<%= fields_for :database_description, @database_description do |db| %> - -
    - <% database = [] if database.blank? %> - <% DatabaseHelper.database_as_tables(database).each do |tab| %> - <%= tab.call %> - <%end%> -
    - - -<%= link_to _('New Database'), "#", :class=>"button icon-add with-text new-dynamic-table dynamic-databases"%> -<% end %> diff --git a/src/software_communities/views/software_communities_plugin_myprofile/_language_fields.html.erb b/src/software_communities/views/software_communities_plugin_myprofile/_language_fields.html.erb deleted file mode 100644 index a7d31a1..0000000 --- a/src/software_communities/views/software_communities_plugin_myprofile/_language_fields.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -<%= fields_for :software_language, @software_language do |lng| %> - -
    - <% languages = [] if languages.blank? %> - <% SoftwareLanguageHelper.language_as_tables(languages).each do |tab| %> - <%= tab.call %> - <%end%> -
    - - -<%= link_to _('New language'), "#", :class=>"button icon-add with-text new-dynamic-table dynamic-languages"%> -<% end %> \ No newline at end of file diff --git a/src/software_communities/views/software_communities_plugin_myprofile/_library_fields.html.erb b/src/software_communities/views/software_communities_plugin_myprofile/_library_fields.html.erb deleted file mode 100644 index 332654b..0000000 --- a/src/software_communities/views/software_communities_plugin_myprofile/_library_fields.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -<%= fields_for :library ,@library do |lib| %> - -
    - <% libraries = [] if libraries.blank? %> - <% LibraryHelper.libraries_as_tables(libraries).each do |tab| %> - <%= tab.call %> - <% end %> -
    - - -<%= link_to _('New Library'), "#", :class=>"button icon-add with-text new-dynamic-table dynamic-libraries"%> -<% end %> diff --git a/src/software_communities/views/software_communities_plugin_myprofile/_license_info_fields.html.erb b/src/software_communities/views/software_communities_plugin_myprofile/_license_info_fields.html.erb deleted file mode 100644 index 3cde616..0000000 --- a/src/software_communities/views/software_communities_plugin_myprofile/_license_info_fields.html.erb +++ /dev/null @@ -1,14 +0,0 @@ -<% LicenseHelper.getListLicenses.each do | license | %> - -<% end %> - -<%= text_field_tag "license_info[version]", license_version, :id=>"license_info_version", :class=>"license_info_version", :placeholder=>_('Autocomplete field, type some license') %> -<%= hidden_field_tag "license[license_infos_id]", license_id, :id=>"license_info_id", :class=>"license_info_id", :data => {:label=>license_version} %> - -<%= _("Read license") %> - -
    - <%= labelled_text_field "Licence version", "license[version]", another_version, :id=>"licence_version" %> -
    - <%= labelled_text_field "Licence link", "license[link]", another_link, :id=>"licence_link" %> -
    diff --git a/src/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb b/src/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb deleted file mode 100644 index a40b62d..0000000 --- a/src/software_communities/views/software_communities_plugin_myprofile/_main_software_editor_extras.html.erb +++ /dev/null @@ -1,47 +0,0 @@ - -
    > - <%= label_tag("community[name]", _('Name'), {:class => 'formlabel mandatory'}) %> - <%= text_field_tag("community[name]", @profile.name, :id => 'community_name_id') %> -
    - -
    > - <%= label_tag("software[acronym]", _('Short Name'), {:class => 'formlabel mandatory'}) %> - <%= text_field_tag("software[acronym]", @profile.software_info.acronym, :id => 'software_acronym_id', :maxlength=>"10") %> -
    - -
    > -
    - <%= label_tag("software[finality]", _('Finality'), {:class => 'formlabel mandatory'}) %> - <%= text_area_tag "software[finality]", @profile.software_info.finality, :placeholder => _("What is the software for?"), :maxlength => 120 %> -
    -
    - -
    - -
    -
    - <%= f.fields_for :image_builder, @profile.image do |i| %> - <%= file_field_or_thumbnail(_('Image:'), @profile.image, i) %><%= _("Max size: %s (.jpg, .gif, .png)")% Image.max_size.to_humanreadable %> - <% end %> -
    - -
    > -
    - - <%= render :partial => "license_info_fields", :locals => { - :license_version => @license_version, - :license_id => @license_id, - :another_version => @another_license_version, - :another_link => @another_license_link - } %> -
    -
    - -
    - <%= label_tag("software[repository_link]", _('Link to Repository: '), {:class => 'formlabel'}) %> - <%= text_field_tag("software[repository_link]", @profile.software_info.repository_link, :class => "improve_input_size", :id => "software-info-repository-link") %> -
    diff --git a/src/software_communities/views/software_communities_plugin_myprofile/_operating_system_fields.html.erb b/src/software_communities/views/software_communities_plugin_myprofile/_operating_system_fields.html.erb deleted file mode 100644 index 7585db5..0000000 --- a/src/software_communities/views/software_communities_plugin_myprofile/_operating_system_fields.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -<%= fields_for :operating_systems ,@operating_systems do |lib| %> - -
    - <% operating_systems_fields = [] if operating_systems_fields.nil? %> - <% OperatingSystemHelper.operating_system_as_tables(operating_systems_fields).each do |tab| %> - <%= tab.call %> - <% end %> -
    - - -<%= link_to _('New Operating System'), "#", :class=>"button icon-add with-text new-dynamic-table dynamic-operating_systems"%> -<% end %> diff --git a/src/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb b/src/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb deleted file mode 100644 index 1f3466c..0000000 --- a/src/software_communities/views/software_communities_plugin_myprofile/_public_software_info.html.erb +++ /dev/null @@ -1,102 +0,0 @@ -
    - <% if @disabled_public_software_field == true %> - <%= check_box_tag("software[public_software]", "true", @software_info.public_software?, :disabled => "disabled") %> - <%= label_tag _("Public Software"), _("Public software"), :class => "public_software_disabled" %> - <% else %> - <%= check_box_tag("software[public_software]", "true", @software_info.public_software?) %> - <%= label_tag _("Public Software"), _("Public software"), :class => "public_software_enabled" %> - <% end %> -
    -

    <%= _("Public Software") %>

    -
    - <%= label_tag _("Adherent to e-PING ?") %> - - <%= label_tag "e_ping_true", "Yes" %> - <%= radio_button_tag("software[e_ping]", true, @software_info.e_ping)%> - <%= label_tag "e_ping_false", "No"%> - <%= radio_button_tag("software[e_ping]", false, !@software_info.e_ping)%> -
    - -
    - <%= label_tag _("Adherent to e-MAG ?") %> - - <%= label_tag "e_mag_true", "Yes"%> - <%= radio_button_tag("software[e_mag]", true, @software_info.e_mag)%> - <%= label_tag "e_mag_false", "No"%> - <%= radio_button_tag("software[e_mag]", false, !@software_info.e_mag)%> -
    - -
    - <%= label_tag _("Adherent to ICP-Brasil ?") %> - - <%= label_tag "icp_brasil_true", "Yes"%> - <%= radio_button_tag("software[icp_brasil]", true, @software_info.icp_brasil)%> - <%= label_tag "icp_brasil_false", "No"%> - <%= radio_button_tag("software[icp_brasil]", false, !@software_info.icp_brasil)%> -
    - -
    - <%= label_tag _("Adherent to e-ARQ ?") %> - - <%= label_tag "e_arq_true", "Yes"%> - <%= radio_button_tag("software[e_arq]", true, @software_info.e_arq)%> - <%= label_tag "e_arq_false", "No"%> - <%= radio_button_tag("software[e_arq]", false, !@software_info.e_arq)%> -
    - -
    - <%= label_tag _("Internacionalizable ?") %> - - <%= label_tag "intern_true", "Yes" %> - <%= radio_button_tag("software[intern]", true, @software_info.intern)%> - <%= label_tag "intern_false", "No"%> - <%= radio_button_tag("software[intern]", false, !@software_info.intern)%> -
    -
    -
    - -
    -

    <%= _("Operating Platform") %>

    - <%= text_area_tag "software[operating_platform]", @software_info.operating_platform, :cols => 40, :rows => 5%> -
    - -
    -

    <%= _("Features") %>

    - <%= text_area_tag "software[features]", @software_info.features, :maxlength=>"4000", :cols => 40, :rows => 5%> -
    - -
    -

    <%= _("Demonstration url") %>

    - <%= text_field_tag("software[demonstration_url]", @software_info.demonstration_url) %> -
    - -
    -

    <%= _("Libraries") %>

    - - <%= render :partial => 'library_fields', :locals => {:object_name => 'community', :profile => @community, :libraries => @list_libraries } %> -
    - -
    - -
    -

    <%= _("Operating Systems") %>

    - - <%= render :partial => 'operating_system_fields', :locals => {:object_name => 'community', :profile => @community, :operating_systems_fields => @list_operating_systems} %> -
    -
    - -
    -
    -

    <%= _("Programming languages") %>

    - - <%= render :partial => 'language_fields', :locals => { :object_name => 'community', :profile => @community, :languages => @list_languages } %> -
    - -
    -
    -

    <%= _("Databases") %>

    - - <%= render :partial => 'database_fields', :locals => {:object_name => 'community', :profile => @community, :database => @list_databases } %> -
    - -
    diff --git a/src/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb b/src/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb deleted file mode 100644 index 0b25696..0000000 --- a/src/software_communities/views/software_communities_plugin_myprofile/edit_software.html.erb +++ /dev/null @@ -1,22 +0,0 @@ -

    <%= _('Edit Software') %>

    - -<% tabs = [] %> - -<%= error_messages_for :software_info, :community %> - -<%= labelled_form_for :community, :html => { :multipart => true, :id => 'edit-form' } do |f| %> - - <% tabs << {:title => _("Main Information"), :id => 'basic-info', - :content => (render :partial => 'main_software_editor_extras', :locals => {:f => f})} %> - - <% tabs << {:title => _("Specifications"), :id => 'especific-info', - :content => (render :partial => 'public_software_info')} %> - - <%= render_tabs(tabs) %> - - <% button_bar do %> - <%= submit_button(:save, _('Save')) %> - <%= submit_button(:save, _('Save and Configure Community')) %> - <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %> - <% end %> -<% end %> diff --git a/src/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb b/src/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb deleted file mode 100644 index ad9795d..0000000 --- a/src/software_communities/views/software_communities_plugin_myprofile/new_software.html.erb +++ /dev/null @@ -1,103 +0,0 @@ - - -<%= render :partial => 'profile_editor/first_edit_software_community_extras', :locals => {:class_step_one => "current-step", :class_step_two => "another-step"} %> - -

    <%= _('Creating new software') %>

    - -
    - - <%= _('Enter the basic information about the software.
    - You can add the details after you create it.') %> -
    -
    - -<% if environment.enabled?('admin_must_approve_new_communities') %> -
    - <%= _("Note that the creation of communities in this environment is restricted. Your request to create this new community will be sent to %{environment} administrators and will be approved or rejected according to their methods and criteria.") % { :environment => environment.name }%> -
    -<%end %> - -<% unless @errors.blank? %> -
    -

    <%= _("Can`t create new software: #{@errors.length} errors") %>

    -
      - <% @errors.each do |error| %> -
    • <%= error %>
    • - <% end %> -
    -
    -<% end %> - -
    - <%= labelled_form_for :community, :html => { :multipart => true } do |f| %> - - <%= required_fields_message %> - -
    > - <%= label("name", _('Name'), {:class => 'formlabel mandatory'}) %> - <%= required text_field(:community, :name, :size => 30, :maxlength => 100, :id => 'community_name_id') %> -
    - -
    -
    - -
    > - <%= label("domain", _('Domain'), {:class => "formlabel mandatory"}) %> -
    - - <%= environment.default_hostname %>/ - <%= required text_field(:community, :identifier, :size => 30, :maxlength => 100, :id => 'community-identifier') %> -
    -
    - -
    > - <%= fields_for @software_info do |swf| %> -
    - <%= swf.label("finality" ,_("Finality"), :class=>"formlabel mandatory") %> - <%= required swf.text_area(:finality, :placeholder => _("What is the software for?"), :maxlength => 120) %> -
    - <% end %> -
    - -
    - -
    -
    - <%= f.fields_for :image_builder, @community.image do |i| %> - <%= file_field_or_thumbnail(_('Image:'), @community.image, i) %><%= _("Max size: %s (.jpg, .gif, .png)")% Image.max_size.to_humanreadable %> - <% end %> -
    - -
    > -
    - - <%= render :partial => "license_info_fields", :locals => { - :license_version => "", - :license_id => "", - :another_version=>"", - :another_link=>"" - } %> -
    -
    - - <%= fields_for @software_info do |swf| %> -
    - <%= swf.label "repository_url", _("Link to Repository: "), :class => "formlabel"%> - <%= swf.text_field :repository_link, :class => "improve_input_size", :id => "software-info-repository-link" %> -
    - <% end %> - - <%= hidden_field_tag('back_to', @back_to) %> - - <% button_bar do %> - <%= submit_button(:save, _('Create')) %> - <%= button(:cancel, _('Cancel'), @back_to ) %> - <% end %> - - <% end %> - -
    diff --git a/src/software_communities/views/software_editor_extras.rhtml b/src/software_communities/views/software_editor_extras.rhtml deleted file mode 100644 index c4a119e..0000000 --- a/src/software_communities/views/software_editor_extras.rhtml +++ /dev/null @@ -1,35 +0,0 @@ -

    <%= _('Software Information') %>

    - -
    - <%= _("Adherent to e-PING?") %> - <%= labelled_radio_button(_('Sim'), 'software_info[e_ping]', 'sim', context.profile.software_info.e_ping == 'sim')%> - <%= labelled_radio_button(_('Não'), 'software_info[e_ping]', 'nao', context.profile.software_info.e_ping == 'nao')%> -
    -
    - <%= _("Adherent to e-MAG?") %> - <%= labelled_radio_button(_('Sim'), 'software_info[e_mag]', 'sim', context.profile.software_info.e_mag == 'sim')%> - <%= labelled_radio_button(_('Não'), 'software_info[e_mag]', 'nao', context.profile.software_info.e_mag == 'nao')%> -
    -
    - <%= _("Adherent to ICP-Brasil?") %> - <%= labelled_radio_button(_('Sim'), 'software_info[icp_brasil]', 'sim', context.profile.software_info.icp_brasil == 'sim')%> - <%= labelled_radio_button(_('Não'), 'software_info[icp_brasil]', 'nao', context.profile.software_info.icp_brasil == 'nao')%> -
    -
    - <%= _("Adherent to e-ARQ?") %> - <%= labelled_radio_button(_('Sim'), 'software_info[e_arq]', 'sim', context.profile.software_info.e_arq == 'sim')%> - <%= labelled_radio_button(_('Não'), 'software_info[e_arq]', 'nao', context.profile.software_info.e_arq == 'nao')%> -
    -
    - <%= _("Internacionalizable") %> - <%= labelled_radio_button(_('Sim'), 'software_info[intern]', 'sim', context.profile.software_info.intern == 'sim')%> - <%= labelled_radio_button(_('Não'), 'software_info[intern]', 'nao', context.profile.software_info.intern == 'nao')%> -
    - -
    - <%= label_tag('software_info[operating_platform]', 'Operating Platform:') %> - <%= text_area_tag('software_info[operating_platform]', context.profile.software_info.operating_platform, :size => '40x20') %> -
    -
    - <%= labelled_text_field('Demonstration URL', 'software_info[demonstration_url]', context.profile.software_info.demonstration_url) %> -
    diff --git a/src/spb_migrations/db/migrate/20150720180509_software_release_date.rb b/src/spb_migrations/db/migrate/20150720180509_software_release_date.rb deleted file mode 100644 index 7ee7a16..0000000 --- a/src/spb_migrations/db/migrate/20150720180509_software_release_date.rb +++ /dev/null @@ -1,34 +0,0 @@ -class SoftwareReleaseDate < ActiveRecord::Migration - def up - softwares = SoftwareInfo.all - softwares.each do |software| - if software.community - name = software.community.name.strip - software.community.name = name - software.community.save - else - software.destroy - end - end - - file = File.new("plugins/spb_migrations/files/date-communities.txt", "r") - while (line = file.gets) - result = line.split('|') - software_name = result[2].gsub("/n", "") - software = Community.find(:first, :conditions => ["lower(name) = ?", software_name.strip.downcase]) - software.created_at = Time.zone.parse(result[1]) if software - if software && software.save - print "." - else - print "F" - puts software_name - end - end - file.close - puts "" - end - - def down - say "This can't be reverted" - end -end diff --git a/src/spb_migrations/db/migrate/20150720190133_change_blocks_mirror_option.rb b/src/spb_migrations/db/migrate/20150720190133_change_blocks_mirror_option.rb deleted file mode 100644 index a809624..0000000 --- a/src/spb_migrations/db/migrate/20150720190133_change_blocks_mirror_option.rb +++ /dev/null @@ -1,43 +0,0 @@ -class ChangeBlocksMirrorOption < ActiveRecord::Migration - def up - blocks = Block.where(:type => LinkListBlock) - institution = Community["institution"] - software = Community["software"] - - if institution - boxTemplateInstitution = institution.boxes.where(:position => 2).first - - boxTemplateInstitution.blocks.each do |block| - block.mirror = true - print "." if block.save - end - end - - if software - boxTemplateSoftware = software.boxes.where(:position => 2).first - - boxTemplateSoftware.blocks.each do |block| - block.mirror = true - print "." if block.save - end - end - - blocks.each do |block| - if !(block.owner.class == Environment) && block.owner.organization? && !block.owner.enterprise? - if software && block.owner.software? - software_block = boxTemplateSoftware.blocks.where(:title => block.title).first - block.mirror_block_id = software_block.id if software_block - elsif institution && block.owner.institution? - institution_block = boxTemplateInstitution.blocks.where(:title => block.title).first - block.mirror_block_id = institution_block.id if institution_block - end - end - print "." if block.save - end - puts "" - end - - def down - say "This can't be reverted" - end -end diff --git a/src/spb_migrations/db/migrate/20150727161511_change_software_layout.rb b/src/spb_migrations/db/migrate/20150727161511_change_software_layout.rb deleted file mode 100644 index 414adc7..0000000 --- a/src/spb_migrations/db/migrate/20150727161511_change_software_layout.rb +++ /dev/null @@ -1,31 +0,0 @@ -class ChangeSoftwareLayout < ActiveRecord::Migration - def up - software_template = Community["software"] - if software_template - change_layout(software_template) - end - - softwares = SoftwareInfo.all - softwares.each do |software| - if software.community - change_layout(software.community) - end - end - puts "" - end - - def down - end - - def change_layout(community) - community.layout_template = "lefttopright" - print "." if community.save - boxToMove = community.boxes.where(:position => 1).first - blockToMove = boxToMove.blocks.where(:type => "SoftwareInformationBlock").first - if blockToMove - newBox = community.boxes.where(:position => 4).first - blockToMove.box = newBox - print "." if blockToMove.save - end - end -end diff --git a/src/spb_migrations/db/migrate/20150828201023_second_software_release_date.rb b/src/spb_migrations/db/migrate/20150828201023_second_software_release_date.rb deleted file mode 100644 index 2fb7b2c..0000000 --- a/src/spb_migrations/db/migrate/20150828201023_second_software_release_date.rb +++ /dev/null @@ -1,40 +0,0 @@ -class SecondSoftwareReleaseDate < ActiveRecord::Migration - def up - softwares = SoftwareInfo.all - softwares.each do |software| - if software.community - name = software.community.name.strip - software.community.name = name - software.community.save - else - software.destroy - end - end - - file = File.new("plugins/spb_migrations/files/date-communities.txt", "r") - while (line = file.gets) - result = line.split('|') - software_name = result[2].gsub("/n", "") - software = Community.where("name ILIKE ?", software_name.strip) - - if software && software.count == 1 - software = software.first - software.created_at = Time.zone.parse(result[1]) - if software.save - print "." - else - print "F" - end - else - print "F" - puts software_name - end - end - file.close - puts "" - end - - def down - say "This can't be reverted" - end -end diff --git a/src/spb_migrations/db/migrate/20150904174335_swap_softwares_blocks_between_areas_2_and_3.rb b/src/spb_migrations/db/migrate/20150904174335_swap_softwares_blocks_between_areas_2_and_3.rb deleted file mode 100644 index 745fcef..0000000 --- a/src/spb_migrations/db/migrate/20150904174335_swap_softwares_blocks_between_areas_2_and_3.rb +++ /dev/null @@ -1,35 +0,0 @@ -class SwapSoftwaresBlocksBetweenAreas2And3 < ActiveRecord::Migration - def up - software_template = Community["software"] - if software_template - swap_software_blocks_between_areas_2_and_3(software_template) - end - - Community.joins(:software_info).each do |software_community| - swap_software_blocks_between_areas_2_and_3(software_community) - end - puts "" - end - - def down - say "This can't be reverted" - end - - def swap_software_blocks_between_areas_2_and_3(software_community) - print "." - - # Get areas 2 and 3 - box_area_two = software_community.boxes.find_by_position 2 - box_area_three = software_community.boxes.find_by_position 3 - - # Get all ids of blocks from areas 2 and 3 - blocks_ids_from_area_two = box_area_two.blocks.select(:id).map(&:id) - blocks_ids_from_area_three = box_area_three.blocks.select(:id).map(&:id) - - # Swap blocks from area 2 to 3 - Block.update_all({:box_id=>box_area_three.id}, ["id IN (?)", blocks_ids_from_area_two]) - - # Swap blocks from area 3 to 2 - Block.update_all({:box_id=>box_area_two.id}, ["id IN (?)", blocks_ids_from_area_three]) - end -end diff --git a/src/spb_migrations/db/migrate/20150904181508_add_organization_ratings_block_to_all_softwares_communities.rb b/src/spb_migrations/db/migrate/20150904181508_add_organization_ratings_block_to_all_softwares_communities.rb deleted file mode 100644 index d5b7087..0000000 --- a/src/spb_migrations/db/migrate/20150904181508_add_organization_ratings_block_to_all_softwares_communities.rb +++ /dev/null @@ -1,53 +0,0 @@ -class AddOrganizationRatingsBlockToAllSoftwaresCommunities < ActiveRecord::Migration - def up - software_template = Community["software"] - - if software_template - software_area_one = software_template.boxes.find_by_position 1 - - template_ratings_block = OrganizationRatingsBlock.new :mirror => true, :move_modes => "none", :edit_modes => "none" - template_ratings_block.settings[:fixed] = true - template_ratings_block.display = "home_page_only" - template_ratings_block.save! - print "." - - software_area_one.blocks << template_ratings_block - software_area_one.save! - print "." - - # Puts the ratings block as the last one on area one - last_block_position = software_area_one.blocks.order(:position).last.position - template_ratings_block.position = last_block_position + 1 - template_ratings_block.save! - print "." - end - - Community.joins(:software_info).each do |software_community| - software_area_one = software_community.boxes.find_by_position 1 - print "." - - ratings_block = OrganizationRatingsBlock.new :move_modes => "none", :edit_modes => "none" - ratings_block.settings[:fixed] = true - ratings_block.display = "home_page_only" - ratings_block.mirror_block_id = template_ratings_block.id - ratings_block.save! - print "." - - software_area_one.blocks << ratings_block - software_area_one.save! - print "." - - # Puts the ratings block as the last one on area one - last_block_position = software_area_one.blocks.order(:position).last.position - ratings_block.position = last_block_position + 1 - ratings_block.save! - print "." - end - - puts "" - end - - def down - say "This can't be reverted" - end -end diff --git a/src/spb_migrations/db/migrate/20150904202116_add_software_tab_data_block_to_all_softwares.rb b/src/spb_migrations/db/migrate/20150904202116_add_software_tab_data_block_to_all_softwares.rb deleted file mode 100644 index 579caa2..0000000 --- a/src/spb_migrations/db/migrate/20150904202116_add_software_tab_data_block_to_all_softwares.rb +++ /dev/null @@ -1,52 +0,0 @@ -class AddSoftwareTabDataBlockToAllSoftwares < ActiveRecord::Migration - def up - software_template = Community["software"] - if software_template - software_area_one = software_template.boxes.find_by_position 1 - - template_soft_tab_block = SoftwareTabDataBlock.new :mirror => true, :move_modes => "none", :edit_modes => "none" - template_soft_tab_block.settings[:fixed] = true - template_soft_tab_block.display = "except_home_page" - template_soft_tab_block.save! - print "." - - software_area_one.blocks << template_soft_tab_block - software_area_one.save! - print "." - - # Puts the ratings block as the last one on area one - last_block_position = software_area_one.blocks.order(:position).last.position - template_soft_tab_block.position = last_block_position + 1 - template_soft_tab_block.save! - print "." - end - - Community.joins(:software_info).each do |software_community| - software_area_one = software_community.boxes.find_by_position 1 - print "." - - soft_tab_block = SoftwareTabDataBlock.new :move_modes => "none", :edit_modes => "none" - soft_tab_block.settings[:fixed] = true - soft_tab_block.display = "except_home_page" - soft_tab_block.mirror_block_id = template_soft_tab_block.id - soft_tab_block.save! - print "." - - software_area_one.blocks << soft_tab_block - software_area_one.save! - print "." - - # Puts the ratings block as the last one on area one - last_block_position = software_area_one.blocks.order(:position).last.position - soft_tab_block.position = last_block_position + 1 - soft_tab_block.save! - print "." - end - - puts "" - end - - def down - say "This can't be reverted" - end -end diff --git a/src/spb_migrations/db/migrate/20150907190532_add_statistic_block_to_all_softwares.rb b/src/spb_migrations/db/migrate/20150907190532_add_statistic_block_to_all_softwares.rb deleted file mode 100644 index 4c4a3c7..0000000 --- a/src/spb_migrations/db/migrate/20150907190532_add_statistic_block_to_all_softwares.rb +++ /dev/null @@ -1,53 +0,0 @@ -class AddStatisticBlockToAllSoftwares < ActiveRecord::Migration - def up - software_template = Community["software"] - - if software_template - software_area_two = software_template.boxes.find_by_position 2 - - statistic_block_template = StatisticBlock.new :mirror => true, :move_modes => "none", :edit_modes => "none" - statistic_block_template.settings[:fixed] = true - statistic_block_template.display = "home_page_only" - statistic_block_template.save! - print "." - - software_area_two.blocks << statistic_block_template - software_area_two.save! - print "." - - # Puts the ratings block as the last one on area one - first_block_position = software_area_two.blocks.order(:position).first.position - statistic_block_template.position = first_block_position + 1 - statistic_block_template.save! - print "." - end - - Community.joins(:software_info).each do |software_community| - software_area_two = software_community.boxes.find_by_position 2 - print "." - - statistic_block = StatisticBlock.new :move_modes => "none", :edit_modes => "none" - statistic_block.settings[:fixed] = true - statistic_block.display = "home_page_only" - statistic_block.mirror_block_id = statistic_block_template.id - statistic_block.save! - print "." - - software_area_two.blocks << statistic_block - software_area_two.save! - print "." - - # Puts the ratings block as the last one on area one - first_block_position = software_area_two.blocks.order(:position).first.position - statistic_block.position = first_block_position + 1 - statistic_block.save! - print "." - end - - puts "" - end - - def down - say "This can't be reverted" - end -end diff --git a/src/spb_migrations/db/migrate/20150909191415_add_wiki_block_to_all_softwares_communities.rb b/src/spb_migrations/db/migrate/20150909191415_add_wiki_block_to_all_softwares_communities.rb deleted file mode 100644 index e86f18b..0000000 --- a/src/spb_migrations/db/migrate/20150909191415_add_wiki_block_to_all_softwares_communities.rb +++ /dev/null @@ -1,54 +0,0 @@ -class AddWikiBlockToAllSoftwaresCommunities < ActiveRecord::Migration - def up - software_template = Community["software"] - - if software_template - software_area_two = software_template.boxes.find_by_position 2 - - wiki_block_template = WikiBlock.new :mirror => true, :move_modes => "none", :edit_modes => "none" - wiki_block_template.settings[:fixed] = true - wiki_block_template.save! - print "." - - software_area_two.blocks << wiki_block_template - software_area_two.save! - print "." - - # Puts the ratings block as the last one on area one - repository_block = software_area_two.blocks.find_by_type("RepositoryBlock") - if !repository_block.nil? - wiki_block_template.position = repository_block.position + 1 - wiki_block_template.save! - print "." - end - end - - Community.joins(:software_info).each do |software_community| - software_area_two = software_community.boxes.find_by_position 2 - print "." - - wiki_block = WikiBlock.new :move_modes => "none", :edit_modes => "none" - wiki_block.settings[:fixed] = true - wiki_block.mirror_block_id = wiki_block_template.id - wiki_block.save! - print "." - - software_area_two.blocks << wiki_block - software_area_two.save! - print "." - - repository_block = software_area_two.blocks.find_by_type("RepositoryBlock") - if !repository_block.nil? - wiki_block.position = repository_block.position - wiki_block.save! - print "." - end - end - - puts "" - end - - def down - say "This can't be reverted" - end -end diff --git a/src/spb_migrations/db/migrate/20150910133925_add_community_block_in_place_of_profile_image_block.rb b/src/spb_migrations/db/migrate/20150910133925_add_community_block_in_place_of_profile_image_block.rb deleted file mode 100644 index e2a5a5f..0000000 --- a/src/spb_migrations/db/migrate/20150910133925_add_community_block_in_place_of_profile_image_block.rb +++ /dev/null @@ -1,65 +0,0 @@ -class AddCommunityBlockInPlaceOfProfileImageBlock < ActiveRecord::Migration - def up - software_template = Community['software'] - - if software_template - software_area_two = software_template.boxes.find_by_position 2 - - community_block_template = CommunityBlock.new :mirror => true, :move_modes => "none", :edit_modes => "none" - community_block_template.settings[:fixed] = true - community_block_template.display = "except_home_page" - community_block_template.save! - print "." - - software_area_two.blocks << community_block_template - software_area_two.save! - print "." - - profile_image_block = software_area_two.blocks.find_by_type("ProfileImageBlock") - if !profile_image_block.nil? - community_block_template.position = profile_image_block.position - community_block_template.save! - print "." - - profile_image_block.destroy - print "." - end - end - - Community.joins(:software_info).each do |software_community| - software_area_two = software_community.boxes.find_by_position 2 - print "." - - community_block = CommunityBlock.new :mirror => true, :move_modes => "none", :edit_modes => "none" - community_block.settings[:fixed] = true - community_block.display = "except_home_page" - community_block.mirror_block_id = community_block_template.id if community_block_template - community_block.save! - print "." - - software_area_two.blocks << community_block - software_area_two.save! - print "." - - profile_image_block = software_area_two.blocks.find_by_type("ProfileImageBlock") - if !profile_image_block.nil? - community_block.position = profile_image_block.position - community_block.save! - print "." - - profile_image_block.destroy - print "." - - # Put all link list blocks to behind - link_list_blocks = software_area_two.blocks.where(:type=>"LinkListBlock", :position=>1) - link_list_blocks.update_all :position => 3 - end - end - - puts "" - end - - def down - say "This can't be reverted" - end -end diff --git a/src/spb_migrations/db/migrate/20150915141403_apply_short_plus_pic_to_all_communities_blogs.rb b/src/spb_migrations/db/migrate/20150915141403_apply_short_plus_pic_to_all_communities_blogs.rb deleted file mode 100644 index 24de7bb..0000000 --- a/src/spb_migrations/db/migrate/20150915141403_apply_short_plus_pic_to_all_communities_blogs.rb +++ /dev/null @@ -1,23 +0,0 @@ -class ApplyShortPlusPicToAllCommunitiesBlogs < ActiveRecord::Migration - def up - Community.all.each do |community| - set_short_plus_pic_to_blog community.blog - end - - puts "" - end - - def down - say "This can't be reverted" - end - - private - - def set_short_plus_pic_to_blog blog - if blog - blog.visualization_format = "short+pic" - blog.save! - print "." - end - end -end diff --git a/src/spb_migrations/db/migrate/20150916134427_change_members_page_link_in_all_softwares_communities.rb b/src/spb_migrations/db/migrate/20150916134427_change_members_page_link_in_all_softwares_communities.rb deleted file mode 100644 index cb9515c..0000000 --- a/src/spb_migrations/db/migrate/20150916134427_change_members_page_link_in_all_softwares_communities.rb +++ /dev/null @@ -1,24 +0,0 @@ -# encoding: utf-8 - -class ChangeMembersPageLinkInAllSoftwaresCommunities < ActiveRecord::Migration - def up - Community.joins(:software_info).each do |software_community| - collaboration_block = Block.joins(:box).where("boxes.owner_id = ? AND blocks.type = ? AND blocks.title = ?", software_community.id, "LinkListBlock", "Colaboração").readonly(false).first - - if collaboration_block - collaboration_block.links.each do |link| - link["address"] = "/profile/#{software_community.identifier}/members" if link["name"] == "Usuários" - end - collaboration_block.save! - print "." - end - end - - puts "" - end - - def down - say "This can't be reverted" - end -end - diff --git a/src/spb_migrations/db/migrate/20151002175358_change_all_blocks_position_in_area_2.rb b/src/spb_migrations/db/migrate/20151002175358_change_all_blocks_position_in_area_2.rb deleted file mode 100644 index 7806537..0000000 --- a/src/spb_migrations/db/migrate/20151002175358_change_all_blocks_position_in_area_2.rb +++ /dev/null @@ -1,60 +0,0 @@ -class ChangeAllBlocksPositionInArea2 < ActiveRecord::Migration - def up - software_template = Community['software'] - print "." - - if software_template - software_area_two = software_template.boxes.find_by_position 2 - print "." - - change_blocks_position software_area_two.blocks if software_area_two - end - - Community.joins(:software_info).each do |software_community| - software_area_two = software_community.boxes.find_by_position 2 - print "." - - change_blocks_position software_area_two.blocks if software_area_two - end - - puts "" - end - - def down - say "This can't be reverted" - end - - private - - def change_blocks_position blocks - blocks.each do |block| - block.position = get_block_position(block) - block.save! - print "." - end - end - - def get_block_position block - case block.type - when "CommunityBlock" - 1 - when "StatisticBlock" - 2 - when "RepositoryBlock" - 4 - when "WikiBlock" - 5 - when "MembersBlock" - 7 - when "LinkListBlock" - if block.title == "Ajuda" - 3 - else - 6 - end - else - 8 - end - end -end - diff --git a/src/spb_migrations/db/migrate/20151002180659_create_siorg_institutions.rb b/src/spb_migrations/db/migrate/20151002180659_create_siorg_institutions.rb deleted file mode 100644 index db059da..0000000 --- a/src/spb_migrations/db/migrate/20151002180659_create_siorg_institutions.rb +++ /dev/null @@ -1,73 +0,0 @@ -#encoding: utf-8 -require "i18n" - -class CreateSiorgInstitutions < ActiveRecord::Migration - def up - governmental_power = GovernmentalPower.where("name ILIKE ?", "Executivo").first - governmental_sphere = GovernmentalSphere.where("name ILIKE ?", "Federal").first - env = Environment.default - - if env && governmental_power && governmental_sphere - CSV.foreach("plugins/spb_migrations/files/orgaos_siorg.csv", :headers => true) do |row| - template = Community["institution"] - - community = Community.where("identifier ILIKE ?", row["Nome"].to_slug).first - unless community - institution = Institution.where("acronym ILIKE ?", row["Sigla"]).first - community = institution.community if institution - end - - community = Community.new unless community - - community.environment = env if community.environment.blank? - community.name = row["Nome"].rstrip - community.country = row["Pais"] - community.state = row["Estado"] - community.city = row["Cidade"] - community.template = template if template - - unless community.save - print "F" - next - end - - juridical_nature = JuridicalNature.where("name ILIKE ? OR name ILIKE ?", "#{I18n.transliterate(row['Natureza Jurídica'].rstrip)}", "#{row['Natureza Jurídica'].rstrip}").first - - juridical_nature = JuridicalNature.create!(name: row['Natureza Jurídica'].rstrip) unless juridical_nature - - - institution = Hash.new - - institution[:name] = row["Nome"] - institution[:siorg_code] = row["Código do SIORG"] - institution[:acronym] = row["Sigla"] - institution[:governmental_sphere] = governmental_sphere - institution[:governmental_power] = governmental_power - institution[:juridical_nature] = juridical_nature - institution[:sisp] = (row["SISP"] == "Sim") - institution[:cnpj] = row["CNPJ"] - institution[:community] = community - - if community.institution - community.institution.update_attributes(institution) - else - institution[:community] = community - community.institution = PublicInstitution.create!(institution) - end - - if community.save - print "." - else - print "F" - end - - end - end - puts "" - end - - def down - say "This can't be reverted" - end - -end diff --git a/src/spb_migrations/files/date-communities.txt b/src/spb_migrations/files/date-communities.txt deleted file mode 100644 index f141a71..0000000 --- a/src/spb_migrations/files/date-communities.txt +++ /dev/null @@ -1,68 +0,0 @@ - 56443993 | 2012-07-24 09:36:30.348122-03 | Ação - 9677539 | 2009-03-05 13:45:38.24475-03 | Amadeus - 10374226 | 2009-04-01 15:02:56.691053-03 | Apoena - 8265263 | 2008-12-18 08:35:49.864072-02 | ASES - 10157501 | 2009-03-20 10:56:23.37942-03 | Banco de Talentos - 3585 | 2007-02-06 12:17:18.221666-02 | CACIC - Configurador Automático e Coletor de Informações Computacionais - 48535178 | 2012-03-07 10:33:23.788233-03 | CAU - Central de Atendimento ao Usuário - 98687140 | 2014-01-20 15:20:59.784404-02 | Citsmart - 11791260 | 2009-06-16 17:13:08.465927-03 | CMS - Controle de Marcas e Sinais - 133801 | 2007-04-03 16:31:16.047284-03 | Cocar - 27016128 | 2010-12-07 09:28:26.601182-02 | Cortex - 3632535 | 2008-04-07 15:34:10.143308-03 | Curupira - 27886394 | 2010-12-22 14:48:39.54407-02 | Demoiselle - 42650664 | 2011-10-24 18:08:56.902343-02 | DIM - Dispensação Individualizada de Medicamentos - 15315976 | 2009-10-09 15:15:52.554301-03 | e-cidade - 21650445 | 2010-06-11 15:04:50.470888-03 | EdiTom - 20675454 | 2010-04-28 16:57:25.907169-03 | EducatuX - 22297303 | 2010-07-19 10:29:05.349868-03 | e-ISS - 24188584 | 2010-09-03 15:05:17.470815-03 | e-Nota - 31042 | 2007-03-12 09:47:54.97039-03 | e-Proinfo - 23731755 | 2010-08-24 12:17:02.069138-03 | ERP5 BR - 126403824 | 2014-12-08 10:28:11.812721-02 | e-Sic Livre - 11809545 | 2009-06-17 09:19:30.697619-03 | Fila - 44509627 | 2011-11-30 16:11:20.487561-02 | FormDin - 30726269 | 2011-03-25 18:15:38.333798-03 | Geosan - 20483099 | 2010-04-16 14:53:04.201919-03 | Geplanes - 33752093 | 2011-05-25 13:08:28.449124-03 | GGAS - 1101545 | 2007-06-18 15:31:22.060335-03 | Ginga - 30724784 | 2011-03-25 17:44:11.373481-03 | Gnuteca - 31574974 | 2011-04-15 15:57:57.260004-03 | gpweb - 1593449 | 2007-08-30 16:51:38.073906-03 | Gsan - Sistema Integrado de Gestão de Serviços de Saneamento - 66594611 | 2013-04-23 15:06:59.865025-03 | Guarux - 1444332 | 2007-08-07 08:15:42.941934-03 | i3GEO - 6552490 | 2008-09-29 13:26:07.553951-03 | i-Educar - 626732 | 2007-05-07 14:31:51.222225-03 | InVesalius - 25913900 | 2010-11-09 15:33:43.132943-02 | Jaguar - 18068594 | 2010-01-06 16:28:29.99099-02 | Koruja - 601158 | 2007-05-03 14:49:32.350206-03 | KyaPanel - 3673574 | 2008-04-09 15:18:24.118203-03 | LightBase - 11809207 | 2009-06-17 09:18:46.708981-03 | Linux Educacional - 9022831 | 2009-02-04 15:21:13.18503-02 | MDArte - 11808514 | 2009-06-17 09:10:36.619105-03 | Minuano - 60993607 | 2012-11-30 10:37:59.581285-02 | NAVi - 8566986 | 2009-01-14 14:14:24.306736-02 | OASIS - 4449 | 2007-02-07 10:23:59.658958-02 | OpenACS - 12702936 | 2009-07-14 09:56:30.44857-03 | Pandorga GNU/Linux - 9066433 | 2009-02-06 13:37:26.116692-02 | Prefeitura Livre - 25956481 | 2010-11-11 11:24:24.2039-02 | Provinha Brasil - 12815452 | 2009-07-20 15:30:32.189921-03 | PW3270 - 18016032 | 2010-01-05 09:51:29.030808-02 | REDECA - 30725662 | 2011-03-25 17:59:59.551252-03 | Sagu – gestão acadêmica unificada - 3695494 | 2008-04-11 10:38:11.361528-03 | Sagui - 15719494 | 2009-10-20 10:38:37.237684-02 | SGA LIVRE - Sistema de Gerenciamento do Atendimento - 63022108 | 2013-01-30 11:22:50.327218-02 | SGDoc - 51261 | 2007-03-23 15:10:36.399602-03 | SGD – Sistema de Gestão de Demandas - 23369799 | 2010-08-13 14:04:43.562233-03 | SGF - Sistema de Gestão de Frotas - 93658 | 2007-03-29 08:41:09.667033-03 | Sigati - 3485513 | 2008-03-26 16:45:51.301379-03 | SIMEC - Sistema Integrado de Planejamento Orçamento e Finanças - 5482 | 2007-02-09 10:05:23.803077-02 | Sisau-Saci-Contra - 42365353 | 2011-10-19 16:17:57.49005-02 | SAELE - 44620010 | 2011-12-05 18:03:30.046532-02 | Sistema de Ouvidoria - 54650395 | 2012-06-29 15:24:43.920424-03 | SIVAC - Sistema on-line de Vacinação - 26934301 | 2010-12-02 17:40:23.960186-02 | SNEP PBX IP - 7283318 | 2008-11-11 14:31:33.260701-02 | SPED - Sistema de protocolo eletrônico - 51053337 | 2012-04-27 13:49:25.11419-03 | Tucunaré - 103459100 | 2014-02-17 11:28:47.085822-03 | Urbem CNM - 5986695 | 2008-09-10 15:26:48.814791-03 | WebIntegrator- Produtividade Java WEB - 4215419 | 2008-05-21 16:57:49.092527-03 | Xemelê diff --git a/src/spb_migrations/files/orgaos_siorg.csv b/src/spb_migrations/files/orgaos_siorg.csv deleted file mode 100644 index b8c1cdf..0000000 --- a/src/spb_migrations/files/orgaos_siorg.csv +++ /dev/null @@ -1,258 +0,0 @@ -Código do SIORG,Nome,Sigla,Tipo de Instituição,Pais,Estado,Cidade,Esfera,Poder,Natureza Jurídica,SISP,CNPJ -46,Advocacia Geral da União,AGU,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.411/0008-85 -45104,Agência Brasileira de Inteligência,ABIN,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,01.175.497/0001-41 -4243,Agência Espacial Brasileira,AEB,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,86.900.545/0001-70 -46876,Agência Nacional de Águas,ANA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,26.994.558/0001-23 -86144,Agência Nacional de Aviação Civil,ANAC,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,07.947.821/0001-89 -21089,Agência Nacional de Energia Elétrica ,ANEEL,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,02.270.669/0001-29 -45013,Agência Nacional de Saúde Suplementar ,ANS,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,03.589.068/0001-46 -25064,Agência Nacional de Telecomunicações ,ANATEL,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,02.030.715/0001-12 -54843,Agência Nacional de Transportes Aquaviários,ANTAG,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,04.903.587/0001-08 -54793,Agência Nacional de Transportes Terrestres ,ANTT,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,04.898.488/0001-77 -36687,Agência Nacional de Vigilância Sanitária ,ANVISA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,03.112.386/0001-11 -57682,Agência Nacional do Cinema ,ANCINE,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,04.884.574/0001-20 -25281,"Agência Nacional do Petróleo, Gás Natural e Biocombustíveis ",ANP,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,02.313.673/0001-27 -334,Arquivo Nacional ,AN,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Empresa Pública,Sim,04.374.067/0001-47 -89,Banco Central do Brasil ,BCB,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,00.038.166/0001-05 -57952,Centro de Tecnologia da Informação Renato Archer ,CTI,Pública,Brasil,SP,Campinas,Federal,Executivo,Empresa Pública,Sim,04.822.500/0002-40 -448,Centro Federal de Educação Tecnológica ´Celso Suckow da Fonseca´,CEFET-RJ,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,42.441.758/0001-05 -445,Centro Federal de Educação Tecnológica de Minas Gerais ,CEFET-MG,Pública,Brasil,MG,Belo Horizonte,Federal,Executivo,Autarquia,Sim,17.220.203/0001-96 -256,Colégio Pedro II ,CP II,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,42.414.284/0001-02 -48,Comando da Aeronáutica ,COMAER,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.429/0001-00 -185,Comando da Marinha ,CMAR,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.502/0001-44 -94,Comando do Exército ,CEX,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.452/0001-03 -478,Comissão de Valores Mobiliários ,CVM,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,29.507.878/0002-80 -223,Comissão Nacional de Energia Nuclear ,CNEM,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,00.402.552/0001-26 -322,Conselho Administrativo de Defesa Econômica,CADE,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.418.993/0001-16 -8,Conselho Nacional de Desenvolvimento Científico e Tecnológico,CNPG,Pública,Brasil,DF,Brasilia,Federal,Executivo,Fundação,Sim,33.654.831/0001-36 -3620,Controladoria Geral da União ,CGU,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,05.914.685/0001-03 -250,Coordenação de Aperfeiçoamento de Pessoal de Nível Superior ,CAPES,Pública,Brasil,DF,Brasilia,Federal,Executivo,Empresa Pública,Sim,00.889.834/0001-08 -324,Departamento de Polícia Federal ,DPF,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,00.394.494/0014-50 -704,Departamento de Polícia Rodoviária Federal ,DPRF,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,00.394.494/0014-50 -54844,Departamento nacional de Infraestrutura de Transportes,DNIT,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,04.892.707/0001-00 -367,Departamento Nacional de Obras Contra as Secas ,DNOCS,Pública,Brasil,CE,Fortaleza,Federal,Executivo,Autarquia,Sim,00.043.711/0001-43 -1918,Departamento Nacional de Produção Mineral ,DNPM,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,00.381.056/0001-33 -86567,Empresa Brasil de Comunicação,EBC,Pública,Brasil,DF,Brasilia,Federal,Executivo,Empresa Pública,Sim,09.168.704/0001-42 -119672,Empresa de Planejamento e Logística ,EPL,Pública,Brasil,DF,Brasilia,Federal,Executivo,Empresa Pública,Sim,15.763.423/0001-30 -1013,Empresa Gerencial de Projetos Navais ,EMGEPRON,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Empresa Pública,Sim,27.816.487/0001-31 -344,Escola de Administração Fazendária ,ESAF,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,02.317.176/0001-05 -299,Fundação Alexandre de Gusmão,FUNAG,Pública,Brasil,DF,Brasilia,Federal,Executivo,Fundação,Sim,00.662.197/0001-24 -984,Fundação Biblioteca Nacional ,FBN,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Fundação,Sim,40.176.679/0001-99 -261,Fundação Casa de Rui Barbosa ,FCRB,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Fundação,Sim,42.519.488/0001-08 -1782,Fundação Cultural Palmares ,FCP,Pública,Brasil,DF,Brasilia,Federal,Executivo,Fundação,Sim,32.901.688/0001-77 -956,Fundação Escola Nacional de Administração Pública ,ENAP,Pública,Brasil,DF,Brasilia,Federal,Executivo,Fundação,Sim,00.627.612/0001-09 -3,Fundação Instituto Brasileiro de Geografia e Estátistica ,IBGE,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Fundação,Sim,33.787.094/0001-40 -7,Fundação Instituto de Pesquisa Econômica Aplicada ,IPEA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Fundação,Sim,03.892.175/0001-00 -257,Fundação Joaquim Nabuco ,FUNDAJ,Pública,Brasil,PE,Recife,Federal,Executivo,Fundação,Sim,09.773.169/0001-59 -221,"Fundação Jorge Duprat Figueiredo, de Segurança e Medicina do Trabalho ",FUNDACENTRO,Pública,Brasil,SP,São Paulo,Federal,Executivo,Fundação,Sim,62.428.073/0001-36 -2330,Fundação Nacional de Artes ,FUNARTE,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Fundação,Sim,26.963.660/0002-42 -2207,Fundação Nacional de Saúde ,FUNASA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Fundação,Sim,26.989.350/0001-16 -173,Fundação Nacional do Índio ,FUNAI,Pública,Brasil,DF,Brasilia,Federal,Executivo,Fundação,Sim,00.059.311/0001-26 -315,Fundação Oswaldo Cruz ,FIOCRUZ,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Fundação,Sim,33.781.055/0012-98 -470,Fundação Universidade de Brasília,UNB,Pública,Brasil,DF,Brasilia,Federal,Executivo,Fundação,Sim,00.038.174/0001-43 -465,Fundação Universidade do Amazonas ,UFAM,Pública,Brasil,AM,Manaus,Federal,Executivo,Fundação,Sim,04.378.626/0001-97 -84712,Fundação Universidade Federal da Grande Dourados ,UFGD,Pública,Brasil,MS,Dourados,Federal,Executivo,Fundação,Sim,07.775.847/0001-97 -970,Fundação Universidade Federal de Ciências da Saúde de Porto Alegre ,UFCSPA,Pública,Brasil,RS,Porto Alegre,Federal,Executivo,Fundação,Sim,92.967.595/0001-77 -471,Fundação Universidade de Mato Grosso ,UFMT,Pública,Brasil,MT,Cuiabá,Federal,Executivo,Fundação,Sim,33.004.540/0001-00 -827,Fundação Universidade Federal do Mato Grosso do Sul ,UFMS,Pública,Brasil,MS,Campo Grande,Federal,Executivo,Fundação,Sim,15.461.510/0001-33 -477,Fundação Universidade Federal de Pelotas ,UFPel,Pública,Brasil,RS,Pelotas,Federal,Executivo,Fundação,Sim,92.242.080/0001-00 -1209,Fundação Universidade Federal de Rondônia ,UNIR,Pública,Brasil,RO,Porto Velho,Federal,Executivo,Fundação,Sim,04.418.943/0001-90 -1605,Fundação Universidade Federal de Roraima ,UFRR,Pública,Brasil,RR,Boa Vista,Federal,Executivo,Fundação,Sim,34.792.077/0001-63 -475,Fundação Universidade Federal de São Carlos ,UFSCar,Pública,Brasil,SP,Sorocaba,Federal,Executivo,Fundação,Sim,45.358.058/0001-40 -1734,Fundação Universidade Federal de São João Del Rei ,FUNREI,Pública,Brasil,MG,São João del-Rei,Federal,Executivo,Fundação,Sim,00.394.445/0518-65 -469,Fundação Universidade Federal de Sergipe ,UFS,Pública,Brasil,SE,São Cristóvão,Federal,Executivo,Fundação,Sim,13.031.547/0001-04 -474,Fundação Universidade de Viçosa ,UFV,Pública,Brasil,MG,Viçosa,Federal,Executivo,Fundação,Sim,25.944.455/0001-96 -84703,Fundação Universidade Federal do ABC ,UFABC,Pública,Brasil,SP,Santo André,Federal,Executivo,Fundação,Sim,07.722.779/0001-06 -466,Fundação Universidade Federal do Acre ,UFAC,Pública,Brasil,AC,Rio Branco,Federal,Executivo,Fundação,Sim,04.071.106/0001-37 -1710,Fundação Universidade Federal do Amapá,UNIFAP,Pública,Brasil,AP,Macapá,Federal,Executivo,Fundação,Sim,34.868.257/0001-81 -467,Fundação Universidade Federal do Maranhão ,UFMA,Pública,Brasil,MA,São Luis,Federal,Executivo,Fundação,Sim,06.279.103/0001-19 -94739,Fundação Universidade Federal do Pampa ,UNIPAMPA,Pública,Brasil,RS,Bagé,Federal,Executivo,Fundação,Sim,09.341.233/0001-22 -468,Fundação Universidade Federal do Piauí ,UFPI,Pública,Brasil,PI,Teresina,Federal,Executivo,Fundação,Sim,06.517.387/0001-34 -476,Fundação Universidade do Rio Grande ,FURG,Pública,Brasil,RS,Rio Grande,Federal,Executivo,Fundação,Sim,94.877.586/0001-10 -52702,Fundação Universidade Federal do Tocantins ,UFT,Pública,Brasil,TO,Palmas,Federal,Executivo,Fundação,Sim,05.149.726/0001-04 -69624,Fundação Universidade Federal do Vale do São Francisco ,UNIVASF,Pública,Brasil,PE,Petrolina,Federal,Executivo,Fundação,Sim,05.440.725/0001-14 -253,Fundo Nacional de Desenvolvimento da Educação ,FNDE,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,00.378.257/0001-81 -35,Hospital das Forças Armadas ,HFA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,03.568.867/0001-36 -332,Imprensa Nacional ,IN,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,04.196.645/0001-00 -12,Instituto Brasileiro de Informação em Ciência e Tecnologia ,IBICT,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,04.082.993/0001-49 -100584,Instituto Brasileiro de Museus ,IBRAM,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,10.898.596/0001-42 -241,Instituto Brasileiro de Turismo ,EMBRATUR,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,33.741.794/0001-01 -1812,Instituto Brasileiro do Meio Ambiente e dos Recursos Naturais Renováveis ,IBAMA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,03.659.166/0028-22 -91842,Instituto Chico Mendes de Conservação da Biodiversidade ,ICMBio,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,08.829.974/0001-94 -1913,Instituto de Pesquisas Jardim Botânico do Rio de Janeiro ,JBRJ,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,04.936.616/0001-20 -2045,Instituto do Patrimônio Histórico e Artístico Nacional ,IPHAN,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,26.474.056/0001-71 -456,"Instituto Federal de Educação, Ciência e Tecnologia Sul-Rio-Grandense",IFSUL,Pública,Brasil,RS,Pelotas,Federal,Executivo,Autarquia,Sim,10.729.992/0004-99 -100920,"Instituto Federal de Educação, Ciência e Tecnologia Baiano ",IFBAIANO,Pública,Brasil,BA,Salvador,Federal,Executivo,Autarquia,Sim,10.724.903/0001-79 -100919,"Instituto Federal de Educação, Ciência e Tecnologia Catarinense ",IFC,Pública,Brasil,SO,Blumenau,Federal,Executivo,Autarquia,Sim,10.635.424/0001-86 -444,"Instituto Federal de Educação, Ciência e Tecnologia da Bahia ",IFBA ,Pública,Brasil,BA,Salvador,Federal,Executivo,Autarquia,Sim,10.764.307/0001-12 -100905,"Instituto Federal de Educação, Ciência e Tecnologia da Paraíba ",IFPB,Pública,Brasil,PB,João Pessoa,Federal,Executivo,Autarquia,Sim,10.783.898/0001-75 -100900,"Instituto Federal de Educação, Ciência e Tecnologia de Alagoas ",IFAL,Pública,Brasil,AL,Maceió,Federal,Executivo,Autarquia,Sim,10.825.373/0001-55 -94430,"Instituto Federal de Educação, Ciência e Tecnologia de Brasília ",IFB,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,10.791.831/0001-82 -451,"Instituto Federal de Educação, Ciência e Tecnologia de Goiás ",IFGO,Pública,Brasil,GO,Goiânia,Federal,Executivo,Autarquia,Sim,10.870.883/0001-44 -100914,"Instituto Federal de Educação, Ciência e Tecnologia de Minas Gerais ",IFMG,Pública,Brasil,MG,Belo Horizonte,Federal,Executivo,Autarquia,Sim,10.626.896/0001-72 -100922,"Instituto Federal de Educação, Ciência e Tecnologia de Pernambuco ",IFPE,Pública,Brasil,PE,Recife,Federal,Executivo,Autarquia,Sim,10.767.239/0001-45 -100907,"Instituto Federal de Educação, Ciência e Tecnologia de Rondônia ",IFRO,Pública,Brasil,RO,Porto Velho,Federal,Executivo,Autarquia,Sim,10.817.343/0001-05 -3561,"Instituto Federal de Educação, Ciência e Tecnologia de Roraima ",IFRR,Pública,Brasil,RR,Boa Vista,Federal,Executivo,Autarquia,Sim,10.839.508/0001-31 -455,"Instituto Federal de Educação, Ciência e Tecnologia de Santa Catarina ",IFSC,Pública,Brasil,SC,Florianópolis,Federal,Executivo,Autarquia,Sim,11.402.887/0001-60 -453,"Instituto Federal de Educação, Ciência e Tecnologia de São Paulo",IFSP,Pública,Brasil,SP,São Paulo,Federal,Executivo,Autarquia,Sim,10.882.594/0001-65 -100909,"Instituto Federal de Educação, Ciência e Tecnologia de Sergipe ",IFS,Pública,Brasil,SE,Aracaju,Federal,Executivo,Autarquia,Sim,10.728.444/0001-00 -94427,"Instituto Federal de Educação, Ciência e Tecnologia do Acre ",IFAC,Pública,Brasil,AC,Rio Branco,Federal,Executivo,Autarquia,Sim,10.918.674/0001-23 -94428,"Instituto Federal de Educação, Ciência e Tecnologia do Amapá ",IFAP,Pública,Brasil,AP,Macapá,Federal,Executivo,Autarquia,Sim,10.820.882/0001-95 -100910,"Instituto Federal de Educação, Ciência e Tecnologia do Amazonas ",IFAM,Pública,Brasil,AM,Manaus,Federal,Executivo,Autarquia,Sim,10.792.928/0001-00 -100911,"Instituto Federal de Educação, Ciência e Tecnologia do Ceará ",IFCE,Pública,Brasil,CE,Fortaleza,Federal,Executivo,Autarquia,Sim,10.744.098/0001-45 -100912,"Instituto Federal de Educação, Ciência e Tecnologia do Espírito Santo ",IFES,Pública,Brasil,ES,Vitória,Federal,Executivo,Autarquia,Sim,10.838.653/0001-06 -100921,"Instituto Federal de Educação, Ciência e Tecnologia do Maranhão ",IFMA,Pública,Brasil,MA,São Luis,Federal,Executivo,Autarquia,Sim,10.735.145/0001-94 -100916,"Instituto Federal de Educação, Ciência e Tecnologia de Mato Grosso ",IFMT,Pública,Brasil,MT,Cuiabá,Federal,Executivo,Autarquia,Sim,10.784.782/0001-50 -100904,"Instituto Federal de Educação, Ciência e Tecnologia do Mato Grosso do Sul ",IFMS,Pública,Brasil,MS,Campo Grande,Federal,Executivo,Autarquia,Sim,10.673.078/0001-20 -100901,"Instituto Federal de Educação, Ciência e Tecnologia do Norte de Minas Gerais ",IFNMG,Pública,Brasil,MG,Montes Claros,Federal,Executivo,Autarquia,Sim,10.727.655/0001-10 -100917,"Instituto Federal de Educação, Ciência e Tecnologia do Pará ",IFPA,Pública,Brasil,PA,Belém,Federal,Executivo,Autarquia,Sim,10.763.998/0001-30 -49103,"Instituto Federal de Educação, Ciência e Tecnologia do Paraná ",IFPR,Pública,Brasil,PR,Curitiba,Federal,Executivo,Autarquia,Sim,10.652.179/0001-15 -434,"Instituto Federal de Educação, Ciência e Tecnologia do Piauí ",IFPI,Pública,Brasil,PI,Teresina,Federal,Executivo,Autarquia,Sim,10.806.496/0001-49 -100930,"Instituto Federal de Educação, Ciência e Tecnologia do Rio de Janeiro ",IFRJ,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,10.952.708/0001-04 -439,"Instituto Federal de Educação, Ciência e Tecnologia do Rio Grande do Norte ",IFRN,Pública,Brasil,RN,Natal,Federal,Executivo,Autarquia,Sim,10.877.412/0001-68 -100918,"Instituto Federal de Educação, Ciência e Tecnologia do Rio Grande do Sul ",IFRS,Pública,Brasil,RS,Bento Gonçalves,Federal,Executivo,Autarquia,Sim,10.637.926/0001-46 -46784,"Instituto Federal de Educação, Ciência e Tecnologia do Sertão Pernambucano ",IFSERTAO-PE,Pública,Brasil,PE,Petrolina,Federal,Executivo,Autarquia,Sim,10.830.301/0001-04 -100902,"Instituto Federal de Educação, Ciência e Tecnologia do Sudeste de Minas Gerais ",IFMGSE,Pública,Brasil,MG,Juiz de Fora,Federal,Executivo,Autarquia,Sim,10.723.648/0002-20 -100915,"Instituto Federal de Educação, Ciência e Tecnologia do Sul de Minas Gerais ",IFSuldeminas,Pública,Brasil,MG,Pouso Alegre,Federal,Executivo,Autarquia,Sim,10.648.539/0001-05 -100908,"Instituto Federal de Educação, Ciência e Tecnologia doTocantins ",IFTO,Pública,Brasil,TO,Palmas,Federal,Executivo,Autarquia,Sim,10.742.006/0001-98 -100903,"Instituto Federal de Educação, Ciência e Tecnologia do Triângulo Mineiro ",IFTM,Pública,Brasil,MG,Uberaba,Federal,Executivo,Autarquia,Sim,10.695.891/0001-00 -100906,"Instituto Federal de Educação, Ciência e Tecnologia Farroupilha ",IFFarroupilha,Pública,Brasil,RS,São Vicente do Sul,Federal,Executivo,Autarquia,Sim,10.662.072/0001-58 -100931,"Instituto Federal de Educação, Ciência e Tecnologia Fluminense ",IFFluminense,Pública,Brasil,RJ,Campos dos Goytacazes,Federal,Executivo,Autarquia,Sim,10.779.511/0001-07 -100913,"Instituto Federal de Educação, Ciência e Tecnologia Goiano ",IFgoiano,Pública,Brasil,GO,Goiânia,Federal,Executivo,Autarquia,Sim,10.651.417/0001-78 -382,Instituto Nacional da Propriedade Industrial ,INPI,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,42.521.088/0009-94 -2409,Instituto Nacional de Câncer José Alencar Gomes da Silva ,INCA,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,00.394.544/0171-50 -14769,Instituto Nacional de Cardiologia ,INC/SAS,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,00.394.544/0213-44 -1799,Instituto Nacional de Colonização e Reforma Agrária ,INCRA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,00.375.972/0002-41 -249,Instituto Nacional de Estudos e Pesquisas Educacionais Anísio Teixeira ,INEP,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,01.678.363/0001-43 -2030,Instituto Nacional de Meteorologia ,INMET,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,00.396.895/0010-86 -240,"Instituto Nacional de Metrologia, Qualidade e Tecnologia ",INMETRO,Pública,Brasil,RJ,Duque de Caxias,Federal,Executivo,Autarquia,Sim,00.662.270/0003-20 -10,Instituto Nacional de Pesquisas Espaciais ,INPE,Pública,Brasil,SP,São José dos Campos,Federal,Executivo,Autarquia,Sim,01.263.896/0005-98 -11,Instituto Nacional de Pesquisas da Amazônia ,INPA,Pública,Brasil,AM,Manaus,Federal,Executivo,Autarquia,Sim,01.263.896/0015-60 -232,Instituto Nacional de Tecnologia ,INT,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,01.263.896/0004-07 -47388,Instituto Nacional de Tecnologia da Informação ,ITI,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,04.039.532/0002-74 -1934,Instituto Nacional do Seguro Social ,INSS,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,00.394.528/0004-35 -982,Laboratório Nacional de Computação Científica ,LNCC,Pública,Brasil,RJ,Petrópolis,Federal,Executivo,Administração Direta,Sim,04.079.233/0001-82 -14,"Ministério da Agricultura, Pecuária e Abastecimento ",MAPA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.396.895/0072-19 -1988,"Ministério da Ciência, Tecnologia e Inovação ",MCTI,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,03.132.745/0001-00 -1926,Ministério da Cultura ,MinC,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,01.264.142/0007-14 -41066,Ministério da Defesa ,MD,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.411/0005-32 -244,Ministério da Educação ,MEC,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.445/0001-01 -1929,Ministério da Fazenda ,MF,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.460/0185-12 -42670,Ministério da Integração Nacional ,MI ,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,03.353.358/0001-96 -316,Ministério da Justiça ,MJ,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.494/0018-84 -72083,Ministério da Pesca e Aquicultura ,MPA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,05.482.692/0001-75 -1930,Ministério da Previdência Social ,MPS,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.528/0001-92 -304,Ministério da Saúde ,MS,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.544/0127-87 -42672,Ministério das Cidades ,Mcidades,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,05.465.986/0001-99 -3159,Ministério das Comunicações ,MC,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.437/0004-08 -263,Ministério das Relações Exteriores ,MRE,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.437/0004-08 -2852,Ministério de Minas e Energia ,MME,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,37.115.383/0001-53 -17125,Ministério do Desenvolvimento Agrário ,MDA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,01.612.452/0001-97 -1945,Ministério do Desenvolvimento Social e Combate à Fome ,MDS,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,05.756.246/0001-01 -3162,"Ministério do Desenvolvimento, Indústria e Comércio Exterior ",MDIC,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.478/0001-43 -36670,Ministério do Esporte ,ME ,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,28.523.215/0001-06 -1927,Ministério do Meio Ambiente ,MMA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.411/0043-68 -2981,"Ministério do Planejamento, Orçamento e Gestão ",MPOG,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.489.828/0002-36 -2844,Ministério do Trabalho e Emprego ,MTE,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,37.115.367/0001-60 -72084,Ministério do Turismo ,Mtur,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,05.457.283/0001-19 -2846,Ministério dos Transportes,MT,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,37.115.342/0032-63 -24755,Museu de Astronomia e Ciências Afins ,MAST,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Administração Direta,Sim,16.714.695/0001-03 -24712,Museu Paraense Emílio Goeldi ,MPEG,Pública,Brasil,PA,Belém,Federal,Executivo,Administração Direta,Sim,04.108.782/0001-38 -346,Observatório Nacional ,ON,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Administração Direta,Sim,04.053.755/0001-05 -78,Procuradoria-Geral da Fazenda Nacional,PGFN,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.460/0216-53 -77,Secretaria da Receita Federal ,SRF,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.460/0058-53 -115257,Secretaria de Aviação Civil ,SAC,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,07.947.821/0001-89 -1801,Secretaria de Direitos Humanos ,SDH,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,05.478.625/0001-87 -3495,Secretaria de Logística e Tecnologia da Informação ,SLTI,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,10.498.974/0001-09 -119335,Secretaria Nacional do Consumidor ,SENACON,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.494/0005-60 -2032,Secretaria de Orçamento Federal ,SOF,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.489.828/0008-21 -92748,Secretaria de Portos da Presidência da República,SEP,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,08.855.874/0001-32 -1986,Secretaria do Patrimônio da União ,SPU,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.489.828/0009-02 -1696,Secretaria do Tesouro Nacional ,STN,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,00.394.460/0409-50 -42673,Secretaria-Geral da Presidência da República,SGPR,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,07.490.910/0001-49 -89539,Serviço Florestal Brasileiro ,SFB,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,37.115.375/0008-83 -166,Superintendência da Zona Franca de Manaus ,SUFRAMA,Pública,Brasil,AM,Manaus,Federal,Executivo,Autarquia,Sim,04.407.029/0001-43 -235,Superintendência de Seguros Privados ,SUSEP,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,42.354.068/0008-95 -91138,Superintendência do Desenvolvimento da Amazônia ,SUDAM,Pública,Brasil,PA,Belém,Federal,Executivo,Autarquia,Sim,09.203.665/0001-77 -100113,Superintendência do Desenvolvimento do Centro-Oeste ,SUDECO,Pública,Brasil,DF,Brasília,Federal,Executivo,Autarquia,Sim,13.802.028/0001-94 -91144,Superintendência do Desenvolvimento do Nordeste ,SUDENE,Pública,Brasil,PE,Recife,Federal,Executivo,Autarquia,Sim,09.263.130/0001-91 -105915,Superintendência Nacional de Previdência Complementar ,PREVIC,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Sim,07.290.290/0004-47 -109912,Universidade da Integração Internacional da Lusofonia Afro-Brasileira,UNILAB,Pública,Brasil,CE,Fortaleza,Federal,Executivo,Autarquia,Sim,12.397.930/0001-00 -421,Universidade Federal da Bahia ,UFBA,Pública,Brasil,BA,Salvador,Federal,Executivo,Autarquia,Sim,15.180.714/0001-04 -103730,Universidade Federal da Fronteira Sul ,UFFS,Pública,Brasil,SC,Chapecó,Federal,Executivo,Autarquia,Sim,11.234.780/0001-50 -105793,Universidade Federal da Integração Latino-Americana ,UNILA ,Pública,Brasil,PR,Foz Do Iguaçu,Federal,Executivo,Autarquia,Sim,11.806.275/0001-33 -419,Universidade Federal da Paraíba ,UFPB,Pública,Brasil,PB,João Pessoa,Federal,Executivo,Autarquia,Sim,24.098.477/0001-10 -420,Universidade Federal de Alagoas ,UFAL,Pública,Brasil,AL,Maceió,Federal,Executivo,Autarquia,Sim,24.464.109/0001-48 -461,Universidade Federal de Alfenas ,UNIFAL-MG,Pública,Brasil,MG,Alfenas,Federal,Executivo,Autarquia,Sim,17.879.859/0001-15 -67671,Universidade Federal de Campina Grande ,UFCG,Pública,Brasil,PB,Campina Grande,Federal,Executivo,Autarquia,Sim,05.055.128/0001-76 -422,Universidade Federal de Goiás ,UFG,Pública,Brasil,GO,Goiânia,Federal,Executivo,Autarquia,Sim,01.567.601/0001-43 -462,Universidade Federal de Itajubá ,UNIFEI,Pública,Brasil,MG,Itajubá,Federal,Executivo,Autarquia,Sim,21.040.001/0001-30 -424,Universidade Federal de Juiz de Fora ,UFJF,Pública,Brasil,MG,Juiz de Fora,Federal,Executivo,Autarquia,Sim,21.195.755/0001-69 -463,Universidade Federal de Lavras ,UFLA,Pública,Brasil,MG,Lavras,Federal,Executivo,Autarquia,Sim,22.078.679/0001-74 -423,Universidade Federal de Minas Gerais ,UFMG,Pública,Brasil,MG,Belo Horizonte,Federal,Executivo,Autarquia,Sim,17.217.985/0001-04 -473,Universidade Federal de Ouro Preto ,UFOP,Pública,Brasil,MG,Ouro Preto,Federal,Executivo,Autarquia,Sim,23.070.659/0001-10 -418,Universidade Federal de Pernambuco ,UFPE,Pública,Brasil,PE,Recife,Federal,Executivo,Autarquia,Sim,24.134.488/0001-08 -429,Universidade Federal de Santa Catarina ,UFSC,Pública,Brasil,SC,Florianópolis,Federal,Executivo,Autarquia,Sim,83.899.526/0001-82 -431,Universidade Federal de Santa Maria ,UFSM,Pública,Brasil,RS,Santa Maria,Federal,Executivo,Autarquia,Sim,95.591.764/0001-05 -464,Universidade Federal de São Paulo ,UNIFESP,Pública,Brasil,SP,São Paulo,Federal,Executivo,Autarquia,Sim,60.453.032/0001-74 -472,Universidade Federal de Uberlândia ,UFU,Pública,Brasil,MG,Uberlândia,Federal,Executivo,Autarquia,Sim,25.648.387/0001-18 -122391,Universidade Federal do Cariri ,UFCA,Pública,Brasil,CE,Juazeiro do Norte,Federal,Executivo,Autarquia,Sim,18.621.825/0001-99 -416,Universidade Federal do Ceará ,UFC,Pública,Brasil,CE,Fortaleza,Federal,Executivo,Autarquia,Sim,07.272.636/0001-31 -425,Universidade Federal do Espírito Santo ,UFES,Pública,Brasil,ES,Vitória,Federal,Executivo,Autarquia,Sim,32.479.123/0001-43 -260,Universidade Federal do Estado do Rio de Janeiro ,UNIRIO,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,34.023.077/0001-07 -104667,Universidade Federal do Oeste do Pará ,UFOPA,Pública,Brasil,PA,Santarém,Federal,Executivo,Autarquia,Sim,11.118.393/0001-59 -415,Universidade Federal do Pará ,UFPA,Pública,Brasil,PA,Belém,Federal,Executivo,Autarquia,Sim,34.621.748/0001-23 -428,Universidade Federal do Paraná ,UFPR,Pública,Brasil,PR,Curitiba,Federal,Executivo,Autarquia,Sim,75.095.679/0001-49 -84710,Universidade Federal do Recôncavo da Bahia ,UFRB,Pública,Brasil,BA,Cruz das Almas,Federal,Executivo,Autarquia,Sim,07.777.800/0001-62 -426,Universidade Federal do Rio de Janeiro ,UFRJ,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Sim,33.663.683/0001-16 -417,Universidade Federal do Rio Grande do Norte ,UFRN,Pública,Brasil,RN,Natal,Federal,Executivo,Autarquia,Sim,24.365.710/0001-83 -430,Universidade Federal do Rio Grande do Sul ,UFRGS,Pública,Brasil,RS,Porto Alegre,Federal,Executivo,Autarquia,Sim,92.969.856/0001-98 -122381,Universidade Federal do Sul e Sudeste do Pará ,UNIFESSPA,Pública,Brasil,PA,Marabá,Federal,Executivo,Autarquia,Sim,18.657.063/0001-80 -459,Universidade Federal do Triângulo Mineiro ,UFTM,Pública,Brasil,MG,Uberaba,Federal,Executivo,Autarquia,Sim,25.437.484/0002-42 -460,Universidade Federal dos Vales do Jequitinhonha e Mucuri ,UFVJM,Pública,Brasil,MG,Diamantina,Federal,Executivo,Autarquia,Sim,16.888.315/0001-57 -427,Universidade Federal Fluminense ,UFF ,Pública,Brasil,RJ,Niterói,Federal,Executivo,Autarquia,Sim,28.523.215/0001-06 -457,Universidade Federal Rural da Amazônia ,UFRA,Pública,Brasil,PA,Belém,Federal,Executivo,Autarquia,Sim,05.200.001/0001-01 -433,Universidade Federal Rural de Pernambuco ,UFRPE,Pública,Brasil,PE,Recife,Federal,Executivo,Autarquia,Sim,24.416.174/0001-06 -432,Universidade Federal Rural do Rio de Janeiro ,UFRRJ,Pública,Brasil,RJ,Seropédica,Federal,Executivo,Autarquia,Sim,29.427.465/0001-05 -458,Universidade Federal Rural do Semi-Árido ,UFERSA-RN,Pública,Brasil,RN,Mossoró,Federal,Executivo,Autarquia,Sim,24.529.265/0001-40 -454,Universidade Tecnológica Federal do Paraná ,UTFPR,Pública,Brasil,PR,Curitiba,Federal,Executivo,Autarquia,Sim,75.101.873/0001-90 -1800,"Engenharia, Construções e Ferrovias S.A",VALEC,Pública,Brasil,DF,Brasilia,Federal,Executivo,Empresa Pública,Sim,42.150.664/0001-87 -27,Gabinete de Segurança Institucional ,GSI,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Sim,09.399.736/0001-59 -2837,Casa Civil da Presidência da República,CC-PR,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Não,00.394.411/0001-09 -68487,Secretaria de Políticas de Promoção da Igualdade Racial da Presidência da República,SEPPIR,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Não,06.064.438/0001-10 -121813,Secretaria da Micro e Pequena Empresa,SMPE,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Não,18.299.670/0001-16 -91624,Secretaria de Comunicação Social da Presidência da República,SECOM-PR,Pública,Brasil,PR,Curitiba,Federal,Executivo,Administração Direta,Não,09.234.494/0001-43 -73212,Secretaria de Assuntos Estratégicos da Presidência da República,SAE/PR,Pública,Brasil,PR,Curitiba,Federal,Executivo,Administração Direta,Não,10.246.869/0001-74 -76917,Secretaria de Relações Institucionais da Presidência da República,SEPPIR,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Não,10.433.248/0001-08 -68487,Secretaria de Políticas para as Mulheres da Presidência da República,SPM,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Não,05.510.958/0001-46 -1408,Vice-Presidência da República,VPR,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Não,00.894.355/0001-71 -72582,Secretaria Nacional de Articulação,SNAS-SGPR,Pública,Brasil,PR,Brasilia,Federal,Executivo,Administração Direta,Não,08.962.126/0001-59 -81129,Conselho Nacional de Juventude,CNJ,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Não,07.421.906/0001-29 -115549,Secretaria de Aeroportos,SA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Não,00.394.460/0133-91 -473,Fundação Universidade Federal de Ouro Preto,UFOP,Pública,Brasil,MG,Ouro Preto,Federal,Executivo,Fundação,Não,23.070.659/0001-10 -476,Fundação Universidade Federal do Rio Grande,FURG,Pública,Brasil,RG,Rio Grande,Federal,Executivo,Fundação,Não,94.877.586/0001-10 -258,Hospital de Clínicas de Porto Alegre,HCPA,Pública,Brasil,RG,Porto Alegre,Federal,Executivo,Empresa Pública,Não,87.020.517/0001-20 -100902,"Instituto Federal de Educação, Ciência e Tecnologia Sudeste de Minas Gerais",IFMGSE,Pública,Brasil,MG,João Monlevade,Federal,Executivo,Autarquia,Não,10.723.648/0001-40 -456,"Instituto Federal de Educação, Ciência e Tecnologia Sul-Rio-Grandense",IFSul,Pública,Brasil,RS,Osório,Federal,Executivo,Autarquia,Não,10.729.992/0001-46 -100906,"Instituto Federal de Educação, Ciência e Tecnologia de Farroupilha",IFFAR,Pública,Brasil,RS,Santa Maria,Federal,Executivo,Autarquia,Não,10.662.072/0001-58 -100908,"Instituto Federal de Educação, Ciência e Tecnologia de Tocantins",IFTO,Pública,Brasil,TO,Palmas,Federal,Executivo,Autarquia,Não,10.742.006/0001-98 -47838,Centrais de Abastecimento de Minas Gerais S.A.,CEASA-MG,Pública,Brasil,MG,Governador Valadares,Federal,Executivo,Sociedade de Economia Mista,Não,17.504.325/0001-04 -2114,Companhia Nacional de Abastecimento,CONAB,Pública,Brasil,DF,Brasilia,Federal,Executivo,Empresa Pública,Não,26.461.699/0001-80 -47839,Companhia de Armazéns e Silos do Estado de Minas Gerais,CASEMG,Pública,Brasil,MG,Passos,Federal,Executivo,Sociedade de Economia Mista,Não,17.186.370/0065-22 -29415,Companhia de Entrepostos e Armazéns Gerais de São Paulo,CEAGESP,Pública,Brasil,SP,Vila Leopoldina,Federal,Executivo,Sociedade de Economia Mista,Não,62.463.005/0001-08 -25,Empresa Brasileira de Pesquisa Agropecuária,EMBRAPA,Pública,Brasil,DF,Brasilia,Federal,Executivo,Empresa Pública,Não,00.348.003/0001-10 -98519,Centro Nacional de Tecnologia Eletrônica Avançada S. A,CEITEC/S.A.,Pública,Brasil,RS,Lomba Pinheiro,Federal,Executivo,Empresa Pública,Não,05.114.927/0001-76 -223,Comissão Nacional de Energia Nuclear,CNEN,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Não,00.402.552/0001-26 -228,Indústrias Nucleares do Brasil S/A,INB,Pública,Brasil,DF,Brasilia,Federal,Executivo,Sociedade de Economia Mista,Não,00.322.818/0038-12 -48739,Nuclebrás Equipamentos Pesados S/A,NUCLEP,Pública,Brasil,RJ,Castelo,Federal,Executivo,Sociedade de Economia Mista,Não,42.515.882/0003-30 -1,Financiadora de Estudos e Projetos,FINEP,Pública,Brasil,DF,Brasilia,Federal,Executivo,Empresa Pública,Não,88.630.413/0002-81 -1782,Fundação Cultural Palmares,FCP,Pública,Brasil,DF,Brasilia,Federal,Executivo,Fundação,Não,32.901.688/0001-77 -930,Caixa de Financiamento Imobiliário da Aeronáutica,CFIAE,Pública,Brasil,RJ,Rio de Janeiro,Federal,Executivo,Autarquia,Não,30.496.004/0001-73 -185,Comando da Marinha,CMAR,Pública,Brasil,DF,Brasilia,Federal,Executivo,Administração Direta,Não,00.394.502/0001-44 -200949,Amazônia Azul Tecnologias de Defesa S.A.,AMAZUL,Pública,Brasil,DF,Brasilia,Federal,Executivo,Empresa Pública,Não,18.910.028/0001-21 -208,Caixa de Construções de Casas para o Pessoal da Marinha,CCCPCM,Pública,Brasil,DF,Brasilia,Federal,Executivo,Autarquia,Não,03.332.937/0001-52 -957,Fundação Habitacional do Exército,FHE,Pública,Brasil,DF,Brasilia,Federal,Executivo,Fundação Pública,Não,00.643.742/0001-35 -8406,Fundação Osório,FOSORIO,Pública,Brasil,DF,Brasilia,Federal,Executivo,Fundação Pública,Não,34.143.842/0001-14 -134,Indústria de Material Bélico do Brasil,IMBEL,Pública,Brasil,DF,Brasilia,Federal,Executivo,Empresa Pública,Não,00.444.232/0001-39 -445,Centro Federal de Educação Tecnológica de Minas Gerais,CEFET-MG,Pública,Brasil,MG,Belo Horizonte,Federal,Executivo,Autarquia,Não,17.220.203/0001-96 -117267,Empresa Brasileira de Serviços Hospitalares,EBSERH,Pública,Brasil,MG,Belo Horizonte,Federal,Executivo,Empresa Pública,Não,15.126.437/0001-43 diff --git a/src/spb_migrations/lib/spb_migrations_plugin.rb b/src/spb_migrations/lib/spb_migrations_plugin.rb deleted file mode 100644 index fc7c7d2..0000000 --- a/src/spb_migrations/lib/spb_migrations_plugin.rb +++ /dev/null @@ -1,13 +0,0 @@ -class SpbMigrationsPlugin < Noosfero::Plugin - - def self.plugin_name - # FIXME - "SpbMigrationsPlugin" - end - - def self.plugin_description - # FIXME - _("A plugin that does this and that.") - end - -end -- libgit2 0.21.2