tavern/templates/compose_advanced.html

257 lines
14 KiB
HTML

{{define "head"}}{{end}}
{{define "footer_script"}}{{end}}
{{define "content"}}
<div class="row pt-3">
<div class="col">
<h1 class="pb-1">Compose Note</h1>
<div class="form-group">
<p class="lead text-danger">
Caution: This form allows you to deviate from the standard behavior of notes. Proceed with caution.
</p>
</div>
<form method="POST" action="{{ url "compose_create_note" }}?advanced=true" enctype="multipart/form-data"
id="create_note">
<div class="mt-1">
<p class="float-right">
<a href="{{ url "compose" }}?advanced=false">
Simple
</a>
</p>
</div>
<div class="form-group">
<label for="createNoteContent">Content</label>
<textarea class="form-control" id="createNoteContent" name="content" required></textarea>
<small id="createNoteToHelp" class="form-text text-muted">
The content of the post.
</small>
</div>
<div class="form-row">
<div class="form-group col-md-3">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="true" id="createNoteParseTags"
name="parseTags"
checked="checked">
<label class="form-check-label" for="createNoteParseTags">
Parse Tags
</label>
<small id="createNoteParseTagsHelp" class="form-text text-muted">
Parse hashtags from note content.
</small>
</div>
</div>
<div class="form-group col-md-3">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="true" id="createNoteParseMentions"
name="parseMentions" checked="checked">
<label class="form-check-label" for="createNoteParseMentions">
Parse Mentions
</label>
<small id="createNoteParseTagsHelp" class="form-text text-muted">
Parse user mentions from note content.
</small>
</div>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-3">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="true" id="createNoteSensitive"
name="sensitive">
<label class="form-check-label" for="createNoteSensitive">
Sensitive
</label>
<small id="createNoteSensitiveHelp" class="form-text text-muted">
Marks the post as sensitive, using the object summary as the warning.
</small>
</div>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label for="createNoteMediaType">Media Type</label>
<select id="createNoteMediaType" class="form-control" name="mediaType">
<option selected>text/html</option>
<option>markdown</option>
</select>
<small id="createNoteMediaTypeHelp" class="form-text text-muted">
Content is assumed to be text/html. If "text/html" is selected and the content has no HTML
markup, each line will be wrapped in <code>p</code> tags.
</small>
</div>
<div class="form-group col-md-6">
<label for="createNoteLanguage">Language</label>
<input type="text" class="form-control" id="createNoteLanguage" name="language" value="en">
<small id="createNoteLanguageHelp" class="form-text text-muted">
Content is presumed to be in english. Enter the language code to explicitly set it.
</small>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label for="createNoteTo">To</label>
<textarea class="form-control" id="createNoteTo" name="to">https://www.w3.org/ns/activitystreams#Public{{ range .recipients }}
{{ . }}{{ end }}</textarea>
<small id="createNoteToHelp" class="form-text text-muted">
List all of the inboxes that the note should be delivered to. One destination per line.
</small>
</div>
<div class="form-group col-md-6">
<label for="createNoteCc">CC</label>
<textarea class="form-control" id="createNoteCc"
name="cc">{{ .followers_collection }}</textarea>
<small id="createNoteCcHelp" class="form-text text-muted">
List all of the inboxes that the note should be delivered CC'd to. One destination per
line.
</small>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-4">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="true" id="createNoteBroadcastTo"
name="broadcastTo"
checked="checked">
<label class="form-check-label" for="createNoteBroadcastTo">
Broadcast To
</label>
<small id="createNoteBroadcastToHelp" class="form-text text-muted">
Publish the activity to all "To" destinations.
</small>
</div>
</div>
<div class="form-group col-md-4">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="true" id="createNoteBroadcastCc"
name="broadcastCc"
checked="checked">
<label class="form-check-label" for="createNoteBroadcastCc">
Broadcast CC
</label>
<small id="createNoteBroadcastCcHelp" class="form-text text-muted">
Publish the activity to all "CC" destinations.
</small>
</div>
</div>
<div class="form-group col-md-4">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="true" id="createNoteBroadcastPeers"
name="broadcastPeers"
checked="checked">
<label class="form-check-label" for="createNoteBroadcastPeers">
Broadcast Peers
</label>
<small id="createNoteBroadcastPeersHelp" class="form-text text-muted">
Publish the activity to all known peers.
</small>
</div>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label for="createNoteTags">Tags</label>
<input type="text" class="form-control" id="createNoteTags" name="tags">
<small id="createNoteTagsHelp" class="form-text text-muted">
Space separated list of tags to add to the note. Format is "#hashtag".
</small>
</div>
<div class="form-group col-md-6">
<label for="createNoteMentions">Mentions</label>
<input type="text" class="form-control" id="createNoteMentions" name="mentions">
<small id="createNoteMentionsHelp" class="form-text text-muted">
Space separated list of actors to reference. Format is "@user@domain".
</small>
</div>
</div>
<div class="form-group">
<label for="createNoteContext">Context</label>
<input type="text" class="form-control" id="createNoteContext"
name="thread_context" {{ if .thread_context }} value="{{ .thread_context }}" {{ end }}>
<small id="createNoteContextHelp" class="form-text text-muted">
The value of the "context" attribute associated with the note.
</small>
</div>
<div class="form-group">
<label for="createNoteInReplyTo">In Reply To</label>
<input type="text" class="form-control" id="createNoteInReplyTo"
name="inReplyTo" {{ if .in_reply_to }} value="{{ .in_reply_to }}" {{ end }} >
<small id="createNoteInReplyToHelp" class="form-text text-muted">
The object ID (fully qualified URL) that this note is a reply to.
</small>
</div>
<div class="form-group">
<label for="createNoteSummary">Summary</label>
<input type="text" class="form-control" id="createNoteSummary" name="summary">
<small id="createNoteSummaryHelp" class="form-text text-muted">
The summary associated with the activity. This is often left blank.
</small>
</div>
<div class="form-row">
<div class="form-group col-md-3">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="true" id="createNotePreviewJSON"
name="previewJSON">
<label class="form-check-label" for="createNotePreviewJSON">
Preview JSON
</label>
<small id="createNotePreviewJSONHelp" class="form-text text-muted">
Preview the activity JSON first.
</small>
</div>
</div>
<div class="form-group col-md-3">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="true"
id="createNotePreviewDestinations" name="previewDestinations">
<label class="form-check-label" for="createNotePreviewDestinations">
Preview Destinations
</label>
<small id="createNotePreviewDestinationsHelp" class="form-text text-muted">
Preview the activity destinations.
</small>
</div>
</div>
</div>
<div class="form-group">
<label for="createNoteUpload">Attach</label>
<input type="file" class="form-control-file" id="createNoteUpload" name="upload[]" multiple>
</div>
<input type="submit" class="btn btn-dark" name="submit" value="Create Note"/>
</form>
</div>
</div>
<div class="row mt-4 border-top">
<div class="col">
<h1>Help</h1>
<dl class="row">
<dt class="col-md-3">Public Notes</dt>
<dd class="col-md-9">
<p>
Omitting the
<span class="text-danger">https://www.w3.org/ns/activitystreams#Public</span>
destination from the TO field will make the note private.
</p>
</dd>
<dt class="col-md-3">Broadcast To Followers</dt>
<dd class="col-md-9">
<p>
To broadcast to your followers, you must address your followers collection:
<span class="text-primary">{{ .followers_collection }}</span>
</p>
</dd>
<dt class="col-md-3">TO and CC</dt>
<dd class="col-md-9">
<p>
All destinations must be actor IDs. The only exceptions are the standard public destination and
your own followers collection.
</p>
</dd>
<dt class="col-md-3">Mentions</dt>
<dd class="col-md-9">
<p>
Mentioned actors are expanded and placed in the CC field.
</p>
</dd>
</dl>
</div>
</div>
{{end}}