diff --git a/admin/Gemfile b/admin/Gemfile index 74f6a2125..5ec8a3411 100644 --- a/admin/Gemfile +++ b/admin/Gemfile @@ -37,7 +37,6 @@ gem 'bootstrap-will_paginate', '0.0.6' gem 'carrierwave', '0.9.0' gem 'carrierwave_direct' gem 'uuidtools', '2.1.2' -gem 'bcrypt-ruby', '3.0.1' gem 'jquery-rails' # , '2.3.0' # pinned because jquery-ui-rails was split from jquery-rails, but activeadmin doesn't support this gem yet gem 'jquery-ui-rails' gem 'rails3-jquery-autocomplete' diff --git a/ruby/lib/jam_ruby/models/band.rb b/ruby/lib/jam_ruby/models/band.rb index 72838fad0..ea14cabe5 100644 --- a/ruby/lib/jam_ruby/models/band.rb +++ b/ruby/lib/jam_ruby/models/band.rb @@ -67,8 +67,7 @@ module JamRuby end def recent_history - recordings = ClaimedRecording.joins(:recording) - .where(:recordings => {:band_id => "#{self.id}"}) + recordings = Recording.where(:band_id => self.id) .order('created_at DESC') .limit(10) diff --git a/ruby/lib/jam_ruby/models/feed.rb b/ruby/lib/jam_ruby/models/feed.rb index b505b71af..43f31c430 100644 --- a/ruby/lib/jam_ruby/models/feed.rb +++ b/ruby/lib/jam_ruby/models/feed.rb @@ -20,7 +20,7 @@ module JamRuby sort ||= 'date' raise "not valid sort #{sort}" unless SORT_TYPES.include?(sort) - start = params[:start] + start = params[:start].presence if sort == 'date' start ||= FIXNUM_MAX else diff --git a/ruby/lib/jam_ruby/models/music_session_history.rb b/ruby/lib/jam_ruby/models/music_session_history.rb index 09b6ab5b2..852f73f3f 100644 --- a/ruby/lib/jam_ruby/models/music_session_history.rb +++ b/ruby/lib/jam_ruby/models/music_session_history.rb @@ -39,10 +39,6 @@ module JamRuby feed.music_session_history = self end - def like_count - self.likes.size - end - def comment_count self.comments.size end diff --git a/ruby/lib/jam_ruby/models/recording.rb b/ruby/lib/jam_ruby/models/recording.rb index 7e8ea3ac9..8fc666e0f 100644 --- a/ruby/lib/jam_ruby/models/recording.rb +++ b/ruby/lib/jam_ruby/models/recording.rb @@ -40,14 +40,6 @@ module JamRuby self.band_id = nil if self.band_id == '' end - def like_count - self.likes.size - end - - def play_count - self.plays.size - end - def comment_count self.comments.size end diff --git a/ruby/lib/jam_ruby/models/user.rb b/ruby/lib/jam_ruby/models/user.rb index 1c4f49700..7ff867717 100644 --- a/ruby/lib/jam_ruby/models/user.rb +++ b/ruby/lib/jam_ruby/models/user.rb @@ -275,8 +275,7 @@ module JamRuby end def recent_history - recordings = ClaimedRecording.joins(:recording) - .where(:recordings => {:owner_id => "#{self.id}"}) + recordings = Recording.where(:owner_id => self.id) .order('created_at DESC') .limit(10) diff --git a/web/app/assets/stylesheets/web/recordings.css.scss b/web/app/assets/stylesheets/web/recordings.css.scss index 45e591aa1..2e3ac9e24 100644 --- a/web/app/assets/stylesheets/web/recordings.css.scss +++ b/web/app/assets/stylesheets/web/recordings.css.scss @@ -45,7 +45,6 @@ .recording-slider { position:absolute; - left:25%; top:0px; } diff --git a/web/app/views/recordings/show.html.erb b/web/app/views/recordings/show.html.erb index 82ea6adb5..1eef34c11 100644 --- a/web/app/views/recordings/show.html.erb +++ b/web/app/views/recordings/show.html.erb @@ -18,7 +18,7 @@ <% end %>
- <% unless @claimed_recording.recording.band.nil? %> + <% unless @claimed_recording.recording.band.blank? %>
<% unless @claimed_recording.recording.band.photo_url.blank? %> <%= image_tag "#{@claimed_recording.recording.band.photo_url}", {:alt => ""} %> @@ -51,17 +51,20 @@
<%= @claimed_recording.description %>

- <%= image_tag "content/icon_playbutton.png", {:width => 20, :height => 20, :alt => ""} %> + <%= image_tag "content/icon_playbutton.png", {:id => "imgPlayPause", :width => 20, :height => 20, :alt => ""} %>
0:00
<%= image_tag "content/slider_playcontrols.png", {:width => 5, :height => 16, :alt => ""} %>
-
4:59
+
-
1:23
+
0:00
+
-
<%= @claimed_recording.genre_id.capitalize %>
<%= @claimed_recording.recording.play_count %> @@ -99,9 +102,46 @@ <% content_for :extra_js do %> <% end %> diff --git a/web/app/views/shared/_landing_sidebar.html.erb b/web/app/views/shared/_landing_sidebar.html.erb index ab14d09fc..673acebf7 100644 --- a/web/app/views/shared/_landing_sidebar.html.erb +++ b/web/app/views/shared/_landing_sidebar.html.erb @@ -4,14 +4,15 @@ <% recent_history.each do |history_record| %> - <% if history_record.instance_of? ClaimedRecording %> + <% if history_record.instance_of? Recording %>
<%= history_record.created_at.strftime("%b #{history_record.created_at.day.ordinalize}") %>:
+
<%= history_record.claimed_recordings.first.description %>
<% elsif history_record.instance_of? MusicSessionHistory %>
@@ -31,9 +32,9 @@ Session Ended. Unavailable. <% end %>
+
<%= history_record.description %>
<% end %> -
<%= history_record.description %>
<% if history_record != recent_history.last %>

<% end %>