You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
117 lines
4.0 KiB
117 lines
4.0 KiB
{% include "shared/errors.html" %} |
|
|
|
<table class="attr"> |
|
<tr> |
|
<th><label for="title">Title</label></th> |
|
<td><input name="TITLE" id="title" type="text" value="{{article.title}}"/></td> |
|
</tr> |
|
<tr> |
|
<th><label for="body">Body</label></th> |
|
<td><textarea rows="10" cols="45" name="BODY" id="body">{{article.body}}</textarea></td> |
|
</tr> |
|
<tr> |
|
<th><label for="released-year">Date released</label></th> |
|
<td> |
|
<!-- NOTE TAKEN FROM CHAPTER 9: |
|
Regarding the above template, the above code |
|
article.date-releasedstarts from a variable reference such |
|
as , for example. For unknown reasons, if you use this |
|
origin variable as article a code that receives the object |
|
itself, the last SAFEfilter will not work for some reason. |
|
I'm wondering if it's a bug on the DJULA side, but I'm not |
|
confident. --> |
|
<select id="released-year" name="RELEASED-YEAR"> |
|
{{ article.date-released |
|
| lisp: (lambda(timestamp) |
|
(let((year(local-time:timestamp-year(local-time:now)))) |
|
(date-options :start 2000 :end (1+ year) |
|
:target (local-time:timestamp-year timestamp)))) |
|
| safe |
|
}} |
|
</select> |
|
<select id="released-month" name="RELEASED-MONTH"> |
|
{{ article.date-released |
|
| lisp: (lambda(timestamp) |
|
(date-options :start 1 :end 12 |
|
:target (local-time:timestamp-month timestamp))) |
|
| safe }} |
|
</select> |
|
<select id="released-day" name="RELEASED-DAY"> |
|
{{ article.date-released |
|
| lisp: (lambda(timestamp) |
|
(date-options :start 1 :end 31 |
|
:target (local-time:timestamp-day timestamp))) |
|
| safe }} |
|
</select> |
|
- |
|
<select id="released-hour" name="RELEASED-HOUR"> |
|
{{ article.date-released |
|
| lisp: (lambda(timestamp) |
|
(date-options :end 59 :target (local-time:timestamp-hour timestamp))) |
|
| safe }} |
|
</select> |
|
<select id="released-min" name="RELEASED-MIN"> |
|
{{ article.date-released |
|
| lisp: (lambda(timestamp) |
|
(date-options :end 59 :target (local-time:timestamp-minute timestamp))) |
|
| safe }} |
|
</select> |
|
</td> |
|
</tr> |
|
|
|
<tr> |
|
<th><label for="expired-year">Date expired</label></th> |
|
<td> |
|
<select id="expired-year" name="EXPIRED-YEAR"> |
|
{{ article.date-expired |
|
| lisp: (lambda(arg) |
|
(let((year(local-time:timestamp-year(local-time:now))) |
|
(timestamp(or arg (local-time:now)))) |
|
(date-options :start 2000 :end (1+ year) |
|
:target (local-time:timestamp-year timestamp)))) |
|
| safe }} |
|
</select> |
|
<select id="expired-month" name="EXPIRED-MONTH"> |
|
{{ article.date-expired |
|
| lisp: (lambda(arg) |
|
(date-options :start 1 :end 12 |
|
:target (local-time:timestamp-month (or arg |
|
(local-time:now))))) |
|
| safe }} |
|
</select> |
|
<select id="expired-day" name="EXPIRED-DAY"> |
|
{{ article.date-expired |
|
| lisp: (lambda(arg) |
|
(let((timestamp(or arg (local-time:now)))) |
|
(date-options :start 1 :end 31 |
|
:target (local-time:timestamp-day timestamp)))) |
|
| safe }} |
|
</select> |
|
- |
|
<select id="expired-hour" name="EXPIRED-HOUR"> |
|
{{ article.date-expired |
|
| lisp: (lambda(arg) |
|
(let((timestamp(or arg (local-time:now)))) |
|
(date-options :end 59 |
|
:target (local-time:timestamp-hour timestamp)))) |
|
| safe }} |
|
</select> |
|
<select id="expired-min" name="EXPIRED-MIN"> |
|
{{ article.date-expired |
|
| lisp: (lambda(arg) |
|
(let((timestamp(or arg (local-time:now)))) |
|
(date-options :end 59 |
|
:target (local-time:timestamp-minute timestamp)))) |
|
| safe }} |
|
</select> |
|
</td> |
|
</tr> |
|
<tr> |
|
<th>Member only</th> |
|
<td> |
|
<label for="member-only">Member only</label> |
|
<!-- <input name="MEMBER-ONLY" type="hidden" value="0"> --> |
|
<input type="checkbox" id="member-only" name="MEMBER-ONLY" value="1" {% if article.member-only %}checked{% endif %} /> |
|
</td> |
|
</tr> |
|
</table>
|
|
|