Skip to content

Commit

Permalink
minor fix for filters questions page when a tag is also selected
Browse files Browse the repository at this point in the history
  • Loading branch information
albogdano committed May 27, 2024
1 parent edf764b commit 08db234
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/main/resources/templates/questions.vm
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@
#macro(questionsTitle)
#if ($tag)
<small>$!lang.get("posts.tagged") <span class="chip tagchip smallText">$!tag</span></small>
#set($tagpath = "/tag/$!tag")
#else
$!lang.get("questions.title") #showcount($itemcount.count)
#set($tagpath = "")
#end
#end

Expand All @@ -78,11 +80,11 @@
<div class="chips-container">
#set($sortarr = {'votes': "", 'newest': "", 'activity': "", 'answered': "", 'unanswered': "", 'unapproved': "", 'filter': ""} )
#setsortbyselection($sortarr 'newest')
<a href="${questionslink}$!{filter}" class="chip $sortarr.newest">$!lang.get("newest")</a>
<a href="${questionslink}$!{filter}?sortby=votes" class="chip $sortarr.votes">$!lang.get("votes")</a>
<a href="${questionslink}$!{filter}?sortby=activity" class="chip $sortarr.activity">$!lang.get("posts.updated")</a>
<a href="${questionslink}$!{filter}?sortby=answered" class="chip $sortarr.answered">$!lang.get("posts.answered")</a>
<a href="${questionslink}$!{filter}?sortby=unanswered" class="chip $sortarr.unanswered">$!lang.get("posts.unanswered")</a>
<a href="${questionslink}${tagpath}$!{filter}" class="chip $sortarr.newest">$!lang.get("newest")</a>
<a href="${questionslink}${tagpath}$!{filter}?sortby=votes" class="chip $sortarr.votes">$!lang.get("votes")</a>
<a href="${questionslink}${tagpath}$!{filter}?sortby=activity" class="chip $sortarr.activity">$!lang.get("posts.updated")</a>
<a href="${questionslink}${tagpath}$!{filter}?sortby=answered" class="chip $sortarr.answered">$!lang.get("posts.answered")</a>
<a href="${questionslink}${tagpath}$!{filter}?sortby=unanswered" class="chip $sortarr.unanswered">$!lang.get("posts.unanswered")</a>

#if ($authenticated)
#if($request.getParameter('sortby'))#set($sortby = "?sortby=$request.getParameter('sortby')")#else#set($sortby = "")#end
Expand Down

0 comments on commit 08db234

Please sign in to comment.