|
@@ -1,34 +1,11 @@
|
|
|
@extends('app.stat-tree.stat-trees.single')
|
|
|
@section('page')
|
|
|
-<?php
|
|
|
-function renderStatTreeLineNode($line) {
|
|
|
- echo '<div class="stat-tree-node">' .
|
|
|
- $line->displayLabel() .
|
|
|
- ' <span class="text-secondary">(' . (is_null($line->last_refresh_count) ? '-' : $line->last_refresh_count) . ')</span>' .
|
|
|
- '</div>';
|
|
|
- if(count($line->children)) {
|
|
|
- echo '<div class="pl-4">';
|
|
|
- foreach($line->children as $child) {
|
|
|
- renderStatTreeLineNode($child);
|
|
|
- }
|
|
|
- echo '</div>';
|
|
|
- }
|
|
|
-}
|
|
|
-?>
|
|
|
+
|
|
|
<div id="statTreeViewPage">
|
|
|
<div id="statTreeView" class="row">
|
|
|
@if(count($statTree->lines))
|
|
|
<div class="col-12">
|
|
|
- <div class="d-flex align-items-center justify-content-between mb-2">
|
|
|
- <h6 class="font-weight-bold">Tree</h6>
|
|
|
- </div>
|
|
|
- <div class="stat-tree-view border mb-3">
|
|
|
- @foreach($statTree->lines as $line)
|
|
|
- @if(!$line->parent_stat_tree_line_id)
|
|
|
- <?php renderStatTreeLineNode($line); ?>
|
|
|
- @endif
|
|
|
- @endforeach
|
|
|
- </div>
|
|
|
+ @include('app.stat-tree.tree', ['slug' => 'rm-tree'])
|
|
|
</div>
|
|
|
<div class="col-12">
|
|
|
<div class="d-flex align-items-center justify-content-between mb-2">
|