Commit 4fd140dc authored by Merret Buurman's avatar Merret Buurman
Browse files

CMIP6 dataset: Errata now shown.

parent d8e9e549
......@@ -75,6 +75,12 @@ def get_list_of_parts_handles_from_record(record):
def get_list_of_parts_records_from_record(record):
return _get_list_of_parts_records_from_record(record)
def get_errata_list_from_record(record):
return _get_errata_list_from_record(record)
def get_errata_field_from_record(record):
return _get_errata_field_from_record(record)
# Actual implementation and helpers
def _get_aggregation_level(record):
......@@ -102,6 +108,9 @@ def _get_aggregation_field_from_record(record):
field_string = get_value_from_record(record, 'PARENT') # TODO Remove once migration is done!
return field_string
def _get_errata_field_from_record(record):
return get_value_from_record(record, 'ERRATA')
def _get_filename_from_record(record):
return get_value_from_record(record, 'FILENAME')
......@@ -152,6 +161,10 @@ def _parse_urls_original_from_record(field_string):
parsed = _remove_duplicate_urls(parsed)
return parsed
def _get_errata_list_from_record(record):
field_string = get_errata_field_from_record(record)
return field_string.split(';')
def _parse_urls_replicas_from_record(field_string):
parsed = _extract_url_info_from_field(field_string, 'href', 'host')
if parsed is not None:
......
......@@ -61,4 +61,9 @@ def _get_context(json_record):
context['list_of_parts_records'] = val2
context['any_part_replaced'] = val3
# Errata
val = parser.get_errata_list_from_record(json_record)
if val is not None:
context['errata'] = val
return context
......@@ -111,6 +111,20 @@
</table>
</div>
{% if errata %}
<div class="section">
<h2>Errata</h2>
<table>
{% for item in errata %}
<tr>
<td >{{item}}</td>
<td></td>
</tr>
{% endfor %}
</table>
</div>
{% endif %}
<div class="section">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment