Skip to content

Commit

Permalink
Merge pull request #291 from Sherwin-14/display
Browse files Browse the repository at this point in the history
Added Sort Functionality to assessments and object library
  • Loading branch information
rmarow authored Oct 9, 2024
2 parents 7802d53 + c5eac61 commit c3461d0
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## v2.3.0 (2024-10-02)

* Add sort functionality to assessments and object library pages
* Allow null performance and criticality ratings on links (db migration ea1181510e10)
* Null performance is displayed as gray
* Null criticality is displayed as a thin line
Expand Down
8 changes: 7 additions & 1 deletion usaon_benefit_tool/templates/assessments.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ <h5>
{% endif %}


<table class='table'>
<table class='table' id="assessment">

<thead>
<tr>
Expand Down Expand Up @@ -87,5 +87,11 @@ <h5>
</tbody>

</table>
{% endblock %}

{% block scripts %}
{{ super() }}

{% import 'macros/datatables.j2' as macros %}
{{ macros.datatable_script() }}
{% endblock %}
2 changes: 2 additions & 0 deletions usaon_benefit_tool/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@
return new bootstrap.Tooltip(tooltipTriggerEl)
})
</script>
<link href="https://cdn.jsdelivr.net/npm/simple-datatables@latest/dist/style.css" rel="stylesheet" type="text/css">
<script src="https://cdn.jsdelivr.net/npm/simple-datatables@latest" type="text/javascript"></script>
{% endblock %}

</body>
2 changes: 1 addition & 1 deletion usaon_benefit_tool/templates/macros/buttons.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class="btn btn-danger text-nowrap"
role="button"
>
{{render_icon('trash3-fill')}} {{text}}
{{text}}
</button>
{%- endmacro -%}

Expand Down
9 changes: 9 additions & 0 deletions usaon_benefit_tool/templates/macros/datatables.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% macro datatable_script() %}
<script>
const dataTable = new simpleDatatables.DataTable("table", {
searchable: true,
fixedHeight: true,
paging: false,
})
</script>
{% endmacro %}
6 changes: 6 additions & 0 deletions usaon_benefit_tool/templates/nodes.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ <h2>{% block title %}Object library{% endblock %}</h1>
<th>Created by</th>
<th>Created time</th>
<th>Updated time</th>
<th></th>
{% endif %}

</tr>
Expand Down Expand Up @@ -92,5 +93,10 @@ <h2>{% block title %}Object library{% endblock %}</h1>
</tbody>

</table>
{% endblock %}

{% block scripts %}
{{ super() }}
{% import 'macros/datatables.j2' as macros %}
{{ macros.datatable_script() }}
{% endblock %}
1 change: 1 addition & 0 deletions usaon_benefit_tool/templates/users.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ <h2>{% block title %}Users{% endblock %}</h1>
show_actions=True,
edit_url=('user.get', [('user_id',':id')]),
) }}

{% endblock %}

0 comments on commit c3461d0

Please sign in to comment.