-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbill_list.html
More file actions
65 lines (62 loc) · 2.63 KB
/
bill_list.html
File metadata and controls
65 lines (62 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{% extends 'webiscite/base.html' %}
{% load i18n static %}
{% block sub_title %}
{{ title }}
{% endblock sub_title %}
{% block content %}
{% for bill in bill_list %}
{% if forloop.counter0|divisibleby:4 %}<div class="row">{% endif %}
<div class="col-sm-12 col-md-6 col-lg-3">
<div class="card text-center mb-4
{% if bill.constitutional %}bg-body-tertiary{% endif %}">
<div class="card-body
{% if bill.status != bill.Status.OPEN %}inactive{% endif %}">
<a class="card-link link-underline link-underline-opacity-0"
href="{{ bill.get_absolute_url }}">
<h5 class="card-title">{{ bill }}</h5>
</a>
{% if bill.constitutional %}
<a class="card-link link-underline link-underline-opacity-0"
href="{% url 'about' %}#constitution">
<span class="text-info mb-1">{% trans 'Amendment to the Constitution' %}</span>
</a>
{% endif %}
{% if bill.status != bill.Status.OPEN %}
<p class="{% if bill.status == bill.Status.APPROVED %}
text-success
{% elif bill.status == bill.Status.DRAFT %}
text-secondary
{% else %}
text-danger
{% endif %}
my-1">{{ bill.get_status_display }}</p>
{% endif %}
<p>
Submitted by: <a href="{% url 'users:detail' bill.author.username %}">{{ bill.author.username }}</a>
</p>
<hr />
<div data-nosnippet class="card-text">{{ bill.description|truncatechars:120 }}</div>
<div class="card-text text-start">
<a class="card-link link-underline link-underline-opacity-0"
href="{{ bill.pull_request.diff_link }}"
target="_blank">
<span class="text-success">+{{ bill.pull_request.additions }}</span>
<span class="text-danger">-{{ bill.pull_request.deletions }}</span>
</a>
</div>
{% include 'webiscite/snippets/vote.html' %}
</div>
</div>
</div>
{% if forloop.counter|divisibleby:4 or forloop.last %}</div>{% endif %}
{% empty %}
<div class="text-center">
<h5 class="mb-1">{{ empty_message }}</h5>
</div>
{% endfor %}
{% endblock content %}
{% block inline_javascript %}
{% if user.is_authenticated %}
<script type="text/javascript" src="{% static 'js/vote.js' %}"></script>
{% endif %}
{% endblock inline_javascript %}