dashboard.html 11.4 KB
Newer Older
Maarten van der Veen's avatar
Maarten van der Veen committed
1 2 3
{% extends "layout.html" %}
{% block head %}
    {{ super() }}
Krystyna Milian's avatar
Krystyna Milian committed
4 5
    <link href="{{ url_for('static', filename='lib/datatables.net-bs/css/dataTables.bootstrap.min.css') }}"
          rel="stylesheet" media="screen">
6

7 8 9 10 11 12 13 14 15

    <script src="{{ url_for('static', filename = 'lib/dc/d3.js') }}"></script>
    <script src="{{ url_for('static', filename = 'lib/dc/crossfilter.js') }}"></script>
    <script src="{{ url_for('static', filename = 'lib/dc/colorbrewer.js') }}"></script>
    <script src="{{ url_for('static', filename = 'lib/dc/dc.js') }}"></script>
    <script src="{{ url_for('static', filename = 'lib/leaflet/leaflet.js') }}"></script>
    <script src="{{ url_for('static', filename = 'lib/leaflet/leaflet.markercluster.js') }}"></script>
    <script src="{{ url_for('static', filename = 'lib/leaflet/dc.leaflet.js') }}"></script>
    <script src="{{ url_for('static', filename='lib/datatables.net/js/jquery.dataTables.min.js') }}"></script>
Maarten van der Veen's avatar
Maarten van der Veen committed
16 17
    <script src="{{ url_for('static', filename='lib/file-saver/FileSaver.js')}}"></script>

18

Maarten van der Veen's avatar
Maarten van der Veen committed
19
    <!--leaflet -->
20

Maarten van der Veen's avatar
Maarten van der Veen committed
21
    <link href="{{ url_for('static', filename='lib/leaflet/MarkerCluster.Default.css') }}" rel="stylesheet" media="screen" />
22

Maarten van der Veen's avatar
Maarten van der Veen committed
23 24
    <link href="{{ url_for('static', filename='lib/leaflet/leaflet.css') }}" rel="stylesheet" media="screen" />
    <link href="{{ url_for('static', filename='lib/leaflet/MarkerCluster.css') }}" rel="stylesheet" media="screen" />
25 26

    <!-- DC.js  -->
Maarten van der Veen's avatar
Maarten van der Veen committed
27
    <link href="{{ url_for('static', filename='lib/dc/dc.css') }}" rel="stylesheet" media="screen" />
28

Maarten van der Veen's avatar
Maarten van der Veen committed
29
{% endblock %}
30 31


Maarten van der Veen's avatar
Maarten van der Veen committed
32
{% block content %}
33 34 35 36 37 38 39 40 41 42 43 44
    <section class="search">
        <div class="content">
            <div class="search-wrapper">
                <input type="" name="" placeholder="Search Shelters.."/>
            </div>
        </div>
    </section>
    <section class="filter">
        <div class="content">
            <h5>Filter by</h5>

            <form class="myform">
45 46
                <label for="climateFilter" class="button button-drop">
                    <select id="climateFilter">
47 48 49 50
                        <option value="" selected="selected">Climate</option>
                        <option value="" disabled>---</option>
                    </select>
                </label>
51 52
                <label for="zoneFilter" class="button button-drop">
                    <select id="zoneFilter">
53 54 55 56
                        <option value="" selected="selected">Continent</option>
                        <option value="" disabled>---</option>
                    </select>
                </label>
57 58
                <label for="disasterFilter" class="button button-drop">
                    <select id="disasterFilter">
59 60 61 62
                        <option value="" selected="selected">Disaster</option>
                        <option value="" disabled>---</option>
                    </select>
                </label>
63 64
                <label for="materialFilter" class="button button-drop">
                    <select id="materialFilter">
65 66 67 68
                        <option value="" selected="selected">Material</option>
                        <option value="" disabled>---</option>
                    </select>
                </label>
69 70
                <label for="commercialFilter" class="button button-drop">
                    <select id="commercialFilter">
71 72 73 74 75
                        <option value="" selected="selected">Commercial</option>
                        <option value="" disabled>---</option>
                    </select>
                </label>

76

77 78 79 80 81 82 83 84 85 86
                <!-- <a href="" class="button button-light button-drop">Climate</a> -->
                <!-- <a href="" class="button button-drop">Continent</a> -->
                <!-- <a href="" class="button button-drop">Disaster</a> -->
                <!-- <a href="" class="button button-light button-drop">Material</a> -->
                <!-- <a href="" class="button button-light button-drop">Commercial</a> -->

                <div class="advanced" id="advanced">
                    <div class="advanced-btn" onclick="toggleAdvanced()">Advanced Search</div>
                    <div class="advanced-content">

87 88
                        <label for="soilFilter" class="button button-small button-drop">
                            <select id="soilFilter">
89 90 91 92
                                <option value="" selected="selected">Soil Type</option>
                                <option value="" disabled>---</option>
                            </select>
                        </label>
Krystyna Milian's avatar
Krystyna Milian committed
93

