forked from rDrama/rDrama
add effortpost search parameter
parent
179c0fbdf3
commit
8c7cf48df7
|
@ -111,6 +111,7 @@ def searchposts(v):
|
|||
posts = posts.filter(*words)
|
||||
|
||||
if 'nsfw' in criteria: posts = posts.filter(Post.nsfw==True)
|
||||
if 'effortpost' in criteria: posts = posts.filter(Post.effortpost==True)
|
||||
|
||||
if 'domain' in criteria:
|
||||
domain = criteria['domain']
|
||||
|
|
|
@ -90,6 +90,12 @@
|
|||
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this, 'bool')" class="searchparam mb-1">nsfw:true</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if request.path.startswith('/search/posts') %}
|
||||
<div>
|
||||
<div style="display: inline-block; width: 150px; text-align: center">Effortpost:</div>
|
||||
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this, 'bool')" class="searchparam mb-1">effortpost:true</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue