Skip to content

Commit

Permalink
Remove TranslationAptitude at all, closes #38
Browse files Browse the repository at this point in the history
  • Loading branch information
theoo committed Feb 8, 2016
1 parent be820ba commit 6e41fa2
Show file tree
Hide file tree
Showing 32 changed files with 15 additions and 480 deletions.
6 changes: 3 additions & 3 deletions app/assets/csv/people_example.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
id,first name, last name,alias, title, is an organization, organization name, address,postal code prefix, location, phone, second phone, mobile,fax, email, second email, job, birth date, nationality, avs number,gender, bank informations,roles, main communication language, communication languages,translation aptitudes,private tags,public tags, hidden,comments
,John,Doe,jd,Monsieur,FALSE,,"23, rue du Pont",1211,Genève 2,+41 123 45 67,+41 456 78 90 12,+41 79 123 45 67,+41 79 123 45 68,[email protected],[email protected],informaticien,10.04.1971,Switzerland,909.34.65.31,female,UBS CH34 6543 1231 3453,member,french,"english, spanish","french->german, english->spanish","PrivateTag1, PrivateTag2",PublicTag1,FALSE,"He likes Dupont and not Dupond, Called the 1.2.2011 to talk business"
,,,ARG,,TRUE,XYZ Organization,"45, strada d'Italia",,Italy,,,,,[email protected],,,,,,male,,,english,,,PrivateTag2,"PublicTag1, PublicTag2",,
id,first name, last name,alias, title, is an organization, organization name, address,postal code prefix, location, phone, second phone, mobile,fax, email, second email, job, birth date, nationality, avs number,gender, bank informations,roles, main communication language, communication languages,private tags,public tags, hidden,comments
,John,Doe,jd,Monsieur,FALSE,,"23, rue du Pont",1211,Genève 2,+41 123 45 67,+41 456 78 90 12,+41 79 123 45 67,+41 79 123 45 68,[email protected],[email protected],informaticien,10.04.1971,Switzerland,909.34.65.31,female,UBS CH34 6543 1231 3453,member,french,"english, spanish","PrivateTag1, PrivateTag2",PublicTag1,FALSE,"He likes Dupont and not Dupond, Called the 1.2.2011 to talk business"
,,,ARG,,TRUE,XYZ Organization,"45, strada d'Italia",,Italy,,,,,[email protected],,,,,,male,,,english,,PrivateTag2,"PublicTag1, PublicTag2",,

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/javascripts/app/index.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ class @PersonEdit extends App
@sub_nav.one 'info', =>
@subapp($('#person'), 'People')
@subapp($('#person_communication_languages'), 'PersonCommunicationLanguages')
# @subapp($('#person_translation_aptitudes'), 'PersonTranslationAptitudes')
@subapp($('#person_private_tags'), 'PersonPrivateTags')
@subapp($('#person_public_tags'), 'PersonPublicTags')

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion app/assets/javascripts/i18n/en.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/assets/javascripts/i18n/fr.js

Large diffs are not rendered by default.

54 changes: 0 additions & 54 deletions app/controllers/people/translation_aptitudes_controller.rb

This file was deleted.

1 change: 0 additions & 1 deletion app/models/language.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class Language < ActiveRecord::Base
has_many :main_people,
class_name: 'Person',
foreign_key: :main_communication_language_id
has_many :translation_aptitudes
has_many :invoice_templates
has_many :salaries_templates

Expand Down
7 changes: 0 additions & 7 deletions app/models/person.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,6 @@ def initialize(*params)
as: :resource,
dependent: :destroy

has_many :translation_aptitudes,
dependent: :destroy

accepts_nested_attributes_for :translation_aptitudes

# monitored_habtm :roles,
has_many :people_roles # for permissions
has_many :roles,
Expand Down Expand Up @@ -407,7 +402,6 @@ def self.parse_people(data)
:roles,
:main_communication_language,
:communication_languages,
:translation_aptitudes,
:private_tags,
:public_tags,
:hidden,
Expand Down Expand Up @@ -465,7 +459,6 @@ def self.parse_people(data)
parser.parse_roles(r.roles)
parser.parse_main_communication_language(r.main_communication_language)
parser.parse_communication_languages(r.communication_languages)
parser.parse_translation_aptitudes(r.translation_aptitudes)

private_tags = parser.parse_private_tags(r.private_tags)
infos[:private_tags] << private_tags unless private_tags.empty?
Expand Down
102 changes: 0 additions & 102 deletions app/models/translation_aptitude.rb

This file was deleted.

2 changes: 0 additions & 2 deletions app/views/directory/confirm_people.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
%th= I18n.t('person.views.roles')
%th= I18n.t('directory.import.main_communication_language')
%th= I18n.t('person.views.communication_languages')
%th= I18n.t('person.views.translation_aptitudes')
%th= I18n.t('person.views.private_tags')
%th= I18n.t('person.views.public_tags')
%th= I18n.t('person.views.comments')
Expand Down Expand Up @@ -109,7 +108,6 @@
%td= relation_to_string(person.roles)
%td= relation_to_string(person.main_communication_language)
%td= relation_to_string(person.communication_languages)
%td= relation_to_string(person.translation_aptitudes)
%td= relation_to_string(person.private_tags)
%td= relation_to_string(person.public_tags)
%td!= person.comments_edited_by_others.map{|c| c.description}.join("<br/>")
Expand Down
6 changes: 0 additions & 6 deletions app/views/people/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,6 @@
= I18n.t('person.views.communication_languages')
.pull-right.badge= @person.communication_languages.empty? ? nil : @person.communication_languages.count

//- if can? :read, @person => TranslationAptitude
// #person_translation_aptitudes.widget
// %legend= I18n.t('person.views.translation_aptitudes')
// .content


#affairs_tab.tab-pane
.row
.col-md-12
Expand Down
Loading

0 comments on commit 6e41fa2

Please sign in to comment.