public
Description: The kick ass (non-commercial) home for musicians and their music
Homepage: http://alonetone.com
Clone URL: git://github.com/sudara/alonetone.git
Major reworking of sharing functionality and tweaks across the css
sudara (author)
Mon Apr 28 13:01:09 -0700 2008
commit  bfc34288b2efd27df188c1a83d6e896b8e649248
tree    279c2b7fad50edcc243f126d31ee97ee61a18d67
parent  4426d950e202e33e3d5de7da3764d2cf71c53645
...
9
10
11
12
 
13
14
15
...
9
10
11
 
12
13
14
15
0
@@ -9,7 +9,7 @@ class ApplicationController < ActionController::Base
0
   before_filter :ie6
0
   before_filter :login_by_token, :display_news
0
   before_filter :set_page_title
0
- before_filter :currently_online, :prep_bugaboo
0
+ before_filter :prep_bugaboo
0
   before_filter :update_last_seen_at, :only => [:index]
0
   before_filter :set_latest_update_title
0
   
...
24
25
26
27
28
29
30
31
...
34
35
36
 
37
38
39
...
24
25
26
 
 
27
28
29
...
32
33
34
35
36
37
38
0
@@ -24,8 +24,6 @@ class AssetsController < ApplicationController
0
       end
0
   end
0
 
0
- # GET /assets/1
0
- # GET /assets/1.xml
0
   def show
0
     respond_to do |format|
0
       format.html do
0
@@ -34,6 +32,7 @@ class AssetsController < ApplicationController
0
         @listens = @asset.listens.find(:all)
0
         @comments = @asset.comments.find_all_by_spam(false)
0
         @listeners = @asset.listeners.first(5)
0
+ @single = true
0
       end
0
       format.mp3 do
0
         register_listen
...
4
5
6
 
 
 
 
7
8
9
10
 
11
12
13
...
27
28
29
30
 
31
32
33
...
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
...
32
33
34
 
35
36
37
38
0
@@ -4,10 +4,15 @@ class PagesController < ApplicationController
0
 
0
   class Fuck < StandardError; end
0
 
0
+ def index
0
+ @page_title = "About alonetone, the kickass home for musicians"
0
+ end
0
+
0
   def home
0
   end
0
 
0
   def about
0
+ @page_title = "About alonetone, the kickass home for musicians"
0
   end
0
   
0
   def actually_going_somewhere_with_facebooker_and_rails
0
@@ -27,7 +32,7 @@ class PagesController < ApplicationController
0
   end
0
   
0
   def itunes
0
-
0
+ @page_title = "How to get your music on iTunes (as a music podcast) with alonetone"
0
   end
0
   
0
   def sitemap
...
4
5
6
7
 
8
9
10
...
4
5
6
 
7
8
9
10
0
@@ -4,7 +4,7 @@ class UpdatesController < ApplicationController
0
   # GET /updates.xml
0
   def index
0
     @updates = Update.find(:all, :order => 'created_at DESC')
0
-
0
+ @page_title = "Latest News about alonetone, the kick ass musician's home"
0
     respond_to do |format|
0
       format.html # index.html.erb
0
       format.xml { render :xml => @updates }
...
6
7
8
9
 
10
11
12
...
6
7
8
 
9
10
11
12
0
@@ -6,7 +6,7 @@ class UserReportsController < ApplicationController
0
   # GET /user_reports.xml
0
   def index
0
     @user_reports = UserReport.find_all_by_spam(false, :include => :user, :order => 'user_reports.created_at DESC')
0
-
0
+ @page_title = "Feedback about alonetone"
0
     respond_to do |format|
0
       format.html # index.html.erb
0
       format.xml { render :xml => @user_reports }
...
1
2
3
4
5
6
7
8
9
10
11
12
13
...
41
42
43
44
 
45
46
47
...
55
56
57
58
 
 
59
60
61
...
77
78
79
80
81
 
82
83
84
 
85
86
87
...
1
2
 
3
4
5
6
7
8
 
9
10
11
...
39
40
41
 
