diff options
-rw-r--r-- | templates/web/base/reports/_list-filters-sort.html | 14 | ||||
-rw-r--r-- | templates/web/base/reports/_list-filters.html | 16 |
2 files changed, 16 insertions, 14 deletions
diff --git a/templates/web/base/reports/_list-filters-sort.html b/templates/web/base/reports/_list-filters-sort.html new file mode 100644 index 000000000..c5911e716 --- /dev/null +++ b/templates/web/base/reports/_list-filters-sort.html @@ -0,0 +1,14 @@ +<p class="report-list-filters"> + <label for="sort">[% loc('Sort by') %]</label> + <select class="form-control" name="sort" id="sort"> + [% IF shortlist %] + <option value="shortlist"[% ' selected' IF sort_key == 'shortlist' %]>[% loc('Manual order') %]</option> + [% END %] + <option value="created-desc"[% ' selected' IF sort_key == 'created-desc' %]>[% loc('Newest') %]</option> + <option value="created-asc"[% ' selected' IF sort_key == 'created-asc' %]>[% loc('Oldest') %]</option> + <option value="updated-desc"[% ' selected' IF sort_key == 'updated-desc' %]>[% loc('Recently updated') %]</option> + <option value="updated-asc"[% ' selected' IF sort_key == 'updated-asc' %]>[% loc('Least recently updated') %]</option> + <option value="comments-desc"[% ' selected' IF sort_key == 'comments-desc' %]>[% loc('Most commented') %]</option> + </select> + <input type="submit" name="filter_update" value="[% loc('Go') %]"> +</p> diff --git a/templates/web/base/reports/_list-filters.html b/templates/web/base/reports/_list-filters.html index 08132cef7..0cd477d1f 100644 --- a/templates/web/base/reports/_list-filters.html +++ b/templates/web/base/reports/_list-filters.html @@ -27,20 +27,8 @@ <input type="submit" name="filter_update" value="[% loc('Go') %]"> </p> - <p class="report-list-filters"> - <label for="sort">[% loc('Sort by') %]</label> - <select class="form-control" name="sort" id="sort"> - [% IF shortlist %] - <option value="shortlist"[% ' selected' IF sort_key == 'shortlist' %]>[% loc('Manual order') %]</option> - [% END %] - <option value="created-desc"[% ' selected' IF sort_key == 'created-desc' %]>[% loc('Newest') %]</option> - <option value="created-asc"[% ' selected' IF sort_key == 'created-asc' %]>[% loc('Oldest') %]</option> - <option value="updated-desc"[% ' selected' IF sort_key == 'updated-desc' %]>[% loc('Recently updated') %]</option> - <option value="updated-asc"[% ' selected' IF sort_key == 'updated-asc' %]>[% loc('Least recently updated') %]</option> - <option value="comments-desc"[% ' selected' IF sort_key == 'comments-desc' %]>[% loc('Most commented') %]</option> - </select> - <input type="submit" name="filter_update" value="[% loc('Go') %]"> - </p> + [% PROCESS 'reports/_list-filters-sort.html' %] + [% IF page == 'around' %] <p id="show_old_reports_wrapper" class="report-list-filters[% ' hidden' UNLESS num_old_reports > 0 %]"> <label for="show_old_reports">[% loc('Show older reports') %]</label> |