<?php 
global $myUser;
User::check_access('plugin','configure');
?>
<div class="row">
	<div class="col-md-12">
		<br>
		<h3>Plugins</h3>
		<hr/>
		<p>Liste des plugins installés sur l'ERP :</p>
		<ul id="plugins" class="list-group">
			<li class="list-group-item hidden" data-id="{{id}}">
				<h4 class="list-group-item-heading">{{name}} <span class="label label-info">v{{version}}</span></h4>
				<p class="list-group-item-text">{{description}}</p>
				
				<a class="pointer btn-link" onclick="$(this).next('ul').toggleClass('hidden');"><i class="fas fa-search"></i> + d'Infos</a>
				<ul class="hidden">
					<li>ID : {{id}}</li>
					<li>Auteur : <span class="label label label-default">{{author.name}}</span></li>
					<li>Licence : {{#licence.url}}<a href="{{licence.url}}">{{/licence.url}}{{licence.name}}{{#licence.url}}</a>{{/licence.url}}</li>
					<li>Version : <code>{{version}}</code></li>
					<li>Site web : <a href="{{url}}">{{url}}</a></li>
					<li>Dossier : {{folder.path}}</li>
					<li>Pré-requis : <ul>{{#require}}<li>{{key}} - <span class="label label-info">{{value}}</span></li>{{/require}}</ul></li>
				</ul>
				
				 <label class="btn activator {{#state}}btn-danger{{##state}}{{^state}}btn-info{{##state}}">
				 	<input {{#state}}checked{{##state}} type="checkbox" class="toggle" autocomplete="off" name="plugin-{{id}}" id="plugin-{{id}}" data-type="checkbox">
				 	{{#state}}Désactiver{{##state}}{{^state}}Activer{{##state}}
				 </label>
			</li>
		</ul>
	</div>
</div>
<br>

