mirror of
https://github.com/logos-co/open-law.git
synced 2025-02-03 02:24:45 +00:00
issue change sort copy to Most favorited
#148
This commit is contained in:
parent
02c36ec16a
commit
f3988e2873
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -17,6 +17,7 @@
|
||||
"CLEANR",
|
||||
"CUDA",
|
||||
"Divs",
|
||||
"favorited",
|
||||
"flowbite",
|
||||
"indeterminated",
|
||||
"jsonify",
|
||||
|
@ -5,7 +5,7 @@ from app.controllers import create_pagination
|
||||
|
||||
def sort_by(query, sort: str):
|
||||
match sort:
|
||||
case "favored":
|
||||
case "favorited":
|
||||
query = query.order_by(text("stars_count DESC"))
|
||||
case "upvoted":
|
||||
query = query.order_by(text("score DESC"))
|
||||
|
@ -30,8 +30,8 @@
|
||||
|
||||
{% if selected_tab=='my_library' or selected_tab=='favorite_books' or selected_tab=='explore_books'%}
|
||||
<li>
|
||||
<a href="?sort=favored" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white" >
|
||||
Most favored
|
||||
<a href="?sort=favorited" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white" >
|
||||
Most favorited
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user