質問編集履歴
1
新規登録のビュー追記しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -170,4 +170,130 @@
|
|
170
170
|
|
171
171
|
|
172
172
|
|
173
|
+
```new.html
|
174
|
+
|
175
|
+
```ここに言語を入力
|
176
|
+
|
177
|
+
<div class="main">
|
178
|
+
|
179
|
+
<div class="inner">
|
180
|
+
|
181
|
+
<div class="form__wrapper">
|
182
|
+
|
183
|
+
<span class="page-heading">
|
184
|
+
|
185
|
+
新規投稿
|
186
|
+
|
187
|
+
</span>
|
188
|
+
|
189
|
+
<%= form_with model: @event, url: events_path, local: true do |f| %>
|
190
|
+
|
191
|
+
<%= render 'shared/error_messages', model: f.object %>
|
192
|
+
|
193
|
+
<div class="field">
|
194
|
+
|
195
|
+
<label class="label">イベント名</label>
|
196
|
+
|
197
|
+
<%= f.text_field :name, class: :form_control %>
|
198
|
+
|
199
|
+
</div>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
<div class="field">
|
204
|
+
|
205
|
+
<label class="label">説明</label>
|
206
|
+
|
207
|
+
<%= f.text_area :explanation, class: :form__text %>
|
208
|
+
|
209
|
+
</div>
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
<div class="field">
|
214
|
+
|
215
|
+
<label class="label">ボランティア(任意)</label>
|
216
|
+
|
217
|
+
<%= f.text_area :volunteer, class: :form__text %>
|
218
|
+
|
219
|
+
</div>
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
<div class="field", id='tag-field'>
|
224
|
+
|
225
|
+
<label class="label">タグ</label>
|
226
|
+
|
227
|
+
<%= f.text_field :tagname, class:"input-tag" %>
|
228
|
+
|
229
|
+
</div>
|
230
|
+
|
231
|
+
<div class="kouho", id="search-result" >
|
232
|
+
|
233
|
+
</div>
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
<div class="field">
|
238
|
+
|
239
|
+
<label class="label">施設種類</label>
|
240
|
+
|
241
|
+
<%= f.collection_select(:facility_id, Facility.all, :id, :name, {}, {class:"select-box"}) %>
|
242
|
+
|
243
|
+
</div>
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
<div class="field">
|
248
|
+
|
249
|
+
<label class="label">規模</label>
|
250
|
+
|
251
|
+
<%= f.collection_select(:scale_id, Scale.all, :id, :name, {}, {class:"select-box"}) %>
|
252
|
+
|
253
|
+
</div>
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
<div class="field">
|
258
|
+
|
259
|
+
<label class="label">カテゴリー</label>
|
260
|
+
|
261
|
+
<%= f.collection_select(:category_id, Category.all, :id, :name, {}, {class:"select-box"}) %>
|
262
|
+
|
263
|
+
</div>
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
<div class="field">
|
268
|
+
|
269
|
+
<label class="label">画像</label>
|
270
|
+
|
271
|
+
<%= f.file_field :images, multiple: true, name: 'event[images][]', id: 'event_image', class:"select-box-image" %>
|
272
|
+
|
273
|
+
<div id="image-list"></div>
|
274
|
+
|
275
|
+
</div>
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
<div class="actions">
|
282
|
+
|
283
|
+
<%= f.submit "保存する", class: :form__btn %>
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
</div>
|
288
|
+
|
289
|
+
<% end %>
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
</div>
|
294
|
+
|
295
|
+
</div>
|
296
|
+
|
297
|
+
</div>
|
298
|
+
|
173
299
|
```
|