50 lines
3.7 KiB
Twig
50 lines
3.7 KiB
Twig
{% if currentPath != path('directory_view', {'id': directory.id}) and noview is not defined %}
|
|
<a href="{{ path('directory_view', {'id': directory.id}) }}" class="btn btn-primary btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_view{% endtrans %}"><i class="far fa-eye"></i></a>
|
|
{% endif %}
|
|
{% if is_granted('edit', directory) and noedit is not defined %}
|
|
<a href="{{ path('directory_edit', {'id': directory.id}) }}" class="btn btn-success btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_edit{% endtrans %}"><i class="far fa-edit"></i></a>
|
|
{% endif %}
|
|
{% if is_granted('delete', directory) and nodelete is not defined %}
|
|
<a href="{{ path('directory_delete', {'id': directory.id}) }}" class="btn btn-danger btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_delete{% endtrans %}" onclick="return confirm('{% trans %}confirm_ok_delete{% endtrans %}')"><i class="fa fa-trash"></i></a>
|
|
{% endif %}
|
|
{% if currentPath == path('directory_view', {'id': directory.id}) and noview is not defined %}
|
|
{% if is_granted('merge', directory) and nodelete is not defined %}
|
|
<span data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_merge{% endtrans %}">
|
|
<button type="button" class="btn btn-info btn-sm" data-bs-toggle="modal" data-bs-target="#combinedirectorymodal" ><i class="fas fa-compress"></i></button>
|
|
</span>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% if addtofolder is defined %}
|
|
<a href="{{ path('folder_directory_add', {'id': addtofolder, 'Directory': directory.id}) }}" class="btn btn-success btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_add_to_folder{% endtrans %}"><i class="fas fa-folder-plus"></i></a>
|
|
{% endif %}
|
|
{% if removefromfolder is defined %}
|
|
<a href="{{ path('folder_directory_remove', {'id': removefromfolder, 'Directory': directory.id}) }}" class="btn btn-danger btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_remove_from_folder{% endtrans %}" onclick="return confirm('{% trans %}confirm_ok_remove_from_folder{% endtrans %}')"><i class="fas fa-folder-minus"></i></a>
|
|
{% endif %}
|
|
|
|
{% if is_granted('merge', directory) and nodelete is not defined %}
|
|
<!-- Modal -->
|
|
<div class="modal fade" id="combinedirectorymodal" tabindex="-1" role="dialog" aria-labelledby="combinedirectorymodalLabel" aria-hidden="true">
|
|
<div class="modal-dialog modal-dialog-centered" role="document">
|
|
<form method="POST" action="{{ path('directory_merge_router') }}">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title" id="combinedirectorymodalLabel">{% trans %}title_merge_directory{% endtrans %}</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="form-group">
|
|
<label for="recipient-name" class="col-form-label">{% trans %}title_form_id_merge_into{% endtrans %} :</label>
|
|
<input type="text" class="form-control" id="directory-main" name="directory-main" placeholder="1...." />
|
|
<input type="hidden" value="{{ directory.id }}" id="directory-child" name="directory-child" />
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{% trans %}button_cancel{% endtrans %}</button>
|
|
<button type="submit" class="btn btn-primary">{% trans %}button_ok{% endtrans %}</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{% endif %} |