mirror of
				https://github.com/slawkens/myaac.git
				synced 2025-11-04 09:46:23 +01:00 
			
		
		
		
	* Fix alert class name * feature: csrf protection * Cosmetics * Fix token generate * Admin Panel: changelogs csrf protection * news/id route * Refactor admin newses + add csrf * Use admin.links instead * Admin panel: Pages csrf * Menus: better csrf + add success message on reset colors * Plugins csrf * Move definitions * add info function, same as note($message) * Update mailer.php * Fix new page/news links * clear_cache & maintenance csrf * Formatting * Fix news type * Fix changelog link * Add new changelog link * More info to confirm dialog * This is always true
		
			
				
	
	
		
			64 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Twig
		
	
	
	
	
	
			
		
		
	
	
			64 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Twig
		
	
	
	
	
	
<div class="card card-info card-outline">
 | 
						|
	<div class="card-header">
 | 
						|
		<h5 class="m-0">Installed plugins<span class="float-right"><a class="" data-toggle="collapse" href="#install_plugin">Install Plugin</a></span></h5>
 | 
						|
	</div>
 | 
						|
	<div class="card-body">
 | 
						|
		<table class="table table-striped table-bordered table-responsive d-md-table" id="tb_plugins">
 | 
						|
			<thead>
 | 
						|
			<tr>
 | 
						|
				<th>Enabled</th>
 | 
						|
				<th>Name</th>
 | 
						|
				<th>Version</th>
 | 
						|
				<th>Author</th>
 | 
						|
				<th>Filename</th>
 | 
						|
				<th style="width: 55px;">Options</th>
 | 
						|
			</tr>
 | 
						|
			</thead>
 | 
						|
			<tbody>
 | 
						|
			{% for plugin in plugins %}
 | 
						|
				<tr>
 | 
						|
					<td>
 | 
						|
						{% if plugin.enabled %}
 | 
						|
							<form method="post">
 | 
						|
								{{ csrf() }}
 | 
						|
								<input type="hidden" name="disable" value="{{ plugin.file }}" />
 | 
						|
								<button type="submit" class="btn btn-success" onclick="return confirm('Are you sure you want to disable plugin {{ plugin.name }}?');" title="Disable"><i class="fas fa-check"></i> Enabled</button>
 | 
						|
							</form>
 | 
						|
						{% else %}
 | 
						|
							<form method="post">
 | 
						|
								{{ csrf() }}
 | 
						|
								<input type="hidden" name="enable" value="{{ plugin.file }}" />
 | 
						|
								<button type="submit" class="btn btn-danger" onclick="return confirm('Are you sure you want to enable plugin {{ plugin.name }}?');" title="Enable"><i class="fas fa-ban"></i> Disabled</button>
 | 
						|
							</form>
 | 
						|
						{% endif %}
 | 
						|
					</td>
 | 
						|
					<td><b>{{ plugin.name }}</b><br>
 | 
						|
						<small>{{ plugin.description|raw }}</small>
 | 
						|
					</td>
 | 
						|
					<td>{{ plugin.version }}</td>
 | 
						|
					<td><b>{{ plugin.author }}</b><br>
 | 
						|
						<small>{{ plugin.contact }}</small>
 | 
						|
					</td>
 | 
						|
					<td>{{ plugin.file }}.json</td>
 | 
						|
					<td>
 | 
						|
						{% if plugin.uninstall %}
 | 
						|
							<form method="post">
 | 
						|
								{{ csrf() }}
 | 
						|
								<input type="hidden" name="uninstall" value="{{ plugin.file }}" />
 | 
						|
								<button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure you want to uninstall {{ plugin.name }}?');" title="Uninstall"><i class="fas fa-trash"></i></button>
 | 
						|
							</form>
 | 
						|
						{% endif %}
 | 
						|
					</td>
 | 
						|
				</tr>
 | 
						|
			{% endfor %}
 | 
						|
			</tbody>
 | 
						|
		</table>
 | 
						|
	</div>
 | 
						|
</div>
 | 
						|
 | 
						|
<script>
 | 
						|
	$(function () {
 | 
						|
		$('#tb_plugins').DataTable();
 | 
						|
	})
 | 
						|
</script>
 |