<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="この日付の日記を編集">
</P>
<P>タイトル: <INPUT NAME="title" TABINDEX="5" ACCESSKEY="T" SIZE="40" VALUE="<%=h @diary.title %>"></P>
<P>本文(<%=h @conf.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">隠す</P>
</FORM>

<FORM METHOD="POST" ACTION="<%=h @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="ツッコミ表示状態変更"></P><% end %>
</FORM>
<HR>
