mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2024-12-12 13:30:26 +00:00
60 lines
1.3 KiB
Plaintext
60 lines
1.3 KiB
Plaintext
{% func HistoryHTML(hyphaName, tbody string) %}
|
|
<main>
|
|
{%= navHTML(hyphaName, "history") %}
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Time</th>
|
|
<th>Hash</th>
|
|
<th>Message</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{%s= tbody %}
|
|
</tbody>
|
|
</table>
|
|
</main>
|
|
{% endfunc %}
|
|
|
|
{% func RevisionHTML(hyphaName, naviTitle, contents, tree, revHash string) %}
|
|
<main>
|
|
{%= navHTML(hyphaName, "revision", revHash) %}
|
|
<article>
|
|
<p>Please note that viewing binary parts of hyphae is not supported in history for now.</p>
|
|
{%s= naviTitle %}
|
|
{%s= contents %}
|
|
</article>
|
|
<hr/>
|
|
<aside>
|
|
{%s= tree %}
|
|
</aside>
|
|
</main>
|
|
{% endfunc %}
|
|
|
|
If `contents` == "", a helpful message is shown instead.
|
|
{% func PageHTML(hyphaName, naviTitle, contents, tree string) %}
|
|
<main>
|
|
{%= navHTML(hyphaName, "page") %}
|
|
<article>
|
|
{%s= naviTitle %}
|
|
{% if contents == "" %}
|
|
<p>This hypha has no text. Why not <a href="/edit/{%s hyphaName %}">create it</a>?</p>
|
|
{% else %}
|
|
{%s= contents %}
|
|
{% endif %}
|
|
</article>
|
|
<hr/>
|
|
<form action="/upload-binary/{%s hyphaName %}"
|
|
method="post" enctype="multipart/form-data">
|
|
<label for="upload-binary__input">Upload new binary part</label>
|
|
<br>
|
|
<input type="file" id="upload-binary__input" name="binary"/>
|
|
<input type="submit"/>
|
|
</form>
|
|
<hr/>
|
|
<aside>
|
|
{%s= tree %}
|
|
</aside>
|
|
</main>
|
|
{% endfunc %}
|