mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-04 16:09:54 +00:00
Merge pull request #2337 from bookwyrm-social/invite-table-scroll
Makes the invite request table side scroll for mobile
This commit is contained in:
commit
16c92a62c4
1 changed files with 76 additions and 74 deletions
|
@ -28,86 +28,88 @@
|
||||||
|
|
||||||
{% include 'settings/invites/invite_request_filters.html' %}
|
{% include 'settings/invites/invite_request_filters.html' %}
|
||||||
|
|
||||||
<table class="table is-striped is-fullwidth">
|
<div class="table-container content scroll-x">
|
||||||
{% url 'settings-invite-requests' as url %}
|
<table class="table is-striped is-fullwidth">
|
||||||
<tr>
|
{% url 'settings-invite-requests' as url %}
|
||||||
<th>
|
<tr>
|
||||||
{% trans "Date requested" as text %}
|
<th>
|
||||||
{% include 'snippets/table-sort-header.html' with field="created_date" sort=sort text=text %}
|
{% trans "Date requested" as text %}
|
||||||
</th>
|
{% include 'snippets/table-sort-header.html' with field="created_date" sort=sort text=text %}
|
||||||
<th>
|
</th>
|
||||||
{% trans "Date accepted" as text %}
|
<th>
|
||||||
{% include 'snippets/table-sort-header.html' with field="invite__invitees__created_date" sort=sort text=text %}
|
{% trans "Date accepted" as text %}
|
||||||
</th>
|
{% include 'snippets/table-sort-header.html' with field="invite__invitees__created_date" sort=sort text=text %}
|
||||||
<th>{% trans "Email" %}</th>
|
</th>
|
||||||
{% if site.invite_request_question %}
|
<th>{% trans "Email" %}</th>
|
||||||
<th>{% trans "Answer" %}</th>
|
{% if site.invite_request_question %}
|
||||||
{% endif %}
|
<th>{% trans "Answer" %}</th>
|
||||||
<th>
|
|
||||||
{% trans "Status" as text %}
|
|
||||||
{% include 'snippets/table-sort-header.html' with field="invite__times_used" sort=sort text=text %}
|
|
||||||
</th>
|
|
||||||
<th>{% trans "Action" %}</th>
|
|
||||||
</tr>
|
|
||||||
{% if not requests %}
|
|
||||||
<tr><td colspan="5"><em>{% trans "No requests" %}</em></td></tr>
|
|
||||||
{% endif %}
|
|
||||||
{% for req in requests %}
|
|
||||||
<tr>
|
|
||||||
<td>{{ req.created_date | naturaltime }}</td>
|
|
||||||
<td>{{ req.invite.invitees.first.created_date | naturaltime }}</td>
|
|
||||||
<td>{{ req.email }}</td>
|
|
||||||
{% if site.invite_request_question %}
|
|
||||||
<td>{{ req.answer }}</td>
|
|
||||||
{% endif %}
|
|
||||||
<td>
|
|
||||||
{% if req.invite.times_used %}
|
|
||||||
{% trans "Accepted" %}
|
|
||||||
{% elif req.invite %}
|
|
||||||
{% trans "Sent" %}
|
|
||||||
{% else %}
|
|
||||||
{% trans "Requested" %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
<th>
|
||||||
<td><div class="field is-grouped">
|
{% trans "Status" as text %}
|
||||||
{# no invite OR invite not yet used #}
|
{% include 'snippets/table-sort-header.html' with field="invite__times_used" sort=sort text=text %}
|
||||||
{% if not req.invite.times_used %}
|
</th>
|
||||||
<form name="send-invite" method="post">
|
<th>{% trans "Action" %}</th>
|
||||||
{% csrf_token %}
|
</tr>
|
||||||
<input type="hidden" name="invite-request" value="{{ req.id }}">
|
{% if not requests %}
|
||||||
{% if not req.invite %}
|
<tr><td colspan="5"><em>{% trans "No requests" %}</em></td></tr>
|
||||||
<button type="submit" class="button is-link is-light is-small">{% trans "Send invite" %}</button>
|
{% endif %}
|
||||||
|
{% for req in requests %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ req.created_date | naturaltime }}</td>
|
||||||
|
<td>{{ req.invite.invitees.first.created_date | naturaltime }}</td>
|
||||||
|
<td>{{ req.email }}</td>
|
||||||
|
{% if site.invite_request_question %}
|
||||||
|
<td>{{ req.answer }}</td>
|
||||||
|
{% endif %}
|
||||||
|
<td>
|
||||||
|
{% if req.invite.times_used %}
|
||||||
|
{% trans "Accepted" %}
|
||||||
|
{% elif req.invite %}
|
||||||
|
{% trans "Sent" %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<button type="submit" class="button is-link is-light is-small">{% trans "Re-send invite" %}</button>
|
{% trans "Requested" %}
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td><div class="field is-grouped">
|
||||||
|
{# no invite OR invite not yet used #}
|
||||||
|
{% if not req.invite.times_used %}
|
||||||
|
<form name="send-invite" method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
<input type="hidden" name="invite-request" value="{{ req.id }}">
|
||||||
|
{% if not req.invite %}
|
||||||
|
<button type="submit" class="button is-link is-light is-small">{% trans "Send invite" %}</button>
|
||||||
|
{% else %}
|
||||||
|
<button type="submit" class="button is-link is-light is-small">{% trans "Re-send invite" %}</button>
|
||||||
|
{% endif %}
|
||||||
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</form>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{# invite created but not used #}
|
{# invite created but not used #}
|
||||||
{% if req.invite and not req.invite.times_used %}
|
{% if req.invite and not req.invite.times_used %}
|
||||||
{# <button class="button is-danger is-light is-small">{% trans "Revoke invite" %}</button> #}
|
{# <button class="button is-danger is-light is-small">{% trans "Revoke invite" %}</button> #}
|
||||||
{% elif req.invite %}
|
{% elif req.invite %}
|
||||||
{# accepted #}
|
{# accepted #}
|
||||||
{% if req.invite.invitees.exists %}
|
{% if req.invite.invitees.exists %}
|
||||||
<a href="{{ req.invite.invitees.first.local_path }}">@{{ req.invite.invitees.first.localname }}</a>
|
<a href="{{ req.invite.invitees.first.local_path }}">@{{ req.invite.invitees.first.localname }}</a>
|
||||||
{% else %}
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
|
||||||
<form name="ignore-request" method="post" action="{% url 'settings-invite-requests-ignore' %}">
|
|
||||||
{% csrf_token %}
|
|
||||||
<input type="hidden" name="invite-request" value="{{ req.id }}">
|
|
||||||
{% if not req.ignored %}
|
|
||||||
<button type="submit" class="button is-danger is-light is-small">{% trans "Ignore" %}</button>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<button type="submit" class="button is-danger is-light is-small">{% trans "Un-ignore" %}</button>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</form>
|
{% else %}
|
||||||
{% endif %}
|
<form name="ignore-request" method="post" action="{% url 'settings-invite-requests-ignore' %}">
|
||||||
</div></td>
|
{% csrf_token %}
|
||||||
</tr>
|
<input type="hidden" name="invite-request" value="{{ req.id }}">
|
||||||
{% endfor %}
|
{% if not req.ignored %}
|
||||||
</table>
|
<button type="submit" class="button is-danger is-light is-small">{% trans "Ignore" %}</button>
|
||||||
|
{% else %}
|
||||||
|
<button type="submit" class="button is-danger is-light is-small">{% trans "Un-ignore" %}</button>
|
||||||
|
{% endif %}
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
||||||
|
</div></td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
{% include 'snippets/pagination.html' with page=requests path=request.path %}
|
{% include 'snippets/pagination.html' with page=requests path=request.path %}
|
||||||
|
|
||||||
{% if ignored %}
|
{% if ignored %}
|
||||||
|
|
Loading…
Reference in a new issue