Skip to content

Commit

Permalink
fix templates: fix table width issue in download errors and validation
Browse files Browse the repository at this point in the history
The URL column in the Download Errors page has some very long URLs and
as a result the table overflows its container.  This fix sets the
column width to a maximum and clips any overflowing content.  This fix
has also been pre-emptively applied to the validation page.
  • Loading branch information
chrisarridge committed Jan 20, 2025
1 parent 8a0afc8 commit 14cb812
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions iati_dashboard/templates/download.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h2 class="dashboard-panel-heading__title float-start">List of files that fail t
<tr>
<th>Publisher</th>
<th>Registry Dataset</th>
<th>URL</th>
<th style="max-width: 400px; overflow: clip;">URL</th>
<th><a href="https://everything.curl.dev/usingcurl/returns">Error Code</a></th>
</tr>
</thead>
Expand All @@ -31,7 +31,7 @@ <h2 class="dashboard-panel-heading__title float-start">List of files that fail t
<tr>
<td><a href="{{ url('dash-headlines-publisher-detail', args=[publisher]) }}">{{ publisher }}</a></td>
<td><a href="http://iatiregistry.org/dataset/{{ dataset }}">{{ dataset }}</a></td>
<td><a href="{{ err_url }}">{{ err_url|url_to_filename }}</a></td>
<td style="max-width: 400px; overflow: clip;"><a href="{{ err_url }}">{{ err_url|url_to_filename }}</a></td>
<td>{{ code }}</td>
</tr>
{% endfor %}
Expand Down
4 changes: 2 additions & 2 deletions iati_dashboard/templates/validation.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h4><a href="{{ url('dash-headlines-publisher-detail', args=[publisher]) }}" id=
<thead>
<tr>
<th scope="col">Dataset</th>
<th scope="col">URL</th>
<th style="max-width: 300px; overflow: clip;" scope="col">URL</th>
<th scope="col">Validator report</th>
</tr>
</thead>
Expand All @@ -36,7 +36,7 @@ <h4><a href="{{ url('dash-headlines-publisher-detail', args=[publisher]) }}" id=
{% with dataset_name=dataset %}
<tr>
<td><a href="http://iatiregistry.org/dataset/{{ dataset_name }}">{{ dataset_name }}</a></td>
<td>
<td style="max-width: 300px; overflow: clip;">
{% if publisher in ckan and dataset_name in ckan[publisher] %}
<a href="{{ ckan[publisher][dataset_name].resource.url }}">{{ ckan[publisher][dataset_name].resource.url|url_to_filename }}</a>
{% endif %}
Expand Down

0 comments on commit 14cb812

Please sign in to comment.