scores integrated into display where i could, not exactly where david wanted. this finishes vrfs-1455
This commit is contained in:
parent
73594ea3fa
commit
c0d08ebe27
|
|
@ -179,7 +179,7 @@ module JamRuby
|
|||
unless locidispid.nil?
|
||||
# score_join of left allows for null scores, whereas score_join of inner requires a score however good or bad
|
||||
# this is ANY_SCORE:
|
||||
score_join = 'left' # or 'inner'
|
||||
score_join = 'left outer' # or 'inner'
|
||||
score_min = nil
|
||||
score_max = nil
|
||||
case score_limit
|
||||
|
|
@ -214,7 +214,7 @@ module JamRuby
|
|||
end
|
||||
|
||||
rel = rel.joins("#{score_join} join scores on scores.alocidispid = users.last_jam_locidispid")
|
||||
.where(['scores.blocidispid = ?', locidispid])
|
||||
.where(['(scores.blocidispid = ? or scores.blocidispid is null)', locidispid])
|
||||
|
||||
rel = rel.where(['scores.score > ?', score_min]) unless score_min.nil?
|
||||
rel = rel.where(['scores.score <= ?', score_max]) unless score_max.nil?
|
||||
|
|
|
|||
|
|
@ -292,7 +292,8 @@ module JamRuby
|
|||
|
||||
def joined_score
|
||||
nil unless has_attribute?(:score)
|
||||
read_attribute(:score).to_i
|
||||
a = read_attribute(:score)
|
||||
a.nil? ? nil : a.to_i
|
||||
end
|
||||
|
||||
# mods comes back as text; so give ourselves a parsed version
|
||||
|
|
|
|||
|
|
@ -162,11 +162,11 @@
|
|||
}
|
||||
}
|
||||
.lcol {
|
||||
width: 148px;
|
||||
width: 200px;
|
||||
}
|
||||
.whitespace {
|
||||
// equal to lcol width.
|
||||
padding-left: 148px;
|
||||
padding-left: 200px;
|
||||
}
|
||||
.instruments {
|
||||
width:128px;
|
||||
|
|
|
|||
|
|
@ -231,11 +231,11 @@
|
|||
}
|
||||
}
|
||||
.lcol {
|
||||
width: 148px;
|
||||
width: 200px;
|
||||
}
|
||||
.whitespace {
|
||||
// equal to lcol width.
|
||||
padding-left: 148px;
|
||||
padding-left: 200px;
|
||||
}
|
||||
.instruments {
|
||||
width:128px;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ class ApiSearchController < ApiController
|
|||
conn = (clientid ? Connection.where(client_id: clientid, user_id: current_user.id).first : nil)
|
||||
# puts "================== query #{query.inspect}"
|
||||
@search = Search.musician_filter(query, current_user, conn)
|
||||
# puts "================== search #{@search.inspect}"
|
||||
else
|
||||
@search = Search.band_filter(query, current_user)
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue