* beginning feed work, and loosening the query for when a session starts for event feature
This commit is contained in:
parent
bfd017b19f
commit
5a76f42fcd
|
|
@ -0,0 +1,17 @@
|
|||
(function(context,$) {
|
||||
|
||||
"use strict";
|
||||
context.JK = context.JK || {};
|
||||
context.JK.FeedScreen = function(app) {
|
||||
|
||||
var logger = context.JK.logger;
|
||||
var rest = context.JK.Rest();
|
||||
|
||||
function initialize() {
|
||||
|
||||
}
|
||||
|
||||
this.initialize = initialize;
|
||||
|
||||
}
|
||||
})(window,jQuery);
|
||||
|
|
@ -44,7 +44,7 @@ module EventSessionHelper
|
|||
# if so, then we are playing.
|
||||
# if there has been none, we say it's still coming,
|
||||
# if there has been at least one, and it's over, we say session over
|
||||
query = MusicSessionHistory.where(fan_access: true).where(created_at: event_session.starts_at..event_session.ends_at)
|
||||
query = MusicSessionHistory.where(fan_access: true).where(created_at: (event_session.starts_at - 12.hours)..(event_session.ends_at + 12.hours))
|
||||
if event_session.user_id
|
||||
query = query.where(user_id: event_session.user_id)
|
||||
elsif event_session.band_id
|
||||
|
|
|
|||
|
|
@ -1,49 +0,0 @@
|
|||
<!-- Feed Screen -->
|
||||
<%= content_tag(:div, :layout => 'screen', 'layout-id' => 'feed', :class => "screen secondary") do -%>
|
||||
<%= content_tag(:div, :class => :content) do -%>
|
||||
<%= content_tag(:div, :class => 'content-head') do -%>
|
||||
<%= content_tag(:div, image_tag("content/icon_feed.png", {:height => 19, :width => 19}), :class => 'content-icon') %>
|
||||
<%= content_tag(:h1, 'feed') %>
|
||||
<%= render "screen_navigation" %>
|
||||
<% end -%>
|
||||
<%= content_tag(:div, :class => 'content-body') do -%>
|
||||
<%= form_tag('', {:id => 'find-session-form', :class => 'inner-content'}) do -%>
|
||||
<%= render(:partial => "web_filter", :locals => {:search_type => Search::PARAM_FEED}) %>
|
||||
<%= content_tag(:div, :class => 'filter-body') do %>
|
||||
<%= content_tag(:div, :class => 'content-body-scroller') do -%>
|
||||
<p>This feature not yet implemented</p>
|
||||
<%= content_tag(:div, content_tag(:div, '', :id => 'session-filter-results', :class => 'filter-results'), :class => 'content-wrapper') %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
||||
<!-- Session Row Template -->
|
||||
<script type="text/template" id="template-find-session-row">
|
||||
<div class="profile-band-list-result band-list-result">
|
||||
<div class="left">
|
||||
<!-- avatar -->
|
||||
<div class="avatar-small"><img src="{avatar_url}" /></div>
|
||||
|
||||
<!-- name & location -->
|
||||
<div style="width:220px;" class="result-name">{band_name}<br />
|
||||
<span class="result-location">{band_location}</span>
|
||||
<br /><br />
|
||||
<div id="result_sessions" class="nowrap">{genres}</div>
|
||||
<br /><br />
|
||||
{follow_count} <img src="../assets/content/icon_followers.png" width="22" height="12" align="absmiddle" /> {recording_count} <img src="../assets/content/icon_recordings.png" width="12" height="13" align="absmiddle" /> {session_count} <img src="../assets/content/icon_session_tiny.png" width="12" height="12" align="absmiddle" /><br /><br />
|
||||
</div>
|
||||
</div>
|
||||
<div class="left ml20 f11 whitespace w35"><br />
|
||||
{biography}<br />
|
||||
<br />
|
||||
<div data-band-id={band_id}>{band_action_template}</div>
|
||||
</div>
|
||||
<div class="left ml10 w25 band-players">
|
||||
<table class="musicians" cellpadding="0" cellspacing="5">{band_player_template}</table>
|
||||
</div>
|
||||
<br clear="all" />
|
||||
</div>
|
||||
</script>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
%div{ layout: 'screen', :'layout-id' => 'feed', :class => 'screen secondary'}
|
||||
.content
|
||||
.content-head
|
||||
.content-icon= image_tag("content/icon_feed.png", {:height => 19, :width => 19})
|
||||
%h1 feed
|
||||
= render "screen_navigation"
|
||||
.content-body
|
||||
= form_tag('', {:id => 'find-session-form', :class => 'inner-content'}) do
|
||||
= render(:partial => "web_filter", :locals => {:search_type => Search::PARAM_FEED})
|
||||
.filter-body
|
||||
.content-body-scroller
|
||||
%p This feature not yet implemented
|
||||
.content-wrapper
|
||||
|
|
@ -184,6 +184,9 @@
|
|||
var bandSetupPhotoScreen = new JK.BandSetupPhotoScreen(JK.app);
|
||||
bandSetupPhotoScreen.initialize();
|
||||
|
||||
var feedScreen = new JK.FeedScreen(JK.app);
|
||||
feedScreen.initialize();
|
||||
|
||||
var findSessionScreen = new JK.FindSessionScreen(JK.app);
|
||||
var sessionLatency = null;
|
||||
if ("jamClient" in window) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue