]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/users/show.html.erb
Add basic structures for UserMute and Message muting logic
[rails.git] / app / views / users / show.html.erb
index 81fda926b7a081b333add6d07f6d3aaa87989668..0c803ebb03cf3492919d24210c0c6ed4716502c2 100644 (file)
                 <%= report_link(t(".report"), @user) %>
               </li>
             <% end %>
+
+            <% if current_user and UserMute.exists?(owner: current_user, subject: @user) %>
+              <li>
+              <%= link_to t(".destroy_mute"), user_mute_path(@user), :method => :delete %>
+              </li>
+            <% elsif current_user %>
+              <li>
+              <%= link_to t(".create_mute"), user_mute_path(@user), :method => :post, :title => t("user_mutes.index.user_mute_explainer") %>
+              </li>
+            <% end %>
           </ul>
         </nav>
       <% end %>