94 95
                        <label for="shelterTypeFilter" class="button button-small button-drop">
                            <select id="shelterTypeFilter">
96 97 98 99
                                <option value="" selected="selected">Shelter Type</option>
                                <option value="" disabled>---</option>
                            </select>
                        </label>
100 101 102 103 104 105 106 107

                        <label for="countryFilter" class="button button-small button-drop">
                            <select id="countryFilter">
                                <option value="" selected="selected">Country</option>
                                <option value="" disabled>---</option>
                            </select>
                        </label>

108 109
                        <!--label for="topographyFilter" class="button button-small button-drop">
                            <select id="topographyFilter">
110 111 112
                                <option value="" selected="selected">Topography</option>
                                <option value="" disabled>---</option>
                            </select>
113 114 115
                        </label-->
                        <label for="isSRURatedFilter" class="button button-small ">
                            <input id="isSRURatedFilter" type="checkbox" value=""> Rated by SRU
116
                        </label>
Krystyna Milian's avatar
Krystyna Milian committed
117 118
                    </div>
                </div>
119 120 121 122 123 124 125 126 127 128 129 130 131 132
            </form>
        </div>
    </section>
    <section class="map">
        <div class="map" id="chart-map" style="width:100%; height:400px;">
        </div>
    </section>
    <section class="tab1" id="tabs">
        <div class="content">
            <ul class="tabs">
                <li class="tab1" onclick="setTab(1)">Shelters</li>
                <li class="tab2" onclick="setTab(2)">Statistics</li>
            </ul>
            <div class="tabcontent tabcontent1">
133
                <div class="shelters" id="shelterList">
Krystyna Milian's avatar
Krystyna Milian committed
134 135
                </div>
            </div>
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
            <div class="tabcontent tabcontent2">
                <div class="stats">
                    <div class="row>">
                        <div class="col-md-6">
                            <div class="row">
                                <div class="col-md-12">

                                    <div class="dc-data-count dc-chart" id="data-count">

                                        <h4> Shelters
                                            <small>
                                                <span class="filter-count"></span> selected out of <span
                                                    class="total-count"></span>
                                                records
                                                |
151
                                                <a id="all" href="#tabs">Reset All</a>
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

                                            </small>
                                        </h4>
                                    </div>

                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-12">
                                    <h5>By Year of Construction
                                        <small><a id="year">reset</a></small>
                                    </h5>
                                    <div class="dc-chart" id="chart-timeline"></div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-4">
                                    <h5>By Zone
                                        <small><a id="zone">reset</a></small>
                                    </h5>
                                    <div class="dc-chart" id="chart-ring-zone"></div>
                                </div>
                                <div class="col-md-4">
                                    <h5>By Crisis
                                        <small><a id="crisis">reset</a></small>
                                    </h5>
                                    <div class="dc-chart" id="chart-ring-crisis"></div>
                                </div>
                                <div class="col-md-4">
                                    <h5>By Climate
                                        <small><a id="climate">reset</a></small>
                                    </h5>
                                    <div class="dc-chart" id="chart-ring-climate"></div>
                                </div>
                            </div>
                            <div class="row">
188
                                <div class="col-md-6">
189 190 191 192
                                    <h5>By Country
                                        <small><a id="country">reset</a></small>
                                    </h5>
                                    <div class="dc-chart" id="chart-bar-country"></div>
193 194 195 196 197 198
                                </div>
                                 <div class="col-md-6">
                                    <h5>By Topography
                                        <small><a id="topography">reset</a></small>
                                    </h5>
                                    <div class="dc-chart" id="chart-topography"></div>
199 200

                                </div>
201

202 203 204
                            </div>
                        </div>
                        <div class="col-md-6">
Krystyna Milian's avatar
Krystyna Milian committed
205

206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228
                            <h4 class="text-right">
                                <small>
                                    <a id="download">Download</a>
                                    |
                                    <a id="share">Share</a>
                                </small>
                            </h4>


                            <table class="table table-bordered table-striped dc-table" id="shelters-table">

                                <thead>
                                <tr class="header">
                                    <th>Id</th>
                                    <th>Name</th>
                                    <th>Zone</th>
                                    <th>Country</th>
                                    <th>Crisis</th>
                                    <th>Climate</th>
                                </tr>
                                </thead>
                            </table>
                        </div>
Krystyna Milian's avatar
Krystyna Milian committed
229

230 231 232 233 234

                    </div>
                </div>
            </div>
            
Krystyna Milian's avatar
Krystyna Milian committed
235
        </div>
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252
    </section>

<script type="text/javascript">
    var setTab = function (tab) {
        document.getElementById("tabs").className = "tab" + tab
    }

    var toggleAdvanced = function () {
        var obj = document.getElementById("advanced")
        if (obj.className == "advanced") {
            obj.className = "advanced open"
        } else {
            obj.className = "advanced"
        }
    }
</script>
<script src="{{ url_for('static', filename = 'js/dashboard.js') }}"></script>
Maarten van der Veen's avatar
Maarten van der Veen committed
253
{% endblock %}