diff --git a/opentech/apply/funds/templates/funds/includes/submissions_table.html b/opentech/apply/funds/templates/funds/includes/submissions_table.html new file mode 100644 index 0000000000000000000000000000000000000000..bc2d1c4cd5de0bf07708fceddff2628b200264fe --- /dev/null +++ b/opentech/apply/funds/templates/funds/includes/submissions_table.html @@ -0,0 +1,24 @@ +{% load render_table from django_tables2 %} + +{% if table.data or active_filters %} +<div class="button button--filters button--contains-icons js-open-filters">Filter By</div> + +<div class="filters js-filter-wrapper"> + <div class="filters__header"> + <div class="js-clear-filters">Clear</div> + <div>Filter by</div> + <div class="js-close-filters">Close</div> + </div> + + <form action="" method="get" class="form form--filters"> + <ul class="form__filters select2 js-filter-list"> + {{ filter.form.as_ul }} + <li> + <button class="button button--primary" type="submit" value="Filter">Filter</button> + </li> + </ul> + </form> +</div> +{% endif %} + +{% render_table table %} diff --git a/opentech/apply/funds/templates/funds/submissions.html b/opentech/apply/funds/templates/funds/submissions.html index adf89194bf39019ee4c80427aeab312757190a06..9820b1be69f9160fcb219de5b3093ceac96bac29 100644 --- a/opentech/apply/funds/templates/funds/submissions.html +++ b/opentech/apply/funds/templates/funds/submissions.html @@ -1,5 +1,4 @@ {% extends "base-apply.html" %} -{% load render_table from django_tables2 %} {% load static %} {% block title %}Submissions{% endblock %} @@ -21,29 +20,7 @@ </div> <div class="wrapper wrapper--large wrapper--inner-space-medium"> - - {% if table.data or active_filters %} - <div class="button button--filters button--contains-icons js-open-filters">Filter By</div> - - <div class="filters js-filter-wrapper"> - <div class="filters__header"> - <div class="js-clear-filters">Clear</div> - <div>Filter by</div> - <div class="js-close-filters">Close</div> - </div> - - <form action="" method="get" class="form form--filters"> - <ul class="form__filters select2 js-filter-list"> - {{ filter.form.as_ul }} - <li> - <button class="button button--primary" type="submit" value="Filter">Filter</button> - </li> - </ul> - </form> - </div> - {% endif %} - - {% render_table table %} + {% include "funds/includes/submissions_table.html" with table=table filter=filter active_filters=active_filters %} </div> <a href="#" class="js-open-feed link link--open-feed">