Skip to content

Commit 3bcd740

Browse files
committed
added missing filter on questions page for listing questions with accepted answer
1 parent 100827e commit 3bcd740

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/main/resources/lang_en.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ posts.locationtxt = You can ask local questions in your native language.
378378
posts.unanswered = Unanswered
379379
posts.unapproved = Unapproved
380380
posts.unaccepted = Questions with no accepted answer
381+
posts.accepted = Questions with an accepted answer
381382
posts.unapprovedq = Unapproved questions
382383
posts.sticky = Pinned questions
383384
posts.lastedited = Last edited

src/main/resources/templates/questions.vm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,14 @@
211211
#if($questionsTypeFilter == $prop)selected#end
212212
#end
213213
#set($unacceptedQuery = $utils.urlEncode("properties.answercount:[1 TO *] NOT properties.answerid:[* TO *]") )
214+
#set($acceptedQuery = $utils.urlEncode("properties.answercount:[1 TO *] AND properties.answerid:[* TO *]") )
214215
<select name="typeFilter">
215216
<option value="" #filterselected("")>$!lang.get('showall')</option>
216217
<option value="type:question" #filterselected("type:question")>$!lang.get('questions.title')</option>
217218
<option value="type:sticky" #filterselected("type:sticky")>$!lang.get('posts.sticky')</option>
218219
<option value="type:unapprovedquestion" #filterselected("type:unapprovedquestion")>$!lang.get('posts.unapprovedq')</option>
219220
<option value="$unacceptedQuery" #filterselected($unacceptedQuery)>$!lang.get('posts.unaccepted')</option>
221+
<option value="$acceptedQuery" #filterselected($acceptedQuery)>$!lang.get('posts.accepted')</option>
220222
</select>
221223
</div>
222224
</div>

0 commit comments

Comments
 (0)