mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04:00
Add row numbers to tables
When a table is showing the contents of a CSV file, it should look something like a spreadsheet. The minimally skeuomorphic way to do this is by adding row numbers. This commit doesn’t - make the row numbers monospace (it’s barely noticeable and doesn’t reflect what actual spreadsheets do) - make the first column heading ‘Row’ (again, doesn’t reflect how actual spreadsheets work, and takes up more valuable space)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
{% from "components/email-message.html" import email_message %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
{% from "components/file-upload.html" import file_upload %}
|
||||
{% from "components/table.html" import list_table, text_field %}
|
||||
{% from "components/table.html" import list_table, text_field, index_field, index_field_heading %}
|
||||
|
||||
{% block page_title %}
|
||||
Send text messages – GOV.UK Notify
|
||||
@@ -39,12 +39,13 @@
|
||||
in your file, like this:
|
||||
</p>
|
||||
|
||||
{% call(item) list_table(
|
||||
{% call(item, row_number) list_table(
|
||||
example,
|
||||
caption="Example",
|
||||
caption_visible=False,
|
||||
field_headings=[recipient_column] + template.placeholders|list
|
||||
field_headings=['1'] + [recipient_column] + template.placeholders|list
|
||||
) %}
|
||||
{{ index_field(row_number) }}
|
||||
{% for column in item %}
|
||||
{{ text_field(column) }}
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user