ojuso-map/apps/map/templates/map/detail.html

567 lines
16 KiB
HTML

{% extends "base_with_jumbo.html" %}
{% load bootstrap3 %}
{% load compress %}
{% load i18n %}
{% load leaflet_tags %}
{% load humanize %}
{% block stylesheets %}
{{ super }}
{% leaflet_css %}
<style>
body { font-size: 16px; }
.col--header {
background-color: #e3f3fd;
padding: 0 40px;
}
.btn--back { margin: 15px 0; padding-left: 20px; left: -10px; position: absolute; }
#case-location {
height: 400px;
}
.case-mediacoverage a {
display: block;
}
.footer {
background-color: #444;
color: #ddd;
padding-top: 1em;
margin-top: 5em;
}
.linklist {
list-style-type: none;
text-align: right;
margin-left: 0;
padding-left: 0;
}
.linklist a {
color: #ddd;
text-decoration: underline;
}
.linklist a:hover {
color: #bbb;
}
.linklist-item--spacer {
margin-top: 1em;
}
dt { font-weight: bold; }
dd { margin-left: 2em; }
dd ul { padding-left: 0; margin-left: 0; }
</style>
{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2 col--header">
<button class="btn btn-info btn--back" onclick="window.history.back()" role="button"><i class="fa fa-arrow-left" aria-hidden="true"></i> {% trans "Back to Map" %}</button>
<div style="margin-top: 70px;">
<h1>{{ case_study.entry_name }}</h1>
</div>
<div class="clearfix">
<span class="label label-default">
{{ case_study.get_sector_of_economy_display }}
</span>&nbsp;
{% if case_study.positive_or_negative == "P" %}
<span class="label label-success">
{{ case_study.get_positive_or_negative_display }}
</span>&nbsp;
{% elif case_study.positive_or_negative == "N" %}
<span class="label label-danger">
{{ case_study.get_positive_or_negative_display }}
</span>&nbsp;
{% endif %}
<span class="label label-default">
{{ case_study.get_project_status_display }}
</span>&nbsp;
<span class="label label-info">
{{ case_study.country.name }}
</span>
</div>
<p class="text-muted"><small>Case study created {{case_study.date_created | naturaltime}}</small>
<p>{{ case_study.synopsis }}</p>
<figure style="text-align: center; margin-top: 20px; margin-bottom: 20px;">
<img src="{{ case_study.image.url }}" width="100%">
<figcaption>
{% if case_study.image_caption %}
{{ case_study.image_caption }}<br>
{% endif %}
{% if case_study.image_credit %}
<i>{% trans "Credit(s)" %}: {{ case_study.image_credit }}</i>
{% endif %}
</figcaption>
</figure>
</div>
</div> <!-- end row -->
<div class="row" style="padding-top:30px;">
<div class="col-md-8 col-md-offset-2">
<h2>Contents</h2>
<p>...
<h2>Description</h2>
{{ case_study.full_description | linebreaks }}
<h2>{% trans "Affected land" %}</h2>
<dl>
{% if case_study.country %}
<dt>{% trans "Country" %}:
<dd>{{ case_study.get_country_display }}
{% endif %}
{% if case_study.location_context %}
<dt>{% trans "Rural or urban" %}:
<dd>{{ case_study.get_location_context_display }}
{% endif %}
{% if case_study.area_of_land %}
<dt>{% trans "Approximate land area" %}:
<dd>{{ case_study.area_of_land }} km²
{% endif %}
{% if case_study.land_ownership %}
<dt>{% trans "Land ownership" %}:
{% if case_study.land_ownership == 'OTH' %}
<dd>{{ case_study.land_ownership_details }}
{% else %}
<dd>{{ case_study.get_land_ownership_display }}
{% endif %}
{% endif %}
{% if case_study.type_of_ecosystem %}
<dt>{% trans "Type of ecosystem" %}:
<dd>{{ case_study.get_type_of_ecosystem_display }}
{% endif %}
{% if case_study.describe_ecosystem %}
<dt>{% trans "Description of ecosystem" %}:
<dd>{{ case_study.describe_ecosystem | linebreaks }}
{% endif %}
</dl>
{% if case_study.affects_indigenous %}
<h2>{% trans "Affected groups of indigenous people" %}</h2>
{{ case_study.affects_indigenous_detail | linebreaks }}
{% endif %}
<h2>Project status</h2>
<dl>
{% if case_study.project_status %}
<dt>{% trans "Status" %}:
<dd id="project_status">{{ case_study.get_project_status_display }}
{% endif %}
{% if case_study.start_year %}
<dt>{% trans "Start year" %}:
<dd id="start_year">{{ case_study.start_year }}
{% endif %}
{% if case_study.completion_year %}
<dt>{% trans "Completion year" %}:
<dd id="completion_year">{{ case_study.completion_year }}
{% endif %}
{% if case_study.project_owners %}
<dt>{% trans "Project and facility owners" %}:
<dd id="project_owners">{{ case_study.project_owners }}
{% endif %}
{% if case_study.shareholders %}
<dt>{% trans "Shareholders of the project owners" %}:
<dd id="shareholders">{{ case_study.shareholders }}
{% endif %}
{% if case_study.financial_institutions %}
<dt>{% trans "Financial institutions" %}:
<dd id="financial_institutions">{{ case_study.financial_institutions }}
{% endif %}
{% if case_study.energy_customers %}
<dt>{% trans "Energy consumers" %}:
<dd id="energy_customers">{{ case_study.energy_customers }}
{% endif %}
</dl>
<h2>Multimedia</h2>
<figure>
<div class="embed-responsive embed-responsive-16by9">
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/{{ case_study.get_video_id }}?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>
</div>
<figcaption>
{% if case_study.video_caption %}
{{ case_study.video_caption }}<br>
{% endif %}
{% if case_study.video_credit %}
<i>{% trans "Credit(s)" %}: {{ case_study.video_credit }}</i>
{% endif %}
</figcaption>
</figure>
{% if case_study.media_coverage_mainstream or case_study.media_coverage_independent or case_study.social_media_links %}
<div class="case-mediacoverage">
<h2>{% trans "Media coverage" %}</h2>
{% if case_study.media_coverage_mainstream %}
<h3>{% trans "Mainstream media" %}</h3>
{{ case_study.media_coverage_mainstream | urlize }}
{% endif %}
{% if case_study.media_coverage_independent %}
<h3>{% trans "Independent/grassroots media" %}</h3>
{{ case_study.media_coverage_independent | urlize }}
{% endif %}
{% if case_study.social_media_links %}
<h3>{% trans "Social media" %}</h3>
{{ case_study.social_media_links | urlize }}
{% endif %}
</div>
{% endif %}
<h2>{% trans "Community Voices" %}</h2>
{{ case_study.community_voices | linebreaks }}
{% if case_study.direct_comms %}
<h2>{% trans "Reports of direct communications" %}</h2>
{{ case_study.direct_comms | linebreaks }}
{% endif %}
<h1>Technical and economic analysis</h1>
{% if case_study.sector_of_economy == 'RN' %}
<!-- renewables / 2.1 -->
<dl>
{% if case_study.generation_technology %}
<dt>{% trans "Generation technology" %}:
<dd id="generation_technology">
{{ case_study.get_renewable_generation_detail }}
{% endif %}
{% if case_study.generation_technology == 'BIOG' or case_study.generation_technology == 'OTHB' %}
<dt>{% trans "Feedstock" %}:
<dd id="biomass_detail">
{{ case_study.biomass_detail }}
{% endif %}
{% if case_study.total_generation_capacity %}
<dt>{% trans "Total generation capacity" %}:
<dd id="total_generation_capacity">
{{ case_study.total_generation_capacity }} kW
{% endif %}
{% if case_study.generation_equipment_supplier %}
<dt>{% trans "Generation equipment supplier" %}:
<dd id="generation_equipment_supplier">
{{ case_study.generation_equipment_supplier }}
{% endif %}
{% if case_study.total_investment %}
<dt>{% trans "Approximate total investment" %}:
<dd id="total_investment">
${{ case_study.total_investment | intcomma }} (USD)
{% endif %}
{% if case_study.technical_or_economic_details %}
<dt>{% trans "Additional technical or economic details" %}:
<dd id="technical_or_economic_details">
{{ case_study.technical_or_economic_details | linebreaks }}
{% endif %}
</dl>
{% elif case_study.sector_of_economy == 'PG' %}
<!-- batteries or storage / 2.2 -->
<dl>
{% if case_study.power_technology %}
<dt>{% trans "Generation technology" %}:
<dd id="power_technology">
{% if case_study.power_technology == 'OT' %}
{{ case_study.power_technology_other }}
{% else %}
{{ case_study.power_technology }}
{% endif %}
{% endif %}
{% if case_study.energy_storage_capacity %}
<dt>{% trans "Energy storage capacity" %}:
<dd id="energy_storage_capacity">
{{ case_study.energy_storage_capacity }} TODO UNITS?
{% endif %}
{% if case_study.maximum_power_output %}
<dt>{% trans "Maximum power output" %}:
<dd id="maximum_power_output">
{{ case_study.maximum_power_output | intcomma }} W
{% endif %}
{% if case_study.discharge_time %}
<dt>{% trans "Time for discharge from full capacity" %}:
<dd id="discharge_time">
{{ case_study.discharge_time | intcomma }} {% trans "seconds" %}
{% endif %}
{% if case_study.contractor_or_supplier_of_technology %}
<dt>{% trans "Contractor and/or supplier of technology" %}:
<dd id="contractor_or_supplier_of_technology">
{{ case_study.contractor_or_supplier_of_technology }}
{% endif %}
{% if case_study.approximate_total_investment %}
<dt>{% trans "Approximate total investment" %}:
<dd id="approximate_total_investment">
${{ case_study.approximate_total_investment | intcomma }} (USD)
{% endif %}
{% if case_study.additional_technical_details %}
<dt>{% trans "Additional technical or economic details" %}:
<dd id="additional_technical_details">
{{ case_study.additional_technical_details | linebreaks }}
{% endif %}
</dl>
{% elif case_study.sector_of_economy == 'SM' %}
<!-- minerals / 2.3 -->
<dl>
{% if case_study.minerals_or_commodities %}
<dt>{% trans "Mineral commodity/commodities" %}:
<dd id="minerals_or_commodities">
{% if case_study.minerals_or_commodities == 'OTR' %}
{{ case_study.minerals_or_commodities_other }}
{% else %}
{{ case_study.get_minerals_or_commodities_display }}
{% endif %}
{% endif %}
{% if case_study.use_in_energy_economy %}
<dt>{% trans "Potential use in renewable energy economy" %}:
<dd id="use_in_energy_economy">
{% if case_study.use_in_energy_economy == 'OTR' %}
{{ case_study.use_in_energy_economy_other }}
{% else %}
{{ case_study.get_use_in_energy_economy_display }}
{% endif %}
{% endif %}
{% if case_study.project_life_span %}
<dt>{% trans "Project life span" %}:
<dd id="project_life_span">
{{ case_study.project_life_span }}
{% endif %}
{% if case_study.size_of_concessions %}
<dt>{% trans "Size of concessions" %}:
<dd id="size_of_concessions">
{{ case_study.size_of_concessions }}
{% endif %}
{% if case_study.projected_production_of_commodities %}
<dt>{% trans "Projected production of key commodities" %}:
<dd id="projected_production_of_commodities">
{{ case_study.projected_production_of_commodities }}
{% endif %}
{% if case_study.type_of_extraction %}
<dt>{% trans "Type of extraction" %}:
<dd id="type_of_extraction">
{{ case_study.get_type_of_extraction_display }}
{% endif %}
{% if case_study.associated_infrastructure %}
<dt>{% trans "Type of extraction" %}:
<dd id="associated_infrastructure">
{{ case_study.associated_infrastructure }}
{% endif %}
</dl>
{% endif %}
<h2>Socio-economic analysis</h2>
<dl>
<dt>{% trans "Case type" %}
<dd>{{ case_study.get_positive_or_negative_display }}
{% if case_study.positive_or_negative == "P" %}
<!-- positive case -->
{% if case_study.positive_case_type %}
<dt>{% trans "Type of positive case" %}:
<dd id="positive_case_type">
{{ case_study.get_positive_case_type_display }}
{% endif %}
{% if case_study.socioeconomic_benefits %}
<dt>{% trans "Socio-economic benefits" %}:
<dd id="socioeconomic_benefits">
{{ case_study.socioeconomic_benefits }}
{% endif %}
{% if case_study.key_actors_involved %}
<dt>{% trans "Key actors involved" %}:
<dd id="key_actors_involved">
{{ case_study.key_actors_involved }}
{% endif %}
{% if case_study.project_status_detail %}
<dt>{% trans "Current status of project" %}:
<dd id="project_status_detail">
{{ case_study.project_status_detail }}
{% endif %}
{% if case_study.obstacles_and_hindrances %}
<dt>{% trans "Obstacles and hindrances" %}:
<dd id="obstacles_and_hindrances">
{{ case_study.obstacles_and_hindrances }}
{% endif %}
{% if case_study.identified_partnerships %}
<dt>{% trans "Identified partnerships" %}:
<dd id="identified_partnerships">
{{ case_study.identified_partnerships }}
{% endif %}
{% else %}
<!-- negative case -->
{% if case_study.negative_case_reasons %}
<dt>{% trans "Reasons this is a negative case study" %}:
<dd id="negative_case_reasons">
<ul>
{% for text in case_study.get_negative_case_reasons_no_other %}
<li>{{ text }}
{% endfor %}
{% if case_study.negative_case_reasons_other %}
<li>{{ case_study.negative_case_reasons_other }}
{% endif %}
</ul>
{% endif %}
{% if case_study.negative_socioenvironmental_impacts %}
<dt>{% trans "Negative socio-environmental impacts" %}:
<dd id="negative_socioenvironmental_impacts">
{{ case_study.negative_socioenvironmental_impacts }}
{% endif %}
{% if case_study.isolated_or_widespread %}
<dt>{% trans "Isolated or commonplace" %}:
<dd id="isolated_or_widespread">
{{ case_study.isolated_or_widespread }}
{% endif %}
{% if case_study.when_did_organising_start %}
<dt>{% trans "Local organising efforts began" %}:
<dd id="when_did_organising_start">
{{ case_study.when_did_organising_start }}
{% endif %}
{% if case_study.who_has_been_involved %}
<dt>{% trans "Communities, groups and organisations involved" %}:
<dd id="who_has_been_involved">
{{ case_study.who_has_been_involved }}
{% endif %}
{% if case_study.potential_partnerships %}
<dt>{% trans "Potential partnerships" %}:
<dd id="potential_partnerships">
{{ case_study.potential_partnerships }}
{% endif %}
{% endif %}
</dl>
<h2>Related documents</h2>
{% if case_study.official_project_documents %}
<p>Official documents: {{ case_study.official_project_documents.url }}
{% endif %}
{% if case_study.other_documents %}
<p>Other documents: {{ case_study.other_documents.url }}
{% endif %}
<h2>Location / GIS data</h2>
{% leaflet_map "case_location" callback="window.map_init" %}
{% if case_study.shapefiles %}
<p>Shapefiles: {{ case_study.shapefiles.url }}
{% endif %}
{% if case_study.coordinate_reference_system %}
<p>Coordinate reference system: {{ coordinate_reference_system }}
{% endif %}
{% if case_study.name_of_territory_or_area %}
<p>Name of territory or area: {{ case_study.name_of_territory_or_area }}
{% endif %}
</div>
</div>
</div>
<footer class="footer">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<ul class="linklist">
<li><a href="{% url 'index' %}">Map of all case studies</a>
<li><a href="/about">About us</a>
<li class="linklist-item--spacer">&copy; Ojuso 2018
</ul>
</div>
</div>
</div>
</footer>
{% endblock %}
{% block scripts %}
{% leaflet_js %}
<script>
function map_init(map, options) {
var latlng = L.latLng(
{{ case_study.location.coords | last }},
{{ case_study.location.coords | first }}
);
map.setView(latlng, 6);
L.marker(latlng).addTo(map);
}
</script>
{% endblock %}