diff --git a/app/models/organisation_type.rb b/app/models/organisation_type.rb index c8e0edc..d26464b 100644 --- a/app/models/organisation_type.rb +++ b/app/models/organisation_type.rb @@ -1,5 +1,5 @@ class OrganisationType < ActiveRecord::Base - attr_accessible :description, :name, :as => [:default, :admin] + attr_accessible :description, :organisations, :name, :as => [:default, :admin] has_many :organisations diff --git a/app/models/user.rb b/app/models/user.rb index 304b58e..6921a36 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -112,7 +112,6 @@ # returns the first organisation id of the user or nil # # @return [Integer, nil] the id of the user's organisation -=begin def organisation_id if self.organisations.count > 0 then return self.organisations.first.id @@ -120,7 +119,6 @@ return nil end end -=end ## # returns the organisation of the user or nil diff --git a/config/locales/de.yml b/config/locales/de.yml index 4ff6706..f853366 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -804,4 +804,73 @@ " footer: - terms_of_use: "

Universität Kiel, Kiel, SH, Deutschland
Nutzungsbedingungen

" \ No newline at end of file + terms_of_use: "

Universität Kiel, Kiel, SH, Deutschland
Nutzungsbedingungen

" + + js: + question_text_empty: 'Question text is empty, please enter your question.' + add_guidance_text: "add guidance text" + select_question: "select a question" + select_at_least_one_theme: "select at least one theme" + select_guidance_group: "select a guidance group" + enter_up_to: "Please only enter up to 165 characters, you have used" + if_using_url_try: "If you are entering an URL try to use something like http://tinyurl.com/ to make it smaller." + you_have_unsaved_in_sections: 'You have unsaved answers in the following sections:\n' + + custom_devise: + resend_confirmation: "Resend confirmation instructions" + welcome_to_DMP: "Welcome to %{application_name}" + thank_you_and_confirm: "Thank you for registering at %{application_name}. Please confirm your email address:" + click_to_confirm: "Click here to confirm your account" + 1st_part_copy: "(or copy" + 2nd_part_copy: "into your browser)." + colleague_invited_you: "A colleague has invited you to contribute to their Data Management Plan at" + click_to_accept: "Click here to accept the invitation" + ignore_wont_be_created: "

If you don't want to accept the invitation, please ignore this email.
+ Your account won't be created until you access the link above and set your password.

" + 1st_part_change_password: "Someone has requested a link to change your" + 2nd_part_change_password: "password. You can do this through the link below." + ignore_password_wont_be_changed: "

If you didn't request this, please ignore this email.

+

Your password won't change until you access the link above and create a new one.

" + hello: "Hello" + 1st_part_locked: "Your " + 2nd_part_locked: " account has been locked due to an excessive number of unsuccessful sign in attempts." + click_to_unlock: "Click the link below to unlock your account:" + unlock: 'Unlock my account' + waiting_for_confirmation: "Currently waiting confirmation for: " + resend_unlock: "Resend unlock instructions" + + api: + bad_credentials: '{"Error":"Bad credentials"}' + org_dosent_exist: '{"Error":"Organisation does not exist"}' + org_not_funder: '{"Error":"Organisation specified is not a funder"}' + org_multiple_templates: '{"Error":"Organisation has more than one template and template name unspecified or invalid"}' + no_auth_for_endpoint: '{"Error":"You do not have authorisation to view this endpoint"}' + bad_resource: '{"Error":"You do not have authorisation to view this resource"}' + + magic_strings: + organisation_types: + funder: 'Funder' + organisation: 'Organisation' + project: 'Project' + institution: 'Institution' + research_institute: 'Research Institute' + template: 'Template' + managing_organisation: 'Digital Curation Center' + user_role_types: + super_admin: 'admin' + organisational_admin: 'org_admin' + user: 'user' + add_organisations: 'add_organisations' + change_org_affiliation: 'change_org_affiliation' + grant_permissions: 'grant_permissions' + modify_templates: 'modify_templates' + modify_guidance: 'modify_guidance' + use_api: 'use_api' + change_org_details: 'change_org_detials' + grant_api_to_orgs: 'grant_api_to_orgs' + api_endpoint_types: + guidances: 'guidances' + plans: 'plans' + templates: 'templates' + statistics: 'statistics' + languages: diff --git a/config/locales/en-US.yml b/config/locales/en-US.yml index 8f7d952..2a1fdd7 100644 --- a/config/locales/en-US.yml +++ b/config/locales/en-US.yml @@ -930,4 +930,32 @@ org_not_funder: '{"Error":"Organization specified is not a funder"}' org_multiple_templates: '{"Error":"Organization has more than one template and template name unspecified or invalid"}' no_auth_for_endpoint: '{"Error":"You do not have authorisation to view this endpoint"}' - bad_resource: '{"Error":"You do not have authorisation to view this resource"}' \ No newline at end of file + bad_resource: '{"Error":"You do not have authorisation to view this resource"}' + + magic_strings: + organisation_types: + funder: 'Funder' + organisation: 'Organisation' + project: 'Project' + institution: 'Institution' + research_institute: 'Research Institute' + template: 'Template' + managing_organisation: 'Digital Curation Center' + user_role_types: + super_admin: 'admin' + organisational_admin: 'org_admin' + user: 'user' + add_organisations: 'add_organisations' + change_org_affiliation: 'change_org_affiliation' + grant_permissions: 'grant_permissions' + modify_templates: 'modify_templates' + modify_guidance: 'modify_guidance' + use_api: 'use_api' + change_org_details: 'change_org_detials' + grant_api_to_orgs: 'grant_api_to_orgs' + api_endpoint_types: + guidances: 'guidances' + plans: 'plans' + templates: 'templates' + statistics: 'statistics' + languages: diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 4b6f19e..42749c7 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -790,4 +790,73 @@
-

En utilisant l'outil, vous comprenez et acceptez ces conditions.

" \ No newline at end of file +

En utilisant l'outil, vous comprenez et acceptez ces conditions.

" + + js: + question_text_empty: 'Question text is empty, please enter your question.' + add_guidance_text: "add guidance text" + select_question: "select a question" + select_at_least_one_theme: "select at least one theme" + select_guidance_group: "select a guidance group" + enter_up_to: "Please only enter up to 165 characters, you have used" + if_using_url_try: "If you are entering an URL try to use something like http://tinyurl.com/ to make it smaller." + you_have_unsaved_in_sections: 'You have unsaved answers in the following sections:\n' + + custom_devise: + resend_confirmation: "Resend confirmation instructions" + welcome_to_DMP: "Welcome to %{application_name}" + thank_you_and_confirm: "Thank you for registering at %{application_name}. Please confirm your email address:" + click_to_confirm: "Click here to confirm your account" + 1st_part_copy: "(or copy" + 2nd_part_copy: "into your browser)." + colleague_invited_you: "A colleague has invited you to contribute to their Data Management Plan at" + click_to_accept: "Click here to accept the invitation" + ignore_wont_be_created: "

If you don't want to accept the invitation, please ignore this email.
+ Your account won't be created until you access the link above and set your password.

" + 1st_part_change_password: "Someone has requested a link to change your" + 2nd_part_change_password: "password. You can do this through the link below." + ignore_password_wont_be_changed: "

If you didn't request this, please ignore this email.

+

Your password won't change until you access the link above and create a new one.

" + hello: "Hello" + 1st_part_locked: "Your " + 2nd_part_locked: " account has been locked due to an excessive number of unsuccessful sign in attempts." + click_to_unlock: "Click the link below to unlock your account:" + unlock: 'Unlock my account' + waiting_for_confirmation: "Currently waiting confirmation for: " + resend_unlock: "Resend unlock instructions" + + api: + bad_credentials: '{"Error":"Bad credentials"}' + org_dosent_exist: '{"Error":"Organisation does not exist"}' + org_not_funder: '{"Error":"Organisation specified is not a funder"}' + org_multiple_templates: '{"Error":"Organisation has more than one template and template name unspecified or invalid"}' + no_auth_for_endpoint: '{"Error":"You do not have authorisation to view this endpoint"}' + bad_resource: '{"Error":"You do not have authorisation to view this resource"}' + + magic_strings: + organisation_types: + funder: 'Funder' + organisation: 'Organisation' + project: 'Project' + institution: 'Institution' + research_institute: 'Research Institute' + template: 'Template' + managing_organisation: 'Digital Curation Center' + user_role_types: + super_admin: 'admin' + organisational_admin: 'org_admin' + user: 'user' + add_organisations: 'add_organisations' + change_org_affiliation: 'change_org_affiliation' + grant_permissions: 'grant_permissions' + modify_templates: 'modify_templates' + modify_guidance: 'modify_guidance' + use_api: 'use_api' + change_org_details: 'change_org_detials' + grant_api_to_orgs: 'grant_api_to_orgs' + api_endpoint_types: + guidances: 'guidances' + plans: 'plans' + templates: 'templates' + statistics: 'statistics' + languages: