質問編集履歴
1
説明文を少し修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -208,100 +208,100 @@
|
|
208
208
|
|
209
209
|
```
|
210
210
|
|
211
|
-
_main_event.html.erb(index.html.erbから呼
|
211
|
+
↓_main_event.html.erb(index.html.erbから呼び出している)該当されるコードは<%# カレンダー予定追加 %>内の記述
|
212
|
+
|
213
|
+
```Ruby
|
214
|
+
|
215
|
+
<div class="event-header">
|
216
|
+
|
217
|
+
<div class=event-name>
|
218
|
+
|
219
|
+
<%= @department.name %>
|
220
|
+
|
221
|
+
</div>
|
222
|
+
|
223
|
+
<div class="event-destroy">
|
224
|
+
|
225
|
+
<%= link_to '予定表を削除する', department_path(@department.id), method: :delete, class:"button" %>
|
226
|
+
|
227
|
+
</div>
|
228
|
+
|
229
|
+
</div>
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
<div class="event-main">
|
234
|
+
|
235
|
+
<div class="plan-create">
|
236
|
+
|
237
|
+
<%= link_to '予定を追加', new_department_event_path %>
|
238
|
+
|
239
|
+
</div>
|
240
|
+
|
241
|
+
<div class="calendar">
|
242
|
+
|
243
|
+
<%# カレンダ表 %>
|
244
|
+
|
245
|
+
<%= month_calendar events: @events do |date, events| %>
|
246
|
+
|
247
|
+
<%= date.day %>
|
248
|
+
|
249
|
+
<%# カレンダー予定追加 %>
|
250
|
+
|
251
|
+
<% events.each do |event| %>
|
252
|
+
|
253
|
+
<div class="event-display">
|
254
|
+
|
255
|
+
<%=link_to event.title, department_event_path(@department,event), class:"event-title showTooltip", title: "ツールチップ"%>
|
256
|
+
|
257
|
+
<span><%= event.start_time.strftime("%H:%M")%></span>
|
258
|
+
|
259
|
+
</div>
|
260
|
+
|
261
|
+
<% end %>
|
262
|
+
|
263
|
+
<%#/ カレンダー予定追加 %>
|
264
|
+
|
265
|
+
<% end %>
|
266
|
+
|
267
|
+
<%#/ カレンダー表 %>
|
268
|
+
|
269
|
+
</div>
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
<div class="comments">
|
274
|
+
|
275
|
+
<%= render partial: 'comment', collection: @comments %>
|
276
|
+
|
277
|
+
</div>
|
278
|
+
|
279
|
+
</div>
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
<%= form_with model: [@department, @comment], class: "form", local: true do |f| %>
|
284
|
+
|
285
|
+
<div class="form-comment">
|
286
|
+
|
287
|
+
<%= f.text_field :text, placeholder: "type a message", class: "form-input" %>
|
288
|
+
|
289
|
+
<label class="form-image">
|
290
|
+
|
291
|
+
<span class="image-file">画像</span>
|
292
|
+
|
293
|
+
<%= f.file_field :image, class: "hidden" %>
|
294
|
+
|
295
|
+
</label>
|
296
|
+
|
297
|
+
</div>
|
298
|
+
|
299
|
+
<%= f.submit '送信', class: "form-submit" %>
|
300
|
+
|
301
|
+
<% end %>
|
212
302
|
|
213
303
|
```
|
214
304
|
|
215
|
-
<div class="event-header">
|
216
|
-
|
217
|
-
<div class=event-name>
|
218
|
-
|
219
|
-
<%= @department.name %>
|
220
|
-
|
221
|
-
</div>
|
222
|
-
|
223
|
-
<div class="event-destroy">
|
224
|
-
|
225
|
-
<%= link_to '予定表を削除する', department_path(@department.id), method: :delete, class:"button" %>
|
226
|
-
|
227
|
-
</div>
|
228
|
-
|
229
|
-
</div>
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
<div class="event-main">
|
234
|
-
|
235
|
-
<div class="plan-create">
|
236
|
-
|
237
|
-
<%= link_to '予定を追加', new_department_event_path %>
|
238
|
-
|
239
|
-
</div>
|
240
|
-
|
241
|
-
<div class="calendar">
|
242
|
-
|
243
|
-
<%# カレンダ表 %>
|
244
|
-
|
245
|
-
<%= month_calendar events: @events do |date, events| %>
|
246
|
-
|
247
|
-
<%= date.day %>
|
248
|
-
|
249
|
-
<%# カレンダー予定追加 %>
|
250
|
-
|
251
|
-
<% events.each do |event| %>
|
252
|
-
|
253
|
-
<div class="event-display">
|
254
|
-
|
255
|
-
<%=link_to event.title, department_event_path(@department,event), class:"event-title showTooltip", title: "ツールチップ"%>
|
256
|
-
|
257
|
-
<span><%= event.start_time.strftime("%H:%M")%></span>
|
258
|
-
|
259
|
-
</div>
|
260
|
-
|
261
|
-
<% end %>
|
262
|
-
|
263
|
-
<%#/ カレンダー予定追加 %>
|
264
|
-
|
265
|
-
<% end %>
|
266
|
-
|
267
|
-
<%#/ カレンダー表 %>
|
268
|
-
|
269
|
-
</div>
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
<div class="comments">
|
274
|
-
|
275
|
-
<%= render partial: 'comment', collection: @comments %>
|
276
|
-
|
277
|
-
</div>
|
278
|
-
|
279
|
-
</div>
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
<%= form_with model: [@department, @comment], class: "form", local: true do |f| %>
|
284
|
-
|
285
|
-
<div class="form-comment">
|
286
|
-
|
287
|
-
<%= f.text_field :text, placeholder: "type a message", class: "form-input" %>
|
288
|
-
|
289
|
-
<label class="form-image">
|
290
|
-
|
291
|
-
<span class="image-file">画像</span>
|
292
|
-
|
293
|
-
<%= f.file_field :image, class: "hidden" %>
|
294
|
-
|
295
|
-
</label>
|
296
|
-
|
297
|
-
</div>
|
298
|
-
|
299
|
-
<%= f.submit '送信', class: "form-submit" %>
|
300
|
-
|
301
|
-
<% end %>
|
302
|
-
|
303
|
-
```
|
304
|
-
|
305
305
|
|
306
306
|
|
307
307
|
### 試したこと
|