Some Plugin Improvements
This commit is contained in:
		@@ -6,7 +6,6 @@ class Plugins extends Template
 | 
			
		||||
		$userManager = new UserManager();
 | 
			
		||||
		$langMng = new LanguageManager('en');
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		if (!$userManager->isLogin()){
 | 
			
		||||
			header('Location: ' . BASEURL . 'login');
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										21
									
								
								app/views/templates/part/pluginButton.phtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								app/views/templates/part/pluginButton.phtml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
			
		||||
<div class="col-12 col-md-6 col-xl-4 square-wrap">
 | 
			
		||||
    <div class="rectangle-2">
 | 
			
		||||
        <div class="square-content double <?php echo ($PLUGINSTATUS == 0 ? 'is-inactive' : ''); ?>" id="plugin-<?php echo $PLUGINID; ?>">
 | 
			
		||||
            <div class="row">
 | 
			
		||||
                <div class="col-1">
 | 
			
		||||
                    <h5 class="fa">
 | 
			
		||||
                    <?php echo $PLUGINNAME ?>
 | 
			
		||||
                    </h5>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="row">
 | 
			
		||||
                <div class="col">
 | 
			
		||||
                    <a class="button is-primary m-1" onClick="restartAutomation(<?php echo $PLUGINID; ?>);"><?php $LANGMNG->echo('b_restart')?></a>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="col">
 | 
			
		||||
                    <a class="button is-primary m-1" onClick="toggleAutomation(<?php echo $PLUGINID; ?>);"><?php $LANGMNG->echo('b_disable')?></a>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
@@ -22,11 +22,21 @@
 | 
			
		||||
		</div>
 | 
			
		||||
		<div class="col-md-9 main-body">
 | 
			
		||||
			<div class="col-12 col-sm-9 mx-auto mt-4">
 | 
			
		||||
				<h1><?php echo $LANGMNG->get('t_Plugins'); ?></h1>
 | 
			
		||||
				<h1><?php echo $LANGMNG->get('t_Plugins');
 | 
			
		||||
				 ?></h1>
 | 
			
		||||
 | 
			
		||||
				<div class="row mb-4">
 | 
			
		||||
					<?php if ($PLUGINS): ?>
 | 
			
		||||
						<?php foreach ($PLUGINS as $plugin): ?>
 | 
			
		||||
						<?php foreach ($PLUGINS as $plugin): 
 | 
			
		||||
							
 | 
			
		||||
								//BUTTON
 | 
			
		||||
								$partial = new Partial('pluginButton');
 | 
			
		||||
								$partial->prepare('langMng',$LANGMNG);
 | 
			
		||||
								$partial->prepare('pluginName',$plugin['name']);
 | 
			
		||||
								$partial->prepare('pluginStatus',$plugin['status']);
 | 
			
		||||
								$partial->render();
 | 
			
		||||
								
 | 
			
		||||
						?>
 | 
			
		||||
							<div class="content">
 | 
			
		||||
								<form method="post" action="">
 | 
			
		||||
									<input type="hidden" name="name" value="<?php echo $plugin['name']; ?>"/>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user