diff --git a/franklincce/explorer/models.py b/franklincce/explorer/models.py index dd06a43..22c41be 100644 --- a/franklincce/explorer/models.py +++ b/franklincce/explorer/models.py @@ -112,3 +112,24 @@ class LegislativeText(models.Model): def get_lines(self): cls = namedtuple('LegLine', ['linenumber', 'linetext']) return [cls(i + 1, j) for i, j in enumerate(self.text.split('\n'))] + + def is_bill(self): + if self.assembly in [ + "RHB", + "BHB", + "WHB", + "RSB", + "BSB", + "WSB", + "SEN", + "HOU", + ]: + return True + return False + + def is_resolution(self): + if self.assembly in ["RGA", "BGA", "WGA", "GEN"]: + return True + return False + + diff --git a/franklincce/explorer/templates/explorer/all.html b/franklincce/explorer/templates/explorer/all.html index 53aa209..39ff046 100644 --- a/franklincce/explorer/templates/explorer/all.html +++ b/franklincce/explorer/templates/explorer/all.html @@ -1,15 +1,17 @@ {% extends "explorer/base.html" %} {% block content %} -

All legislative texts

- -{% if legislative_texts %} - -{% else %} -

No texts available

-{% endif %} + +
+

All legislative texts

+ {% if legislative_texts %} + + {% else %} +

No texts available

+ {% endif %} +
{% endblock content %} diff --git a/franklincce/explorer/templates/explorer/base.html b/franklincce/explorer/templates/explorer/base.html index 7b60f1e..05dc393 100644 --- a/franklincce/explorer/templates/explorer/base.html +++ b/franklincce/explorer/templates/explorer/base.html @@ -11,7 +11,7 @@ -