* fix feed screen
This commit is contained in:
parent
5a76f42fcd
commit
59b21c557b
|
|
@ -7,11 +7,26 @@
|
|||
var logger = context.JK.logger;
|
||||
var rest = context.JK.Rest();
|
||||
|
||||
function beforeShow(data) {
|
||||
|
||||
}
|
||||
|
||||
function afterShow(data) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
function initialize() {
|
||||
var screenBindings = {
|
||||
'beforeShow': beforeShow,
|
||||
'afterShow': afterShow
|
||||
};
|
||||
app.bindScreen('feed', screenBindings);
|
||||
|
||||
}
|
||||
|
||||
this.initialize = initialize;
|
||||
|
||||
return this;
|
||||
}
|
||||
})(window,jQuery);
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
%script {type: 'text/javascript'}
|
||||
.feed-entry.music-session-history-entry{'data-music-session' => feed_item.id}
|
||||
/ avatar
|
||||
.avatar-small.ib
|
||||
= session_avatar(feed_item)
|
||||
/ type and artist
|
||||
.left.ml20.w15
|
||||
.title{hoveraction: 'session', :'session-id' => feed_item.id } SESSION
|
||||
.artist
|
||||
= session_artist_name(feed_item)
|
||||
= timeago(feed_item.created_at, class: 'small created_at')
|
||||
/ name and description
|
||||
.left.ml20.w30
|
||||
.description.dotdotdot
|
||||
= session_description(feed_item)
|
||||
/ timeline and controls
|
||||
.right.w40
|
||||
/ recording play controls
|
||||
.session-controls{ class: "#{(feed_item.is_over? ? 'ended' : 'inprogress')} #{feed_item.has_mount? ? 'has-mount' : 'no-mount'}", 'data-music-session' => feed_item.id, 'fan-access' => feed_item.fan_access.to_s}
|
||||
/ session status
|
||||
%a.left.play-button{href:'#'}
|
||||
= image_tag 'content/icon_playbutton.png', width:20, height:20, class:'play-icon'
|
||||
- if feed_item.has_mount?
|
||||
%audio{preload: 'none'}
|
||||
%source{src: feed_item.music_session.mount.url, type: feed_item.music_session.mount.resolve_string(:mime_type)}
|
||||
%span.session-status
|
||||
= session_text(feed_item)
|
||||
/ current playback time
|
||||
= session_duration(feed_item, class: 'session-duration tick-duration recording-current', 'data-created-at' => feed_item.created_at.to_i)
|
||||
/ end recording play controls
|
||||
/ genre and social
|
||||
.left.small
|
||||
= session_genre(feed_item)
|
||||
.right.small.feed-details
|
||||
%span.play-count
|
||||
%span.plays
|
||||
= feed_item.play_count
|
||||
= image_tag 'content/icon_arrow.png', :height => "12", :width => "7"
|
||||
%span.comment-count
|
||||
%span.comments
|
||||
= feed_item.comment_count
|
||||
= image_tag 'content/icon_comment.png', :height => "12", :width => "13"
|
||||
%span.like-count
|
||||
%span.likes
|
||||
= feed_item.like_count
|
||||
= image_tag 'content/icon_like.png', :height => "12", :width => "12"
|
||||
%a.details{:href => "#"} Details
|
||||
%a.details-arrow.arrow-down-orange{:href => "#"}
|
||||
%br/
|
||||
.musician-detail.hidden
|
||||
/ sub-table of musicians
|
||||
%table.musicians{:cellpadding => "0", :cellspacing => "5"}
|
||||
%tbody
|
||||
- feed_item.unique_user_histories.each do |user|
|
||||
%tr
|
||||
%td{:width => "24"}
|
||||
%a.avatar-tiny{:href => "#"}
|
||||
= render_avatarable(user)
|
||||
%td
|
||||
%a{:href => "#"}
|
||||
= "#{user.first_name} #{user.last_name}"
|
||||
%td
|
||||
.nowrap
|
||||
- if user.total_instruments
|
||||
- user.total_instruments.split('|').uniq.each do |instrument_id|
|
||||
%img.instrument-icon{'instrument-id' =>instrument_id, height:24, width:24}
|
||||
- else
|
||||
%img.instrument-icon{'instrument-id' =>'default', height:24, width:24}
|
||||
|
||||
|
||||
%br{:clear => "all"}/
|
||||
%br/
|
||||
Loading…
Reference in New Issue