microblog.pub/app/templates/admin_new.html

88 lines
3 KiB
HTML
Raw Normal View History

2022-06-22 18:11:22 +00:00
{%- import "utils.html" as utils with context -%}
{% extends "layout.html" %}
2022-07-15 18:01:55 +00:00
{% block head %}
<title>{{ local_actor.display_name }} - New</title>
{% endblock %}
2022-06-22 18:11:22 +00:00
{% block content %}
2022-06-24 09:33:05 +00:00
{% if in_reply_to_object %}
2022-07-09 06:15:33 +00:00
<div class="actor-action">In reply to:</div>
2022-06-24 09:33:05 +00:00
{{ utils.display_object(in_reply_to_object) }}
{% endif %}
2022-07-09 06:15:33 +00:00
<div class="box">
2022-07-24 10:36:59 +00:00
<nav class="flexbox">
<ul>
{% for ap_type in ["Note", "Question"] %}
<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-07-03 20:01:47 +00:00
<form class="form" action="{{ request.url_for("admin_actions_new") }}" enctype="multipart/form-data" method="POST">
2022-06-22 18:11:22 +00:00
{{ utils.embed_csrf_token() }}
{{ utils.embed_redirect_url() }}
<p>
<select name="visibility">
{% for (k, v) in visibility_choices %}
<option value="{{ k }}" {% if in_reply_to_object and in_reply_to_object.visibility.name == k %}selected{% endif %}>{{ v }}</option>
{% endfor %}
</select>
</p>
2022-06-27 18:55:44 +00:00
{% for emoji in emojis %}
2022-07-01 17:35:34 +00:00
<span class="ji">{{ emoji | emojify(True) | safe }}</span>
2022-06-27 18:55:44 +00: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-07-03 20:01:47 +00:00
<textarea name="content" rows="10" cols="50" autofocus="autofocus" designMode="on" placeholder="Hey!" style="font-size:1.2em;width:95%;">{{ content }}</textarea>
2022-07-24 10:36:59 +00: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>
<input type="text" name="poll_answer_{{ i }}" style="width:95%;" placeholder="Option {{ i }}, leave empty to disable">
</p>
{% endfor %}
{% endif %}
2022-06-28 19:10:22 +00:00
<p>
2022-07-03 20:01:47 +00:00
<input type="text" name="content_warning" placeholder="content warning (will mark the post as sensitive)" style="width:95%;">
2022-06-28 19:10:22 +00:00
</p>
<p>
2022-07-03 20:01:47 +00:00
<input type="checkbox" name="is_sensitive" id="is_sensitive"> <label for="is_sensitive">Mark attachment(s) as sensitive</label>
2022-06-28 19:10:22 +00:00
</p>
2022-06-24 09:33:05 +00:00
<input type="hidden" name="in_reply_to" value="{{ request.query_params.in_reply_to }}">
2022-06-26 09:09:43 +00:00
<p>
2022-07-21 20:43:06 +00:00
<input id="files" name="files" type="file" multiple style="width:95%;">
2022-06-26 09:09:43 +00:00
</p>
2022-07-21 20:43:06 +00:00
<div id="alts"></div>
2022-06-26 09:09:43 +00:00
<p>
<input type="submit" value="Publish">
</p>
2022-06-22 18:11:22 +00:00
</form>
2022-07-09 06:15:33 +00:00
</div>
2022-07-18 19:07:36 +00:00
<script src="/static/new.js"></script>
2022-06-22 18:11:22 +00:00
{% endblock %}