2023-08-06 11:47:09 +01:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
2024-07-22 16:24:57 +01:00
|
|
|
{% block title %}New Logbook Entry form{% endblock %}
|
2023-08-06 11:47:09 +01:00
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
2023-08-26 16:39:29 +01:00
|
|
|
{% if date %}
|
2024-07-22 16:24:57 +01:00
|
|
|
<h2 title="id = {{slug}}">Edit Existing Logbook Entry on {{date}}</h2>
|
2023-08-26 16:39:29 +01:00
|
|
|
{% else %}
|
2023-08-06 11:47:09 +01:00
|
|
|
<h2>New Logbook Entry in {{year}}</h2>
|
2023-08-26 16:39:29 +01:00
|
|
|
{% endif %}
|
2024-07-09 13:46:42 +01:00
|
|
|
<div align=center>
|
|
|
|
<a href="/handbook/logbooks.html#form">How to use this form</a>
|
|
|
|
</div>
|
2023-08-06 11:47:09 +01:00
|
|
|
{% if save_bad %}
|
|
|
|
<p style="font-family: monospace; font-weight: bold; color: red; font-size: 130%; text-align: center">
|
|
|
|
|
|
|
|
Cannot save to '{{save_bad}}' as a file of that name already exists here.
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
<style>
|
2023-08-07 22:43:12 +01:00
|
|
|
input, textarea, pre {font-family: monospace; font-weight: bold; text-align:center; font-size: 100%; padding: 0.5em; }
|
|
|
|
textarea {text-align:left }
|
|
|
|
pre {text-align:left; font-size: 120% }
|
2023-08-06 11:47:09 +01:00
|
|
|
textarea {text-align:left }
|
|
|
|
</style>
|
|
|
|
<div style = "max-width:100%; margin-left:15%; font-family: monospace; font-weight: bold; font-size: 150%; text-align: right; " >
|
|
|
|
|
|
|
|
<form method ='post' >
|
|
|
|
{% csrf_token %}
|
|
|
|
<br />
|
2024-07-23 07:58:17 +01:00
|
|
|
<input name="slug" id="slug" value="{{slug}}" type=hidden>
|
|
|
|
|
2023-08-26 16:39:29 +01:00
|
|
|
<span {% if dateflag %}style="color:red"{% endif %}>
|
2023-08-07 23:17:36 +01:00
|
|
|
<label for="date">Date of the activity</label>
|
2023-08-06 11:47:09 +01:00
|
|
|
<input {% if not user.username %} disabled{% endif %}
|
|
|
|
label = "Date" name = "date" size="12"
|
|
|
|
title="Date of the activity, a single day, in ISO format: 2020-08-17"
|
2023-08-26 16:39:29 +01:00
|
|
|
{% if date %}value="{{date}}"{% else %}placeholder="2023-08-12"{% endif %}
|
2023-08-07 23:17:36 +01:00
|
|
|
required />
|
2023-08-26 16:39:29 +01:00
|
|
|
</span>
|
|
|
|
|
2023-09-05 13:49:12 +01:00
|
|
|
<br /><br />
|
|
|
|
<span {% if authorflag %}style="color:red"{% endif %}>
|
2023-08-06 11:47:09 +01:00
|
|
|
<label for="author">Your name (author) <a href="/aliases/{{year}}">[valid authors]</a></label>
|
|
|
|
<input {% if not user.username %} disabled{% endif %}
|
|
|
|
label = "author" name = "author" size="20"
|
|
|
|
title="The person writing the logbook entry"
|
2023-08-07 23:17:36 +01:00
|
|
|
{% if author %}value="{{author}}"{% else %}placeholder="Animal"{% endif %}
|
|
|
|
required />
|
2023-09-05 13:49:12 +01:00
|
|
|
</span>
|
2023-08-06 11:47:09 +01:00
|
|
|
<br /><br />
|
|
|
|
<label for="others">Other names (comma separated) <a href="/aliases/{{year}}">[valid aliases]</a></label>
|
|
|
|
<input {% if not user.username %} disabled{% endif %}
|
2023-08-10 21:17:03 +01:00
|
|
|
label = "others" name = "others" size="{% if lenothers %}{{lenothers}}{% else %}20{% endif %}"
|
2023-08-06 11:47:09 +01:00
|
|
|
title="Everyone else involved"
|
2023-08-07 23:17:36 +01:00
|
|
|
{% if others %}value="{{others}}"{% else %}placeholder="Phil T, Chas, Planc" {% endif %}
|
2023-08-10 21:17:03 +01:00
|
|
|
/>
|
2023-08-06 11:47:09 +01:00
|
|
|
<br /><br />
|
|
|
|
<label for="place">Place: cave name, or 'plateau', 'topcamp' etc.</label>
|
|
|
|
<input {% if not user.username %} disabled{% endif %}
|
|
|
|
label = "Place" name = "place" size="15"
|
|
|
|
title="Place: cave name, or 'plateau', 'topcamp' "
|
2023-08-07 23:17:36 +01:00
|
|
|
{% if place %}value="{{place}}"{% else %}placeholder="basecamp" {% endif %}
|
|
|
|
required />
|
2023-08-06 11:47:09 +01:00
|
|
|
<br /><br />
|
|
|
|
<label for="title">Title</label>
|
|
|
|
<input {% if not user.username %} disabled{% endif %}
|
|
|
|
label = "Title" name = "title" size="30"
|
2023-08-07 23:17:36 +01:00
|
|
|
title="Title of your activity"
|
|
|
|
{% if place %}value="{{title}}"{% else %}placeholder="What we did on our holidays" {% endif %}
|
|
|
|
required />
|
2023-08-06 11:47:09 +01:00
|
|
|
<br /><br />
|
|
|
|
<textarea {% if not user.username %} disabled{% endif %}
|
2023-08-10 21:17:03 +01:00
|
|
|
rows="{% if textrows%}{{textrows}}{% else %}5{% endif %}" cols="70"
|
2023-08-06 11:47:09 +01:00
|
|
|
label = "" name = "text"
|
2023-08-07 23:17:36 +01:00
|
|
|
required />{% if entry %}{{entry}}{% else %}We had a lot of fun...{% endif %}
|
2023-08-06 11:47:09 +01:00
|
|
|
</textarea>
|
2023-08-06 12:06:45 +01:00
|
|
|
<br>
|
2023-09-02 22:05:35 +01:00
|
|
|
[Type in text in <a href="/handbook/logbooks.html#form">Logbook HTML format</a>.]
|
2023-08-06 12:06:45 +01:00
|
|
|
<br /><br />
|
|
|
|
<label for="tu">Time underground (hours)</label>
|
|
|
|
<input {% if not user.username %} disabled{% endif %}
|
|
|
|
label = "tu" name = "tu" size="5"
|
|
|
|
title="Time underground (hours)"
|
2023-08-07 23:27:20 +01:00
|
|
|
{% if tu %}value="{{tu}}"{% else %}placeholder="0.1" {% endif %}
|
|
|
|
/>
|
2023-08-31 16:55:20 +01:00
|
|
|
<br /><br />
|
2023-08-06 11:47:09 +01:00
|
|
|
<button class="fancybutton2" style="padding: 0.5em 25px; margin-left: 110px" type = "submit" value = "save" >
|
2023-08-31 16:55:20 +01:00
|
|
|
Update logbook entry
|
2023-08-06 11:47:09 +01:00
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<br /><br /><br />
|
2023-11-04 08:40:46 +00:00
|
|
|
{% if date %}<p>Link to <em><a href="/logbookentry/{{date}}/{{slug}}#">this entry</a></em> {% endif %}
|
2024-07-16 13:45:08 +01:00
|
|
|
Full logbook: <a href="/years/{{year}}/logbook.html"><em>Logbook {{year}}</em></a>
|
|
|
|
{{year}} <a href="/logreport/{{year}}">Logbook report</a>
|
2023-11-04 08:40:46 +00:00
|
|
|
|
2023-08-06 11:47:09 +01:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<br />
|
|
|
|
|
|
|
|
<hr />
|
|
|
|
|
2023-08-07 22:43:12 +01:00
|
|
|
{% if output %}
|
2023-09-01 17:09:57 +01:00
|
|
|
<details><summary>
|
|
|
|
Click this triangle to see the HTML which has been put into logbook.html, and below that is the rendered logbook entry.
|
|
|
|
</summary>
|
2023-08-07 22:43:12 +01:00
|
|
|
<pre>
|
|
|
|
{{output}}
|
|
|
|
</pre>
|
2023-09-01 17:09:57 +01:00
|
|
|
</details>
|
2023-08-07 22:43:12 +01:00
|
|
|
<hr>
|
|
|
|
<style>
|
|
|
|
.tripdate, .trippeople {
|
|
|
|
background-color: #C6E4E3;
|
|
|
|
float: left;
|
|
|
|
margin: 2px 1px 1px 1px;
|
|
|
|
padding: 10px;
|
|
|
|
border-bottom-right-radius: 1em;
|
|
|
|
}
|
|
|
|
.trippeople {
|
|
|
|
background-color: #fff;
|
|
|
|
float: right;
|
|
|
|
font-style: italic;
|
|
|
|
}
|
|
|
|
.triptitle {
|
|
|
|
border: 1px solid #99CCCC;
|
|
|
|
border-top-width: 2px;
|
|
|
|
color: #008787;
|
|
|
|
font-size: 120%;
|
|
|
|
font-weight: bold;
|
|
|
|
padding: 45px 10px 20px;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
.timeug {
|
|
|
|
text-align: right;
|
|
|
|
font-weight: bold;
|
|
|
|
margin-bottom: 10px;}
|
|
|
|
</style>
|
|
|
|
{{output|safe}}
|
|
|
|
{% endif %}
|
2023-08-06 11:47:09 +01:00
|
|
|
{% endblock %}
|