diff --git a/README.md b/README.md index 26df7df..0b02bd0 100644 --- a/README.md +++ b/README.md @@ -154,5 +154,3 @@ heroku run rails db:seed * [Legacy Code](https://github.com/tamu-edu-students/csce606-ELRC-Synergistic-Leadership-Theory) -# demo check commit -# second demo push diff --git a/rails_root/app/controllers/survey_responses_controller.rb b/rails_root/app/controllers/survey_responses_controller.rb index 504bf5b..4b1b1ed 100644 --- a/rails_root/app/controllers/survey_responses_controller.rb +++ b/rails_root/app/controllers/survey_responses_controller.rb @@ -25,6 +25,7 @@ def index def show return return_to_root 'You are not logged in.' if current_user_id.nil? return return_to_root 'You cannot view this result.' if current_user_id != @survey_response.profile.user_id + flash.keep(:warning) end diff --git a/rails_root/app/views/admins/index.html.erb b/rails_root/app/views/admins/index.html.erb index d2db529..a332500 100644 --- a/rails_root/app/views/admins/index.html.erb +++ b/rails_root/app/views/admins/index.html.erb @@ -8,22 +8,26 @@
ID | -Profile | -Share Code | -Created At | -|
---|---|---|---|---|
ID | +Profile | +Share Code | +Created At | +View Survey | +
<%= response.id %> | -<%= response.profile.user_id %> | -<%= response.share_code %> | -<%= response.created_at.strftime('%Y-%m-%d %H:%M:%S') %> | -|
<%= response.id %> | +<%= response.profile.user_id %> | +<%= response.share_code %> | +<%= response.created_at.strftime('%Y-%m-%d %H:%M:%S') %> | ++ <%= link_to 'View Survey', survey_response_path(response) %> + | +