3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
4 <title><%= APPTITLE %></title>
5 <link rel="stylesheet" href="./erbtemp/stylesheet.css" type="text/css">
6 <script type="text/javascript">
7 function switchsubmit(form, action){
8 document.getElementsByName("action").item(0).value = action;
12 <% if params["action"] == "edit" || params["action"] == "back" %>
13 <script type="text/javascript" src="./openwysiwyg/scripts/wysiwyg.js">
15 <script type="text/javascript">
16 WYSIWYG.attach('contenteditor');
24 <div class="divstyle" style="width: <%= TABLEWIDTH %>px;">
25 <form action="<%= cgi.script_name %>" method="POST">
26 <% case params["action"]
28 <input type="hidden" name="editid" value="<%= session["editid"] %>">
29 <table align="center" style="width: <%= (TABLEWIDTH - 20) %>px;">
32 <td colspan="2" class="formheader">
37 entry = db["editentry"]
38 entry.paramlist.each do |val| %>
39 <tr style="display: <%= entry.display[val] %>;">
40 <td class="formnavi" style="width: 140px;">
41 <%= entry.name[val] %>
43 <td class="forminput">
44 <input type="hidden" name="<%= val %>" value="<%= entry.send(val) %>"><% if val != "content" %><%= entry.send(val) %><% else %><%= entry.content_for_view %><% end %>
52 <input type="hidden" name="mode" value="editentry"><input type="hidden" name="action" value=""><input type="button" value="戻る" onclick="switchsubmit(this.form, 'back')"> <input type="button" value="確定" onclick="switchsubmit(this.form, 'exec')"><% when "exec" %>
53 <table align="center" style="width: <%= (TABLEWIDTH - 20) %>px">
56 <td class="forminput" style="text-align: center;">
63 <a href="<%= cgi.script_name %>">メニューに戻る</a>
65 <input type="hidden" name="editid" value="<%= session["editid"] %>">
66 <table align="center" style="width: <%= (TABLEWIDTH - 20) %>px;">
69 <td colspan="2" class="formheader">
75 entry = db["editentry"]
76 entry.paramlist.each do |val| %>
77 <tr style="display: <%= entry.display[val] %>;">
78 <td class="formnavi" style="width: 140px;">
79 <%= entry.name[val] %>
81 <td class="forminput">
82 <% if val == "content" %>
83 <textarea name="<%= val %>" rows="10" style="width: 100%" id="contenteditor"><%= entry.content_for_generator %></textarea>
84 <% elsif val == "updated" %>
85 <input type="text" name="<%= val %>" value="<%= Time.now.iso8601 %>" style="width: 100%;"><% else %>
86 <input type="text" name="<%= val %>" value="<%= entry.send(val) %>" style="width: 100%;"><% end %>
93 <input type="hidden" name="mode" value="editentry"><input type="hidden" name="action" value="confirm"><input type="submit" value="確認"><% when "back" %>
94 <input type="hidden" name="editid" value="<%= session["editid"] %>">
95 <table align="center" style="width: <%= (TABLEWIDTH - 20) %>px;">
98 <td colspan="2" class="formheader">
104 entry = db["editentry"]
105 entry.paramlist.each do |val| %>
106 <tr style="display: <%= entry.display[val] %>;">
107 <td class="formnavi" style="width: 140px;">
108 <%= entry.name[val] %>
110 <td class="forminput">
111 <% if val == "content" %>
112 <textarea name="<%= val %>" rows="10" style="width: 100%" id="contenteditor"><%= entry.content_for_generator %></textarea>
114 <input type="text" name="<%= val %>" value="<%= entry.send(val) %>" style="width: 100%;"><% end %>
121 <input type="hidden" name="mode" value="editentry"><input type="hidden" name="action" value="confirm"><input type="submit" value="確認"><% else %>
122 <% db.transaction do %>
123 <table align="center" style="width: <%= (TABLEWIDTH - 20) %>px;">
126 <td class="formheader" colspan="3">
131 <td class="formheader">
134 <td class="formheader" style="text-align: center;">
137 <td class="formheader" style="text-align: center;">
141 <% db["entry"].each_with_index do |entry, i| %>
143 <td class="forminput" style="width: 30px; text-align: center;">
144 <input type="radio" name="editid" value="<%= entry.send("entryid") %>">
146 <td class="forminput">
147 <%= entry.send("title") %>
149 <td class="forminput" style="width: 150px; text-align: center;">
150 <%= entry.send("published").gsub("+09:00", "").gsub("T", " ") %>
157 <% if db["entry"].length != 0 %>
158 <input type="hidden" name="mode" value="editentry"><input type="hidden" name="action" value="edit"><input type="submit" value="編集"><% else %>
168 <div class="divstyle" style="border: none;">