OXYGENHUB
# 8dcaeeb848c6 oxygenhub / templates / wiki_edit.html
1.7 KiB · HTML · last changed Wikis: Markdown pages as an Oxygen repository of their own 1 month ago source blame history raw
66fd9d6b Andy McCall ↶ 1
{% extends "base.html" %}
2
{% import "repo_tabs.html" as m %}
3
{% block title %}{% if exists %}Edit {{ title }}{% else %}New page{% endif %} · wiki · {{ repo.owner }}/{{ repo.name }}{% endblock %}
4
{% block tabs %}{% call m::tabs(repo, "wiki") %}{% endblock %}
5
{% block mainclass %} class="wide"{% endblock %}
6
{% block content %}
7
<div class="head"><h1>{% if exists %}Edit {{ title }}{% else %}New wiki page{% endif %}</h1></div>
8
{% if let Some(e) = error %}<p class="error">{{ e }}</p>{% endif %}
9
<form class="card wide" method="post" action="{{ repo.url }}/wiki/{% if exists %}{{ slug }}{% else %}_new{% endif %}/edit">
10
  <input type="hidden" name="_csrf" value="{{ shell.csrf }}">
11
  <label for="wtitle">Title</label><input type="text" id="wtitle" name="title" value="{{ title }}" required maxlength="100" placeholder="Getting Started">
12
  <p class="small mute">The page's address is its title with dashes for spaces: <code>{{ repo.url }}/wiki/Getting-Started</code>. Link to another page as <code>[Other page](Other-page)</code>.</p>
13
  <label for="wcontent">Content (Markdown)</label><textarea id="wcontent" name="content" class="md code" rows="22" required>{{ content }}</textarea>
14
  <label for="wmessage">Change message (optional)</label><input type="text" id="wmessage" name="message" maxlength="200" placeholder="{% if exists %}Update {{ title }}{% else %}Create the page{% endif %}">
15
  <p class="small mute">Saved as a change in the wiki's repository, authored by you and signed by this hub as your delegate.</p>
16
  <button type="submit">{% if exists %}SAVE{% else %}CREATE PAGE{% endif %}</button> <a class="go" href="{{ repo.url }}/wiki{% if exists %}/{{ slug }}{% endif %}">Cancel</a>
17
</form>
18
{% endblock %}