Add web
This commit is contained in:
9
models/Right.php
Normal file
9
models/Right.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Permission extends Model {
|
||||
protected $table = 'users';
|
||||
}
|
||||
23
web/controllers/test_hello.js
Normal file
23
web/controllers/test_hello.js
Normal file
@@ -0,0 +1,23 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
angular
|
||||
.module('app')
|
||||
.controller('TestHelloCtrl', TestHelloCtrl);
|
||||
|
||||
TestHelloCtrl.$inject = ['$scope', 'smartRequest', '$location', 'Notification'];
|
||||
function TestHelloCtrl($scope, smartRequest, $location, Notification) {
|
||||
$scope.users = [];
|
||||
|
||||
$scope.getUsers = function () {
|
||||
smartRequest.get('php/hello', function (data) {
|
||||
$scope.users = data.users;
|
||||
});
|
||||
};
|
||||
|
||||
$scope.update = function () {
|
||||
$scope.getUsers();
|
||||
};
|
||||
|
||||
$scope.update();
|
||||
}
|
||||
})();
|
||||
19
web/menu_min.js
Normal file
19
web/menu_min.js
Normal file
@@ -0,0 +1,19 @@
|
||||
group_name: 'Разработка',
|
||||
item: [
|
||||
{
|
||||
name: 'Тест',
|
||||
acl: 'test',
|
||||
icon: 'code',
|
||||
order: 0,
|
||||
items: [
|
||||
{
|
||||
name: 'Hello',
|
||||
acl: 'test',
|
||||
url: 'app.test.hello',
|
||||
icon: 'line_style',
|
||||
count: 0,
|
||||
order: 1
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
8
web/routes_min.js
Normal file
8
web/routes_min.js
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
code: 'app.test.hello',
|
||||
url: '/test/hello',
|
||||
templateUrl: '../views/test_hello.html',
|
||||
data: { title : 'Hello' },
|
||||
controller: 'TestHelloCtrl',
|
||||
resolve: ['scripts/controllers/test_hello.js']
|
||||
}
|
||||
35
web/views/test_hello.html
Normal file
35
web/views/test_hello.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<div id="container-floating">
|
||||
<div class="nd1 nds" data-toggle="tooltip" data-placement="left" title="Обновить" ng-click="update()" style="background-color: #d3a411"
|
||||
onmouseenter="$(this).tooltip('show')">
|
||||
<i class="material-icons"></i>
|
||||
</div>
|
||||
|
||||
<div id="floating-button" data-toggle="tooltip" data-placement="left" title="Действия" onmouseenter="$(this).tooltip('show')">
|
||||
<p class="plus">
|
||||
<i class="material-icons"></i>
|
||||
</p>
|
||||
<p class="edit">
|
||||
<i class="material-icons"></i>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="padding">
|
||||
<div class="box">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered m-a-0">
|
||||
<thead>
|
||||
<th style="width: 20%">#</th>
|
||||
<th style="width: 80%">Имя</th>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr ng-repeat="user in users">
|
||||
<td>{{ user.id }}</td>
|
||||
<td>{{ user.name }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user