]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/messages/_heading.html.erb
Add basic structures for UserMute and Message muting logic
[rails.git] / app / views / messages / _heading.html.erb
index 12c77d3f5c9ed7706b673a3719ed90e94281bd61..90995ed88d999fb3ef896595d9ffbacc074a0ce1 100644 (file)
@@ -3,7 +3,9 @@
 <% content_for :heading do %>
   <h1><%= t("users.show.my messages") %></h1>
   <ul class="nav nav-tabs">
-    <% { ".my_inbox" => inbox_messages_path, ".my_outbox" => outbox_messages_path }.each do |i18n_key, path| %>
+    <% { ".my_inbox" => inbox_messages_path, ".my_outbox" => outbox_messages_path, ".muted_messages" => muted_messages_path }.each do |i18n_key, path| %>
+    <% next if path == muted_messages_path && current_user.muted_messages.none? %>
+
     <li class="nav-item">
       <% if path == active_link_path %>
         <a class="nav-link active"><%= t(i18n_key) %></a>