42
43
44
45
...
53
54
55
 
56
57
58
59
60
...
76
77
78
 
 
79
80
81
82
83
84
85
86
0
@@ -1,13 +1,11 @@
0
 class UsersController < ApplicationController
0
   
0
-
0
   skip_before_filter :update_last_seen_at, :only => [:create, :new, :activate, :sudo]
0
   before_filter :find_user, :except => [:new, :create, :sudo]
0
   
0
   before_filter :login_required, :except => [:index, :show, :new, :create, :activate, :bio]
0
   skip_before_filter :login_by_token, :only => :sudo
0
   
0
- rescue_from NoMethodError, :with => :display_user_home_or_index
0
 
0
 
0
   def index
0
@@ -41,7 +39,7 @@ class UsersController < ApplicationController
0
         @assets = @user.assets.find(:all, :limit => 5)
0
         @playlists = @user.playlists.find(:all,:conditions => [ "tracks_count > 0"])
0
         @listens = @user.listens.find(:all, :limit =>5)
0
- @track_plays = @user.track_plays.find(:all, :limit =>10)
0
+ @track_plays = @user.track_plays.from_user.find(:all, :limit =>10)
0
         @comments = @user.comments.find_all_by_spam(false, :limit => 10)
0
       end
0
       format.xml { @assets = @user.assets.find(:all, :order => 'created_at DESC')}
0
@@ -55,7 +53,8 @@ class UsersController < ApplicationController
0
 
0
   def new
0
     @user = User.new
0
- @page_title = "Sign up with alonetone to upload your mp3s or discover new music"
0
+ @page_title = "Sign up to upload your mp3s on alonetone"
0
+ flash.now[:error] = "Join alonetone to upload and create playlists (it is quick: about 45 seconds)" if params[:new]
0
   end
0
   
0
   
0
@@ -77,11 +76,11 @@ class UsersController < ApplicationController
0
           flash[:error] = "The signup message cannot be sent to '#{CGI.escapeHTML @user.email}' at this moment. Please, try again later."
0
           redirect_to :action => "new"
0
         end
0
- flash[:ok] = "An email was sent to '#{CGI.escapeHTML @user.email}'. <br/>You just have to click the link in the email, and the hard work is over! <br/> Note: check your junk/spam inbox if you don't see a new email right away."
0
- redirect_to login_path
0
+ flash[:ok] = "We just sent you an email to '#{CGI.escapeHTML @user.email}'.<br/><br/>You just have to click the link in the email, and the hard work is over! <br/> Note: check your junk/spam inbox if you don't see a new email right away."
0
       end
0
     end
0
     rescue ActiveRecord::RecordInvalid
0
+ flash[:error] = "Whups, there was a small issue"
0
       render :action => 'new'
0
   end
0
   
...
47
48
49
50
51
 
 
 
52
53
54
...
47
48
49
 
 
50
51
52
53
54
55
0
@@ -47,8 +47,9 @@ module ApplicationHelper
0
     link_to ' ', formatted_user_track_path(asset.user.login, asset.permalink, :mp3), :id=>"play-#{asset.id}", :class => 'play_link', :referer => referer
0
   end
0
   
0
- def user_nav_item(text, link, added_class='link')
0
- content_tag(:li, link_to_unless_current(text, link),:class=> ("#{added_class} #{"current" if current_page?(link)}"))
0
+ def user_nav_item(text, link, options=nil)
0
+ added_class = options.delete(:added_class) if options.is_a? Hash
0
+ content_tag(:li, link_to_unless_current(text, link, options),:class=> ("#{added_class} #{"current" if current_page?(link)}"))
0
   end
0
   
0
   def link_source(source)
...
17
18
19
20
 
21
22
23
...
34
35
36
 
 
37
38
39
...
17
18
19
 
20
21
22
23
...
34
35
36
37
38
39
40
41
0
@@ -17,7 +17,7 @@
0
 # end
0
 
0
 class Asset < ActiveRecord::Base
0
-
0
+
0
   # used for extra mime types that dont follow the convention
