<span>
	<button type="button" class="btn bg-gradient-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
		<i class="fa fa-fw fa-envelope-open-text"></i>
	</button>

	<ul class="dropdown-menu" x-placement="bottom-start">
		<li class="dropdown-item"><a href="{{ $route }}/mailSelection">{{ __('fg.mail_the_selection') }}</a></li>
		<li class="dropdown-item"><a href="#" class="{{ $model }}-mailall">{{ __('fg.mail_the_complete_list') }}</a></li>
	</ul>
</span>

@push('js')

	<script>
		$('.{{ $model }}-mailall').click(function() {
			var data = $('#{{ $model }}-filters').serialize();
			var url = "{{ $route }}/mailAll?" + data;
			window.location = url;
		});
	</script>

@endpush
