diff --git a/app/views/groups/_randos.html.erb b/app/views/groups/_randos.html.erb index 011ae88..68da884 100644 --- a/app/views/groups/_randos.html.erb +++ b/app/views/groups/_randos.html.erb @@ -3,63 +3,71 @@

Read With a Rando

<% if @randos != nil %> - <% @randos.each do |rando, score| %> - - - - - - - - - + <% @randos.each_with_index do |(rando, score),index| %> + + + -
-

<%= rando.name %>

-

<%= rando.description %>

- > -
+ +
+
+
- - Location: <%= rando.location %>
- Gender: <%= rando.gender %>
- Age: <%= rando.age %>
- Description: <%= rando.description %>
- Favorite books: <%= rando.fav_books %>
+

<%= rando.name %>

+
+

+ <% if (rando.age != nil && rando.location != nil && rando.location != '' ) %> + Personal info

<%= rando.location %>

+

<%= rando.gender.capitalize + ', ' + rando.age.to_s %>

+ <% else %> + This user has not completed profile info. + <%end %> +
- Favorite genres: - <% result = "" %> - <% rando.genre.attributes.each_pair do |key, value| %> - <% if value == 1 && key != "user_id" && key != "id"%> - <% result += key + ", " %> - <% end %> - <% end %> - <%= result[0..(result.length - 3)] %> -
- Favorite authors: <%= rando.fav_authors %>
- Completed books: - <% rando.groups.each do |group| %> - <% if group.status == false %> - <%= group.book.title %>
- <% end %> - <% end %>
- Ongoing books: - <% rando.groups.each do |group| %> - <% if group.status == true %> - <%= group.book.title %>
- <% end %> - <% end %>
- × -
+
+ About
<%= rando.description %>
+ Favorite books
<%= rando.fav_books %>
+ Favorite genres
+ <% result = "" %> + <% rando.genre.attributes.each_pair do |key, value| %> + <% if value == 1 && key != "user_id" && key != "id"%> + <% result += key + ", " %> + <% end %> + <% end %> + <%= result[0..(result.length - 3)] %>
+ - <% end %> + Favorite authors
<%= rando.fav_authors %>
+ Completed books
+ <% rando.groups.each do |group| %> + <% if group.status == false %> + <%= group.book.title.split(":")[0] %>
+ <% end %> + <% end %> + +
+
+
+ × +
+ + + + + + + + + + + <% end %> <% end %>
><%= link_to rando.name, "#", "data-reveal-id" => "myModal" %><%= rando.age %><%= rando.location %><%= rando.description %><%= score.to_i %>% compatible - <%= form_for(@group) do |f| %> - <%= hidden_field_tag("newuser", rando.id) %> - <%= hidden_field_tag("isbn", params[:isbn]) %> - <%= f.submit "Select", :class => "button small radius" %> - <% end %> -
><%= link_to rando.name, "#", "data-reveal-id" => "myModal-#{index}" %><%= rando.age %><%= rando.location %><%= rando.description %><%= score.to_i %>% compatible + <%= form_for(@group) do |f| %> + <%= hidden_field_tag("newuser", rando.id) %> + <%= hidden_field_tag("isbn", params[:isbn]) %> + <%= f.submit "Select", :class => "button small radius" %> + <% end %> +
diff --git a/doc/controllers_brief.svg b/doc/controllers_brief.svg index eb9e593..80d0e1f 100644 --- a/doc/controllers_brief.svg +++ b/doc/controllers_brief.svg @@ -12,8 +12,8 @@ _diagram_info Controllers diagram -Date: Jul 23 2014 - 09:49 -Migration version: 20140722193943 +Date: Jul 24 2014 - 21:52 +Migration version: 20140724174523 Generated by RailRoady 1.1.1 http://railroady.prestonlee.com diff --git a/doc/controllers_complete.svg b/doc/controllers_complete.svg index 5450463..ab2338c 100644 --- a/doc/controllers_complete.svg +++ b/doc/controllers_complete.svg @@ -4,153 +4,156 @@ - - + + controllers_diagram - + _diagram_info Controllers diagram -Date: Jul 23 2014 - 09:48 -Migration version: 20140722193943 +Date: Jul 24 2014 - 21:51 +Migration version: 20140724174523 Generated by RailRoady 1.1.1 http://railroady.prestonlee.com ApplicationController - -ApplicationController - - - -_layout -current_user + +ApplicationController + +disable_footer + + +_layout +current_user BooksController - -BooksController - -show - - -_layout + +BooksController + +show + + +_layout ApplicationController->BooksController - + GroupsController - -GroupsController - -autocomplete_book_title -autocomplete_user_name -create -displaybooksearch -displayusersearch -finish_book -list -new -searchbooks -searchusers -show - - -_layout -note_display + +GroupsController + +autocomplete_book_title +autocomplete_user_name +create +displaybooksearch +displayusersearch +finish_book +list +new +searchbooks +searchusers +show + + +_layout +find_last_page_read +note_display ApplicationController->GroupsController - + NotesController - -NotesController - -create -destroy -edit -update - - -_layout -note_params + +NotesController + +create +destroy +edit +update + + +_layout +note_params ApplicationController->NotesController - + RequestsController - -RequestsController - -confirm -create -destroy - - -_layout + +RequestsController + +confirm +create +destroy + + +_layout ApplicationController->RequestsController - + SessionsController - -SessionsController - -create -destroy - - -_layout + +SessionsController + +create +destroy + + +_layout ApplicationController->SessionsController - + StaticPagesController - -StaticPagesController - -index -invite -sendinvite - - -_layout + +StaticPagesController + +index +invite +sendinvite + + +_layout ApplicationController->StaticPagesController - + UsersController - -UsersController - -destroy -edit -groups -index -show -update - - -_layout -genre_params -user_params + +UsersController + +destroy +edit +groups +index +notifications +show +update + + +_layout +genre_params +user_params ApplicationController->UsersController - + diff --git a/doc/models_brief.svg b/doc/models_brief.svg index 98733f8..c59544d 100644 --- a/doc/models_brief.svg +++ b/doc/models_brief.svg @@ -4,156 +4,171 @@ - + models_diagram - + _diagram_info -Models diagram -Date: Jul 23 2014 - 09:48 -Migration version: 20140722193943 -Generated by RailRoady 1.1.1 -http://railroady.prestonlee.com +Models diagram +Date: Jul 24 2014 - 21:51 +Migration version: 20140724174523 +Generated by RailRoady 1.1.1 +http://railroady.prestonlee.com Book - -Book + +Book Genre - -Genre + +Genre Group - -Group + +Group Group->Book - - - + + + Note - -Note + +Note Group->Note - - - + + + -Request - -Request +Request + +Request Group->Request - - - + + + -User - -User +User + +User Group->User - - - + + + -GroupsUser - -GroupsUser +GroupsUser + +GroupsUser Group->GroupsUser - - - + + + + + +Notification + +Notification -User->Genre - - - +User->Genre + + + + + +User->Notification + + + -User->Request - - - +User->Request + + + -User->Request - - - -reverse_requests +User->Request + + + +reverse_requests -User->User - - - -requesteds +User->User + + + +requesteds -User->User - - - -requesters +User->User + + + +requesters -UsersGroup - -UsersGroup +UsersGroup + +UsersGroup -User->UsersGroup - - - +User->UsersGroup + + + -ActiveRecord::Base - -ActiveRecord::Base +ActiveRecord::Base + +ActiveRecord::Base ActiveRecord::Base->Book - + ActiveRecord::Base->Genre - + ActiveRecord::Base->Group - + ActiveRecord::Base->Note - + + + +ActiveRecord::Base->Notification + -ActiveRecord::Base->Request - +ActiveRecord::Base->Request + -ActiveRecord::Base->User - +ActiveRecord::Base->User + diff --git a/doc/models_complete.svg b/doc/models_complete.svg index 0655a0f..776b5f5 100644 --- a/doc/models_complete.svg +++ b/doc/models_complete.svg @@ -4,232 +4,256 @@ - + models_diagram - + _diagram_info -Models diagram -Date: Jul 23 2014 - 09:47 -Migration version: 20140722193943 -Generated by RailRoady 1.1.1 -http://railroady.prestonlee.com +Models diagram +Date: Jul 24 2014 - 21:50 +Migration version: 20140724174523 +Generated by RailRoady 1.1.1 +http://railroady.prestonlee.com Book - -Book - -id :integer -group_id :integer -created_at :datetime -updated_at :datetime -title :string -isbn :string -summary :text -author :string -publisher :string -pagecount :integer -imagelinklarge :string -imagelinksmall :string -datepublished :string -buylink :string -previewlink :string + +Book + +id :integer +group_id :integer +created_at :datetime +updated_at :datetime +title :string +isbn :string +summary :text +author :string +publisher :string +pagecount :integer +imagelinklarge :string +imagelinksmall :string +datepublished :string +buylink :string +previewlink :string Genre - -Genre - -id :integer -classic :integer -comedy :integer -comic :integer -educational :integer -historical :integer -memoir :integer -mystery :integer -nonfiction :integer -poetry :integer -pulp :integer -romance :integer -scifi :integer -shortstory :integer -created_at :datetime -updated_at :datetime -user_id :integer + +Genre + +id :integer +classic :integer +comedy :integer +comic :integer +educational :integer +historical :integer +memoir :integer +mystery :integer +nonfiction :integer +poetry :integer +pulp :integer +romance :integer +scifi :integer +shortstory :integer +created_at :datetime +updated_at :datetime +user_id :integer Group - -Group - -id :integer -created_at :datetime -updated_at :datetime -status :boolean + +Group + +id :integer +created_at :datetime +updated_at :datetime +status :boolean Group->Book - - - + + + Note - -Note - -id :integer -group_id :integer -pagenumber :integer -body :text -created_at :datetime -updated_at :datetime -user_id :integer + +Note + +id :integer +group_id :integer +pagenumber :integer +body :text +created_at :datetime +updated_at :datetime +user_id :integer Group->Note - - - + + + -Request - -Request - -id :integer -status :boolean -created_at :datetime -updated_at :datetime -requested_id :integer -requester_id :integer -group_id :integer +Request + +Request + +id :integer +status :boolean +created_at :datetime +updated_at :datetime +requested_id :integer +requester_id :integer +group_id :integer Group->Request - - - + + + -User - -User - -id :integer -fname :string -lname :string -email :string -created_at :datetime -updated_at :datetime -provider :string -uid :string -name :string -oauth_token :string -oauth_expires_at :datetime -image :string -gender :string -location :string -description :text -fav_books :text -fav_genres :text -fav_authors :text -age :integer -zipcode :string +User + +User + +id :integer +fname :string +lname :string +email :string +created_at :datetime +updated_at :datetime +provider :string +uid :string +name :string +oauth_token :string +oauth_expires_at :datetime +image :string +gender :string +location :string +description :text +fav_books :text +fav_genres :text +fav_authors :text +age :integer +zipcode :string Group->User - - - + + + -GroupsUser - -GroupsUser +GroupsUser + +GroupsUser Group->GroupsUser - - - + + + + + +Notification + +Notification + +id :integer +user_id :integer +read :boolean +content :string +created_at :datetime +updated_at :datetime +destination :string +group :integer -User->Genre - - - +User->Genre + + + + + +User->Notification + + + -User->Request - - - +User->Request + + + -User->Request - - - -reverse_requests +User->Request + + + +reverse_requests -User->User - - - -requesteds +User->User + + + +requesteds -User->User - - - -requesters +User->User + + + +requesters -UsersGroup - -UsersGroup +UsersGroup + +UsersGroup -User->UsersGroup - - - +User->UsersGroup + + + -ActiveRecord::Base - -ActiveRecord::Base +ActiveRecord::Base + +ActiveRecord::Base ActiveRecord::Base->Book - + ActiveRecord::Base->Genre - + ActiveRecord::Base->Group - + ActiveRecord::Base->Note - + + + +ActiveRecord::Base->Notification + -ActiveRecord::Base->Request - +ActiveRecord::Base->Request + -ActiveRecord::Base->User - +ActiveRecord::Base->User +