diff --git a/plugins/bsc/controllers/bsc_plugin_admin_controller.rb b/plugins/bsc/controllers/bsc_plugin_admin_controller.rb deleted file mode 100644 index c13366d..0000000 --- a/plugins/bsc/controllers/bsc_plugin_admin_controller.rb +++ /dev/null @@ -1,37 +0,0 @@ -class BscPluginAdminController < AdminController - - include BscPlugin::BscHelper - - def new - @bsc = BscPlugin::Bsc.new(params[:profile_data]) - if request.post? && @bsc.valid? - @bsc.user = current_user - @bsc.save! - @bsc.add_admin(user) - session[:notice] = _('Your Bsc was created.') - redirect_to :controller => 'profile_editor', :profile => @bsc.identifier - end - end - - def save_validations - enterprises = [Enterprise.find(params[:q].split(','))].flatten - - begin - enterprises.each { |enterprise| enterprise.validated = true ; enterprise.save! } - session[:notice] = _('Enterprises validated.') - redirect_to :controller => 'admin_panel' - rescue Exception => ex - session[:notice] = _('Enterprise validations couldn\'t be saved.') - logger.info ex - redirect_to :action => 'validate_enterprises' - end - end - - def search_enterprise - render :text => Enterprise.not_validated.find(:all, :conditions => ["type <> 'BscPlugin::Bsc' AND (name LIKE ? OR identifier LIKE ?)", "%#{params[:q]}%", "%#{params[:q]}%"]). - map {|enterprise| {:id => enterprise.id, :name => enterprise.name} }. - to_json - end - -end - diff --git a/plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb b/plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb deleted file mode 100644 index 68d0bca..0000000 --- a/plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb +++ /dev/null @@ -1,215 +0,0 @@ -class BscPluginMyprofileController < MyProfileController - - include BscPlugin::BscHelper - - def manage_associated_enterprises - @associated_enterprises = profile.enterprises - @pending_enterprises = profile.enterprise_requests.pending.map(&:enterprise) - end - - def search_enterprise - render :text => environment.enterprises.find(:all, :conditions => ["type <> 'BscPlugin::Bsc' AND (LOWER(name) LIKE ? OR LOWER(identifier) LIKE ?) AND (identifier NOT LIKE ?)", "%#{params[:q]}%", "%#{params[:q]}%", "%_template"]). - select { |enterprise| enterprise.bsc.nil? && !profile.already_requested?(enterprise)}. - map {|enterprise| {:id => enterprise.id, :name => enterprise.name} }. - to_json - end - - def save_associations - enterprises = [Enterprise.find(params[:q].split(','))].flatten - to_remove = profile.enterprises - enterprises - to_add = enterprises - profile.enterprises - - to_remove.each do |enterprise| - enterprise.bsc = nil - enterprise.save! - profile.enterprises.delete(enterprise) - end - - to_add.each do |enterprise| - if enterprise.enabled - BscPlugin::AssociateEnterprise.create!(:requestor => user, :target => enterprise, :bsc => profile) - else - enterprise.bsc = profile - enterprise.save! - profile.enterprises << enterprise - end - end - - session[:notice] = _('This Bsc associations were saved successfully.') - begin - redirect_to :controller => 'profile_editor' - rescue Exception => ex - session[:notice] = _('This Bsc associations couldn\'t be saved.') - logger.info ex - redirect_to :action => 'manage_associated_enterprises' - end - end - - def similar_enterprises - name = params[:name] - city = params[:city] - - result = [] - if !name.blank? - enterprises = (profile.environment.enterprises - profile.enterprises).select { |enterprise| enterprise.bsc_id.nil? && enterprise.city == city && enterprise.name.downcase.include?(name.downcase)} - result = enterprises.inject(result) {|result, enterprise| result << [enterprise.id, enterprise.name]} - end - render :text => result.to_json - end - - def transfer_ownership - role = Profile::Roles.admin(profile.environment.id) - @roles = [role] - if request.post? - person = Person.find(params['q_'+role.key]) - - profile.admins.map { |admin| profile.remove_admin(admin) } - profile.add_admin(person) - - BscPlugin::Mailer.deliver_admin_notification(person, profile) - - session[:notice] = _('Enterprise ownership transferred.') - redirect_to :controller => 'profile_editor' - end - end - - def create_enterprise - @create_enterprise = CreateEnterprise.new(params[:create_enterprise]) - @create_enterprise.requestor = user - @create_enterprise.target = environment - @create_enterprise.bsc_id = profile.id - @create_enterprise.enabled = true - @create_enterprise.validated = false - if request.post? && @create_enterprise.valid? - @create_enterprise.perform - session[:notice] = _('Enterprise was created in association with %s.') % profile.name - redirect_to :controller => 'profile_editor', :profile => @create_enterprise.identifier - end - end - - def manage_contracts - self.class.no_design_blocks - @sorting = params[:sorting] || 'created_at asc' - sorted_by = @sorting.split(' ').first - sort_direction = @sorting.split(' ').last - @status = params[:status] || BscPlugin::Contract::Status.types.map { |s| s.to_s } - @contracts = profile.contracts. - status(@status). - sorted_by(sorted_by, sort_direction). - paginate(:per_page => contracts_per_page, :page => params[:page]) - end - - def new_contract - if !request.post? - @contract = BscPlugin::Contract.new - else - @contract = BscPlugin::Contract.new(params[:contract]) - @contract.bsc = profile - sales = params[:sales] ? params[:sales].map {|key, value| value} : [] - sales.reject! {|sale| sale[:product_id].blank?} - - if @contract.save! - enterprises_ids = params[:enterprises] || '' - enterprises_ids.split(',').each { |id| @contract.enterprises << Enterprise.find(id) } - @failed_sales = @contract.save_sales(sales) - - if @failed_sales.blank? - session[:notice] = _('Contract created.') - redirect_to :action => 'manage_contracts' - else - session[:notice] = _('Contract created but some products could not be added.') - redirect_to :action => 'edit_contract', :contract_id => @contract.id - end - end - end - end - - def view_contract - begin - @contract = BscPlugin::Contract.find(params[:contract_id]) - rescue - session[:notice] = _('Contract doesn\'t exists! Maybe it was already removed.') - redirect_to :action => 'manage_contracts' - end - end - - def edit_contract - begin - @contract = BscPlugin::Contract.find(params[:contract_id]) - rescue - session[:notice] = _('Could not edit such contract.') - redirect_to :action => 'manage_contracts' - end - if request.post? && @contract.update_attributes(params[:contract]) - - # updating associated enterprises - enterprises_ids = params[:enterprises] || '' - enterprises = [Enterprise.find(enterprises_ids.split(','))].flatten - to_remove = @contract.enterprises - enterprises - to_add = enterprises - @contract.enterprises - to_remove.each { |enterprise| @contract.enterprises.delete(enterprise)} - to_add.each { |enterprise| @contract.enterprises << enterprise } - - # updating sales - sales = params[:sales] ? params[:sales].map {|key, value| value} : [] - sales.reject! {|sale| sale[:product_id].blank?} - products = [Product.find(sales.map { |sale| sale[:product_id] })].flatten - to_remove = @contract.products - products - to_keep = sales.select { |sale| @contract.products.include?(Product.find(sale[:product_id])) } - - to_keep.each do |sale_attrs| - sale = @contract.sales.find_by_product_id(sale_attrs[:product_id]) - sale.update_attributes!(sale_attrs) - sales.delete(sale_attrs) - end - - to_remove.each { |product| @contract.sales.find_by_product_id(product.id).destroy } - @failed_sales = @contract.save_sales(sales) - - if @failed_sales.blank? - session[:notice] = _('Contract edited.') - redirect_to :action => 'manage_contracts' - else - session[:notice] = _('Contract edited but some products could not be added.') - redirect_to :action => 'edit_contract', :contract_id => @contract.id - end - end - end - - def destroy_contract - begin - contract = BscPlugin::Contract.find(params[:contract_id]) - contract.destroy - session[:notice] = _('Contract removed.') - rescue - session[:notice] = _('Contract could not be removed. Sorry! ^^') - end - redirect_to :action => 'manage_contracts' - end - - def search_contract_enterprises - render :text => profile.enterprises.find(:all, :conditions => ["(LOWER(name) LIKE ? OR LOWER(identifier) LIKE ?)", "%#{params[:enterprises]}%", "%#{params[:enterprises]}%"]). - map {|enterprise| {:id => enterprise.id, :name => enterprise.short_name(60)} }. - to_json - end - - def search_sale_product - query = params[:sales].map {|key, value| value}[0][:product_id] - enterprises = (params[:enterprises] || []).split(',') - enterprises = enterprises.blank? ? -1 : enterprises - added_products = (params[:added_products] || []).split(',') - added_products = added_products.blank? ? -1 : added_products - render :text => Product.find(:all, :conditions => ["LOWER(name) LIKE ? AND profile_id IN (?) AND id NOT IN (?)", "%#{query}%", enterprises, added_products]). - map {|product| { :id => product.id, - :name => short_text(product_display_name(product), 60), - :sale_id => params[:sale_id], - :product_price => product.price || 0 }}. - to_json - end - - private - - def contracts_per_page - 15 - end -end diff --git a/plugins/bsc/db/migrate/20110609143043_add_bsc_to_enterprise.rb b/plugins/bsc/db/migrate/20110609143043_add_bsc_to_enterprise.rb deleted file mode 100644 index bad72c5..0000000 --- a/plugins/bsc/db/migrate/20110609143043_add_bsc_to_enterprise.rb +++ /dev/null @@ -1,9 +0,0 @@ -class AddBscToEnterprise < ActiveRecord::Migration - def self.up - add_column :profiles, :bsc_id, :integer - end - - def self.down - remove_column :profiles, :bsc_id - end -end diff --git a/plugins/bsc/db/migrate/20110610145112_add_bsc_fields.rb b/plugins/bsc/db/migrate/20110610145112_add_bsc_fields.rb deleted file mode 100644 index 3d5cafe..0000000 --- a/plugins/bsc/db/migrate/20110610145112_add_bsc_fields.rb +++ /dev/null @@ -1,9 +0,0 @@ -class AddBscFields < ActiveRecord::Migration - def self.up - add_column :profiles, :company_name, :string - end - - def self.down - remove_column :profiles, :company_name - end -end diff --git a/plugins/bsc/db/migrate/20110614183624_add_bsc_to_tasks.rb b/plugins/bsc/db/migrate/20110614183624_add_bsc_to_tasks.rb deleted file mode 100644 index be61e14..0000000 --- a/plugins/bsc/db/migrate/20110614183624_add_bsc_to_tasks.rb +++ /dev/null @@ -1,9 +0,0 @@ -class AddBscToTasks < ActiveRecord::Migration - def self.up - add_column :tasks, :bsc_id, :integer - end - - def self.down - remove_column :tasks, :bsc_id - end -end diff --git a/plugins/bsc/db/migrate/20111018201143_create_bsc_plugin_sale.rb b/plugins/bsc/db/migrate/20111018201143_create_bsc_plugin_sale.rb deleted file mode 100644 index 57f784f..0000000 --- a/plugins/bsc/db/migrate/20111018201143_create_bsc_plugin_sale.rb +++ /dev/null @@ -1,15 +0,0 @@ -class CreateBscPluginSale < ActiveRecord::Migration - def self.up - create_table :bsc_plugin_sales do |t| - t.references :product, :null => false - t.references :contract, :null => false - t.integer :quantity, :null => false - t.decimal :price - t.timestamps - end - end - - def self.down - drop_table :bsc_plugin_sales - end -end diff --git a/plugins/bsc/db/migrate/20111018201220_create_bsc_plugin_contracts_enterprises.rb b/plugins/bsc/db/migrate/20111018201220_create_bsc_plugin_contracts_enterprises.rb deleted file mode 100644 index bd9b07a..0000000 --- a/plugins/bsc/db/migrate/20111018201220_create_bsc_plugin_contracts_enterprises.rb +++ /dev/null @@ -1,12 +0,0 @@ -class CreateBscPluginContractsEnterprises < ActiveRecord::Migration - def self.up - create_table :bsc_plugin_contracts_enterprises, :id => false do |t| - t.references :contract - t.references :enterprise - end - end - - def self.down - drop_table :bsc_plugin_contracts_enterprises - end -end diff --git a/plugins/bsc/db/migrate/20111018201239_create_bsc_plugin_contract.rb b/plugins/bsc/db/migrate/20111018201239_create_bsc_plugin_contract.rb deleted file mode 100644 index d16faa4..0000000 --- a/plugins/bsc/db/migrate/20111018201239_create_bsc_plugin_contract.rb +++ /dev/null @@ -1,22 +0,0 @@ -class CreateBscPluginContract < ActiveRecord::Migration - def self.up - create_table :bsc_plugin_contracts do |t| - t.string :client_name - t.integer :client_type - t.integer :business_type - t.string :state - t.string :city - t.integer :status, :default => 0 - t.integer :number_of_producers, :default => 0 - t.datetime :supply_start - t.datetime :supply_end - t.text :annotations - t.references :bsc - t.timestamps - end - end - - def self.down - drop_table :bsc_plugin_contracts - end -end diff --git a/plugins/bsc/features/bsc.feature b/plugins/bsc/features/bsc.feature deleted file mode 100644 index 6ffbd38..0000000 --- a/plugins/bsc/features/bsc.feature +++ /dev/null @@ -1,164 +0,0 @@ -Feature: bsc - - Background: - Given "Bsc" plugin is enabled - - Scenario: display link to bsc creation on admin panel when bsc plugin active - Given I am logged in as admin - When I am on the environment control panel - Then I should see "Create Bsc" - When "Bsc" plugin is disabled - And I am on the environment control panel - Then I should not see "Create Bsc" - - Scenario: be able to create a bsc - Given I am logged in as admin - And I am on the environment control panel - And I follow "Create Bsc" - And I fill in the following: - | Business name | Sample Bsc | - | Company name | Sample Bsc | - | profile_data_identifier | sample-identifier | - | Cnpj | 07.970.746/0001-77 | - When I press "Save" - Then there should be a profile named "Sample Bsc" - - Scenario: display a button on bsc control panel to manage associated enterprises - Given the folllowing "bsc" from "bsc_plugin" - | business_name | identifier | company_name | cnpj | - | Bsc Test | bsc-test | Bsc Test Ltda | 94.132.024/0001-48 | - And I am logged in as admin - When I am on Bsc Test's control panel - Then I should see "Manage associated enterprises" - - Scenario: display a button on bsc control panel to transfer ownership - Given the folllowing "bsc" from "bsc_plugin" - | business_name | identifier | company_name | cnpj | - | Bsc Test | bsc-test | Bsc Test Ltda | 94.132.024/0001-48 | - And I am logged in as admin - When I am on Bsc Test's control panel - Then I should see "Transfer ownership" - - Scenario: create a new enterprise already associated with a bsc - Given the following user - | login | name | - | pedro-silva | Pedro Silva | - And the folllowing "bsc" from "bsc_plugin" - | business_name | identifier | company_name | cnpj | owner | - | Bsc Test | bsc-test | Bsc Test Ltda | 94.132.024/0001-48 | pedro-silva | - And organization_approval_method is "none" on environment - And I am logged in as "pedro-silva" - And I am on Bsc Test's control panel - And I follow "Manage associated enterprises" - And I follow "Add new enterprise" - And I fill in the following: - | Name | Associated Enterprise | - | Address | associated-enterprise | - When I press "Save" - Then "Associated Enterprise" should be associated with "Bsc Test" - - Scenario: do not display "add new product" button - Given the following user - | login | name | - | pedro-silva | Pedro Silva | - And the folllowing "bsc" from "bsc_plugin" - | business_name | identifier | company_name | cnpj | owner | - | Bsc Test | bsc-test | Bsc Test Ltda | 94.132.024/0001-48 | pedro-silva | - And feature "disable_products_for_enterprises" is disabled on environment - And I am logged in as "pedro-silva" - And I am on Bsc Test's control panel - When I follow "Manage Products/Services" - Then I should not see "New product or service" - - Scenario: display bsc's enterprises' products name on the bsc catalog - Given the following user - | login | name | - | pedro-silva | Pedro Silva | - And the folllowing "bsc" from "bsc_plugin" - | business_name | identifier | company_name | cnpj | owner | - | Bsc Test | bsc-test | Bsc Test Ltda | 94.132.024/0001-48 | pedro-silva | - And the following enterprise - | identifier | name | - | sample-enterprise | Sample Enterprise | - And the following product_category - | name | - | bike | - And the following products - | owner | category | name | - | sample-enterprise | bike | Master Bike | - And "Sample Enterprise" is associated with "Bsc Test" - And I am logged in as "pedro-silva" - When I go to Bsc Test's products page - Then I should see "Master Bike" - And I should see "Sample Enterprise" - - Scenario: display enterprise name linked only if person is member of any Bsc - Given the folllowing "bsc" from "bsc_plugin" - | business_name | identifier | company_name | cnpj | - | Bsc Test | bsc-test | Bsc Test Ltda | 94.132.024/0001-48 | - | Another Bsc | another-bsc | Another Bsc Test Ltda | 07.970.746/0001-77 | - And the following enterprise - | identifier | name | - | sample-enterprise | Sample Enterprise | - And the following product_category - | name | - | bike | - And the following products - | owner | category | name | - | sample-enterprise | bike | Master Bike | - And "Sample Enterprise" is associated with "Bsc Test" - And the folllowing "bsc" from "bsc_plugin" - | business_name | identifier | company_name | cnpj | - And the following user - | login | name | - | pedro | Pedro Souto | - | maria | Maria Souto | - And pedro is member of another-bsc - And I am logged in as "pedro" - When I go to Bsc Test's products page - Then I should see "Sample Enterprise" - And I should see "Sample Enterprise" within "a.bsc-catalog-enterprise-link" - But I am logged in as "maria" - When I go to Bsc Test's products page - Then I should see "Sample Enterprise" - #TODO -> test that it's not a link - - Scenario: allow only environment administrators to delete bsc profile - Given the folllowing "bsc" from "bsc_plugin" - | business_name | identifier | company_name | cnpj | - | Bsc Test | bsc-test | Bsc Test Ltda | 94.132.024/0001-48 | - And the following user - | login | name | - | pedro | Pedro Souto | - And "Pedro Souto" is admin of "Bsc Test" - And I am logged in as "pedro" - And I am on Bsc Test's control panel - And I follow "Bsc info and settings" - When I follow "Delete profile" - Then I should see "Access denied" - And "Bsc Test" profile should exist - But I am logged in as admin - And I am on Bsc Test's control panel - And I follow "Bsc info and settings" - When I follow "Delete profile" - Then I should see "Deleting profile Bsc Test" - And I follow "Yes, I am sure" - Then "Bsc Test" profile should not exist - - # Like we can believe that selenium is going to work... - @selenium - Scenario: list already associated enterprises on manage associated enterprises - Given the folllowing "bsc" from "bsc_plugin" - | business_name | identifier | company_name | cnpj | - | Bsc Test | bsc-test | Bsc Test Ltda | 94.132.024/0001-48 | - And the following enterprises - | identifier | name | - | enterprise-1 | Enterprise 1 | - | enterprise-2 | Enterprise 2 | - And "Enterprise 1" is associated with "Bsc Test" - And "Enterprise 2" is associated with "Bsc Test" - And I am logged in as admin - And I am on Bsc Test's control panel - When I follow "Manage associated enterprises" - Then I should see "Enterprise 1" - And I should see "Enterprise 2" diff --git a/plugins/bsc/features/contract.feature b/plugins/bsc/features/contract.feature deleted file mode 100644 index c242a17..0000000 --- a/plugins/bsc/features/contract.feature +++ /dev/null @@ -1,21 +0,0 @@ -Feature: Bsc contract -As a Bsc admin -I would like to register a contract -In order to make negotiations - - Background: - Given "Bsc" plugin is enabled - And the folllowing "bsc" from "bsc_plugin" - | business_name | identifier | company_name | cnpj | - | Bsc Test | bsc-test | Bsc Test Ltda | 94.132.024/0001-48 | - And I am logged in as admin - - Scenario: be able see the manage contracts button only if the profile is a Bsc - Given the following community - | name | identifier | - | Sample Community | sample-community | - When I am on Sample Community's control panel - Then I should not see "Manage contracts" - But I am on Bsc Test's control panel - Then I should see "Manage contracts" - diff --git a/plugins/bsc/install.rb b/plugins/bsc/install.rb deleted file mode 100644 index f960f51..0000000 --- a/plugins/bsc/install.rb +++ /dev/null @@ -1 +0,0 @@ -raise "Not ready yet" diff --git a/plugins/bsc/lib/bsc_plugin.rb b/plugins/bsc/lib/bsc_plugin.rb deleted file mode 100644 index 17eca13..0000000 --- a/plugins/bsc/lib/bsc_plugin.rb +++ /dev/null @@ -1,130 +0,0 @@ -class BscPlugin < Noosfero::Plugin - - Bsc - - def self.plugin_name - "Bsc" - end - - def self.plugin_description - _("Adds the Bsc feature") - end - - def admin_panel_links - [{:title => _('Create Bsc'), :url => {:controller => 'bsc_plugin_admin', :action => 'new'}}, - {:title => _('Validate Enterprises'), :url => {:controller => 'bsc_plugin_admin', :action => 'validate_enterprises'}} ] - end - - def control_panel_buttons - buttons = [] - buttons << {:title => _("Manage associated enterprises"), :icon => 'bsc-enterprises', :url => {:controller => 'bsc_plugin_myprofile', :action => 'manage_associated_enterprises'}} if bsc?(context.profile) - buttons << {:title => _('Transfer ownership'), :icon => 'transfer-enterprise-ownership', :url => {:controller => 'bsc_plugin_myprofile', :action => 'transfer_ownership'}} if context.profile.enterprise? - buttons << {:title => _("Manage contracts"), :icon => '', :url => {:controller => 'bsc_plugin_myprofile', :action => 'manage_contracts'}} if bsc?(context.profile) - buttons - end - - def manage_members_extra_buttons - {:title => _('Transfer ownership'), :icon => '', :url => {:controller => 'bsc_plugin_myprofile', :action => 'transfer_enterprises_management'}} if context.profile.enterprise? - end - - def stylesheet? - true - end - - def catalog_list_item_extras(product) - if bsc?(context.profile) - enterprise = product.enterprise - if is_member_of_any_bsc?(context.user) - lambda {link_to(enterprise.short_name, enterprise.url, :class => 'bsc-catalog-enterprise-link')} - else - lambda {enterprise.short_name} - end - end - end - - def profile_controller_filters - if profile - special_enterprise = profile.enterprise? && !profile.validated && profile.bsc - is_member_of_any_bsc = is_member_of_any_bsc?(context.user) - block = lambda { - render_access_denied if special_enterprise && !is_member_of_any_bsc - } - - [{ :type => 'before_filter', :method_name => 'bsc_access', :block => block }] - else - [] - end - end - - def content_viewer_controller_filters - if profile - special_enterprise = profile.enterprise? && !profile.validated && profile.bsc - is_member_of_any_bsc = is_member_of_any_bsc?(context.user) - block = lambda { - render_access_denied if special_enterprise && !is_member_of_any_bsc - } - - [{ :type => 'before_filter', :method_name => 'bsc_access', :block => block }] - else - [] - end - end - - def profile_editor_controller_filters - if context.user - is_not_admin = !context.environment.admins.include?(context.user) - [{ :type => 'before_filter', - :method_name => 'bsc_destroy_access', - :options => {:only => :destroy_profile}, - :block => lambda { render_access_denied if is_not_admin } }] - else - [] - end - end - - def manage_products_controller_filters - if bsc?(profile) - [{ :type => 'before_filter', - :method_name => 'manage_products_bsc_destroy_access', - :options => {:only => :destroy}, - :block => lambda { render_access_denied } }] - else - [] - end - end - - def asset_product_properties(product) - properties = [] - properties << { :name => _('Bsc'), :content => lambda { link_to(product.bsc.name, product.bsc.url) } } if product.bsc - if product.enterprise.validated || is_member_of_any_bsc?(context.user) - content = lambda { link_to_homepage(product.enterprise.name, product.enterprise.identifier) } - else - content = lambda { product.enterprise.name } - end - properties << { :name => c_('Supplier'), :content => content } - end - - def profile_tabs - if bsc?(context.profile) - { :title => _("Contact"), - :id => 'bsc-contact', - :content => lambda { render :partial => 'profile_tab' }, - :start => true } - end - end - - private - - def bsc?(profile) - profile.kind_of?(BscPlugin::Bsc) - end - - def is_member_of_any_bsc?(user) - BscPlugin::Bsc.all.any? { |bsc| bsc.members.include?(user) } - end - - def profile - context.environment.profiles.find_by_identifier(context.params[:profile]) - end - -end diff --git a/plugins/bsc/lib/bsc_plugin/associate_enterprise.rb b/plugins/bsc/lib/bsc_plugin/associate_enterprise.rb deleted file mode 100644 index c0a05de..0000000 --- a/plugins/bsc/lib/bsc_plugin/associate_enterprise.rb +++ /dev/null @@ -1,49 +0,0 @@ -class BscPlugin::AssociateEnterprise < Task - - alias :enterprise :target - - belongs_to :bsc, :class_name => 'BscPlugin::Bsc' - - validates_presence_of :bsc - - def title - _("BSC association") - end - - def linked_subject - {:text => bsc.name, :url => bsc.url} - end - - def information - {:message => _('%{requestor} wants to associate this enterprise with %{linked_subject}.')} - end - - def icon - src = bsc.image ? bsc.image.public_filename(:minor) : '/images/icons-app/enterprise-minor.png' - {:type => :defined_image, :src => src, :name => bsc.name} - end - - def reject_details - true - end - - def perform - bsc.enterprises << enterprise - end - - def task_finished_message - _('%{enterprise} accepted your request to associate it with %{bsc}.') % {:enterprise => enterprise.name, :bsc => bsc.name} - end - - def task_cancelled_message - message = _("%{enterprise} rejected your request to associate it with %{bsc}.") % {:enterprise => enterprise.name, :bsc => bsc.name} - if !reject_explanation.blank? - message += " " + _("Here is the reject explanation left by the administrator:\n\n%{reject_explanation}") % {:reject_explanation => reject_explanation} - end - end - - def target_notification_message - _('%{requestor} wants assoaciate %{bsc} as your BSC.') % {:requestor => requestor.name, :enterprise => enterprise.name, :bsc => bsc.name} - end - -end diff --git a/plugins/bsc/lib/bsc_plugin/bsc.rb b/plugins/bsc/lib/bsc_plugin/bsc.rb deleted file mode 100644 index 84f5366..0000000 --- a/plugins/bsc/lib/bsc_plugin/bsc.rb +++ /dev/null @@ -1,39 +0,0 @@ -class BscPlugin::Bsc < Enterprise - - has_many :enterprises - has_many :enterprise_requests, :class_name => 'BscPlugin::AssociateEnterprise' - has_many :products, :finder_sql => 'select * from products where profile_id in (#{enterprises.map(&:id).join(",")})' - has_many :contracts, :class_name => 'BscPlugin::Contract' - - validates_presence_of :nickname - validates_presence_of :company_name - validates_presence_of :cnpj - validates_uniqueness_of :nickname - validates_uniqueness_of :company_name - validates_uniqueness_of :cnpj - - before_validation do |bsc| - bsc.name = bsc.business_name || 'Sample name' - end - - def already_requested?(enterprise) - enterprise_requests.pending.map(&:enterprise).include?(enterprise) - end - - def enterprises_to_token_input - enterprises.map { |enterprise| {:id => enterprise.id, :name => enterprise.name} } - end - - def control_panel_settings_button - {:title => _('Bsc info and settings'), :icon => 'edit-profile-enterprise'} - end - - def create_product? - false - end - - def self.identification - 'Bsc' - end - -end diff --git a/plugins/bsc/lib/bsc_plugin/bsc_helper.rb b/plugins/bsc/lib/bsc_plugin/bsc_helper.rb deleted file mode 100644 index 01da4c4..0000000 --- a/plugins/bsc/lib/bsc_plugin/bsc_helper.rb +++ /dev/null @@ -1,76 +0,0 @@ -module BscPlugin::BscHelper - include ActionView::Helpers::FormTagHelper - include ActionView::Helpers::TextHelper - - def token_input_field_tag(name, element_id, search_action, options = {}, text_field_options = {}, html_options = {}) - options[:min_chars] ||= 3 - options[:hint_text] ||= c_("Type in a search term") - options[:no_results_text] ||= c_("No results") - options[:searching_text] ||= c_("Searching...") - options[:search_delay] ||= 1000 - options[:prevent_duplicates] ||= true - options[:backspace_delete_item] ||= false - options[:focus] ||= false - options[:avoid_enter] ||= true - options[:on_result] ||= 'null' - options[:on_add] ||= 'null' - options[:on_delete] ||= 'null' - options[:on_ready] ||= 'null' - - result = text_field_tag(name, nil, text_field_options.merge(html_options.merge({:id => element_id}))) - result += - " - " - result - end - - def product_display_name(product) - "#{product.name} (#{product.enterprise.name})" - end - - def display_text_field(name, value, options={:display_nil => false, :nil_symbol => '---'}) - value = value.to_s - if !value.blank? || options[:display_nil] - value = value.blank? ? options[:nil_symbol] : value - content_tag('tr', content_tag('td', name+': ', :class => 'bsc-field-label') + content_tag('td', value, :class => 'bsc-field-value')) - end - end - - def display_list_field(list, options={:nil_symbol => '---'}) - list.map do |item| - item = item.blank? ? options[:nil_symbol] : item - content_tag('tr', content_tag('td', item, :class => 'bsc-field-value')) - end.join - end - - def short_text(name, chars = 40) - truncate name, :length => chars, :omission => '...' - end - -end diff --git a/plugins/bsc/lib/bsc_plugin/contract.rb b/plugins/bsc/lib/bsc_plugin/contract.rb deleted file mode 100644 index d89cf60..0000000 --- a/plugins/bsc/lib/bsc_plugin/contract.rb +++ /dev/null @@ -1,84 +0,0 @@ -class BscPlugin::Contract < Noosfero::Plugin::ActiveRecord - validates_presence_of :bsc, :client_name - - has_many :sales, :class_name => 'BscPlugin::Sale' - has_many :products, :through => :sales - has_and_belongs_to_many :enterprises, :join_table => 'bsc_plugin_contracts_enterprises' - - belongs_to :bsc, :class_name => 'BscPlugin::Bsc' - - named_scope :status, lambda { |status_list| status_list.blank? ? {} : {:conditions => ['status in (?)', status_list]} } - named_scope :sorted_by, lambda { |sorter, direction| {:order => "#{sorter} #{direction}"} } - - before_create do |contract| - contract.created_at ||= Time.now.utc - contract.updated_at ||= Time.now.utc - end - - before_update do |contract| - contract.updated_at ||= Time.now.utc - end - - module Status - OPENED = 0 - NEGOTIATING = 1 - EXECUTING = 2 - CLOSED = 3 - - def self.types - [OPENED, NEGOTIATING, EXECUTING, CLOSED] - end - - def self.names - [_('Opened'), _('Negotiating'), _('Executing'), _('Closed')] - end - end - - module ClientType - STATE = 0 - FEDERAL = 1 - - def self.types - [STATE, FEDERAL] - end - - def self.names - [c_('State'), _('Federal')] - end - end - - module BusinessType - PROJECTA = 0 - PROJECTB = 1 - - def self.types - [PROJECTA, PROJECTB] - end - - def self.names - [_('ProjectA'), _('ProjectB')] - end - end - - def enterprises_to_token_input - enterprises.map { |enterprise| {:id => enterprise.id, :name => enterprise.name} } - end - - def save_sales(sales) - failed_sales = {} - sales.each do |sale| - sale.merge!({:contract_id => id}) - begin - BscPlugin::Sale.create!(sale) - rescue Exception => exception - name = Product.find(sale[:product_id]).name - failed_sales[exception.clean_message] ? failed_sales[exception.clean_message] << name : failed_sales[exception.clean_message] = [name] - end - end - failed_sales - end - - def total_price - sales.inject(0) {|result, sale| sale.price*sale.quantity + result} - end -end diff --git a/plugins/bsc/lib/bsc_plugin/ext/enterprise.rb b/plugins/bsc/lib/bsc_plugin/ext/enterprise.rb deleted file mode 100644 index 160077c..0000000 --- a/plugins/bsc/lib/bsc_plugin/ext/enterprise.rb +++ /dev/null @@ -1,13 +0,0 @@ -require_dependency 'enterprise' - -class Enterprise - belongs_to :bsc, :class_name => 'BscPlugin::Bsc' - has_and_belongs_to_many :contracts, :class_name => 'BscPlugin::Contract', :join_table => 'bsc_plugin_contracts_enterprises' - - FIELDS << 'bsc_id' - FIELDS << 'enabled' - FIELDS << 'validated' - - named_scope :validated, :conditions => {:validated => true} - named_scope :not_validated, :conditions => {:validated => false} -end diff --git a/plugins/bsc/lib/bsc_plugin/ext/product.rb b/plugins/bsc/lib/bsc_plugin/ext/product.rb deleted file mode 100644 index 0572688..0000000 --- a/plugins/bsc/lib/bsc_plugin/ext/product.rb +++ /dev/null @@ -1,25 +0,0 @@ -require_dependency 'product' - -class Product - - has_many :sales, :class_name => 'BscPlugin::Sale' - has_many :contracts, :through => :sales, :class_name => 'BscPlugin::Contract' - - def bsc - enterprise.bsc if enterprise - end - - def display_supplier_on_search? - false - end - - def action_tracker_user - return self.enterprise if self.enterprise.validated - - if self.enterprise.bsc - self.enterprise.bsc - else - self.enterprise - end - end -end diff --git a/plugins/bsc/lib/bsc_plugin/mailer.rb b/plugins/bsc/lib/bsc_plugin/mailer.rb deleted file mode 100644 index 35bad98..0000000 --- a/plugins/bsc/lib/bsc_plugin/mailer.rb +++ /dev/null @@ -1,11 +0,0 @@ -class BscPlugin::Mailer < Noosfero::Plugin::MailerBase - - def admin_notification(admin, bsc) - domain = bsc.hostname || bsc.environment.default_hostname - recipients admin.contact_email - from 'no-reply@' + domain - subject _("[%s] Bsc management transferred to you.") % bsc.name - content_type 'text/html' - body :bsc => bsc - end -end diff --git a/plugins/bsc/lib/bsc_plugin/sale.rb b/plugins/bsc/lib/bsc_plugin/sale.rb deleted file mode 100644 index e6d5ba1..0000000 --- a/plugins/bsc/lib/bsc_plugin/sale.rb +++ /dev/null @@ -1,19 +0,0 @@ -class BscPlugin::Sale < Noosfero::Plugin::ActiveRecord - validates_presence_of :product, :contract - validates_uniqueness_of :product_id, :scope => :contract_id - validates_numericality_of :quantity, :only_integer => true, :greater_than_or_equal_to => 0 - validates_numericality_of :price, :allow_nil => true - - belongs_to :product - belongs_to :contract, :class_name => 'BscPlugin::Contract' - - before_create do |sale| - sale.price ||= sale.product.price || 0 - sale.created_at ||= Time.now.utc - sale.updated_at ||= Time.now.utc - end - - before_update do |contract| - contract.updated_at ||= Time.now.utc - end -end diff --git a/plugins/bsc/po/bsc.pot b/plugins/bsc/po/bsc.pot deleted file mode 100644 index 290505e..0000000 --- a/plugins/bsc/po/bsc.pot +++ /dev/null @@ -1,351 +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.1-882-g0c116ba\n" -"POT-Creation-Date: 2015-09-25 15:42-0000\n" -"PO-Revision-Date: 2015-08-06 17:21-0300\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/bsc/controllers/bsc_plugin_admin_controller.rb:11 -msgid "Your Bsc was created." -msgstr "" - -#: plugins/bsc/controllers/bsc_plugin_admin_controller.rb:21 -msgid "Enterprises validated." -msgstr "" - -#: plugins/bsc/controllers/bsc_plugin_admin_controller.rb:24 -msgid "Enterprise validations couldn't be saved." -msgstr "" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:38 -msgid "This Bsc associations were saved successfully." -msgstr "" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:42 -msgid "This Bsc associations couldn't be saved." -msgstr "" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:71 -msgid "Enterprise ownership transferred." -msgstr "" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:85 -msgid "Enterprise was created in association with %s." -msgstr "" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:117 -msgid "Contract created." -msgstr "" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:120 -msgid "Contract created but some products could not be added." -msgstr "" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:131 -msgid "Contract doesn't exists! Maybe it was already removed." -msgstr "" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:140 -msgid "Could not edit such contract." -msgstr "" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:170 -msgid "Contract edited." -msgstr "" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:173 -msgid "Contract edited but some products could not be added." -msgstr "" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:183 -msgid "Contract removed." -msgstr "" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:185 -msgid "Contract could not be removed. Sorry! ^^" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:10 -msgid "BSC association" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:18 -msgid "%{requestor} wants to associate this enterprise with %{linked_subject}." -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:35 -msgid "%{enterprise} accepted your request to associate it with %{bsc}." -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:39 -msgid "%{enterprise} rejected your request to associate it with %{bsc}." -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:41 -msgid "" -"Here is the reject explanation left by the administrator:\n" -"\n" -"%{reject_explanation}" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:46 -msgid "%{requestor} wants assoaciate %{bsc} as your BSC." -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/mailer.rb:7 -msgid "[%s] Bsc management transferred to you." -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/bsc.rb:28 -msgid "Bsc info and settings" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -msgid "Opened" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -msgid "Negotiating" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -msgid "Executing" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -msgid "Closed" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:46 -msgid "Federal" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:59 -msgid "ProjectA" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:59 -msgid "ProjectB" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin.rb:10 -msgid "Adds the Bsc feature" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin.rb:14 -msgid "Create Bsc" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin.rb:15 -msgid "Validate Enterprises" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin.rb:20 -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:1 -msgid "Manage associated enterprises" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin.rb:21 plugins/bsc/lib/bsc_plugin.rb:27 -msgid "Transfer ownership" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin.rb:22 -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:1 -msgid "Manage contracts" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin.rb:98 -msgid "Bsc" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin.rb:109 -#: plugins/bsc/views/shared/_fields.html.erb:53 -msgid "Contact" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:5 -#: plugins/bsc/views/shared/_fields.html.erb:5 -msgid "Basic information" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:7 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:6 -msgid "Client type" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:8 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:7 -msgid "Business type" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:11 -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:5 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:10 -msgid "Status" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:12 -msgid "Number of producers" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:13 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:35 -msgid "Supply period" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:27 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:23 -msgid "Quantity" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:28 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:24 -msgid "Unit price" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:38 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:27 -msgid "Total" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:48 -msgid "Annotations" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:4 -msgid "Associations awaiting approval:" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:16 -#: plugins/bsc/views/bsc_plugin_admin/validate_enterprises.html.erb:5 -msgid "Type in a search term for enterprise" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:19 -msgid "Add new enterprise" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:17 -msgid "Sort by" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:18 -msgid "Date(newest first)" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:18 -msgid "Date(oldest first)" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:19 -msgid "Client name(A-Z)" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:19 -msgid "Client name(Z-A)" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:24 -msgid "There are no contracts at all." -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:35 -msgid "Are you sure?" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:45 -msgid "Create new contract" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:18 -msgid "Type in search term for enterprise" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:31 -msgid "Add new product" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:57 -msgid "Type in a search term for product" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/new_contract.html.erb:1 -#: plugins/bsc/views/bsc_plugin_myprofile/edit_contract.html.erb:1 -msgid "New contract" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/_similar_enterprises.html.erb:2 -msgid "Existing enterprises:" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/_similar_enterprises.html.erb:3 -msgid "" -"Were found %{count} enterprises with similar names on the same city, you can " -"decide to associate one of them or create the new enterprise confirming the " -"informations you typed in." -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/_similar_enterprises.html.erb:20 -msgid "Associate" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:1 -msgid "Transfer Ownership" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:4 -msgid "" -"This option allows you to transfer this enterprise's management to another " -"user. This action will remove all the current administrators. Be careful " -"when confirming this procedure." -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:8 -msgid "Current administrators:" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:19 -msgid "Administrator:" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:22 -msgid "Type in a search term for the new administrator" -msgstr "" - -#: plugins/bsc/views/bsc_plugin/mailer/admin_notification.html.erb:1 -msgid "The management of %{bsc} was transferred to you." -msgstr "" - -#: plugins/bsc/views/shared/_fields.html.erb:39 -msgid "" -"You are about to change the address, and this will break external links to " -"this bsc or to posts inside it. Do you really want to change?" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_admin/new.html.erb:2 -msgid "BSC registration" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_admin/validate_enterprises.html.erb:1 -msgid "Validate enterprises" -msgstr "" - -#: plugins/bsc/views/profile/_profile_tab.html.erb:2 -msgid "Contact phone: " -msgstr "" - -#: plugins/bsc/views/profile/_profile_tab.html.erb:3 -msgid "Email: " -msgstr "" diff --git a/plugins/bsc/po/de/bsc.po b/plugins/bsc/po/de/bsc.po deleted file mode 100644 index d676f02..0000000 --- a/plugins/bsc/po/de/bsc.po +++ /dev/null @@ -1,370 +0,0 @@ -# German translation of noosfero. -# Copyright (C) 2009-2013 Josef Spillner -# Copyright (C) 2009, 2011 Ronny Kursawe -# This file is distributed under the same license as the noosfero package. -# Josef Spillner , 2009. -# -msgid "" -msgstr "" -"Project-Id-Version: 1.1-882-g0c116ba\n" -"POT-Creation-Date: 2015-09-25 15:42-0000\n" -"PO-Revision-Date: 2014-12-12 14:23+0200\n" -"Last-Translator: Michal Čihař \n" -"Language-Team: German \n" -"Language: de\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 2.2-dev\n" - -#: plugins/bsc/controllers/bsc_plugin_admin_controller.rb:11 -msgid "Your Bsc was created." -msgstr "Ihr Bsc wurde erstellt." - -#: plugins/bsc/controllers/bsc_plugin_admin_controller.rb:21 -msgid "Enterprises validated." -msgstr "Unternehmen validiert." - -#: plugins/bsc/controllers/bsc_plugin_admin_controller.rb:24 -msgid "Enterprise validations couldn't be saved." -msgstr "Die Unternehmensvalidierungen konnten nicht gespeichert werden." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:38 -msgid "This Bsc associations were saved successfully." -msgstr "Diese Bsc-Verknüpfungen wurden erfolgreich gespeichert." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:42 -msgid "This Bsc associations couldn't be saved." -msgstr "Diese Bsc-Verknüpfung konnte nicht gespeichert werden." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:71 -msgid "Enterprise ownership transferred." -msgstr "Eigentümerschaft des Unternehmens übertragen." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:85 -msgid "Enterprise was created in association with %s." -msgstr "Das Unternehmen wurde in Zusammenhang mit %s angelegt." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:117 -msgid "Contract created." -msgstr "Vertrag erstellt." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:120 -msgid "Contract created but some products could not be added." -msgstr "" -"Der Vertrag wurde erstellt, aber einige Produkte konnten nicht hinzugefügt " -"werden." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:131 -msgid "Contract doesn't exists! Maybe it was already removed." -msgstr "Der Vertrag existiert nicht! Vielleicht wurde er bereits entfernt." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:140 -msgid "Could not edit such contract." -msgstr "Kann den Vertrag nicht verändern." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:170 -msgid "Contract edited." -msgstr "Vertrag geändert." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:173 -msgid "Contract edited but some products could not be added." -msgstr "" -"Vertrag geändert, aber einige Produkte konnten nicht hinzugefügt werden." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:183 -msgid "Contract removed." -msgstr "Vertrag entfernt." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:185 -msgid "Contract could not be removed. Sorry! ^^" -msgstr "Vertrag konnte nicht entfernt werden. Entschuldigung! ^^" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:10 -msgid "BSC association" -msgstr "BSC-Zusammenschluss" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:18 -msgid "%{requestor} wants to associate this enterprise with %{linked_subject}." -msgstr "" -"%{requestor} möchte das Unternehmen %{linked_subject} mit %{linked_subject} " -"verknüpfen." - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:35 -msgid "%{enterprise} accepted your request to associate it with %{bsc}." -msgstr "%{enterprise} hat Ihre Anfrage zur Verbindung mit %{bsc} akzeptiert." - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:39 -msgid "%{enterprise} rejected your request to associate it with %{bsc}." -msgstr "%{enterprise} hat Ihre Anfrage zur Verbindung mit %{bsc} abgelehnt." - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:41 -msgid "" -"Here is the reject explanation left by the administrator:\n" -"\n" -"%{reject_explanation}" -msgstr "" -"Hier ist der vom Administrator angegebene Grund der Ablehnung:\n" -"\n" -"%{reject_explanation}" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:46 -msgid "%{requestor} wants assoaciate %{bsc} as your BSC." -msgstr "%{requestor} möchte %{bsc} als Ihr BSC verknüpfen." - -#: plugins/bsc/lib/bsc_plugin/mailer.rb:7 -msgid "[%s] Bsc management transferred to you." -msgstr "[%s] Die Verwaltung von Bsc wurde Ihnen übertragen." - -#: plugins/bsc/lib/bsc_plugin/bsc.rb:28 -msgid "Bsc info and settings" -msgstr "Bsc-Informationen und -Einstellungen" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -msgid "Opened" -msgstr "Geöffnet" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -msgid "Negotiating" -msgstr "Aushandlung" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -msgid "Executing" -msgstr "Ausführung" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -msgid "Closed" -msgstr "Geschlossen" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:46 -msgid "Federal" -msgstr "Föderal" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:59 -msgid "ProjectA" -msgstr "ProjektA" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:59 -msgid "ProjectB" -msgstr "ProjektB" - -#: plugins/bsc/lib/bsc_plugin.rb:10 -msgid "Adds the Bsc feature" -msgstr "Fügt Unterstützung für Bsc hinzu" - -#: plugins/bsc/lib/bsc_plugin.rb:14 -msgid "Create Bsc" -msgstr "Bsc erstellen" - -#: plugins/bsc/lib/bsc_plugin.rb:15 -msgid "Validate Enterprises" -msgstr "Unternehmen bestätigen" - -#: plugins/bsc/lib/bsc_plugin.rb:20 -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:1 -msgid "Manage associated enterprises" -msgstr "Verwalte verbundene Unternehmen" - -#: plugins/bsc/lib/bsc_plugin.rb:21 plugins/bsc/lib/bsc_plugin.rb:27 -msgid "Transfer ownership" -msgstr "Eigentümerschaft übertragen" - -#: plugins/bsc/lib/bsc_plugin.rb:22 -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:1 -msgid "Manage contracts" -msgstr "Verträge verwalten" - -#: plugins/bsc/lib/bsc_plugin.rb:98 -msgid "Bsc" -msgstr "Bsc" - -#: plugins/bsc/lib/bsc_plugin.rb:109 -#: plugins/bsc/views/shared/_fields.html.erb:53 -msgid "Contact" -msgstr "Kontakt" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:5 -#: plugins/bsc/views/shared/_fields.html.erb:5 -msgid "Basic information" -msgstr "Basisinformationen" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:7 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:6 -msgid "Client type" -msgstr "Typ des Kunden" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:8 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:7 -msgid "Business type" -msgstr "Typ des Geschäfts" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:11 -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:5 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:10 -msgid "Status" -msgstr "Status" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:12 -msgid "Number of producers" -msgstr "Anzahl der Produzenten" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:13 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:35 -msgid "Supply period" -msgstr "Zulieferungszeitabschnitt" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:27 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:23 -msgid "Quantity" -msgstr "Anzahl" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:28 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:24 -msgid "Unit price" -msgstr "Stückpreis" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:38 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:27 -msgid "Total" -msgstr "Gesamt" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:48 -msgid "Annotations" -msgstr "Anmerkungen" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:4 -msgid "Associations awaiting approval:" -msgstr "Assoziierungen, welche noch bestätigt werden müssen:" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:16 -#: plugins/bsc/views/bsc_plugin_admin/validate_enterprises.html.erb:5 -msgid "Type in a search term for enterprise" -msgstr "Geben Sie einen Suchbegriff für Unternehmen ein" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:19 -msgid "Add new enterprise" -msgstr "Neues Unternehmen hinzufügen" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:17 -msgid "Sort by" -msgstr "Sortieren nach" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:18 -msgid "Date(newest first)" -msgstr "Datum (neueste zuerst)" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:18 -msgid "Date(oldest first)" -msgstr "Datum (älteste zuerst)" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:19 -msgid "Client name(A-Z)" -msgstr "Kundenname (A-Z)" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:19 -msgid "Client name(Z-A)" -msgstr "Kundenname (Z-A)" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:24 -msgid "There are no contracts at all." -msgstr "Sie haben noch keine Verträge." - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:35 -msgid "Are you sure?" -msgstr "Sind Sie sicher?" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:45 -msgid "Create new contract" -msgstr "Einen neuen Vertrag erstellen" - -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:18 -msgid "Type in search term for enterprise" -msgstr "Geben Sie den Suchbegriff für das Unternehmen ein" - -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:31 -msgid "Add new product" -msgstr "Neues Produkt hinzufügen" - -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:57 -msgid "Type in a search term for product" -msgstr "Geben Sie einen Suchbegriff für das Produkt ein" - -#: plugins/bsc/views/bsc_plugin_myprofile/new_contract.html.erb:1 -#: plugins/bsc/views/bsc_plugin_myprofile/edit_contract.html.erb:1 -msgid "New contract" -msgstr "Neuer Vertrag" - -#: plugins/bsc/views/bsc_plugin_myprofile/_similar_enterprises.html.erb:2 -msgid "Existing enterprises:" -msgstr "Existierende Unternehmen:" - -#: plugins/bsc/views/bsc_plugin_myprofile/_similar_enterprises.html.erb:3 -msgid "" -"Were found %{count} enterprises with similar names on the same city, you can " -"decide to associate one of them or create the new enterprise confirming the " -"informations you typed in." -msgstr "" -"Wir haben %{count} Firmen mit ähnlichen Namen in der gleichen Stadt " -"gefunden. Sie können sich mit einer von diesen assoziieren oder eine neue " -"Firma unter Bestätigung der von Ihnen getätigten Angaben gründen." - -#: plugins/bsc/views/bsc_plugin_myprofile/_similar_enterprises.html.erb:20 -msgid "Associate" -msgstr "Verknüpfen" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:1 -msgid "Transfer Ownership" -msgstr "Eigentümerschaft übertragen" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:4 -msgid "" -"This option allows you to transfer this enterprise's management to another " -"user. This action will remove all the current administrators. Be careful " -"when confirming this procedure." -msgstr "" -"Diese Option erlaubt Ihnen, die Verwaltung dieses Unternehmens an einen " -"anderen Benutzer zu übertragen. Diese Aktion wird alle derzeitigen " -"Administratoren entfernen. Seien Sie vorsichtig, bevor Sie diese Prozedur " -"ausführen." - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:8 -msgid "Current administrators:" -msgstr "Aktuelle Administratoren:" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:19 -msgid "Administrator:" -msgstr "Administrator:" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:22 -msgid "Type in a search term for the new administrator" -msgstr "Geben Sie einen Suchbegriff für den neuen Administrator ein" - -#: plugins/bsc/views/bsc_plugin/mailer/admin_notification.html.erb:1 -msgid "The management of %{bsc} was transferred to you." -msgstr "Die Verwaltung des %{bsc} wurde zu Ihnen transferiert." - -#: plugins/bsc/views/shared/_fields.html.erb:39 -msgid "" -"You are about to change the address, and this will break external links to " -"this bsc or to posts inside it. Do you really want to change?" -msgstr "" -"Sie sind dabei die Adresse zu ändern. Das unterbricht externe Verweise zum " -"Bsc und zu deren Inhalten. Wollen Sie wirklich die Adresse ändern?" - -#: plugins/bsc/views/bsc_plugin_admin/new.html.erb:2 -msgid "BSC registration" -msgstr "BSC-Registrierung" - -#: plugins/bsc/views/bsc_plugin_admin/validate_enterprises.html.erb:1 -msgid "Validate enterprises" -msgstr "Unternehmen validieren" - -#: plugins/bsc/views/profile/_profile_tab.html.erb:2 -msgid "Contact phone: " -msgstr "Kontakttelefonnummer: " - -#: plugins/bsc/views/profile/_profile_tab.html.erb:3 -msgid "Email: " -msgstr "E-Mail: " diff --git a/plugins/bsc/po/es/bsc.po b/plugins/bsc/po/es/bsc.po deleted file mode 100644 index 27f00c4..0000000 --- a/plugins/bsc/po/es/bsc.po +++ /dev/null @@ -1,364 +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.1-882-g0c116ba\n" -"POT-Creation-Date: 2015-09-25 15:42-0000\n" -"PO-Revision-Date: 2014-11-03 15:52+0200\n" -"Last-Translator: Michal Čihař \n" -"Language-Team: Spanish \n" -"Language: es\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 2.0-dev\n" - -#: plugins/bsc/controllers/bsc_plugin_admin_controller.rb:11 -msgid "Your Bsc was created." -msgstr "Tu Bsc fue creado." - -#: plugins/bsc/controllers/bsc_plugin_admin_controller.rb:21 -msgid "Enterprises validated." -msgstr "Empresas validadas." - -#: plugins/bsc/controllers/bsc_plugin_admin_controller.rb:24 -msgid "Enterprise validations couldn't be saved." -msgstr "Las validaciones de la empresa no pudieron guardarse." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:38 -msgid "This Bsc associations were saved successfully." -msgstr "Estas asociaciones Bsc fueron guardadas correctamente." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:42 -msgid "This Bsc associations couldn't be saved." -msgstr "Estas asociaciones Bsc no pudieron ser guardadas." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:71 -msgid "Enterprise ownership transferred." -msgstr "Propiedad de la empresa transferida." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:85 -msgid "Enterprise was created in association with %s." -msgstr "La empresa fue creada en asociación con %s." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:117 -msgid "Contract created." -msgstr "Contrato creado." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:120 -msgid "Contract created but some products could not be added." -msgstr "Contrato creado pero algunos productos no pudieron agregarse." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:131 -msgid "Contract doesn't exists! Maybe it was already removed." -msgstr "¡El contrato no existe! Quizás ya fue eliminado." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:140 -msgid "Could not edit such contract." -msgstr "No se puede editar tal contrato." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:170 -msgid "Contract edited." -msgstr "contrato editado." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:173 -msgid "Contract edited but some products could not be added." -msgstr "Contrato editado pero algunos productos no pueden ser agregados." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:183 -msgid "Contract removed." -msgstr "Contrato eliminado." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:185 -msgid "Contract could not be removed. Sorry! ^^" -msgstr "El contrato no puede ser eliminado. ¡Perdón! ^^" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:10 -msgid "BSC association" -msgstr "Asociación BSC" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:18 -msgid "%{requestor} wants to associate this enterprise with %{linked_subject}." -msgstr "%{requestor} quiere asociar esta empresa con %{linked_subject}." - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:35 -msgid "%{enterprise} accepted your request to associate it with %{bsc}." -msgstr "%{enterprrise} aceptó tu solicitud para asociarse con %{bsc}." - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:39 -msgid "%{enterprise} rejected your request to associate it with %{bsc}." -msgstr "%{enterprise} rechazó tu solicitud para asociarse con %{bsc}." - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:41 -msgid "" -"Here is the reject explanation left by the administrator:\n" -"\n" -"%{reject_explanation}" -msgstr "" -"Aquí está la explicación del rechazo dejada por el administrador:\n" -"\n" -"%{reject_explanation}" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:46 -msgid "%{requestor} wants assoaciate %{bsc} as your BSC." -msgstr "%{requestor} quire asociar %{bsc} como tu BSC." - -#: plugins/bsc/lib/bsc_plugin/mailer.rb:7 -msgid "[%s] Bsc management transferred to you." -msgstr "[%s] administración de bsc transferida a ti" - -#: plugins/bsc/lib/bsc_plugin/bsc.rb:28 -msgid "Bsc info and settings" -msgstr "Información y configuración de Bsc" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -msgid "Opened" -msgstr "Abierto" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -msgid "Negotiating" -msgstr "Negociando" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -msgid "Executing" -msgstr "Ejecutando" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -msgid "Closed" -msgstr "Cerrado" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:46 -msgid "Federal" -msgstr "Federal" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:59 -msgid "ProjectA" -msgstr "Proyecto A" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:59 -msgid "ProjectB" -msgstr "Proyecto B" - -#: plugins/bsc/lib/bsc_plugin.rb:10 -msgid "Adds the Bsc feature" -msgstr "Añade la característica Bsc" - -#: plugins/bsc/lib/bsc_plugin.rb:14 -msgid "Create Bsc" -msgstr "Crear Bsc" - -#: plugins/bsc/lib/bsc_plugin.rb:15 -msgid "Validate Enterprises" -msgstr "Validar empresas" - -#: plugins/bsc/lib/bsc_plugin.rb:20 -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:1 -msgid "Manage associated enterprises" -msgstr "Administrar empresas asociadas" - -#: plugins/bsc/lib/bsc_plugin.rb:21 plugins/bsc/lib/bsc_plugin.rb:27 -msgid "Transfer ownership" -msgstr "Transferir propiedad" - -#: plugins/bsc/lib/bsc_plugin.rb:22 -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:1 -msgid "Manage contracts" -msgstr "Administrar contratos" - -#: plugins/bsc/lib/bsc_plugin.rb:98 -msgid "Bsc" -msgstr "Bsc" - -#: plugins/bsc/lib/bsc_plugin.rb:109 -#: plugins/bsc/views/shared/_fields.html.erb:53 -msgid "Contact" -msgstr "Contacto" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:5 -#: plugins/bsc/views/shared/_fields.html.erb:5 -msgid "Basic information" -msgstr "Información básica" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:7 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:6 -msgid "Client type" -msgstr "Tipo de cliente" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:8 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:7 -msgid "Business type" -msgstr "Tipo de negocio" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:11 -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:5 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:10 -msgid "Status" -msgstr "Estado" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:12 -msgid "Number of producers" -msgstr "Número de productores" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:13 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:35 -msgid "Supply period" -msgstr "Período de suministro" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:27 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:23 -msgid "Quantity" -msgstr "Cantidad" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:28 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:24 -msgid "Unit price" -msgstr "Precio unitario" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:38 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:27 -msgid "Total" -msgstr "Total" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:48 -msgid "Annotations" -msgstr "Anotaciones" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:4 -msgid "Associations awaiting approval:" -msgstr "Asociaciones de espera de aprobación:" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:16 -#: plugins/bsc/views/bsc_plugin_admin/validate_enterprises.html.erb:5 -msgid "Type in a search term for enterprise" -msgstr "Ingresa un término de búsqueda para la empresa" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:19 -msgid "Add new enterprise" -msgstr "Añadir nueva empresa" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:17 -msgid "Sort by" -msgstr "Ordenar por" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:18 -msgid "Date(newest first)" -msgstr "Fecha (más reciente primero)" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:18 -msgid "Date(oldest first)" -msgstr "Fecha (más antiguo primero)" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:19 -msgid "Client name(A-Z)" -msgstr "Nombre del cliente (A-Z)" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:19 -msgid "Client name(Z-A)" -msgstr "Nombre del cliente (Z-A)" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:24 -msgid "There are no contracts at all." -msgstr "No hay ningún contrato." - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:35 -msgid "Are you sure?" -msgstr "¿Estás seguro?" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:45 -msgid "Create new contract" -msgstr "Crear nuevo contrato" - -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:18 -msgid "Type in search term for enterprise" -msgstr "Ingresa un término de búsqueda para la empresa" - -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:31 -msgid "Add new product" -msgstr "Añadir nuevo producto" - -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:57 -msgid "Type in a search term for product" -msgstr "Ingresa un término de búsqueda para el producto" - -#: plugins/bsc/views/bsc_plugin_myprofile/new_contract.html.erb:1 -#: plugins/bsc/views/bsc_plugin_myprofile/edit_contract.html.erb:1 -msgid "New contract" -msgstr "Nuevo contrato" - -#: plugins/bsc/views/bsc_plugin_myprofile/_similar_enterprises.html.erb:2 -msgid "Existing enterprises:" -msgstr "Empresas existentes:" - -#: plugins/bsc/views/bsc_plugin_myprofile/_similar_enterprises.html.erb:3 -msgid "" -"Were found %{count} enterprises with similar names on the same city, you can " -"decide to associate one of them or create the new enterprise confirming the " -"informations you typed in." -msgstr "" -"Fueron encontrados %{count} empresas con nombres similares en la misma " -"ciudad, puedes decidir asociar una de ellos o crear la nueva empresa " -"confirmando la información que escribiste." - -#: plugins/bsc/views/bsc_plugin_myprofile/_similar_enterprises.html.erb:20 -msgid "Associate" -msgstr "Asociar" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:1 -msgid "Transfer Ownership" -msgstr "Transferir propiedad" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:4 -msgid "" -"This option allows you to transfer this enterprise's management to another " -"user. This action will remove all the current administrators. Be careful " -"when confirming this procedure." -msgstr "" -"Esta opción te permite transferir la administración de esta empresa a otro " -"usuario. Esta acción eliminará a todos los administradores actuales. Ten " -"cuidado cuando confirmes este proceso." - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:8 -msgid "Current administrators:" -msgstr "Administradores actuales:" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:19 -msgid "Administrator:" -msgstr "Administrador:" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:22 -msgid "Type in a search term for the new administrator" -msgstr "Ingresa un término de búsqueda para el nuevo administrador" - -#: plugins/bsc/views/bsc_plugin/mailer/admin_notification.html.erb:1 -msgid "The management of %{bsc} was transferred to you." -msgstr "La administración de %{bsc} te fue transferido." - -#: plugins/bsc/views/shared/_fields.html.erb:39 -msgid "" -"You are about to change the address, and this will break external links to " -"this bsc or to posts inside it. Do you really want to change?" -msgstr "" -"Estás a punto de cambiar la dirección, y esto romperá los enlaces externos a " -"este bsc o a las publicaciones su interior. ¿Estás seguro que quieres " -"cambiarla?" - -#: plugins/bsc/views/bsc_plugin_admin/new.html.erb:2 -msgid "BSC registration" -msgstr "Registro de BSC" - -#: plugins/bsc/views/bsc_plugin_admin/validate_enterprises.html.erb:1 -msgid "Validate enterprises" -msgstr "Validar empresas" - -#: plugins/bsc/views/profile/_profile_tab.html.erb:2 -msgid "Contact phone: " -msgstr "Teléfono de contacto: " - -#: plugins/bsc/views/profile/_profile_tab.html.erb:3 -msgid "Email: " -msgstr "Correo electrónico: " diff --git a/plugins/bsc/po/fr/bsc.po b/plugins/bsc/po/fr/bsc.po deleted file mode 100644 index 7176128..0000000 --- a/plugins/bsc/po/fr/bsc.po +++ /dev/null @@ -1,412 +0,0 @@ -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# -# , 2009. -msgid "" -msgstr "" -"Project-Id-Version: 1.1-882-g0c116ba\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-09-25 15:42-0000\n" -"PO-Revision-Date: 2014-12-12 14:22+0200\n" -"Last-Translator: Michal Čihař \n" -"Language-Team: French \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 2.2-dev\n" - -#: plugins/bsc/controllers/bsc_plugin_admin_controller.rb:11 -#, fuzzy -msgid "Your Bsc was created." -msgstr "Votre adresse e-mail %s vient d'être activée" - -#: plugins/bsc/controllers/bsc_plugin_admin_controller.rb:21 -#, fuzzy -msgid "Enterprises validated." -msgstr "Validations d'entreprises" - -#: plugins/bsc/controllers/bsc_plugin_admin_controller.rb:24 -#, fuzzy -msgid "Enterprise validations couldn't be saved." -msgstr "Validations d'entreprises" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:38 -#, fuzzy -msgid "This Bsc associations were saved successfully." -msgstr "Fonctionnalités mises à jour avec succès." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:42 -#, fuzzy -msgid "This Bsc associations couldn't be saved." -msgstr "Ce fichier n'a pas pu être sauvegardé" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:71 -#, fuzzy -msgid "Enterprise ownership transferred." -msgstr "Page d'accueil de l'entreprise" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:85 -#, fuzzy -msgid "Enterprise was created in association with %s." -msgstr "Enregistrement de l'enterprise : \"%s\"" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:117 -#, fuzzy -msgid "Contract created." -msgstr "Adresse électronique de contact" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:120 -msgid "Contract created but some products could not be added." -msgstr "" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:131 -msgid "Contract doesn't exists! Maybe it was already removed." -msgstr "" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:140 -#, fuzzy -msgid "Could not edit such contract." -msgstr "Impossible de mettre à jour le produit" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:170 -#, fuzzy -msgid "Contract edited." -msgstr "Adresse électronique de contact" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:173 -#, fuzzy -msgid "Contract edited but some products could not be added." -msgstr "Bloc d'information de profil" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:183 -#, fuzzy -msgid "Contract removed." -msgstr "Corps de l'article" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:185 -#, fuzzy -msgid "Contract could not be removed. Sorry! ^^" -msgstr "Bloc d'information de profil" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:10 -#, fuzzy -msgid "BSC association" -msgstr "Informations de contact" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:18 -#, fuzzy -msgid "%{requestor} wants to associate this enterprise with %{linked_subject}." -msgstr "L'utilisateur «%{user}» veut activer l'adresse «%{email}»" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:35 -msgid "%{enterprise} accepted your request to associate it with %{bsc}." -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:39 -msgid "%{enterprise} rejected your request to associate it with %{bsc}." -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:41 -msgid "" -"Here is the reject explanation left by the administrator:\n" -"\n" -"%{reject_explanation}" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:46 -#, fuzzy -msgid "%{requestor} wants assoaciate %{bsc} as your BSC." -msgstr "%s veut être votre contact." - -#: plugins/bsc/lib/bsc_plugin/mailer.rb:7 -msgid "[%s] Bsc management transferred to you." -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/bsc.rb:28 -#, fuzzy -msgid "Bsc info and settings" -msgstr "Informations et paramètres" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -#, fuzzy -msgid "Opened" -msgstr "ouvrir" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -#, fuzzy -msgid "Negotiating" -msgstr "Paramètres" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -#, fuzzy -msgid "Executing" -msgstr "Édition" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -#, fuzzy -msgid "Closed" -msgstr "Fermer" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:46 -#, fuzzy -msgid "Federal" -msgstr "Tâche générique" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:59 -#, fuzzy -msgid "ProjectA" -msgstr "Produit" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:59 -#, fuzzy -msgid "ProjectB" -msgstr "Produit" - -#: plugins/bsc/lib/bsc_plugin.rb:10 -#, fuzzy -msgid "Adds the Bsc feature" -msgstr "Autres fonctionnalités" - -#: plugins/bsc/lib/bsc_plugin.rb:14 -#, fuzzy -msgid "Create Bsc" -msgstr "Créer" - -#: plugins/bsc/lib/bsc_plugin.rb:15 -#, fuzzy -msgid "Validate Enterprises" -msgstr "Valider l'entreprise" - -#: plugins/bsc/lib/bsc_plugin.rb:20 -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:1 -#, fuzzy -msgid "Manage associated enterprises" -msgstr "Gérer les entreprises" - -#: plugins/bsc/lib/bsc_plugin.rb:21 plugins/bsc/lib/bsc_plugin.rb:27 -msgid "Transfer ownership" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin.rb:22 -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:1 -#, fuzzy -msgid "Manage contracts" -msgstr "Gérer les contacts." - -#: plugins/bsc/lib/bsc_plugin.rb:98 -msgid "Bsc" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin.rb:109 -#: plugins/bsc/views/shared/_fields.html.erb:53 -msgid "Contact" -msgstr "Contact " - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:5 -#: plugins/bsc/views/shared/_fields.html.erb:5 -#, fuzzy -msgid "Basic information" -msgstr "Informations de contact" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:7 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:6 -#, fuzzy -msgid "Client type" -msgstr "Type de contenu" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:8 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:7 -#, fuzzy -msgid "Business type" -msgstr "Nom de fichier" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:11 -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:5 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:10 -msgid "Status" -msgstr "Statut" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:12 -#, fuzzy -msgid "Number of producers" -msgstr "Pas de produit" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:13 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:35 -#, fuzzy -msgid "Supply period" -msgstr "Fournisseur : %s" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:27 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:23 -#, fuzzy -msgid "Quantity" -msgstr "Qualité" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:28 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:24 -#, fuzzy -msgid "Unit price" -msgstr "Distance :" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:38 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:27 -#, fuzzy -msgid "Total" -msgstr "Pour : " - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:48 -#, fuzzy -msgid "Annotations" -msgstr "Message d'invitation :" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:4 -msgid "Associations awaiting approval:" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:16 -#: plugins/bsc/views/bsc_plugin_admin/validate_enterprises.html.erb:5 -#, fuzzy -msgid "Type in a search term for enterprise" -msgstr "Désactiver la recherche d'entreprises" - -# (second try of this knid of contents) -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:19 -#, fuzzy -msgid "Add new enterprise" -msgstr "Une entreprise" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:17 -#, fuzzy -msgid "Sort by" -msgstr "Nouveau groupe" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:18 -msgid "Date(newest first)" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:18 -msgid "Date(oldest first)" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:19 -msgid "Client name(A-Z)" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:19 -msgid "Client name(Z-A)" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:24 -#, fuzzy -msgid "There are no contracts at all." -msgstr "Vous n'avez pas encore de contact." - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:35 -msgid "Are you sure?" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:45 -#, fuzzy -msgid "Create new contract" -msgstr "Créer un nouveau groupe" - -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:18 -#, fuzzy -msgid "Type in search term for enterprise" -msgstr "Désactiver la recherche d'entreprises" - -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:31 -#, fuzzy -msgid "Add new product" -msgstr "Ajouter un produit" - -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:57 -#, fuzzy -msgid "Type in a search term for product" -msgstr "Désactiver la recherche d'entreprises" - -#: plugins/bsc/views/bsc_plugin_myprofile/new_contract.html.erb:1 -#: plugins/bsc/views/bsc_plugin_myprofile/edit_contract.html.erb:1 -#, fuzzy -msgid "New contract" -msgstr "Tout le contenu" - -#: plugins/bsc/views/bsc_plugin_myprofile/_similar_enterprises.html.erb:2 -#, fuzzy -msgid "Existing enterprises:" -msgstr "Éditer l'entreprise" - -#: plugins/bsc/views/bsc_plugin_myprofile/_similar_enterprises.html.erb:3 -msgid "" -"Were found %{count} enterprises with similar names on the same city, you can " -"decide to associate one of them or create the new enterprise confirming the " -"informations you typed in." -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/_similar_enterprises.html.erb:20 -#, fuzzy -msgid "Associate" -msgstr "Activer" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:1 -msgid "Transfer Ownership" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:4 -msgid "" -"This option allows you to transfer this enterprise's management to another " -"user. This action will remove all the current administrators. Be careful " -"when confirming this procedure." -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:8 -#, fuzzy -msgid "Current administrators:" -msgstr "Membres" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:19 -#, fuzzy -msgid "Administrator:" -msgstr "Interface d'administration" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:22 -msgid "Type in a search term for the new administrator" -msgstr "" - -#: plugins/bsc/views/bsc_plugin/mailer/admin_notification.html.erb:1 -msgid "The management of %{bsc} was transferred to you." -msgstr "" - -#: plugins/bsc/views/shared/_fields.html.erb:39 -#, fuzzy -msgid "" -"You are about to change the address, and this will break external links to " -"this bsc or to posts inside it. Do you really want to change?" -msgstr "" -"Vous êtes sur le point de modifier cette adresse, et cela risque de briser " -"les liens extérieurs menant à la page d'accueil ou le contenu du site lui-" -"même. Voulez-vous vraiment la modifier ?" - -#: plugins/bsc/views/bsc_plugin_admin/new.html.erb:2 -#, fuzzy -msgid "BSC registration" -msgstr "Enregistrement de l'enterprise : \"%s\"" - -#: plugins/bsc/views/bsc_plugin_admin/validate_enterprises.html.erb:1 -#, fuzzy -msgid "Validate enterprises" -msgstr "Valider l'entreprise" - -#: plugins/bsc/views/profile/_profile_tab.html.erb:2 -#, fuzzy -msgid "Contact phone: " -msgstr "Téléphone de contact :" - -#: plugins/bsc/views/profile/_profile_tab.html.erb:3 -#, fuzzy -msgid "Email: " -msgstr "Courrier électronique : %s" diff --git a/plugins/bsc/po/hy/bsc.po b/plugins/bsc/po/hy/bsc.po deleted file mode 100644 index 7c15f21..0000000 --- a/plugins/bsc/po/hy/bsc.po +++ /dev/null @@ -1,404 +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.1-882-g0c116ba\n" -"POT-Creation-Date: 2015-09-25 15:42-0000\n" -"PO-Revision-Date: 2009-10-26 16:20-0300\n" -"Last-Translator: Anahit Minassian \n" -"Language-Team: LANGUAGE \n" -"Language: hy\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Pootle 1.1.0\n" - -#: plugins/bsc/controllers/bsc_plugin_admin_controller.rb:11 -#, fuzzy -msgid "Your Bsc was created." -msgstr "%s վերացված է" - -#: plugins/bsc/controllers/bsc_plugin_admin_controller.rb:21 -#, fuzzy -msgid "Enterprises validated." -msgstr "Ձեռնարկությունների վավերացում" - -#: plugins/bsc/controllers/bsc_plugin_admin_controller.rb:24 -#, fuzzy -msgid "Enterprise validations couldn't be saved." -msgstr "Ձեռնարկությունների վավերացում" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:38 -#, fuzzy -msgid "This Bsc associations were saved successfully." -msgstr "Առանձնահատկությունները հաջողությամբ թարմացված են:" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:42 -#, fuzzy -msgid "This Bsc associations couldn't be saved." -msgstr "Անհանատական էջի տվյալների բաժին" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:71 -#, fuzzy -msgid "Enterprise ownership transferred." -msgstr "Ձեռնարկության գլխավոր էջ" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:85 -#, fuzzy -msgid "Enterprise was created in association with %s." -msgstr "Ձեռնարկության գրանցում «%s»" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:117 -#, fuzzy -msgid "Contract created." -msgstr "էլ. հասցե" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:120 -msgid "Contract created but some products could not be added." -msgstr "" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:131 -msgid "Contract doesn't exists! Maybe it was already removed." -msgstr "" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:140 -#, fuzzy -msgid "Could not edit such contract." -msgstr "Արտադրանք թարմացնելն անհնար է" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:170 -#, fuzzy -msgid "Contract edited." -msgstr "էլ. հասցե" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:173 -#, fuzzy -msgid "Contract edited but some products could not be added." -msgstr "Անհանատական էջի տվյալների բաժին" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:183 -#, fuzzy -msgid "Contract removed." -msgstr "Բուն հոդված" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:185 -#, fuzzy -msgid "Contract could not be removed. Sorry! ^^" -msgstr "Անհանատական էջի տվյալների բաժին" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:10 -#, fuzzy -msgid "BSC association" -msgstr "Էլ. հասցե" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:18 -#, fuzzy -msgid "%{requestor} wants to associate this enterprise with %{linked_subject}." -msgstr "%s-ը ցանկանում է %s-ի անդամ դառնալ:" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:35 -msgid "%{enterprise} accepted your request to associate it with %{bsc}." -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:39 -msgid "%{enterprise} rejected your request to associate it with %{bsc}." -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:41 -msgid "" -"Here is the reject explanation left by the administrator:\n" -"\n" -"%{reject_explanation}" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:46 -#, fuzzy -msgid "%{requestor} wants assoaciate %{bsc} as your BSC." -msgstr "%s ցանկանում է Ձեր ընկերը դառնալ" - -#: plugins/bsc/lib/bsc_plugin/mailer.rb:7 -msgid "[%s] Bsc management transferred to you." -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/bsc.rb:28 -#, fuzzy -msgid "Bsc info and settings" -msgstr "Անհանատական էջի տվյալների բաժին" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -#, fuzzy -msgid "Opened" -msgstr "բացել" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -#, fuzzy -msgid "Negotiating" -msgstr "Պարամետրեր" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -#, fuzzy -msgid "Executing" -msgstr "Փոփոխում" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -#, fuzzy -msgid "Closed" -msgstr "Փակել" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:46 -#, fuzzy -msgid "Federal" -msgstr "Ընդհանուր առաջադրանք" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:59 -#, fuzzy -msgid "ProjectA" -msgstr "Արտադրանք" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:59 -#, fuzzy -msgid "ProjectB" -msgstr "Արտադրանք" - -#: plugins/bsc/lib/bsc_plugin.rb:10 -#, fuzzy -msgid "Adds the Bsc feature" -msgstr "Այլ առանձնահատկություն" - -#: plugins/bsc/lib/bsc_plugin.rb:14 -#, fuzzy -msgid "Create Bsc" -msgstr "Ստեղծել" - -#: plugins/bsc/lib/bsc_plugin.rb:15 -#, fuzzy -msgid "Validate Enterprises" -msgstr "Վավերացնել ձեռնարկությունը" - -#: plugins/bsc/lib/bsc_plugin.rb:20 -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:1 -#, fuzzy -msgid "Manage associated enterprises" -msgstr "Մեկ ձեռնարկություն" - -#: plugins/bsc/lib/bsc_plugin.rb:21 plugins/bsc/lib/bsc_plugin.rb:27 -msgid "Transfer ownership" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin.rb:22 -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:1 -#, fuzzy -msgid "Manage contracts" -msgstr "Կառավարել բովանդակությունը:" - -#: plugins/bsc/lib/bsc_plugin.rb:98 -msgid "Bsc" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin.rb:109 -#: plugins/bsc/views/shared/_fields.html.erb:53 -msgid "Contact" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:5 -#: plugins/bsc/views/shared/_fields.html.erb:5 -#, fuzzy -msgid "Basic information" -msgstr "Էլ. հասցե" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:7 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:6 -#, fuzzy -msgid "Client type" -msgstr "Բովանդակության տեսակ" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:8 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:7 -#, fuzzy -msgid "Business type" -msgstr "Սեփականատիրոջ տեսակ" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:11 -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:5 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:10 -msgid "Status" -msgstr "Կարգավիճակ" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:12 -#, fuzzy -msgid "Number of producers" -msgstr "Արտադրանք չկա" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:13 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:35 -#, fuzzy -msgid "Supply period" -msgstr "Առաքիչ %s" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:27 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:23 -#, fuzzy -msgid "Quantity" -msgstr "Որակ" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:28 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:24 -#, fuzzy -msgid "Unit price" -msgstr "Հեռավորություն" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:38 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:27 -msgid "Total" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:48 -#, fuzzy -msgid "Annotations" -msgstr "Կառավարման վահանակ" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:4 -msgid "Associations awaiting approval:" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:16 -#: plugins/bsc/views/bsc_plugin_admin/validate_enterprises.html.erb:5 -#, fuzzy -msgid "Type in a search term for enterprise" -msgstr "Դիզակտիվացնել ձեռնարկությունների որոնումը" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:19 -#, fuzzy -msgid "Add new enterprise" -msgstr "Մեկ ձեռնարկություն" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:17 -#, fuzzy -msgid "Sort by" -msgstr "Մեկ համայնք" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:18 -msgid "Date(newest first)" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:18 -msgid "Date(oldest first)" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:19 -msgid "Client name(A-Z)" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:19 -msgid "Client name(Z-A)" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:24 -msgid "There are no contracts at all." -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:35 -msgid "Are you sure?" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:45 -#, fuzzy -msgid "Create new contract" -msgstr "Ստեղծել նոր համայնք" - -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:18 -#, fuzzy -msgid "Type in search term for enterprise" -msgstr "Դիզակտիվացնել ձեռնարկությունների որոնումը" - -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:31 -#, fuzzy -msgid "Add new product" -msgstr "Կառավարել արտադրանքը" - -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:57 -#, fuzzy -msgid "Type in a search term for product" -msgstr "Դիզակտիվացնել ձեռնարկությունների որոնումը" - -#: plugins/bsc/views/bsc_plugin_myprofile/new_contract.html.erb:1 -#: plugins/bsc/views/bsc_plugin_myprofile/edit_contract.html.erb:1 -#, fuzzy -msgid "New contract" -msgstr "Ամբողջ բովանդակությունը" - -#: plugins/bsc/views/bsc_plugin_myprofile/_similar_enterprises.html.erb:2 -#, fuzzy -msgid "Existing enterprises:" -msgstr "Մեկ ձեռնարկություն" - -#: plugins/bsc/views/bsc_plugin_myprofile/_similar_enterprises.html.erb:3 -msgid "" -"Were found %{count} enterprises with similar names on the same city, you can " -"decide to associate one of them or create the new enterprise confirming the " -"informations you typed in." -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/_similar_enterprises.html.erb:20 -#, fuzzy -msgid "Associate" -msgstr "Ակտիվացնել" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:1 -msgid "Transfer Ownership" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:4 -msgid "" -"This option allows you to transfer this enterprise's management to another " -"user. This action will remove all the current administrators. Be careful " -"when confirming this procedure." -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:8 -#, fuzzy -msgid "Current administrators:" -msgstr "Անդամներ" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:19 -#, fuzzy -msgid "Administrator:" -msgstr "Կառավարման վահանակ" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:22 -msgid "Type in a search term for the new administrator" -msgstr "" - -#: plugins/bsc/views/bsc_plugin/mailer/admin_notification.html.erb:1 -msgid "The management of %{bsc} was transferred to you." -msgstr "" - -#: plugins/bsc/views/shared/_fields.html.erb:39 -msgid "" -"You are about to change the address, and this will break external links to " -"this bsc or to posts inside it. Do you really want to change?" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_admin/new.html.erb:2 -#, fuzzy -msgid "BSC registration" -msgstr "Ձեռնարկության գրանցում «%s»" - -#: plugins/bsc/views/bsc_plugin_admin/validate_enterprises.html.erb:1 -#, fuzzy -msgid "Validate enterprises" -msgstr "Վավերացնել ձեռնարկությունը" - -#: plugins/bsc/views/profile/_profile_tab.html.erb:2 -#, fuzzy -msgid "Contact phone: " -msgstr "Հեռախոս" - -#: plugins/bsc/views/profile/_profile_tab.html.erb:3 -#, fuzzy -msgid "Email: " -msgstr "Էլ. հասցե" diff --git a/plugins/bsc/po/pt/bsc.po b/plugins/bsc/po/pt/bsc.po deleted file mode 100644 index 0916352..0000000 --- a/plugins/bsc/po/pt/bsc.po +++ /dev/null @@ -1,370 +0,0 @@ -# translation of noosfero.po to -# Krishnamurti Lelis Lima Vieira Nunes , 2007. -# noosfero - Brazilian Portuguese translation -# Copyright (C) 2007, -# Forum Brasileiro de Economia Solidaria -# Copyright (C) 2007, -# Ynternet.org Foundation -# This file is distributed under the same license as noosfero itself. -# Joenio Costa , 2008. -# -# -msgid "" -msgstr "" -"Project-Id-Version: 1.1-882-g0c116ba\n" -"POT-Creation-Date: 2015-09-25 15:42-0000\n" -"PO-Revision-Date: 2014-12-18 18:40-0200\n" -"Last-Translator: Luciano Prestes Cavalcanti \n" -"Language-Team: Portuguese \n" -"Language: pt\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 2.0\n" - -#: plugins/bsc/controllers/bsc_plugin_admin_controller.rb:11 -msgid "Your Bsc was created." -msgstr "Seu Bsc foi criado." - -#: plugins/bsc/controllers/bsc_plugin_admin_controller.rb:21 -msgid "Enterprises validated." -msgstr "Empreendimento validados." - -#: plugins/bsc/controllers/bsc_plugin_admin_controller.rb:24 -msgid "Enterprise validations couldn't be saved." -msgstr "As validações de empreendimento não puderam ser salvas." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:38 -msgid "This Bsc associations were saved successfully." -msgstr "As associações deste Bsc foram salvas com sucesso." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:42 -msgid "This Bsc associations couldn't be saved." -msgstr "As associações deste Bsc não puderam ser salvas." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:71 -msgid "Enterprise ownership transferred." -msgstr "A administração do empreendimento foi transferida." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:85 -msgid "Enterprise was created in association with %s." -msgstr "O empreendimento foi criado em associação com %s." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:117 -msgid "Contract created." -msgstr "O contrato foi criado." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:120 -msgid "Contract created but some products could not be added." -msgstr "O contrato foi criado mas alguns produtos não puderam ser adicionados." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:131 -msgid "Contract doesn't exists! Maybe it was already removed." -msgstr "O contrato não existe! Talvez ele já tenha sido removido." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:140 -msgid "Could not edit such contract." -msgstr "Não foi possível editar o contrato." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:170 -msgid "Contract edited." -msgstr "Contrato editado." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:173 -msgid "Contract edited but some products could not be added." -msgstr "" -"O contrato foi editado mas alguns produtos não puderam ser adicionados." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:183 -msgid "Contract removed." -msgstr "Contrato removido." - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:185 -msgid "Contract could not be removed. Sorry! ^^" -msgstr "O contrato não pôde ser removido. Desculpa!" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:10 -msgid "BSC association" -msgstr "Associação de BSC" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:18 -msgid "%{requestor} wants to associate this enterprise with %{linked_subject}." -msgstr "%{requestor} quer associar este empreendimento com %{linked_subject}." - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:35 -msgid "%{enterprise} accepted your request to associate it with %{bsc}." -msgstr "%{enterprise} aceitou seu pedido para associá-lo com %{bsc}." - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:39 -msgid "%{enterprise} rejected your request to associate it with %{bsc}." -msgstr "%{enterprise} rejeitou seu pedido para associá-lo com %{bsc}." - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:41 -msgid "" -"Here is the reject explanation left by the administrator:\n" -"\n" -"%{reject_explanation}" -msgstr "" -"Segue a explicação de rejeição deixada pelo administrador:\n" -"\n" -"%{reject_explanation}" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:46 -msgid "%{requestor} wants assoaciate %{bsc} as your BSC." -msgstr "%{requestor} quer associar %{bsc} como seu BSC." - -#: plugins/bsc/lib/bsc_plugin/mailer.rb:7 -msgid "[%s] Bsc management transferred to you." -msgstr "[%s] Administração de Bsc transferida para você." - -#: plugins/bsc/lib/bsc_plugin/bsc.rb:28 -msgid "Bsc info and settings" -msgstr "Informações e Configurações do Bsc" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -msgid "Opened" -msgstr "Aberto" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -msgid "Negotiating" -msgstr "Em negociação" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -msgid "Executing" -msgstr "Executando" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -msgid "Closed" -msgstr "Fechado" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:46 -msgid "Federal" -msgstr "Federal" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:59 -msgid "ProjectA" -msgstr "ProjetoA" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:59 -msgid "ProjectB" -msgstr "ProjetoB" - -#: plugins/bsc/lib/bsc_plugin.rb:10 -msgid "Adds the Bsc feature" -msgstr "Adiciona a funcionalidades Bsc" - -#: plugins/bsc/lib/bsc_plugin.rb:14 -msgid "Create Bsc" -msgstr "Criar Bsc" - -#: plugins/bsc/lib/bsc_plugin.rb:15 -msgid "Validate Enterprises" -msgstr "Validar empreendimentos" - -#: plugins/bsc/lib/bsc_plugin.rb:20 -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:1 -msgid "Manage associated enterprises" -msgstr "Gerenciar empreendimentos associados" - -#: plugins/bsc/lib/bsc_plugin.rb:21 plugins/bsc/lib/bsc_plugin.rb:27 -msgid "Transfer ownership" -msgstr "Transferir administração" - -#: plugins/bsc/lib/bsc_plugin.rb:22 -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:1 -msgid "Manage contracts" -msgstr "Gerenciar contratos" - -#: plugins/bsc/lib/bsc_plugin.rb:98 -msgid "Bsc" -msgstr "Bsc" - -#: plugins/bsc/lib/bsc_plugin.rb:109 -#: plugins/bsc/views/shared/_fields.html.erb:53 -msgid "Contact" -msgstr "Contato" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:5 -#: plugins/bsc/views/shared/_fields.html.erb:5 -msgid "Basic information" -msgstr "Informações Básicas" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:7 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:6 -msgid "Client type" -msgstr "Tipo de cliente" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:8 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:7 -msgid "Business type" -msgstr "Tipo de negócio" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:11 -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:5 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:10 -msgid "Status" -msgstr "Estado" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:12 -msgid "Number of producers" -msgstr "Número de produtores" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:13 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:35 -msgid "Supply period" -msgstr "Período de fornecimento" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:27 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:23 -msgid "Quantity" -msgstr "Quantidade" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:28 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:24 -msgid "Unit price" -msgstr "Preço unitário" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:38 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:27 -msgid "Total" -msgstr "Total" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:48 -msgid "Annotations" -msgstr "Anotações" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:4 -msgid "Associations awaiting approval:" -msgstr "Associações aguardando aprovação:" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:16 -#: plugins/bsc/views/bsc_plugin_admin/validate_enterprises.html.erb:5 -msgid "Type in a search term for enterprise" -msgstr "Digite um termo de pesquisa para empreendimentos" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:19 -msgid "Add new enterprise" -msgstr "Adicionar novo empreendimento" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:17 -msgid "Sort by" -msgstr "Ordenar por" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:18 -msgid "Date(newest first)" -msgstr "Data(mais recentes primeiro)" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:18 -msgid "Date(oldest first)" -msgstr "Data(mais antigos primeiro)" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:19 -msgid "Client name(A-Z)" -msgstr "Nome do cliente(A-Z)" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:19 -msgid "Client name(Z-A)" -msgstr "Nome do cliente(Z-A)" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:24 -msgid "There are no contracts at all." -msgstr "Não há contratos." - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:35 -msgid "Are you sure?" -msgstr "Você tem certeza?" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:45 -msgid "Create new contract" -msgstr "Criar novo contrato" - -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:18 -msgid "Type in search term for enterprise" -msgstr "Digite um termo de pesquisa para empreendimentos" - -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:31 -msgid "Add new product" -msgstr "Adicionar novo produto" - -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:57 -msgid "Type in a search term for product" -msgstr "Digite um termo de pesquisa para produto" - -#: plugins/bsc/views/bsc_plugin_myprofile/new_contract.html.erb:1 -#: plugins/bsc/views/bsc_plugin_myprofile/edit_contract.html.erb:1 -msgid "New contract" -msgstr "Novo contrato" - -#: plugins/bsc/views/bsc_plugin_myprofile/_similar_enterprises.html.erb:2 -msgid "Existing enterprises:" -msgstr "Empreendimentos existentes:" - -#: plugins/bsc/views/bsc_plugin_myprofile/_similar_enterprises.html.erb:3 -msgid "" -"Were found %{count} enterprises with similar names on the same city, you can " -"decide to associate one of them or create the new enterprise confirming the " -"informations you typed in." -msgstr "" -"Foram encontrados %{count} empreendimentos com nomes similares na mesma " -"cidade, você pode decidir associar um deles ou criar um novo empreendimento " -"confirmando as informações que você digitou." - -#: plugins/bsc/views/bsc_plugin_myprofile/_similar_enterprises.html.erb:20 -msgid "Associate" -msgstr "Associar" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:1 -msgid "Transfer Ownership" -msgstr "Transferir administração" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:4 -msgid "" -"This option allows you to transfer this enterprise's management to another " -"user. This action will remove all the current administrators. Be careful " -"when confirming this procedure." -msgstr "" -"Esta opção permite transferir a administração do empreendimento para outro " -"usuário. Esta ação removerá todos os administradores atuais. Seja cuidadoso " -"ao confirmar este procedimento." - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:8 -msgid "Current administrators:" -msgstr "Administradores atuais:" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:19 -msgid "Administrator:" -msgstr "Administradores:" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:22 -msgid "Type in a search term for the new administrator" -msgstr "Digite um termo de pesquisa para o novo adiministrador" - -#: plugins/bsc/views/bsc_plugin/mailer/admin_notification.html.erb:1 -msgid "The management of %{bsc} was transferred to you." -msgstr "A adminstração de %{bsc} foi transferida para você." - -#: plugins/bsc/views/shared/_fields.html.erb:39 -msgid "" -"You are about to change the address, and this will break external links to " -"this bsc or to posts inside it. Do you really want to change?" -msgstr "" -"Você está prestes a alterar o endereço, e isto vai quebrar links externos " -"para esse bsc ou para artigos dentro dele. Você realmente deseja mudar?" - -#: plugins/bsc/views/bsc_plugin_admin/new.html.erb:2 -msgid "BSC registration" -msgstr "Registro de BSC" - -#: plugins/bsc/views/bsc_plugin_admin/validate_enterprises.html.erb:1 -msgid "Validate enterprises" -msgstr "Validar empreendimentos" - -#: plugins/bsc/views/profile/_profile_tab.html.erb:2 -msgid "Contact phone: " -msgstr "Telefone de contato: " - -#: plugins/bsc/views/profile/_profile_tab.html.erb:3 -msgid "Email: " -msgstr "Email: " diff --git a/plugins/bsc/po/ru/bsc.po b/plugins/bsc/po/ru/bsc.po deleted file mode 100644 index bf5370e..0000000 --- a/plugins/bsc/po/ru/bsc.po +++ /dev/null @@ -1,410 +0,0 @@ -# Russian translation of noosfero. -# Copyright (C) 2009 Anton Caceres -# This file is distributed under the same license as the noosfero package. -# Josef Spillner , 2009. -# -msgid "" -msgstr "" -"Project-Id-Version: 1.1-882-g0c116ba\n" -"POT-Creation-Date: 2015-09-25 15:42-0000\n" -"PO-Revision-Date: 2014-12-12 14:23+0200\n" -"Last-Translator: Michal Čihař \n" -"Language-Team: Russian \n" -"Language: ru\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 2.2-dev\n" - -#: plugins/bsc/controllers/bsc_plugin_admin_controller.rb:11 -#, fuzzy -msgid "Your Bsc was created." -msgstr "Ваш E-Mail %s активирован" - -#: plugins/bsc/controllers/bsc_plugin_admin_controller.rb:21 -#, fuzzy -msgid "Enterprises validated." -msgstr "Утвердители компаний" - -#: plugins/bsc/controllers/bsc_plugin_admin_controller.rb:24 -#, fuzzy -msgid "Enterprise validations couldn't be saved." -msgstr "Утвердители компаний" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:38 -#, fuzzy -msgid "This Bsc associations were saved successfully." -msgstr "Все файлы успешно обновлены" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:42 -#, fuzzy -msgid "This Bsc associations couldn't be saved." -msgstr "Файл не может быть сохранен" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:71 -#, fuzzy -msgid "Enterprise ownership transferred." -msgstr "Домашняя страница компании" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:85 -#, fuzzy -msgid "Enterprise was created in association with %s." -msgstr "Регистрация предприятия: \"%s\"" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:117 -#, fuzzy -msgid "Contract created." -msgstr "Контактный email" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:120 -msgid "Contract created but some products could not be added." -msgstr "" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:131 -msgid "Contract doesn't exists! Maybe it was already removed." -msgstr "" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:140 -#, fuzzy -msgid "Could not edit such contract." -msgstr "Невозможно обновить продукт" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:170 -#, fuzzy -msgid "Contract edited." -msgstr "Контактный email" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:173 -#, fuzzy -msgid "Contract edited but some products could not be added." -msgstr "Блок персональной информации" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:183 -#, fuzzy -msgid "Contract removed." -msgstr "Тело статьи" - -#: plugins/bsc/controllers/bsc_plugin_myprofile_controller.rb:185 -#, fuzzy -msgid "Contract could not be removed. Sorry! ^^" -msgstr "Блок персональной информации" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:10 -#, fuzzy -msgid "BSC association" -msgstr "Основная информация" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:18 -#, fuzzy -msgid "%{requestor} wants to associate this enterprise with %{linked_subject}." -msgstr "'%{user} хочет активировать E-Mail '%{email}' " - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:35 -msgid "%{enterprise} accepted your request to associate it with %{bsc}." -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:39 -msgid "%{enterprise} rejected your request to associate it with %{bsc}." -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:41 -msgid "" -"Here is the reject explanation left by the administrator:\n" -"\n" -"%{reject_explanation}" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/associate_enterprise.rb:46 -#, fuzzy -msgid "%{requestor} wants assoaciate %{bsc} as your BSC." -msgstr "%s хочет быть вашим другом" - -#: plugins/bsc/lib/bsc_plugin/mailer.rb:7 -msgid "[%s] Bsc management transferred to you." -msgstr "" - -#: plugins/bsc/lib/bsc_plugin/bsc.rb:28 -#, fuzzy -msgid "Bsc info and settings" -msgstr "Инфо профиля и настройки" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -#, fuzzy -msgid "Opened" -msgstr "открыть" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -#, fuzzy -msgid "Negotiating" -msgstr "Настройки" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -#, fuzzy -msgid "Executing" -msgstr "Редактирование" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:33 -#, fuzzy -msgid "Closed" -msgstr "Закрыть" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:46 -#, fuzzy -msgid "Federal" -msgstr "Основная задача" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:59 -#, fuzzy -msgid "ProjectA" -msgstr "Продукт" - -#: plugins/bsc/lib/bsc_plugin/contract.rb:59 -#, fuzzy -msgid "ProjectB" -msgstr "Продукт" - -#: plugins/bsc/lib/bsc_plugin.rb:10 -#, fuzzy -msgid "Adds the Bsc feature" -msgstr "Системные возможности" - -#: plugins/bsc/lib/bsc_plugin.rb:14 -#, fuzzy -msgid "Create Bsc" -msgstr "Создать" - -#: plugins/bsc/lib/bsc_plugin.rb:15 -#, fuzzy -msgid "Validate Enterprises" -msgstr "Подтвердить компанию" - -#: plugins/bsc/lib/bsc_plugin.rb:20 -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:1 -#, fuzzy -msgid "Manage associated enterprises" -msgstr "Verwalte Unternehmensfelder" - -#: plugins/bsc/lib/bsc_plugin.rb:21 plugins/bsc/lib/bsc_plugin.rb:27 -msgid "Transfer ownership" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin.rb:22 -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:1 -#, fuzzy -msgid "Manage contracts" -msgstr "Управлять контактами" - -#: plugins/bsc/lib/bsc_plugin.rb:98 -msgid "Bsc" -msgstr "" - -#: plugins/bsc/lib/bsc_plugin.rb:109 -#: plugins/bsc/views/shared/_fields.html.erb:53 -msgid "Contact" -msgstr "Контакт" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:5 -#: plugins/bsc/views/shared/_fields.html.erb:5 -msgid "Basic information" -msgstr "Основная информация" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:7 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:6 -#, fuzzy -msgid "Client type" -msgstr "Тип контента" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:8 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:7 -#, fuzzy -msgid "Business type" -msgstr "Название работы" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:11 -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:5 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:10 -msgid "Status" -msgstr "Статус" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:12 -#, fuzzy -msgid "Number of producers" -msgstr "Количество новостей" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:13 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:35 -#, fuzzy -msgid "Supply period" -msgstr "Поставщик: %s" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:27 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:23 -#, fuzzy -msgid "Quantity" -msgstr "Качество" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:28 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:24 -#, fuzzy -msgid "Unit price" -msgstr "Прайс:" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:38 -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:27 -#, fuzzy -msgid "Total" -msgstr "Получатель:" - -#: plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb:48 -#, fuzzy -msgid "Annotations" -msgstr "Текст приглашения" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:4 -msgid "Associations awaiting approval:" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:16 -#: plugins/bsc/views/bsc_plugin_admin/validate_enterprises.html.erb:5 -#, fuzzy -msgid "Type in a search term for enterprise" -msgstr "Отключить поиск по компаниям" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb:19 -#, fuzzy -msgid "Add new enterprise" -msgstr "Одна компания" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:17 -#, fuzzy -msgid "Sort by" -msgstr "Отправлено %s." - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:18 -msgid "Date(newest first)" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:18 -msgid "Date(oldest first)" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:19 -msgid "Client name(A-Z)" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:19 -msgid "Client name(Z-A)" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:24 -#, fuzzy -msgid "There are no contracts at all." -msgstr "У вас еще нет контактов" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:35 -msgid "Are you sure?" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb:45 -#, fuzzy -msgid "Create new contract" -msgstr "Создать новое сообщество" - -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:18 -#, fuzzy -msgid "Type in search term for enterprise" -msgstr "Отключить поиск по компаниям" - -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:31 -#, fuzzy -msgid "Add new product" -msgstr "Управление продуктами" - -#: plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb:57 -#, fuzzy -msgid "Type in a search term for product" -msgstr "Отключить поиск по компаниям" - -#: plugins/bsc/views/bsc_plugin_myprofile/new_contract.html.erb:1 -#: plugins/bsc/views/bsc_plugin_myprofile/edit_contract.html.erb:1 -#, fuzzy -msgid "New contract" -msgstr "Весь контент" - -#: plugins/bsc/views/bsc_plugin_myprofile/_similar_enterprises.html.erb:2 -#, fuzzy -msgid "Existing enterprises:" -msgstr "Unternehmen ändern" - -#: plugins/bsc/views/bsc_plugin_myprofile/_similar_enterprises.html.erb:3 -msgid "" -"Were found %{count} enterprises with similar names on the same city, you can " -"decide to associate one of them or create the new enterprise confirming the " -"informations you typed in." -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/_similar_enterprises.html.erb:20 -#, fuzzy -msgid "Associate" -msgstr "Активировать" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:1 -msgid "Transfer Ownership" -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:4 -msgid "" -"This option allows you to transfer this enterprise's management to another " -"user. This action will remove all the current administrators. Be careful " -"when confirming this procedure." -msgstr "" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:8 -#, fuzzy -msgid "Current administrators:" -msgstr "Текущие участники" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:19 -#, fuzzy -msgid "Administrator:" -msgstr "Администраторы:" - -#: plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb:22 -msgid "Type in a search term for the new administrator" -msgstr "" - -#: plugins/bsc/views/bsc_plugin/mailer/admin_notification.html.erb:1 -msgid "The management of %{bsc} was transferred to you." -msgstr "" - -#: plugins/bsc/views/shared/_fields.html.erb:39 -#, fuzzy -msgid "" -"You are about to change the address, and this will break external links to " -"this bsc or to posts inside it. Do you really want to change?" -msgstr "" -"Вы собираетесь сменить адрес, это приведет к разрыву всех внешних ссылок, " -"ведущих на вашу страницу. Вы уверены?" - -#: plugins/bsc/views/bsc_plugin_admin/new.html.erb:2 -#, fuzzy -msgid "BSC registration" -msgstr "Регистрация предприятия" - -#: plugins/bsc/views/bsc_plugin_admin/validate_enterprises.html.erb:1 -#, fuzzy -msgid "Validate enterprises" -msgstr "Подтвердить компанию" - -#: plugins/bsc/views/profile/_profile_tab.html.erb:2 -#, fuzzy -msgid "Contact phone: " -msgstr "Kontakttelefon:" - -#: plugins/bsc/views/profile/_profile_tab.html.erb:3 -#, fuzzy -msgid "Email: " -msgstr "E-Mail: %s" diff --git a/plugins/bsc/public/contracts.js b/plugins/bsc/public/contracts.js deleted file mode 100644 index bf2b1ca..0000000 --- a/plugins/bsc/public/contracts.js +++ /dev/null @@ -1,86 +0,0 @@ -var BSCContracts = {}; - -(function($){ - BSCContracts.onDelete = function(item){ - $('.token-input-dropdown').hide(); - $('#bsc-plugin-row-'+item.sale_id.toString()).remove(); - BSCContracts.updateTotal(); - }; - - BSCContracts.onAdd = function(item){ - var quantity = $('#bsc-plugin-sale-'+item.sale_id.toString()+'-quantity'); - var price = $('#bsc-plugin-sale-'+item.sale_id.toString()+'-price'); - quantity.addClass('required'); - price.addClass('required'); - quantity.val(1); - price.val(item.product_price); - BSCContracts.updateTotal(); - }; - - BSCContracts.newID = function(){ - if ( !this.idNum ) this.idNum = 0; - return this.idNum++; - }; - - BSCContracts.newProductLine = function(item){ - var id = this.newID(); - var tr = $(''); - var tds = $(''+this.currencyUnit+'').appendTo(tr); - var input = $('').appendTo(tds[0]); - var searchUrl = this.searchUrl - .replace('ENTERPRISES', $('#involved-enterprises').val()) - .replace('SALE_ID', id) - .replace('ADDED_PRODUCTS', $.map($('.search-product-field'), function(item){return item.value}).join(',')); - var prePopulation = []; - var quantity = ''; - var price = ''; - var required = ''; - if(item) { - item.sale_id = id; - prePopulation = [item]; - quantity = item.quantity; - price = item.product_price; - required = 'required'; - } - var opts = $.extend( { prePopulate: prePopulation, queryParam: input[0].name }, this.tokenInputOptions ); - - input.keydown(function(event){ if(event.keyCode == '13') return false }) - .tokenInput(searchUrl, opts); - $('#bsc-plugin-contract-total-row').before(tr); - $('').appendTo(tds[1]); - $('').appendTo(tds[2]); - }; - - BSCContracts.prePopulate = function(items){ - $(items).each(function(index, item){BSCContracts.newProductLine(item)}); - } - - BSCContracts.updateTotal = function(){ - var total = 0; - var quantity = 0; - var price = 0; - $('.bsc-plugin-sales-product').each(function(index){ - quantity = $('#' + $(this).attr('id') + " .bsc-plugin-sales-quantity").val(); - price = $('#'+$(this).attr('id') + " .bsc-plugin-sales-price").val(); - total += quantity*price; - }); - $('#bsc-plugin-sales-total-value').text(BSCContracts.currencyUnit+' '+total); - } - - $(".bsc-plugin-sales-price, .bsc-plugin-sales-quantity").live('change', function(e){ - BSCContracts.updateTotal(); - }); - - $("#bsc-plugin-add-new-product").click(function(){ - var last = $('.search-product-field:last'); - if(!last.val() && last.size() != 0){ - last.focus(); - return false; - } - var next_id = parseInt(last.attr('data-sale-id'))+1; - var enterprises = $('#involved-enterprises').val().replace(/,/g,'-'); - BSCContracts.newProductLine(); - return false; - }); - -})(jQuery); diff --git a/plugins/bsc/public/datepicker.js b/plugins/bsc/public/datepicker.js deleted file mode 100644 index 3e9ff11..0000000 --- a/plugins/bsc/public/datepicker.js +++ /dev/null @@ -1,14 +0,0 @@ -var dates = jQuery( "#from, #to" ).datepicker({ - defaultDate: "+1w", - changeMonth: true, - dateFormat: 'yy-mm-dd', - onSelect: function( selectedDate ) { - var option = this.id == "from" ? "minDate" : "maxDate", - instance = jQuery( this ).data( "datepicker" ), - date = jQuery.datepicker.parseDate( - instance.settings.dateFormat || - jQuery.datepicker._defaults.dateFormat, - selectedDate, instance.settings ); - dates.not( this ).datepicker( "option", option, date ); - } -}); diff --git a/plugins/bsc/public/images/manage-bsc-enterprises-icon.png b/plugins/bsc/public/images/manage-bsc-enterprises-icon.png deleted file mode 100644 index a9d92f9..0000000 Binary files a/plugins/bsc/public/images/manage-bsc-enterprises-icon.png and /dev/null differ diff --git a/plugins/bsc/public/images/manage-bsc-enterprises.gif b/plugins/bsc/public/images/manage-bsc-enterprises.gif deleted file mode 100644 index 53b5b1a..0000000 Binary files a/plugins/bsc/public/images/manage-bsc-enterprises.gif and /dev/null differ diff --git a/plugins/bsc/public/images/manage-bsc-enterprises.png b/plugins/bsc/public/images/manage-bsc-enterprises.png deleted file mode 100644 index f4bd12e..0000000 Binary files a/plugins/bsc/public/images/manage-bsc-enterprises.png and /dev/null differ diff --git a/plugins/bsc/public/images/manage-bsc-enterprises.svg b/plugins/bsc/public/images/manage-bsc-enterprises.svg deleted file mode 100644 index d64a42f..0000000 --- a/plugins/bsc/public/images/manage-bsc-enterprises.svg +++ /dev/null @@ -1,1309 +0,0 @@ - -image/svg+xmlJakub Steinerhttp://jimmac.musichall.czhomereturngodefaultuserdirectoryTuomas Kuosmanen - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/bsc/public/images/transfer-ownership.png b/plugins/bsc/public/images/transfer-ownership.png deleted file mode 100644 index a04baa5..0000000 Binary files a/plugins/bsc/public/images/transfer-ownership.png and /dev/null differ diff --git a/plugins/bsc/public/images/transfer-ownership.svg b/plugins/bsc/public/images/transfer-ownership.svg deleted file mode 100644 index 6d5a653..0000000 --- a/plugins/bsc/public/images/transfer-ownership.svg +++ /dev/null @@ -1,1965 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/bsc/public/spinner.js b/plugins/bsc/public/spinner.js deleted file mode 100644 index 49ad4b5..0000000 --- a/plugins/bsc/public/spinner.js +++ /dev/null @@ -1,5 +0,0 @@ -jQuery('#bsc-plugin-contract-spinner').spinner({ - min: 0, - increment: 'fast', - mouseWheel: true, -}); diff --git a/plugins/bsc/public/style.css b/plugins/bsc/public/style.css deleted file mode 100644 index 63377a8..0000000 --- a/plugins/bsc/public/style.css +++ /dev/null @@ -1,182 +0,0 @@ -@import url(jquery.ui.spinner/ui.spinner.css); - -.controller-profile_editor a.control-panel-bsc-enterprises {background-image: url(/plugins/bsc/images/manage-bsc-enterprises.png)} -.controller-profile_editor .msie6 a.control-panel-bsc-enterprises {background-image: url(/plugins/bsc/images/manage-bsc-enterprises.gif)} - -.controller-profile_editor a.control-panel-transfer-enterprise-ownership {background-image: url(/plugins/bsc/images/transfer-ownership.png)} - -.ui-spinner-up{ - height: 6.5px !important; -} - -.ui-spinner-down{ - height: 8.5px !important; -} - -.ui-icon-triangle-1-n { - margin-top: -4px !important; -} - -.ui-icon-triangle-1-s { - margin-left: -1px !important; - margin-top: -3.5px !important; -} - -.icon-menu-bsc { - background-image: url(/plugins/bsc/images/manage-bsc-enterprises-icon.png); -} - -#content .token-input-list { - margin-bottom: 30px; -} - -#bsc-plugin-sorter { - text-align: right; - margin: 3px 0px; -} - -#bsc-plugin-sales-table th, -#bsc-plugin-sales-table td { - border: 1px solid #000; - border-collapse: collapse; - padding: 0px -} - -#content #bsc-plugin-sales-table td .token-input-list{ - margin-bottom: 0px; -} - -#bsc-plugin-sales-table { - border: 1px solid #000; - border-collapse: collapse; -} - -#bsc-plugin-sales-table th { - background-color: #cdcdcd; - padding: 0px 10px; -} - -.alternate-colors tr:nth-child(odd), -.alternate-colors tr:nth-child(odd):hover td { - background-color: #f4f4f4; -} - -.alternate-colors tr:nth-child(even), -.alternate-colors tr:nth-child(even):hover td { - background-color: #fff; -} - -#bsc-plugin-sales-table input.error{ - background-color: #F8DBDD; - border: 1px solid #f5697c; - margin-left: 2px; -} - -.bsc-plugin-sales-price { - width: 75%; -} - -.bsc-plugin-sales-products-column { - width: 70%; -} - -.bsc-plugin-sales-quantity-column { - width: 10%; - text-align: center; -} - -.bsc-plugin-sales-price-column { - width: 18%; -} - -#bsc-plugin-sales-add-new-row { - padding: 0px 10px; -} - -#bsc-plugin-manage-contracts-table a { - color: #555753; -} - -#bsc-plugin-manage-contracts-table { - border:none; -} -#bsc-plugin-manage-contracts-table td { - padding: 5px 10px; -} - -#bsc-plugin-manage-contracts-table td.links { - text-align: right; -} - -#bsc-plugin-contracts-filter { - float: left; - width: 20%; - height: 100%; -} - - -#bsc-plugin-contracts-results { - float: left; - width: 80%; -} - -#bsc-plugin-contract-total-string, -#bsc-plugin-contract-total { - text-align: right; -} - -.bsc-fields-table { - border: collapse; - width: 49%; -} - -.bsc-fields-table th{ - font-size: 14px; - padding: 0px; -} - -.bsc-fields-table td { - border: none; - padding: 0px; -} - -.bsc-fields-table tr:hover td { - background-color: transparent; -} - -.bsc-field-label { - font-weight: bold; -} - -.bsc-full-table { - margin: 3px 0px; -} - -.bsc-plugin-view-contract { - margin-top: 10px; -} - -.bsc-plugin-view-contract td { - padding: 2px 10px !important; -} - -.bsc-plugin-total { - font-weight: bold; -} - -.bsc-plugin-annotation { - background-color: #eeeeec; - margin: 10px 0px; - padding: 5px 10px; - border-radius: 5px; -} - -.bsc-plugin-annotation-title { - font-weight: bold; - font-size: 15px; - margin-bottom: 5px; -} - -.bsc-plugin-annotation-content { - font-style: italic; -} diff --git a/plugins/bsc/public/validation.js b/plugins/bsc/public/validation.js deleted file mode 100644 index 2060814..0000000 --- a/plugins/bsc/public/validation.js +++ /dev/null @@ -1,4 +0,0 @@ -jQuery("#bsc-plugin-sales-form").validate({ - errorPlacement: function(error, element){element.attr('title', error.text())} -}); - diff --git a/plugins/bsc/test/functional/bsc_plugin_admin_controller_test.rb b/plugins/bsc/test/functional/bsc_plugin_admin_controller_test.rb deleted file mode 100644 index 1b33d94..0000000 --- a/plugins/bsc/test/functional/bsc_plugin_admin_controller_test.rb +++ /dev/null @@ -1,81 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../../controllers/bsc_plugin_admin_controller' - -# Re-raise errors caught by the controller. -class BscPluginAdminController; def rescue_action(e) raise e end; end - -class BscPluginAdminControllerTest < ActionController::TestCase - - VALID_CNPJ = '94.132.024/0001-48' - - def setup - @controller = BscPluginAdminController.new - @request = ActionController::TestRequest.new - @response = ActionController::TestResponse.new - user_login = create_admin_user(Environment.default) - login_as(user_login) - @admin = User[user_login].person - e = Environment.default - e.enabled_plugins = ['BscPlugin'] - e.save! - end - - attr_accessor :admin - - should 'create a new bsc' do - assert_difference BscPlugin::Bsc, :count, 1 do - post :new, :profile_data => {:business_name => 'Sample Bsc', :identifier => 'sample-bsc', :company_name => 'Sample Bsc Ltda.', :cnpj => VALID_CNPJ} - end - - assert_redirected_to :controller => 'profile_editor', :profile => 'sample-bsc' - end - - should 'not create an invalid bsc' do - assert_difference BscPlugin::Bsc, :count, 0 do - post :new, :profile_data => {:business_name => 'Sample Bsc', :identifier => 'sample-bsc', :company_name => 'Sample Bsc Ltda.', :cnpj => '29837492304'} - end - - assert_response 200 - end - - should 'set the current user as the bsc admin' do - name = 'Sample Bsc' - post :new, :profile_data => {:business_name => name, :identifier => 'sample-bsc', :company_name => 'Sample Bsc Ltda.', :cnpj => VALID_CNPJ} - bsc = BscPlugin::Bsc.find_by_name(name) - assert_includes bsc.admins, admin - end - - should 'list correct enterprises on search' do - # Should list if: not validated AND (name matches OR identifier matches) AND not bsc - e1 = Enterprise.create!(:name => 'Sample Enterprise 1', :identifier => 'bli', :validated => false) - e2 = Enterprise.create!(:name => 'Bla', :identifier => 'sample-enterprise-6', :validated => false) - e3 = Enterprise.create!(:name => 'Blo', :identifier => 'blo', :validated => false) - e4 = BscPlugin::Bsc.create!(:business_name => "Sample Bsc", :identifier => 'sample-bsc', :company_name => 'Sample Bsc Ltda.', :cnpj => VALID_CNPJ, :validated => false) - e5 = Enterprise.create!(:name => 'Sample Enterprise 5', :identifier => 'sample-enterprise-5') - e5.validated = true - e5.save! - - get :search_enterprise, :q => 'sampl' - - assert_match /#{e1.name}/, @response.body - assert_match /#{e2.name}/, @response.body - assert_no_match /#{e3.name}/, @response.body - assert_no_match /#{e4.name}/, @response.body - assert_no_match /#{e5.name}/, @response.body - end - - should 'save validations' do - e1 = fast_create(Enterprise, :validated => false) - e2 = fast_create(Enterprise, :validated => false) - e3 = fast_create(Enterprise, :validated => false) - - post :save_validations, :q => "#{e1.id},#{e2.id}" - e1.reload - e2.reload - e3.reload - - assert e1.validated - assert e2.validated - refute e3.validated - end -end diff --git a/plugins/bsc/test/functional/bsc_plugin_myprofile_controller_test.rb b/plugins/bsc/test/functional/bsc_plugin_myprofile_controller_test.rb deleted file mode 100644 index c99ee67..0000000 --- a/plugins/bsc/test/functional/bsc_plugin_myprofile_controller_test.rb +++ /dev/null @@ -1,322 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../../controllers/bsc_plugin_myprofile_controller' - -# Re-raise errors caught by the controller. -class BscPluginMyprofileController; def rescue_action(e) raise e end; end - -class BscPluginMyprofileControllerTest < ActionController::TestCase - - VALID_CNPJ = '94.132.024/0001-48' - - def setup - @controller = BscPluginMyprofileController.new - @request = ActionController::TestRequest.new - @response = ActionController::TestResponse.new - @bsc = BscPlugin::Bsc.create!({:business_name => 'Sample Bsc', :identifier => 'sample-bsc', :company_name => 'Sample Bsc Ltda.', :cnpj => VALID_CNPJ}) - @admin = create_user('admin').person - @bsc.add_admin(@admin) - login_as(@admin.user.login) - e = Environment.default - e.enabled_plugins = ['BscPlugin'] - e.save! - end - - attr_accessor :admin, :bsc - - should 'list enterprises on search' do - # Should list if match name - e1 = Enterprise.create!(:name => 'sample enterprise 1', :identifier => 'sample-enterprise-1') - # Should be case insensitive - e2 = Enterprise.create!(:name => 'SaMpLe eNtErPrIsE 2', :identifier => 'sample-enterprise-2') - # Should not list if don't match name - e3 = Enterprise.create!(:name => 'blo', :identifier => 'blo') - # Should not list if is has a bsc - e4 = Enterprise.create!(:name => 'sample enterprise 4', :identifier => 'sample-enterprise-4', :bsc => bsc) - # Should not list if is enabled - e5 = Enterprise.create!(:name => 'sample enterprise 5', :identifier => 'sample-enterprise-5', :enabled => true) - BscPlugin::AssociateEnterprise.create!(:requestor => admin, :target => e5, :bsc => bsc) - # Should search by identifier - e6 = Enterprise.create!(:name => 'Bla', :identifier => 'sample-enterprise-6') - - get :search_enterprise, :profile => bsc.identifier, :q => 'sampl' - - assert_match /#{e1.name}/, @response.body - assert_match /#{e2.name}/, @response.body - assert_no_match /#{e3.name}/, @response.body - assert_no_match /#{e4.name}/, @response.body - assert_no_match /#{e5.name}/, @response.body - assert_no_match /#{bsc.name}/, @response.body - assert_match /#{e6.name}/, @response.body - end - - should 'do not list profiles template on search' do - e1 = Enterprise.create!(:name => 'Sample Enterprise 1', :identifier => 'sample-enterprise-1') - e2 = Enterprise.create!(:name => 'Sample Enterprise 2', :identifier => 'sample-enterprise-2') - t1 = Enterprise.create!(:name => 'Enterprise template', :identifier => 'enterprise_template') - t2 = Enterprise.create!(:name => 'Inactive enterprise template', :identifier => 'inactive_enterprise_template') - - get :search_enterprise, :profile => bsc.identifier, :q => 'ent' - - assert_no_match /#{t1.name}/, @response.body - assert_no_match /#{t2.name}/, @response.body - end - - should 'save associations' do - e1 = fast_create(Enterprise, :enabled => false) - e2 = fast_create(Enterprise, :enabled => false) - - post :save_associations, :profile => bsc.identifier, :q => "#{e1.id},#{e2.id}" - e1.reload - e2.reload - assert_equal e1.bsc, bsc - assert_equal e2.bsc, bsc - - post :save_associations, :profile => bsc.identifier, :q => "#{e1.id}" - e1.reload - e2.reload - assert_equal e1.bsc, bsc - assert_not_equal e2.bsc, bsc - end - - should 'create a task to the enabled enterprise instead of associating it' do - e = fast_create(Enterprise, :enabled => true) - - assert_difference BscPlugin::AssociateEnterprise, :count, 1 do - post :save_associations, :profile => bsc.identifier, :q => "#{e.id}" - bsc.reload - assert_not_includes bsc.enterprises, e - end - end - - should 'transfer ownership' do - p1 = create_user('p1').person - p2 = create_user('p2').person - p3 = create_user('p3').person - - role = Profile::Roles.admin(bsc.environment.id) - - bsc.add_admin(p1) - bsc.add_admin(p2) - - post :transfer_ownership, :profile => bsc.identifier, 'q_'+role.key => "#{p3.id}" - - assert_response :redirect - - assert_not_includes bsc.admins, p1 - assert_not_includes bsc.admins, p2 - assert_includes bsc.admins, p3 - end - - should 'create enterprise' do - assert_difference Enterprise, :count, 1 do - post :create_enterprise, :profile => bsc.identifier, :create_enterprise => {:name => 'Test Bsc', :identifier => 'test-bsc'} - end - - enterprise = Enterprise.find_by_identifier('test-bsc') - - assert_equal true, enterprise.enabled - assert_equal false, enterprise.validated - assert_equal enterprise.bsc, bsc - end - - should 'fecth contracts filtered by status' do - contract0 = BscPlugin::Contract.create!(:bsc => bsc, :status => 0, :client_name => 'Marvin') - contract1 = BscPlugin::Contract.create!(:bsc => bsc, :status => 1, :client_name => 'Marvin') - contract2 = BscPlugin::Contract.create!(:bsc => bsc, :status => 2, :client_name => 'Marvin') - contract3 = BscPlugin::Contract.create!(:bsc => bsc, :status => 3, :client_name => 'Marvin') - - get :manage_contracts, :profile => bsc.identifier, :status => ['1', '3'] - - assert_not_includes assigns(:contracts), contract0 - assert_includes assigns(:contracts), contract1 - assert_not_includes assigns(:contracts), contract2 - assert_includes assigns(:contracts), contract3 - end - - should 'manage contracts should have all status marked by default' do - get :manage_contracts, :profile => bsc.identifier - assert_equal assigns(:status), BscPlugin::Contract::Status.types.map { |s| s.to_s } - end - - should 'fetch contracts sorted accordingly' do - contract0 = BscPlugin::Contract.create!(:bsc => bsc, :created_at => 1.day.ago, :client_name => 'Eva') - contract1 = BscPlugin::Contract.create!(:bsc => bsc, :created_at => 2.day.ago, :client_name => 'Adam') - contract2 = BscPlugin::Contract.create!(:bsc => bsc, :created_at => 3.day.ago, :client_name => 'Marvin') - - by_date = [contract2, contract1, contract0] - by_name = [contract1, contract0, contract2] - - get :manage_contracts, :profile => bsc.identifier, :sorting => 'created_at asc' - assert_equal by_date, assigns(:contracts) - - get :manage_contracts, :profile => bsc.identifier, :sorting => 'created_at desc' - assert_equal by_date.reverse, assigns(:contracts) - - get :manage_contracts, :profile => bsc.identifier, :sorting => 'client_name asc' - assert_equal by_name, assigns(:contracts) - - get :manage_contracts, :profile => bsc.identifier, :sorting => 'client_name desc' - assert_equal by_name.reverse, assigns(:contracts) - end - - should 'limit the contracts to defined per page' do - BscPlugin::Contract.create!(:bsc => bsc, :client_name => 'Marvin') - BscPlugin::Contract.create!(:bsc => bsc, :client_name => 'Marvin') - - @controller.stubs(:contracts_per_page).returns(1) - - get :manage_contracts, :profile => bsc.identifier - - assert_equal 1, assigns(:contracts).count - end - - should 'destroy contract' do - contract = BscPlugin::Contract.create!(:bsc => bsc, :client_name => 'Marvin') - - assert_difference BscPlugin::Contract, :count, -1 do - get :destroy_contract, :profile => bsc.identifier, :contract_id => contract.id - end - - assert_raise ActiveRecord::RecordNotFound do - BscPlugin::Contract.find(contract.id) - end - end - - should 'not crash if trying to destroy a contract that does not exists' do - assert_nothing_raised do - get :destroy_contract, :profile => bsc.identifier, :contract_id => -1 - end - assert_redirected_to :action => 'manage_contracts' - end - - should 'not crash if trying to edit a contract that does not exists' do - assert_nothing_raised do - get :edit_contract, :profile => bsc.identifier, :contract_id => -1 - end - assert_redirected_to :action => 'manage_contracts' - end - - should 'create contract associating the enterprises' do - enterprise1 = fast_create(Enterprise) - enterprise2 = fast_create(Enterprise) - - post :new_contract, :profile => bsc.identifier, :enterprises => "#{enterprise1.id},#{enterprise2.id}", :contract => {:bsc => bsc, :client_name => 'Marvin'} - - bsc.reload - contract = bsc.contracts.last - - assert_includes contract.enterprises, enterprise1 - assert_includes contract.enterprises, enterprise2 - end - - should 'edit contract adding or removing enterprises accordingly' do - enterprise1 = fast_create(Enterprise) - enterprise2 = fast_create(Enterprise) - enterprise3 = fast_create(Enterprise) - contract = BscPlugin::Contract.create!(:bsc => bsc, :client_name => 'Marvin') - contract.enterprises << enterprise1 - contract.enterprises << enterprise2 - - post :edit_contract, :profile => bsc.identifier, :contract_id => contract.id, :enterprises => "#{enterprise2.id},#{enterprise3.id}", :contract => {:bsc => bsc} - contract.reload - - assert_not_includes contract.enterprises, enterprise1 - assert_includes contract.enterprises, enterprise2 - assert_includes contract.enterprises, enterprise3 - end - - should 'not crash if there is no enterprises on create' do - assert_nothing_raised do - post :new_contract, :profile => bsc.identifier, :contract => {:bsc => bsc, :client_name => 'Marvin'} - end - end - - should 'create contract with associated sales' do - product1 = fast_create(Product, :price => 2.50) - product2 = fast_create(Product) - sale1 = {:product_id => product1.id, :quantity => 2} - sale2 = {:product_id => product2.id, :quantity => 5, :price => 3.50} - sales = {1 => sale1, 2 => sale2} - - post :new_contract, :profile => bsc.identifier, :sales => sales, :contract => {:bsc => bsc, :client_name => 'Marvin'} - - bsc.reload - contract = bsc.contracts.last - - assert_includes contract.products, product1 - assert_includes contract.products, product2 - - assert_equal sale1[:quantity], contract.sales.find_by_product_id(sale1[:product_id]).quantity - assert_equal sale2[:quantity], contract.sales.find_by_product_id(sale2[:product_id]).quantity - assert_equal sale2[:price], contract.sales.find_by_product_id(sale2[:product_id]).price - end - - should 'edit contract adding or removing sales accordingly' do - product1 = fast_create(Product) - product2 = fast_create(Product) - product3 = fast_create(Product) - contract = BscPlugin::Contract.create!(:bsc => bsc, :client_name => 'Marvin') - BscPlugin::Sale.create!(:product => product1, :contract => contract, :quantity => 1) - BscPlugin::Sale.create!(:product => product2, :contract => contract, :quantity => 1) - sales = {1 => {:product_id => product2.id, :quantity => 1}, 2 => {:product_id => product3.id, :quantity => 1}} - - post :edit_contract, :profile => bsc.identifier, :contract_id => contract.id, :sales => sales , :contract => {:bsc => bsc} - contract.reload - - assert_not_includes contract.products, product1 - assert_includes contract.products, product2 - assert_includes contract.products, product3 - end - - should 'edit sales informations' do - product1 = fast_create(Product) - product2 = fast_create(Product) - contract = BscPlugin::Contract.create!(:bsc => bsc, :client_name => 'Marvin') - sale1 = BscPlugin::Sale.create!(:product => product1, :contract => contract, :quantity => 1, :price => 1.0) - sale2 = BscPlugin::Sale.create!(:product => product2, :contract => contract, :quantity => 2, :price => 2.0) - sale2.save! - sales = {1 => {:product_id => product1.id, :quantity => 3, :price => 5.0}, 2 => {:product_id => product2.id, :quantity => 4, :price => 10.0}} - - post :edit_contract, :profile => bsc.identifier, :contract_id => contract.id, :sales => sales , :contract => {:bsc => bsc} - - sale1.reload - sale2.reload - - assert_equal 3, sale1.quantity - assert_equal 5.0, sale1.price - assert_equal 4, sale2.quantity - assert_equal 10.0, sale2.price - end - - should 'redirect to edit contract if some sale could not be created' do - product = fast_create(Product) - # sale without quantity - sales = {1 => {:product_id => product.id, :price => 1.50}} - - post :new_contract, :profile => bsc.identifier, :sales => sales, :contract => {:bsc => bsc, :client_name => 'Marvin'} - - bsc.reload - contract = bsc.contracts.last - - assert_redirected_to :action => 'edit_contract', :contract_id => contract.id - end - - should 'search for products from the invoved enterprises' do - # product1 fits - # product2 doesn't fits because its in added_products - # product3 doesn't fits because its enterprise is in enterprises - enterprise1 = fast_create(Enterprise) - enterprise2 = fast_create(Enterprise) - enterprise3 = fast_create(Enterprise) - product1 = fast_create(Product, :profile_id => enterprise1.id, :name => 'Black Bycicle') - product2 = fast_create(Product, :profile_id => enterprise2.id, :name => 'Black Guitar') - product3 = fast_create(Product, :profile_id => enterprise3.id, :name => 'Black Notebook') - - get :search_sale_product, :profile => bsc.identifier, :enterprises => [enterprise1.id,enterprise2.id].join(','), :added_products => [product2.id].join(','),:sales => {1 => {:product_id => 'black'}} - - assert_match /#{product1.name}/, @response.body - assert_no_match /#{product2.name}/, @response.body - assert_no_match /#{product3.name}/, @response.body - end -end - diff --git a/plugins/bsc/test/unit/bsc_plugin/associate_enterprise_test.rb b/plugins/bsc/test/unit/bsc_plugin/associate_enterprise_test.rb deleted file mode 100644 index 2b4002f..0000000 --- a/plugins/bsc/test/unit/bsc_plugin/associate_enterprise_test.rb +++ /dev/null @@ -1,52 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../../test/test_helper' - -class BscPlugin::AssociateEnterpriseTest < ActiveSupport::TestCase - VALID_CNPJ = '94.132.024/0001-48' - - def setup - @enterprise = fast_create(Enterprise) - @person = create_user('user').person - @bsc = BscPlugin::Bsc.create!(:business_name => 'Sample Bsc', :company_name => 'Sample Bsc Ltda.', :identifier => 'sample-bsc', :cnpj => VALID_CNPJ) - end - - attr_accessor :enterprise, :person, :bsc - - should 'associate enteprise with bsc after perform' do - task = BscPlugin::AssociateEnterprise.create!(:requestor => person, :target => enterprise, :bsc => bsc) - task.perform - bsc.reload - - assert_includes bsc.enterprises, enterprise - end - - should 'notify enterprise when some bsc create the request' do - enterprise.contact_email = 'enterprise@bsc.org' - enterprise.save! - assert_difference ActionMailer::Base.deliveries, :count, 1 do - BscPlugin::AssociateEnterprise.create!(:requestor => person, :target => enterprise, :bsc => bsc) - end - assert_includes ActionMailer::Base.deliveries.last.to, enterprise.contact_email - end - - should 'notify requestor when some enterprise reject the request' do - person.email = 'person@bsc.org' - person.save! - task = BscPlugin::AssociateEnterprise.create!(:requestor => person, :target => enterprise, :bsc => bsc) - assert_difference ActionMailer::Base.deliveries, :count, 1 do - task.cancel - end - assert_includes ActionMailer::Base.deliveries.last.to, person.contact_email - end - - should 'notify requestor when some enterprise accept the request' do - person.email = 'person@bsc.org' - person.save! - task = BscPlugin::AssociateEnterprise.create!(:requestor => person, :target => enterprise, :bsc => bsc) - assert_difference ActionMailer::Base.deliveries, :count, 1 do - task.finish - end - assert_includes ActionMailer::Base.deliveries.last.to, person.contact_email - end - -end - diff --git a/plugins/bsc/test/unit/bsc_plugin/bsc_test.rb b/plugins/bsc/test/unit/bsc_plugin/bsc_test.rb deleted file mode 100644 index bd48382..0000000 --- a/plugins/bsc/test/unit/bsc_plugin/bsc_test.rb +++ /dev/null @@ -1,82 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../../test/test_helper' - -class BscPlugin::BscTest < ActiveSupport::TestCase - VALID_CNPJ = '94.132.024/0001-48' - - def setup - @bsc = BscPlugin::Bsc.create!(:business_name => 'Sample Bsc', :company_name => 'Sample Bsc', :identifier => 'sample-bsc', :cnpj => VALID_CNPJ) - end - - attr_accessor :bsc - - should 'validate presence of cnpj' do - bsc = BscPlugin::Bsc.new() - bsc.valid? - - assert bsc.errors.invalid?(:cnpj) - end - - should 'validate uniqueness of cnpj' do - bsc1 = bsc - bsc2 = BscPlugin::Bsc.new(:cnpj => VALID_CNPJ) - bsc2.valid? - assert bsc2.errors.invalid?(:cnpj) - end - - should 'have many enterprises' do - e1 = Enterprise.new(:name => 'Enterprise1', :identifier => 'enterprise1') - e2 = Enterprise.new(:name => 'Enterprise2', :identifier => 'enterprise2') - bsc.enterprises << e1 - bsc.enterprises << e2 - bsc.save! - - assert_equal e1.bsc, bsc - assert_equal e2.bsc, bsc - end - - should 'verify already requested enterprises' do - e1 = fast_create(Enterprise) - e2 = fast_create(Enterprise) - task = BscPlugin::AssociateEnterprise.new(:target => e1, :bsc => bsc) - bsc.enterprise_requests.stubs(:pending).returns([task]) - - assert bsc.already_requested?(e1) - refute bsc.already_requested?(e2) - end - - should 'return associated enterprises products' do - e1 = fast_create(Enterprise) - e2 = fast_create(Enterprise) - category = fast_create(ProductCategory) - - p1 = fast_create(Product, :product_category_id => category.id) - p2 = fast_create(Product, :product_category_id => category.id) - p3 = fast_create(Product, :product_category_id => category.id) - - e1.products << p1 - e1.products << p2 - e2.products << p3 - - bsc.enterprises << e1 - bsc.enterprises << e2 - - bsc.reload - - assert_includes bsc.products, p1 - assert_includes bsc.products, p2 - assert_includes bsc.products, p3 - end - - should 'not be able to create product' do - refute bsc.create_product? - end - - should 'have many contracts' do - contract1 = BscPlugin::Contract.create!(:bsc => bsc, :client_name => 'Marvin') - contract2 = BscPlugin::Contract.create!(:bsc => bsc, :client_name => 'Marvin') - - assert_includes bsc.contracts, contract1 - assert_includes bsc.contracts, contract2 - end - -end diff --git a/plugins/bsc/test/unit/bsc_plugin/contract_test.rb b/plugins/bsc/test/unit/bsc_plugin/contract_test.rb deleted file mode 100644 index d0611d7..0000000 --- a/plugins/bsc/test/unit/bsc_plugin/contract_test.rb +++ /dev/null @@ -1,107 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../../test/test_helper' - -class BscPlugin::ContractTest < ActiveSupport::TestCase - def setup - @contract = BscPlugin::Contract.new(:bsc => BscPlugin::Bsc.new, :client_name => 'Marvin') - end - - attr_accessor :contract - - should 'validates presence of bsc' do - contract.bsc = nil - contract.valid? - assert contract.errors.invalid?(:bsc) - - contract.bsc = BscPlugin::Bsc.new - contract.valid? - refute contract.errors.invalid?(:bsc) - end - - should 'associate contract with products through sales' do - contract.save! - product1 = fast_create(Product) - product2 = fast_create(Product) - sale1 = BscPlugin::Sale.create!(:product => product1, :contract => contract, :quantity => 3) - sale2 = BscPlugin::Sale.create!(:product => product2, :contract => contract, :quantity => 5) - - assert_includes contract.products, product1 - assert_includes contract.products, product2 - end - - should 'have many enterprises' do - contract.save! - enterprise1 = fast_create(Enterprise) - contract.enterprises << enterprise1 - enterprise2 = fast_create(Enterprise) - contract.enterprises << enterprise2 - - assert_includes contract.enterprises, enterprise1 - assert_includes contract.enterprises, enterprise2 - end - - should 'filter contracts by status' do - bsc = BscPlugin::Bsc.new - opened = BscPlugin::Contract::Status::OPENED - negotiating = BscPlugin::Contract::Status::NEGOTIATING - executing = BscPlugin::Contract::Status::EXECUTING - closed = BscPlugin::Contract::Status::CLOSED - contract1 = BscPlugin::Contract.create!(:bsc => bsc, :status => opened, :client_name => 'Marvin') - contract2 = BscPlugin::Contract.create!(:bsc => bsc, :status => negotiating, :client_name => 'Marvin') - contract3 = BscPlugin::Contract.create!(:bsc => bsc, :status => executing, :client_name => 'Marvin') - contract4 = BscPlugin::Contract.create!(:bsc => bsc, :status => closed, :client_name => 'Marvin') - - opened_and_executing = BscPlugin::Contract.status([opened, executing]) - negotiating_and_closed = BscPlugin::Contract.status([negotiating, closed]) - all = BscPlugin::Contract.status([]) - - assert_includes opened_and_executing, contract1 - assert_not_includes opened_and_executing, contract2 - assert_includes opened_and_executing, contract3 - assert_not_includes opened_and_executing, contract4 - - assert_not_includes negotiating_and_closed, contract1 - assert_includes negotiating_and_closed, contract2 - assert_not_includes negotiating_and_closed, contract3 - assert_includes negotiating_and_closed, contract4 - - assert_includes all, contract1 - assert_includes all, contract2 - assert_includes all, contract3 - assert_includes all, contract4 - end - - should 'sort contracts by date' do - bsc = BscPlugin::Bsc.new - contract1 = BscPlugin::Contract.create!(:bsc => bsc, :created_at => 2.day.ago, :client_name => 'Marvin') - contract2 = BscPlugin::Contract.create!(:bsc => bsc, :created_at => 1.day.ago, :client_name => 'Marvin') - contract3 = BscPlugin::Contract.create!(:bsc => bsc, :created_at => 3.day.ago, :client_name => 'Marvin') - - assert_equal [contract3, contract1, contract2], BscPlugin::Contract.sorted_by('created_at', 'asc') - end - - should 'sort contracts by client name' do - bsc = BscPlugin::Bsc.new - contract1 = BscPlugin::Contract.create!(:bsc => bsc, :client_name => 'Marvim') - contract2 = BscPlugin::Contract.create!(:bsc => bsc, :client_name => 'Adam') - contract3 = BscPlugin::Contract.create!(:bsc => bsc, :client_name => 'Eva') - - assert_equal [contract2, contract3, contract1], BscPlugin::Contract.sorted_by('client_name', 'asc') - end - - should 'return contract total price' do - contract.save! - price1 = 1 - quantity1 = 3 - price2 = 2 - quantity2 = 5 - total = price1*quantity1 + price2*quantity2 - product1 = fast_create(Product, :price => price1) - product2 = fast_create(Product, :price => price2) - sale1 = BscPlugin::Sale.create!(:product => product1, :contract => contract, :quantity => quantity1) - sale2 = BscPlugin::Sale.create!(:product => product2, :contract => contract, :quantity => quantity2) - - contract.reload - - assert_equal total, contract.total_price - end -end diff --git a/plugins/bsc/test/unit/bsc_plugin/sale_test.rb b/plugins/bsc/test/unit/bsc_plugin/sale_test.rb deleted file mode 100644 index 5f8e92f..0000000 --- a/plugins/bsc/test/unit/bsc_plugin/sale_test.rb +++ /dev/null @@ -1,86 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../../test/test_helper' - -class BscPlugin::SaleTest < ActiveSupport::TestCase - def setup - @sale = BscPlugin::Sale.new - end - - attr_accessor :sale - - should 'validate presence of product and contract' do - sale.valid? - - assert sale.errors.invalid?(:product) - assert sale.errors.invalid?(:contract) - - product = Product.new - contract = BscPlugin::Contract.new - sale.product = product - sale.contract = contract - - refute sale.errors.invalid?(product) - refute sale.errors.invalid?(contract) - end - - should 'validate uniqueness of product and contract composed' do - product = fast_create(Product) - contract = BscPlugin::Contract.create!(:bsc => BscPlugin::Bsc.new, :client_name => 'Marvin') - sale1 = BscPlugin::Sale.create!(:product => product, :contract => contract, :quantity => 1) - sale2 = BscPlugin::Sale.new(:product => product, :contract => contract, :quantity => 1) - sale2.valid? - - assert sale2.errors.invalid?(:product_id) - end - - should 'validate quantity as a positive integer' do - sale.quantity = -1 - sale.valid? - assert sale.errors.invalid?(:quantity) - - sale.quantity = 1.5 - sale.valid? - assert sale.errors.invalid?(:quantity) - - sale.quantity = 3 - sale.valid? - refute sale.errors.invalid?(:quantity) - end - - should 'set default price as product price if no price indicated' do - product = fast_create(Product, :price => 3.50) - contract = BscPlugin::Contract.create!(:bsc => BscPlugin::Bsc.new, :client_name => 'Marvin') - sale.product = product - sale.contract = contract - sale.quantity = 1 - sale.save! - - assert_equal product.price, sale.price - end - - should 'not overwrite with the product price if price informed' do - product = fast_create(Product, :price => 3.50) - contract = BscPlugin::Contract.create!(:bsc => BscPlugin::Bsc.new, :client_name => 'Marvin') - sale.product = product - sale.contract = contract - sale.quantity = 1 - sale.price = 2.50 - sale.save! - - assert_equal 2.50, sale.price - end - - should 'have default value for price' do - product1 = fast_create(Product, :price => 1) - product2 = fast_create(Product, :price => 1) - product3 = fast_create(Product) - contract = BscPlugin::Contract.create!(:bsc => BscPlugin::Bsc.new, :client_name => 'Marvin') - sale1 = BscPlugin::Sale.create!(:price => 2, :product => product1, :contract => contract, :quantity => 1) - sale2 = BscPlugin::Sale.create!(:product => product2, :contract => contract, :quantity => 1) - sale3 = BscPlugin::Sale.create!(:product => product3, :contract => contract, :quantity => 1) - - assert_equal 2, sale1.price - assert_equal 1, sale2.price - assert_equal 0, sale3.price - end -end - diff --git a/plugins/bsc/test/unit/bsc_plugin_test.rb b/plugins/bsc/test/unit/bsc_plugin_test.rb deleted file mode 100644 index b8bc017..0000000 --- a/plugins/bsc/test/unit/bsc_plugin_test.rb +++ /dev/null @@ -1,34 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' - -class BscPluginTest < ActiveSupport::TestCase - - VALID_CNPJ = '94.132.024/0001-48' - - should 'add profile controller filter correctly' do - bsc_plugin = BscPlugin.new - person = fast_create(Person) - context = mock() - context.stubs(:profile).returns(person) - context.stubs(:params).returns({:profile => person.identifier}) - context.stubs(:user).returns(person) - context.stubs(:environment).returns(person.environment) - bsc_plugin.stubs(:context).returns(context) - - assert_nil bsc_plugin.profile_controller_filters.first[:block].call - assert_nil bsc_plugin.content_viewer_controller_filters.first[:block].call - - enterprise = fast_create(Enterprise, :validated => false) - enterprise.bsc = BscPlugin::Bsc.create!({:business_name => 'Sample Bsc', :identifier => 'sample-bsc', :company_name => 'Sample Bsc Ltda.', :cnpj => VALID_CNPJ}) - enterprise.save! - context.stubs(:profile).returns(enterprise) - context.stubs(:params).returns({:profile => enterprise.identifier}) - context.stubs(:environment).returns(enterprise.environment) - - assert_raise NameError do - bsc_plugin.profile_controller_filters.first[:block].call - end - assert_raise NameError do - bsc_plugin.content_viewer_controller_filters.first[:block].call - end - end -end diff --git a/plugins/bsc/test/unit/ext/enterprise_test.rb b/plugins/bsc/test/unit/ext/enterprise_test.rb deleted file mode 100644 index 183000d..0000000 --- a/plugins/bsc/test/unit/ext/enterprise_test.rb +++ /dev/null @@ -1,38 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../../test/test_helper' - -class EnterpriseTest < ActiveSupport::TestCase - VALID_CNPJ = '94.132.024/0001-48' - - def setup - @bsc = BscPlugin::Bsc.create!({:business_name => 'Sample Bsc', :identifier => 'sample-bsc', :company_name => 'Sample Bsc Ltda.', :cnpj => VALID_CNPJ}) - end - - attr_accessor :bsc - - should 'belongs to a bsc' do - enterprise = fast_create(Enterprise, :bsc_id => bsc.id) - assert_equal bsc, enterprise.bsc - end - - should 'return correct enterprises on validated and not validated namedscopes' do - validated_enterprise = fast_create(Enterprise, :validated => true) - not_validated_enterprise = fast_create(Enterprise, :validated => false) - - assert_includes Enterprise.validated, validated_enterprise - assert_not_includes Enterprise.validated, not_validated_enterprise - assert_not_includes Enterprise.not_validated, validated_enterprise - assert_includes Enterprise.not_validated, not_validated_enterprise - end - - should 'be involved with many contracts' do - enterprise = fast_create(Enterprise) - contract1 = BscPlugin::Contract.create!(:bsc => bsc, :client_name => 'Marvin') - contract2 = BscPlugin::Contract.create!(:bsc => bsc, :client_name => 'Marvin') - enterprise.contracts << contract1 - enterprise.contracts << contract2 - - assert_includes enterprise.contracts, contract1 - assert_includes enterprise.contracts, contract2 - end -end - diff --git a/plugins/bsc/test/unit/ext/product_test.rb b/plugins/bsc/test/unit/ext/product_test.rb deleted file mode 100644 index 45fa033..0000000 --- a/plugins/bsc/test/unit/ext/product_test.rb +++ /dev/null @@ -1,24 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../../test/test_helper' - -class ProductTest < ActiveSupport::TestCase - VALID_CNPJ = '94.132.024/0001-48' - - should 'return have bsc' do - bsc = BscPlugin::Bsc.create!({:business_name => 'Sample Bsc', :identifier => 'sample-bsc', :company_name => 'Sample Bsc Ltda.', :cnpj => VALID_CNPJ}) - enterprise = fast_create(Enterprise, :bsc_id => bsc.id) - product = fast_create(Product, :profile_id => enterprise.id) - - assert_equal bsc, product.bsc - end - - should 'have contracts through sales' do - product = fast_create(Product) - contract1 = BscPlugin::Contract.create!(:bsc => BscPlugin::Bsc.new, :client_name => 'Marvin') - contract2 = BscPlugin::Contract.create!(:bsc => BscPlugin::Bsc.new, :client_name => 'Marvin') - sale1 = BscPlugin::Sale.create!(:product => product, :contract => contract1, :quantity => 3) - sale2 = BscPlugin::Sale.create!(:product => product, :contract => contract2, :quantity => 5) - - assert_includes product.contracts, contract1 - assert_includes product.contracts, contract2 - end -end diff --git a/plugins/bsc/views/bsc_plugin/mailer/admin_notification.html.erb b/plugins/bsc/views/bsc_plugin/mailer/admin_notification.html.erb deleted file mode 100644 index cd3bfac..0000000 --- a/plugins/bsc/views/bsc_plugin/mailer/admin_notification.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= _('The management of %{bsc} was transferred to you.') % {:bsc => @bsc.name}%> diff --git a/plugins/bsc/views/bsc_plugin_admin/new.html.erb b/plugins/bsc/views/bsc_plugin_admin/new.html.erb deleted file mode 100644 index af3baba..0000000 --- a/plugins/bsc/views/bsc_plugin_admin/new.html.erb +++ /dev/null @@ -1,11 +0,0 @@ -<%= error_messages_for :bsc %> -

<%= _('BSC registration') %>

- -<%= labelled_form_for :profile_data, @bsc do |f| %> - <%= render :partial => 'shared/fields', :locals => {:f => f, :profile => @bsc} %> - - <% button_bar do %> - <%= submit_button('save', c_('Save')) %> - <%= button('cancel', c_('Cancel'), {:controller => 'admin_panel'}) %> - <% end %> -<% end %> diff --git a/plugins/bsc/views/bsc_plugin_admin/validate_enterprises.html.erb b/plugins/bsc/views/bsc_plugin_admin/validate_enterprises.html.erb deleted file mode 100644 index de8a293..0000000 --- a/plugins/bsc/views/bsc_plugin_admin/validate_enterprises.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -

<%= _('Validate enterprises') %>

- -<% form_tag :action => 'save_validations' do %> - <%= token_input_field_tag(:q, 'search-enterprises', {:action => 'search_enterprise'}, - { :hint_text => _('Type in a search term for enterprise'), - :focus => true }) %> - - <% button_bar do %> - <%= submit_button('save', c_('Save'))%> - <%= button('cancel', c_('Cancel'), {:controller => 'admin_panel'})%> - <% end %> -<% end %> diff --git a/plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb b/plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb deleted file mode 100644 index e70dd2f..0000000 --- a/plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb +++ /dev/null @@ -1,83 +0,0 @@ -<%= error_messages_for :contract %> - -<%= labelled_form_for :contract, :html => {:id => 'bsc-plugin-sales-form'} do |f| %> - <%= hidden_field_tag :contract_id, @contract.id %> - <%= required f.text_field(:client_name) %> - <%= labelled_form_field(_('Client type'), f.select(:client_type, BscPlugin::Contract::ClientType.types.map{|type| [BscPlugin::Contract::ClientType.names[type], type]}))%> - <%= labelled_form_field(_('Business type'), f.select(:business_type, BscPlugin::Contract::BusinessType.types.map{|type| [BscPlugin::Contract::BusinessType.names[type], type]}))%> - <%= f.text_field(:state) %> - <%= f.text_field(:city) %> - <%= labelled_form_field(_('Status'), f.select(:status, BscPlugin::Contract::Status.types. - map { |s| [BscPlugin::Contract::Status.names[s], s] })) %> - <%= f.text_field(:number_of_producers, :size => 8, :id => 'bsc-plugin-contract-spinner') %> - <%= c_('Enterprises')+':' %> - - <% search_action = {:action => 'search_contract_enterprises', :profile => profile.identifier} %> - <%= token_input_field_tag(:enterprises, 'involved-enterprises', search_action, - { :pre_populate => @contract.enterprises_to_token_input, - :hint_text => _('Type in search term for enterprise') }) %> - - - - - - - - - - - - - - -
<%= c_('Products') %><%= _('Quantity') %><%= _('Unit price') %>
<%= _('Total')%><%= float_to_currency(@contract.total_price)%>
<%= link_to(_('Add new product'), {}, :id => 'bsc-plugin-add-new-product', 'data-bsc' => profile.identifier) %>
- - <%= labelled_form_field( _('Supply period'), - text_field_tag('contract[supply_start]', (@contract.supply_start ? @contract.supply_start.strftime("%Y-%m-%d") : nil), :id => 'from', :size => 9) + - c_(' to ') + - text_field_tag('contract[supply_end]', (@contract.supply_end ? @contract.supply_end.strftime("%Y-%m-%d") : nil), :id => 'to', :size => 9) ) - %> - - <%= f.text_area(:annotations, :rows => 5, :cols => 68) %> - <% button_bar do%> - <%= submit_button(:save, c_('Save'), :cancel => {:action => 'manage_contracts'})%> - <% end %> -<% end %> - -<% scripts = %w{/plugins/bsc/jquery.ui.spinner/ui.spinner.js - /plugins/bsc/contracts /plugins/bsc/datepicker - /plugins/bsc/spinner} %> -<% scripts.each do |script|%> - <%= javascript_include_tag script %> -<% end %> - - - -<%= javascript_include_tag '/plugins/bsc/validation' %> diff --git a/plugins/bsc/views/bsc_plugin_myprofile/_similar_enterprises.html.erb b/plugins/bsc/views/bsc_plugin_myprofile/_similar_enterprises.html.erb deleted file mode 100644 index aaa4f1e..0000000 --- a/plugins/bsc/views/bsc_plugin_myprofile/_similar_enterprises.html.erb +++ /dev/null @@ -1,48 +0,0 @@ - diff --git a/plugins/bsc/views/bsc_plugin_myprofile/create_enterprise.html.erb b/plugins/bsc/views/bsc_plugin_myprofile/create_enterprise.html.erb deleted file mode 100644 index 2ec7a2d..0000000 --- a/plugins/bsc/views/bsc_plugin_myprofile/create_enterprise.html.erb +++ /dev/null @@ -1,21 +0,0 @@ -<%= error_messages_for 'create_enterprise' %> - -

