public static function renderArticleSortableNode($nodes) { $output = ''; if (isset($nodes)) { foreach ($nodes as $node) { $output .= '<li class="' . (!$node->status ? 'invisible-item' : '') . '"id="node_' . $node->id . '">'; // Если status 0 то присвоить клаас чтобы не показавыть с активноми $output .= '<div class="node-item"><a href=""></a> <span class="glyphicon glyphicon-move move" aria-hidden="true"></span> <a href="' . Helpers\Uri::makeUri("Admin/Articles/Edit") . '/' . $node->id . App::URI_EXT . '"> ' . $node->title . ' </a> <div class="pull-right"> <a href="' . Helpers\Uri::makeUri("Admin/Articles/Edit") . '/' . $node->id . App::URI_EXT . '"> <i class="glyphicon glyphicon-pencil" aria-hidden="true"></i> </a> <a class="remove-confirm" href="' . Helpers\Uri::makeUri("Admin/Articles/Delete") . '/' . $node->id . App::URI_EXT . '"> <i class="glyphicon glyphicon-remove-sign"></i> </a> </div> </div>'; if (isset($node->children)) { $output .= '<ol>'; $output .= static::renderArticleSortableNode($node->children); $output .= '</ol>'; } $output .= '</li>'; } } return $output; }
echo !$a->created_at ?: $a->created_at->toDateTimeString(); ?> </td> <td><?php echo !$a->updated_at ?: $a->updated_at->toDateTimeString(); ?> </td> <td> <a href="<?php echo \Helpers\Uri::makeUri('Admin/Articles/Edit') . '/' . $a->id . App::URI_EXT; ?> "><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a> </td> <td> <a class="remove-confirm" href="<?php echo \Helpers\Uri::makeUri('Admin/Articles/Delete') . '/' . $a->id . App::URI_EXT; ?> "><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></a> </td> </tr> <?php } ?> </table> </div> <?php } ?> </div> </div> </div>
<?php /** * Created by PhpStorm. * User: CrossComp * Date: 12/9/14 * Time: 5:41 AM */ ?> <!--Begin Container--> <div class="row"> <div class="col-md-8 col-md-offset-2"> <legend>Edit Setting</legend> <form method="post" action="<?php echo \Helpers\Uri::makeUri('/Admin/Settings/Edit') . '/' . $id . App::URI_EXT; ?> " id="form"> <div class="panel-body"> <div class="group"> <div class="form-group col-sm-7"> <label for="title">Title</label> <p><?php echo $item->title; ?> </p> </div> <div class="form-group col-sm-7"> <label for="desc">Description</label> <p><?php echo $item->desc; ?>
<tbody> <?php if ($items) { ?> <?php foreach ($items as $item) { ?> <tr> <td> <?php echo $item->group; ?> </td> <td> <a href="<?php echo \Helpers\Uri::makeUri('Admin/Settings') . '/' . $item->group . App::URI_EXT; ?> ">Edit</a> </td> </tr> <?php } ?> <?php } else { ?> <div class="alert alert-info" role="alert"> <p>Setting List Is Empty</p> </div> <?php }
echo $item['name']; ?> </td> <td> <?php echo $item['desc']; ?> </td> <td> <?php echo $item['value']; ?> </td> <td> <a href="<?php echo \Helpers\Uri::makeUri('Admin/Settings/Edit') . '/' . $item['id'] . App::URI_EXT; ?> "><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a> </td> </tr> <?php } ?> <?php } else { ?> <div class="alert alert-info" role="alert"> <p>Setting List Is Empty</p> </div> <?php }
public function anyTestLangRoute() { var_dump(Lang::instance()->getCurrentLang()); $article = (new \ArticleModel())->find(1); echo $article->id; echo "<br>"; echo $article->title; echo "<br>"; echo $article->desc; echo "<br>"; echo \Helpers\Uri::makeUri('TestLangRoute.html'); echo "<br>"; }
/** * Created by PhpStorm. * User: CrossComp * Date: 12/9/14 * Time: 5:41 AM */ ?> <!--Begin Container--> <div class="container"> <div class="panel panel-primary"> <div class="panel-heading"> <h3 class="panel-title">Edit Language</h3> </div> <form method="post" action="<?php echo \Helpers\Uri::makeUri('Admin/Languages/Edit') . '/' . $item->id . App::URI_EXT; ?> " enctype="multipart/form-data" id="form"> <div class="panel-body"> <div class="group"> <div class="form-group col-sm-7"> <label for="title">Name</label> <input type="text" name="name" class="form-control" id="name" placeholder="Name" value="<?php echo $item->name; ?> " required> </div> <div class="form-group col-sm-7"> <label for="iso">Iso 2</label> <input type="text" name="iso" class="form-control" id="iso" placeholder="Iso" value="<?php echo $item->iso;
?> </td> <td> <?php echo $item['status'] ? 'Active' : 'Inactive'; ?> </td> <td> <a href="<?php echo \Helpers\Uri::makeUri('Admin/Languages/Edit') . '/' . $item['id'] . App::URI_EXT; ?> "><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a> </td> <td> <a class="remove-confirm" href="<?php echo \Helpers\Uri::makeUri('Admin/Languages/Delete') . '/' . $item['id'] . App::URI_EXT; ?> "><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></a> </td> </tr> <?php } ?> <?php } else { ?> <div class="alert alert-info" role="alert"> <p>Languages List Is Empty</p> </div> <?php }