{% load rules %}
{% load projectroles_common_tags %}

<button class="btn btn-secondary dropdown-toggle sodar-list-dropdown
               sodar-pr-remote-site-dropdown"
    type="button" data-toggle="dropdown"
    aria-haspopup="true" aria-expanded="false">
  <i class="iconify" data-icon="mdi:cog"></i>
</button>
<div class="dropdown-menu dropdown-menu-right">
  <a class="dropdown-item"
     href="{% url 'projectroles:remote_projects' remotesite=site.sodar_uuid %}">
    <i class="iconify" data-icon="mdi:rhombus-split"></i>
    View{% if site_mode == 'SOURCE' %}/Edit{% endif %}
    {% get_display_name 'PROJECT' title=True plural=True %}
  </a>
  {% if site_mode == 'TARGET' and site.mode == 'SOURCE' %}
    <a class="dropdown-item"
       href="{% url 'projectroles:remote_projects_sync' remotesite=site.sodar_uuid %}">
      <i class="iconify" data-icon="mdi:cloud-download"></i> Synchronize
    </a>
  {% endif %}
  <a class="dropdown-item"
     href="{% url 'projectroles:remote_site_update' remotesite=site.sodar_uuid %}">
    <i class="iconify" data-icon="mdi:lead-pencil"></i> Update Site
  </a>
  <a class="dropdown-item text-danger"
     href="{% url 'projectroles:remote_site_delete' remotesite=site.sodar_uuid %}">
    <i class="iconify" data-icon="mdi:close-thick"></i> Delete Site
  </a>
</div>
