Skip to content

Commit

Permalink
Merge pull request #1515 from open-data/datatables-label-spaces
Browse files Browse the repository at this point in the history
leave spaces in datatables column labels
  • Loading branch information
RabiaSajjad authored Oct 1, 2024
2 parents ac884ac + 35da478 commit 9a60d2f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changes/1515.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fix: datatables column headings missing spaces
remove broken nbsp-replacement code instead of fixing
(doesn't handle other whitespace characters)
4 changes: 2 additions & 2 deletions ckanext/canada/templates/datatables/datatables_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
{%- set label = 'label_' + h.lang() -%}
{%- set description = 'notes_' + h.lang() -%}
{%- if data_dictionary_labels and field.info is defined and field.info[label]|length -%}
{{ field.info[label]|replace(" ", nbspval) | trim }}
{{ field.info[label] | trim }}
{%- else -%}
{{ field.id|replace(" ", nbspval) }}
{{ field.id }}
{%- endif -%}
 
{%- if data_dictionary_labels and field.info is defined and field.info[description]|length -%}
Expand Down

0 comments on commit 9a60d2f

Please sign in to comment.