cmip6_dataset.html 5.77 KB
Newer Older
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
{% extends "landingpage/cmip6_headerfooter.html" %}

{% block content %}

    <!--
    The context object needs the following objects:

    Simple values:

    * drs
    * handle [*]
    * version
    * newerversion
    * any_part_replaced
    
    Complex objects:

    * hosts_original: List of dicts. Every dict needs:
        * host [*]
    * hosts_replicas: List of dicts. Every dict needs:
        * host [*]
    * list_of_parts_handles: List of strings (handles).
        These handles can be retrieved from the dataset handle record, but it is very little information.
        The user needs to click on them to know what they are, if they are up-to-date, etc.
        Alternative: list_of_parts_records
    * list_of_parts_records: List of dicts.
        This contains more info, which is extracted from the records of the aggregation handles, so more
        calls to retrieve handle records are needed. Maybe one day this could be done on user's request only.
        Every dict needs:
        * level (e.g. "file") [*]
        * handle [*]
        * version
        * title [*] (can be drs-name, can be file name... depends on the level)
        * replaced (True or False) [*]

    [*] I do not check the existence of these, so if they don't exist, the page may break.
        
    -->


        <div class="section">
            {% if drs %}
                <h1><em>{{drs}}</em> (dataset)</h1>
            {% else %}
                <h1>Dataset <em>(DRS name unknown)</em></h1>
            {% endif %}
        </div>



        <div class="section">
            <h2>General information</h2>
            <table>
54

55
            <!-- Newer version exists: Table with 2 columns: -->
56
57
58
            {% if newerversion %}
                {% if drs %}
                    <tr>
59
                        <td class="leftcol">DRS name</td>
60
61
62
63
64
                        <td>{{drs}}</td>
                    </tr>
                {% endif %}
                {% if version %}
                    <tr>
65
                        <td class="leftcol">Version number</td>
66
67
68
69
                        <td>{{version}}</td>
                    </tr>
                {% endif %}
                <tr>
70
71
                    <td class="leftcol">Persistent identifier</td>
                    <td><a href="http://hdl.handle.net/{{handle}}">hdl:{{handle}}</a><br/><br/><span class="note"><img height="20px" src="/static/warning_cmip6_green_transparent.png"><strong>&nbsp;This dataset was replaced by a newer version.</strong> Please refer to the dataset's errata description to get more information. You can find information on the errata on the dataset's landing page or at the ESGF Errata Service.</span>   </td>
72
73
                </tr>
                <tr>
74
                    <td class="leftcol">Newer version</td>
75
76
77
78
79
                    <td><a href="http://hdl.handle.net/{{handle}}">hdl:{{newerversion}}</a></td>
                </tr>
            {% else %}

            <!-- No newer version: Table with 2 columns: -->
80
81
            {% if drs %}
                <tr>
82
                    <td class="leftcol">DRS name</td>
83
84
85
86
87
                    <td>{{drs}}</td>
                </tr>
            {% endif %}
            {% if version %}
                <tr>
88
                    <td class="leftcol">Version number</td>
89
90
91
92
                    <td>{{version}}</td>
                </tr>
            {% endif %}
                <tr>
93
94
                    <td class="leftcol">Persistent identifier</td>
                    <td><a href="http://hdl.handle.net/{{handle}}">hdl:{{handle}}</a></td>
95
96
97
98
99
100
                </tr>
            {% endif %}
            </table>
        </div>


101

102
103
104
105
106
107
108
109
        <div class="section">
            <h2>Dataset host(s)</h2>

            {% if hosts_original or hosts_replica %}
                <table>
                {% if hosts_original %}
                {% for entry in hosts_original %}
                    <tr>   
110
                        <td class="leftcol">Hosted by <a href="http://{{entry.host}}">{{entry.host}}</a></td>
111
112
113
114
115
116
117
                        <td></td>
                    </tr>
                {% endfor %}
                {% endif %}
                {% if hosts_replica %}
                {% for entry in hosts_replica %}
                    <tr> 
118
                        <td class="leftcol">Mirrored at <a href="{{entry.host}}">{{entry.host}}</a></td>
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
                        <td></td>
                    </tr>
                {% endfor %}
                {% endif %}
                </table>
            {% endif %}
        </div>


        <div class="section">
            <h2>Parts</em></h2>

            {% if list_of_parts_records %}
                <table>
                {% for item in list_of_parts_records %}
                    <tr>
135
                        <td class="leftcol">{{item.level}}</td>
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
                        <td>
                            {{ item.title }}
                            {% if item.version %}
                                (version {{ item.version }})
                            {% endif %}
                            <br/><a href="http://hdl.handle.net/{{ item.handle }}/">hdl:{{ item.handle }}</a>
                            {% if item.replaced %}
                                <br/><span class="attention">Attention, this {{item.level}} was replaced by a newer version!*</span>
                            {% endif %}
                        </td>
                    </tr>
                {% endfor %}
                </table>

            {% else %}{% if list_of_parts_handles %}
                <table>
                {% for handle in list_of_parts_handles %}
                    <tr><td><a href="http://hdl.handle.net/{{ handle }}/">{{ handle }}</a></td></tr>
                {% endfor %}
                </table>
            {% else %}
                <p>No information on parts of this dataset.</p>
            {% endif %}{% endif %}
        </div>

{% endblock %}