servermgrv2 init...
This commit is contained in:
parent
20cc4a5a2c
commit
b0ef9c9803
@ -62,6 +62,7 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
|
||||
$routes->group('usersns', static function ($routes) {
|
||||
$routes->get('', 'UserSNSController::index');
|
||||
$routes->get('excel', 'UserSNSController::excel');
|
||||
$routes->get('view/(:uuid)', 'UserController::view/$1');
|
||||
$routes->get('delete/(:num)', 'UserSNSController::delete/$1', ['filter' => 'authFilter:master,director']);
|
||||
$routes->get('toggle/(:num)/(:hash)', 'UserSNSController::toggle/$1/$2', ['filter' => 'authFilter:master,director']);
|
||||
});
|
||||
|
||||
@ -70,11 +70,11 @@ class UserSNSController extends \App\Controllers\Admin\AdminController
|
||||
// {
|
||||
// return $this->update_procedure($uid);
|
||||
// }
|
||||
// //Toggle관련
|
||||
// final public function toggle($uid, string $field)
|
||||
// {
|
||||
// return $this->toggle_procedure($uid, $field);
|
||||
// }
|
||||
//Toggle관련
|
||||
final public function toggle($uid, string $field)
|
||||
{
|
||||
return $this->toggle_procedure($uid, $field);
|
||||
}
|
||||
// //Batchjob 관련
|
||||
// final public function batchjob()
|
||||
// {
|
||||
|
||||
@ -61,6 +61,9 @@ function getFieldIndex_Column_UserSNSHelper($field, $order_field, $order_value,
|
||||
function getFieldIndex_Row_UserSNSHelper($field, array $row, array $fieldFilters, $fieldFormOptions, $attributes = array()): string
|
||||
{
|
||||
switch ($field) {
|
||||
case 'name':
|
||||
return anchor(current_url() . '/view/' . $row['uid'], $row[$field], ["target" => "_self"]);
|
||||
break;
|
||||
case 'updated_at':
|
||||
case 'created_at':
|
||||
return isset($row[$field]) ? str_split($row[$field], 10)[0] : "";
|
||||
|
||||
@ -38,6 +38,7 @@ class UserSNSModel extends CommonModel
|
||||
$entity->name = $datas['name'];
|
||||
$entity->email = $datas['email'];
|
||||
$entity->detail = json_encode($datas);
|
||||
$entity->status = 'standby';
|
||||
return $this->create_process($entity);
|
||||
}
|
||||
public function modify(UserSNSEntity $entity, array $datas): UserSNSEntity
|
||||
|
||||
15
app/Views/admin/usersns/view.php
Normal file
15
app/Views/admin/usersns/view.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?= $this->extend('layouts/admin') ?>
|
||||
<?= $this->section('content') ?>
|
||||
<?= $this->include('templates/admin/header'); ?>
|
||||
<table class="table table-bordered table-hover table-striped indexTable ">
|
||||
<?php foreach ($fields as $field) : ?>
|
||||
<tr>
|
||||
<td nowrap style="background-color:#e8ebe9; width:10%; text-align:right; padding-right:20px;">
|
||||
<?= getFieldLabel_UserSNSHelper($field, $fieldRules) ?>
|
||||
</td>
|
||||
<td style="text-align:left; padding-left:20px;"><?= getFieldView_UserSNSHelper($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<?= $this->include('templates/admin/footer'); ?>
|
||||
<?= $this->endSection() ?>
|
||||
Loading…
Reference in New Issue
Block a user