Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filter #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 42 additions & 33 deletions ebpub/ebpub/templates/db/filter.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,52 @@
{% block title %}{% if not filters.filters_for_display %}Search {{ schema.plural_name }}{% else %}{{ schema.plural_name|capfirst }}{% endif %}{% for filter in filters.filters_for_display %} › {{ filter.value }} {% endfor %}{% endblock %}

{% block content %}
<div id="content">

<h1>Search {{ schema.plural_name }}</h1>
<div id="content" class="row">
<div class="row">
<div class="twelve col">
<h1 class="search_title">{% map_icon_img schema %} {{ schema.plural_name }}</h1><span class="for_title">Displaying {% if newsitem_list %} {{ page_start_index|intcomma }}-{{ page_end_index|intcomma }}, page {{ page_number|intcomma }}{% endif %}{% if filters.location %} | {{ filters.location.location_name }}{% endif %}</span>
</div>
</div>
<!-- block extradescription -->
{% block extradescription %}
{%endblock%}
<!-- end block extradescription -->

<div id="schema-detail-link"><a href="{% url ebpub-schema-detail schema.slug %}">Statistics and more ...</a></div>

{% include "db/snippets/filter_left_nav.html" %}
<div id="schema-detail-link"><a href="{% url ebpub-schema-detail schema.slug %}">Statistics and more ...</a></div>
<div id="maintext" class="eight col">
<div id="mapwrapper">
<script type="text/javascript">
{% autoescape off %}
function loadMap() {
var config = {{map_configuration}};
{% if bbox %}
config.bounds = [{{bbox.0}},{{bbox.1}},{{bbox.2}},{{bbox.3}}];
{% else %}
config.center = [{{default_lon}}, {{default_lat}}];
config.zoom = {{default_zoom}};
{% endif %}
return new OBMap(config);
}
{% endautoescape %}
</script>
{% include "richmaps/richmap.html" %}

<div id="maintext">
</div><!--/ #mapwrapper -->
{% if large_map_url %}
<a class="large-map-link" href="{{ large_map_url }}">Explore these items on a larger map</a>
{% endif %}
{% if lookup_descriptions %}
<dl>
{% for lookup in lookup_descriptions %}
<dt>{{ lookup.name }}</dt>
<dd>{{ lookup.description|safe }}</dd>
{% endfor %}
</dl>
{% endif %}

{% if newsitem_list %}

<p>{% map_icon_img schema %} <strong>{{ schema.plural_name|capfirst }} {{ page_start_index|intcomma }}-{{ page_end_index|intcomma }}</strong> (Page {{ page_number|intcomma }})</p>
<p> &nbsp; </p>
<ul>
{% newsitem_list_by_schema newsitem_list ungrouped %}
</ul>
Expand All @@ -32,47 +61,27 @@ <h1>Search {{ schema.plural_name }}</h1>
</ul>
{% endif %}
{% else %}
<h2>No {{ schema.plural_name }} were found for the given search criteria.</h2>
<h2 class="nothing_found">No {{ schema.plural_name }} were found for the given search criteria.</h2>
{% if filters.filters_for_display %}
<p>You might want to try&hellip;</p>
<ul>
<ul class="location_type_list">
{% for filter in filters.filters_for_display %}
<li><a href="{% filter_url filters -filter.slug %}" rel="nofollow">Removing the “{{ filter.label }}” filter</a></li>
{% endfor %}
</ul>
{% endif %}

{% endif %}
</div> <!-- maintext -->

<div id="mapwrapper">
<script type="text/javascript">
{% autoescape off %}
function loadMap() {
var config = {{map_configuration}};
{% if bbox %}
config.bounds = [{{bbox.0}},{{bbox.1}},{{bbox.2}},{{bbox.3}}];
{% else %}
config.center = [{{default_lon}}, {{default_lat}}];
config.zoom = {{default_zoom}};
{% endif %}
return new OBMap(config);
}
{% endautoescape %}
</script>
{% include "richmaps/richmap.html" %}

</div><!--/ #mapwrapper -->
{% if large_map_url %}
<a class="large-map-link" href="{{ large_map_url }}">Explore these items on a larger map</a>
{% endif %}
</div> <!-- maintext -->


<!--
<div class="subscribe-links"><p>what would subscription links on this page point to?</p>
</div> -->
<!-- /# subscribe-links -->

{% include "db/snippets/filter_left_nav.html" %}
</div><!--/ #content -->


{% endblock %}