質問編集履歴

1

追記:views/observations/show.html.erbの追記。不要なビューの削除。

2020/09/11 03:37

投稿

Misa0
Misa0

スコア2

test CHANGED
File without changes
test CHANGED
@@ -172,41 +172,71 @@
172
172
 
173
173
 
174
174
 
175
+
176
+
175
- ```ruby
177
+ ```ruby
178
+
176
-
179
+ Rails.application.routes.draw do
180
+
181
+ devise_for :users
182
+
183
+ get 'patients/index'
184
+
185
+ root to: "patients#index"
186
+
187
+ resources :users, only: [:edit, :update]
188
+
189
+ resources :patients, only: [:new, :create, :index, :show, :edit, :update] do
190
+
191
+ resources :observations, only: [:new, :create, :edit, :show, :update]
192
+
193
+ end
194
+
195
+ end
196
+
197
+ ```
198
+
199
+
200
+
201
+ ```ruby
202
+
203
+ ~views/observations/show.html.erb~
204
+
205
+ <div class="observation-show">
206
+
207
+ <div class="observation-box">
208
+
209
+
210
+
177
- <div class="item-show">
211
+ <div class="btn">
178
-
212
+
179
- <div class="item-box">
213
+ <div class="ns-btn">
214
+
180
-
215
+ <%= image_tag "くま看護師.png" ,class:"kuma-icon" ,width:"40",height:"40"%>
216
+
181
- <%= form_with model: [@patient,@observation], local: true do |f| %>
217
+ <%= link_to "観察項目編集", edit_patient_observation_path %>
182
-
183
- <table class="detail-table">
218
+
184
-
185
- <tbody>
186
-
187
- <tr>
188
-
189
- <th>観察時間</th>
190
-
191
- <td><%= f.text_field :time %></td>
192
-
193
- </tr>
219
+ </div>
194
-
195
- <tr>
220
+
196
-
197
- #省略
198
-
199
- <th>観察記録保存</th>
221
+ <div class="kensa-btn">
200
-
222
+
201
- <td><%= f.submit '反映', class: 'btn btn-primary btn-block' %></td>
223
+ <%= image_tag "レントゲン1.jpg" ,class:"kensa-icon" ,width:"40",height:"40"%>
224
+
202
-
225
+ <%= link_to "検査結果参照", '#' %>
226
+
203
- </tr>
227
+ </div>
228
+
204
-
229
+ <div class="syoti-btn">
230
+
231
+ <%= image_tag "点滴.jpeg" ,class:"treatment-icon" ,width:"40",height:"40"%>
232
+
233
+ <%= link_to "処置の入力", '#' %>
234
+
205
- </tbody>
235
+ </div>
206
-
236
+
207
- </table>
237
+ </div>
208
-
238
+
209
- <% end %>
239
+ </div>
210
240
 
211
241
  </div>
212
242
 
@@ -214,30 +244,6 @@
214
244
 
215
245
 
216
246
 
217
- ```ruby
218
-
219
- Rails.application.routes.draw do
220
-
221
- devise_for :users
222
-
223
- get 'patients/index'
224
-
225
- root to: "patients#index"
226
-
227
- resources :users, only: [:edit, :update]
228
-
229
- resources :patients, only: [:new, :create, :index, :show, :edit, :update] do
230
-
231
- resources :observations, only: [:new, :create, :edit, :show, :update]
232
-
233
- end
234
-
235
- end
236
-
237
- ```
238
-
239
-
240
-
241
247
  def set_observation
242
248
 
243
249
  **@observation = Observation.find(params[:patient_id])**