<%= __('Enterprise registration') %>

- -<%= required_fields_message %> - -<%= labelled_form_for(:create_enterprise) do |f| %> - - <%= required f.text_field 'name', :onchange => "updateUrlField(this, 'create_enterprise_identifier')", :size => 40 %> - <%= render :partial => 'shared/organization_custom_fields', :locals => { :f => f, :object_name => :create_enterprise, :profile => @create_enterprise } %> -

- <%= required labelled_form_field(c_('Address'), content_tag('code', environment.top_url + "/" + text_field(:create_enterprise, 'identifier', :size => 26))) %> -

- <%= render :partial => 'similar_enterprises', :locals => {:bsc => profile}%> - - <% button_bar do %> - <%= submit_button('save', c_('Save'), :cancel => {:controller => 'profile_editor', :profile => profile.identifier}) %> - <% end %> -<% end %> - - diff --git a/plugins/bsc/views/bsc_plugin_myprofile/edit_contract.html.erb b/plugins/bsc/views/bsc_plugin_myprofile/edit_contract.html.erb deleted file mode 100644 index eb3d638..0000000 --- a/plugins/bsc/views/bsc_plugin_myprofile/edit_contract.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -

<%= _("New contract") %>

-<%= render :partial => 'contract_form', :locals => {:url => {:action => 'update_contract'}}%> - diff --git a/plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb b/plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb deleted file mode 100644 index b56cb50..0000000 --- a/plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb +++ /dev/null @@ -1,26 +0,0 @@ -

