mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
Make row in URL match displayed row
Spreadsheets start at row 1 (the header row), and the values don’t start until row 2. The row numbers in our URLs start at 0, which is a concept that only makes sense to programmers. It’s more predictable and consistent to make the number in the URL match the row number displayed on the page when previewing the spreadsheet.
This commit is contained in:
@@ -60,10 +60,10 @@
|
||||
) %}
|
||||
{% call index_field() %}
|
||||
<span>
|
||||
{% if item.index == preview_row %}
|
||||
{% if (item.index + 2) == preview_row %}
|
||||
{{ item.index + 2 }}
|
||||
{% else %}
|
||||
<a href="{{ url_for('.check_messages', service_id=current_service.id, template_type=template.template_type, upload_id=upload_id, row_index=(item.index)) }}">{{ item.index + 2 }}</a>
|
||||
<a href="{{ url_for('.check_messages', service_id=current_service.id, template_type=template.template_type, upload_id=upload_id, row_index=(item.index + 2)) }}">{{ item.index + 2 }}</a>
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endcall %}
|
||||
|
||||
Reference in New Issue
Block a user