merge develop
This commit is contained in:
commit
73875a4950
|
|
@ -98,7 +98,7 @@
|
|||
if (mm['instruments'][jj].instrument_id in instrument_logo_map) {
|
||||
instr = instrument_logo_map[mm['instruments'][jj].instrument_id];
|
||||
}
|
||||
instr_logos += '<img src="' + instr + '" width="24" height="24" /> ';
|
||||
instr_logos += '<img src="' + instr + '"/>';
|
||||
}
|
||||
follows = '';
|
||||
followVals = {};
|
||||
|
|
|
|||
|
|
@ -34,8 +34,30 @@
|
|||
padding-top: 5px;
|
||||
padding-right: 5px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.musician-following {
|
||||
overflow: auto;
|
||||
|
||||
#result_instruments {
|
||||
font-weight: normal;
|
||||
> img {
|
||||
margin-right: 4px;
|
||||
height:24px;
|
||||
width:24px;
|
||||
}
|
||||
}
|
||||
.result-name {
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.stats {
|
||||
margin-top: 4px;
|
||||
img {
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
.lcol {
|
||||
width: 148px;
|
||||
}
|
||||
table.musicians {
|
||||
margin-top:12px;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -173,6 +173,9 @@ small, .small {
|
|||
font-size:11px;
|
||||
}
|
||||
|
||||
.bold {
|
||||
font-weight:bold;
|
||||
}
|
||||
.button-grey {
|
||||
margin:0px 8px 0px 8px;
|
||||
background-color:#666;
|
||||
|
|
@ -235,10 +238,12 @@ a img {
|
|||
border:none;
|
||||
}
|
||||
|
||||
.clearall {clear:both;}
|
||||
.left {float:left;}
|
||||
.right {float:right;}
|
||||
.center {text-align:center !important;}
|
||||
.clearall {
|
||||
clear:both;
|
||||
}
|
||||
.clearleft {
|
||||
clear:left;
|
||||
}
|
||||
|
||||
.f8 {font-size:8px !important}
|
||||
.f9 {font-size:9px !important}
|
||||
|
|
|
|||
|
|
@ -37,34 +37,26 @@ class ApiInvitationsController < ApiController
|
|||
sender = current_user
|
||||
join_request = JoinRequest.find(params[:join_request]) unless params[:join_request].nil?
|
||||
|
||||
@invitation = Invitation.limit(1)
|
||||
.where(:receiver_id => params[:receiver],
|
||||
:sender_id => current_user.id,
|
||||
:music_session_id => params[:music_session])
|
||||
.first
|
||||
if @invitation
|
||||
@invitation = Invitation.new
|
||||
@invitation.music_session = music_session
|
||||
@invitation.sender = sender
|
||||
@invitation.receiver = receiver
|
||||
@invitation.join_request = join_request
|
||||
@invitation.save
|
||||
|
||||
unless @invitation.errors.any?
|
||||
User.save_session_settings(current_user, music_session)
|
||||
|
||||
# send notification
|
||||
Notification.send_session_invitation(receiver, current_user, music_session.id)
|
||||
respond_with @invitation, :responder => ApiResponder, :location => api_invitation_detail_url(@invitation)
|
||||
|
||||
else
|
||||
@invitation = Invitation.new
|
||||
@invitation.music_session = music_session
|
||||
@invitation.sender = sender
|
||||
@invitation.receiver = receiver
|
||||
@invitation.join_request = join_request
|
||||
@invitation.save
|
||||
|
||||
unless @invitation.errors.any?
|
||||
User.save_session_settings(current_user, music_session)
|
||||
|
||||
# send notification
|
||||
Notification.send_session_invitation(receiver, current_user, music_session.id)
|
||||
respond_with @invitation, :responder => ApiResponder, :location => api_invitation_detail_url(@invitation)
|
||||
|
||||
else
|
||||
# we have to do this because api_invitation_detail_url will fail with a bad @invitation
|
||||
response.status = :unprocessable_entity
|
||||
respond_with @invitation
|
||||
end
|
||||
# we have to do this because api_invitation_detail_url will fail with a bad @invitation
|
||||
response.status = :unprocessable_entity
|
||||
respond_with @invitation
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def show
|
||||
|
|
|
|||
|
|
@ -20,45 +20,44 @@
|
|||
<% end -%>
|
||||
|
||||
<!-- Session Row Template -->
|
||||
<script type="text/template" id="template-find-musician-row">
|
||||
<script type="text/template" id="template-find-musician-row"><!-- -->
|
||||
<div class="profile-band-list-result musician-list-result">
|
||||
<div class="left" data-hint="container">
|
||||
<div class="left">
|
||||
<div class="f11" data-hint="container">
|
||||
<div class="left" style="width:63px;margin-top:-12px;">
|
||||
<!-- avatar -->
|
||||
<div class="avatar-small"><img src="{avatar_url}" /></div>
|
||||
</div>
|
||||
<div class="left">
|
||||
<div data-hint="top-row">
|
||||
<div class="left">
|
||||
<div class="right musician-following" style="width: 120px;">
|
||||
<div class="bold">FOLLOWING:</div>
|
||||
<table class="musicians" cellpadding="0" cellspacing="5">{musician_follow_template}</table>
|
||||
</div>
|
||||
<div class="" style="margin-left: 63px; margin-right: 130px;margin-top: 12px;"">
|
||||
<div class="first-row" data-hint="top-row">
|
||||
<div class="lcol left">
|
||||
<!-- name & location -->
|
||||
<div style="" class="result-name">{musician_name}</div>
|
||||
<div class="result-location">{musician_location}</div>
|
||||
<div id="result_instruments" class="nowrap">{instruments}</div>
|
||||
<div class="result-name">{musician_name}</div>
|
||||
<div class="result-location">{musician_location}</div>
|
||||
<div id="result_instruments" class="nowrap mt10">{instruments}</div>
|
||||
</div>
|
||||
<div class="left ml35 f11 whitespace w40">
|
||||
<div class="whitespace">
|
||||
<div class="biography">{biography}</div>
|
||||
</div>
|
||||
<div class="clearleft"></div>
|
||||
</div>
|
||||
<div data-hint="button-row">
|
||||
<div class="stats">
|
||||
{friend_count} <img src="../assets/content/icon_friend.png" width="14" height="12" align="absmiddle" />
|
||||
{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" />
|
||||
<div class="button-row" data-hint="button-row">
|
||||
<div class="lcol stats left">
|
||||
{friend_count} <img src="../assets/content/icon_friend.png" width="14" height="12" align="absmiddle" style="margin-right:4px;"/>
|
||||
{follow_count} <img src="../assets/content/icon_followers.png" width="22" height="12" align="absmiddle" style="margin-right:4px;"/>
|
||||
{recording_count} <img src="../assets/content/icon_recordings.png" width="12" height="13" align="absmiddle" style="margin-right:4px;"/>
|
||||
{session_count} <img src="../assets/content/icon_session_tiny.png" width="12" height="12" align="absmiddle" />
|
||||
</div>
|
||||
|
||||
<div class="result-list-button-wrapper" data-musician-id={musician_id}>
|
||||
{musician_action_template}
|
||||
</div>
|
||||
<div class="clearall"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="left ml10 w20 musician-following">
|
||||
<br />
|
||||
<small><strong>FOLLOWING:</strong></small>
|
||||
<table class="musicians" cellpadding="0" cellspacing="5">{musician_follow_template}</table>
|
||||
</div>
|
||||
<br clear="all" />
|
||||
</div>
|
||||
</script>
|
||||
|
||||
|
|
@ -74,7 +73,7 @@
|
|||
|
||||
<script type="text/template" id="template-musician-follow-info">
|
||||
<tr>
|
||||
<td width="24">
|
||||
<td width="32">
|
||||
<a href="{profile_url}" class="avatar-tiny"><img src="{avatar_url}" /></a>
|
||||
</td>
|
||||
<td>
|
||||
|
|
|
|||
Loading…
Reference in New Issue