0
   @@extra_content_types = { :audio => ['application/ogg'], :movie => ['application/x-shockwave-flash'], :pdf => ['application/pdf'] }.freeze
0
   @@allowed_extensions = %w(.mp3)
0
@@ -34,6 +34,8 @@ class Asset < ActiveRecord::Base
0
   cattr_reader *%w(movie audio image other).collect! { |t| "#{t}_condition".to_sym }
0
   
0
   has_many :tracks, :dependent => :destroy
0
+ has_many :playlists, :through => :tracks
0
+
0
   belongs_to :user, :counter_cache => true
0
   
0
   has_many :listens, :dependent => :destroy
...
1
 
 
 
2
3
4
...
1
2
3
4
5
6
7
0
@@ -1,4 +1,7 @@
0
 class Comment < ActiveRecord::Base
0
+
0
+ named_scope :valid, :conditions => [:spam => false]
0
+
0
   belongs_to :commentable, :polymorphic => true
0
 
0
   # optional user who made the comment
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 
 
19
20
21
...
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
0
@@ -1,21 +1,11 @@
0
-# == Schema Information
0
-# Schema version: 16
0
-#
0
-# Table name: listens
0
-#
0
-# id :integer(11) not null, primary key
0
-# asset_id :integer(11)
0
-# user_id :integer(11)
0
-# created_at :datetime
0
-# updated_at :datetime
0
-#
0
-
0
 class Listen < ActiveRecord::Base
0
   
0
   @@launch_date = 'Tue Jan 01 00:00:00 +0100 2008'.to_time
0
   
0
   # A "Listen" occurs when a user listens to another users track
0
   belongs_to :asset, :counter_cache => true
0
+
0
+ named_scope :from_user, {:conditions => ['listener_id != ""']}
0
   
0
   belongs_to :listener, :class_name => 'User', :foreign_key => 'listener_id'
0
   belongs_to :track_owner, :class_name => 'User', :counter_cache => true
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
 
 
 
32
33
34
...
139
140
141
142
 
143
144
145
...
159
160
161
162
 
163
164
 
165
166
167
...
187
188
189
190
 
191
192
193
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
...
118
119
120
 
121
122
123
124
...
138
139
140
 
141
142
 
143
144
145
146
...
166
167
168
 
169
170
171
172
0
@@ -1,34 +1,13 @@
0
-# == Schema Information
0
-# Schema version: 16
0
-#
0
-# Table name: users
0
-#
0
-# id :integer(11) not null, primary key
0
-# login :string(40)
0
-# email :string(100)
0
-# salt :string(40)
0
-# activation_code :string(40)
0
-# activated_at :datetime
0
-# created_at :datetime
0
-# updated_at :datetime
0
-# deleted_at :datetime
0
-# token :string(255)
0
-# token_expires_at :datetime
0
-# admin :boolean(1)
0
-# last_seen_at :datetime
0
-# crypted_password :string(40)
0
-# assets_count :integer(11)
0
-# display_name :string(255)
0
-# identity_url :string(255)
0
-# pic_id :integer(11)
0
-#
0
-
0
 require 'digest/sha1'
0
 class User < ActiveRecord::Base
0
   
0
   # has a bunch of prefs
0
   serialize :settings
0
   
0
+ named_scope :musicians, {:conditions => ['assets_count > ?',0], :order => 'assets_count DESC', :include => :pic}
0
+ named_scope :activated, {:conditions => {:activation_code => nil}, :order => 'created_at DESC', :include => :pic}
0
+ named_scope :recently_seen, {:order => 'last_seen_at DESC', :include => :pic}
0
+
0
   # Can create music
0
   has_many :assets, :dependent => :destroy, :order => 'created_at DESC'
0
   has_many :playlists, :dependent => :destroy, :order => 'playlists.created_at DESC'
0
@@ -139,7 +118,7 @@ class User < ActiveRecord::Base
0
   end
0
   
0
   def listens_average