<%= _('Manage associated enterprises') %>

- -<% if !@pending_enterprises.blank? %> - <%= _('Associations awaiting approval:') %> -
    - <% @pending_enterprises.each do |enterprise| %> -
  • <%= enterprise.name %>
  • - <% end %> -
-<% end %> - -<% form_tag :action => 'save_associations' do %> - <% search_action = {:action => 'search_enterprise', :profile => profile.identifier} %> - <%= token_input_field_tag(:q, 'search-enterprises', search_action, - { :pre_populate => profile.enterprises_to_token_input, - :hint_text => _('Type in a search term for enterprise'), - :focus => true }) %> - - <%= button('add', _('Add new enterprise'), {:action => 'create_enterprise'}) %> - - <% button_bar do %> - <%= submit_button('save', c_('Save'))%> - <%= button('cancel', c_('Cancel'), {:controller => 'profile_editor'})%> - <% end %> - -<% end %> diff --git a/plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb b/plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb deleted file mode 100644 index c1b3429..0000000 --- a/plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb +++ /dev/null @@ -1,49 +0,0 @@ -

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

- -<% form_tag({}, {:id => "bsc-plugin-contracts-form"}) do %> -
-

<%= _('Status') %>

- <% BscPlugin::Contract::Status.types.each do |status| %> - <%= check_box_tag('status[]', status, @status.include?(status.to_s), :id => 'status-checkbox-'+status.to_s) %> - <%= content_tag('label', BscPlugin::Contract::Status.names[status], :for => 'status-checkbox-'+status.to_s) %> -
- <% end %> -
- <%= submit_button(:save, c_('Filter')) %> -
- -
-
- <%= labelled_select(_('Sort by')+' ', :sorting, :first, :last, @sorting, - [['created_at asc', _('Date(newest first)')], ['created_at desc', _('Date(oldest first)')], - ['client_name asc', _('Client name(A-Z)')], ['client_name desc', _('Client name(Z-A)')]], - :onchange => "jQuery('#bsc-plugin-contracts-form').submit()") %> -
- - <% if @contracts.blank? %> - <%= content_tag('em', _('There are no contracts at all.'))%> - <% else %> - - <% @contracts.each do |contract| %> - - - - - <% end %> -
- <%= link_to(content_tag('b', contract.client_name ), :action => 'view_contract', :contract_id => contract.id) %>
- <%= content_tag('i', show_date(contract.created_at)) %> -
- <%= pagination_links @contracts %> - <% end %> - - <% button_bar do %> - <%= button(:back, c_('Go back'), :controller => 'profile_editor') %> - <%= button(:new, _('Create new contract'), :action => 'new_contract')%> - <% end %> -
-<% end %> -
diff --git a/plugins/bsc/views/bsc_plugin_myprofile/new_contract.html.erb b/plugins/bsc/views/bsc_plugin_myprofile/new_contract.html.erb deleted file mode 100644 index 988be28..0000000 --- a/plugins/bsc/views/bsc_plugin_myprofile/new_contract.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -

<%= _("New contract") %>

-<%= render :partial => 'contract_form.html.erb', :locals => {:url => {:action => 'create_contract'}}%> diff --git a/plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb b/plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb deleted file mode 100644 index 6132bbb..0000000 --- a/plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb +++ /dev/null @@ -1,32 +0,0 @@ -

<%= _('Transfer Ownership') %>

- -
- <%= _('This option allows you to transfer this enterprise\'s management to another user. This action will remove all the current administrators. Be careful when confirming this procedure.') %> -
- -<% if !profile.admins.blank? %> - <%= _('Current administrators:') %> -
    - <% profile.admins.each do |admin| %> -
  • <%= link_to(profile_image(admin, :icon, :style => 'margin-right: 3px;'), admin.url) + link_to(admin.name, admin.url, :style => 'margin-top: -3px;') %>
  • - <% end %> -
-<% end %> - - -<% form_tag do %> - <% @roles.each do |role|%> - <%= content_tag('b', _('Administrator:')) %> - <% search_action = {:controller => 'profile_members', :action => 'search_user', :role => role.id, :profile => profile.identifier} %> - <%= token_input_field_tag('q_'+role.key, 'search_'+role.key, search_action, - { :hint_text => _('Type in a search term for the new administrator'), - :focus => true, - :token_limit => 1}) %> - - <% end %> - - <% button_bar do %> - <%= submit_button('save', c_('Save'))%> - <%= button('cancel', c_('Cancel'), {:controller => 'profile_editor'})%> - <% end %> -<% end %> diff --git a/plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb b/plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb deleted file mode 100644 index d392cc5..0000000 --- a/plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb +++ /dev/null @@ -1,55 +0,0 @@ -

<%= @contract.client_name %>

- - - - - - <%= display_text_field(_('Client type'), BscPlugin::Contract::ClientType.names[@contract.client_type]) %> - <%= display_text_field(_('Business type'), BscPlugin::Contract::BusinessType.names[@contract.business_type]) %> - <%= display_text_field(c_('State'), @contract.state) %> - <%= display_text_field(c_('City'), @contract.city) %> - <%= display_text_field(_('Status'), BscPlugin::Contract::Status.names[@contract.status]) %> - <%= display_text_field(_('Number of producers'), @contract.number_of_producers) %> - <%= display_text_field(_('Supply period'), show_period(@contract.supply_start, @contract.supply_end, true)) %> -
<%= _('Basic information') %>
- - - - - - <%= display_list_field(@contract.enterprises.map {|enterprise| link_to(enterprise.short_name(60), enterprise.url)}) %> -
<%= c_('Enterprises') %>
- -<% if !@contract.sales.blank?%> - - - - - - - <% @contract.sales.each do |sale| %> - - - - - - <% end %> - - - - -
<%= c_('Product') %><%= _('Quantity') %><%= _('Unit price') %>
<%= short_text(product_display_name(Product.find(sale.product_id)), 110) %><%= sale.quantity %><%= float_to_currency(sale.price) %>
<%= _('Total')%><%= float_to_currency(@contract.total_price) %>
-<% end %> - -
- -<% if !@contract.annotations.blank? %> -
-
<%= _("Annotations") %>
-
<%= @contract.annotations %>
-
-<% end %> - -<% button_bar do %> - <%= button(:back, c_('Go back'), :action => 'manage_contracts') %> -<% end %> diff --git a/plugins/bsc/views/profile/_profile_tab.html.erb b/plugins/bsc/views/profile/_profile_tab.html.erb deleted file mode 100644 index dd4a969..0000000 --- a/plugins/bsc/views/profile/_profile_tab.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -
    - <%= content_tag('li', content_tag('b', _('Contact phone: ')) + profile.contact_phone) if !profile.contact_phone.blank? %> - <%= content_tag('li', content_tag('b', _('Email: ')) + profile.contact_email) if !profile.contact_email.blank? %> - <%= content_tag('li', content_tag('b', c_('Location: ')) + profile.state) if !profile.state.blank? %> - <%= content_tag('li', content_tag('b', c_('Address: ')) + profile.address) if !profile.address.blank? %> -
diff --git a/plugins/bsc/views/profile_editor/bsc_plugin/_bsc.html.erb b/plugins/bsc/views/profile_editor/bsc_plugin/_bsc.html.erb deleted file mode 100644 index 534f72e..0000000 --- a/plugins/bsc/views/profile_editor/bsc_plugin/_bsc.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -<%= render :partial => 'shared/fields', :locals => {:f => f, :profile => profile} %> -<%= render :partial => 'moderation', :locals => { :profile => profile } %> diff --git a/plugins/bsc/views/shared/_fields.html.erb b/plugins/bsc/views/shared/_fields.html.erb deleted file mode 100644 index ede0eb1..0000000 --- a/plugins/bsc/views/shared/_fields.html.erb +++ /dev/null @@ -1,66 +0,0 @@ - -<%# extend FormerPlugin::FieldHelper %> - -
- <%= _('Basic information')%> - <%= required f.text_field(:business_name, :onchange => "updateUrlField(this, 'profile_data_identifier')") %> - <%= required f.text_field(:company_name) %> - <%= required f.text_field(:cnpj) %> - - <%#= widgets_for_form(f, :bsc_fields) %> - - - - <%= hidden_field_tag 'old_bsc_identifier', profile.identifier %> -
- <%= content_tag('code', - top_url + '/ ' + - text_field(:profile_data, :identifier, :onchange => "warn_value_change()", :size => 25) - ) + - content_tag('div', - content_tag('strong', c_('WARNING!')) + ' ' + - _("You are about to change the address, and this will break external links to this bsc or to posts inside it. Do you really want to change?") + - content_tag('div', - button_to_function(:ok, c_("Yes"), "confirm_change()") + ' ' + - button_to_function(:cancel, c_('No'), 'no_change()') - ), - :id => 'identifier-change-confirmation', - :class => 'change-confirmation', - :style => 'display: none;' - ) - %> -
-
- -
- <%= _('Contact')%> - <%= f.text_field(:contact_email) %> - <%= f.text_field(:organization_website) %> - <%= f.text_field(:contact_phone) %> -
- -
- <%= c_('Location')%> - <%= f.text_field(:address) %> - <%= f.text_field(:zip_code) %> - <%= f.text_field(:city) %> - <%= f.text_field(:state) %> - <%= select_country(c_('Country'), :profile_data, 'country', {:class => 'type-select'}) %> -
-- libgit2 0.21.2