summaryrefslogtreecommitdiff
path: root/public/app/views/components/top_bar.php
blob: eaffe76a6fa0590307e20528f725f5a45114c30a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php 
/** top bar
 * -----------------------------------------------------------------------------
 * 
 * rendrers breadcrumbs and user menu
 * 
 * imported variables
 * ---
 * @param $id : category_id of last level
 * @param $label : category title of last level
 * @param $parents : array of parent nodes
 * -----------------------------------------------------------------------------
 */

// initialize variables needed if not passed
// (needed while requiring breadcrumbs)
if (!isset($id)) {
   $id = 0;
   $label = "";
   $parents = [];
}

?>
<div class="top-bar">

    <?php    // breadcrumbs
        ////////////////////////////////////////////////////////////////////////
        Render::view("components/breadcrumbs", [
            'id' => $id,
            'label' => $label,
            'parents' => $parents
        ]);
    ?>

    <?php   // User management drop-down
        ////////////////////////////////////////////////////////////////////////
        Render::view('components/user-management');
    ?>

</div><!-- /top-bar -->