mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 11:26:56 -08:00
improve mobile navigation in communities
This commit is contained in:
parent
dcb340f9cf
commit
6573d25dd3
3 changed files with 28 additions and 5 deletions
|
@ -20,14 +20,14 @@
|
|||
{% endif -%}
|
||||
</div>
|
||||
<form method="get" action="/search">
|
||||
<input type="search" name="q" class="form-control mt-2" placeholder="{{ _('Search this community') }}" />
|
||||
<input type="search" id="search_community" name="q" class="form-control mt-2" placeholder="{{ _('Search this community') }}" />
|
||||
<input type="hidden" name="community" value="{{ community.id }}">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block about_community %}
|
||||
<div class="card mt-3">
|
||||
<div class="card mt-3" id="about_community">
|
||||
<div class="card-header">
|
||||
<h2>{{ community.title }}</h2>
|
||||
</div>
|
||||
|
|
|
@ -1,8 +1,31 @@
|
|||
{% if community %}
|
||||
{% if not community.restricted_to_mods or (community.restricted_to_mods and current_user.is_authenticated and community_membership(current_user, community) in [SUBSCRIPTION_MODERATOR, SUBSCRIPTION_OWNER]) %}
|
||||
<div class="mobile_create_post d-md-none mt-1">
|
||||
|
||||
<a class="btn btn-primary" href="/community/{{ community.link() }}/submit">{{ _('Create post') }}</a>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
{{ _('Actions') }}
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="/community/{{ community.link() }}/submit">{{ _('Create post') }}</a></li>
|
||||
<li><a class="dropdown-item" href="#search_community">{{ _('Search') }}</a></li>
|
||||
<li><a class="dropdown-item" href="#about_community">{{ _('About community') }}</a></li>
|
||||
<div class="dropdown-divider"></div>
|
||||
{% if current_user.is_authenticated and community_membership(current_user, community) in [SUBSCRIPTION_MEMBER, SUBSCRIPTION_MODERATOR, SUBSCRIPTION_OWNER] -%}
|
||||
<li><a class="dropdown-item" href="/community/{{ community.link() }}/unsubscribe" rel="nofollow">{{ _('Leave') }}</a></li>
|
||||
{% elif current_user.is_authenticated and community_membership(current_user, community) == SUBSCRIPTION_PENDING -%}
|
||||
<li><a class="dropdown-item" href="/community/{{ community.link() }}/unsubscribe" rel="nofollow">{{ _('Pending') }}</a></li>
|
||||
{% else -%}
|
||||
<li><a class="dropdown-item" href="/community/{{ community.link() }}/subscribe" rel="nofollow">{{ _('Join') }}</a></li>
|
||||
{% endif -%}
|
||||
{% if is_moderator or is_owner or is_admin -%}
|
||||
<div class="dropdown-divider"></div>
|
||||
<li><a class="dropdown-item" href="/community/{{ community.link() }}/moderate">{{ _('Moderate') }}</a></li>
|
||||
{% endif -%}
|
||||
{% if is_owner or is_admin -%}
|
||||
<li><a class="dropdown-item" href="{{ url_for('community.community_edit', community_id=community.id) }}">{{ _('Settings') }}</a></li>
|
||||
{% endif -%}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<td>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Actions
|
||||
{{ _('Actions') }}
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{% if user.is_local() %}<li><a class="dropdown-item" href="/chat/{{ user.id }}/new">Send Message</a></li>{% endif %}
|
||||
|
|
Loading…
Reference in a new issue