Merge pull request #336 from mouse-reeve/user-shelves
User-created shelves
This commit is contained in:
18
bookwyrm/templates/snippets/privacy-icons.html
Normal file
18
bookwyrm/templates/snippets/privacy-icons.html
Normal file
@ -0,0 +1,18 @@
|
||||
{% if item.privacy == 'public' %}
|
||||
<span class="icon icon-globe">
|
||||
<span class="is-sr-only">Public post</span>
|
||||
</span>
|
||||
{% elif item.privacy == 'unlisted' %}
|
||||
<span class="icon icon-unlock">
|
||||
<span class="is-sr-only">Unlisted post</span>
|
||||
</span>
|
||||
{% elif item.privacy == 'followers' %}
|
||||
<span class="icon icon-lock">
|
||||
<span class="is-sr-only">Followers-only post</span>
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="icon icon-envelope">
|
||||
<span class="is-sr-only">Private post</span>
|
||||
</span>
|
||||
{% endif %}
|
||||
|
@ -5,10 +5,18 @@
|
||||
<label class="is-sr-only" for="privacy-{{ uuid }}">Post privacy</label>
|
||||
{% endif %}
|
||||
<select name="privacy" id="privacy-{{ uuid }}">
|
||||
<option value="public" selected>Public</option>
|
||||
<option value="unlisted">Unlisted</option>
|
||||
<option value="followers">Followers only</option>
|
||||
<option value="direct">Private</option>
|
||||
<option value="public" {% if not current or current == 'public' %}selected{% endif %}>
|
||||
Public
|
||||
</option>
|
||||
<option value="unlisted" {% if current == 'unlisted' %}selected{% endif %}>
|
||||
Unlisted
|
||||
</option>
|
||||
<option value="followers" {% if current == 'followers' %}selected{% endif %}>
|
||||
Followers only
|
||||
</option>
|
||||
<option value="direct" {% if current == 'direct' %}selected{% endif %}>
|
||||
Private
|
||||
</option>
|
||||
</select>
|
||||
{% endwith %}
|
||||
</div>
|
||||
|
@ -76,5 +76,15 @@
|
||||
</table>
|
||||
{% else %}
|
||||
<p>This shelf is empty.</p>
|
||||
{% if shelf.editable %}
|
||||
<form name="delete-shelf" action="/delete-shelf/{{ shelf.id }}" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="user" value="{{ request.user.id }}">
|
||||
<button class="button is-danger is-light" type="submit">
|
||||
Delete shelf
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
@ -60,23 +60,7 @@
|
||||
</div>
|
||||
|
||||
<div class="card-footer-item">
|
||||
{% if status.privacy == 'public' %}
|
||||
<span class="icon icon-globe">
|
||||
<span class="is-sr-only">Public post</span>
|
||||
</span>
|
||||
{% elif status.privacy == 'unlisted' %}
|
||||
<span class="icon icon-unlock">
|
||||
<span class="is-sr-only">Unlisted post</span>
|
||||
</span>
|
||||
{% elif status.privacy == 'followers' %}
|
||||
<span class="icon icon-lock">
|
||||
<span class="is-sr-only">Followers-only post</span>
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="icon icon-envelope">
|
||||
<span class="is-sr-only">Private post</span>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% include 'snippets/privacy-icons.html' with item=status %}
|
||||
</div>
|
||||
|
||||
<div class="card-footer-item">
|
||||
|
@ -1,19 +1,6 @@
|
||||
{% load humanize %}
|
||||
{% load fr_display %}
|
||||
<div class="block">
|
||||
<div class="level">
|
||||
<h2 class="title">User Profile</h2>
|
||||
{% if is_self %}
|
||||
<div class="level-right">
|
||||
<a href="/user-edit/" class="edit-link">edit
|
||||
<span class="icon icon-pencil">
|
||||
<span class="is-sr-only">Edit profile</span>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="columns">
|
||||
<div class="column is-narrow">
|
||||
<div class="media">
|
||||
|
Reference in New Issue
Block a user