microblog.pub/app/templates/admin_new.html

95 lines
3.2 KiB
HTML
Raw Permalink 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>
2022-07-25 20:51:53 +00:00
{% for ap_type in ["Note", "Article", "Question"] %}
2022-07-24 10:36:59 +00: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 06:51:02 +00:00
<form class="form admin-new" 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 %}
2022-08-11 18:48:20 +00: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 20:51:53 +00:00
{% if request.query_params.type == "Article" %}
<p>
2022-08-29 19:42:54 +00:00
<input type="text" class="width-95" name="name" placeholder="Title">
2022-07-25 20:51:53 +00:00
</p>
{% endif %}
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-08-29 19:42:54 +00:00
<textarea name="content" rows="10" cols="50" autofocus="autofocus" designMode="on" placeholder="Hey!">{{ 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>
2022-08-29 19:42:54 +00:00
<input type="text" name="poll_answer_{{ i }}" class="width-95" placeholder="Option {{ i }}, leave empty to disable">
2022-07-24 10:36:59 +00:00
</p>
{% endfor %}
{% endif %}
2022-06-28 19:10:22 +00:00
<p>
2022-08-29 19:42:54 +00: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 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-08-29 19:42:54 +00:00
<input id="files" name="files" type="file" class="width-95" multiple>
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-08-29 18:11:31 +00:00
<script src="/static/new.js?v={{ JS_HASH }}"></script>
2022-06-22 18:11:22 +00:00
{% endblock %}