app/views/notices/_link.html.erb
<li class="link_with_url">
<% if link.active? && (current_user.is_admin_of?(link.department) || current_user == link.author) %>
<%= link_to '[x]', { controller: 'links', action: 'destroy', id: link.id },
confirm: "Are you sure you want to remove this link?",
method: :delete %>
<% end %>
<%= link_to link.content, link.url, target: "_blank" %>
<div class="link_url">
<%= link.url %>
</div>
</li>