]> git.openstreetmap.org Git - rails.git/commitdiff
Truncate usernames in trace navigation tabs
authorAnton Khorev <tony29@yandex.ru>
Wed, 4 Dec 2024 10:09:46 +0000 (13:09 +0300)
committerAnton Khorev <tony29@yandex.ru>
Wed, 4 Dec 2024 10:09:46 +0000 (13:09 +0300)
app/views/traces/index.html.erb
config/locales/en.yml

index 998dd248d45a14b8d108fc9a3ffe1fddf13da563..4311ba082e39de12dd945f3a66bf011c9edfabc3 100644 (file)
@@ -56,7 +56,8 @@
             </li>
           <% end %>
           <li class="nav-item">
             </li>
           <% end %>
           <li class="nav-item">
-            <%= link_to t(".traces_from", :user => @target_user&.display_name), { :controller => "traces", :action => "index", :display_name => @target_user&.display_name }, { :class => "nav-link active" } %>
+            <%= link_to t(".traces_from_html", :user => tag.span(@target_user.display_name, :class => "username text-truncate d-inline-block align-bottom", :dir => "auto")),
+                        { :controller => "traces", :action => "index", :display_name => @target_user.display_name }, { :class => "nav-link active" } %>
           </li>
         <% end %>
       </ul>
           </li>
         <% end %>
       </ul>
index b190c2ca0bca1924078caeeee55e052b08aa7e06..986a30db9464c8ec0f88d73538f0460dbd73e79d 100644 (file)
@@ -2544,7 +2544,7 @@ en:
       upload_trace: "Upload a trace"
       all_traces: "All Traces"
       my_traces: "My Traces"
       upload_trace: "Upload a trace"
       all_traces: "All Traces"
       my_traces: "My Traces"
-      traces_from: "Public Traces from %{user}"
+      traces_from_html: "Public Traces from %{user}"
       remove_tag_filter: "Remove Tag Filter"
     destroy:
       scheduled_for_deletion: "Trace scheduled for deletion"
       remove_tag_filter: "Remove Tag Filter"
     destroy:
       scheduled_for_deletion: "Trace scheduled for deletion"