0
- (self.listens_count.to_f / ((((Time.now - self.assets.first.created_at) / 60 / 60 / 24 )).ceil)).ceil
0
+ (self.listens_count.to_f / ((((Time.now - self.assets.find(:all, :limit => 1, :order => 'created_at').first.created_at) / 60 / 60 / 24 )).ceil)).ceil
0
   end
0
   
0
   def dummy_pic(size)
0
@@ -159,9 +138,9 @@ class User < ActiveRecord::Base
0
   def self.paginate_by_params(params)
0
     case params[:sort]
0
     when 'recently_joined'
0
- self.paginate_all_by_activation_code(nil, :per_page => 15, :include => :pic, :order => "users.created_at DESC", :page => params[:page])
0
+ self.activated.paginate(:all, :per_page => 15, :page => params[:page])
0
     when 'monster_uploaders'
0
- self.paginate(:all, :conditions => 'users.assets_count > 0', :per_page => 15, :include => :pic, :order => "users.assets_count DESC", :page => params[:page])
0
+ self.musicians.paginate(:all,:per_page => 15, :page => params[:page])
0
     when 'dedicated_listeners'
0
       @entries = WillPaginate::Collection.create((params[:page] || 1), 15) do |pager|
0
         # returns an array, like so: [User, number_of_listens]
0
@@ -187,7 +166,7 @@ class User < ActiveRecord::Base
0
         end
0
       end
0
     else # last_seen
0
- self.paginate(:all, :include =>:pic, :conditions => ['users.created_at < ?',1.day.ago],:order => 'last_seen_at DESC', :page => params[:page], :per_page => 15)
0
+ self.recently_seen.paginate(:all, :page => params[:page], :per_page => 15)
0
     end
0
   end
0
   
...
1
 
 
 
2
3
4
...
1
2
3
4
5
6
7
0
@@ -1,4 +1,7 @@
0
 class UserReport < ActiveRecord::Base
0
+
0
+ named_scope :valid, :conditions => [:spam => false]
0
+
0
   validates_presence_of :description, :category
0
   belongs_to :user
0
   serialize :params
...
3
4
5
6
 
 
...
3
4
5
 
6
7
0
@@ -3,4 +3,5 @@
0
      <%= link_to h(asset.user.name), user_home_path(asset.user), :class => 'artist' %>
0
   <% end %>
0
 <% end %>
0
-<%= render :partial => 'assets/asset_tabs', :locals => {:asset => asset} %>
0
+
0
+<%= render :partial => 'assets/asset_tabs', :locals => {:asset => asset} unless @single %>
...
22
23
24
25
 
26
27
 
28
29
30
...
22
23
24
 
25
26
 
27
28
29
30
0
@@ -22,9 +22,9 @@
0
    <% end %>
0
    </div>
0
   
0
- <div class="panel">
0
+ <div class="panel no_border">
0
    <div class="track_links">
0
- <%= link_to "view more", user_track_path(asset.user, asset.permalink), :class => 'view_more' %>
0
+ <%= link_to "view more", user_track_path(asset.user, asset.permalink), :class => 'view_more' unless @single %>
0
             <% if authorized_for(asset) %>
0
        <%= link_to "edit", edit_user_track_path(asset.user, asset), :class => 'edit' %>
0
             <% end %>
...
1
2
3
 
4
5
6
...
1
2
 
3
4
5
6
0
@@ -1,6 +1,6 @@
0
 <% object = object.asset if object.respond_to?(:asset) -%>
0
 
0
-<div id="comment_<%= object.unique_id%>" class="comment_asset footer_content">
0
+<div id="comment_<%= object.unique_id %>" class="comment_asset">
0
   <div class="comment_form">
0
     <% form_for :comment, :url => user_track_comments_path(object.user, object) do |f| %>
0
      <%= f.text_area :body, :rows => 4, :cols => 40, :class=> 'double_trouble' %>
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 
 
 
25
26
27
28
29
30
31
32
33
 
 
34
35
36
37
38
39
40
41
 
 
42
43
...
1
2
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
5
6
7
 
 
 
 
 
 
 
 
8
9
10
 
 
 
 
 
 
 
11
12
13
14
0
@@ -1,42 +1,13 @@
0
 <% id = object.id.to_s %>
0
 <% object = object.asset if object.respond_to?(:asset) -%>
0
 
0
-<div id="share_<%=id%>" class="share_asset footer_content">
0
-
0
-
0
-<%= link_to "Home page", user_track_url(object.user, object.permalink) %> for this song:<br/>
0
-<%= text_field_tag "home_#{id}", user_track_url(object.user, object.permalink), :size => 40,:class => 'tabbed_input' %> <br/>
0
-Mp3 download link:<br/>
0
-<%= text_field_tag "link_#{id}", formatted_user_track_url(object.user, object.permalink, :mp3), :size => 40, :class => 'tabbed_input' %> <br/>
0
-
0
-<!-->
0
-<div class="download-button button">
0
- <%= link_to "<i>download</i>",formatted_user_track_url(object.user, object.permalink, :mp3) %>
0
- </div>
0
--->
0
-Put the music on your website:<br/>
0
-Get the <%= link_to 'HTML code', '#' %> or the <%= link_to 'embedded_flash_player', '#'%>
0
-
0
-<div id="html_code_<%=id%>" style="display:none;">
0
- <div class="scriptaculous">
0
- <h3>HTML code</h3>
0
- <%= text_area_tag 'code', "<a href='#{formatted_user_track_url(object.user, object, :mp3)}'>Download #{object.name}</a>", :rows => 2, :cols => 50 %>
0
- </div>
0
+<div id="share_<%=id%>" class="panel no_border">
0
+ <%= link_to "Home page", user_track_url(object.user, object.permalink) %> for this song:<br/>
0
+ <%= text_field_tag "home_#{id}", user_track_url(object.user, object.permalink), :size => 40,:class => 'tabbed_input' %> <br/>
0
 </div>
0
-
0
-<div id="flash_code_<%=id%>" style="display:none;">
0
- <div class="scriptaculous">
0
- <h3>Embedd a Flash Player</h3>
0
- <%= text_area_tag 'flash_player', "<embed src=\"#{FLASH_PLAYER}\" width=\"250\" height=\"20\" allowfullscreen=\"true\" allowscriptaccess=\"always\" flashvars=\"&file=#{formatted_user_track_url(object.user, object.permalink, :mp3)}&height=20&width=250&frontcolor=0x3C3C3C&backcolor=0xf3f3f3&lightcolor=0xFF944B&screencolor=0xFF944B&showdigits=false\" />", :rows => 3, :cols =>50 %>
0
- <p class="tip">(customize how it looks by visiting <%= link_to 'the setup wizard', 'http://www.jeroenwijering.com/?page=wizard&example=2'%>)
0
- </p>
0
- </div>
0
+<div class="panel no_border">
0
+ <%= render :partial => 'assets/add_to_facebook', :object => object %>
0
 </div>
0
-<!--
0
-<h3>Email link to a friend</h3>
0
-<%= text_field_tag 'email', 'your_friend@someplace.com', :size=> 30%>
0
-<%= submit_tag 'send email now'%>
0
-<h3>Put '<%=h object.name %>' on your facebook Profile</h3>
0
-COMING SOON
0
--->
0
+<div class="panel no_border">
0
+ <%= link_to "more sharing options", user_track_path(object.user,object.permalink), :class => 'view_more' %>
0
 </div>
0
\ No newline at end of file
...
1
 
 
 
2
3
4
5
 
6
7
8
9
 
 
 
10
...
 
1
2
3
4
 
 
 
5
6
 
 
7
8
9
10
11
0
@@ -1,8 +1,9 @@
0
-<div id="recent_listeners">
0
+<% if present?(@listeners)%>
0
+<h2 class="box">Recent Listeners</h2>
0
+<div id="recent_listeners" class="box static_content">
0
 
0
-<h2>Recent Listeners</h2>
0
-
0
-<%= render :partial => 'shared/small_user', :collection => @listeners %>
0
+ <%= render :partial => 'shared/small_user', :collection => @listeners %>
0
 
0
-<div class="clear"></div>
0
-</div>
0
\ No newline at end of file
0
+ <div class="clear"></div>
0
+</div>
0
+<% end %>
0
\ No newline at end of file
...
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
 
 
 
 
17
 
 
 
 
 
18
19
20
21
22
23
24
25
 
26
27
28
...
2
3
4
 
 
 
 
 
 
 
 
 
 
 
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
31
32
33
34
35
36
37
38
39
40
0
@@ -2,27 +2,39 @@
0
   
0
   <% content_for :left do %>
0
   <div id="single_track" class="box">
0
- <h2><%= @asset.name %></h2>
0
- <%= render :partial => 'assets/assets'%>
0
- </div>
0
-
0
- <div id="track details">
0
- <% if @asset.description && !@asset.description.empty? %>
0
- <h2 class="big">About this track</h2>
0
- <p><%= @asset.description %></p>
0
- <% end %>
0
- <% if @asset.youtube_embed && !@asset.youtube_embed.empty? %>
0
- <object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/<%=@asset.youtube_embed%>&rel=0&color1=0xd6d6d6&color2=0xf0f0f0&border=0"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/<%=@asset.youtube_embed%>&rel=0&color1=0xd6d6d6&color2=0xf0f0f0&border=0" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>
0
+ <%= render :partial => 'assets/assets'%>
0
+
0
+ <% if @asset.description && !@asset.description.empty? %>
0
+ <div id="track_details" class="static_content">
0
+ <h1>About "<%=h @asset.title %>"</h1>
0
+ <p><%= @asset.description %></p>
0
+ </div>
0
+ <% end %>
0
+
0
+ <% if @asset.youtube_embed && !@asset.youtube_embed.empty? %>
0
+ <div class='static_content'>
0
+ <object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/<%=@asset.youtube_embed%>&rel=0&color1=0xd6d6d6&color2=0xf0f0f0&border=0"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/<%=@asset.youtube_embed%>&rel=0&color1=0xd6d6d6&color2=0xf0f0f0&border=0" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>
0
+ </div>
0
     <% end %>
0
+
0
+ <div class="static_content">
0
+ Add your thoughts:<br/>
0
+ <%= render :partial => 'comment', :object => @asset %>
0
+ </div>
0
   </div>
0
+
0
+ <%= render :partial => 'big_share'%>
0
+ <%= render :partial => 'stats'%>
0
+
0
+
0
       
0
- <%= render :partial => 'stats'%>
0
   <% end %>
0
   
0
   <% content_for :right do %>
0
     <%= render :partial => 'users'%>
0
     <div class="clear"> </div>
0
     <%= render :partial => 'shared/comments' if @comments && @comments.size > 0%>
0
+
0
   <% end %>
0
   
0
   
...
6
7
8
9
 
10
11
12
...
6
7
8
 
9
10
11
12
0
@@ -6,7 +6,7 @@
0
     <% if @facebook_account %>
0
     <div style="margin-left:20px;width:200px">
0
    
0
- <% facebook_form_for(:asset, asset, :url => (add_to_profile_facebook_path(@facebook_account, :addable_type => 'asset', :addable_id => asset.id))) do |f| %>
0
+ <% facebook_form_for(:asset, asset, :url => (add_to_profile_facebook_path(:addable_type => 'asset', :addable_id => asset.id))) do |f| %>
0
         <%= f.buttons "Add track to your profile" %>
0
      <% end %>
0
     </div>
...
11
12
13
14
 
15
16
17
...
11
12
13
 
14
15
16
17
0
@@ -11,7 +11,7 @@
0
     <td style="width:40px;"><h4 style="margin-bottom:20px">Search:</h4></td>
0
     <td style="padding:20px">
0
 
0
- <% facebook_form_for(:asset, nil, :url => (add_to_profile_facebook_path(@facebook_account, :addable_type => 'asset')), :width => 50, :style => "height:40px", :label_width => 0 ) do |f| %>
0
+ <% facebook_form_for(:asset, :url => (add_to_profile_facebook_path(:addable_type => 'asset')), :width => 50, :style => "height:40px", :label_width => 0 ) do |f| %>
0
       <fb:typeahead-input name="addable_id" style="display:inline;width:200px;">
