mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 10:08:05 +00:00
Fix #126 Move all the intercome related features under a toggle
This commit is contained in:
parent
ab6aa88b3c
commit
c477973d84
14 changed files with 124 additions and 114 deletions
|
|
@ -41,7 +41,8 @@ WEB_PANEL=true # Fully enable/disable the web panels
|
|||
NEWSLETTER_REGISTRATION_ADDRESS= # Address to contact when a user wants to register to the newsletter
|
||||
PUBLIC_REGISTRATION=true # Toggle to enable/disable the public registration forms
|
||||
PHONE_AUTHENTICATION=true # Toggle to enable/disable the SMS support, requires public registration
|
||||
DEVICES_MANAGEMENT=false # Toggle to enable/disable the devices management support
|
||||
DEVICES_MANAGEMENT=false # Toggle to enable/disable the devices management supporttrue
|
||||
INTERCOM_FEATURES=false # Toggle to enable/disable the intercom related features
|
||||
|
||||
TERMS_OF_USE_URL= # A URL pointing to the Terms of Use
|
||||
PRIVACY_POLICY_URL= # A URL pointing to the Privacy Policy
|
||||
|
|
|
|||
|
|
@ -51,8 +51,6 @@ class AccountTypeController extends Controller
|
|||
$accountType->key = $request->get('key');
|
||||
$accountType->save();
|
||||
|
||||
$request->session()->flash('success', 'Type successfully created');
|
||||
|
||||
return redirect()->route('admin.account.type.index');
|
||||
}
|
||||
|
||||
|
|
@ -78,8 +76,6 @@ class AccountTypeController extends Controller
|
|||
$accountType->key = $request->get('key');
|
||||
$accountType->save();
|
||||
|
||||
$request->session()->flash('success', 'Type successfully updated');
|
||||
|
||||
return redirect()->route('admin.account.type.index');
|
||||
}
|
||||
|
||||
|
|
@ -95,8 +91,6 @@ class AccountTypeController extends Controller
|
|||
$type = AccountType::findOrFail($typeId);
|
||||
$type->delete();
|
||||
|
||||
$request->session()->flash('success', 'Type successfully destroyed');
|
||||
|
||||
Log::channel('events')->info('Web Admin: Account type deleted', ['type' => $type->key]);
|
||||
|
||||
return redirect()->route('admin.account.type.index');
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ return [
|
|||
'newsletter_registration_address' => env('NEWSLETTER_REGISTRATION_ADDRESS', ''),
|
||||
'phone_authentication' => env('PHONE_AUTHENTICATION', true),
|
||||
'public_registration' => env('PUBLIC_REGISTRATION', true),
|
||||
'intercom_features' => env('INTERCOM_FEATURES', false),
|
||||
'devices_management' => env('DEVICES_MANAGEMENT', false),
|
||||
'web_panel' => env('WEB_PANEL', true),
|
||||
|
||||
|
|
|
|||
4
flexiapi/public/css/style.css
vendored
4
flexiapi/public/css/style.css
vendored
|
|
@ -113,6 +113,10 @@ pre {
|
|||
color: var(--second-7);
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
pre {
|
||||
overflow: auto;
|
||||
background-color: var(--second-8);
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
@extends('layouts.main', ['grid' => true])
|
||||
|
||||
@section('breadcrumb')
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
API Key
|
||||
</li>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<header>
|
||||
<h1><i class="material-icons-outlined">dashboard</i> Dashboard</h1>
|
||||
</header>
|
||||
|
||||
<div class="large">
|
||||
<h2><i class="material-icons-outlined">key</i>API Key</h2>
|
||||
|
|
|
|||
|
|
@ -102,6 +102,10 @@ The deletion of an account is definitive, all the database related data (passwor
|
|||
|
||||
### Create, edit and delete account types
|
||||
|
||||
@if (config('app.intercom_features') == false)
|
||||
*The feature is not enabled on this instance.*
|
||||
@endif
|
||||
|
||||
An adminisator can create, edit and delete account types. Those can be used to categorize accounts in clients, they are often used for Internet of Things related devices.
|
||||
|
||||
## Statistics
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
@endif
|
||||
|
||||
<form method="POST"
|
||||
action="{{ $action->id ? route('admin.account.acton.update', [$action->account->id, $action->id]) : route('admin.account.action.store') }}"
|
||||
action="{{ $action->id ? route('admin.account.acton.update', [$action->account->id, $action->id]) : route('admin.account.action.store', $account->id) }}"
|
||||
accept-charset="UTF-8">
|
||||
@method($action->id ? 'put' : 'post')
|
||||
@csrf
|
||||
|
|
|
|||
|
|
@ -203,6 +203,7 @@
|
|||
</p>
|
||||
@endif
|
||||
|
||||
@if(config('app.intercom_features'))
|
||||
<h2>Actions</h2>
|
||||
|
||||
@if ($account->dtmf_protocol)
|
||||
|
|
@ -251,5 +252,6 @@
|
|||
|
||||
<a class="btn" href="{{ route('admin.account.account_type.create', $account) }}">Add</a>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -13,6 +13,12 @@
|
|||
<i class="material-icons-outlined">publish</i>
|
||||
Import Accounts
|
||||
</a>
|
||||
@if(config('app.intercom_features'))
|
||||
<a class="btn btn-secondary" href="{{ route('admin.account.type.index') }}">
|
||||
<i class="material-icons-outlined">category</i>
|
||||
Types
|
||||
</a>
|
||||
@endif
|
||||
<a class="btn" href="{{ route('admin.account.create') }}">
|
||||
<i class="material-icons-outlined">add_circle</i>
|
||||
New Account
|
||||
|
|
|
|||
|
|
@ -4,9 +4,12 @@
|
|||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('admin.account.index') }}">Accounts</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('admin.account.type.index') }}">Types</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
@if ($type->id)Edit @else Create @endif
|
||||
</li>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
|
|
|
|||
|
|
@ -1,24 +1,24 @@
|
|||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumb')
|
||||
<li class="breadcrumb-item">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('admin.account.index') }}">Accounts</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
</li>
|
||||
<li class="breadcrumb-item" aria-current="page">
|
||||
<a href="{{ route('admin.account.type.index') }}">Types</a>
|
||||
</li>
|
||||
</li>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<header>
|
||||
<h1><i class="material-icons-outlined">category</i> Types</h1>
|
||||
<a class="btn oppose" href="{{ route('admin.account.type.create') }}">
|
||||
<i class="material-icons-outlined">add</i>
|
||||
New Type
|
||||
</a>
|
||||
</header>
|
||||
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm">
|
||||
<a class="btn btn-success float-right" href="{{ route('admin.account.type.create') }}">Create</a>
|
||||
<h2>Types</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Key</th>
|
||||
|
|
@ -33,12 +33,10 @@
|
|||
</td>
|
||||
<td>
|
||||
<a class="btn" href="{{ route('admin.account.type.edit', [$type->id]) }}">Edit</a>
|
||||
<a class="btn" href="{{ route('admin.account.type.delete', [$type->id]) }}">Delete</a>
|
||||
<a class="btn btn-secondary" href="{{ route('admin.account.type.delete', [$type->id]) }}">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</table>
|
||||
@endsection
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
@hasSection('breadcrumb')
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{{ route('account.dashboard') }}">Home</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('account.dashboard') }}">Dashboard</a></li>
|
||||
@yield('breadcrumb')
|
||||
</ol>
|
||||
</nav>
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
@hasSection('breadcrumb')
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{{ route('account.dashboard') }}">Home</a></li>
|
||||
@yield('breadcrumb')
|
||||
</ol>
|
||||
</nav>
|
||||
@endif
|
||||
|
|
@ -166,6 +166,7 @@ if (config('app.web_panel')) {
|
|||
Route::post('handle', 'handle')->name('handle');
|
||||
});
|
||||
|
||||
if (config('app.intercom_features')) {
|
||||
Route::name('type.')->prefix('types')->controller(AccountTypeController::class)->group(function () {
|
||||
Route::get('/', 'index')->name('index');
|
||||
Route::get('create', 'create')->name('create');
|
||||
|
|
@ -182,6 +183,16 @@ if (config('app.web_panel')) {
|
|||
Route::delete('{type_id}', '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');
|
||||
Route::get('{action_id}/edit', 'edit')->name('edit');
|
||||
Route::put('{action_id}', 'update')->name('update');
|
||||
Route::get('{action_id}/delete', 'delete')->name('delete');
|
||||
Route::delete('{action_id}', 'destroy')->name('destroy');
|
||||
});
|
||||
}
|
||||
|
||||
Route::name('contact.')->prefix('{account}/contacts')->controller(AccountContactController::class)->group(function () {
|
||||
Route::get('create', 'create')->name('create');
|
||||
Route::post('/', 'store')->name('store');
|
||||
|
|
@ -199,15 +210,6 @@ if (config('app.web_panel')) {
|
|||
Route::get('/', 'show')->name('show');
|
||||
Route::post('/', 'edit')->name('edit');
|
||||
});
|
||||
|
||||
Route::name('action.')->prefix('{account}/actions')->controller(AccountActionController::class)->group(function () {
|
||||
Route::get('create', 'create')->name('create');
|
||||
Route::post('/', 'store')->name('store');
|
||||
Route::get('{action_id}/edit', 'edit')->name('edit');
|
||||
Route::put('{action_id}', 'update')->name('update');
|
||||
Route::get('{action_id}/delete', 'delete')->name('delete');
|
||||
Route::delete('{action_id}', 'destroy')->name('destroy');
|
||||
});
|
||||
});
|
||||
|
||||
Route::name('contacts_lists.')->prefix('contacts_lists')->controller(ContactsListController::class)->group(function () {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue