cmip6_dataset.html 6.8 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
                    <td class="leftcol">Persistent identifier</td>
71
72
73
                    <td>
                        <a href="http://hdl.handle.net/{{handle}}">hdl:{{handle}}</a>
                        <br/><br/>
74
                        <span class="note"><img height="20px" src="/lp/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>
75
                    </td>
76
77
                </tr>
                <tr>
78
                    <td class="leftcol">Newer version</td>
79
80
81
                    <td>
                        <a href="http://hdl.handle.net/{{handle}}">hdl:{{newerversion}}</a>
                        <br/><br/>
82
                        <span class="note"><img height="20px" src="/lp/static/warning_cmip6_green_transparent.png"><strong>&nbsp;This is not necessarily the most recent version.</strong> Please refer to this version's landing page to find out if it has been replaced by an even newer version.</span>
83
                    </td>
84
85
86
87
                </tr>
            {% else %}

            <!-- No newer version: Table with 2 columns: -->
88
89
            {% if drs %}
                <tr>
90
                    <td class="leftcol">DRS name</td>
91
92
93
94
95
                    <td>{{drs}}</td>
                </tr>
            {% endif %}
            {% if version %}
                <tr>
96
                    <td class="leftcol">Version number</td>
97
98
99
100
                    <td>{{version}}</td>
                </tr>
            {% endif %}
                <tr>
101
102
                    <td class="leftcol">Persistent identifier</td>
                    <td><a href="http://hdl.handle.net/{{handle}}">hdl:{{handle}}</a></td>
103
104
                </tr>
            {% endif %}
105
106
107
108
109
110
                <tr>
                    <td class="leftcol">Newer version</td>
                    <td>
                        <span>No information on newer versions found.<span>
                    </td>
                </tr>
111
112
113
            </table>
        </div>

114
115
116
117
118
119
120
121
122
123
124
125
126
127
        {% if errata %}
        <div class="section">
            <h2>Errata</h2>
                <table>
                {% for item in errata %}
                    <tr>   
                        <td >{{item}}</td>
                        <td></td>
                    </tr>
                {% endfor %}
                </table>
        </div>
        {% endif %}

128

129

130
131
132
133
134
135
136
137
        <div class="section">
            <h2>Dataset host(s)</h2>

            {% if hosts_original or hosts_replica %}
                <table>
                {% if hosts_original %}
                {% for entry in hosts_original %}
                    <tr>   
Merret Buurman's avatar
Merret Buurman committed
138
                        <td class="leftcol">{{entry.host}}</td>
139
140
141
142
143
144
145
                        <td></td>
                    </tr>
                {% endfor %}
                {% endif %}
                {% if hosts_replica %}
                {% for entry in hosts_replica %}
                    <tr> 
Merret Buurman's avatar
Merret Buurman committed
146
                        <td class="leftcol"><a href="{{entry.host}}">{{entry.host}} (replica)</a></td>
147
148
149
150
151
152
153
154
155
156
                        <td></td>
                    </tr>
                {% endfor %}
                {% endif %}
                </table>
            {% endif %}
        </div>


        <div class="section">
157
            <h2>Files belonging to this dataset</em></h2>
158
159
160
161
162

            {% if list_of_parts_records %}
                <table>
                {% for item in list_of_parts_records %}
                    <tr>
163
164
                        <td class="leftcol">
                            {{item.title}}
165
166
167
                            {% if item.version %}
                                (version {{ item.version }})
                            {% endif %}
168
169
                        </td>
                        <td>
170
                            <a href="http://hdl.handle.net/{{ item.handle }}">hdl:{{ item.handle }}</a>
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
                            {% 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 %}