diff --git a/app/assets/javascripts/src/Metamaps.js b/app/assets/javascripts/src/Metamaps.js index d3ba78ea..98a42c4d 100644 --- a/app/assets/javascripts/src/Metamaps.js +++ b/app/assets/javascripts/src/Metamaps.js @@ -4726,7 +4726,7 @@ Metamaps.Map.InfoBox = { } $('.mapContributors img').attr('src', contributors_image).removeClass('multiple mTwo').addClass(contributors_class); $('.mapContributors span').text(Metamaps.Mappers.length) - $('.mapContributors .tip').text(self.createContributorList()); + $('.mapContributors .tip').html(self.createContributorList()); $('.mapTopics').text(Metamaps.Topics.length); $('.mapSynapses').text(Metamaps.Synapses.length); diff --git a/app/assets/stylesheets/clean.css b/app/assets/stylesheets/clean.css index e117d200..28d3aac0 100644 --- a/app/assets/stylesheets/clean.css +++ b/app/assets/stylesheets/clean.css @@ -488,7 +488,8 @@ } .sidebarSearch .topicOriginatorIcon .tip { - margin-right: -120px; + left: 30px; + right: auto; top: 1px; } .sidebarSearch .tip { @@ -511,7 +512,8 @@ } .sidebarSearch .mapContributorsIcon .tip { - margin-right: -120px; + left: 40px; + right: auto; top: -5px; padding-top: 5px; padding-bottom: 5px; @@ -539,6 +541,15 @@ border-bottom: 5px solid transparent; } +.sidebarSearch .hoverForTip.addToMap .tip { + right: 30px; +} +.sidebarSearch .hoverForTip.addToMap .tip:before { + right: -4px; + border-left: 4px solid #424242; + border-right: none; +} + .sidebarSearch .mapContributorsIcon .tip:before { top: 65px; left: -4px; diff --git a/app/helpers/maps_helper.rb b/app/helpers/maps_helper.rb index ba452e64..de514252 100644 --- a/app/helpers/maps_helper.rb +++ b/app/helpers/maps_helper.rb @@ -13,24 +13,12 @@ module MapsHelper map['topicCount'] = m.topics.count map['synapseCount'] = m.synapses.count map['contributorCount'] = m.contributors.count - map[''] = m.contributors[0].image.url(:square) map['rtype'] = "map" - contributorList = m.user.name + ' created this map. ' - if m.contributors.count > 0 - m.contributors.each_with_index do |c, index| - comma = (index+1) == m.contributors.count ? '' : ', ' - contributorList += c.name + comma - end - contributorList += ' has edited it.' if m.contributors.count == 1 - contributorList += ' have edited it.' if m.contributors.count > 1 - else - contributorList += 'No one has added anything yet.' - end - map['contributorList'] = contributorList - contributorTip = '' + firstContributorImage = '/assets/user.png' if m.contributors.count > 0 + firstContributorImage = m.contributors[0].image.url(:square) m.contributors.each_with_index do |c, index| userImage = c.image.url(:square) name = c.name @@ -38,6 +26,8 @@ module MapsHelper end end map['contributorTip'] = contributorTip + map['mapContributorImage'] = firstContributorImage + temp.push map end return temp diff --git a/app/views/maps/_mapinfobox.html.erb b/app/views/maps/_mapinfobox.html.erb index 1aeda2b2..dfb6658e 100644 --- a/app/views/maps/_mapinfobox.html.erb +++ b/app/views/maps/_mapinfobox.html.erb @@ -18,7 +18,6 @@ <% elsif @map.contributors.count == 2 %> -
<% elsif @map.contributors.count > 2 %> <% end %>