Renamed and moved the controller and view files of the settings page
This commit is contained in:
parent
622a4e9390
commit
63da7afce2
11 changed files with 36 additions and 36 deletions
|
@ -12,13 +12,13 @@
|
|||
* ---------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Current user controller.
|
||||
* Account settings controller.
|
||||
*
|
||||
* Handles current user settings related operations.
|
||||
*
|
||||
* @package Controllers
|
||||
*/
|
||||
class Current_user extends EA_Controller {
|
||||
class Account_settings extends EA_Controller {
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
|
@ -57,9 +57,9 @@ class Current_user extends EA_Controller {
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
session(['dest_url' => site_url('services')]);
|
||||
session(['dest_url' => site_url('account_settings')]);
|
||||
|
||||
if (cannot('view', 'services'))
|
||||
if (cannot('view', PRIV_USER_SETTINGS))
|
||||
{
|
||||
show_error('Forbidden', 403);
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ class Current_user extends EA_Controller {
|
|||
|
||||
$role_slug = session('role_slug');
|
||||
|
||||
$this->load->view('pages/settings/current_user_page', [
|
||||
$this->load->view('pages/account_settings', [
|
||||
'page_title' => lang('settings'),
|
||||
'active_menu' => PRIV_SYSTEM_SETTINGS,
|
||||
'user_display_name' => $this->accounts->get_user_display_name($user_id),
|
||||
|
@ -85,7 +85,7 @@ class Current_user extends EA_Controller {
|
|||
{
|
||||
try
|
||||
{
|
||||
if ($this->permissions[PRIV_USER_SETTINGS]['edit'] == FALSE)
|
||||
if (cannot('edit', PRIV_USER_SETTINGS))
|
||||
{
|
||||
throw new Exception('You do not have the required permissions for this task.');
|
||||
}
|
|
@ -12,13 +12,13 @@
|
|||
* ---------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Client form controller.
|
||||
* Booking settings controller.
|
||||
*
|
||||
* Handles client form settings related operations.
|
||||
* Handles booking settings related operations.
|
||||
*
|
||||
* @package Controllers
|
||||
*/
|
||||
class Client_form extends EA_Controller {
|
||||
class Booking_settings extends EA_Controller {
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
|
@ -57,9 +57,9 @@ class Client_form extends EA_Controller {
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
session(['dest_url' => site_url('services')]);
|
||||
session(['dest_url' => site_url('booking_settings')]);
|
||||
|
||||
if (cannot('view', 'services'))
|
||||
if (cannot('view', PRIV_SYSTEM_SETTINGS))
|
||||
{
|
||||
show_error('Forbidden', 403);
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ class Client_form extends EA_Controller {
|
|||
|
||||
$role_slug = session('role_slug');
|
||||
|
||||
$this->load->view('pages/settings/client_form_page', [
|
||||
$this->load->view('pages/booking_settings', [
|
||||
'page_title' => lang('settings'),
|
||||
'active_menu' => PRIV_SYSTEM_SETTINGS,
|
||||
'user_display_name' => $this->accounts->get_user_display_name($user_id),
|
|
@ -18,7 +18,7 @@
|
|||
*
|
||||
* @package Controllers
|
||||
*/
|
||||
class Business_logic extends EA_Controller {
|
||||
class Business_settings extends EA_Controller {
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
|
@ -57,9 +57,9 @@ class Business_logic extends EA_Controller {
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
session(['dest_url' => site_url('services')]);
|
||||
session(['dest_url' => site_url('business_settings')]);
|
||||
|
||||
if (cannot('view', 'services'))
|
||||
if (cannot('view', PRIV_SYSTEM_SETTINGS))
|
||||
{
|
||||
show_error('Forbidden', 403);
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ class Business_logic extends EA_Controller {
|
|||
|
||||
$role_slug = session('role_slug');
|
||||
|
||||
$this->load->view('pages/settings/business_logic_page', [
|
||||
$this->load->view('pages/business_settings', [
|
||||
'page_title' => lang('settings'),
|
||||
'active_menu' => PRIV_SYSTEM_SETTINGS,
|
||||
'user_display_name' => $this->accounts->get_user_display_name($user_id),
|
|
@ -12,13 +12,13 @@
|
|||
* ---------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* General controller.
|
||||
* General settings controller.
|
||||
*
|
||||
* Handles general settings related operations.
|
||||
*
|
||||
* @package Controllers
|
||||
*/
|
||||
class General extends EA_Controller {
|
||||
class General_settings extends EA_Controller {
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
|
@ -57,9 +57,9 @@ class General extends EA_Controller {
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
session(['dest_url' => site_url('services')]);
|
||||
session(['dest_url' => site_url('general_settings')]);
|
||||
|
||||
if (cannot('view', 'services'))
|
||||
if (cannot('view', PRIV_SYSTEM_SETTINGS))
|
||||
{
|
||||
show_error('Forbidden', 403);
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ class General extends EA_Controller {
|
|||
|
||||
$role_slug = session('role_slug');
|
||||
|
||||
$this->load->view('pages/settings/general_page', [
|
||||
$this->load->view('pages/general_settings', [
|
||||
'page_title' => lang('settings'),
|
||||
'active_menu' => PRIV_SYSTEM_SETTINGS,
|
||||
'user_display_name' => $this->accounts->get_user_display_name($user_id),
|
|
@ -18,7 +18,7 @@
|
|||
*
|
||||
* @package Controllers
|
||||
*/
|
||||
class Legal_contents extends EA_Controller {
|
||||
class Legal_settings extends EA_Controller {
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
|
@ -57,9 +57,9 @@ class Legal_contents extends EA_Controller {
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
session(['dest_url' => site_url('services')]);
|
||||
session(['dest_url' => site_url('legal_settings')]);
|
||||
|
||||
if (cannot('view', 'services'))
|
||||
if (cannot('view', PRIV_SYSTEM_SETTINGS))
|
||||
{
|
||||
show_error('Forbidden', 403);
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ class Legal_contents extends EA_Controller {
|
|||
|
||||
$role_slug = session('role_slug');
|
||||
|
||||
$this->load->view('pages/settings/legal_contents_page', [
|
||||
$this->load->view('pages/legal_settings', [
|
||||
'page_title' => lang('settings'),
|
||||
'active_menu' => PRIV_SYSTEM_SETTINGS,
|
||||
'user_display_name' => $this->accounts->get_user_display_name($user_id),
|
|
@ -88,27 +88,27 @@
|
|||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<?php if (can('view', PRIV_SYSTEM_SETTINGS)): ?>
|
||||
<a class="dropdown-item" href="<?= site_url('settings/general') ?>">
|
||||
<a class="dropdown-item" href="<?= site_url('general_settings') ?>">
|
||||
<?= lang('general') ?>
|
||||
</a>
|
||||
<a class="dropdown-item" href="<?= site_url('settings/business_logic') ?>">
|
||||
<a class="dropdown-item" href="<?= site_url('business_settings') ?>">
|
||||
<?= lang('business_logic') ?>
|
||||
</a>
|
||||
<a class="dropdown-item" href="<?= site_url('settings/client_form') ?>">
|
||||
<a class="dropdown-item" href="<?= site_url('booking_settings') ?>">
|
||||
<?= lang('client_form') ?>
|
||||
</a>
|
||||
<a class="dropdown-item" href="<?= site_url('settings/legal_contents') ?>">
|
||||
<a class="dropdown-item" href="<?= site_url('legal_settings') ?>">
|
||||
<?= lang('legal_contents') ?>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
<a class="dropdown-item" href="<?= site_url('settings/current_user') ?>">
|
||||
<a class="dropdown-item" href="<?= site_url('account_settings') ?>">
|
||||
<?= lang('current_user') ?>
|
||||
</a>
|
||||
<a class="dropdown-item" href="<?= site_url('settings/about') ?>">
|
||||
<a class="dropdown-item" href="<?= site_url('about') ?>">
|
||||
<?= lang('about') ?>
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="<?= site_url('user/logout') ?>">
|
||||
<a class="dropdown-item" href="<?= site_url('logout') ?>">
|
||||
<?= lang('log_out') ?>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<form>
|
||||
<fieldset>
|
||||
<legend class="border-bottom mb-4">
|
||||
<?= lang('client_form') ?>
|
||||
<?= lang('Bookingsettings') ?>
|
||||
|
||||
<?php if ($privileges[PRIV_SYSTEM_SETTINGS]['edit'] == TRUE): ?>
|
||||
<button type="button" class="save-settings btn btn-primary btn-sm mb-2"
|
|
@ -46,7 +46,7 @@
|
|||
<form>
|
||||
<fieldset>
|
||||
<legend class="border-bottom mb-4">
|
||||
<?= lang('business_logic') ?>
|
||||
<?= lang('Business_settings') ?>
|
||||
<?php if ($privileges[PRIV_SYSTEM_SETTINGS]['edit'] == TRUE): ?>
|
||||
<button type="button" class="save-settings btn btn-primary btn-sm mb-2"
|
||||
data-tippy-content="<?= lang('save') ?>">
|
|
@ -42,7 +42,7 @@
|
|||
<form>
|
||||
<fieldset>
|
||||
<legend class="border-bottom mb-4">
|
||||
<?= lang('general_settings') ?>
|
||||
<?= lang('General_settings') ?>
|
||||
<?php if ($privileges[PRIV_SYSTEM_SETTINGS]['edit'] == TRUE): ?>
|
||||
<button type="button" class="save-settings btn btn-primary btn-sm mb-2"
|
||||
data-tippy-content="<?= lang('save') ?>">
|
|
@ -40,7 +40,7 @@
|
|||
<form>
|
||||
<fieldset>
|
||||
<legend class="border-bottom mb-4">
|
||||
<?= lang('legal_contents') ?>
|
||||
<?= lang('Legal_settings') ?>
|
||||
<?php if ($privileges[PRIV_SYSTEM_SETTINGS]['edit'] == TRUE): ?>
|
||||
<button type="button" class="save-settings btn btn-primary btn-sm mb-2"
|
||||
data-tippy-content="<?= lang('save') ?>">
|
Loading…
Reference in a new issue