/
profile.html
224 lines (209 loc) · 9.78 KB
/
profile.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
---
layout: default
---
{%- assign group = site.groups | where:"identifier", page.group %}
{%- case page.status %}
{%- when "RELEASE" %}
<h1>{{page.name}} Profile</h1>
{%- when "DRAFT" %}
<h1>{{page.name}} <u>DRAFT</u> Profile</h1>
{%- when "DEPRECATED" %}
<h1>{{page.name}} <u>DEPRECATED</u> Profile</h1>
{%- endcase %}
<h3>Description</h3>
<blockquote>{{page.description}}</blockquote>
<h3>Schema.org Type</h3>
{% assign profile_type = page.schema_type %}
{% assign testArray = profile_type | split: 'schema:' %}
{% if testArray[0] != blank %}
<p>The {{page.name}} profile is defined over the <a href='https://schema.org/{{testArray[1]}}'>{{profile_type}}</a> type.</p>
{% else %}
<p>The {{page.name}} profile is defined over the {{profile_type}} type.</p>
{% endif %}
<h3>Versions</h3>
<ul>
{% assign version = page.version | split: '/' | last %}
<li><strong>This version: <a href="{{page.name | prepend: '/profiles/' | append:'/' | append: version | reative_url }}">{{ version }}</a></strong></li>
{% assign profile_versions = site.data.profile_versions[page.name] %}
{% if profile_versions.latest_release == null or profile_versions.latest_release == '' %}
<li>Latest release: none</li>
{% else %}
<li>Latest release: <a href="{{ page.name | prepend: '/profiles/' | append:'/' | append: profile_versions.latest_release | relative_url }}">{{profile_versions.latest_release}}</a></li>
{% endif %}
{% if profile_versions.latest_publication == null or profile_versions.latest_publication == '' %}
<li>Latest draft: none</li>
{% else %}
<li>Latest draft: <a href="{{ page.name | prepend: '/profiles/' | append:'/' | append: profile_versions.latest_publication | relative_url }}">{{profile_versions.latest_publication}}</a></li>
{% endif %}
{% if page.previous_version == null or page.previous_version == '' %}
<li>Previous version: none</li>
{% else %}
<li>Previous version: <a href="{{ page.name | prepend: '/profiles/' | append: '/' | append: page.previous_version | relative_url }}">{{page.previous_version}}</a></li>
{% endif %}
{% if page.previous_release == null or page.previous_release == '' %}
<li>Previous release: none</li>
{% else %}
<li>Previous release: <a href="{{ page.name | prepend: '/profiles/' | append: '/' | append: page.previous_release | relative_url }}">{{page.previous_release}}</a></li>
{% endif %}
</ul>
<!-- Navigation tabs -->
<nav class="mt-3">
<div class="nav nav-tabs" id="nav-tab" role="tablist">
<button class="nav-link active" id="nav-links-tab" data-bs-toggle="tab" data-bs-target="#nav-links" type="button" role="tab" aria-controls="nav-links" aria-selected="true">Links</button>
<button class="nav-link" id="nav-contributors-tab" data-bs-toggle="tab" data-bs-target="#nav-contributors" type="button" role="tab" aria-controls="nav-contributors" aria-selected="false">Contributors</button>
<button class="nav-link" id="nav-changes-tab" data-bs-toggle="tab" data-bs-target="#nav-changes" type="button" role="tab" aria-controls="nav-changes" aria-selected="false">Changes</button>
</div>
</nav>
<div class="tab-content py-3 mb-3 border-bottom" id="nav-tabContent">
<div class="tab-pane fade show active" id="nav-links" role="tabpanel" aria-labelledby="nav-links-tab">
<h3>Links</h3>
<div class="table-responsive shadow rounded mt-4 mb-5">
<table class="table table-hover table-borderless mb-0 bioschemas_spec_list">
<thead>
<tr>
<th>Group</th>
<th>Use Cases</th>
<th>News Stories</th>
<th>Task & Issues</th>
<th>Examples</th>
<th>Live Deploys</th>
</tr>
</thead>
<tbody>
<tr>
<td>
{% for g in group %}
<a href="{{g.url | relative_url}}">{{g.name}}</a>
{% endfor %}
</td>
<td class="spec_links">
<a href="{{page.name | prepend: '/useCases/' | append: '/'}}">
<img src="{{ '/images/use_case_spec.svg' | relative_url }}" alt="View Bioschemas {{ page.name }} Use Cases">
</a>
</td>
<td class="spec_links">
<a href="{{page.name | downcase | prepend: '/news/tags.html#'}}">
<img src="{{ '/images/cross_walk.svg' | relative_url }}" alt="View Bioschemas {{ page.name }} news items">
</a>
</td>
<td class="spec_links">
<a href="{{page.name | prepend: 'https://github.com/Bioschemas/bioschemas/labels/type%3A%20'}}" target="_blank">
<img src="{{ '/images/specs_tasks.png' | relative_url }}" alt="Bioschemas {{ page.name }} Github Tasks or Issues">
</a>
</td>
<td class="spec_links" target="_blank">
<a href="{{page.name | prepend: 'https://github.com/BioSchemas/specifications/tree/master/' | append: '/examples'}}">
<img src="{{ '/images/spec_examples.png' | relative_url }}" alt="View Bioschemas {{ page.name }} examples">
</a>
</td>
<td class="spec_links">
<a href="{{page.name | prepend: '/liveDeploys#nav-profile?row='}}">
<img src="{{ '/images/live_deploy.svg' | relative_url }}" alt="View Bioschemas {{ page.name }} live deployments">
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="tab-pane fade" id="nav-contributors" role="tabpanel" aria-labelledby="nav-contributors-tab">
<h3>Contributors</h3>
{% for g in group %}
<p>The following people have been involved in the creation of this specification document. They are all members of the <a href="{{g.url}}">{{g.name}}</a> group.</p>
{% endfor %}
<h6>Group Leader(s)</h6>
<div id="leadTable">
{% for g in group %}
{% for leader in g.lead %}
{% assign lead-id = "/people/" | append: leader %}
{% assign author = site.people | where:"id", lead-id | first %}
{% if author.homepage or author.github_username or author.orcid %}
<p><a href="{{ author.url | relative_url }}">{{ author.first-name }} {{ author.last-name }}</a></p>
{% else %}
<p>{{ author.first-name }} {{ author.last-name }}</p>
{% endif %}
{% else %}
<p>No team leaders currently specified.</p>
{% endfor %}
{% endfor %}
</div>
<h6>Other team members</h6>
<div id="peopleTable">
{% for g in group %}
{% for member-name in g.members %}
{% unless g.lead contains member-name %}
{% assign member-id = "/people/" | append: member-name %}
{% assign member = site.people | where:"id", member-id | first %}
<p><a href="{{ member.url | relative_url }}">{{ member.first-name }} {{ member.last-name }}</a></p>
{% endunless %}
{% endfor %}
{% endfor %}
</div>
</div>
<div class="tab-pane fade" id="nav-changes" role="tabpanel" aria-labelledby="nav-changes-tab">
<h3>Summary of Changes</h3>
{% if page.previous_version == nil %}
<p>There have been no previous versions of the {{page.name}} profile.</p>
{% elsif page.changes == nil %}
<p>There have been no changes since the <a href="{{ page.name | prepend: '/profiles/' | append: '/' | append: page.previous_version | relative_url }}">{{page.previous_version}}</a> version.</p>
{% else %}
<p>The following changes have been made since the <a href="{{ page.name | prepend: '/profiles/' | append: '/' | append: page.previous_version | relative_url }}">{{page.previous_version}}</a> version:</p>
<ul>
{% for change in page.changes %}
<li>{{change}}</li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>
<p>If you spot any errors or omissions with this type, please file an issue in our <a href="{{page.gh_tasks}}" target="_blank">GitHub</a>.</p>
<h3>Profile Definition</h3>
{% include spec-table-key.html %}
<p><strong>TODO:</strong> Add examples button back in</p>
<p><strong>TODO:</strong> Recreate the profile table using the content of the JSON-Schema validation rules included below.</p>
<p><strong>TODO:</strong> Cope with more than one expected type given with 'oneOf' or 'anyOf' keys</p>
<div class="table-responsive shadow rounded mt-4 mb-5">
<table class="table table-hover table-borderless mb-0 spec-prof-table">
<thead>
<tr>
<th>Property</th>
<th>Expected Type</th>
<th>Description</th>
<th>CD</th>
<th class="control-vocabulary-column">Controlled Vocabulary</th>
<th class="example-column">Example</th>
</tr>
</thead>
<tbody>
{%- assign required = metadata.jsonld-validation.required %}
{%- assign properties = metadata.jsonld-validation.properties %}
{%- if required.size > 0 %}
<tr class="cardinality">
<td colspan="6">
Marginality: <b>Minimal.</b>
</td>
</tr>
{%- endif %}
{%- for req in required %}
{%- assign property = properties[req] %}
<tr>
<td class="property-column"><a href="https://schema.org/{{req}}">{{req}}</a></td>
<td>
{%- if property.type == 'string' and property.format == 'uri' %}
<a href="https://schema.org/URL">URL</a>
{%- elsif property.type == 'string' %}
<a href="https://schema.org/Text">Text</a>
{%- else %}
{{property.type}}
{%- endif %}
</td>
<td>{{property.description}}</td>
<td colspan="3">{{properties[req]}}</td>
</tr>
{%- endfor %}
</tbody>
</table>
<p>Properties: {{metadata.jsonld-validation.properties}}</p>
{{content}}
<hr/>
<p>This is the full content of the schema file for development purposes:<br/> {{schema}}</p>