Add a simple page for admin/exercice
This commit is contained in:
parent
655842bb3a
commit
a6ad7597c8
@ -41,6 +41,9 @@ if ($n && $p[0] == SALT_ADMIN)
|
||||
else
|
||||
$cmpstr = $p[1];
|
||||
|
||||
if (strpos($cmpstr, 'ex/') === 0)
|
||||
$page = require("admin/exercice.php");
|
||||
else
|
||||
switch($cmpstr)
|
||||
{
|
||||
case "certificate":
|
||||
|
13
onyx/include/admin/exercice.php
Normal file
13
onyx/include/admin/exercice.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
if(!defined('ONYX')) exit;
|
||||
|
||||
$p = $out[0];
|
||||
|
||||
if (isset($p[2]))
|
||||
$template->assign("theme", $p[2]);
|
||||
|
||||
if (isset($p[3]))
|
||||
$template->assign("ex", $p[3]);
|
||||
|
||||
return "admin/exercice";
|
7
onyx/tpl/bootstrap/admin/exercice.tpl
Normal file
7
onyx/tpl/bootstrap/admin/exercice.tpl
Normal file
@ -0,0 +1,7 @@
|
||||
{extends file="admin/layout.tpl"}
|
||||
{block name=content}
|
||||
<p>
|
||||
Theme: {$theme} </br>
|
||||
Exercice: {$ex}
|
||||
</p>
|
||||
{/block}
|
@ -34,10 +34,10 @@
|
||||
<li{if $menu_where == "themes"} class="active"{/if}><a href="/{$SALT_ADMIN}/themes">Thèmes</a></li>
|
||||
{foreach from=$themes item=t}
|
||||
<li class="dropdown{if $menu_where == $t->get_name()} active{/if}">
|
||||
<a href="/{$SALT_ADMIN}/{$t->get_id()}-{$t->get_name()}" class="dropdown-toggle" data-toggle="dropdown">{$t->get_name()} <b class="caret"></b></a>
|
||||
<a href="/{$SALT_ADMIN}/ex/{$t->get_id()}-{$t->get_name()}" class="dropdown-toggle" data-toggle="dropdown">{$t->get_name()} <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
{foreach from=$t->get_exercices_ordered() item=e}
|
||||
<li><a href="/{$SALT_ADMIN}/{$t->get_id()}-{$t->get_name()}/{$e->get_id()}">{$e->get_name()}</a></li>
|
||||
<li><a href="/{$SALT_ADMIN}/ex/{$t->get_id()}-{$t->get_name()}/{$e->get_id()}">{$e->get_name()}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</li>
|
||||
|
Loading…
Reference in New Issue
Block a user