OSDN Git Service

7f8a721bc78249706fc10d0f2eecb1cc151feb23
[feedblog/feedgenerator.git] / erbtemp / insertfeed.html.erb
1 <!DOCTYPE html>
2 <html>
3         <head>
4                 <%= htmlparts["headtag"] %>
5                 <%= htmlparts['headjs_switchpost'] %>
6         </head>
7         <body>
8                 <form action="<%= cgi.script_name %>" method="POST" enctype="multipart/form-data">
9                         <div class="menu_wrapper">
10                                 <%= htmlparts["menu"] %>
11                         </div>
12                         <%= htmlparts["selectfile"] %>
13                         <%= htmlparts["infoarea"] %>
14                         <% db.transaction do %>
15                         <div class="contents">
16                                 <h1>ファイルインポート</h1>
17                                 <% case params["action"]
18                 when "confirm" %>
19                  ■ 赤色の位置にログを挿入します
20                 <br>
21                 <br>
22                 <table>
23                     <tbody>
24                          <tr>
25                             <th class="large center padding_normal">
26                                 ログファイルのパス
27                             </th>
28                             <th class="small center padding_normal">
29                                 ログの表示名
30                             </th>
31                         </tr>
32                         <tr>
33                             <td class="hr"></td>
34                             <td class="hr"></td>
35                         </tr>
36                         <% written = false %>
37                         <% db["loglist"].path.each_with_index do |log, i| %>
38                         <% if i == db["loginsertindex"] %>
39                         <tr>
40                             <td class="center padding_normal red border_red">
41                                 <%= db["logpath"] %>
42                                 <input type="hidden" name="logpath" value="<%= db["logpath"] %>">
43                             </td>
44                             <td class="center padding_normal red border_red">
45                                 <%= db["logdisplay"] %>
46                                 <input type="hidden" name="logdisplay" value="<%= db["logdisplay"] %>">
47                             </td>
48                         </tr>
49                         <tr>
50                             <td class="hr"></td>
51                             <td class="hr"></td>
52                         </tr>
53                         <% written = true %>
54                         <% end %>
55                         <tr>
56                             <td class="center padding_normal">
57                                 <%= log %>
58                             </td>
59                             <td class="center padding_normal">
60                                 <%= db["loglist"].display[i] %>
61                             </td>
62                         </tr>
63                         <tr>
64                             <td class="hr"></td>
65                             <td class="hr"></td>
66                         </tr>
67                         <% end %>
68                         <% if written == false %>
69                         <tr>
70                             <td class="center padding_normal red border_red">
71                                 <%= db["logpath"] %>
72                                 <input type="hidden" name="logpath" value="<%= db["logpath"] %>">
73                             </td>
74                             <td class="center padding_normal red border_red">
75                                 <%= db["logdisplay"] %>
76                                 <input type="hidden" name="logdisplay" value="<%= db["logdisplay"] %>">
77                             </td>
78                         </tr>
79                         <tr>
80                             <td class="hr"></td>
81                             <td class="hr"></td>
82                         </tr>
83                         <% end %>
84                     </tbody>
85                 </table>
86                 <br>
87                 <div class="center">
88                         <input type="hidden" name="loginsertindex" value="<%= db["loginsertindex"] %>"><input type="hidden" name="mode" value="insert"><input type="hidden" name="action" value=""><input type="button" value="戻る" onclick="switchsubmit(this.form, '')"> <input type="button" value="確定" onclick="switchsubmit(this.form, 'exec')">
89                 </div>
90                 <br>
91                 <br>
92                 <% else %>
93                  ■ 指定されたログの後にインポートされたファイルを挿入します
94                 <br>
95                 <br>
96                 <table>
97                     <tbody>
98                         <tr>
99                             <td class="center" style="width: 50px;">
100                                   
101                             </td>
102                             <th class="normal center padding_normal">
103                                 ログファイルのパス
104                             </th>
105                             <th class="normal center padding_normal">
106                                 ログの表示名
107                             </th>
108                         </tr>
109                         <tr>
110                                 <td class="hr"></td>
111                             <td class="hr"></td>
112                             <td class="hr"></td>
113                         </tr>
114                         <% index = 1 %>
115                         <% db["loglist"].path.each_with_index do |log, i| %>
116                         <tr>
117                             <td class="center padding_normal">
118                                 <% if index == 1 %>
119                                 <input type="radio" name="loginsertindex" value="<%= index %>" checked="checked"><% else %>
120                                 <input type="radio" name="loginsertindex" value="<%= index %>"><% end %>
121                             </td>
122                             <td class="center padding_normal">
123                                 <%= log %>
124                             </td>
125                             <td class="center padding_normal">
126                                 <%= db["loglist"].display[i] %>
127                             </td>
128                         </tr>
129                         <tr>
130                                 <td class="hr"></td>
131                             <td class="hr"></td>
132                             <td class="hr"></td>
133                         </tr>
134                         <% index = index + 1 %>
135                         <% end %>
136                     </tbody>
137                 </table>
138                 <br>
139                 <table>
140                     <tbody>
141                         <tr>
142                             <th class="small middle padding_normal">
143                                 インポートファイル
144                             </th>
145                             <td class="large middle padding_normal center">
146                                 <input type="file" name="updata" class="max_width">
147                             </td>
148                         </tr>
149                         <tr>
150                             <td class="hr"></td>
151                             <td class="hr"></td>
152                         </tr>
153                         <tr>
154                             <th class="small middle padding_normal">
155                                 インポート後のファイルパス
156                             </th>
157                             <td class="large middle padding_normal center">
158                                 <input type="text" name="logpath" class="max_width">
159                             </td>
160                         </tr>
161                         <tr>
162                             <td class="hr"></td>
163                             <td class="hr"></td>
164                         </tr>
165                         <tr>
166                             <th class="small middle padding_normal">
167                                 ファイルのインポート表示名
168                             </th>
169                             <td class="large middle padding_normal center">
170                                 <input type="text" name="logdisplay" class="max_width">
171                             </td>
172                         </tr>
173                     </tbody>
174                 </table>
175                 <br>
176                 <div class="center">
177                         <input type="hidden" name="mode" value="insert"><input type="hidden" name="action" value=""><input type="button" value="確認" onclick="switchsubmit(this.form, 'confirm')">
178                 </div>
179                 <br>
180                 <br>
181                 <% end %>
182                         </div>
183                         <% end %>
184                         <div class="bottom_area">
185                                 <%= APPVERSION %>
186                         </div>
187                 </form>
188         </body>
189 </html>