diff --git a/app/controllers/artist_controller.rb b/app/controllers/artist_controller.rb index 72138b6..06289e8 100644 --- a/app/controllers/artist_controller.rb +++ b/app/controllers/artist_controller.rb @@ -5,10 +5,12 @@ class ArtistController < ApplicationController if params[:name].nil? name = '' else - name = params[:name].gsub('+', ' ').gsub('%20', ' ') + if request.request_method == 'POST' + redirect_to :action => 'view', :name => params[:name].gsub(' ', '+') + end + name = params[:name].gsub('+', ' ') end @artist = Artist.getByName(name) - pp @artist end def autocomplete diff --git a/app/controllers/track_controller.rb b/app/controllers/track_controller.rb index 4e284a5..022d486 100644 --- a/app/controllers/track_controller.rb +++ b/app/controllers/track_controller.rb @@ -7,11 +7,7 @@ class TrackController < ApplicationController pp album = Album.where(:id => release.album_id).first pp artist = Artist.where(:id => album.artist_id).first - data = Vkontakte.get(artist.name, track.name, (track.length / 1000).round) - #data = open('/Users/chez/Sites/beathaven/tmp/media.mp3').read - #send_data data, :type=>"audio/mp3" + url = Vkontakte.get(artist.name, track.name, (track.length / 1000).round) - #render :text => data - redirect_to data end end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 42945f8..939b498 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,10 +1,12 @@ - BeatHaven - <%= stylesheet_link_tag :all %> - <%= javascript_include_tag :all %> - <%= csrf_meta_tag %> + BeatHaven + + + <%= stylesheet_link_tag :all %> + <%= javascript_include_tag :all %> + <%= csrf_meta_tag %>
diff --git a/app/views/main/index.html.erb b/app/views/main/index.html.erb index 2acb3cf..8634c2f 100644 --- a/app/views/main/index.html.erb +++ b/app/views/main/index.html.erb @@ -13,7 +13,6 @@ diff --git a/php-bak/favicon.ico b/php-bak/favicon.ico deleted file mode 100644 index 273bb04..0000000 Binary files a/php-bak/favicon.ico and /dev/null differ diff --git a/public/favicon.ico b/public/favicon.ico index e69de29..089a584 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/stylesheets/beathaven.css b/public/stylesheets/beathaven.css index be5e4cc..8f69b94 100644 --- a/public/stylesheets/beathaven.css +++ b/public/stylesheets/beathaven.css @@ -99,9 +99,9 @@ body { .search #name { width: 300px; - border: 1px solid ##bdbdbd; - background: #555555; - color: #ffffff; - font-size: 1.1em; + border: #AAA 3px solid; + border-radius: 7px; + font-size: 1.5em; + padding: 0.2em; } diff --git a/public/stylesheets/search-autocomplete.css b/public/stylesheets/search-autocomplete.css index ec11895..7ff5ef0 100644 --- a/public/stylesheets/search-autocomplete.css +++ b/public/stylesheets/search-autocomplete.css @@ -1,7 +1,35 @@ - -.autocomplete-w1 { background:url(../images/shadow.png) no-repeat bottom right; position:absolute; top:0px; left:0px; margin:8px 0 0 6px; /* IE6 fix: */ _background:none; _margin:0; } -.autocomplete { border:1px solid #999; background:#FFF; cursor:default; text-align:left; max-height:350px; overflow:auto; margin:-6px 6px 6px -6px; /* IE6 specific: */ _height:350px; _margin:0; _overflow-x:hidden; } -.autocomplete .selected { background:#F0F0F0; } -.autocomplete div { padding:2px 5px; white-space:nowrap; } -.autocomplete strong { font-weight:normal; color:#3399FF; } +.autocomplete-w1 { + background: url(../images/shadow.png) no-repeat bottom right; + position: absolute; + top: 0px; + left: 0px; + margin: 8px 0 0 6px; + /* IE6 fix: */ + _background: none; + _margin: 0; +} +.autocomplete { + border:1px solid #999; + background:#FFF; + cursor:default; + text-align:left; + max-height:350px; + overflow:auto; + margin:-6px 6px 6px -6px; + /* IE6 specific: */ + _height: 350px; + _margin: 0; + _overflow-x: hidden; +} +.autocomplete .selected { + background: #F0F0F0; +} +.autocomplete div { + padding: 2px 5px; + white-space: nowrap; +} +.autocomplete strong { + font-weight: normal; + color: #3399FF; +}