Skip to content

Commit c123125

Browse files
authored
Merge pull request #1220 from ElixirTeSS/fix-info-links
Fix "see here..." links in info boxes.
2 parents 2760038 + 4d8268b commit c123125

File tree

4 files changed

+28
-28
lines changed

4 files changed

+28
-28
lines changed

app/helpers/events_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
module EventsHelper
66
def events_info
77
I18n.t('info.events.description',
8-
link: link_to(I18n.t('info.events.link'),
9-
registering_resources_path(anchor: 'automatic')))
8+
link: I18n.t('info.events.link'),
9+
url: registering_resources_path(anchor: 'automatic'))
1010
end
1111

1212
def google_calendar_export_url(event)

app/helpers/learning_paths_helper.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,16 @@ def learning_path_breadcrumb_param(topic_link, topic_item)
44
{ lp: [topic_link, topic_item].map(&:id).join(':') }
55
end
66

7+
def learning_paths_info
8+
I18n.t('info.learning_paths.description',
9+
link: I18n.t('info.learning_paths.link'),
10+
url: registering_learning_paths_path(anchor: 'register_paths'))
11+
end
12+
13+
def learning_path_topics_info
14+
I18n.t('info.learning_path_topics.description',
15+
link: I18n.t('info.learning_path_topics.link'),
16+
url: registering_learning_paths_path(anchor: 'topics'))
17+
end
18+
719
end

app/helpers/materials_helper.rb

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,20 @@
22
module MaterialsHelper
33
def materials_info
44
I18n.t('info.materials.description',
5-
link: link_to(I18n.t('info.materials.link'),
6-
registering_resources_path(anchor: 'automatic')))
5+
link: I18n.t('info.materials.link'),
6+
url: registering_resources_path(anchor: 'automatic'))
77
end
88

99
def elearning_materials_info
1010
I18n.t('info.elearning_materials.description',
11-
link: link_to(I18n.t('info.elearning_materials.link'),
12-
registering_resources_path(anchor: 'automatic')))
11+
link: I18n.t('info.elearning_materials.link'),
12+
url: registering_resources_path(anchor: 'automatic'))
1313
end
1414

1515
def topics_info
1616
I18n.t('info.topics.description')
1717
end
1818

19-
def learning_paths_info
20-
I18n.t('info.learning_paths.description',
21-
link: link_to(I18n.t('info.learning_paths.link'),
22-
registering_learning_paths_path(anchor: 'register_paths')))
23-
end
24-
25-
def learning_path_topics_info
26-
I18n.t('info.learning_path_topics.description',
27-
link: link_to(I18n.t('info.learning_path_topics.link'),
28-
registering_learning_paths_path(anchor: 'topics')))
29-
end
30-
3119
# Returns an array of two-element arrays of licences ready to be used in options_for_select() for generating option/select tags
3220
# [['Licence 1 full name','Licence 1 abbreviation'], ['Licence 2 full name','Licence 2 abbreviation'], ...]
3321
def licence_options_for_select

config/locales/en.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,19 +1058,19 @@ en:
10581058
description: |
10591059
An event in %{site_name} is a link to a single training event sourced by a provider along with description and other meta information (e.g. date, location, audience, ontological categorization, keywords, etc.).<br>
10601060
Training events can be added manually or automatically harvested from a provider's website.<br>
1061-
If your website contains training events that you wish to include in %{site_name}, %{link}.
1062-
link : see here for details on automatic registration
1061+
If your website contains training events that you wish to include in %{site_name}, [%{link}](%{url}).
1062+
link: see here for details on automatic registration
10631063
materials:
10641064
description: |
10651065
In the context of %{site_name}, a training material is a link to a single online training material sourced by a content provider (such as a text on a Web page, presentation, video, etc.).<br>
10661066
Materials can be added manually or automatically harvested from a provider's website.<br>
1067-
If your website contains training materials that you wish to include in %{site_name}, %{link}.
1068-
link : see here for details on automatic registration
1067+
If your website contains training materials that you wish to include in %{site_name}, [%{link}](%{url}).
1068+
link: see here for details on automatic registration
10691069
elearning_materials:
10701070
description: |
10711071
e-Learning materials are curated materials focused on e-Learning.
1072-
If your website contains e-Learning materials that you wish to include in %{site_name}, %{link}.
1073-
link : see here for details on automatic registration
1072+
If your website contains e-Learning materials that you wish to include in %{site_name}, [%{link}](%{url}).
1073+
link: see here for details on automatic registration
10741074
topics:
10751075
description: |
10761076
%{site_name} generates a scientific topic suggestion for each resource registered. It does this by passing the description and title of the resource to the Bioportal Annotator Web service.
@@ -1084,8 +1084,8 @@ en:
10841084
1. Register training materials.
10851085
2. Create a learning path topic and add materials to it (repeat for each topic).
10861086
3. Register a learning path and add learning path topics to it.<br>
1087-
%{link}.
1088-
link : See here for details on learning paths
1087+
[%{link}](%{url}).
1088+
link: See here for details on learning paths
10891089
learning_path_topics:
10901090
description: |
10911091
A learning path topic is an ordered list of training materials.
@@ -1094,8 +1094,8 @@ en:
10941094
1. Register training materials.
10951095
2. Create a learning path topic and add materials to it (repeat for each topic).
10961096
3. Register a learning path and add learning path topics to it.<br>
1097-
%{link}
1098-
link : See here for details on learning path topics
1097+
[%{link}](%{url})
1098+
link: See here for details on learning path topics
10991099
trainers:
11001100
description: |
11011101
%{site_name} provides a facility that allows registered users to provide information about their training experience and make this publicly available via the Trainers Register.

0 commit comments

Comments
 (0)