<div class="ml-auto">
  <button class="btn btn-primary dropdown-toggle"
          id="sodar-ff-file-ops-btn"
          type="button" data-toggle="dropdown"
          aria-haspopup="true" aria-expanded="false">
    File Operations
  </button>
  <div class="dropdown-menu dropdown-menu-right" id="sodar-ff-file-ops-dropdown">
    {# Folder #}
    <a class="dropdown-item"
      {% if folder %}
        href="{% url 'filesfolders:folder_create' folder=folder.sodar_uuid %}">
      {% else %}
        href="{% url 'filesfolders:folder_create' project=project.sodar_uuid %}">
      {% endif %}
        <i class="iconify" data-icon="mdi:folder-plus"></i> Add Folder
      </a>
    {# Hyperlink #}
    <a class="dropdown-item"
      {% if folder %}
        href="{% url 'filesfolders:hyperlink_create' folder=folder.sodar_uuid %}">
      {% else %}
        href="{% url 'filesfolders:hyperlink_create' project=project.sodar_uuid %}">
      {% endif %}
        <i class="iconify" data-icon="mdi:link-plus"></i> Add Link
      </a>
    {# File #}
    <a class="dropdown-item"
      {% if folder %}
        href="{% url 'filesfolders:file_create' folder=folder.sodar_uuid %}">
      {% else %}
        href="{% url 'filesfolders:file_create' project=project.sodar_uuid %}">
      {% endif %}
        <i class="iconify" data-icon="mdi:upload"></i> Upload File
      </a>
    {# Move Selected #}
    <a class="dropdown-item"
       href="javascript:{}"
       onclick="
         document.getElementById('sodar-ff-batch-form-action').value = 'move';
         document.getElementById('sodar-ff-batch-form').submit();
         return false;">
      <i class="iconify" data-icon="mdi:arrow-right-thick"></i> Move Selected
    </a>
    {# Delete Selected #}
    <a class="dropdown-item text-danger"
       href="javascript:{}"
       onclick="
         document.getElementById('sodar-ff-batch-form-action').value = 'delete';
         document.getElementById('sodar-ff-batch-form').submit();
         return false;">
      <i class="iconify" data-icon="mdi:close-thick"></i> Delete Selected
    </a>
  </div>
</div>
