% no_filter = params[:filter].blank? %> <% org_filter = params[:filter].to_s.match?(/^org$/i) %> <% comments_filter = params[:filter].to_s.match?(/^comments$/i) %> <% user_comments = comments_filter && params[:org_id].blank? %> <% user_posts = params[:filter].to_s.match?(/^posts$/i) && params[:org_id].blank? %> "> <% if @organizations.present? %> <%= @user.name %> <% end %> " href="<%= notifications_path %>"> <%= t("views.notifications.nav.all") %> " href="<%= notifications_filter_path(:comments) %>"> <%= t("views.notifications.nav.comments") %> " href="<%= notifications_filter_path(:posts) %>"> <%= t("views.notifications.nav.posts") %> <% if @organizations.present? %> <% @organizations.each do |org| %> <%= org.name %> " href="<%= notifications_filter_org_path(filter: :org, org_id: org.id) %>"> <%= t("views.notifications.nav.all") %> " href="<%= notifications_filter_org_path(filter: :comments, org_id: org.id) %>"> <%= t("views.notifications.nav.comments") %> <% end %> <% end %> "> <% if @organizations.present? %> <%= @user.name %> <% @organizations.each do |org| %> ><%= org.name %> <% end %> <% end %> "> " href="<%= notifications_path %>" aria-current="<%= "page" if no_filter %>"> <%= t("views.notifications.nav.all") %> " href="<%= notifications_filter_path(:comments) %>" aria-current="<%= "page" if user_comments %>"> <%= t("views.notifications.nav.comments") %> " href="<%= notifications_filter_path(:posts) %>" aria-current="<%= "page" if user_posts %>"> <%= t("views.notifications.nav.posts") %> <% if @organizations.present? %> <% @organizations.each do |org| %> "> " href="<%= notifications_filter_org_path(filter: :org, org_id: org.id) %>"> <%= t("views.notifications.nav.all") %> " href="<%= notifications_filter_org_path(filter: :comments, org_id: org.id) %>"> <%= t("views.notifications.nav.comments") %> <% end %> <% end %>