%h3
  Authoring

%h4= link_to "#{Investigation.display_name.pluralize}", investigations_path
= field_set_tag "#{Investigation.display_name.pluralize} you've authored" do
  %ul
    - current_visitor.investigations.each do |inv|
      %li
        = link_to_container(inv)

- if current_visitor.has_role?('admin') || current_visitor.resource_pages.present?
  %h4= link_to "#{ResourcePage.display_name.pluralize}", resource_pages_path
  = field_set_tag "#{ResourcePage.display_name.pluralize} you've authored" do
    %ul
      - current_visitor.resource_pages.each do |resource_page|
        %li
          = link_to resource_page.display_name, resource_page

- if current_visitor.has_role?('admin') || current_visitor.external_activities.present?
  %h4= link_to "#{ExternalActivity.display_name.pluralize}", external_activities_path
  = field_set_tag "#{ExternalActivity.display_name.pluralize} you've authored" do
    %ul
      - current_visitor.external_activities.each do |item|
        %li
          = link_to item.name, item
%h4= link_to "#{Image.display_name.pluralize}", images_path

%h2
  Authoring

%div{:style=> "margin: 1em; padding: 1em;"}
  %h4= "#{Investigation.display_name.pluralize} you've authored"
  %ul
    - current_visitor.investigations.each do |inv|
      %li
        = link_to_container(inv)
  = link_to "Create #{Investigation.display_name}", new_investigation_path, :class => 'button'

- if current_visitor.has_role?('admin') || current_visitor.resource_pages.present?
  %div{:style=> "margin: 1em; padding: 1em;"}
    %h4= "#{ResourcePage.display_name.pluralize} you've authored"
    %ul
      - current_visitor.resource_pages.each do |resource_page|
        %li
          = link_to resource_page.display_name, resource_page
    = link_to "Create #{ResourcePage.display_name}", new_resource_page_path, :class => 'button'

- if current_visitor.has_role?('admin') || current_visitor.external_activities.present?
  %div{:style=> "margin: 1em; padding: 1em;"}
    %h4= "#{ExternalActivity.display_name.pluralize} you've authored"
    %ul
      - current_visitor.external_activities.each do |item|
        %li
          = link_to item.name, item
    = link_to "Create #{ExternalActivity.display_name}", new_external_activity_path, :class => 'button'

%div{:style=> "margin: 1em; padding: 1em;"}
  %h4= link_to "Create #{Image.display_name}", images_path, :class => 'button'

Hide links to activity, investigation, external_activity listings.
Hide links to activity, investigation, external_activity listings.
