OSDN Git Service

modified CRLF in error.html.erb
[feedblog/feedgenerator.git] / erbtemp / editentry.html.erb
1 <html>
2     <head>
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;
9                 form.submit();
10             }
11         </script>
12         <% if params["action"] == "edit" || params["action"] == "back" %>
13         <script type="text/javascript" src="./openwysiwyg/scripts/wysiwyg.js">
14         </script>
15         <script type="text/javascript">
16             WYSIWYG.attach('contenteditor');
17         </script>
18         <% end %>
19     </head>
20     <body>
21         <br>
22         <%= menu %>
23         <br>
24         <div class="divstyle" style="width: <%= TABLEWIDTH %>px;">
25             <form action="<%= cgi.script_name %>" method="POST">
26                 <% case params["action"]
27                 when "confirm" %>
28                 <input type="hidden" name="editid" value="<%= session["editid"] %>">
29                 <table align="center" style="width: <%= (TABLEWIDTH - 20) %>px;">
30                     <tbody>
31                         <tr>
32                             <td colspan="2" class="formheader">
33                                 ■ 入力内容を確認してください
34                             </td>
35                         </tr>
36                         <% db.transaction do
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] %>
42                             </td>
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 %>
45                             </td>
46                         </tr>
47                         <% end %>
48                         <% end %>
49                     </tbody>
50                 </table>
51                 <br>
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">
54                     <tbody>
55                         <tr>
56                             <td class="forminput" style="text-align: center;">
57                                 記事の編集が完了しました。
58                             </td>
59                         </tr>
60                     </tbody>
61                 </table>
62                 <br>
63                 <a href="<%= cgi.script_name %>">メニューに戻る</a>
64                 <% when "edit" %>
65                 <input type="hidden" name="editid" value="<%= session["editid"] %>">
66                 <table align="center" style="width: <%= (TABLEWIDTH - 20) %>px;">
67                     <tbody>
68                         <tr>
69                             <td colspan="2" class="formheader">
70                                 ■ 記事編集
71                                 <br>
72                             </td>
73                         </tr>
74                         <% db.transaction do
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] %>
80                             </td>
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 %>
87                             </td>
88                         </tr><% end %>
89                         <% end %>
90                     </tbody>
91                 </table>
92                 <br>
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;">
96                     <tbody>
97                         <tr>
98                             <td colspan="2" class="formheader">
99                                 ■ 記事内容
100                                 <br>
101                             </td>
102                         </tr>
103                         <% db.transaction do
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] %>
109                             </td>
110                             <td class="forminput">
111                                 <% if val == "content" %>
112                                 <textarea name="<%= val %>" rows="10" style="width: 100%" id="contenteditor"><%= entry.content_for_generator %></textarea>
113                                 <% else %>
114                                 <input type="text" name="<%= val %>" value="<%= entry.send(val) %>" style="width: 100%;"><% end %>
115                             </td>
116                         </tr><% end %>
117                         <% end %>
118                     </tbody>
119                 </table>
120                 <br>
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;">
124                     <tbody>
125                         <tr>
126                             <td class="formheader" colspan="3">
127                                 ■ 編集する記事を選択してください。
128                             </td>
129                         </tr>
130                         <tr>
131                             <td class="formheader">
132                                   
133                             </td>
134                             <td class="formheader" style="text-align: center;">
135                                 記事のタイトル
136                             </td>
137                             <td class="formheader" style="text-align: center;">
138                                 最終更新時間
139                             </td>
140                         </tr>
141                         <% db["entry"].each_with_index do |entry, i| %>
142                         <tr>
143                             <td class="forminput" style="width: 30px; text-align: center;">
144                                 <input type="radio" name="editid" value="<%= entry.send("entryid") %>">
145                             </td>
146                             <td class="forminput">
147                                 <%= entry.send("title") %>
148                             </td>
149                             <td class="forminput" style="width: 150px; text-align: center;">
150                                 <%= entry.send("published").gsub("+09:00", "").gsub("T", " ") %>
151                             </td>
152                         </tr>
153                         <% end %>
154                     </tbody>
155                 </table>
156                 <br>
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 %>
159                 編集対象となる記事が存在しません。
160                 <br>
161                 <br>
162                 <% end %>
163                 <% end %>
164                 <% end %>
165             </form>
166         </div>
167         <br>
168         <div class="divstyle" style="border: none;">
169             <%= APPVERSION %>
170         </div>
171     </body>
172 </html>