microblog.pub/app/templates/admin_new.html

95 lines
3.2 KiB
HTML
Raw Normal View History

2022-06-22 13:11:22 -05:00
{%- import "utils.html" as utils with context -%}
{% extends "layout.html" %}
2022-07-15 13:01:55 -05:00
{% block head %}
<title>{{ local_actor.display_name }} - New</title>
{% endblock %}
2022-06-22 13:11:22 -05:00
{% block content %}
2022-06-24 04:33:05 -05:00
{% if in_reply_to_object %}
2022-07-09 01:15:33 -05:00
<div class="actor-action">In reply to:</div>
2022-06-24 04:33:05 -05:00
{{ utils.display_object(in_reply_to_object) }}
{% endif %}
2022-07-09 01:15:33 -05:00
<div class="box">
2022-07-24 05:36:59 -05:00
<nav class="flexbox">
<ul>
2022-07-25 15:51:53 -05:00
{% for ap_type in ["Note", "Article", "Question"] %}
2022-07-24 05:36:59 -05:00
<li><a href="?type={{ ap_type }}" {% if request.query_params.get("type", "Note") == ap_type %}class="active"{% endif %}>
{{ ap_type }}
</a>
</li>
{% endfor %}
</ul>
</nav>
2022-08-30 01:51:02 -05:00
<form class="form admin-new" action="{{ request.url_for("admin_actions_new") }}" enctype="multipart/form-data" method="POST">
2022-06-22 13:11:22 -05:00
{{ utils.embed_csrf_token() }}
{{ utils.embed_redirect_url() }}
<p>
<select name="visibility">
{% for (k, v) in visibility_choices %}
2022-08-11 13:48:20 -05:00
<option value="{{ k }}" {% if visibility == k or in_reply_to_object and in_reply_to_object.visibility.name == k %}selected{% endif %}>{{ v }}</option>
{% endfor %}
</select>
</p>
2022-07-25 15:51:53 -05:00
{% if request.query_params.type == "Article" %}
<p>
2022-08-29 14:42:54 -05:00
<input type="text" class="width-95" name="name" placeholder="Title">
2022-07-25 15:51:53 -05:00
</p>
{% endif %}
2022-06-27 13:55:44 -05:00
{% for emoji in emojis %}
2022-07-01 12:35:34 -05:00
<span class="ji">{{ emoji | emojify(True) | safe }}</span>
2022-06-27 13:55:44 -05:00
{% endfor %}
{% for emoji in custom_emojis %}
<span class="ji"><img src="{{ emoji.icon.url }}" alt="{{ emoji.name }}" title="{{ emoji.name }}" class="custom-emoji"></span>
{% endfor %}
2022-08-29 14:42:54 -05:00
<textarea name="content" rows="10" cols="50" autofocus="autofocus" designMode="on" placeholder="Hey!">{{ content }}</textarea>
2022-07-24 05:36:59 -05:00
{% if request.query_params.type == "Question" %}
<p>
<select name="poll_type">
<option value="oneOf">single choice</option>
<option value="anyOf">multiple choices</option>
</select>
</p>
<p>
<select name="poll_duration">
<option value="5">ends in 5 minutes</option>
<option value="30">ends in 30 minutes</option>
<option value="60">ends in 1 hour</option>
<option value="360">ends in 6 hours</option>
<option value="1440">ends in 1 day</option>
</select>
</p>
{% for i in ["1", "2", "3", "4"] %}
<p>
2022-08-29 14:42:54 -05:00
<input type="text" name="poll_answer_{{ i }}" class="width-95" placeholder="Option {{ i }}, leave empty to disable">
2022-07-24 05:36:59 -05:00
</p>
{% endfor %}
{% endif %}
2022-06-28 14:10:22 -05:00
<p>
2022-08-29 14:42:54 -05:00
<input type="text" name="content_warning" placeholder="content warning (will mark the post as sensitive)"{% if content_warning %} value="{{ content_warning }}"{% endif %} class="width-95">
2022-06-28 14:10:22 -05:00
</p>
<p>
2022-07-03 15:01:47 -05:00
<input type="checkbox" name="is_sensitive" id="is_sensitive"> <label for="is_sensitive">Mark attachment(s) as sensitive</label>
2022-06-28 14:10:22 -05:00
</p>
2022-06-24 04:33:05 -05:00
<input type="hidden" name="in_reply_to" value="{{ request.query_params.in_reply_to }}">
2022-06-26 04:09:43 -05:00
<p>
2022-08-29 14:42:54 -05:00
<input id="files" name="files" type="file" class="width-95" multiple>
2022-06-26 04:09:43 -05:00
</p>
2022-07-21 15:43:06 -05:00
<div id="alts"></div>
2022-06-26 04:09:43 -05:00
<p>
<input type="submit" value="Publish">
</p>
2022-06-22 13:11:22 -05:00
</form>
2022-07-09 01:15:33 -05:00
</div>
2022-08-29 13:11:31 -05:00
<script src="/static/new.js?v={{ JS_HASH }}"></script>
2022-06-22 13:11:22 -05:00
{% endblock %}