Opensearch fix, set playlist button

This commit is contained in:
magnolia-fan 2011-11-26 19:38:50 +04:00
parent f0e7e8f7a1
commit dab192d1ff
4 changed files with 29 additions and 19 deletions

View File

@ -18,6 +18,15 @@
} }
} }
.playlist-name {
display: block;
margin: 1px 0;
}
.set-playlist {
float: right;
cursor: pointer;
}
.album { .album {
margin-bottom: 20px; margin-bottom: 20px;
.art { .art {

View File

@ -1,6 +1,6 @@
- if @artist.status == 0 - if @artist.status == 0
.alert-message.warning .alert-message.warning
%p= I18n.t 'search.loading' %p= t('search.loading')
.row.artist-info .row.artist-info
.span4.columns.pic .span4.columns.pic
= image_tag @artist.pic_url unless @artist.pic_url.nil? = image_tag @artist.pic_url unless @artist.pic_url.nil?
@ -26,14 +26,15 @@
%tr %tr
- @artist.playlists.each do |playlist| - @artist.playlists.each do |playlist|
%td %td
%a.set-playlist{ href: "", 'data-playlist-id' => playlist.id }= playlist.name %span.label.success.set-playlist{ href: "", 'data-playlist-id' => playlist.id }= t('player.set_playlist')
%a.playlist-name{ href: "", 'data-playlist-id' => playlist.id }= playlist.name
- @artist.albums.each do |album| - @artist.albums.each do |album|
.row.album .row.album
.span4.columns.art .span4.columns.art
%img{ src: album.pic_url } %img{ src: album.pic_url }
.button-container .button-container
%a.btn.add-album{ 'data-album-id' => album.id }= I18n.t 'player.add' %a.btn.add-album{ 'data-album-id' => album.id }= t('player.add')
.span7.columns.tracks .span7.columns.tracks
%h3{ 'data-album-id' => album.id } %h3{ 'data-album-id' => album.id }
= album.name = album.name
@ -44,4 +45,4 @@
%td.song-title= track.name %td.song-title= track.name
%td.song-duration %td.song-duration
.s-duration= (track.duration != '0:00' ? track.duration : ' '.html_safe) .s-duration= (track.duration != '0:00' ? track.duration : ' '.html_safe)
%span.label.success.s-add{ 'data-album-id' => album.id, 'data-id' => track.id }= I18n.t 'player.add_one' %span.label.success.s-add{ 'data-album-id' => album.id, 'data-id' => track.id }= t('player.add_one')

View File

@ -20,26 +20,26 @@
%a#logo{ :href => "#/" } BeatHaven %a#logo{ :href => "#/" } BeatHaven
%ul.nav %ul.nav
%li %li
%a{ :href => "http://blog.beathaven.org/", :target => "_blank" }= I18n.t 'global.news' %a{ :href => "http://blog.beathaven.org/", :target => "_blank" }= t('global.news')
%li %li
%a.about{ :href => "#/about/" }= I18n.t 'global.about' %a.about{ :href => "#/about/" }= t('global.about')
%li %li
%a.stat{ :href => "#/stat/" }= I18n.t 'global.stat' %a.stat{ :href => "#/stat/" }= t('global.stat')
%form#search-form{ :action => "" } %form#search-form{ :action => "" }
%input#search{ :type => "text", :placeholder => I18n.t('global.search') } %input#search{ :type => "text", :placeholder => t('global.search') }
#artist-load-spinner #artist-load-spinner
= image_tag "artist_loader.gif" = image_tag "artist_loader.gif"
%ul.nav.secondary-nav %ul.nav.secondary-nav
%li %li
%a#login{ :href => "#/login/" }= I18n.t 'global.login' %a#login{ :href => "#/login/" }= t('global.login')
%li.dropdown#authorized %li.dropdown#authorized
%a.dropdown-toggle#username{ :href => "#/" } %username% %a.dropdown-toggle#username{ :href => "#/" } %username%
%ul.dropdown-menu %ul.dropdown-menu
%li %li
%a#preferences{ :href => "#/settings/" }= I18n.t 'global.settings' %a#preferences{ :href => "#/settings/" }= t('global.settings')
%li.divider %li.divider
%li %li
%a#logout{ :href => "#/logout/" }= I18n.t 'global.logout' %a#logout{ :href => "#/logout/" }= t('global.logout')
.popover-wrapper .popover-wrapper
.popover.below#autocomplete-container .popover.below#autocomplete-container
@ -54,25 +54,25 @@
   
.span5.columns .span5.columns
.ad_here= (I18n.t 'global.your_ad_here').html_safe .ad_here= t('global.your_ad_here').html_safe
.player .player
%h5.now-playing= I18n.t 'global.do_add' %h5.now-playing= t('global.do_add')
.progress .progress
.loaded .loaded
.played .played
.buttons .buttons
.secondary-buttons .secondary-buttons
%a.shuffle{ :title => I18n.t('player.shuffle') }= image_tag "icns/shuffle.png" %a.shuffle{ :title => t('player.shuffle') }= image_tag "icns/shuffle.png"
%a.repeat{ :title => I18n.t('player.repeat') }= image_tag "icns/repeat.png" %a.repeat{ :title => t('player.repeat') }= image_tag "icns/repeat.png"
%a.do_empty{ :title => I18n.t('player.do_empty') }= image_tag "icns/empty.png" %a.do_empty{ :title => t('player.do_empty') }= image_tag "icns/empty.png"
.primary-buttons .primary-buttons
%a.btn.small-round.prev « %a.btn.small-round.prev «
%a.btn.large.play ► %a.btn.large.play ►
%a.btn.large.pause II %a.btn.large.pause II
%a.btn.small-round.next » %a.btn.small-round.next »
.quality-buttons .quality-buttons
%a.q-good{ :title => I18n.t('player.thumbs_up') }= image_tag "icns/thumbs-up.png" %a.q-good{ :title => t('player.thumbs_up') }= image_tag "icns/thumbs-up.png"
%a.q-bad{ :title => I18n.t('player.thumbs_down') }= image_tag "icns/thumbs-down.png" %a.q-bad{ :title => t('player.thumbs_down') }= image_tag "icns/thumbs-down.png"

View File

@ -3,5 +3,5 @@
<ShortName>BeatHaven</ShortName> <ShortName>BeatHaven</ShortName>
<Description>BeatHaven</Description> <Description>BeatHaven</Description>
<Image height="16" width="16" type="image/x-icon">http://beathaven.org/favicon.ico</Image> <Image height="16" width="16" type="image/x-icon">http://beathaven.org/favicon.ico</Image>
<Url type="text/html" method="get" template="http://beathaven.org/artist/{searchTerms}/"/> <Url type="text/html" method="get" template="http://beathaven.org/artist/#/{searchTerms}/"/>
</OpenSearchDescription> </OpenSearchDescription>