mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-02-02 16:21:32 -08:00
sort replies by 'new' when viewing community by 'active'
This commit is contained in:
parent
d863b637c8
commit
22e4caf548
3 changed files with 20 additions and 20 deletions
|
@ -133,20 +133,6 @@
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% if is_moderator or is_admin %}
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<h2>{{ _('Community Settings') }}</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p><a href="#" class="btn btn-primary">{{ _('Moderate') }}</a></p>
|
||||
<p><a href="#" class="btn btn-primary">{{ _('Settings') }}</a></p>
|
||||
{% if community.is_owner() or current_user.is_admin() %}
|
||||
<p><a class="btn btn-primary btn-warning" href="{{ url_for('community.community_delete', community_id=community.id) }}" rel="nofollow">Delete community</a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if related_communities %}
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
|
@ -166,6 +152,20 @@
|
|||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if is_moderator or is_admin %}
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<h2>{{ _('Community Settings') }}</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p><a href="#" class="btn btn-primary">{{ _('Moderate') }}</a></p>
|
||||
<p><a href="#" class="btn btn-primary">{{ _('Settings') }}</a></p>
|
||||
{% if community.is_owner() or current_user.is_admin() %}
|
||||
<p><a class="btn btn-primary btn-warning" href="{{ url_for('community.community_delete', community_id=community.id) }}" rel="nofollow">Delete community</a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<a href="{{ url_for('activitypub.post_ap', post_id=post.id) }}" class="post_teaser_title_a">{{ post.title }}</a>
|
||||
<a href="{{ url_for('activitypub.post_ap', post_id=post.id, sort='new' if sort == 'active' else None) }}" class="post_teaser_title_a">{{ post.title }}</a>
|
||||
{% if post.type == POST_TYPE_IMAGE %}<span class="fe fe-image"> </span>{% endif %}
|
||||
{% if post.type == POST_TYPE_LINK and post.domain_id %}
|
||||
{% if post.url and 'youtube.com' in post.url %}
|
||||
|
@ -51,8 +51,8 @@
|
|||
</div>
|
||||
<div class="row utilities_row">
|
||||
<div class="col-6">
|
||||
<a href="{{ url_for('activitypub.post_ap', post_id=post.id, _anchor='replies') }}"><span class="fe fe-reply"></span></a>
|
||||
<a href="{{ url_for('activitypub.post_ap', post_id=post.id, _anchor='replies') }}">{{ post.reply_count }}</a>
|
||||
<a href="{{ url_for('activitypub.post_ap', post_id=post.id, sort='new' if sort == 'active' else None, _anchor='post_replies') }}"><span class="fe fe-reply"></span></a>
|
||||
<a href="{{ url_for('activitypub.post_ap', post_id=post.id, sort='new' if sort == 'active' else None, _anchor='post_replies') }}">{{ post.reply_count }}</a>
|
||||
{% if post.type == POST_TYPE_IMAGE %}
|
||||
|
||||
{% if post.image_id %}
|
||||
|
|
|
@ -50,13 +50,13 @@
|
|||
<div id="post_replies" class="row">
|
||||
<div class="col">
|
||||
<div class="btn-group mt-1 mb-2">
|
||||
<a href="?sort=hot#submit" title="{{ _('Sort by magic') }}" class="btn btn-sm {{ 'btn-primary' if request.args.get('sort', '') == '' or request.args.get('sort', '') == 'hot' else 'btn-outline-secondary' }}" rel="nofollow">
|
||||
<a href="?sort=hot#post_replies" title="{{ _('Sort by magic') }}" class="btn btn-sm {{ 'btn-primary' if request.args.get('sort', '') == '' or request.args.get('sort', '') == 'hot' else 'btn-outline-secondary' }}" rel="nofollow">
|
||||
{{ _('Hot') }}
|
||||
</a>
|
||||
<a href="?sort=top#submit" title="{{ _('Comments with the most upvotes') }}" class="btn btn-sm {{ 'btn-primary' if request.args.get('sort', '') == 'top' else 'btn-outline-secondary' }}" rel="nofollow">
|
||||
<a href="?sort=top#post_replies" title="{{ _('Comments with the most upvotes') }}" class="btn btn-sm {{ 'btn-primary' if request.args.get('sort', '') == 'top' else 'btn-outline-secondary' }}" rel="nofollow">
|
||||
{{ _('Top') }}
|
||||
</a>
|
||||
<a href="?sort=new#submit" title="{{ _('Show newest first') }}" class="btn btn-sm {{ 'btn-primary' if request.args.get('sort', '') == 'new' else 'btn-outline-secondary' }}" rel="nofollow">
|
||||
<a href="?sort=new#post_replies" title="{{ _('Show newest first') }}" class="btn btn-sm {{ 'btn-primary' if request.args.get('sort', '') == 'new' else 'btn-outline-secondary' }}" rel="nofollow">
|
||||
{{ _('New') }}
|
||||
</a>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue