<H1><%=h @conf.html_title %> [<%%= submit_label %>]</H1>

<P>
<%%= mobile_navi %>
</P>

<FORM METHOD="POST" ACTION="<%=h @conf.update %>">
<INPUT TYPE="HIDDEN" NAME="old" VALUE="<%= @date.strftime( '%Y%m%d' ) %>">
<P>
<%=@csrf_protection%>
<INPUT NAME="year" TABINDEX="1" ACCESSKEY="Y" SIZE="4" VALUE="<%= @date.year %>">-
<INPUT NAME="month" TABINDEX="2" ACCESSKEY="M" SIZE="2" VALUE="<%= @date.mon %>">-
<INPUT NAME="day" TABINDEX="3" ACCESSKEY="D" SIZE="2" VALUE="<%= @date.day %>">
<INPUT TYPE="SUBMIT" TABINDEX="4" ACCESSKEY="e" NAME="edit" VALUE="Edit this day">
</P>
<P>Title: <INPUT NAME="title" TABINDEX="5" ACCESSKEY="T" SIZE="40" VALUE="<%=h @diary.title %>"></P>
<P>Article(<%=h @conf.style %> style):<BR>
<TEXTAREA NAME="body" TABINDEX="6" ACCESSKEY="C" COLS="100%" ROWS="5"><%=h @diary.to_src %></TEXTAREA></P>
<P><INPUT TYPE="SUBMIT" TABINDEX="7" ACCESSKEY="A" NAME="<%%= submit_command %>" VALUE=" <%%= submit_label %> "></P>
<P><INPUT TYPE="CHECKBOX" NAME="hide" VALUE="true" <% unless @diary.visible? then %>checked <% end %>TABINDEX="8" ACCESSKEY="H">Hidden</P>
</FORM>

<FORM METHOD="POST" ACTION="<%= @conf.update %>">
<%=@csrf_protection%>
<INPUT TYPE="HIDDEN" NAME="year" VALUE="<%= @date.year %>">
<INPUT TYPE="HIDDEN" NAME="month" VALUE="<%= @date.month %>">
<INPUT TYPE="HIDDEN" NAME="day" VALUE="<%= @date.day %>">
<P><%%=comment_today%></P><%
idx = 0
@diary.each_comment do |comment| %>
	<P>
		<INPUT TYPE="CHECKBOX" NAME="<%= idx += 1 %>" VALUE="true"<% if comment.visible? then %> checked<% end %>>
		<%=h comment.name %>
		(<%= comment.date.strftime( '%m-%d %H:%M' ) %>)
	</P>
	<P><%= comment.shorten( 200 ).make_link %></P><%
end %>
<% if idx > 0 then %><P><INPUT TYPE="SUBMIT" NAME="comment" VALUE="Change status of TSUKKOMI"></P><% end %>
</FORM>
<HR>
