- <%= render_editable_attribute (name_link || object), 'name', nil, {tiptitle: 'rename'} %>
- <br>
- <span class="tags-span">
- <span class="removable-tag-container">
- <% links_for_object(object).select{|link|link.link_class=='tag'}.each do |tag_link| %>
- <span class="label label-info" data-tag-link-uuid="<%= tag_link.uuid %>">
- <%# FIXME: link tag to search dialog or something # link_to tag_link.name, controller: "links", filters: [["link_class", "=", "tag"], ["name", "=", tag_link.name]].to_json %>
- <%= tag_link.name %>
- <% if tag_link.owner_uuid == current_user.uuid or current_user.is_admin %>
- <span class="removable-tag">
- <a title="Delete tag"><i class="fa fa-fw fa-trash-o"></i></a>
- </span>
- <% end %>
- </span>
- <% end %>
- </span>
- <a class="btn btn-xs btn-info add-tag-button" data-remote-href="<%= url_for(controller: 'links', action: 'create') %>" data-remote-method="post"><i class="glyphicon glyphicon-plus"></i> Tag</a>
- </span>
+ <% if object.respond_to?(:name) %>
+ <%= render_editable_attribute (name_link || object), 'name', nil, {tiptitle: 'rename'} %>
+ <% end %>