%div.bookmark_item{ :id => bookmark_dom_item(bookmark), 'data-bookmark-id' => bookmark.id }
  = check_box_tag('is_visible', 'true', bookmark.is_visible, :class => 'visibility', :id => nil)
  %a.control.slide ☰
  = link_to_remote(fa_icon('trash-o', '', :class => 'control'), { |
      :confirm => "Delete bookmark to #{bookmark.name}?", |
      :url => portal_delete_bookmark_path(bookmark) }) |
  %a.control.edit ✎
  %a.link_text{:href => portal_visit_bookmark_path(bookmark), :target => "_blank"}= bookmark.name
  %div.editor{:style => "display: none;"}
    %input{:name => 'name', :type => 'text', :value => bookmark.name, :class => 'name-field'}
    - if bookmark.is_a? Portal::GenericBookmark
      %input{:name => 'url', :type => 'text', :value => bookmark.url, :class => 'url-field'}
    %button.save Save
- if defined?(new_bookmark_id)
  :javascript
    if (window.bookmarksManager) {
      window.bookmarksManager.addBookmarks();
      window.bookmarksManager.editBookmark(#{new_bookmark_id});
    }


%div.bookmark_item{ :id => bookmark_dom_item(bookmark), 'data-bookmark-id' => bookmark.id }
  = check_box_tag('is_visible', 'true', bookmark.is_visible, :class => 'visibility', :id => nil)
  %a.control.slide ☰
  = link_to_remote(fa_icon('trash-o', class: 'control'), { |
      :confirm => "Delete bookmark to #{bookmark.name}?", |
      :url => portal_delete_bookmark_path(bookmark) }) |
  %a.control.edit ✎
  %a.link_text{:href => portal_visit_bookmark_path(bookmark), :target => "_blank"}= bookmark.name
  %div.editor{:style => "display: none;"}
    %input{:name => 'name', :type => 'text', :value => bookmark.name, :class => 'name-field'}
    - if bookmark.is_a? Portal::GenericBookmark
      %input{:name => 'url', :type => 'text', :value => bookmark.url, :class => 'url-field'}
    %button.save Save
- if defined?(new_bookmark_id)
  :javascript
    if (window.bookmarksManager) {
      window.bookmarksManager.addBookmarks();
      window.bookmarksManager.editBookmark(#{new_bookmark_id});
    }


Fix regression related to creating or viewing class bookmarks.
Fix regression related to creating or viewing class bookmarks.
