diff options
author | Dave Arter <davea@mysociety.org> | 2019-11-06 14:40:29 +0000 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2019-12-09 12:50:07 +0000 |
commit | 4fa8d26c9d2a598b832c7787caefa0c8b00614e8 (patch) | |
tree | 13b9701f674aef66091a34cc602f98bc93e2309f | |
parent | c85465dfb39cb219754321b63f006d0633543a0b (diff) |
[TfL] Highlight safety critical reports in list for inspectors
-rw-r--r-- | templates/web/tfl/report/_item_extra_class.html | 3 | ||||
-rw-r--r-- | templates/web/tfl/report/_item_heading.html | 4 | ||||
-rw-r--r-- | web/cobrands/tfl/base.scss | 16 |
3 files changed, 23 insertions, 0 deletions
diff --git a/templates/web/tfl/report/_item_extra_class.html b/templates/web/tfl/report/_item_extra_class.html new file mode 100644 index 000000000..dcecce136 --- /dev/null +++ b/templates/web/tfl/report/_item_extra_class.html @@ -0,0 +1,3 @@ +[%~ IF c.user.has_permission_to('report_inspect', problem.bodies_str_ids) AND problem.get_extra_field_value('safety_critical') == 'yes'; + item_extra_class = item_extra_class _ " item-list__item--safety-critical"; +END ~%] diff --git a/templates/web/tfl/report/_item_heading.html b/templates/web/tfl/report/_item_heading.html new file mode 100644 index 000000000..c9575f0fd --- /dev/null +++ b/templates/web/tfl/report/_item_heading.html @@ -0,0 +1,4 @@ +<h3 class="item-list__heading">[% problem.title | html %]</h3> +[%~ IF c.user.has_permission_to('report_inspect', problem.bodies_str_ids) AND problem.get_extra_field_value('safety_critical') == 'yes' ~%] + <small class="item-list__safety-critical">Safety Critical</small> +[%~ END ~%] diff --git a/web/cobrands/tfl/base.scss b/web/cobrands/tfl/base.scss index 23009706b..5e6f6426f 100644 --- a/web/cobrands/tfl/base.scss +++ b/web/cobrands/tfl/base.scss @@ -297,3 +297,19 @@ ol.big-numbers>li { color: #fff; } } + +/* Safety critical reports */ +.item-list__item--safety-critical { + background-color: #ffb6b6; + + &:hover, &:active { + a { + background-color: #ff9b9b; + } + } + + .item-list__safety-critical { + font-style: normal; + text-transform: uppercase; + } +} |