0
         <% @search_assets.each do |asset| %>
0
           <fb:typeahead-option value="<%= asset.id %>"><%= asset.name %></fb:typeahead-option>
...
6
7
8
9
10
11
 
 
 
12
13
14
...
6
7
8
 
 
 
9
10
11
12
13
14
0
@@ -6,9 +6,9 @@
0
   #links
0
     %ul.links
0
       = user_nav_item "What is alonetone?", {:controller => 'pages', :action => 'index' }
0
- = user_nav_item "Stats", {:controller => 'pages', :action => 'stats'}, 'contact'
0
- = user_nav_item "Latest News",{:controller => 'updates', :action => 'index' }, 'contact'
0
- = user_nav_item "User reports", {:controller => 'user_reports', :action => 'index'}, 'contact'
0
+ = user_nav_item "Stats", {:controller => 'pages', :action => 'stats'}, :added_class => 'contact'
0
+ = user_nav_item "Latest News",{:controller => 'updates', :action => 'index' }, :added_class => 'contact'
0
+ = user_nav_item "User reports", {:controller => 'user_reports', :action => 'index'}, :added_class => 'contact'
0
 
0
 - content_for :static do
0
   = yield
...
1
2
3
4
 
5
6
7
...
1
2
3
 
4
5
6
7
0
@@ -1,7 +1,7 @@
0
 <% form_tag sessions_path do -%>
0
 <p>
0
   <label for="login"><%= 'Login' %></label><br />
0
- <%= text_field_tag :login, params[:login], :onkeypress => 'LoginForm.checkLogin(this)' %>
0
+ <%= text_field_tag :login, params[:login] %>
0
 </p>
0
 
0
 <div id="password_fields">
...
16
17
18
19
 
20
21
22
 
23
24
25
...
16
17
18
 
19
20
21
 
22
23
24
25
0
@@ -16,10 +16,10 @@
0
   
0
   <% else %>
0
   <li id='upload'>
0
- <%= link_to ' ', signup_path, :title => "upload new mp3 on alonetone", :class => "tab#{' active' if @tab == 'upload' }" %>
0
+ <%= link_to ' ', signup_path(:new => true), :title => "upload new mp3 on alonetone", :class => "tab#{' active' if @tab == 'upload' }" %>
0
   </li>
0
   <li id='your_stuff'>
0
- <%= link_to ' ', signup_path, :title => "your stuff on alonetone", :class => "tab#{' active' if @tab == 'your_stuff' }" %>
0
+ <%= link_to ' ', signup_path(:new => true), :title => "your stuff on alonetone", :class => "tab#{' active' if @tab == 'your_stuff' }" %>
0
   </li>  
0
   
0
   <% end %>
...
1
2
3
 
4
5
6
...
1
2
 
3
4
5
6
0
@@ -1,6 +1,6 @@
0
 <p>
0
   <label for="user_login">Login </label> (Letters and numbers only)<br />
0
- <%= form.text_field :login, :onkeypress => 'LoginForm.checkLogin(this)' %>
0
+ <%= form.text_field :login %>
0
 </p>
0
 
0
 <p>
...
2
3
4
5
 
6
7
8
...
2
3
4
 
5
6
7
8
0
@@ -2,7 +2,7 @@
0
     <h2 class="box">Latest listens to your music</h2>
0
     <%= link_to 'view all', listens_path(@user.login), :class => 'view_all' if @track_plays.size > 0 %>
0
     <div class="static_content">
0
- <strong><%= @user.listens.today %></strong> new plays &amp; downloads today <br/>
0
+ <strong><%= @user.track_plays.today %></strong> new plays &amp; downloads today <br/>
0
      <%= @user.listens_count %> total plays and downloads (<strong><%= @user.listens_average %></strong> per/day)
0
     </div>
0
    <%= render :partial => 'users/track_play', :collection => @track_plays %>