<%
# Copyright (C) 2013 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
%>

<a title class="vdd_tooltip_link"
  data-tooltip-selector="#vdd_tooltip_content_<%=presenter.selector%>"
  <% if presenter.link_href.present? %>href="<%= presenter.link_href %>"<% end %>
  ><%= presenter.link_text %></a>

<div id="vdd_tooltip_content_<%=presenter.selector%>" style="display:none">
  <dl class="vdd_tooltip_content dl-horizontal">
    <% presenter.due_date_summary.each do |due_date| %>
      <div class="clearfix">
        <dt><%= due_date[:due_for] %></dt>
        <dd><%= due_date[:due_at] %></dd>
      </div>
    <% end %>
    <% if presenter.more_message.present? %>
      <div class="clearfix">
        <dd><%= presenter.more_message %></dd>
      </div>
    <% end %>
  </dl>
</div>