Skip to content

Commit

Permalink
feat: add catalog filter feature flag (#3167)
Browse files Browse the repository at this point in the history
* feat: add catalog filter feature flag

* fix: fmt issues

* fix: some issues

* fix: renamed to enable_catalog_sorting

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
Anas12091101 and pre-commit-ci[bot] authored Sep 30, 2024
1 parent 06b538c commit 9baccb4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cms/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,9 @@ def get_context(self, request, *args, **kwargs): # noqa: ARG002
}
for sorting_option in CatalogSorting
],
enable_catalog_sorting=settings.FEATURES.get(
"ENABLE_CATALOG_SORTING", False
),
)


Expand Down
2 changes: 2 additions & 0 deletions cms/templates/catalog_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ <h1>{{ site_name }}—Professional Development, the MIT Way</h1>
</li>
</ul>
</div>
{% if enable_catalog_sorting %}
<div
class="catalog-sort-by-dropdown dropdown"
id="catalogSortDropdown"
Expand Down Expand Up @@ -163,6 +164,7 @@ <h1>{{ site_name }}—Professional Development, the MIT Way</h1>
{% endfor %}
</div>
</div>
{% endif %}
</div>
<div class="tab-content">
{% if featured_product.program %}
Expand Down

0 comments on commit 9baccb4

Please sign in to comment.