From: Tom Hughes Date: Mon, 30 Dec 2019 21:37:32 +0000 (+0000) Subject: Merge remote-tracking branch 'upstream/pull/2470' X-Git-Tag: live~3410 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/1597a2f8798861ffc2f47fe2d3f3958a532bd127?hp=5ff4e4e331e8e8e117bbbfeefe045c66d1349d29 Merge remote-tracking branch 'upstream/pull/2470' --- diff --git a/app/assets/stylesheets/_bootstrap-custom.scss b/app/assets/stylesheets/_bootstrap-custom.scss index 0cbec1a27..6bbaecbe4 100644 --- a/app/assets/stylesheets/_bootstrap-custom.scss +++ b/app/assets/stylesheets/_bootstrap-custom.scss @@ -27,7 +27,7 @@ @import "bootstrap/card"; // @import "bootstrap/breadcrumb"; // @import "bootstrap/pagination"; -// @import "bootstrap/badge"; +@import "bootstrap/badge"; // @import "bootstrap/jumbotron"; // @import "bootstrap/alert"; // @import "bootstrap/progress"; diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 454c21cc8..1e9b3b531 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -1483,7 +1483,6 @@ tr.turn:hover { /* Rules for the trace list shown by the traces tab etc */ #trace_list { - font-size: $lineheight/2; border-width: 0px; text-align: right; @@ -1491,38 +1490,6 @@ tr.turn:hover { font-size: 12px; color: gray; } - - .trace_pending { - color: red; - } - - .trace_public { - color: green; - } - - .trace_identifiable { - color: green; - } - - .trace_trackable { - color: red; - } - - .trace_private { - color: red; - } -} - -/* Rules for the trace view */ - -.trace-show { - .trace_pending { - color: red; - } - - .geo { - display: inline; - } } /* Rules for the new trace form */ @@ -1638,7 +1605,6 @@ tr.turn:hover { /* Rules for the user list */ #user_list { - font-size: $lineheight/2; width: 100%; tr { diff --git a/app/views/traces/_trace.html.erb b/app/views/traces/_trace.html.erb index 1fde78790..8b754a591 100644 --- a/app/views/traces/_trace.html.erb +++ b/app/views/traces/_trace.html.erb @@ -5,7 +5,7 @@ <% if trace.inserted %> "show", :id => trace.id, :display_name => trace.user.display_name %>"> "icon", :id => trace.id, :display_name => trace.user.display_name %>" border="0" alt="" /> <% else %> - <%= t ".pending" %> + <%= t ".pending" %> <% end %> <% end %> @@ -17,7 +17,13 @@ ... <%= time_ago_in_words(trace.timestamp, :scope => :'datetime.distance_in_words_ago') %> <%= link_to_if trace.inserted?, t(".map"), { :controller => "site", :action => "index", :mlat => trace.latitude, :mlon => trace.longitude, :anchor => "map=14/#{trace.latitude}/#{trace.longitude}" }, { :title => t(".view_map") } %> / <%= link_to t(".edit"), { :controller => "site", :action => "edit", :gpx => trace.id }, { :title => t(".edit_map") } %> - <%= t("." + trace.visibility) %> + + <% badge_class = case trace.visibility + when "public", "identifiable" then "success" + else "danger" + end %> + <%= t("." + trace.visibility) %> +
<%= trace.description %>
diff --git a/app/views/traces/show.html.erb b/app/views/traces/show.html.erb index a9978fdc4..728b29c45 100644 --- a/app/views/traces/show.html.erb +++ b/app/views/traces/show.html.erb @@ -6,7 +6,7 @@ <% if @trace.inserted %> "picture", :id => @trace.id, :display_name => @trace.user.display_name %>"> <% else %> - <%= t ".pending" %> + <%= t ".pending" %> <% end %> <% end %> @@ -25,7 +25,7 @@ <%= @trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/, '\1,') %> <%= t ".start_coordinates" %> -
<%= @trace.latitude %>; <%= @trace.longitude %>
(<%= link_to t(".map"), :controller => "site", :action => "index", :mlat => @trace.latitude, :mlon => @trace.longitude, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %> / <%= link_to t(".edit"), :controller => "site", :action => "edit", :gpx => @trace.id, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %>) +
<%= @trace.latitude %>; <%= @trace.longitude %>
(<%= link_to t(".map"), :controller => "site", :action => "index", :mlat => @trace.latitude, :mlon => @trace.longitude, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %> / <%= link_to t(".edit"), :controller => "site", :action => "edit", :gpx => @trace.id, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %>) <% end %>