<div class='respondents-list-delegations'>
  <div class="page-header">
    <h2>Delegations</h2>
  </div>

  <div class="datatable-filters">
    <div class="datatable-filters__right">
      <input type="text" name="filter" id="filter" value="" placeholder="Type your search here... " size="25"/>
      <a href="#" id="clear_search" class="btn">Clear Search</a><br>
    </div>
  </div>

  <div class="respondents-table-container">
    <% if @user.delegated_tasks.any? %>
      <table id="respondents_table" class="tablesorter">
        <thead>
          <tr>
            <th>Name</th>
            <th>Questionnaire</th>
            <th>Actions</th>
          </tr>
        </thead>
        <tbody>
          <% @user.delegated_tasks.each do |delegation| %>
              <tr id="row_<%=delegation.id.to_s%>">
                <td><%= link_to h(delegation.user.full_name), user_path(delegation.user) %></td>
                <td><%= delegation.questionnaire.title %></td>
                <td><%= link_to t('manage'), user_delegate_path(delegation.user_delegate) %></td>
              </tr>
          <% end %>
        </tbody>
      </table>
    <% else %>
      <%= t('no_current_delegations') %>
    <% end %>
  </div>
</div>


<div class='respondents-list-delegations'>
  <div class="page-header">
    <h2>Delegations</h2>
  </div>

  <% if @user.delegated_tasks.any? %>
    <div class="datatable-filters">
      <div class="datatable-filters__right">
        <input type="text" name="filter" id="filter" value="" placeholder="Type your search here... " size="25"/>
        <a href="#" id="clear_search" class="btn">Clear Search</a><br>
      </div>
    </div>

    <div class="respondents-table-container">
      <table id="respondents_table" class="tablesorter">
        <thead>
          <tr>
            <th>Name</th>
            <th>Questionnaire</th>
            <th>Actions</th>
          </tr>
        </thead>
        <tbody>
          <% @user.delegated_tasks.each do |delegation| %>
              <tr id="row_<%=delegation.id.to_s%>">
                <td><%= link_to h(delegation.user.full_name), user_path(delegation.user) %></td>
                <td><%= delegation.questionnaire.title %></td>
                <td><%= link_to t('manage'), user_delegate_path(delegation.user_delegate) %></td>
              </tr>
          <% end %>
        </tbody>
      </table>
    </div>
    <% else %>
      <%= t('manage_delegates.no_delegations') %>
    <% end %>
</div>


Fix table when no delegations
Fix table when no delegations
