You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some admin-accessible list views for requests have (a) search and (b) pagination capabilities, while others do not. Ensure that all of these views have both.
From a glance, the following do not:
New Project Requests
(MyBRC only) New Vector Project Requests
Project Renewal Requests
(MyBRC only) Secure Directory Requests
(MyBRC only) Service Units Purchase Requests
Avoid duplicating code--refactor common logic so that it is reusable as much as possible. Some reusable constructs may already exist.
The text was updated successfully, but these errors were encountered:
The beginnings of a template (coldfront/templates/common/list_search.html) for de-duplicating logic that I'd started writing a while back:
<divclass="mb-3" id="accordion"><divclass="card"><divclass="card-header"><aid="expand_button" role="button" class="card-link " data-toggle="collapse" href="#collapseOne"><iclass="fas fa-filter" aria-hidden="true"></i> Search
<iid="plus_minus" class="fas {{ list_search_expand_accordion|get_icon }} float-right"></i></a></div><divid="collapseOne" class="collapse {{ list_search_expand_accordion }}" data-parent="#accordion"><divclass="card-body"><formid="filter_form" method="GET" action="{{ list_search_url }}" autocomplete="off">
{{ list_search_form|crispy }}
<inputtype="submit" class="btn btn-primary" value="Search"><buttonid="form_reset_button" type="button" class="btn btn-secondary">Reset</button></form></div></div></div></div><hr>
{% comment %}
- Usage:
- View:
- Add 'expand_list_search_expand_accordion' (str) to context data.
- Set it to 'show' to have the search tool expanded on page load.
- Set it to anything else to have the search tool collapsed on page load.
- Template:
- Define the URL to search against (probably the URL of the current view).
- Define arguments to pass to the URL.
- Include the search tool, passing the URL to it.
- Example code:
{% url 'your-url' optional_args=here as list_search_url %}
{% include 'common/list_search.html' with list_search_url=list_search_url with list_search_form=list_search_form %}
{% endcomment %}
Some admin-accessible list views for requests have (a) search and (b) pagination capabilities, while others do not. Ensure that all of these views have both.
From a glance, the following do not:
Avoid duplicating code--refactor common logic so that it is reusable as much as possible. Some reusable constructs may already exist.
The text was updated successfully, but these errors were encountered: