Giant refactor
This commit is contained in:
		@@ -14,10 +14,10 @@
 | 
			
		||||
    <div id="search-filters" class="container-fluid bg-dark-primary text-white collapse">
 | 
			
		||||
        <div class="container">
 | 
			
		||||
            <div class="row py-3">
 | 
			
		||||
                {% for header in allHeaders %}
 | 
			
		||||
                {% for heading in allHeadings %}
 | 
			
		||||
                    <div class="col-xs-12 col-sm-6 col-md-4">
 | 
			
		||||
                        <input id="input-{{ header.id }}" class="curs-pointer filters" name="filter" type="checkbox" value="{{ header }}">
 | 
			
		||||
                        <label for="input-{{ header.id }}" class="curs-pointer">{{ header }}</label>
 | 
			
		||||
                        <input id="input-{{ heading.id }}" class="curs-pointer filters" name="filter" type="checkbox" value="{{ heading }}">
 | 
			
		||||
                        <label for="input-{{ heading.id }}" class="curs-pointer">{{ heading }}</label>
 | 
			
		||||
                    </div>
 | 
			
		||||
                {% endfor %}
 | 
			
		||||
                <div class="col-12">
 | 
			
		||||
@@ -53,24 +53,24 @@
 | 
			
		||||
            {% endif %}
 | 
			
		||||
            <div class="row p-3">
 | 
			
		||||
                <div class="col-lg-12 ml-auto text-dark-primary">
 | 
			
		||||
                    {% if headersCount > 1 and decisionsCount > 1 and not filter %}
 | 
			
		||||
                    {% if headingCount > 1 and headingCount > 1 and not filter %}
 | 
			
		||||
                        <h4>Headings</h4>
 | 
			
		||||
                        <hr>
 | 
			
		||||
                        {% for header in headers %}
 | 
			
		||||
                        {% for heading in headings %}
 | 
			
		||||
                            <div>
 | 
			
		||||
                                <a href="{% url 'browser' %}?path={% if url %}{{ url }}/{% endif %}{{ header }}">
 | 
			
		||||
                                    <h4 class="d-inline-block"><i class="fa fa-folder-open-o"></i> {{ header }}</h4>
 | 
			
		||||
                                <a href="{% url 'browser' %}?path={% if url %}{{ url }}/{% endif %}{{ heading }}">
 | 
			
		||||
                                    <h4 class="d-inline-block"><i class="fa fa-folder-open-o"></i> {{ heading }}</h4>
 | 
			
		||||
                                </a>
 | 
			
		||||
                            </div>
 | 
			
		||||
                        {% endfor %}
 | 
			
		||||
                        <br>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                    <h4>Decisions</h4>
 | 
			
		||||
                    <h4>Cases</h4>
 | 
			
		||||
                    <hr>
 | 
			
		||||
                    {% for decision in decisions %}
 | 
			
		||||
                    {% for case in cases %}
 | 
			
		||||
                        <div>
 | 
			
		||||
                            <a href="{% url 'case' decision.id %}">
 | 
			
		||||
                                <h4 class="d-inline-block"><i class="fa fa-file-text-o"></i> {{ decision.synopsis }}</h4>
 | 
			
		||||
                            <a href="{% url 'case' case.id %}">
 | 
			
		||||
                                <h4 class="d-inline-block"><i class="fa fa-file-text-o"></i> {{ case.synopsis }}</h4>
 | 
			
		||||
                            </a>
 | 
			
		||||
                        </div>
 | 
			
		||||
                    {% endfor %}
 | 
			
		||||
@@ -80,7 +80,7 @@
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="container-fluid bg-dark-primary p-2">
 | 
			
		||||
        <div class="container text-white">
 | 
			
		||||
            {% if headersCount %}{{ headersCount }} Headers, {% endif %}{{ decisionsCount }} Decision{% if decisionsCount > 1 %}s{% endif %}
 | 
			
		||||
            {% if headingCount %}{{ headingCount }} Headings, {% endif %}{{ caseCount }} Case{% if caseCount > 1 %}s{% endif %}
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										19
									
								
								case_law/templates/case.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								case_law/templates/case.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,19 @@
 | 
			
		||||
{% extends 'base.html' %}
 | 
			
		||||
{% load static %}
 | 
			
		||||
 | 
			
		||||
{% block body %}
 | 
			
		||||
    <div class="container-fluid bg-light-blue py-3">
 | 
			
		||||
        <div class="container">
 | 
			
		||||
            <h3 class="text-dark-primary">Synopsis</h3>
 | 
			
		||||
            {% for heading in headings %}
 | 
			
		||||
                <span class="badge badge-primary">{{ heading }}</span>
 | 
			
		||||
            {% endfor %}
 | 
			
		||||
            <p>{{ case.synopsis | linebreaks }}</p>
 | 
			
		||||
            <h6 class="text-muted">Published: {{ case.published }}</h6>
 | 
			
		||||
            {% if perms.case_law.view_pdf %}
 | 
			
		||||
                <a href="/media/{{ case.pdf }}">View PDF</a>
 | 
			
		||||
                <br>
 | 
			
		||||
            {% endif %}
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
@@ -1,19 +0,0 @@
 | 
			
		||||
{% extends 'base.html' %}
 | 
			
		||||
{% load static %}
 | 
			
		||||
 | 
			
		||||
{% block head %}
 | 
			
		||||
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block body %}
 | 
			
		||||
    <div class="container-fluid bg-light-blue py-3">
 | 
			
		||||
        <div class="container">
 | 
			
		||||
            <h1>Synopsis</h1>
 | 
			
		||||
            <h6 class="text-muted">Date: {{ decision.date }}</h6>
 | 
			
		||||
            <p>{{ decision.synopsis | linebreaks }}</p>
 | 
			
		||||
            {% if perms.case_law.view_pdf %}
 | 
			
		||||
                <a href="/media/{{ decision.pdf }}">View PDF</a>
 | 
			
		||||
            {% endif %}
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
		Reference in New Issue
	
	Block a user