add options to select apps that must be displayed in the top menu (replace exteral sites option)

This commit is contained in:
Simon Vieille
2020-08-12 10:51:49 +02:00
parent caa9c092ef
commit ffab77aff2
8 changed files with 66 additions and 22 deletions
+24 -11
View File
@@ -311,24 +311,37 @@ $choicesSizes = [
<?php endforeach; ?>
</select>
</div>
</div>
<div class="section">
<h2>
<?php p($l->t('Top menu')); ?>
</h2>
<div>
<label for="side-menu-external-sites-in-top-menu">
<?php p($l->t('Do not move external sites in the side menu')); ?>
<label for="side-menu-top-menu-apps">
<?php p($l->t('Apps that not must be moved in the side menu')); ?>
<small><span class="warning">Experimental</span></small>
</label>
</div>
<p><em>Should be enabled with the <code>big menu</code> display.</em></p>
<p><em>Selected apps will be displayed in the <code>big menu</code> display and in the top menu.</em></p>
<div>
<select id="side-menu-external-sites-in-top-menu" name="external-sites-in-top-menu" class="side-menu-setting">
<?php foreach ($choicesYesNo as $label => $value): ?>
<option value="<?php echo $value ?>" <?php if ($value === $_['external-sites-in-top-menu']): ?>selected<?php endif; ?>>
<?php echo $l->t($label); ?>
</option>
<?php endforeach; ?>
</select>
<div class="side-menu-setting" data-name="top-menu-apps" data-checkbox>
<?php foreach ($_['apps'] as $app): ?>
<div>
<input
type="checkbox"
name="top-menu-apps[]"
value="<?php echo $app['id'] ?>"
id="top-menu-app-<?php echo $app['id'] ?>"
<?php if (in_array($app['id'], $_['top-menu-apps'])): ?>checked<?php endif; ?>
/>
<label for="top-menu-app-<?php echo $app['id'] ?>">
<?php echo $app['name'] ?>
</label>
</div>
<?php endforeach; ?>
</div>
</div>