<span id="docsListOtherActions"></span>

<script type="text/template" id="other_actions_template">
	<div class="btn-group" role="group" aria-label="other actions group">

	{{ if (can_add_doc) { }}
		<a href="add_doc.php?fid={{=id}}" id="otherActionsAddDoc" class="btn btn-success">
			<ion-icon name="add-circle-outline"></ion-icon>
			<loc name="documents:document">[Document]</loc>
		</a>
	{{ } }}

	{{ if (can_add_folder) { }}
		<a href="add_folder.php?parent_id={{=id}}" id="otherActionsAddFolder" class="btn btn-secondary">
			<ion-icon name="add-circle-outline"></ion-icon>
			<loc name="documents:folder">[Folder]</loc>
		</a>
	{{ } else { }}
		<span class="btn btn-secondary disabled">
			<ion-icon name="add-circle-outline"></ion-icon>
			<loc name="documents:folder">[Folder]</loc>
		</span>
	{{ } }}

	<ul class="dropdown-menu dropdown-menu-right">
		{{ if (dms_options['ERMS_CONFIG_MARKERS']) { }}
			<li>
			{{ if (can_add_doc) { }}
				<a class="dropdown-item" href="add_doc.php?fid={{=id}}&doc_type_str=marker">
					<ion-icon name="navigate-circle-outline"></ion-icon>
					<txt name="documents:add_digital_marker">Add digital marker</txt>
				</a>
			{{ } else { }}
				<a class="dropdown-item">
					<span class="text-muted">
						<ion-icon name="navigate-circle-outline"></ion-icon>
					</span>
					<span class="text-muted" name="documents:add_digital_marker">Add digital marker</span>
				</a>
			{{ } }}
			</li>
		{{ } }}
		{{ if (dms_options['ERMS_CONFIG_GDOC_LINKS']) { }}
			<li>
			{{ if (can_add_gdoc) { }}
				<a class="dropdown-item" href="add_doc.php?fid={{=id}}&doc_type_str=gdoc_link" id="otherActionsAddGDocLink"><span class="glyphicons-google-drive glyphicons"></span> <txt name="documents:add_google_link">Add Google Document link</txt></a>
			{{ } else { }}
				<a class="dropdown-item"><span class="text-muted glyphicons-google-drive glyphicons"></span> <span class="text-muted" name="documents:add_google_link">Add Google Document link</span></a>
			{{ } }}
			</li>
		{{ } }}
		{{ if (dms_options['ERMS_CONFIG_ONEDRIVE_LINKS']) { }}
			<li>
			{{ if (can_add_onedrive) { }}
				<a href="add_doc.php?fid={{=id}}&doc_type_str=onedrive_link" class="dropdown-item" id="otherActionsAddOneDriveLink"><span class="glyphicons-onedrive glyphicons"></span> <txt name="documents:add_onedrive_link">Add Microsoft OneDrive link</txt></a>
			{{ } else { }}
				<a class="dropdown-item"><span class="text-muted glyphicons-onedrive glyphicons"></span> <span class="text-muted" name="documents:add_onedrive_link">Add Microsoft OneDrive link</span></a>
			{{ } }}
			</li>
		{{ } }}
		{{ if (dms_options['template_folder_id'] > 0) { }}
			<li>
				{{ if (can_add_folder && !is_root) { }}
				<a href="add_template.php?folder_id={{=id}}" class="dropdown-item"><span class="glyphicons-duplicate glyphicons"></span> <txt name="documents:add_template">Add from template</txt></a>
				{{ } else { }}
				<a class="dropdown-item text-muted">
					<ion-icon name="copy-outline"></ion-icon>
					<span name="documents:add_template">Add from template</span>
				</a>
				{{ } }}
			</li>
		{{ } }}
		{{ if (dms_options['ERMS_CONFIG_EXPORT_IMPORT']) { }}
			<li>
				{{ if (can_add_folder && !is_root) { }}
					<a class="dropdown-item" href="import.php?parent_id={{=id}}"><span class="glyphicons-file-export glyphicons"></span> <txt name="documents:import:header">Import</txt></a>
				{{ } else { }}
				<a class="dropdown-item"><span class="text-muted glyphicons-file-export glyphicons"></span> <span class="text-muted" name="documents:import:header">Import</span></a>
				{{ } }}
			</li>
		{{ } }}
	</ul>
		<a id="other_actions" href="#" class="btn btn-secondary" rel="tooltip" data-original-title="${documents:more.body}" data-toggle="dropdown">
			<ion-icon name="ellipsis-vertical"></ion-icon>
		</a>

	</div>
</script>
