Skip to content

Commit e7b32e3

Browse files
authored
Merge branch 'master' into feature/rdnl_scraper
2 parents 2915c3d + 344c18d commit e7b32e3

21 files changed

Lines changed: 333 additions & 47 deletions

app/controllers/collaborations_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def get_resource
3838
if name.end_with?('_id')
3939
c = name.chomp('_id').classify.constantize rescue NameError
4040
if c.method_defined?(:collaborations)
41-
@resource = c.method_defined?(:friendly) ? c.friendly.find(value) : c.find(value)
41+
@resource = c.respond_to?(:friendly) ? c.friendly.find(value) : c.find(value)
4242
end
4343
end
4444
end

app/controllers/events_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def show
6767
format.json
6868
format.json_api { render json: @event }
6969
format.ics { send_data @event.to_ical, type: 'text/calendar', disposition: 'attachment', filename: "#{@event.slug}.ics" }
70+
format.jsonld { render plain: @bioschemas.first.to_json }
7071
end
7172
end
7273

app/controllers/materials_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def show
3535
format.html
3636
format.json
3737
format.json_api { render json: @material }
38+
format.jsonld { render plain: @bioschemas.first.to_json }
3839
end
3940
end
4041

app/models/event.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class Event < ApplicationRecord
115115
has_one :llm_interaction, inverse_of: :event, dependent: :destroy
116116
accepts_nested_attributes_for :llm_interaction, allow_destroy: true
117117
has_one :edit_suggestion, as: :suggestible, dependent: :destroy
118-
has_one :link_monitor, as: :lcheck, dependent: :destroy
118+
has_one :link_monitor, as: :lcheck, dependent: :destroy, inverse_of: :link_checkable
119119
has_many :collection_items, as: :resource
120120
has_many :collections, through: :collection_items
121121
has_many :event_materials, dependent: :destroy

app/models/link_monitor.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class LinkMonitor < ApplicationRecord
2-
belongs_to :link_checkable, polymorphic: true, foreign_key: :lcheck_id, foreign_type: :lcheck_type
2+
belongs_to :link_checkable, polymorphic: true, foreign_key: :lcheck_id, foreign_type: :lcheck_type, inverse_of: :link_monitor
33
before_create :set_initial_date
44
after_commit :reindex_resource, on: :update
55

@@ -50,6 +50,6 @@ def status_changed?
5050
def reindex_resource
5151
return unless TeSS::Config.solr_enabled
5252
return unless status_changed?
53-
link_checkable.solr_index
53+
link_checkable.solr_index if link_checkable&.respond_to?(:solr_index)
5454
end
5555
end

app/views/events/_form.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109

110110
<!-- Field: Topics -->
111111
<% if !TeSS::Config.feature['disabled'].include? 'topics' %>
112-
<%= f.autocompleter :scientific_topics, url: edam_topics_path, template: 'autocompleter/term', label: 'Topics',
112+
<%= f.autocompleter :scientific_topics, url: edam_topics_path, template: 'autocompleter/term',
113113
id_field: :uri, label_field: :preferred_label, input_html: { title: t('events.hints.topics') } %>
114114
<% end %>
115115

@@ -149,7 +149,7 @@
149149
<!-- Field: Content Provider -->
150150
<%= f.input :content_provider_id, label: 'Content provider (where the event metadata is obtained from)',
151151
collection: current_user.get_editable_providers, label_method: :title, value_method: :id, include_blank: true,
152-
field_lock: true %>
152+
field_lock: true, input_html: { title: t('events.hints.providers') } %>
153153

154154
<!-- Field: Materials -->
155155
<%= f.autocompleter :materials, input_html: { title: t('events.hints.materials') }, url: materials_path %>

app/views/materials/_form.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<% # Required Fields -%>
1414
1515
<!-- Field: Title -->
16-
<%= f.input :title, as: :string, field_lock: true, input_html: { title: t('materials.hints.title'), placeholder: t('materials.hints.title') } %>
16+
<%= f.input :title, as: :string, field_lock: true, input_html: { title: t('materials.hints.title') } %>
1717
1818
<!-- Field: URL -->
1919
<%= render partial: 'common/url_checker',
@@ -64,7 +64,7 @@
6464

6565
<!-- Field: Provider -->
6666
<%= f.input :content_provider_id, collection: current_user.get_editable_providers, label_method: :title, value_method: :id,
67-
include_blank: true, field_lock: true, label: t('materials.hints.providers'),
67+
include_blank: true, field_lock: true, input_html: { title: t('materials.hints.providers') },
6868
visibility_toggle: TeSS::Config.feature['materials_disabled'] %>
6969

7070
<!-- Field: Authors -->

config/initializers/mime_types.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
# Mime::Type.register "text/richtext", :rtf
55

66
Mime::Type.register 'application/vnd.api+json', :json_api
7+
Mime::Type.register 'application/ld+json', :jsonld, ['application/vnd.schemaorg.ld+json']

config/locales/en.yml

Lines changed: 51 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -581,14 +581,16 @@ en:
581581
retention: "Your information will be retained by %{site_name} until you choose to remove it, you delete your account, or the %{site_name} service ceases to exist."
582582
code: "%{site_name} adheres to the <a href='https://www.geant.net/uri/dataprotection-code-of-conduct/v1'> GÉANT Data Protection Code of Conduct for Service Providers in EU/EEA </a>"
583583
controller: "The data controller for %{site_name} is The University of Manchester."
584-
post: "<strong>The %{site_name} Team</strong><br/>Room 1.17 c/o School of Computer Science,<br/>Kilburn Building,<br/>Oxford Road,<br/>Manchester,<br/>M13 9PL"
584+
post: "<strong>The TeSS Team</strong><br/>Room 2.86 c/o School of Computer Science,<br/>Kilburn Building,<br/>Oxford Road,<br/>Manchester,<br/>M13 9PL"
585585
events:
586586
hints:
587-
address: 'Where is this event being held?'
587+
address: 'Physical location of the event if its being conducted Face-to-face.'
588588
capacity: >
589589
Provide the total number (cap) of individuals that can attend the training event.
590590
Leave blank if there is no limit.
591-
contact: ''
591+
contact: >
592+
The individual responsible for communication regarding the training material, typically including
593+
name, affiliation, email address, and an ORCID identifier if possible.
592594
cost_basis: 'Select the basis by which costs, if any, are applied.'
593595
cost_value: 'Input the cost of the training event.'
594596
cost_currency: 'Select the currency associated with the cost.'
@@ -599,65 +601,87 @@ en:
599601
end: 'When does the event end?'
600602
event_type: 'Select the most appropriate event type for the training event.'
601603
fields: 'Select Fields of Research to better classify your event.'
602-
hosts: ''
604+
hosts: 'Institution/Organisation where the event will be held.'
603605
keywords: "Provide words or terms that clearly identify the training event's topics."
604-
language: 'Language of instruction'
606+
language: 'The language in which the training/seminar/lecture will be delivered. Select from the list of available options.'
605607
materials: 'Add any training materials that are associated with the training event.'
606608
objectives: 'What knowledge, skills, or abilities should your audience gain from completing the training?'
607-
organizer: ''
609+
organizer: 'Institution/Organisation or the individual coordinating to organise the event.'
608610
prerequisites: 'What understanding or knowledge does the audience need to have covered before the training event?'
609611
recognition: 'Provide a description of any qualifications, awards, certificates, diplomas, or other
610612
educational credentials that will be awarded on successful completion of the training event.'
611613
requirements: 'Indicate the technical requirements needed to participate in the training event.'
612-
sponsors: 'Who sponsored, or funded the event?'
614+
sponsors: 'Institution/Organisation or funding bodies that funded that event.'
613615
start: 'When does the event start?'
614616
subtitle: 'Include a subtitle to add context for your intended audience.'
615617
targets: 'Indicate the type of audience for which the training event is intended.'
616618
topics: 'Select the Fields of Research (FoR) codes that the training covers.'
617619
timezone: 'Select the appropriate timezone'
618620
title: 'Add a title for your training event.'
619-
url: 'Enter a valid URL for the event landing page.'
621+
url: 'Location where the event and its details are advertised on the internet.'
622+
providers: The organisation providing the event metadata.
620623
prompts:
621624
language: 'Select a language...'
622625
long: 'Long events'
623626
pick_date: 'Pick a range of dates for a better collection of events.'
624627
materials:
625628
hints:
626629
authors: >
627-
Add individuals and organisations involved in the preparation, creation or presentation of the published work.
630+
Individuals who made substantial intellectual or technical contributions to the
631+
conception, design, execution of the training material.
628632
contact: >
629-
Include the first name, last name and contact details of the person or organisation that can be contacted about
630-
the training material.
631-
contributors: 'Add individual and organisations that contributed to the training material.'
633+
The individual responsible for communication regarding the training material, typically including
634+
name, affiliation, email address, and an ORCID identifier if possible.
635+
contributors: >
636+
Individuals or entities who provided specific assistance, technical input, data, or materials to the work
637+
but may not meet the full criteria for authorship.
632638
date_created: 'Add the date that the training material was created.'
633639
date_modified: 'Add the date that the training material was last modified.'
634640
date_published: 'Add the date that the training material was published.'
635-
description: 'Provide a textual description of your training material, for additional context.'
641+
description: >
642+
A short, informative summary that outlines the purpose, scope, key topic and of the training material.
643+
It should help the learners and instructors understand the content and relevance of the training before engaging with it.
636644
difficulty: 'Indicate the learners expected level of competency in the topic covered by the material.'
637-
doi: 'Include a DOI if one exists for the training material.'
638-
events: ''
645+
doi: >
646+
Digital Object Identifier.
647+
A unique, persistent alphanumeric string assigned to the training material
648+
that provides a permanent link to its location for long-term accessibility and citation tracking.
649+
events: >
650+
Workshops, seminars, conferences, summer or winter schools that contribute to or disseminate the training.
639651
fields: 'Select Fields of Research to better classify your material.'
640652
keywords: "Provide words or terms that clearly identify the training material's topics."
641-
licence: 'Select the licence for the training material.'
653+
licence: >
654+
The most appropriate license that specifies the terms under which your training material and dataset can be used,
655+
modified, and distributed.
656+
Various options of licenses, for example, Creative Commons License are available to choose from.
642657
objectives: >
643-
Describe the knowledge, skills or abilities that students should acquire throught the completion or use of the
644-
training material.
658+
Clearly defined, measurable statements describing the specific knowledge, skills a learner should acquire
659+
after completing the training course.
645660
other_types: 'Enter the types of resources that are not included on the above list.'
646661
part_of: 'Describe the larger service of training to which this material belongs.'
647662
prerequisites: >
648-
What prior understanding or knowledge does your audience need to have on the topics covered in the training
649-
material?
650-
providers: ''
663+
The foundational knowledge, skills, or competencies that a learner or user must possess
664+
before engaging with the training content.
665+
providers: >
666+
The organisation, institution, or individual responsible for providing, and maintaining the training material.
651667
resources: 'Are there any external resources that relate to the is training material?'
652-
status: 'Indicate the current status of the training material.'
668+
status: >
669+
The current state or stage of the training material indicating whether it is
670+
Active, Under development, or Archived.
653671
subsets: 'Add identifier URLs or DOIs for each subset of the training material.'
654672
syllabus: 'Describe the syllabus or provide an overview of the topics covered.'
655673
targets: 'Indicate the type of audience intended to use your training material.'
656674
time: 'What is the estimated time it takes to work through this resource in hours?'
657-
title: 'Add a title for your training material.'
658-
resource_type: 'Select the type of resource that best matches the training material. '
675+
title: >
676+
A concise sentence that clearly indicates the topic of the training material.
677+
It should provide context and help learners understand what the material will cover.
678+
resource_type: >
679+
The predominant category that describes the kind of learning material,
680+
for example, a presentation, video, handout, publication, poster.
659681
url: 'Preferred URL to direct people to your training material landing page.'
660-
version: 'Indicate the current version of the training material.'
682+
version: >
683+
A specific iteration or release of the training material document, labeled to track updates
684+
(for example, v1.0, v2.1).
661685
visible: 'Whether this material should be shown or hidden from the materials page.'
662686
learning_paths:
663687
hints:
@@ -684,7 +708,8 @@ en:
684708
part_of: 'Describe the larger service of training to which this learning path belongs.'
685709
prerequisites: >
686710
What prior understanding or knowledge does your audience need to have on the topics covered in the learning path?
687-
providers: ''
711+
providers: >
712+
The organisation, institution, or individual responsible for providing, and maintaining the learning path.
688713
resources: 'Are there any external resources that relate to the is learning path?'
689714
status: 'Indicate the current status of the learning path.'
690715
subsets: 'Add identifier URLs or DOIs for each subset of the learning path.'

docs/kubernetes-helm-chart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
TeSS can be run using Kubernetes / Helm chart for production.
44

5-
Find [TeSS Helm chart repository](https://github.com/ElixirTeSS/TeSS_Helm_chart) as well as the [deploy instructions](https://github.com/ElixirTeSS/TeSS_Helm_chart/blob/main/README.md).
5+
Find [TeSS Helm chart repository](https://github.com/ElixirTeSS/tess-helm-chart) as well as the [deploy instructions](https://github.com/ElixirTeSS/tess-helm-chart/blob/main/README.md).

0 commit comments

Comments
 (0)