-
-
Save kastner/78366 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% if composition_counter < show # you can factor this out to the controller or model %> | |
<li class="playlist_item"> | |
<p class="track_title"><%= link_to awesome_truncate(composition.title,30), composition_path(composition), :title => composition.title %></p> | |
<p class="sm2_link"><a href="<%= composition.preview_url %>"><span class="hide_me">Preview</span> </a> | |
<% if composition.network? %> | |
<%= link_to image_tag("button_playlist_download.gif", :alt => "Download"), downloads_path(:audio_item_id => composition.audio_items.first.id), :method => :post%> | |
<% else %> | |
<%= link_to(image_tag("cart.gif", :alt => "Add to cart", :title => "Add to cart"), selections_path(:salable_id => composition.id, :salable_type => composition.class.name), :method => :post) %> | |
<% end -%></p> | |
<p class="artist_name"><%= linked_profiles(composition) %></p> | |
<ul class="playlist_social_actions"> | |
<%= render :partial => "/ratings/rating_list", :locals => {:class_name => composition.class.superclass.name, :ratable => composition}%> | |
<li> | |
<%= link_to_function(image_tag("icon_load_in_player.png", :alt => "Add to Playlist",:title => "Add to Playlist"), "addCompositionToPlayerPlaylist(#{composition.id})") %> | |
</li> | |
</ul> | |
</li> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ol class="latest_uploads"> | |
<%= render :partial => "composition", :collection => @playlist.listings.compositions %> | |
</ol> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ol class="narrow_playlist"> | |
<% playlist.listings.each_with_index do |listing, i| -%> | |
<% if i < show %> | |
<% composition = listing.composition %> | |
<% position = i %> | |
<li class="playlist_item"> | |
<table class="playlist_listing"> | |
<tr> | |
<td class="listing_rank_col"> | |
<%= position+1 %> | |
</td> | |
<td class="listing_title_col"> | |
<!-- <h6><%#= link_to awesome_truncate(composition.title,30), label_release_track_path(composition.label.slug, composition.release.slug), :title => composition.title %></h6> --> | |
<h6><%= link_to awesome_truncate(composition.title,30), composition_path(composition), :title => composition.title %></h6> | |
</td> | |
<td class="listing_icon_col" rowspan="3"> | |
<!--<ul class="playlist_site_actions"> | |
<li class="preview">--> | |
<a class="sm2_link" href="<%= composition.preview_url %>"> | |
<span class="hide_me">Preview</span> | |
</a> | |
<%#= link_to_function(image_tag("icon_speaker_preview.png", :alt => "Preview", :title => "Preview"), "") %> | |
<!--</li>--> | |
<%# if !composition.member_contributed %> | |
<!--<li class="add_to_cart">--> | |
<% if composition.network? %> | |
<%= link_to image_tag("button_playlist_download.gif", :alt => "Download"), downloads_path(:audio_item_id => composition.audio_items.first.id), :method => :post%> | |
<% else %> | |
<%= link_to(image_tag("cart.gif", :alt => "Add to cart", :title => "Add to cart"), selections_path(:salable_id => composition.id, :salable_type => composition.class.name), :method => :post) %> | |
<% end -%> | |
<!--</li>--> | |
<%# end -%> | |
<!--</ul>--> | |
</td> | |
</tr> | |
<tr> | |
<td></td> | |
<td><h6 class="artist"><%= linked_profiles(composition) %></h6></td> | |
</tr> | |
<tr> | |
<td></td> | |
<td> | |
<ul class="playlist_social_actions"> | |
<%= render :partial => "/ratings/rating_list", :locals => {:class_name => composition.class.superclass.name, :ratable => composition}%> | |
<li> | |
<%= link_to_function(image_tag("icon_load_in_player.png", :alt => "Add to Playlist",:title => "Add to Playlist"), "addCompositionToPlayerPlaylist(#{composition.id})") %> | |
</li> | |
</ul> | |
</td> | |
</tr> | |
</table> | |
</li> | |
<% end %> | |
<% end -%> | |
</ol> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment