mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 10:08:05 +00:00
Move Device controller to the admin panel
This commit is contained in:
parent
ec3f123c9a
commit
adabb52f3f
26 changed files with 220 additions and 180 deletions
|
|
@ -17,44 +17,47 @@
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace App\Http\Controllers\Account;
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Account;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Libraries\FlexisipConnector;
|
||||
|
||||
class DeviceController extends Controller
|
||||
class AccountDeviceController extends Controller
|
||||
{
|
||||
public function index(Request $request)
|
||||
public function index(Request $request, Account $account)
|
||||
{
|
||||
$connector = new FlexisipConnector;
|
||||
|
||||
return view(
|
||||
'account.devices.index',
|
||||
'admin.account.device.index',
|
||||
[
|
||||
'devices' => $connector->getDevices($request->user()->identifier)
|
||||
'account' => $account,
|
||||
'devices' => $connector->getDevices($account->identifier)
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
public function delete(Request $request, string $uuid)
|
||||
public function delete(Request $request, Account $account, string $uuid)
|
||||
{
|
||||
$connector = new FlexisipConnector;
|
||||
|
||||
return view(
|
||||
'account.devices.delete',
|
||||
'admin.account.device.delete',
|
||||
[
|
||||
'device' => $connector->getDevices($request->user()->identifier)
|
||||
'account' => $account,
|
||||
'device' => $connector->getDevices($account->identifier)
|
||||
->where('uuid', $uuid)->first()
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
public function destroy(Request $request)
|
||||
public function destroy(Request $request, Account $account)
|
||||
{
|
||||
$connector = new FlexisipConnector;
|
||||
$connector->deleteDevice($request->user()->identifier, $request->get('uuid'));
|
||||
$connector->deleteDevice($account->identifier, $request->get('uuid'));
|
||||
|
||||
return redirect()->route('account.device.index');
|
||||
return redirect()->route('admin.account.device.index');
|
||||
}
|
||||
}
|
||||
|
|
@ -52,7 +52,6 @@ class AccountService
|
|||
$rules = [];
|
||||
$rules['password'] = 'confirmed';
|
||||
$rules['email'] = 'confirmed';
|
||||
$rules['privacy'] = 'accepted';
|
||||
$rules['terms'] = 'accepted';
|
||||
|
||||
if ($this->api) {
|
||||
|
|
|
|||
106
flexiapi/composer.lock
generated
106
flexiapi/composer.lock
generated
|
|
@ -1516,16 +1516,16 @@
|
|||
},
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/promises.git",
|
||||
"reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6"
|
||||
"reference": "111166291a0f8130081195ac4556a5587d7f1b5d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/3a494dc7dc1d7d12e511890177ae2d0e6c107da6",
|
||||
"reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/111166291a0f8130081195ac4556a5587d7f1b5d",
|
||||
"reference": "111166291a0f8130081195ac4556a5587d7f1b5d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -1579,7 +1579,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/promises/issues",
|
||||
"source": "https://github.com/guzzle/promises/tree/2.0.0"
|
||||
"source": "https://github.com/guzzle/promises/tree/2.0.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -1595,20 +1595,20 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-05-21T13:50:22+00:00"
|
||||
"time": "2023-08-03T15:11:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "2.5.0",
|
||||
"version": "2.6.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "b635f279edd83fc275f822a1188157ffea568ff6"
|
||||
"reference": "8bd7c33a0734ae1c5d074360512beb716bef3f77"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6",
|
||||
"reference": "b635f279edd83fc275f822a1188157ffea568ff6",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/8bd7c33a0734ae1c5d074360512beb716bef3f77",
|
||||
"reference": "8bd7c33a0734ae1c5d074360512beb716bef3f77",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -1695,7 +1695,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/psr7/issues",
|
||||
"source": "https://github.com/guzzle/psr7/tree/2.5.0"
|
||||
"source": "https://github.com/guzzle/psr7/tree/2.6.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -1711,7 +1711,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-04-17T16:11:26+00:00"
|
||||
"time": "2023-08-03T15:06:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/uri-template",
|
||||
|
|
@ -1799,16 +1799,16 @@
|
|||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v9.52.12",
|
||||
"version": "v9.52.14",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/framework.git",
|
||||
"reference": "8bfd22be79f437fa335e70692e4e91ff40ce561d"
|
||||
"reference": "5366a9035100f858589e1b43bbcb134ffcc81a73"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/8bfd22be79f437fa335e70692e4e91ff40ce561d",
|
||||
"reference": "8bfd22be79f437fa335e70692e4e91ff40ce561d",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/5366a9035100f858589e1b43bbcb134ffcc81a73",
|
||||
"reference": "5366a9035100f858589e1b43bbcb134ffcc81a73",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -1993,7 +1993,7 @@
|
|||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2023-07-26T13:20:55+00:00"
|
||||
"time": "2023-08-02T14:58:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/serializable-closure",
|
||||
|
|
@ -2466,26 +2466,26 @@
|
|||
},
|
||||
{
|
||||
"name": "league/mime-type-detection",
|
||||
"version": "1.11.0",
|
||||
"version": "1.13.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/mime-type-detection.git",
|
||||
"reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd"
|
||||
"reference": "a6dfb1194a2946fcdc1f38219445234f65b35c96"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
|
||||
"reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
|
||||
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/a6dfb1194a2946fcdc1f38219445234f65b35c96",
|
||||
"reference": "a6dfb1194a2946fcdc1f38219445234f65b35c96",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-fileinfo": "*",
|
||||
"php": "^7.2 || ^8.0"
|
||||
"php": "^7.4 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^3.2",
|
||||
"phpstan/phpstan": "^0.12.68",
|
||||
"phpunit/phpunit": "^8.5.8 || ^9.3"
|
||||
"phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
|
|
@ -2506,7 +2506,7 @@
|
|||
"description": "Mime-type detection for Flysystem",
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/mime-type-detection/issues",
|
||||
"source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0"
|
||||
"source": "https://github.com/thephpleague/mime-type-detection/tree/1.13.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -2518,7 +2518,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-04-17T13:12:02+00:00"
|
||||
"time": "2023-08-05T12:09:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "monolog/monolog",
|
||||
|
|
@ -2908,20 +2908,20 @@
|
|||
},
|
||||
{
|
||||
"name": "nette/utils",
|
||||
"version": "v4.0.0",
|
||||
"version": "v4.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nette/utils.git",
|
||||
"reference": "cacdbf5a91a657ede665c541eda28941d4b09c1e"
|
||||
"reference": "9124157137da01b1f5a5a22d6486cb975f26db7e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nette/utils/zipball/cacdbf5a91a657ede665c541eda28941d4b09c1e",
|
||||
"reference": "cacdbf5a91a657ede665c541eda28941d4b09c1e",
|
||||
"url": "https://api.github.com/repos/nette/utils/zipball/9124157137da01b1f5a5a22d6486cb975f26db7e",
|
||||
"reference": "9124157137da01b1f5a5a22d6486cb975f26db7e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.0 <8.3"
|
||||
"php": ">=8.0 <8.4"
|
||||
},
|
||||
"conflict": {
|
||||
"nette/finder": "<3",
|
||||
|
|
@ -2929,7 +2929,7 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"jetbrains/phpstorm-attributes": "dev-master",
|
||||
"nette/tester": "^2.4",
|
||||
"nette/tester": "^2.5",
|
||||
"phpstan/phpstan": "^1.0",
|
||||
"tracy/tracy": "^2.9"
|
||||
},
|
||||
|
|
@ -2989,9 +2989,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/nette/utils/issues",
|
||||
"source": "https://github.com/nette/utils/tree/v4.0.0"
|
||||
"source": "https://github.com/nette/utils/tree/v4.0.1"
|
||||
},
|
||||
"time": "2023-02-02T10:41:53+00:00"
|
||||
"time": "2023-07-30T15:42:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
|
|
@ -5571,16 +5571,16 @@
|
|||
},
|
||||
{
|
||||
"name": "sebastian/global-state",
|
||||
"version": "5.0.5",
|
||||
"version": "5.0.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/global-state.git",
|
||||
"reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2"
|
||||
"reference": "bde739e7565280bda77be70044ac1047bc007e34"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2",
|
||||
"reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34",
|
||||
"reference": "bde739e7565280bda77be70044ac1047bc007e34",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -5623,7 +5623,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/global-state/issues",
|
||||
"source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5"
|
||||
"source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -5631,7 +5631,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2022-02-14T08:28:10+00:00"
|
||||
"time": "2023-08-02T09:26:13+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/lines-of-code",
|
||||
|
|
@ -8601,16 +8601,16 @@
|
|||
"packages-dev": [
|
||||
{
|
||||
"name": "barryvdh/laravel-debugbar",
|
||||
"version": "v3.8.1",
|
||||
"version": "v3.8.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/barryvdh/laravel-debugbar.git",
|
||||
"reference": "aff3235fecb4104203b1e62c32239c56530eee32"
|
||||
"reference": "56a2dc1da9d3219164074713983eef68996386cf"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/aff3235fecb4104203b1e62c32239c56530eee32",
|
||||
"reference": "aff3235fecb4104203b1e62c32239c56530eee32",
|
||||
"url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/56a2dc1da9d3219164074713983eef68996386cf",
|
||||
"reference": "56a2dc1da9d3219164074713983eef68996386cf",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -8669,7 +8669,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/barryvdh/laravel-debugbar/issues",
|
||||
"source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.8.1"
|
||||
"source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.8.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -8681,7 +8681,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-02-21T14:21:02+00:00"
|
||||
"time": "2023-07-26T04:57:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/pcre",
|
||||
|
|
@ -9010,31 +9010,31 @@
|
|||
},
|
||||
{
|
||||
"name": "mockery/mockery",
|
||||
"version": "1.6.4",
|
||||
"version": "1.6.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/mockery/mockery.git",
|
||||
"reference": "d1413755e26fe56a63455f7753221c86cbb88f66"
|
||||
"reference": "68782e943f9ffcbc72bda08aedabe73fecb50041"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/mockery/mockery/zipball/d1413755e26fe56a63455f7753221c86cbb88f66",
|
||||
"reference": "d1413755e26fe56a63455f7753221c86cbb88f66",
|
||||
"url": "https://api.github.com/repos/mockery/mockery/zipball/68782e943f9ffcbc72bda08aedabe73fecb50041",
|
||||
"reference": "68782e943f9ffcbc72bda08aedabe73fecb50041",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"hamcrest/hamcrest-php": "^2.0.1",
|
||||
"lib-pcre": ">=7.0",
|
||||
"php": ">=7.4,<8.3"
|
||||
"php": ">=7.3"
|
||||
},
|
||||
"conflict": {
|
||||
"phpunit/phpunit": "<8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8.5 || ^9.3",
|
||||
"phpunit/phpunit": "^8.5 || ^9.6.10",
|
||||
"psalm/plugin-phpunit": "^0.18.4",
|
||||
"symplify/easy-coding-standard": "^11.5.0",
|
||||
"vimeo/psalm": "^5.13.1"
|
||||
"vimeo/psalm": "^4.30"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
|
|
@ -9091,7 +9091,7 @@
|
|||
"security": "https://github.com/mockery/mockery/security/advisories",
|
||||
"source": "https://github.com/mockery/mockery"
|
||||
},
|
||||
"time": "2023-07-19T15:51:02+00:00"
|
||||
"time": "2023-08-06T00:30:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nunomaduro/collision",
|
||||
|
|
|
|||
7
flexiapi/public/css/form.css
vendored
7
flexiapi/public/css/form.css
vendored
|
|
@ -26,6 +26,7 @@ p .btn {
|
|||
|
||||
.oppose {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.btn[disabled] {
|
||||
|
|
@ -251,6 +252,12 @@ input[type=number].digit {
|
|||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
input::-webkit-outer-spin-button,
|
||||
input::-webkit-inner-spin-button {
|
||||
-webkit-appearance: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
input[type=checkbox] {
|
||||
accent-color: var(--main-5);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
@endif
|
||||
<a href="{{ route('account.phone.change') }}">Change my current account phone</a>
|
||||
</p>
|
||||
@if (config('app.devices_management') == true)
|
||||
<p>
|
||||
<i class="material-icons">laptop</i>
|
||||
<a href="{{ route('account.device.index') }}">Manage my devices</a>
|
||||
</p>
|
||||
@endif
|
||||
<p>
|
||||
<i class="material-icons">lock</i>
|
||||
<a href="{{ route('account.password') }}">
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumb')
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
<a href="{{ route('account.device.index') }}">Devices</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Delete</li>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
|
||||
<h2>Device deletion</h2>
|
||||
|
||||
<p>Are you sure you want to delete the following device?</p>
|
||||
<p>
|
||||
<b>User Agent:</b> {{ $device->user_agent }}
|
||||
</p>
|
||||
|
||||
|
||||
{!! Form::open(['route' => 'account.device.destroy', 'method' => 'delete']) !!}
|
||||
|
||||
{!! Form::hidden('uuid', $device->uuid) !!}
|
||||
|
||||
{!! Form::submit('Delete', ['class' => 'btn btn-danger']) !!}
|
||||
{!! Form::close() !!}
|
||||
|
||||
|
||||
@endsection
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumb')
|
||||
<li class="breadcrumb-item active" aria-current="page">Devices</li>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>User Agent</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($devices as $device)
|
||||
<tr>
|
||||
<td>{{ $device->user_agent }}</td>
|
||||
<td>
|
||||
<a type="button"
|
||||
class="btn btn-danger"
|
||||
href="{{ route('account.device.delete', $device->uuid) }}">
|
||||
Delete
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@endsection
|
||||
|
|
@ -68,7 +68,7 @@ Your account can be deleted from the panel using the @if (config('app.web_panel'
|
|||
*The feature is not enabled on this instance.*
|
||||
@endif
|
||||
|
||||
From the @if (config('app.web_panel'))[devices management panel]({{ route('account.device.index') }}) @else devices management panel @endif you will be able to list and delete the devices attached to your SIP address.
|
||||
From the @if (config('app.web_panel'))[devices management panel]({{ route('admin.account.device.index') }}) @else devices management panel @endif an admin will be able to list and delete the devices attached to a SIP account.
|
||||
|
||||
# Admin panel
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumb')
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('admin.account.index') }}">Accounts</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('admin.account.edit', $account->id) }}">{{ $account->identifier }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumb')
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('admin.account.index') }}">Accounts</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('admin.account.edit', $account->id) }}">{{ $account->identifier }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumb')
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('admin.account.index') }}">Accounts</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('admin.account.edit', $action->account) }}">{{ $action->account->identifier }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
<li class="breadcrumb-item active">
|
||||
Actions
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Delete</li>
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumb')
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
<li class="breadcrumb-item"'>
|
||||
<a href="{{ route('admin.account.index') }}">Accounts</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('admin.account.edit', $account) }}">{{ $account->identifier }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
<li class="breadcrumb-item active">
|
||||
Contacts
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Delete</li>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumb')
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('admin.account.index') }}">Accounts</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Edit</li>
|
||||
|
|
@ -19,6 +19,13 @@
|
|||
<input form="create_edit" class="btn" type="submit" value="Update">
|
||||
</header>
|
||||
<p title="{{ $account->updated_at }}">Updated on {{ $account->updated_at->format('d/m/Y') }}
|
||||
|
||||
@include('parts.tabs', [
|
||||
'items' => [
|
||||
route('admin.account.edit', $account->id, ['type' => 'messages']) => 'Information',
|
||||
route('admin.account.device.index', $account->id, ['type' => 'accounts']) => 'Devices',
|
||||
],
|
||||
])
|
||||
@else
|
||||
<header>
|
||||
<h1><i class="material-icons">people</i> Create an account</h1>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumb')
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('admin.account.index') }}">Accounts</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Delete</li>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumb')
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('admin.account.device.index', $account) }}">Devices</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Delete</li>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<h2>Device deletion</h2>
|
||||
|
||||
<div>
|
||||
<p>Are you sure you want to delete the following device?</p>
|
||||
<p>
|
||||
<b>User Agent:</b> {{ $device->user_agent }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<form method="POST" action="{{ route('admin.account.device.destroy', $account) }}" accept-charset="UTF-8">
|
||||
@method('delete')
|
||||
@csrf
|
||||
<input name="uuid" type="hidden" value="{{ $device->uuid }}">
|
||||
<div>
|
||||
<input class="btn" type="submit" value="Delete">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumb')
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('admin.account.index') }}">Accounts</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('admin.account.edit', $account) }}">{{ $account->identifier }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Devices</li>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
|
||||
<header>
|
||||
<h1><i class="material-icons">people</i> {{ $account->identifier }}</h1>
|
||||
<a href="{{ route('admin.account.edit', $account->id) }}" class="btn btn-secondary oppose">Cancel</a>
|
||||
</header>
|
||||
|
||||
@include('parts.tabs', [
|
||||
'items' => [
|
||||
route('admin.account.edit', $account->id, ['type' => 'messages']) => 'Information',
|
||||
route('admin.account.device.index', $account->id, ['type' => 'accounts']) => 'Devices',
|
||||
],
|
||||
])
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>User Agent</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if ($devices->isEmpty())
|
||||
<tr class="empty">
|
||||
<td colspan="3">No Devices</td>
|
||||
</tr>
|
||||
@endif
|
||||
@foreach ($devices as $device)
|
||||
<tr>
|
||||
<td>{{ $device->user_agent }}</td>
|
||||
<td>
|
||||
<a type="button"
|
||||
class="btn btn-danger"
|
||||
href="{{ route('admin.account.device.delete', [$account, $device->uuid]) }}">
|
||||
Delete
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@endsection
|
||||
|
|
@ -8,10 +8,10 @@
|
|||
|
||||
@section('content')
|
||||
<header>
|
||||
<h1><i class="material-icons">people</i> Account</h1>
|
||||
<h1><i class="material-icons">people</i> Accounts</h1>
|
||||
<a class="btn oppose" href="{{ route('admin.account.create') }}">
|
||||
<i class="material-icons">add_circle</i>
|
||||
Create
|
||||
New Account
|
||||
</a>
|
||||
</header>
|
||||
<div>
|
||||
|
|
@ -73,6 +73,11 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if ($accounts->isEmpty())
|
||||
<tr class="empty">
|
||||
<td colspan="4">No Contacts Lists</td>
|
||||
</tr>
|
||||
@endif
|
||||
@foreach ($accounts as $account)
|
||||
<tr>
|
||||
<td>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumb')
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('admin.account.index') }}">Accounts</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumb')
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('admin.account.index') }}">Accounts</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('admin.account.type.index') }}">Types</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
<li class="breadcrumb-item">
|
||||
{{ $type->key }}
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Delete</li>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumb')
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('admin.account.index') }}">Accounts</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumb')
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('admin.contacts_lists.index') }}">Contacts Lists</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('admin.contacts_lists.edit', $contacts_list->id) }}">{{ $contacts_list->title }}</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Add contacts</li>
|
||||
|
|
@ -35,8 +35,12 @@
|
|||
<input placeholder="Search by username: +1234, foo_bar…" name="search" type="text" value="{{ $params['search'] }}">
|
||||
<label for="search">Search</label>
|
||||
</div>
|
||||
<div class="oppose large">
|
||||
<p>
|
||||
<div>
|
||||
<a href="{{ route('admin.contacts_lists.contacts.add', $contacts_list->id) }}" type="reset" class="btn btn-secondary">Reset</a>
|
||||
<button type="submit" class="btn">Search</button>
|
||||
</div>
|
||||
<div class="oppose">
|
||||
<p style="display: inline-block; margin: 0 1rem;">
|
||||
<span class="list_toggle" data-list-id="a{{ $contacts_list->id }}"></span> selected
|
||||
</p>
|
||||
<a class="btn" onclick="Utils.clearStorageList('a{{ $contacts_list->id }}'); document.querySelector('form[name=contacts_lists_contacts_store]').submit()">
|
||||
|
|
@ -44,10 +48,6 @@
|
|||
Add
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="{{ route('admin.contacts_lists.contacts.add', $contacts_list->id) }}" type="reset" class="btn btn-secondary">Reset</a>
|
||||
<button type="submit" class="btn">Search</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumb')
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('admin.contacts_lists.index') }}">Contacts Lists</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Edit</li>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumb')
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('admin.contacts_lists.index') }}">Contacts Lists</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Delete</li>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<h1><i class="material-icons">account_box</i> Contacts Lists</h1>
|
||||
<a class="btn oppose" href="{{ route('admin.contacts_lists.create') }}">
|
||||
<i class="material-icons">add_circle</i>
|
||||
Create
|
||||
New Contacts List
|
||||
</a>
|
||||
</header>
|
||||
|
||||
|
|
@ -26,6 +26,11 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if ($contacts_lists->isEmpty())
|
||||
<tr class="empty">
|
||||
<td colspan="4">No Contacts Lists</td>
|
||||
</tr>
|
||||
@endif
|
||||
@foreach ($contacts_lists as $contacts_list)
|
||||
<tr>
|
||||
<td>
|
||||
|
|
|
|||
|
|
@ -1,17 +1,13 @@
|
|||
<div class="large checkbox">
|
||||
{!! Form::checkbox('terms', 'true', false, ['id' => 'terms']) !!}
|
||||
<label for="terms">I accept the Terms and Conditions: </a>
|
||||
Read the <a href="{{ config('app.terms_of_use_url') }}">Terms and Conditions</a>
|
||||
<label for="terms">
|
||||
I accept the
|
||||
<a href="{{ config('app.terms_of_use_url') }}">Terms and Conditions</a>
|
||||
@if (config('app.privacy_policy_url', null) != null)
|
||||
and <a href="{{ config('app.privacy_policy_url') }}">Privacy policy</a>
|
||||
@endif
|
||||
</label>
|
||||
@include('parts.errors', ['name' => 'terms'])
|
||||
</div>
|
||||
|
||||
<div class="large checkbox">
|
||||
{!! Form::checkbox('privacy', 'true', false, ['id' => 'privacy']) !!}
|
||||
<label for="privacy">I accept the Privacy policy: </a>
|
||||
Read the <a href="{{ config('app.privacy_policy_url') }}">Privacy policy</a>
|
||||
</label>
|
||||
@include('parts.errors', ['name' => 'privacy'])
|
||||
</div>
|
||||
|
||||
@include('parts.captcha')
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
use App\Http\Controllers\Account\AccountController;
|
||||
use App\Http\Controllers\Account\CreationRequestTokenController;
|
||||
use App\Http\Controllers\Account\DeviceController;
|
||||
use App\Http\Controllers\Account\EmailController;
|
||||
use App\Http\Controllers\Account\PasswordController;
|
||||
use App\Http\Controllers\Account\PhoneController;
|
||||
|
|
@ -28,6 +27,7 @@ use App\Http\Controllers\Account\RecoveryController;
|
|||
use App\Http\Controllers\Admin\AccountAccountTypeController;
|
||||
use App\Http\Controllers\Admin\AccountActionController;
|
||||
use App\Http\Controllers\Admin\AccountContactController;
|
||||
use App\Http\Controllers\Admin\AccountDeviceController;
|
||||
use App\Http\Controllers\Admin\AccountTypeController;
|
||||
use App\Http\Controllers\Admin\AccountController as AdminAccountController;
|
||||
use App\Http\Controllers\Admin\ContactsListController;
|
||||
|
|
@ -116,12 +116,6 @@ if (config('app.web_panel')) {
|
|||
Route::post('/', 'update')->name('account.password.update');
|
||||
});
|
||||
|
||||
Route::prefix('devices')->controller(DeviceController::class)->group(function () {
|
||||
Route::get('/', 'index')->name('account.device.index');
|
||||
Route::get('delete/{id}', 'delete')->name('account.device.delete');
|
||||
Route::delete('/', 'destroy')->name('account.device.destroy');
|
||||
});
|
||||
|
||||
Route::post('auth_tokens', 'Account\AuthTokenController@create')->name('account.auth_tokens.create');
|
||||
|
||||
Route::get('auth_tokens/auth/external/{token}', 'Account\AuthTokenController@authExternal')->name('auth_tokens.auth.external');
|
||||
|
|
@ -182,6 +176,12 @@ if (config('app.web_panel')) {
|
|||
Route::delete('/', 'destroy')->name('destroy');
|
||||
});
|
||||
|
||||
Route::name('device.')->prefix('{account}/devices')->controller(AccountDeviceController::class)->group(function () {
|
||||
Route::get('/', 'index')->name('index');
|
||||
Route::get('{device_id}/delete', 'delete')->name('delete');
|
||||
Route::delete('/', 'destroy')->name('destroy');
|
||||
});
|
||||
|
||||
Route::name('action.')->prefix('{account}/actions')->controller(AccountActionController::class)->group(function () {
|
||||
Route::get('create', 'create')->name('create');
|
||||
Route::post('/', 'store')->name('store');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue