From e4a38e52adcba47342c39711218da834b5238dd3 Mon Sep 17 00:00:00 2001 From: Syphax Bouazzouni Date: Thu, 30 May 2024 19:55:22 +0200 Subject: [PATCH 01/12] update the footer UI to put Ecoportal logo and links --- .../logos/logoLW_eric_outline_white-01.svg | 39 +++---------------- app/assets/stylesheets/footer.scss | 5 ++- .../stylesheets/themes/ecoportal/main.scss | 11 ------ app/views/layouts/_footer.html.haml | 4 +- config/deploy.rb | 6 +-- config/locales/en.yml | 2 +- config/locales/fr.yml | 2 +- 7 files changed, 14 insertions(+), 55 deletions(-) diff --git a/app/assets/images/logos/logoLW_eric_outline_white-01.svg b/app/assets/images/logos/logoLW_eric_outline_white-01.svg index 8f8180f60..54ce3242e 100644 --- a/app/assets/images/logos/logoLW_eric_outline_white-01.svg +++ b/app/assets/images/logos/logoLW_eric_outline_white-01.svg @@ -1,34 +1,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/app/assets/stylesheets/footer.scss b/app/assets/stylesheets/footer.scss index 6cdd05791..83a53c61b 100644 --- a/app/assets/stylesheets/footer.scss +++ b/app/assets/stylesheets/footer.scss @@ -6,14 +6,15 @@ footer{ width: 1248px; background-color: var(--primary-color); - padding: 40px 50px; + padding: 10px 50px 40px 50px; } .footer-header{ display: flex; justify-content: space-between; - margin-bottom: 40px; + align-items: center; } + .footer-logo{ color: white; display: flex; diff --git a/app/assets/stylesheets/themes/ecoportal/main.scss b/app/assets/stylesheets/themes/ecoportal/main.scss index c9cde1daa..573c0af60 100644 --- a/app/assets/stylesheets/themes/ecoportal/main.scss +++ b/app/assets/stylesheets/themes/ecoportal/main.scss @@ -269,17 +269,6 @@ tr.mainresource td { font-family: "Titillium Web", Lucida Console, Monaco, monospace; } -footer, .footer { - background-color: $color-primary !important; - position: relative !important; - padding: 30px 0; - color: white !important; - - a { - color: white !important; - } -} - .eco-bg-white { background: #ffffff !important; } diff --git a/app/views/layouts/_footer.html.haml b/app/views/layouts/_footer.html.haml index 9d8908961..e0432258c 100644 --- a/app/views/layouts/_footer.html.haml +++ b/app/views/layouts/_footer.html.haml @@ -7,9 +7,7 @@ %footer .footer-header .footer-logo - %img{:src => "#{asset_path("logos/ontoportal.svg")}"} - %p - = portal_name + = inline_svg_tag('logos/logoLW_eric_outline_white-01.svg') .footer-social-media-links - $FOOTER_LINKS[:social].each do |link| %a{:href => link[:link], :target => "_blank"} diff --git a/config/deploy.rb b/config/deploy.rb index 529350eb0..6f4475415 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -32,9 +32,9 @@ # Default value for linked_dirs is [] # set :linked_dirs, %w{bin log tmp/pids tmp/cache public/system public/assets config/locales} -set :linked_dirs, %w{log tmp/pids tmp/cache public/system public/assets} +set :linked_dirs, %w{log tmp/pids tmp/cache} append :linked_files, 'config/database.yml', 'config/bioportal_config_appliance.rb' -append :linked_dirs, 'log', 'tmp', '.bundle', 'config/locales' +#append :linked_dirs, 'log', 'tmp', '.bundle' append :linked_files, 'config/secrets.yml', 'config/site_config.rb','config/credentials/appliance.key', 'config/credentials/appliance.yml.enc' # Default value for default_env is {} @@ -142,7 +142,7 @@ end - after :updating, :get_config + #after :updating, :get_config after :publishing, :restart after :restart, :clear_cache do diff --git a/config/locales/en.yml b/config/locales/en.yml index 2916588c7..53eec176d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -516,7 +516,7 @@ en: acknowledgments: Acknowledgments about: About about_us: About Us - projects: D2KAB + projects: Projects team: Team notices: slice: Slice diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 2ac75c679..8e6b652db 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -522,7 +522,7 @@ fr: acknowledgments: Remerciements about: À propos about_us: À propos de nous - projects: D2KAB + projects: Projets team: Équipe notices: slice: Tranche From c92056dd266f7058443d199547d81434f7e21775 Mon Sep 17 00:00:00 2001 From: Syphax Bouazzouni Date: Thu, 30 May 2024 20:02:35 +0200 Subject: [PATCH 02/12] add back vocbench link in the topnav --- app/assets/stylesheets/themes/ecoportal/main.scss | 4 ++++ app/helpers/application_helper.rb | 13 ++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/themes/ecoportal/main.scss b/app/assets/stylesheets/themes/ecoportal/main.scss index 573c0af60..e31a00bbb 100644 --- a/app/assets/stylesheets/themes/ecoportal/main.scss +++ b/app/assets/stylesheets/themes/ecoportal/main.scss @@ -576,4 +576,8 @@ html { /******* GENERAL ******/ .margin-bottom-20 { margin-bottom: 20px; +} + +.nav-items .nav-a{ + border-radius: 0 !important; } \ No newline at end of file diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ecc868fcb..81c02a725 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -532,11 +532,14 @@ def portal_name end def navitems - items = [["/ontologies", t('layout.header.browse')], - ["/mappings", t('layout.header.mappings')], - ["/recommender", t("layout.header.recommender")], - ["/annotator", t("layout.header.annotator")], - ["/landscape", t("layout.header.landscape")]] + items = [ + ["/ontologies", t('layout.header.browse')], + ["/mappings", t('layout.header.mappings')], + ["/recommender", t("layout.header.recommender")], + ["/annotator", t("layout.header.annotator")], + ["/landscape", t("layout.header.landscape")], + ["http://vocbench.lifewatchitaly.eu/", "Vocbench"] + ] end From b4f36286dba5c62afa7006137bbfb149859d713a Mon Sep 17 00:00:00 2001 From: Syphax Bouazzouni Date: Thu, 30 May 2024 20:52:09 +0200 Subject: [PATCH 03/12] remove the expired license alert --- app/views/layouts/_notices.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/_notices.html.haml b/app/views/layouts/_notices.html.haml index 7d99b276e..1afbbf388 100644 --- a/app/views/layouts/_notices.html.haml +++ b/app/views/layouts/_notices.html.haml @@ -1,5 +1,5 @@ - if Rails.env.appliance? - = license_notification(current_license()) + = #license_notification(current_license()) - flash.each do |key, message| = render NotificationComponent.new(title: message , type: notification_type(key)) From a2e690b11258f432e242fb1d2d6060e6374ca128 Mon Sep 17 00:00:00 2001 From: Syphax Bouazzouni Date: Thu, 30 May 2024 20:52:45 +0200 Subject: [PATCH 04/12] force button to not be rounded in ecoportal theme --- app/assets/stylesheets/themes/ecoportal/main.scss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/themes/ecoportal/main.scss b/app/assets/stylesheets/themes/ecoportal/main.scss index e31a00bbb..7287688f2 100644 --- a/app/assets/stylesheets/themes/ecoportal/main.scss +++ b/app/assets/stylesheets/themes/ecoportal/main.scss @@ -578,6 +578,8 @@ html { margin-bottom: 20px; } -.nav-items .nav-a{ +.regular-button, .secondary-button, .nav-items .nav-a, .account-page-rounded-button, .account-page-upload-ontology-button, +.account-page-select-ontology-set-button, .account-page-subscribe-button , +.card-message-button, .feedback-button, .lost-password-button, .home-get-recommendations, .home-get-annotations{ border-radius: 0 !important; } \ No newline at end of file From 363d613777c8acdf2ddf0bc6453a865dc34d7474 Mon Sep 17 00:00:00 2001 From: Syphax Bouazzouni Date: Thu, 30 May 2024 20:53:05 +0200 Subject: [PATCH 05/12] add lifewatch logo the homepage supported section --- app/assets/images/logos/supports/LW_ITA.png | Bin 0 -> 8429 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 app/assets/images/logos/supports/LW_ITA.png diff --git a/app/assets/images/logos/supports/LW_ITA.png b/app/assets/images/logos/supports/LW_ITA.png new file mode 100644 index 0000000000000000000000000000000000000000..c05a1ac0d59027924aec5c8b5af8363cd8afae68 GIT binary patch literal 8429 zcmaKR2Q-^+^gpUat=cWM>Czx#M(w@#UNvG%ln`Rosy#~WnvJa}TC1qqYK9s$Ta?%% zM$LcP@A!Xz=lsqu=RHsEz3=C9$Mf8KPTn_B+L}t_HyLl@;o*_1D9h{O;o)O(@)hwl z+{)iDK8%NV?Zipn7;dbg4z`84@mkx#Y#_WoZtl4Icz92weB7;VT_A8a8;FAwRDxrt zxs8L($xed9NJxWU!(9&I=%kGFfaoDL^=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V7Bqy5bCRIv_vYXEX^yiw%bb$-O>S~5$f7lB$XxU+L?X-YNuamy z47yrk#jW3K@zU9{Ob~?`TUJZ>G37ph3F=sN5MBzS{+XZD4dz@)oT26+Fi9 z$D7(fhL=$E`mF5L#Uqs+y-vo`rPRT!EC+_cpNW?qf!A_B9Hj@f-E*8E$(ZA@KM_rW zOPn)&5B|040H%)`+lbrU(I%Zr6A`_tC`e<&{LkL|uja3I&U)!d_KsT<8HD?D4^Krw LQ@&F6X~_QrQ5Otp literal 0 HcmV?d00001 From b5e564492404785e1745e371ebe95aaf68d3e654 Mon Sep 17 00:00:00 2001 From: Syphax Bouazzouni Date: Thu, 30 May 2024 20:53:24 +0200 Subject: [PATCH 06/12] fix homepage ofaire section badges size --- app/views/home/index.html.haml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index 395735a9c..367172cda 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -94,17 +94,17 @@ %hr.home-section-line/ .home-card.home-fair-scores %div.fair-scores-badge-section - %h2.p-2.badge.badge-secondary.fair-scores-badge-margin + %h3.p-2.badge.badge-secondary.fair-scores-badge-margin = t('home.average') %span.badge.badge-light %span#fair-score-average 0 (0%) - %h2.p-2.badge.badge-secondary.fair-scores-badge-margin + %h3.p-2.badge.badge-secondary.fair-scores-badge-margin = t('home.min') %span.badge.badge-light %span#fair-score-min 0 (0%) - %h2.p-2.badge.badge-secondary.fair-scores-badge-margin + %h3.p-2.badge.badge-secondary.fair-scores-badge-margin = t('home.max') %span.badge.badge-light %span#fair-score-max From 62517d5d245c2dfd135cf170c404ac691861bc21 Mon Sep 17 00:00:00 2001 From: Syphax Bouazzouni Date: Thu, 30 May 2024 20:54:12 +0200 Subject: [PATCH 07/12] =?UTF-8?q?change=20all=20the=20r=C3=A9f=C3=A9rences?= =?UTF-8?q?=20of=20ontology=20to=20semantic=20resource?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/locales/en.yml | 354 +++++++++++++++++++++--------------------- 1 file changed, 177 insertions(+), 177 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 53eec176d..5e8e0feb1 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -58,20 +58,20 @@ en: watching: Watching beta_badge_text: Beta beta_badge_tooltip: This feature is experimental and may have issues - ontology_not_found: Ontology %{acronym} not found + ontology_not_found: Semantic resource %{acronym} not found concept_not_found: Concept %{concept} not found error_load: "Error: load failed" not_found_message: Not Found try_again: There was an error, please try again - provide_ontology_or_concept: Please provide an ontology id or concept id with an ontology id. + provide_ontology_or_concept: Please provide an semantic resource id or concept id with an semantic resource id. search_for_class: Please search for a class using the Jump To field above missing_roots_for_ontology: Missing @roots for %{acronym} missing_roots: Missing roots missing_class: Missing class %{root_child} missing_class_ontology: Missing class %{acronym} / %{concept_id} error_simplify_class: "Failure to simplify class: %{cls}" - no_cache: "No cache or expired cache for ontology: %{id}" - incomplete_simple_ontology: "Incomplete simple ontology: %{id}, %{ont}" + no_cache: "No cache or expired cache for semantic resource: %{id}" + incomplete_simple_ontology: "Incomplete simple semantic resource: %{id}, %{ont}" label_xl: error_valid_label_xl: "Error: You must provide a valid label_xl id" @@ -81,7 +81,7 @@ en: error_update_info: Problem retrieving update info - %{message} current_version: "Current version: %{version}" appliance_id: "Appliance ID: %{id}" - no_record_exists: No record exists for ontology %{acronym} + no_record_exists: No record exists for semantic resource %{acronym} cache_flush_success: UI cache successfully flushed cache_flush_error: "Problem flushing the UI cache - %{class}: %{message}" no_flush_command: "The UI cache does not respond to the 'flush_all' command" @@ -92,30 +92,30 @@ en: clear_goo_cache_error: "Problem flushing the Goo cache - %{class}: %{message}" clear_http_cache_success: HTTP cache successfully flushed clear_http_cache_error: "Problem flushing the HTTP cache - %{class}: %{message}" - refresh_report_without_ontologies: Refresh of ontologies report started successfully - refresh_report_with_ontologies: "Refresh of report for ontologies: %{ontologies} started successfully" - submission_deleted_successfully: Submission %{id} for ontology %{ont} was deleted successfully - submission_not_found: Submission %{id} for ontology %{ont} was not found in the system - ontology_not_found: Ontology %{ont} was not found in the system - problem_deleting_submission: "Problem deleting submission %{id} for ontology %{ont} - %{class}: %{message}" + refresh_report_without_ontologies: Refresh of semantic resources report started successfully + refresh_report_with_ontologies: "Refresh of report for semantic resources: %{ontologies} started successfully" + submission_deleted_successfully: Submission %{id} for semantic resource %{ont} was deleted successfully + submission_not_found: Submission %{id} for semantic resource %{ont} was not found in the system + ontology_not_found: Semantic resource %{ont} was not found in the system + problem_deleting_submission: "Problem deleting submission %{id} for semantic resource %{ont} - %{class}: %{message}" problem_refreshing_report: "Problem refreshing report - %{class}: %{message}" report_successfully_regenerated: Report successfully regenerated on %{report_date_generated} - ontologies_report_retrieved: Ontologies Report - retrieved %{ontologies} ontologies in %{time}s" - problem_retrieving_ontologies: Problem retrieving ontologies report - %{message} - no_ontologies_parameter_passed: "No ontologies parameter passed. Syntax: ?ontologies=ONT1,ONT2,...,ONTN" - ontology_process_success: "Ontology %{ont} %{success_keyword} successfully," - ontology_not_found_system: "Ontology %{ont} was not found in the system, " - ontology_process_error: "Problem %{error_keyword} ontology %{ont} - %{class}: %{message}," - new_ontologies_created_title: "The following ontologies: %{count} were created in this year" + ontologies_report_retrieved: Semantic resources Report - retrieved %{ontologies} semantic resources in %{time}s" + problem_retrieving_ontologies: Problem retrieving semantic resources report - %{message} + no_ontologies_parameter_passed: "No semantic resources parameter passed. Syntax: ?ontologies=ONT1,ONT2,...,ONTN" + ontology_process_success: "Semantic resource %{ont} %{success_keyword} successfully," + ontology_not_found_system: "Semantic resource %{ont} was not found in the system, " + ontology_process_error: "Problem %{error_keyword} semantic resource %{ont} - %{class}: %{message}," + new_ontologies_created_title: "The following semantic resources: %{count} were created in this year" turbo_confirm: "Are you sure you want to %{name}?" analytics: - total_ontologies: Total Ontologies - ontologies_count: "%{size} new ontology this year" - ontologies_with_errors: Ontologies with errors + total_ontologies: Total semantic resources + ontologies_count: "%{size} new semantic resource this year" + ontologies_with_errors: Semantic resources with errors total_visits: Total visits active_users: Active users visit_users: "%{visits} users since last month" - ontology_visits: Ontology visits + ontology_visits: Semantic resource visits unique_users_visits: Unique users visits page_visits: Page visits of this month main: @@ -136,7 +136,7 @@ en: administration_console: Administration console analytics: Analytics site_administration: Site Administration - ontology_administration: Ontology Administration + ontology_administration: Semantic resources Administration licensing: Licensing users: Users metadata_administration: Metadata Administration @@ -171,7 +171,7 @@ en: name: Name description: Description created: Created - ontologies: Ontologies + ontologies: Semantic resources new: create_new_group: Create new group create_group: Create group @@ -202,7 +202,7 @@ en: name: Name description: Description created: Created - ontologies: Ontologies + ontologies: Semantic resources edit: edit_category: Edit category save: Save @@ -245,9 +245,9 @@ en: collections_management: "COLLECTIONS MANAGEMENT" name: "Name" actions: "Actions" - ontology: "Ontology" + ontology: "Semantic resource" agent: "Agent" - ontology_submission: "Ontology submission" + ontology_submission: "Semantic resource submission" select_model: "Select a model to index" generate_schema: "Generate schema" see_schema: "See schema" @@ -270,7 +270,7 @@ en: annotator: title: Annotator - description: Get annotations for text with ontology classes + description: Get annotations for text with semantic resource classes input_hint: Enter or past a text to be annotated ... options: Options whole_word_only: Whole word only @@ -291,7 +291,7 @@ en: context: Context certainty: Certainty class: Class - ontology: Ontology + ontology: Semantic resource negation: Negation temporality: Temporality experiencer: Experiencer @@ -309,8 +309,8 @@ en: list_error: The Collection didn't define any member close: Close request_terms_instructions: | - The text below is displayed to the user as the instructions on how to request new terms for your ontology. - You can change this text for %{acronym} ontology by clicking anywhere on the existing text to + The text below is displayed to the user as the instructions on how to request new terms for your semantic resource. + You can change this text for %{acronym} semantic resource by clicking anywhere on the existing text to bring up the editing dialog. Click 'Submit Changes' to save or 'Cancel' to discard your changes. submit_changes: Submit Changes @@ -346,7 +346,7 @@ en: bug: Bug proposition: Proposition question: Question - ontology_submissions_request: Ontology submissions request + ontology_submissions_request: Semantic resource submissions request include_name: Please include your name include_email: Please include your email include_comment: Please include your comment @@ -354,34 +354,34 @@ en: notice_feedback: Feedback has been sent account_title: Account Information agroportal_figures: "%{site} in figures" - benefit1: Discover new insights and knowledge by exploring other ontologies or smeantic resources in the repository. + benefit1: Discover new insights and knowledge by exploring other semantic resources or semantic resources in the repository. benefit2: Contribute to knowledge sharing and semantic interoperability in your domain. - benefit3: Map your ontology to other relevant ones in the domain and collaborate with other users. - benefit4: Get feedback and suggestions from other users who can use and comment on your ontology. - benefit5: Precisely describe your ontology with relevant metadata and get a FAIR score for your ontology. + benefit3: Map your semantic resource to other relevant ones in the domain and collaborate with other users. + benefit4: Get feedback and suggestions from other users who can use and comment on your semantic resource. + benefit5: Precisely describe your semantic resource with relevant metadata and get a FAIR score for your semantic resource. fair_details: See details fairness: FAIR Score get_annotations: Get annotations get_recommendations: Get recommendations index: - tagline: The home of ontologies and semantic artefacts in agri-food and related domains. + tagline: The home of semantic resources and semantic artefacts in agri-food and related domains. title: Welcome to %{site} welcome: Welcome to %{site}, - ontology_upload: Do you want to share an ontology? - ontology_upload_benefits: 'By uploading and sharing your ontology to %{site}, you can:' - ontology_upload_button: Submit ontology - discover_ontologies_button: Discover ontologies - ontology_upload_desc: Uploading an ontology or another type of semantic artefact (vocabulary, terminology, thesaurus, ...) is a way of sharing your knowledge with others. + ontology_upload: Do you want to share an semantic resource? + ontology_upload_benefits: 'By uploading and sharing your semantic resources to %{site}, you can:' + ontology_upload_button: Submit a semantic resource + discover_ontologies_button: Discover semantic resources + ontology_upload_desc: Uploading an semantic resource, ontology, vocabulary, terminology, thesaurus, ... is a way of sharing your knowledge with others. paste_text_prompt: Enter a paragraph of text or some keywords... recommender_annotator: Recommender and Annotator support_and_collaborations: Support & Collaborations ontoportal_instances: Other OntoPortal Instances see_details: See details - info_tooltip_text: "You are seing the average scores for all the public ontologies in AgroPortal. FAIR scores are computed with the O'FAIRe methodology. More details here: https://github.com/agroportal/fairness" + info_tooltip_text: "You are seing the average scores for all the public semantic resources in EcoPortal. FAIR scores are computed with the O'FAIRe methodology. More details here: https://github.com/agroportal/fairness" average: Average min: Min max: Max - ontologies: Ontologies + ontologies: Semantic resources classes: Classes individuals: Individuals properties: Properties @@ -402,7 +402,7 @@ en: bug: Bug proposition: Proposition question: Question - ontology_submissions_request: Ontology submissions request + ontology_submissions_request: Semantic resource submissions request optional: (optional) send: Send feedback_complete: @@ -428,56 +428,56 @@ en: as_creator_count: "%{count} as creator" as_curator_count: "%{count} as curator" contributions: "Contributions: %{title}" - published_ontologies: published %{count} ontologies - funded_ontologies: funded %{count} ontologies - endorsed_ontologies: endorsed %{count} ontologies - number_of_ontologies_using_format: Number of ontologies using this format - number_of_ontologies_of_type: Number of ontologies of this ontology type - number_of_ontologies_of_formality_level: Number of ontologies of this formality level - number_of_ontologies_in_catalog: Number of ontologies in this catalog - number_of_ontologies: Number of ontologies - number_of_ontologies_with_class_count_in_range: Number of ontologies with a class count in this range + published_ontologies: published %{count} semantic resources + funded_ontologies: funded %{count} semantic resources + endorsed_ontologies: endorsed %{count} semantic resources + number_of_ontologies_using_format: Number of semantic resources using this format + number_of_ontologies_of_type: Number of semantic resources of this semantic resource type + number_of_ontologies_of_formality_level: Number of semantic resources of this formality level + number_of_ontologies_in_catalog: Number of semantic resources in this catalog + number_of_ontologies: Number of semantic resources + number_of_ontologies_with_class_count_in_range: Number of semantic resources with a class count in this range average: Average - fairness_interface_introduction: This interface shows how an ontology or a group responded successfully to O’FAIRe FAIRness assessment questions - fairness_interface_details: See details for each ontologies on the specific ontology summary pages + fairness_interface_introduction: This interface shows how an semantic resource or a group responded successfully to O’FAIRe FAIRness assessment questions + fairness_interface_details: See details for each semantic resources on the specific semantic resource summary pages fairness_interface_hover_instruction: hover on a principle to see details average_metrics: Average metrics category: category filter_network: Filter network - funding_endorsing_organizations: Organizations funding and endorsing the most ontologies + funding_endorsing_organizations: Organizations funding and endorsing the most semantic resources group: group groups_and_categories: Groups and Categories - intro: Visualize the panorama of all ontologies on %{site} via metadata aggregation. + intro: Visualize the panorama of all semantic resources on %{site} via metadata aggregation. more_properties_charts: More properties charts - most_active_ontologies: Most active ontologies + most_active_ontologies: Most active semantic resources most_active_organizations: Most active organizations most_active_people: Most active people most_active_people_as_reviewer: Most active user account most_mentioned_people: Most mentioned people as contact, creator, contributor or curator most_mentioned_people_as_reviewer: User account who published notes, reviews, and projects - ontologies_activity_on: Ontology activity - ontologies_by: Ontologies by %{type} - ontologies_contributors: Contributors to ontology development - ontologies_count_by_catalog: Number of ontologies in each semantic artefact catalog + ontologies_activity_on: Semantic resource activity + ontologies_by: Semantic resources by %{type} + ontologies_contributors: Contributors to semantic resource development + ontologies_count_by_catalog: Number of semantic resources in each semantic artefact catalog ontologies_formats: Representation language ontologies_languages: Natural languages ontologies_licenses: Licenses - ontologies_with_notes_reviews_projects: Ontologies with notes, reviews, and projects + ontologies_with_notes_reviews_projects: Semantic resources with notes, reviews, and projects ontology_fairness_evaluator: Ontology FAIRness Evaluator (O’FAIRe) ontology_formality_levels: Formality levels - ontology_properties_pie_charts: Pie charts retated to object description properties (i.e., meatdata properties used to describe ontology objects). - ontology_relations_network: Ontology relations network - ontology_tools: Most used tools to build ontologies + ontology_properties_pie_charts: Pie charts rotated to object description properties (i.e., meatdata properties used to describe semantic resource objects). + ontology_relations_network: semantic resource relations network + ontology_tools: Most used tools to build semantic resources owl_ontology_author_uris: Properties used to specify object author owl_ontology_definition_uris: Properties used to specify objects definition owl_ontology_preflabel_uris: Properties used to specify objects preferred label owl_ontology_synonym_uris: Properties used to specify object synonyms properties_usage_proportion: Pie charts related to the most frequent values for certain metadata properties properties_use: Property usage - relations_between_stored_ontologies: Set of relationships between %{site} ontologies as captured by metadata. Green ontologies are stored in the repository while those in blue are external resources. + relations_between_stored_ontologies: Set of relationships between %{site} semantic resources as captured by metadata. Green semantic resources are stored in the repository while those in blue are external resources. size: size title: "Landscape" - ontologies_properties: Ontologies properties + ontologies_properties: Semantic resources properties layout: header: account_setting: Account settings @@ -507,7 +507,7 @@ en: contact_us: Contact Us wiki: Wiki documentation: Documentation - agro_documentation: AgroPortal documentation + agro_documentation: EcoPortal documentation agreements: Legal terms: Terms and Conditions privacy_policy: Privacy Policy @@ -529,7 +529,7 @@ en: user_logged_out: You have successfully logged out try_again_notice: ". Please try again." reset_password_again: ". Please reset your password again." - custom_ontology_set: "The display is now based on your Custom Ontology Set." + custom_ontology_set: "The display is now based on your Custom semantic resource Set." welcome: "Welcome " error_account_name: Please enter an account name error_password: Please enter a password @@ -554,19 +554,19 @@ en: statistics: title: "%{portal} Statistics" lead: (last %{last_years} years) - ontologies: Ontologies + ontologies: Semantic resources users: Users projects: Projects date: Date - ontology_visits: Ontology visits + ontology_visits: Semantic resource visits mappings: all: All - description: Dive into an overview of the mappings in the bubble view, efficiently locate a specific ontology in the table view or upload your own mappings. + description: Dive into an overview of the mappings in the bubble view, efficiently locate a specific semantic resource in the table view or upload your own mappings. tabs: bubble_view: Bubbles view table_view: Table view upload_mappings: Upload mappings - filter_ontologies: Filter ontologies in the bubble view + filter_ontologies: Filter semantic resources in the bubble view filter_bubbles: Filter bubbles external_mappings: "External Mappings (%{number_with_delimiter})" interportal_mappings: "Interportal Mappings - %{acronym} (%{number_with_delimiter})" @@ -578,25 +578,25 @@ en: error_of_source_and_target: Source and target concepts need to be specified mapping_issue: "Mapping issue with '%{mapping}' : %{message}" find_mappings: Find mappings of a class/concept - intro: Find all the mappings of an ontology + intro: Find all the mappings of an semantic resource loading_mappings: Loading mappings... no_mappings_available: No mappings available title: Mappings upload_mappings: Upload mappings - select_ontologies_list: Select ontologies + select_ontologies_list: Select semantic resources bubble_view_legend: bubble_size: "Bubble size:" - bubble_size_desc: "The global number of mappings with all other ontologies." + bubble_size_desc: "The global number of mappings with all other semantic resources." color_degree: "Color degree:" - color_degree_desc: "The number of mappings with the selected ontology." + color_degree_desc: "The number of mappings with the selected semantic resource." yellow_bubble: "Yellow bubble: " selected_bubble: "The selected bubble." less_mappings: "Less mappings" more_mappings: "More mappings" count: - ontology: Ontology + ontology: Semantic resource mappings: Mappings - no_mappings: There are no mappings to or from this ontology + no_mappings: There are no mappings to or from this semantic resource form: source_class: Source class mapping_name: Mapping description (name) @@ -619,11 +619,11 @@ en: external: External target_class: Target class details: Details - ontology_acronym: Ontology (acronym) + ontology_acronym: Semantic resource (acronym) class: Class - ontology_acronym_placeholder: Enter the ontology ACRONYM + ontology_acronym_placeholder: Enter the semantic resource ACRONYM class_uri_placeholder: Enter the class URI - ontology_uri_placeholder: Enter the ontology URI + ontology_uri_placeholder: Enter the semantic resource URI show_line: edit_modal: Edit delete_button: Delete @@ -651,7 +651,7 @@ en: agent_usages_updated: Agent usages successfully updated agent_already_deleted: Agent %{id} already deleted agent_deleted_successfully: Agent %{id} deleted successfully - ontology_not_valid: "ontology is not valid, here are the errors: " + ontology_not_valid: "semantic resource is not valid, here are the errors: " save: Save not_used: Not used see_usages_count: See usages (%{count}) @@ -721,9 +721,9 @@ en: edit_text: Edit home_page: Home page index: - intro: Browse a selection of projects that use %{site} ontologies + intro: Browse a selection of projects that use %{site} semantic resources institutions: Institutions - ontologies: Ontologies + ontologies: Semantic resources project_description: Project Description self: Projects title: Projects List @@ -736,8 +736,8 @@ en: institution: "Institution:" contacts: "Contacts:" home_page: "Home Page:" - ontologies_used: Ontologies Used - no_ontologies_associated: No ontologies are currently associated with this project + ontologies_used: Semantic resources Used + no_ontologies_associated: No semantic resources are currently associated with this project form: errors_on_form: Errors On Form @@ -747,7 +747,7 @@ en: home_page: "Homepage: *" example: "Example:" description: "Description:*" - select_ontologies: Select Ontologies Used + select_ontologies: Select Semantic resources Used select_administrators: Select administrators edit: @@ -762,30 +762,30 @@ en: create_project: Create Project recommender: title: Recommender - intro: Get recommendations for the most relevant ontologies from an excerpt of text or a list of keywords + intro: Get recommendations for the most relevant semantic resources from an excerpt of text or a list of keywords options: Options input: Input text: Text keywords: Keywords output: Output - ontologies: Ontologies - ontology_sets: Ontology sets + ontologies: Semantic resources + ontology_sets: Semantic resource sets hint: Paste a paragraph of text or some keywords ... weights_configuration: Weights configuration coverage: Coverage acceptance: Acceptance knowledge_detail: Knowledge detail specialization: Specialization - ontologies_configuration: Ontologies configuration - max_ont_set: Maximum number of ontologies per set - select_ontologies: Select ontologies + ontologies_configuration: Semantic resources configuration + max_ont_set: Maximum number of semantic resources per set + select_ontologies: Select semantic resources get_recommendations: Get recommendations edit: Edit - results_title: Recommended ontologies + results_title: Recommended semantic resources call_annotator: Call Annotator with the same input cite: Cite results_table: - ontology: Ontology + ontology: Semantic resource final_score: Final score coverage_score: Coverage score acceptance_score: Acceptance score @@ -811,9 +811,9 @@ en: account_successfully_updated: Account was successfully updated user_deleted_successfully: User deleted successfully not_permitted: Not permitted - error_saving_custom_ontologies: Error saving Custom Ontologies, please try again - custom_ontologies_cleared: Custom Ontologies were cleared - custom_ontologies_saved: Custom Ontologies were saved + error_saving_custom_ontologies: Error saving Custom Semantic resources, please try again + custom_ontologies_cleared: Custom Semantic resources were cleared + custom_ontologies_saved: Custom Semantic resources were saved subscribe_flash_message: "You have successfully %{action} %{to_or_from} our user mailing list: %{list}" error_subscribe: Something went wrong ... validate_email_address: Please enter an email address @@ -832,7 +832,7 @@ en: username: Username email: Email roles: Roles - ontologies: Ontologies + ontologies: Semantic resources project: Project created: Created At actions: Actions @@ -867,37 +867,37 @@ en: mailing_list_description: Register to the %{portal} announcements mailing list. api_key_description: Your API Key can be used to access %{portal} Web services api_documentation: API documentation - custom_semantic_resource: Custom ontology set + custom_semantic_resource: Custom semantic resource set please: Please modify_custom_semantic_resource: | visit the main site - to modify your Custom Ontology Set. - customize_portal_display: "Customize your %{portal} display: Pick the ontologies that you want to see on %{portal} will hide all other ontologies." - select_semantic_resources: Select ontologies - no_semantic_resources: You haven't picked any ontologies yet + to modify your Custom semantic resource Set. + customize_portal_display: "Customize your %{portal} display: Pick the semantic resources that you want to see on %{portal} will hide all other semantic resources." + select_semantic_resources: Select semantic resources + no_semantic_resources: You haven't picked any semantic resources yet note_feature_logged_in: "Note: this feature works only when you are logged in." - save_custom_semantic_resources: Save custom ontologies - not_subscribed: Not subscribed to any ontology - submitted_semantic_resources: Submitted Ontologies - upload_semantic_resources: Upload Ontologies + save_custom_semantic_resources: Save custom semantic resources + not_subscribed: Not subscribed to any semantic resource + submitted_semantic_resources: Submitted semantic resources + upload_semantic_resources: Upload semantic resources projects_created: Projects Created no_project_created: No project created unsubscribe: Unsubscribe subscribe: Subscribe subscriptions: Subscriptions - no_uploaded_resources: You didn't upload any ontology yet + no_uploaded_resources: You didn't upload any semantic resource yet notes: Notes search: no_search_class_provided: No search class provided search_place_holder: Enter a term, e.g. plant height advanced_options: search_language: Search language - ontologies: Ontologies + ontologies: Semantic resources include_in_search_title: Include in search include_in_search_values: property_values: Property values obolete_classses: Obsolete classes - ontology_views: Ontology views + ontology_views: Semantic resource views show_only_title: Show only show_only_values: exact_matches: Exact matches @@ -905,11 +905,11 @@ en: show_advanced_options: Show options hide_advanced_options: Hide options match_in: Match in - ontologies: ontologies + ontologies: semantic resources result_component: details: Details visualize: Vizualize - more_from_ontology: more from this ontology + more_from_ontology: more from this semantic resource reuses_in: Reuses in notes: no_notes: No notes to display @@ -967,7 +967,7 @@ en: sort_by_popularity: Sort by popularity sort_by_notes: Sort by notes sort_by_projects: Sort by projects - no_submissions_for_ontology: "No submissions for ontology: %{ontology}" + no_submissions_for_ontology: "No submissions for semantic resource: %{ontology}" submission_updated_successfully: Submission updated successfully save_button: Save id: ID @@ -981,7 +981,7 @@ en: edit_button: Edit delete_submission_alert: content_1: "Are you sure you want to delete submission " - content_2: " for ontology " + content_2: " for semantic resource " content_3: "?
    This action CAN NOT be undone!!!" ontoportal_virtual_appliance: problem_adding_account: "Problem adding account %{id}: account does not exist" @@ -996,7 +996,7 @@ en: ontologies_api: Ontologies API (REST service) annotator: Annotator recommender: Recommender - web_user_interface: BioPortal Web User Interface (including ontology visualization, widgets, and Annotator UI) + web_user_interface: BioPortal Web User Interface (including semantic resource visualization, widgets, and Annotator UI) see_documentation: Please see our more_information: for more information on working with the Appliance. download_button_text: Download Latest OntoPortal @@ -1015,7 +1015,7 @@ en: export_users_link: "Export Appliance Users As CSV" bioportal_user: BioPortal User ID submission_inputs: - edit_ontology_title: Edit ontology + edit_ontology_title: Edit semantic resource metadata_selector_label: "Filter properties to show" metadata_selector_placeholder: "Start typing to select properties" administrators: Administrators @@ -1039,23 +1039,23 @@ en: groups: Groups visibility: Visibility - accounts_allowed: Add or remove accounts that are allowed to see this ontology in %{portal_name}. - ontology_view_of_another_ontology: Is this ontology a view of another ontology? + accounts_allowed: Add or remove accounts that are allowed to see this semantic resource in %{portal_name}. + ontology_view_of_another_ontology: Is this semantic resources a view of another semantic resource? contact: Contact equivalents: Equivalents validators: Validators help_text: Help text contact_name: "%{name} Name" contact_email: "%{name} Email" - edit_metadata_instruction: "Edit the metadata of your ontology here. Some of these values are used by %{portal_name} functionalities, including for FAIRness assessment. %{link}" + edit_metadata_instruction: "Edit the metadata of your semantic resource here. Some of these values are used by %{portal_name} functionalities, including for FAIRness assessment. %{link}" edit_metadata_instruction_link: "See guidelines and recommendations for metadata here." license_help: "%{portal_name} requires an URI for the license. If you do not find your choice here, %{link}" license_help_link: "Please pick up an URI from here." - deprecated_help: "An ontology with status retired shall necessarily be also deprecated, but not the opposite." + deprecated_help: "A semantic resource with status retired shall necessarily be also deprecated, but not the opposite." known_usage_help: "Consider also declaring %{metadata_knownUsage_help}" - known_usage_help_link: "the projects that are using the ontology" - help_creator: "The following properties take for value an 'agent' in %{portal_name} (either a person or an organization). These agents are shared over all the ontologies and suggested with autocompletion if they already exist. Editing an agent here will change it to all the ontologies that agent is involved in." - version_help: "For more information on how to encode versioning information in an ontology, see %{link}" + known_usage_help_link: "the projects that are using the semantic resource" + help_creator: "The following properties take for value an 'agent' in %{portal_name} (either a person or an organization). These agents are shared over all the semantic resources and suggested with autocompletion if they already exist. Editing an agent here will change it to all the semantic resources that agent is involved in." + version_help: "For more information on how to encode versioning information in an semantic resource, see %{link}" version_helper_link: "guidelines and recommendations." instances: id: ID @@ -1130,20 +1130,20 @@ en: mod_link: MOD1.4 see_the_used_properties: see the used properties metadata_properties: Metadata properties listed in the following are picked from %{mod_link}. - ontology_repository: This ontology repository implements %{mod_link} but does not necessarily encode metadata with the same properties (%{submission_link}). + ontology_repository: This semantic resource repository implements %{mod_link} but does not necessarily encode metadata with the same properties (%{submission_link}). see_possible_credits: See possible credits see_metadata_used_properties: See metadata used properties not_found: not found "null": "null" - view_fair_scores_definitions: "You are seeing the FAIRness assessment score for this ontology in AgroPortal. FAIR scores are computed with the O'FAIRe methodology. More details here: https://github.com/agroportal/fairness" + view_fair_scores_definitions: "You are seeing the FAIRness assessment score for this semantic resource in EcoPortal. FAIR scores are computed with the O'FAIRe methodology. More details here: https://github.com/agroportal/fairness" ontologies_metadata_curator: #bulk_edit: Start bulk edit #use_the_bulk_edit: To use the bulk edit select in the table submissions (the rows) and metadata properties (the columns) for which you want to edit start_the_bulk_edit: Select in the table submissions (rows) and metadata properties (columns) to start the bulk edit alert_success_submissions: Submissions were successfully updated - ontologies: Ontologies + ontologies: Semantic resources get_values: Get values - select_ontologies_and_metadata: select ontologies and the metadata properties + select_ontologies_and_metadata: select semantic resources and the metadata properties include_all_submissions: Include all submissions apply_the_change_for_all: Apply the change for all update_the_current_displayed_content: "will update the current displayed content to all the following submissions:" @@ -1155,20 +1155,20 @@ en: view_license: View license access_rights_information: Additional license and access rights information referred_to: It can also be referred to as - private_ontology: Private Ontology + private_ontology: Private semantic resource formality_levels: Formality levels categories: Categories groups: Groups - ontology_types: Ontology types + ontology_types: Semantic resource types natural_languages: Natural languages showing: Showing metadata_properties: of %{acronym} metadata properties are filled home_page: Home Page - ontology_processing_failed: "The ontology processing failed, with the current statuses: %{status}" - ontology_parsing_succeeded: "The ontology parsing succeeded, but some processing steps failed, here are the current statuses: %{status}" - upload_an_ontology: Upload an ontology. Sections such as %{ontology} will be available once done. - new_ontology_is_processing: The ontology is processing. Sections such as %{ontology} will be available once processing is complete. - ontology_is_processing: The ontology is processing. Sections such as %{ontology} will be updated once processing is complete. + ontology_processing_failed: "The semantic resource processing failed, with the current statuses: %{status}" + ontology_parsing_succeeded: "The semantic resource parsing succeeded, but some processing steps failed, here are the current statuses: %{status}" + upload_an_ontology: Upload an semantic resource. Sections such as %{ontology} will be available once done. + new_ontology_is_processing: This semantic resource is processing. Sections such as %{ontology} will be available once processing is complete. + ontology_is_processing: This semantic resource is processing. Sections such as %{ontology} will be updated once processing is complete. contact_support: Contact support edit_natural_languages: Edit natural languages of %{acronym} edit_available_languages: Click here to edit available languages @@ -1179,8 +1179,8 @@ en: create_new_project: Create new project no_projects_using_ontology: No projects using %{acronym} outside: outside - relation_with_other_ontologies: Relation with other ontologies either in %{inside} or %{outside} - ontology_search_prompt: 'Search an ontology or a term (e.g., plant height)' + relation_with_other_ontologies: Relation with other semantic resources either in %{inside} or %{outside} + ontology_search_prompt: 'Search an semantic resource or a term (e.g., Environmental impact)' views: Views create_new_view: Create new view expand_all: Expand All @@ -1201,26 +1201,26 @@ en: see_details: See details collecting_data: We are still collecting data for %{acronym} location: Location - allow_users: Allow users to view the metadata of your ontology (Summary) only. + allow_users: Allow users to view the metadata of your semantic resource (Summary) only. metadata_only: Metadata only (No file) load_from_url: Load from URL new_versions_loaded: New versions loaded on a nightly basis. upload_local_file: Upload local file - ontology_submitted: Ontology submitted successfully! + ontology_submitted: semantic resource submitted successfully! users_can_see: Users can now see - your_ontology: your ontology + your_ontology: your semantic resource exploring_and_searching: | - in our ontology list but they cannot explore or search it. To enable exploring and searching, - please upload a full version of your ontology. - submitting_ontology_view: Thank you for submitting your ontology view to %{site}. - submitting_ontology: Thank you for submitting your ontology to %{site}. + in our semantic resource list but they cannot explore or search it. To enable exploring and searching, + please upload a full version of your semantic resource. + submitting_ontology_view: Thank you for submitting your semantic resource view to %{site}. + submitting_ontology: Thank you for submitting your semantic resource to %{site}. processing_message: | - We will now put your ontology in the queue to be processed. Please keep in mind that it may take up to several - hours before %{site} users will be able to explore and search your ontology. + We will now put your semantic resource in the queue to be processed. Please keep in mind that it may take up to several + hours before %{site} users will be able to explore and search your semantic resource. notification_message: "When your ontology is ready for viewing, you will receive an email notification and it will be available here:" contact_support_at: "If you have any questions or problems, please email the %{site} support team at:" collecting_data_message: We are still collecting data for %{acronym} - submit_new_ontology: Submit new ontology + submit_new_ontology: Submit new semantic resource details: Details general_information: General information dates_and_contacts: Dates and contacts @@ -1237,10 +1237,10 @@ en: filter: Filter browser: admin_welcome: Welcome admin,this coloring indicates admin-only features - show_private_ontology: Show private ontology only - show_ontology_views: Show ontology views - show_retired_ontologies: Show retired ontologies - search_placeholder: Start typing to filter ontologies, e.g., AGROVOC... + show_private_ontology: Show private semantic resource only + show_ontology_views: Show semantic resource views + show_retired_ontologies: Show retired semantic resources + search_placeholder: Start typing to filter semantic resources, e.g., AGROVOC... sections: classes: Classes individuals: Individuals @@ -1252,17 +1252,17 @@ en: classes_with_more_than_25_children: Classes with more than 25 children classes_with_no_definition: Classes with no definition identifiers: Identifiers - identifiers_tooltip: Principal identifiers of the ontology. + identifiers_tooltip: Principal identifiers of the semantic resource. dates: Dates person_and_organization: Persons and organizations other_links: Other links - info_tooltip_links: Metadata properties that highlight the links enabling access to datasets, downloading ontologies, etc + info_tooltip_links: Metadata properties that highlight the links enabling access to datasets, downloading semantic resources, etc projects_and_usage_information: Projects and usage information - info_tooltip_projects: Details pertaining to the utilization of the ontology. + info_tooltip_projects: Details pertaining to the utilization of the semantic resource. methodology_and_provenance: Methodology and provenance community: Community content: Content - info_tooltip_properties_dropdown: Metadata properties primarily encompass the design, methods, and actions to create the ontology. This includes elements such as the tools and software employed by the creator of the ontology during its configuration. + info_tooltip_properties_dropdown: Metadata properties primarily encompass the design, methods, and actions to create the semantic resource. This includes elements such as the tools and software employed by the creator of the semantic resource during its configuration. visits: Visits views: Views of %{acronym} create_new_view: Create new view @@ -1272,7 +1272,7 @@ en: download_as_csv: Download as CSV scroll_down_to_see_more: Scroll down to see more - widgets: Widgets are only available for ontologies stored in %{site}. + widgets: Widgets are only available for semantic resources stored in %{site}. add_acronym_widgets: Add %{acronym} Web Widgets to your site widget_block_component_title_1: Jump To widget_block_component_description_1: Type a class name from %{acronym} and jump to it in %{site} @@ -1280,9 +1280,9 @@ en: put_on_server: and put it on your server. copy_and_paste: Copy the code below and paste it to your HTML page note: "Note:" - use_quick_jump: If you would like to use Quick Jump across multiple ontologies - enter_list_of_ontologies: You can enter a comma-separated list of ontology ids - set_the_variable: "You can set the variable to 'all' to search all ontologies in %{site}:" + use_quick_jump: If you would like to use Quick Jump across multiple semantic resources + enter_list_of_ontologies: You can enter a comma-separated list of semantic resource ids + set_the_variable: "You can set the variable to 'all' to search all semantic resources in %{site}:" include_definitions: "To include definitions in the Jump To drop-down, add the following variable in Javascript:" info_pasted_code: In the code that you just pasted, make sure to change the path to the quick_jump.js file to point to the location where you put the file (relative to your HTML file) example_to_use_code: "For example, if you put the quick_jump.js file in the same directory as your HTML file, this is the code you would use:" @@ -1295,11 +1295,11 @@ en: include_file: In the header for the page where you want the form field, include the use_widget: "On your form, for the fields where you want to use the class-selection widget, specify the field's class in the following format:" for_example: For example, - use_ontology: will use NCI Thesaurus (ontology id is NCIT) and will put the class URI in the field after the user selects the class from the pull-down list. - use_list: "In addition to single ontology ids, you can use a list:" + use_ontology: will use NCI Thesaurus (semantic resource id is NCIT) and will put the class URI in the field after the user selects the class from the pull-down list. + use_list: "In addition to single semantic resource ids, you can use a list:" or: OR - use_all_to_search: "use 'all' to search across all %{site} ontologies:" - autocomplete_widget_accesses: The autocomplete widget accesses ontology content from the latest version of the ontology. + use_all_to_search: "use 'all' to search across all %{site} semantic resources:" + autocomplete_widget_accesses: The autocomplete widget accesses semantic resource content from the latest version of the semantic resource. use_following_parameters: "You can use the following parameters to select which value will be placed into the user-visible input field:" uri: uri shortid: shortid @@ -1330,14 +1330,14 @@ en: fair_score_title: FAIR score total_score: "Total score : %{score} ( %{normalized_score}%)" metrics: Metrics - metrics_link_title: Information and evolution diagrams about metrics and other measurements of the ontology. + metrics_link_title: Information and evolution diagrams about metrics and other measurements of the semantic resource. see_all_metrics: See all the metrics of %{acronym} show_modal_title_1: All the metrics of %{acronym} not_calculated_metrics: We have not yet calculated metrics for %{acronym} show_modal_title_2: "Evolution of the number of %{metric} in %{acronym} per submissions." submissions: Submissions submissions_link_title: Set of all the files that have been submitted to %{site}. Each previous metadata record is accessible but only the content of the latest parsed file is accessible via %{site} services - relations_network: Ontology relations network + relations_network: Semantic resource relations network general_information: General information initial_created_on: Initial created on additional_information: For additional information, contact @@ -1349,9 +1349,9 @@ en: abstract: Abstract description: Description - htaccess_modal_title: "Rewrite rules for %{acronym} ontology" + htaccess_modal_title: "Rewrite rules for %{acronym} semantic resource" instructions_servers: Instructions for %{server} servers - htaccess_redirection_description: "We offer a seamless solution to make your ontology URIs resolvable and content negotiable by allowing URL redirection for your ontology URIs to our Agroportal URIs. To facilitate this process, we've provided you with a set of .htaccess rewrite rules. By following the simple instructions below, you'll be able to implement these rules swiftly and efficiently, ensuring smooth redirection" + htaccess_redirection_description: "We offer a seamless solution to make your semantic resource URIs resolvable and content negotiable by allowing URL redirection for your semantic resource URIs to our EcoPortal URIs. To facilitate this process, we've provided you with a set of .htaccess rewrite rules. By following the simple instructions below, you'll be able to implement these rules swiftly and efficiently, ensuring smooth redirection" redirection_note: | This redirection works only for uri with the form of: url/path/resource_id @@ -1404,7 +1404,7 @@ en: submitted: Submitted by: by creation_date: Creation date %{date} - view_of_the_ontology: "View of the ontology %{ontology}" + view_of_the_ontology: "View of the semantic resource %{ontology}" view: View debug: Debug loading: Loading @@ -1426,22 +1426,22 @@ en: parent: Parent no_properties_alert: "%{acronym} does not contain properties" visits: - ontology_visits: Ontology visits + ontology_visits: Semantic resource visits name: name visits: visits ontologies_selector: clear_selection: Clear selection - ontologies_advanced_selection: Ontologies advanced selection - search_hint: Filter ontologies ... - show_ontology_view: Show ontology views - hide_retired_ontologies: Hide retired ontologies + ontologies_advanced_selection: Semantic resources advanced selection + search_hint: Filter semantic resources ... + show_ontology_view: Show semantic resource views + hide_retired_ontologies: Hide retired semantic resources tabs_title: categories: Categories groups: Groups format: Format natural_languages: Natural languages formality_levels: Formality levels - ontology_types: Ontology types + ontology_types: semantic resource types select_all: Select all cancel: Cancel apply: Apply From 86190b41c063a022b600bef40b03bfa8db0235be Mon Sep 17 00:00:00 2001 From: Syphax Bouazzouni Date: Thu, 30 May 2024 21:00:07 +0200 Subject: [PATCH 08/12] add again ecoportal local text --- app/controllers/home_controller.rb | 2 +- config/locales/en.yml | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 87f9e6e2c..7c7492dbe 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -160,7 +160,7 @@ def feedback_complete; end def annotator_recommender_form if params[:submit_button] == "annotator" - redirect_to "/annotator?text=#{helpers.escape(params[:text])}" + redirect_to "/annotator?text=#{helpers.escape(params[:input])}" elsif params[:submit_button] == "recommender" redirect_to "/recommender?input=#{helpers.escape(params[:input])}" end diff --git a/config/locales/en.yml b/config/locales/en.yml index 5e8e0feb1..ca85a38e6 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -298,10 +298,7 @@ en: score: Score api_documentation: "Annotator API documentation" insert_sample_text: Insert sample text - sample_text: There has been many recent studies on the use of microbial antagonists to control diseases incited by soilborne and airborne plant pathogenic bacteria - and fungi, in an attempt to replace existing methods of chemical control and avoid extensive use of fungicides, which often lead to resistance in plant pathogens. - In agriculture, plant growth-promoting and biocontrol microorganisms have emerged as safe alternatives to chemical pesticides. Streptomyces spp. and their - metabolites may have great potential as excellent agents for controlling various fungal and bacterial phytopathogens. + sample_text: Invasive alien species are plants, animals, pathogens and other organisms that are non-native to an ecosystem, and which may cause economic or environmental harm or adversely affect human health. concepts: error_valid_concept: "Error: You must provide a valid concept id" missing_roots: Missing roots @@ -364,7 +361,7 @@ en: get_annotations: Get annotations get_recommendations: Get recommendations index: - tagline: The home of semantic resources and semantic artefacts in agri-food and related domains. + tagline: The LifeWatch ERIC repository of semantic resources for ecology and related domains title: Welcome to %{site} welcome: Welcome to %{site}, ontology_upload: Do you want to share an semantic resource? From 25be38033a0b6921c9f438704287a12cb6d64c20 Mon Sep 17 00:00:00 2001 From: Syphax Bouazzouni Date: Thu, 30 May 2024 21:20:20 +0200 Subject: [PATCH 09/12] implement again the jobs administration --- app/controllers/admin_controller.rb | 24 +++++--- app/views/admin/index.html.haml | 9 ++- app/views/admin/jobs.html.haml | 86 +++++++++++++++++++++++++++++ config/locales/en.yml | 1 + config/locales/fr.yml | 1 + config/routes.rb | 1 + 6 files changed, 111 insertions(+), 11 deletions(-) create mode 100644 app/views/admin/jobs.html.haml diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 550fcc752..1f1c1b294 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -1,7 +1,7 @@ class AdminController < ApplicationController include TurboHelper, HomeHelper, SparqlHelper layout :determine_layout - before_action :cache_setup + before_action :cache_setup, :check_admin? ADMIN_URL = "#{LinkedData::Client.settings.rest_url}/admin/" ONTOLOGIES_URL = "#{ADMIN_URL}ontologies_report" @@ -12,6 +12,14 @@ class AdminController < ApplicationController ONTOLOGIES_LIST_URL = "#{LinkedData::Client.settings.rest_url}/ontologies/" include DoiRequestAdministration + + def jobs + json = LinkedData::Client::HTTP.get("#{ADMIN_URL}scheduled_jobs", raw: true) + @scheduledJobs = JSON.parse(json, :symbolize_names => true) + + render 'jobs', layout: nil + end + def sparql_endpoint graph = params["named-graph-uri"] apikey = params["apikey"] @@ -41,14 +49,6 @@ def index @users_visits = user_visits_data @page_visits = page_visits_data @ontologies_problems_count = _ontologies_report[:ontologies]&.select{|a,v| v[:problem]}&.size || 0 - - if session[:user].nil? || !session[:user].admin? - redirect_to :controller => 'login', :action => 'index', :redirect => '/admin' - else - json = LinkedData::Client::HTTP.get("#{ADMIN_URL}scheduled_jobs", raw: true) - @scheduledJobs = JSON.parse(json, :symbolize_names => true) - render action: "index" - end end @@ -467,4 +467,10 @@ def page_visits_data end visits_data end + + def check_admin? + if session[:user].nil? || !session[:user].admin? + redirect_to :controller => 'login', :action => 'index', :redirect => '/admin' + end + end end diff --git a/app/views/admin/index.html.haml b/app/views/admin/index.html.haml index 9891c88f0..49c837be3 100644 --- a/app/views/admin/index.html.haml +++ b/app/views/admin/index.html.haml @@ -11,7 +11,10 @@ %div %div.mx-1 - - sections = [t('admin.index.analytics'), t('admin.index.site_administration'),t('admin.index.ontology_administration'), t('admin.index.licensing'), t('admin.index.users'), t('admin.index.metadata_administration'), t('admin.index.groups'), t('admin.index.categories'), t('admin.index.persons_and_organizations'), t('admin.index.sparql'), t('admin.index.search')] + - sections = [t('admin.index.analytics'), t('admin.index.site_administration'),t('admin.index.ontology_administration'), + t('admin.index.licensing'), t('admin.index.users'), t('admin.index.metadata_administration'), t('admin.index.groups'), t('admin.index.categories'), + t('admin.index.persons_and_organizations'),t('admin.index.sparql'), + t('admin.index.search'), 'Process Scheduling'] - selected = params[:section] || sections.first.downcase = render Layout::VerticalTabsComponent.new(header: t('admin.index.administration_console'), titles: sections, selected: selected, url_parameter: 'section') do |t| - t.item_content do @@ -58,4 +61,6 @@ - t.item_content do = sparql_query_container - t.item_content do - = render TurboFrameComponent.new(id: 'search-admin', src: '/admin/search', loading: 'lazy') \ No newline at end of file + = render TurboFrameComponent.new(id: 'search-admin', src: '/admin/search', loading: 'lazy') + - t.item_content do + = render TurboFrameComponent.new(id: 'jobs-admin', src: '/admin/jobs', loading: 'lazy') \ No newline at end of file diff --git a/app/views/admin/jobs.html.haml b/app/views/admin/jobs.html.haml new file mode 100644 index 000000000..44eb2b537 --- /dev/null +++ b/app/views/admin/jobs.html.haml @@ -0,0 +1,86 @@ += turbo_frame_tag('jobs-admin') do + %div{id: "process-scheduling", role: "tabpanel", aria: { labelledby: "process-scheduling-tab" }} + %div.my-5 + %div.mb-2 + The schedule is to be changed by altering the configuration of the module ncbo_cron. This module + must be restarted for the changes to take effect. + %div.mb-5 + %a.btn.btn-outline-secondary.btn-sm.show-scheduler-log + Show log + - @scheduledJobs.each do |job_key, job_descr| + %div.site-admin-page-header + %div.job-title + = job_descr[:title] + - if job_descr[:enabled] + - title = job_descr[:scheduler_type] + ": " + job_descr[:schedule] + %div.job-schedule{title: title, data: {enabled: "true", scheduler_type: job_descr[:scheduler_type], schedule: job_descr[:schedule]}} + = title + - else + %div.job-schedule{data: {enabled: "false"}} + Disabled + %div.site-admin-page-section + %a.btn.btn-outline-secondary.btn-sm.show-scheduler-log{data: {job_name: job_key}} + Show log + :javascript + jQuery("#process-scheduling .job-schedule").each(function () { + renderSchedule(this) + }); + + jQuery(".show-scheduler-log").on("click", function (event) { + let jobName = event.target.dataset.jobName; + if (jobName) { + window.open( + BP_CONFIG.rest_url + "/admin/scheduled_jobs/" + encodeURIComponent(jobName) + "/log?apikey=" + BP_CONFIG.apikey + "&userapikey=" + BP_CONFIG.userapikey, + "_blank"); + } else { + window.open( + BP_CONFIG.rest_url + "/admin/scheduled_jobs/log?apikey=" + BP_CONFIG.apikey + "&userapikey=" + BP_CONFIG.userapikey, + "_blank"); + } + }); + + function renderSchedule(scheduleElement) { + let enabled = scheduleElement.dataset.enabled; + let schedulerType = scheduleElement.dataset.schedulerType; + let schedule = scheduleElement.dataset.schedule; + + if (enabled != "true") + return; + + if (schedule == "") + return; + + let s = ""; + + if (schedulerType == "every") { + let unit = null; + if (schedule.endsWith("m")) { + schedule = schedule.substr(0, schedule.length - 1); + unit = "minute"; + } else if(schedule.endsWith("s")) { + schedule = schedule.substr(0, schedule.length - 1); + unit = "second"; + } + + schedule = schedule.trim(); + + if (schedule.match(/^[1-9]\d*$/)) { // schedule number + if (!unit) { + unit = "second"; // default to unit second + } + s = "Every " + schedule + " " + unit + (Number.parseInt(schedule) != 1 ? "s" : ""); + } else { + s = "Every " + schedule + (unit ? " " + unit : ""); + } + } else { + try { + s = window.cronstrue.toString(schedule); + } catch(e) { + console.log("An error occurred when verbalizing the following cron: " + schedule, e); + } + } + + if (s) { + scheduleElement.textContent = s; + } + } \ No newline at end of file diff --git a/config/locales/en.yml b/config/locales/en.yml index ca85a38e6..a6b4e299e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -145,6 +145,7 @@ en: persons_and_organizations: Persons & Organizations sparql: SPARQL search: Search & Indexation + jobs: Process Scheduling report_generated_on: "Report generated on:" licensed_to: Licensed to appliance_id: Appliance ID diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 8e6b652db..0dfc741a2 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -150,6 +150,7 @@ fr: persons_and_organizations: Personnes et Organisations sparql: SPARQL search: Recherche et Indexation + jobs: Ordonnancement des processus report_generated_on: "Rapport généré le :" licensed_to: Licencié à appliance_id: ID de l'appareil diff --git a/config/routes.rb b/config/routes.rb index ea8595feb..56397a7bc 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -112,6 +112,7 @@ put 'admin/ontologies', to: 'admin#process_ontologies' get 'admin/update_check_enabled', to: 'admin#update_check_enabled' get 'admin/ontologies/:acronym/log', to: 'admin#parse_log' + get 'admin/jobs', to: 'admin#jobs' resources :subscriptions From b7fe4c1fdce1c4a189634ed67e3fd46ffd1a9ba9 Mon Sep 17 00:00:00 2001 From: Syphax Bouazzouni Date: Fri, 31 May 2024 13:50:26 +0200 Subject: [PATCH 10/12] refactor the doi request workflow to integrate it to the new UI --- app/assets/javascripts/application.js | 1 - app/assets/javascripts/bp_admin.js | 120 +++--------------- app/assets/javascripts/metadata_form.js | 0 .../admin/doi_request_controller.rb | 46 +++++++ app/controllers/admin_controller.rb | 20 ++- app/controllers/ajax_proxy_controller.rb | 13 -- app/controllers/concerns/doi_request.rb | 19 ++- .../concerns/doi_request_administration.rb | 14 +- app/controllers/ontologies_controller.rb | 7 + app/controllers/submissions_controller.rb | 6 - app/helpers/admin/doi_request_helper.rb | 15 +++ app/helpers/components_helper.rb | 10 +- .../controllers/doi_request_controller.js | 44 ------- app/javascript/controllers/index.js | 3 - app/services/datacite_creator_service.rb | 2 +- app/views/admin/doi_request.html.haml | 34 +++++ app/views/admin/doi_request/edit.html.haml | 2 + app/views/admin/doi_request/index.html.haml | 2 + app/views/admin/doi_request/show.html.haml | 9 ++ app/views/admin/index.html.haml | 6 +- .../ontologies/sections/_metadata.html.haml | 25 +++- .../_submission_identifier_form.html.haml | 18 --- config/routes.rb | 23 +--- 23 files changed, 194 insertions(+), 245 deletions(-) delete mode 100644 app/assets/javascripts/metadata_form.js create mode 100644 app/controllers/admin/doi_request_controller.rb create mode 100644 app/helpers/admin/doi_request_helper.rb delete mode 100644 app/javascript/controllers/doi_request_controller.js create mode 100644 app/views/admin/doi_request.html.haml create mode 100644 app/views/admin/doi_request/edit.html.haml create mode 100644 app/views/admin/doi_request/index.html.haml create mode 100644 app/views/admin/doi_request/show.html.haml delete mode 100644 app/views/submissions/_submission_identifier_form.html.haml diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 2e6d11c42..3fe97607a 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -19,7 +19,6 @@ //= require bp_admin //= require concepts //= require projects -//= require metadata_form //= require Chart.min //= require application_esbuild diff --git a/app/assets/javascripts/bp_admin.js b/app/assets/javascripts/bp_admin.js index 4e233657b..73b0f3115 100644 --- a/app/assets/javascripts/bp_admin.js +++ b/app/assets/javascripts/bp_admin.js @@ -1,16 +1,4 @@ -/** - * Created by mdorf on 3/27/15. - * Updated by Syphax.Bouazzouni on 28/04/21 , users admin part - */ - -const handlerType = { - ONTOLOGY: 'ONTOLOGY', - DOI_REQUEST: 'DOI_REQUEST' -} - var DUMMY_ONTOLOGY = "DUMMY_ONT"; -var DUMMY_DOI_REQUEST = "DUMMY_DOI_REQUEST" - if (window.BP_CONFIG === undefined) { window.BP_CONFIG = jQuery(document).data().bp.config; } @@ -31,7 +19,6 @@ function parseReportDate(dateStr) { if (dateStr.trim() === "") return ""; var reggie = /^(((0[13578]|1[02])[\/\.-](0[1-9]|[12]\d|3[01])[\/\.-]((19|[2-9]\d)\d{2}),\s(0[0-9]|1[0-2]):(0[0-9]|[1-59]\d)\s(AM|am|PM|pm))|((0[13456789]|1[012])[\/\.-](0[1-9]|[12]\d|30)[\/\.-]((19|[2-9]\d)\d{2}),\s(0[0-9]|1[0-2]):(0[0-9]|[1-59]\d)\s(AM|am|PM|pm))|((02)[\/\.-](0[1-9]|1\d|2[0-8])[\/\.-]((19|[2-9]\d)\d{2}),\s(0[0-9]|1[0-2]):(0[0-9]|[1-59]\d)\s(AM|am|PM|pm))|((02)[\/\.-](29)[\/\.-]((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)),\s(0[0-9]|1[0-2]):(0[0-9]|[1-59]\d)\s(AM|am|PM|pm)))$/g; var dateArr = reggie.exec(dateStr); - if (dateArr !== null) { dateArr = dateArr.filter(function(e){return e}); var hours = Number(dateArr[7]); var ampm = dateArr[9].toUpperCase(); @@ -40,36 +27,22 @@ function parseReportDate(dateStr) { var strHours = hours.toString(); var strMonth = (Number(dateArr[3]) - 1).toString(); var dateObj = new Date(dateArr[5], strMonth, dateArr[4], strHours, dateArr[8], "00", "00"); - } else { - dateObj = new Date(dateStr); - } return dateObj.toLocaleString([], {month: '2-digit', day: '2-digit', year: 'numeric', hour: '2-digit', minute:'2-digit'}); } -var AjaxAction = function(httpMethod, operation, path, isLongOperation, params, _handlerType = handlerType.ONTOLOGY) { +var AjaxAction = function(httpMethod, operation, path, isLongOperation, params) { params = params || {}; this.httpMethod = httpMethod; this.operation = operation; this.path = path; this.isLongOperation = isLongOperation; - - this.handlerType = _handlerType; - if (this.handlerType === handlerType.DOI_REQUEST) { - this.doi_requests = [DUMMY_DOI_REQUEST]; - if (params["doi_requests"]) { - this.doi_requests = params["doi_requests"].split(","); - delete params["doi_requests"]; - } - } else { this.ontologies = [DUMMY_ONTOLOGY]; + this.isProgressMessageEnabled = true; + if (params["ontologies"]) { this.ontologies = params["ontologies"].split(","); delete params["ontologies"]; } - } - - this.isProgressMessageEnabled = true; - this.params = params; this.confirmMsg = "Are you sure?"; }; @@ -97,15 +70,9 @@ AjaxAction.prototype.showProgressMessage = function() { this.clearStatusMessages(); var msg = "Performing " + this.operation; - if (this.handlerType === handlerType.DOI_REQUEST) { - if (this.doi_requests[0] !== DUMMY_ONTOLOGY) { - msg += " for " + this.doi_requests.join(", "); - } - } else { if (this.ontologies[0] !== DUMMY_ONTOLOGY) { msg += " for " + this.ontologies.join(", "); } - } jQuery("#progress_message").text(msg).html(); jQuery("#progress_message").show(); }; @@ -114,21 +81,13 @@ AjaxAction.prototype.showStatusMessages = function(success, errors, notices, isA _showStatusMessages(success, errors, notices, isAppendMode); }; -AjaxAction.prototype.getSelectedItemsForDisplay = function() { +AjaxAction.prototype.getSelectedOntologiesForDisplay = function() { var msg = ''; - if (this.handlerType === handlerType.DOI_REQUEST) { - if (this.doi_requests.length > 0) { - var ontMsg = this.doi_requests.join(", "); - msg = "
    " + ontMsg + "
    "; - } - } else { if (this.ontologies.length > 0) { var ontMsg = this.ontologies.join(", "); msg = "
    " + ontMsg + "
    "; } - } - return msg; }; @@ -145,24 +104,9 @@ AjaxAction.prototype._ajaxCall = function() { } // using javascript closure for passing index to asynchronous calls - var refresh_on_complete = false //if true, then the item list is refreshed after the processing is finished - var items = []; - if (this.handlerType === handlerType.DOI_REQUEST) { - items = self.doi_requests; - refresh_on_complete = true; - } else { - items = self.ontologies; - } - - jQuery.each(items, function(index, item) { - if (self.handlerType === handlerType.DOI_REQUEST) { - if (item != DUMMY_DOI_REQUEST) { - params["doi_requests"] = item; - } - } else { - if (item != DUMMY_ONTOLOGY) { - params["ontologies"] = item; - } + jQuery.each(self.ontologies, function(index, ontology) { + if (ontology != DUMMY_ONTOLOGY) { + params["ontologies"] = ontology; } var deferredObj = jQuery.Deferred(); if (!self.isLongOperation) { @@ -191,7 +135,7 @@ AjaxAction.prototype._ajaxCall = function() { } if (data.success) { - self.onSuccessAction(data, item, deferredObj); + self.onSuccessAction(data, ontology, deferredObj); if (data.success) { var suc = data.success.replace(reg, ','); @@ -213,7 +157,7 @@ AjaxAction.prototype._ajaxCall = function() { }, complete: function(request, textStatus) { if (errorState || !self.isLongOperation) { - self.removeSelectedRow(item); + self.removeSelectedRow(ontology); } } }); @@ -224,51 +168,23 @@ AjaxAction.prototype._ajaxCall = function() { jQuery.when.apply(null, promises).always(function() { jQuery("#progress_message").hide(); jQuery("#progress_message").html(""); - - //if enabled, refresh the items list - if(refresh_on_complete) { - console.log("refresh_on_complete - this.handlerType:", self.handlerType) - if (self.handlerType === handlerType.DOI_REQUEST) { - let doiReqDataTable = jQuery('#adminDOIReq').DataTable(); - console.log("refresh_on_complete: doiReqDataTable = ", doiReqDataTable) - if(doiReqDataTable){ - console.log("refresh_on_complete: doiReqTable.ajax.reload()") - //displayDOIRequest({}, DUMMY_DOI_REQUEST); - doiReqDataTable.ajax.reload(); - } - } - } }); }; -AjaxAction.prototype.removeSelectedRow = function(item) { - if (this.handlerType === handlerType.DOI_REQUEST) { - if (item != DUMMY_DOI_REQUEST) { - var jQueryRow = jQuery("#tr_" + item); +AjaxAction.prototype.removeSelectedRow = function(ontology) { + if (ontology != DUMMY_ONTOLOGY) { + var jQueryRow = jQuery("#tr_" + ontology); jQueryRow.removeClass('selected'); } - } else { - if (item != DUMMY_ONTOLOGY) { - var jQueryRow = jQuery("#tr_" + item); - jQueryRow.removeClass('selected'); - } - } }; AjaxAction.prototype.ajaxCall = function() { var self = this; - if (this.handlerType === handlerType.DOI_REQUEST) { - if (self.doi_requests.length === 0) { - alertify.alert("Please select at least one request from the table to perform action on.
    To select/de-select requests, simply click anywhere in the request row."); - return; - } - } else { if (self.ontologies.length === 0) { alertify.alert("Please select at least one ontology from the table to perform action on.
    To select/de-select ontologies, simply click anywhere in the ontology row."); return; } - } if (self.confirmMsg) { alertify.confirm(self.confirmMsg, function(e) { @@ -397,7 +313,7 @@ function RefreshReport() { this.setSelectedOntologies(); if (this.ontologies.length > 0) { - msg = "Ready to refresh report for ontologies:" + this.getSelectedItemsForDisplay() + "Proceed?"; + msg = "Ready to refresh report for ontologies:" + this.getSelectedOntologiesForDisplay() + "Proceed?"; } else { this.ontologies = [DUMMY_ONTOLOGY]; } @@ -418,7 +334,7 @@ RefreshReport.act = function() { function DeleteOntologies() { AjaxAction.call(this, "DELETE", "ONTOLOGY DELETION", "ontologies", false); this.setSelectedOntologies(); - this.setConfirmMsg("You are about to delete the following ontologies:" + this.getSelectedItemsForDisplay() + "This action CAN NOT be undone!!! Are you sure?"); + this.setConfirmMsg("You are about to delete the following ontologies:" + this.getSelectedOntologiesForDisplay() + "This action CAN NOT be undone!!! Are you sure?"); } DeleteOntologies.prototype = Object.create(AjaxAction.prototype); @@ -443,7 +359,7 @@ function ProcessOntologies(action) { }; AjaxAction.call(this, "PUT", actions[action], "ontologies", false, {actions: action}); this.setSelectedOntologies(); - this.setConfirmMsg("You are about to perform " + actions[action] + " on the following ontologies:" + this.getSelectedItemsForDisplay() + "The ontologies will be added to the queue and processed on the next cron job execution.
    Should I proceed?"); + this.setConfirmMsg("You are about to perform " + actions[action] + " on the following ontologies:" + this.getSelectedOntologiesForDisplay() + "The ontologies will be added to the queue and processed on the next cron job execution.
    Should I proceed?"); } ProcessOntologies.prototype = Object.create(AjaxAction.prototype); @@ -741,8 +657,8 @@ jQuery(".admin.index").ready(function() { // onclick action for "Refresh Report" button jQuery("#refresh_report_action").click(function() { - RefreshReport.act(); - }); + RefreshReport.act(); + }); @@ -753,4 +669,4 @@ jQuery(".admin.index").ready(function() { //============================================================== // MANAGEMENT COMMONS //============================================================== -}); +}); \ No newline at end of file diff --git a/app/assets/javascripts/metadata_form.js b/app/assets/javascripts/metadata_form.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/app/controllers/admin/doi_request_controller.rb b/app/controllers/admin/doi_request_controller.rb new file mode 100644 index 000000000..93e3d1601 --- /dev/null +++ b/app/controllers/admin/doi_request_controller.rb @@ -0,0 +1,46 @@ +class Admin::DoiRequestController < ApplicationController + + include DoiRequest, TurboHelper + + def index + end + + def show + @ontology = LinkedData::Client::Models::Ontology.get(params[:ontology_id]) rescue nil + + ontology_not_found(params[:ontology_id]) unless @ontology + + @submission = @ontology.explore.latest_submission + + @identifier_request = first_pending_doi_request + end + + def create + @ontology = LinkedData::Client::Models::Ontology.get(params[:ontology_id]) rescue nil + + ontology_not_found(params[:ontology_id]) unless @ontology + + @submission = @ontology.explore.latest_submission + + ontology_not_found(params[:ontology_id]) unless @submission + + @identifier_request = submit_new_doi_request(@submission.id) + + if response_error?(@identifier_request) + render_turbo_stream alert_error(id: "#{@ontology.acronym}_doi_request") { "An error occurred while creating the DOI request" } + else + render_turbo_stream replace("#{@ontology.acronym}_doi_request") { render_to_string('admin/doi_request/show', layout: nil) } + end + end + + def update + @ontology = LinkedData::Client::Models::Ontology.get(params[:ontology_id]) rescue nil + + ontology_not_found(params[:ontology_id]) unless @ontology + + cancel_pending_doi_requests + + render_turbo_stream replace("#{@ontology.acronym}_doi_request") { render_to_string('admin/doi_request/show', layout: nil) } + end + +end diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 1f1c1b294..96fb1a50d 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -286,19 +286,29 @@ def delete_submission end - def doi_requests_list - render json: doi_requests + @doi_requests = doi_requests[:doi_requests] + render 'doi_request', layout: nil end def process_doi_requests - response = { errors: '', success: '' } + response = { errors: nil, success: nil } if params['actions'].nil? || params['actions'].empty? response[:errors] = "No operation 'actions' was specified in params for request processing" - render :json => response else - process_identifier_requests('processed', 'processing', params['actions']) + response = process_identifier_requests('processed', 'processing', params['actions']) end + + if !response[:errors].blank? + render_turbo_stream alert_error(id: alerts_container_id) { response[:errors] } + else + render_turbo_stream( + alert_success(id: alerts_container_id) { response[:success] }, + replace("#{params['doi_requests']}_status") { params['actions'].eql?('reject') ? 'REJECTED' : 'SATISFIED'}, + remove("#{params['doi_requests']}_actions") + ) + end + end private diff --git a/app/controllers/ajax_proxy_controller.rb b/app/controllers/ajax_proxy_controller.rb index 6e89b0d08..7c8e2d00b 100644 --- a/app/controllers/ajax_proxy_controller.rb +++ b/app/controllers/ajax_proxy_controller.rb @@ -55,19 +55,6 @@ def json_class render_json @concept.to_json end - - def cancelIdentifierRequest - request_id = params["requestId"] - render_json '{ "error": "You must provide the request id!" }', {status: 400} if request_id.nil? - doi_request = LinkedData::Client::Models::IdentifierRequest.find_by_requestId(request_id).first - - error_doi_request = doi_request.update(values: {status: 'CANCELED', processedBy: session[:user].id, processingDate: DateTime.now.to_s }) - if response_error?(error_doi_request) - render_json '{ "error": "Some errors has occurred!" }', {status: 500} - else - render_json '{ "success": "The request has been canceled" }', {status: 200} - end - end def json_ontology @ontology = LinkedData::Client::Models::Ontology.find_by_acronym(params[:ontology]).first diff --git a/app/controllers/concerns/doi_request.rb b/app/controllers/concerns/doi_request.rb index c1952e2c6..85fb50860 100644 --- a/app/controllers/concerns/doi_request.rb +++ b/app/controllers/concerns/doi_request.rb @@ -10,28 +10,27 @@ def first_pending_doi_request def cancel_pending_doi_requests identifier_request_list = @ontology.explore.identifier_requests - identifier_request = identifier_request_list.select { |r| r.status == "PENDING" }.first + identifier_requests = identifier_request_list.select { |r| r.status == "PENDING" } - return if identifier_request.nil? + return if identifier_requests.empty? - identifier_request.status = "CANCELED" - identifier_request.update - end + identifier_requests.each do |identifier_request| + identifier_request.update(values: { status: "CANCELED"}) + end - def doi_requested? - params[:submission][:is_doi_requested] end - def submit_new_doi_request + + def submit_new_doi_request(submission_id) request_id_hash = { status: "PENDING", requestType: "DOI_CREATE", requestedBy: session[:user].username, requestDate: DateTime.now.to_s, - submission: @submission.id + submission: submission_id } @identifier_req_obj = LinkedData::Client::Models::IdentifierRequest.new(values: request_id_hash) - @identifier_req_obj_saved = @identifier_req_obj.save + @identifier_req_obj.save end end diff --git a/app/controllers/concerns/doi_request_administration.rb b/app/controllers/concerns/doi_request_administration.rb index 2e6e6439a..8bffd6b0a 100644 --- a/app/controllers/concerns/doi_request_administration.rb +++ b/app/controllers/concerns/doi_request_administration.rb @@ -7,8 +7,6 @@ module DoiRequestAdministration DOI_REQUESTS_URL = "#{AdminController::ADMIN_URL}doi_requests_list" end - - def doi_requests response = { doi_requests: Hash.new, errors: '', success: '' } start = Time.now @@ -39,12 +37,10 @@ def process_identifier_requests(success_keyword, error_keyword, action) doi_requests = params['doi_requests'].split(',').map { |o| o.strip } doi_requests.each do |request_id| begin - doi_request = LinkedData::Client::Models::IdentifierRequest.find_by_requestId(request_id).first + doi_request = LinkedData::Client::Models::IdentifierRequest.find(request_id) if doi_request if doi_request.status.upcase == 'PENDING' # Get ontology submission information - - error_response = nil case action when 'process' @@ -75,13 +71,13 @@ def process_identifier_requests(success_keyword, error_keyword, action) response[:success] = response[:success][0...-2] unless response[:success].empty? response[:errors] = response[:errors][0...-2] unless response[:errors].empty? end - render json: response + response end private def process_doi(doi_request) - doi_req_submission = LinkedData::Client::Models::OntologySubmission.find(doi_request.submission.id, include: 'all') + doi_req_submission = doi_request.submission ont_submission_id = doi_req_submission.submissionId hash_metadata = data_cite_metadata_json(doi_req_submission.ontology, ont_submission_id) if doi_request.requestType == 'DOI_CREATE' @@ -93,12 +89,12 @@ def process_doi(doi_request) def data_cite_metadata_json( ontology, ont_submission_id) ontology_acronym = ontology.acronym - ontology_name = ontology.name sub_metadata_url = SUB_DATA_CITE_METADATA_URL.call(ontology_acronym, ont_submission_id) hash_metadata = LinkedData::Client::HTTP.get(sub_metadata_url, {}, raw: true) json = JSON.parse(hash_metadata, symbolize_names: true) - json[:title] = ontology_name + json[:titles].each {|t| t.delete(:titleType) if t[:titleType].blank? } + #json[:title] = ontology_name json[:url] = json[:url] || (helpers.ontologies_url + '/' +ontology_acronym) json end diff --git a/app/controllers/ontologies_controller.rb b/app/controllers/ontologies_controller.rb index caec35f99..ed5ccf93d 100644 --- a/app/controllers/ontologies_controller.rb +++ b/app/controllers/ontologies_controller.rb @@ -343,7 +343,14 @@ def summary @content_properties = properties_hash_values(category_attributes["content"]) @community_properties = properties_hash_values(category_attributes["community"] + [:notes]) @identifiers = properties_hash_values([:URI, :versionIRI, :identifier]) + + @doi = @identifiers["identifier"].first.select{|x| x['doi.org']}.first + @identifiers["identifier"].first.reject!{|x| x['doi.org']} + @identifiers.delete("identifier") if @identifiers["identifier"].first.blank? + @identifiers["ontology_portal_uri"] = ["#{$UI_URL}/ontologies/#{@ontology.acronym}", "#{portal_name} URI"] + + @projects_properties = properties_hash_values(category_attributes["usage"]) @ontology_icon_links = [%w[summary/download dataDump], %w[summary/homepage homepage], diff --git a/app/controllers/submissions_controller.rb b/app/controllers/submissions_controller.rb index d08a99055..6dfeaac8c 100644 --- a/app/controllers/submissions_controller.rb +++ b/app/controllers/submissions_controller.rb @@ -1,6 +1,5 @@ class SubmissionsController < ApplicationController include SubmissionsHelper, SubmissionUpdater, OntologyUpdater - include DoiRequest layout :determine_layout before_action :authorize_and_redirect, :only => [:edit, :update, :create, :new] before_action :submission_metadata, only: [:create, :edit, :new, :update, :index] @@ -25,7 +24,6 @@ def index def new @ontology = LinkedData::Client::Models::Ontology.find_by_acronym(params[:ontology_id]).first @submission = @ontology.explore.latest_submission || LinkedData::Client::Models::OntologySubmission.new - @identifier_request = first_pending_doi_request @submission.id = nil @categories = LinkedData::Client::Models::Category.all @groups = LinkedData::Client::Models::Group.all @@ -53,8 +51,6 @@ def create if response_error?(@submission) show_new_errors(@submission) else - cancel_pending_doi_requests - submit_new_doi_request if doi_requested? redirect_to "/ontologies/success/#{@ontology.acronym}" end end @@ -63,7 +59,6 @@ def create def edit_properties display_submission_attributes params[:ontology_id], params[:properties]&.split(','), submissionId: params[:submission_id], inline_save: params[:inline_save]&.eql?('true') - @identifier_request = first_pending_doi_request attribute_template_output = render_to_string(inline: helpers.render_submission_inputs(params[:container_id] || 'metadata_by_ontology', @submission)) @@ -120,7 +115,6 @@ def update @submission.submissionId = submission_id reset_agent_attributes render_submission_attribute(params[:attribute]) - submit_new_doi_request if doi_requested? end end diff --git a/app/helpers/admin/doi_request_helper.rb b/app/helpers/admin/doi_request_helper.rb new file mode 100644 index 000000000..3c7aa8275 --- /dev/null +++ b/app/helpers/admin/doi_request_helper.rb @@ -0,0 +1,15 @@ +module Admin::DoiRequestHelper + + def doi_request_button(ontology_id) + return if ontology_id.nil? + + action_button("Ask for a DOI?", "/admin/doi_requests/#{ontology_id}/create") + end + + def cancel_doi_request_button(ontology_id) + return if ontology_id.nil? + + action_button("Cancel?", "/admin/doi_requests/#{ontology_id}/cancel") + end + +end diff --git a/app/helpers/components_helper.rb b/app/helpers/components_helper.rb index 03eef072c..d1126e2d1 100644 --- a/app/helpers/components_helper.rb +++ b/app/helpers/components_helper.rb @@ -206,16 +206,10 @@ def list_container(values, &block) end end - def properties_card(title, tooltip, properties, &block) + def properties_card(title, tooltip, &block) render Layout::CardComponent.new do |d| d.header(text: title, tooltip: tooltip) - render(Layout::ListComponent.new) do |c| - if properties - properties_list_component(c, properties, &block) - else - capture(c, &block) - end - end + capture(&block) end end diff --git a/app/javascript/controllers/doi_request_controller.js b/app/javascript/controllers/doi_request_controller.js deleted file mode 100644 index e7aa80f87..000000000 --- a/app/javascript/controllers/doi_request_controller.js +++ /dev/null @@ -1,44 +0,0 @@ -import {Controller} from "@hotwired/stimulus" - -// Connects to data-controller="doi-request" -export default class extends Controller { - connect() { - } - - cancel() { - let resp_Yes = confirm("Do you want to cancel the DOI request?") - if (resp_Yes) { - let btn_cancel_selector = $(".btn_cancel_request") - let req_id = btn_cancel_selector[0].id.split("-")[1] - if (req_id) { - //ajax call to cancel the request - let URL = '/ajax/cancelIdentifierRequest' - jQuery.ajax({ - type: "POST", - url: URL, - data: { - requestId: req_id, - status: "CANCELED" - }, - dataType: "json", - success: function (data) { - alert("The request was canceled!"); - let html_identifier = ` -
    -
    - - -
    -
    `; - $("#identifier_fields_col").html(html_identifier) - }, - error: function (data) { - alert("An Error has occurred. The request cannot be canceled"); - } - }); - } else { - alert("WARNING! The request ID is not defined. The request cannot be canceled") - } - } - } -} diff --git a/app/javascript/controllers/index.js b/app/javascript/controllers/index.js index 40646193f..e490eb3a1 100644 --- a/app/javascript/controllers/index.js +++ b/app/javascript/controllers/index.js @@ -16,9 +16,6 @@ application.register("class-search-auto-complete", ClassSearchAutoCompleteContro import ContainerSplitterController from "./container_splitter_controller" application.register("container-splitter", ContainerSplitterController) -import DoiRequestController from "./doi_request_controller" -application.register("doi-request", DoiRequestController) - import FairScoreHomeController from "./fair_score_home_controller" application.register("fair-score-home", FairScoreHomeController) diff --git a/app/services/datacite_creator_service.rb b/app/services/datacite_creator_service.rb index 37c50ab32..b51fbe207 100644 --- a/app/services/datacite_creator_service.rb +++ b/app/services/datacite_creator_service.rb @@ -43,7 +43,7 @@ def create_new_doi_from_data_cite(json_metadata) response = http.request(request) json_response = response.read_body - + binding.pry # convert response as json if response is a string containing a json json_response = JSON.parse(json_response) if json_response.is_a?(String) && json_response.start_with?('{') json_response diff --git a/app/views/admin/doi_request.html.haml b/app/views/admin/doi_request.html.haml new file mode 100644 index 000000000..7c2918a66 --- /dev/null +++ b/app/views/admin/doi_request.html.haml @@ -0,0 +1,34 @@ += turbo_frame_tag('doi-request-admin') do + %div.my-1.border-radius-0 + = render_alerts_container + = render TableComponent.new(id: 'doi_request', custom_class: 'border rounded p-1', searching: true, paging:true, sort_column: '4') do |t| + - t.header do |h| + - h.th {'REQUEST ID'} + - h.th {'USER'} + - h.th {'ONTOLOGY'} + - h.th {'SUBMISSION'} + - h.th {'DATE CREATED'} + - h.th {'TYPE'} + - h.th {'STATUS'} + - h.th {t('admin.categories.index.actions')} + + - @doi_requests&.each do |request| + - t.row do |r| + - r.td { request[:requestId] } + - r.td { request[:requestedBy] ? "#{request[:requestedBy][:username]} (#{request[:requestedBy][:email]})" : 'Removed user' } + - r.td { request[:ontology] ? link_to(request[:ontology], ontology_path(id: request[:ontology]), data: {turbo: false}) : 'Ontology removed' } + - r.td { request[:submissionId]&.to_s || '0' } + - r.td { DateTime.parse(request[:requestDate]).to_s } + - r.td { request[:requestType] } + - r.td do + = turbo_frame_tag "#{request[:requestId]}_status" do + = request[:status] + - r.td do + = turbo_frame_tag "#{request[:requestId]}_actions" do + - if request[:status].eql?('PENDING') + %div.d-flex + %span + = link_to 'Process', admin_doi_requests_path(actions: 'process', doi_requests: request[:requestId]) , class: 'btn btn-link', data: { turbo: true, turbo_frame: '_top'} + %span + = link_to 'Reject', admin_doi_requests_path(actions: 'reject', doi_requests: request[:requestId]), class: 'btn btn-link', data: { turbo: true, turbo_frame: '_top'} + diff --git a/app/views/admin/doi_request/edit.html.haml b/app/views/admin/doi_request/edit.html.haml new file mode 100644 index 000000000..d7b9d9347 --- /dev/null +++ b/app/views/admin/doi_request/edit.html.haml @@ -0,0 +1,2 @@ +%h1 Admin::DoiRequest#update +%p Find me in app/views/admin/doi_request/update.html.haml diff --git a/app/views/admin/doi_request/index.html.haml b/app/views/admin/doi_request/index.html.haml new file mode 100644 index 000000000..3a86a38d9 --- /dev/null +++ b/app/views/admin/doi_request/index.html.haml @@ -0,0 +1,2 @@ +%h1 Admin::DoiRequest#index +%p Find me in app/views/admin/doi_request/index.html.haml diff --git a/app/views/admin/doi_request/show.html.haml b/app/views/admin/doi_request/show.html.haml new file mode 100644 index 000000000..4e8e78917 --- /dev/null +++ b/app/views/admin/doi_request/show.html.haml @@ -0,0 +1,9 @@ += turbo_frame_tag "#{@ontology.acronym}_doi_request" do + - if @identifier_request + %div.d-flex.align-items-center + %span + A DOI was requested, waiting for admin approval, + %span + = cancel_doi_request_button(@ontology.acronym) + - else + = doi_request_button(@ontology.acronym) \ No newline at end of file diff --git a/app/views/admin/index.html.haml b/app/views/admin/index.html.haml index 49c837be3..123c6d3b6 100644 --- a/app/views/admin/index.html.haml +++ b/app/views/admin/index.html.haml @@ -14,7 +14,7 @@ - sections = [t('admin.index.analytics'), t('admin.index.site_administration'),t('admin.index.ontology_administration'), t('admin.index.licensing'), t('admin.index.users'), t('admin.index.metadata_administration'), t('admin.index.groups'), t('admin.index.categories'), t('admin.index.persons_and_organizations'),t('admin.index.sparql'), - t('admin.index.search'), 'Process Scheduling'] + t('admin.index.search'), t('admin.index.jobs'), 'DOI Requests'] - selected = params[:section] || sections.first.downcase = render Layout::VerticalTabsComponent.new(header: t('admin.index.administration_console'), titles: sections, selected: selected, url_parameter: 'section') do |t| - t.item_content do @@ -63,4 +63,6 @@ - t.item_content do = render TurboFrameComponent.new(id: 'search-admin', src: '/admin/search', loading: 'lazy') - t.item_content do - = render TurboFrameComponent.new(id: 'jobs-admin', src: '/admin/jobs', loading: 'lazy') \ No newline at end of file + = render TurboFrameComponent.new(id: 'jobs-admin', src: '/admin/jobs', loading: 'lazy') + - t.item_content do + = render TurboFrameComponent.new(id: 'doi-request-admin', src: '/admin/doi_requests_list', loading: 'lazy') \ No newline at end of file diff --git a/app/views/ontologies/sections/_metadata.html.haml b/app/views/ontologies/sections/_metadata.html.haml index 9dd1a07df..b61885e61 100755 --- a/app/views/ontologies/sections/_metadata.html.haml +++ b/app/views/ontologies/sections/_metadata.html.haml @@ -9,10 +9,25 @@ = render partial: 'ontologies/sections/metadata/ontology_metrics_section' .summary-page-second-row = ontology_depiction_card - = properties_card(t('ontologies.sections.identifiers'),t("ontologies.sections.identifiers"), @identifiers) do |values| - = horizontal_list_container(values) do |v| - - generate_htaccess = v.eql?(@identifiers["ontology_portal_uri"]&.first) - = render LinkFieldComponent.new(value: v, acronym: @ontology.acronym, raw: true, check_resolvability: true, generate_link: false, generate_htaccess: generate_htaccess) + = properties_card(t('ontologies.sections.identifiers'),t("ontologies.sections.identifiers")) do + = render Layout::ListComponent.new do |c| + - properties_list_component(c, @identifiers) do |values| + = horizontal_list_container(values) do |v| + - generate_htaccess = v.eql?(@identifiers["ontology_portal_uri"]&.first) + = render LinkFieldComponent.new(value: v, acronym: @ontology.acronym, raw: true, check_resolvability: true, generate_link: false, generate_htaccess: generate_htaccess) + - c.row do + - if @ontology.admin?(session[:user]) || !@doi.blank? + = render FieldContainerComponent.new(label: 'DOI') do + - if @doi + = render LinkFieldComponent.new(value: @doi) + - else + = render TurboFrameComponent.new(id: "#{@ontology.acronym}_doi_request", src: "/admin/doi_requests/#{@ontology.acronym}") do |t| + - t.loader do + %div.d-flex.align-items-center.w-100.justify-content-start + %span.mr-1 + Search for a DOI request + %span + = render LoaderComponent.new(small: true) = properties_dropdown('dates',t("ontologies.sections.dates"),'', @dates_properties) do |values| - Array(values).sort.map do |v| @@ -22,7 +37,7 @@ = properties_dropdown('person_and_organization',t("ontologies.sections.person_and_organization"),'', @agents_properties) do |values| = horizontal_list_container(values) do |v| = agent_chip_component(v) - + = properties_dropdown('link',t("ontologies.sections.other_links"), t("ontologies.sections.info_tooltip_links") , @links_properties) do |values| = horizontal_list_container(values) do |v| = render LinkFieldComponent.new(value: v, raw: true) diff --git a/app/views/submissions/_submission_identifier_form.html.haml b/app/views/submissions/_submission_identifier_form.html.haml deleted file mode 100644 index 1a0d5451b..000000000 --- a/app/views/submissions/_submission_identifier_form.html.haml +++ /dev/null @@ -1,18 +0,0 @@ -= form_group_attribute("identifier", required: true) do - %div - Insert the Persistent Identifier - DOI or other - of your semantic asset - %div.mt-4{id: "identifier_fields_col"} - - if @identifier_request && @identifier_request.status == "PENDING" - .d-flex - .col-sm-8.sub-label - %p - You have a new DOI pending request for this semantic resource. You can cancel this request before it is processed. - .col-sm-4.sub-label{data:{controller: 'doi-request'}} - %button.btn.btn-primary.btn-sm.btn_cancel_request{id: "btn_cancel_request-#{@identifier_request.requestId}", access: "false", type: "button", 'data-action': 'doi-request#cancel'} - Cancel Request - - else - #div-cb-require-doi.form-check - %input#doi_request.form-check-input{name: "submission[is_doi_requested]", type: "checkbox", checked: @submission.is_doi_requested}/ - %label.form-check-label{for: "doi_request"} Check this box if your asset has no PID and you want to request a DOI - - diff --git a/config/routes.rb b/config/routes.rb index 56397a7bc..ed88d64ea 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -99,6 +99,9 @@ get ':collection/data', to: 'search#search' end + get 'doi_requests/:ontology_id', to: 'doi_request#show' + post 'doi_requests/:ontology_id/create', to: 'doi_request#create' + post 'doi_requests/:ontology_id/cancel', to: 'doi_request#update' end post 'admin/clearcache', to: 'admin#clearcache' @@ -113,6 +116,8 @@ get 'admin/update_check_enabled', to: 'admin#update_check_enabled' get 'admin/ontologies/:acronym/log', to: 'admin#parse_log' get 'admin/jobs', to: 'admin#jobs' + get '/admin/doi_requests_list' => 'admin#doi_requests_list' + match '/admin/doi_requests' => 'admin#process_doi_requests', via: [:put, :get] resources :subscriptions @@ -210,7 +215,6 @@ get 'ajax/label_xl/label', to: "label_xl#show_label" get 'ajax/label_xl', to: "label_xl#show" get '/ajax/biomixer' => 'concepts#biomixer' - match '/ajax/cancelIdentifierRequest' => 'ajax_proxy#cancelIdentifierRequest', via: :post get '/ajax/fair_score/html' => 'fair_score#details_html' get '/ajax/submission/show_licenses/:id' => 'ontologies#show_licenses' get '/ajax/fair_score/json' => 'fair_score#details_json' @@ -229,23 +233,6 @@ get 'check_resolvability' => 'check_resolvability#index' get 'check_url_resolvability' => 'check_resolvability#check_resolvability' - # Admin - match '/admin/clearcache' => 'admin#clearcache', via: [:post] - match '/admin/resetcache' => 'admin#resetcache', via: [:post] - match '/admin/clear_goo_cache' => 'admin#clear_goo_cache', via: [:post] - match '/admin/clear_http_cache' => 'admin#clear_http_cache', via: [:post] - match '/admin/ontologies_report' => 'admin#ontologies_report', via: [:get] - match '/admin/refresh_ontologies_report' => 'admin#refresh_ontologies_report', via: [:post] - match '/admin/ontologies' => 'admin#delete_ontologies', via: [:delete] - match '/admin/ontologies' => 'admin#process_ontologies', via: [:put] - match '/admin/ontologies/:acronym/submissions/:id' => 'admin#delete_submission', via: [:delete] - match '/admin/ontologies/:acronym/submissions' => 'admin#submissions', via: [:get] - match '/admin/ontologies/:acronym/log' => 'admin#parse_log', via: [:get] - match '/admin/update_info' => 'admin#update_info', via: [:get] - match '/admin/update_check_enabled' => 'admin#update_check_enabled', via: [:get] - match '/admin/users' => 'admin#users', via: [:get] - match '/admin/doi_requests_list' => 'admin#doi_requests_list', via: [:get] - match '/admin/doi_requests' => 'admin#process_doi_requests', via: [:put] # Ontolobridge # post '/ontolobridge/:save_new_term_instructions' => 'ontolobridge#save_new_term_instructions' From e6528ed2aca42a470f46f32be3b74ca3166b96ed Mon Sep 17 00:00:00 2001 From: Syphax Bouazzouni Date: Fri, 31 May 2024 14:02:34 +0200 Subject: [PATCH 11/12] add again the share on socials buttons --- app/assets/stylesheets/themes/lirmm/landscape.scss | 4 ---- .../metadata/_ontology_description_section.html.haml | 12 +++++++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/themes/lirmm/landscape.scss b/app/assets/stylesheets/themes/lirmm/landscape.scss index 4d927b256..a46c67b75 100644 --- a/app/assets/stylesheets/themes/lirmm/landscape.scss +++ b/app/assets/stylesheets/themes/lirmm/landscape.scss @@ -9,10 +9,6 @@ margin-bottom: -2em; } -hr { - width: 50%; - margin: 40px 0px; -} #chartTooltip { position: absolute; diff --git a/app/views/ontologies/sections/metadata/_ontology_description_section.html.haml b/app/views/ontologies/sections/metadata/_ontology_description_section.html.haml index dc0c5221f..e4d4338dc 100644 --- a/app/views/ontologies/sections/metadata/_ontology_description_section.html.haml +++ b/app/views/ontologies/sections/metadata/_ontology_description_section.html.haml @@ -63,7 +63,17 @@ = horizontal_list_container([@submission_latest&.pullLocation]) do |v| %span.admin-background = render LinkFieldComponent.new(value: v) - %hr.w-100.my-3 + - l.row do + %section.ont-metadata-card.ont-socialshare-card + %div.ont-section-toolbar + %span.pb-2 Share on socials + = social_share_link(@ontology, "Facebook") + = social_share_link(@ontology, "Twitter") + = social_share_link(@ontology, "LinkedIn") + :javascript + window.Sharer.init() + %div + %hr.w-100.mb-3.mt-0 .icons_container = ontology_icon_links(@ontology_icon_links, @submission_latest) %hr.w-100.my-3 From b64c0c8fe3aa6069e06446819e85f64505953623 Mon Sep 17 00:00:00 2001 From: Syphax Bouazzouni Date: Fri, 31 May 2024 14:25:09 +0200 Subject: [PATCH 12/12] add again the datacite exporter in summary page --- app/controllers/metadata_export_controller.rb | 4 ++++ app/services/datacite_creator_service.rb | 1 - app/views/admin/doi_request/edit.html.haml | 2 -- app/views/admin/doi_request/index.html.haml | 2 -- .../metadata_export/datacite_export.html.haml | 18 ++++++++++++++++++ .../_ontology_description_section.html.haml | 11 ++++++++--- config/routes.rb | 1 + 7 files changed, 31 insertions(+), 8 deletions(-) delete mode 100644 app/views/admin/doi_request/edit.html.haml delete mode 100644 app/views/admin/doi_request/index.html.haml create mode 100644 app/views/metadata_export/datacite_export.html.haml diff --git a/app/controllers/metadata_export_controller.rb b/app/controllers/metadata_export_controller.rb index 46a56cc2c..527531726 100644 --- a/app/controllers/metadata_export_controller.rb +++ b/app/controllers/metadata_export_controller.rb @@ -29,4 +29,8 @@ def index @ontology_metadata[attr] = value end end + + def datacite_export + @ontology_metadata = LinkedData::Client::HTTP.get( "#{rest_url}/ontologies/#{params[:ontology]}/latest_submission/datacite_metadata_json?display_links=false&display_context=false", {}, raw: true) + end end diff --git a/app/services/datacite_creator_service.rb b/app/services/datacite_creator_service.rb index b51fbe207..e7331a8c5 100644 --- a/app/services/datacite_creator_service.rb +++ b/app/services/datacite_creator_service.rb @@ -43,7 +43,6 @@ def create_new_doi_from_data_cite(json_metadata) response = http.request(request) json_response = response.read_body - binding.pry # convert response as json if response is a string containing a json json_response = JSON.parse(json_response) if json_response.is_a?(String) && json_response.start_with?('{') json_response diff --git a/app/views/admin/doi_request/edit.html.haml b/app/views/admin/doi_request/edit.html.haml deleted file mode 100644 index d7b9d9347..000000000 --- a/app/views/admin/doi_request/edit.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -%h1 Admin::DoiRequest#update -%p Find me in app/views/admin/doi_request/update.html.haml diff --git a/app/views/admin/doi_request/index.html.haml b/app/views/admin/doi_request/index.html.haml deleted file mode 100644 index 3a86a38d9..000000000 --- a/app/views/admin/doi_request/index.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -%h1 Admin::DoiRequest#index -%p Find me in app/views/admin/doi_request/index.html.haml diff --git a/app/views/metadata_export/datacite_export.html.haml b/app/views/metadata_export/datacite_export.html.haml new file mode 100644 index 000000000..2bbe37c44 --- /dev/null +++ b/app/views/metadata_export/datacite_export.html.haml @@ -0,0 +1,18 @@ += render_in_modal do + = render TabsContainerComponent.new(id: 'metadata-export', type: 'pill') do |t| + - t.item(id: 'json', title: 'JSON', selected: true) + - %w[json].each do |format| + - t.item_content do + %div.metadata-exporter{data: {controller: 'rdf-highlighter', 'rdf-highlighter-format-value': format}} + - if format.eql?('csv') + %div{data: {'rdf-highlighter-target': 'content'}} + = render partial: 'ontologies/sections/additional_metadata' + %div.d-none{data: {'rdf-highlighter-target': 'loader'}} + = render LoaderComponent.new + - else + %div.p-3.my-2.card + %pre + %code.d-block{style: 'text-wrap: pretty; word-break: break-all', data: {'rdf-highlighter-target': 'content'}} + = @ontology_metadata + %div.d-none{data: {'rdf-highlighter-target': 'loader'}} + = render LoaderComponent.new \ No newline at end of file diff --git a/app/views/ontologies/sections/metadata/_ontology_description_section.html.haml b/app/views/ontologies/sections/metadata/_ontology_description_section.html.haml index e4d4338dc..1a07c7588 100644 --- a/app/views/ontologies/sections/metadata/_ontology_description_section.html.haml +++ b/app/views/ontologies/sections/metadata/_ontology_description_section.html.haml @@ -77,7 +77,12 @@ .icons_container = ontology_icon_links(@ontology_icon_links, @submission_latest) %hr.w-100.my-3 - %div.text-center.pb-3 - = link_to_modal(nil, metadata_export_index_path(ontology: @ontology.acronym), {data: {show_modal_title_value: metadata_filled_count, show_modal_size_value: 'modal-xl' }}) do - = t("ontologies.sections.metadata.export_metadata") + %div.pb-3.d-flex + %div.text-center.w-50 + = link_to_modal(nil, metadata_export_index_path(ontology: @ontology.acronym), {data: {show_modal_title_value: metadata_filled_count, show_modal_size_value: 'modal-xl' }}) do + = t("ontologies.sections.metadata.export_metadata") + %div.border + %div.text-center.w-50 + = link_to_modal(nil, metadata_export_datacite_export_path(ontology: @ontology.acronym), {data: {show_modal_title_value: "DataCite metadata", show_modal_size_value: 'modal-xl' }}) do + Export to DataCite diff --git a/config/routes.rb b/config/routes.rb index ed88d64ea..de59b5874 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -7,6 +7,7 @@ get 'auth/:provider/callback', to: 'login#create_omniauth' get 'locale/:language', to: 'language#set_locale_language' get 'metadata_export/index' + get 'metadata_export/datacite_export' get '/notes/new_comment', to: 'notes#new_comment' get '/notes/new_proposal', to: 'notes#new_proposal'