oacpl/case_law/templates/browser.html

103 lines
4.5 KiB
HTML
Raw Normal View History

2017-09-05 19:29:42 -04:00
{% extends 'base.html' %}
{% load static %}
{% block body %}
2017-09-13 22:03:27 -04:00
<style>
2017-10-02 16:39:46 -04:00
a.cases {
text-decoration: none;
2017-09-13 22:03:27 -04:00
}
2017-10-02 16:39:46 -04:00
.cases .card-body p {
background: -webkit-linear-gradient(#555555, #ffffff);
-webkit-background-clip: text;
color: transparent;
transition: color 0.25s;
2017-09-13 22:03:27 -04:00
}
2017-10-02 16:39:46 -04:00
.cases .card-body p:hover {
color: #555555;
2017-09-13 22:03:27 -04:00
}
</style>
<div class="container-fluid bg-dark-primary">
<div class="row">
<ol class="col-12 mb-0 breadcrumb">
2017-09-05 19:29:42 -04:00
<li class="breadcrumb-item">
2017-09-13 22:03:27 -04:00
<a href="{% url 'home' %}"><i class="fa fa-home"></i></a>
</li>
<li class="breadcrumb-item">
2017-09-14 13:52:39 -04:00
<a href="{% url 'caselaw' %}">Case Law</a>
2017-09-05 19:29:42 -04:00
</li>
{% for item in urls %}
<li class="breadcrumb-item{% if forloop.last %} active{% endif %}">
2017-09-14 13:52:39 -04:00
<a {% if not forloop.last %}href="{% url 'caselaw' %}?path=
2017-09-13 22:03:27 -04:00
{% for item2 in urls %}{% if forloop.counter0 <= forloop.parentloop.counter0 %}{{ item }}{% endif %}{% endfor %}"{% endif %}>
2017-09-05 19:29:42 -04:00
{{ item }}
</a>
</li>
{% endfor %}
</ol>
2017-09-13 22:03:27 -04:00
<div class="col-md-3 text-white pt-5">
<h4>Headings
{% if headingCount > 1 and caseCount > 1 and not filter %}
<span class="text-muted">({{ headingCount }})</span>
{% endif %}
</h4>
<hr style="border-color:#ffffff !important">
{% if headingCount > 1 and caseCount > 1 and not filter %}
2017-09-06 00:28:39 -04:00
{% for heading in headings %}
2017-09-05 19:29:42 -04:00
<div>
2017-09-14 13:52:39 -04:00
<a href="{% url 'caselaw' %}?path={% if url %}{{ url }}/{% endif %}{{ heading }}">
2017-09-13 22:03:27 -04:00
<h4 class="d-inline-block" style="color:#D8D8D8"><i
class="fa fa-folder-open-o"></i> {{ heading }}
</h4>
2017-09-05 19:29:42 -04:00
</a>
</div>
{% endfor %}
<br>
{% endif %}
2017-09-13 22:03:27 -04:00
</div>
<div class="{% if not filter %}col-md-9{% else %}col-12{% endif %} bg-light-blue pt-5">
<h4>Cases <span class="text-muted">({{ caseCount }})</span></h4>
<hr>
<div class="row">
2017-09-06 00:28:39 -04:00
{% for case in cases %}
2017-09-13 22:03:27 -04:00
<a class="col-md-4 col-lg-3 mb-3 cases" target="_blank"
{% if perms.case_law.view_pdf %}href="/media/{{ case.pdf }}"{% endif %}>
<div class="card" style="overflow:hidden;">
<div class="tc">
<div class="card-header">
<span class="text-muted">{{ case.published }}</span>
</div>
<div class="card-body" style="position:relative; height:150px; overflow:hidden;">
<span class="card-text text-secondary">{{ case.synopsis | linebreaks }}</span>
<div class="gradient">
</div>
</div>
<div class="card-footer p-1">
{% for heading in case.headings.all|dictsort:'name' %}
<span class="badge badge-primary">{{ heading.name }}</span>
{% endfor %}
</div>
</div>
</div>
</a>
2017-09-05 19:29:42 -04:00
{% endfor %}
</div>
</div>
</div>
</div>
2017-09-05 22:13:47 -04:00
<script>
2017-09-13 22:03:27 -04:00
$('#search').click(function () {
var selected = $('input.filters').filter(function (i, e) {
2017-09-05 22:13:47 -04:00
return $(e).is(':checked')
2017-09-13 22:03:27 -04:00
}).map(function (i, e) {
2017-09-05 22:13:47 -04:00
return $(e).val()
});
2017-09-14 13:52:39 -04:00
window.location.href = '{% url 'caselaw' %}?filter=' + selected.toArray().join('/');
2017-09-05 22:13:47 -04:00
})
</script>
2017-09-05 19:29:42 -04:00
{% endblock %}