From fdf5ce32847dd191e5f0bc406dd211fed5271016 Mon Sep 17 00:00:00 2001 From: cgardens Date: Tue, 24 Mar 2015 16:10:14 -0700 Subject: [PATCH 1/3] added to add commit to styling branch for new pull request --- webText.md | 1 + 1 file changed, 1 insertion(+) diff --git a/webText.md b/webText.md index 004ca69..ec6a9d5 100644 --- a/webText.md +++ b/webText.md @@ -43,3 +43,4 @@ There is a great deal of debate about the neurobiology of memory, why our memori There are so many wonderful things to learn and so little time to do it. This app +added to change commit \ No newline at end of file From 51472adecc6277908d85ced6752187f8f52eb6f6 Mon Sep 17 00:00:00 2001 From: iMears Date: Tue, 24 Mar 2015 21:18:47 -0700 Subject: [PATCH 2/3] Adjust profile page to have multiple columns --- app/assets/stylesheets/application.scss | 1 + app/views/alldecks/index.html.erb | 2 +- app/views/cards/edit.html.erb | 4 +-- app/views/decks/edit.html.erb | 2 +- app/views/decks/new.html.erb | 5 ++-- app/views/layouts/application.html.erb | 2 +- app/views/users/show.html.erb | 35 +++++++++---------------- 7 files changed, 21 insertions(+), 30 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index f86c343..2e6b580 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -44,6 +44,7 @@ li a { border: 1px solid #ccc; border-radius: 7px; margin-top: 10px; + margin-bottom: 20px; } .deck-btn { diff --git a/app/views/alldecks/index.html.erb b/app/views/alldecks/index.html.erb index 968653f..e759149 100644 --- a/app/views/alldecks/index.html.erb +++ b/app/views/alldecks/index.html.erb @@ -22,7 +22,7 @@ <% if deck.user_id.to_i == current_user %>

(This is one of your decks)

<% else %> - <%= button_to 'Copy Deck To Your Profile', copy_deck_user_deck_path(user_id: deck.user_id, id: deck.id), class: "btn btn-xl btn-default form-control" %> + <%= button_to 'Copy Deck To My Profile', copy_deck_user_deck_path(user_id: deck.user_id, id: deck.id), class: "btn btn-xl btn-default form-control" %> <% end %> <% end %> diff --git a/app/views/cards/edit.html.erb b/app/views/cards/edit.html.erb index b547716..d1fbbe9 100644 --- a/app/views/cards/edit.html.erb +++ b/app/views/cards/edit.html.erb @@ -15,9 +15,9 @@

Correct Answer:

<%= f.text_field :answer_number, placeholder: "Correct Answer Number", class: "form-control" %>


- <%= f.submit "Save", class: "btn btn-md btn-info form-control" %> + <%= f.submit "Save", class: "btn btn-md btn-primary form-control" %>

- <%= link_to 'cancel', edit_user_deck_path(user_id: @user.id, id: @deck.id), class: "btn btn-md btn-default form-control" %> + <%= link_to 'Cancel', edit_user_deck_path(user_id: @user.id, id: @deck.id), class: "btn btn-md btn-danger form-control" %> <% end %> diff --git a/app/views/decks/edit.html.erb b/app/views/decks/edit.html.erb index e67ce1a..42c5115 100644 --- a/app/views/decks/edit.html.erb +++ b/app/views/decks/edit.html.erb @@ -6,7 +6,7 @@
<%= link_to '+ Add Card', new_user_deck_card_path(user_id: @user.id, deck_id: @deck.id), class: "btn btn-xl btn-primary form-control" %>

- <%= button_to "Delete Deck", { controller: :decks, action: 'destroy', id: @deck.id, user_id: @user.id }, method: :delete, data: {:confirm => 'Are you sure?'}, class: "btn btn-xl btn-danger form-control" %> + <%= link_to "Delete Deck", { controller: :decks, action: 'destroy', id: @deck.id, user_id: @user.id }, method: :delete, data: {:confirm => 'Are you sure?'}, class: "btn btn-xl btn-danger form-control" %>



diff --git a/app/views/decks/new.html.erb b/app/views/decks/new.html.erb index 1b3aac4..7306496 100644 --- a/app/views/decks/new.html.erb +++ b/app/views/decks/new.html.erb @@ -6,10 +6,9 @@

- + <%= hidden_field_tag :authenticity_token, form_authenticity_token %>
- - + \ No newline at end of file diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index e413364..cc94ffd 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,7 +1,7 @@ - RegressionFitKnowledgeCards + Flash Genius <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> <%= csrf_meta_tags %> diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 98ef240..219a7da 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -8,9 +8,8 @@

-
-
- <% @decks.each do |deck| %> + <% @decks.each do |deck| %> +
<%= link_to "#{deck.name}", user_deck_path(user_id: deck.user_id, id: deck.id) %> @@ -22,9 +21,9 @@ Optimal Number of Hours Until Next Review: <% if deck.hours_until_deck_review == "indeterminate, need more data" %> - <%= deck.hours_until_deck_review %> + <%= deck.hours_until_deck_review %> <% else %> - <%= ((deck.hours_until_deck_review.to_f * 60 * 60 - (DateTime.now.to_i - deck.updated_at.to_i) )/ 3600).round(2) %> + <%= ((deck.hours_until_deck_review.to_f * 60 * 60 - (DateTime.now.to_i - deck.updated_at.to_i) )/ 3600).round(2) %> <% end %> @@ -33,30 +32,22 @@ Predicted Date of Mastery at Current Rate: <% if deck.hour_mastery_is_attained == "indeterminate, need more data" %> - <%= deck.hour_mastery_is_attained %> + <%= deck.hour_mastery_is_attained %> <% else %> - <%= deck.hour_mastery_is_attained.to_i %> + <%= deck.hour_mastery_is_attained.to_i %> <% end %>
- <% if @user.id == current_user %> -
<%= link_to 'Take Quiz', take_quiz_user_deck_path(user_id: deck.user_id, id: deck.id), class: "btn btn-xl btn-primary form-control" %>
-
<%= link_to 'Edit Deck', edit_user_deck_path(user_id: deck.user_id, id: deck.id), class: "btn btn-xl btn-danger form-control" %>
- - <% else %> - | <%= button_to 'copy deck to your profile', copy_deck_user_deck_path(user_id: deck.user_id, id: deck.id) %> - <% end %> + <% if @user.id == current_user %> +
<%= link_to 'Take Quiz', take_quiz_user_deck_path(user_id: deck.user_id, id: deck.id), class: "btn btn-xl btn-primary form-control" %>
+
<%= link_to 'Edit Deck', edit_user_deck_path(user_id: deck.user_id, id: deck.id), class: "btn btn-xl btn-danger form-control" %>
+ <% else %> + <%= button_to 'Copy Deck My Profile', copy_deck_user_deck_path(user_id: deck.user_id, id: deck.id), class: "btn btn-xl btn-default form-control" %> + <% end %>
-

- <% end %>
-
+ <% end %>
- - - - - From 68d6b46f872a06b22e1742942305f3dda738865a Mon Sep 17 00:00:00 2001 From: imears Date: Fri, 27 Mar 2015 22:46:32 -0700 Subject: [PATCH 3/3] Add multiple columns to user index and all decks --- app/views/alldecks/index.html.erb | 46 +++++++++++++++++-------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/app/views/alldecks/index.html.erb b/app/views/alldecks/index.html.erb index e759149..8d71f53 100644 --- a/app/views/alldecks/index.html.erb +++ b/app/views/alldecks/index.html.erb @@ -6,29 +6,35 @@

-
- -
-
- <% @decks.each do |deck| %> -
-
-
- <%= link_to deck.name, user_deck_path(user_id: deck.user_id, id: deck.id) %> -
-
-

Created By: <%= link_to deck.user.username, user_path(id: deck.user_id) %>

-
- <% if deck.user_id.to_i == current_user %> -

(This is one of your decks)

- <% else %> - <%= button_to 'Copy Deck To My Profile', copy_deck_user_deck_path(user_id: deck.user_id, id: deck.id), class: "btn btn-xl btn-default form-control" %> - <% end %> -
- <% end %> +
+
+ +
+
+

+
+ <% @decks.each do |deck| %> +
+
+
+
+ <%= link_to deck.name, user_deck_path(user_id: deck.user_id, id: deck.id) %> +
+
+

Created By: <%= link_to deck.user.username, user_path(id: deck.user_id) %>

+
+ <% if deck.user_id.to_i == current_user %> +

(This is one of your decks)

+ <% else %> + <%= button_to 'Copy Deck To My Profile', copy_deck_user_deck_path(user_id: deck.user_id, id: deck.id), class: "btn btn-xl btn-default form-control" %> + <% end %> +
+
+ <% end %> +