4
4
{%- assign tools = site.data.tool_and_resource_list | add_related_pages | sort_natural: "name" %}
5
5
{%- endif %}
6
6
{%- assign country_pages = site.pages | where_exp: "item", "item.search_exclude != true" | where_exp:"item","item.national_resources != nil" %}
7
- {%- unless tools.size == 0 or tools == nil %}
7
+ {%- unless country_pages.size == 0 %}
8
+ {%- assign tool_matches_total = 0 %}
9
+ {%- assign query = "related_pages." | append: page.type %}
10
+ {%- for country_page in country_pages %}
11
+ {%- if include.tag %}
12
+ {%- assign tool_matches = country_page.national_resources | where_exp:"resource","resource.related_pages != nil" | where: query, include.tag %}
13
+ {%- unless tool_matches.size == 0 %}
14
+ {%- assign tool_matches_total = tool_matches_total | plus: tool_matches.size %}
15
+ {%- endunless %}
16
+ {%- else %}
17
+ {%- assign tool_matches_total = tool_matches_total | plus: country_page.national_resources.size %}
18
+ {%- endif %}
19
+ {%- endfor %}
20
+ {%- endunless %}
21
+ {%- unless tools.size == 0 and tool_matches_total.size == 0 %}
8
22
{%- if include.tag %}
9
23
< a class ="visually-hidden-focusable " href ='#skip-tool-table '> Skip tool table</ a >
10
24
{%- if site.theme_variables.headings.resource-table-all-collapse %}
17
31
< div class ="collapse info-card " id ="tools_collapse ">
18
32
{%- endif %}
19
33
{%- endif %}
34
+ {%- unless tools.size == 0 %}
20
35
< div class ="table-responsive mt-4 ">
21
36
< table class ="tooltable table display ">
22
37
< thead >
36
51
{%- for tool in tools %}
37
52
< tr >
38
53
{%- assign instances_tool = 0 %}
39
- {%- assign total_county_tools = 0 %}
40
54
{%- assign query = "related_pages." | append: page.type %}
41
55
{%- for country_page in country_pages %}
42
56
{%- assign instance_matches = country_page.national_resources | where: "instance_of", tool.id | where_exp:"resource","resource.related_pages != nil" | where: query, include.tag %}
43
- {%- assign tool_matches = country_page.national_resources | where_exp:"resource","resource.related_pages != nil" | where: query, include.tag %}
44
- {%- unless tool_matches.size == 0 %}
45
- {%- assign total_county_tools = total_county_tools | plus: tool_matches.size %}
46
- {%- endunless %}
47
57
{%- unless instance_matches.size == 0 %}
48
58
{%- assign instances_tool = instances_tool | plus: instance_matches.size %}
49
59
{%- endunless %}
54
64
< td > {{tool.name}}</ td >
55
65
{%- endif %}
56
66
< td > {{tool.description}}
57
- {%- if tool.instance_of or tool.how_to_access or instances_tool != 0 and total_county_tools != 0 and include.tag != nil %}
67
+ {%- if tool.instance_of or tool.how_to_access or instances_tool != 0 != 0 and include.tag != nil %}
58
68
{%- assign linked_tool = site.data.tool_and_resource_list | where:"id", tool.instance_of | first %}
59
69
< div class ="d-block mt-1 ">
60
70
{%- if linked_tool %}
63
73
{%- if tool.how_to_access %}
64
74
< span class ="d-inline-block " tabindex ="0 " data-bs-toggle ="tooltip " title ="{{tool.how_to_access}} "> < span class ="badge text-primary border border-primary "> < i class ="fa-solid fa-key "> </ i > </ span > </ span >
65
75
{%- endif %}
66
- {%- unless instances_tool == 0 or total_county_tools == 0 or include.tag == nil %}
76
+ {%- unless instances_tool == 0 or include.tag == nil %}
67
77
<!-- <a href="#national-resources-button">
68
78
<span class="badge text-white bg-primary"><i class="fa-solid fa-arrow-circle-down me-2"></i>Different instances available</span>
69
79
</a> -->
99
109
</ td >
100
110
</ tr >
101
111
{%- endfor %}
112
+ {%- if tool_matches_total == 0 or include.tag %}
102
113
</ tbody >
103
114
</ table >
104
115
</ div >
116
+ {%- endif %}
105
117
{%- if include.tag %}
106
118
{%- if site.theme_variables.headings.resource-table-all-collapse %}
107
119
</ div >
108
120
{%- endif %}
109
121
< div id ="skip-tool-table "> </ div >
110
122
{%- endif %}
111
- {%- unless total_county_tools == 0 or include.tag == nil %}
123
+
124
+ {%- endunless %}
125
+ {%- unless tool_matches_total == 0 %}
112
126
{%- if include.tag %}
113
127
< a class ="visually-hidden-focusable " href ='#skip-nat-tool-table '> Skip national tools table</ a >
114
128
{%- if site.theme_variables.headings.resource-table-all-collapse %}
@@ -120,37 +134,34 @@ <h3 class="{% if site.theme_variables.headings.resource-table-all-collapse %}mb-
120
134
</ a >
121
135
< div class ="collapse info-card " id ="nat_tools_collapse ">
122
136
{%- endif %}
123
- {%- endif %}
124
137
< p class ="mt-4 "> Tools and resources tailored to users in different countries.</ p >
125
138
< div class ="table-responsive mt-3 ">
126
- < table class ="tooltable table display " id =" national-resources-button " >
139
+ < table class ="tooltable table display ">
127
140
< thead >
128
141
< tr class ="text-nowrap ">
129
- < th > Tool or resource {%- if include.tag -%}
142
+ < th > Tool or resource
130
143
< a data-bs-toggle ="tooltip " data-bs-original-title ="This is a curated list which means that not all tools or resources that exist for this topic are listed here. This is mainly because we do not intend to be a registry. In most cases you will only find back the tools or resources that are mentioned in this page. ">
131
144
< i class ="fa-solid fa-info-circle "> </ i >
132
- </ a > {%- endif %}
145
+ </ a >
133
146
</ th >
134
147
< th > Description</ th >
135
148
< th > Related pages</ th >
136
- < th > Registry {%- if include.tag -%}
149
+ < th > Registry
137
150
< a data-bs-toggle ="tooltip " data-bs-original-title ="Links to related information in ELIXIR registries: related policies and standards in FAIRsharing, scientific and technical descriptions of the resource in bio.tools, and related training in TeSS. ">
138
151
< i class ="fa-solid fa-info-circle "> </ i >
139
- </ a > {%- endif %}
152
+ </ a >
140
153
</ th >
141
154
</ tr >
142
155
</ thead >
143
156
< tbody >
144
- {%- assign hide_ids = "resource_title" %}
157
+ {%- endif %}
145
158
{%- for country_page in country_pages %}
146
159
{%- if include.tag %}
147
160
{%- assign tool_matches = country_page.national_resources | where_exp:"resource","resource.related_pages != nil" | where: query, include.tag | sort_natural: "name" %}
148
161
{%- else %}
149
- {%- assign tool_matches = country_page.national_resources | sort_natural: "name" %}
162
+ {%- assign tool_matches = country_page.national_resources %}
150
163
{%- endif %}
151
164
{%- for tool in tool_matches %}
152
- {%- assign tool_id = tool.name | slugify %}
153
- {%- assign hide_ids = hide_ids | append: " " | append: tool_id %}
154
165
< tr >
155
166
{% if tool.url %}
156
167
< td > < a href ="{{tool.url}} "> {{tool.name}}</ a > < a href ="{{country_page.url | relative_url }} " data-bs-toggle ="tooltip " title ="{{country_page.title}} "> < span class ="flag-icon ms-2 shadow-sm flag-icon-{{country_page.country_code | downcase }} "> </ span > </ a > </ td >
0 commit comments