<table class="data" id="shared-dashboards">
  <thead>
  <tr>
    <th class="name"><%= message('name') -%></th>
    <th class="shared"><%= message('shared') -%></th>
    <th class="owner"><%= message('owner') -%></th>
    <th class="order">&nbsp;</th>
    <th class="operations"><%= message('operations') -%></th>
  </tr>
  </thead>
  <tbody>
  <% if @shared_dashboards.nil? || @shared_dashboards.empty? %>
    <tr class="even">
      <td colspan="5" class="empty"><%= message('dashboard.no_dashboard') -%></td>
    </tr>
  <% else
       @shared_dashboards.each do |dashboard| %>
      <% resource_id = @resource.id if @resource %>
      <tr id="dashboard-<%= dashboard.id -%>" class="<%= cycle('even', 'odd', :name => 'shared') -%>">
        <td>
          <%= link_to h(dashboard.name(true)), {:controller => :dashboard, :action => :index, :did => dashboard.id, :id => (resource_id unless dashboard.global?)},
                      :id => "view-#{u dashboard.name}" %>
          <div class="description"><%= h dashboard.description -%></div>
        </td>
        <td class="shared">
          <% if (dashboard.shared) %><i class="icon-check"></i><% end %>
        </td>
        <td class="owner">
          <%= h(dashboard.user_name || message('dashboard.username.default')) -%>
        </td>
        <td class="order">&nbsp;</td>
        <%= render :partial => 'dashboard_operations', :locals => {:dashboard => dashboard, :can_be_disabled => true, :subscription_action => 'follow'} %>
      </tr>
    <% end
     end
    %>
  </tbody>
</table>
