-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbill_detail.html
More file actions
64 lines (61 loc) · 2.17 KB
/
bill_detail.html
File metadata and controls
64 lines (61 loc) · 2.17 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
{% extends 'webiscite/base.html' %}
{% load i18n static %}
{% block sub_title %}
{{ bill.name }}
{% endblock sub_title %}
{% block content %}
<div class="container">
<div class="row">
<div class="col">
<h2>{{ bill }}</h2>
{% if bill.constitutional %}
<a class="card-link link-underline link-underline-opacity-0"
href="{% url 'about' %}#constitution">
<p class="text-info mb-1">{% trans 'Amendment to the Constitution' %}</p>
</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>
</div>
</div>
<div class="row">
<div class="col">
<p>
{{ bill.description }}
{% if bill.author == user and bill.status == bill.Status.OPEN %}
<a href="{{ bill.get_update_url }}">
<i class="bi bi-pencil-square"></i>
</a>
{% endif %}
</p>
<a class="link-underline link-underline-opacity-0"
href="{{ bill.pull_request.diff_link }}"
target="_blank">
Diff:
<span class="text-success">+{{ bill.pull_request.additions }}</span>
<span class="text-danger">-{{ bill.pull_request.deletions }}</span>
</a>
</div>
</div>
<div class="row">
<div class="col-3
{% if bill.status != bill.Status.OPEN %}inactive{% endif %}">{% include 'webiscite/snippets/vote.html' %}</div>
</div>
</div>
{% endblock content %}
{% block inline_javascript %}
{% if user.is_authenticated and bill.status == bill.Status.OPEN %}
<script type="text/javascript" src="{% static 'js/vote.js' %}"></script>
{% endif %}
{% endblock inline_javascript %}