Added message privacy, currently 4 levels
This commit is contained in:
parent
09a8575068
commit
7700d4fa04
6 changed files with 651 additions and 9 deletions
|
|
@ -6,7 +6,12 @@
|
|||
<dt>Message:</dt>
|
||||
<dd><textarea name="text" placeholder="What's happening?" class="create_text">{{ request.args['preload'] }}</textarea></dd>
|
||||
<dd id="fileInputContainer"><a href="javascript:attachFileInput();">Add a file...</a>
|
||||
<dd><small>Messages are public and can be seen on your profile as well as public timeline.</small></dd>
|
||||
<dd><select name="privacy">
|
||||
<option value="0">Public - everyone in your profile or public timeline</option>
|
||||
<option value="1">Unlisted - everyone in your profile, hide from public timeline</option>
|
||||
<option value="2">Friends - only people you follow each other</option>
|
||||
<option value="3">Only you</option>
|
||||
</select></dd>
|
||||
<dd><input type="submit" value="Create" /></dd>
|
||||
</dl>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -4,4 +4,14 @@
|
|||
<img src="/uploads/{{message.uploads[0].filename()}}">
|
||||
</div>
|
||||
{% endif %}
|
||||
<p class="message-footer"><a href="{{ url_for('user_detail', username=message.user.username) }}">{{ message.user.username }}</a> - {{ message.pub_date | human_date }}</p>
|
||||
<p class="message-footer">
|
||||
<a href="{{ url_for('user_detail', username=message.user.username) }}">{{ message.user.username }}</a>
|
||||
-
|
||||
{% set message_privacy = message.privacy %}
|
||||
{% if message.privacy in (0, 1) %} Public
|
||||
{% elif message.privacy == 2 %} Friends
|
||||
{% elif message.privacy == 3 %} Only me
|
||||
{% endif %}
|
||||
-
|
||||
<time datetime="{{ message.pub_date.isoformat() }}">{{ message.pub_date | human_date }}</time>
|
||||
</p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue