mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-29 01:52:24 +03:00
Create new "Integrations" page for managing 3rd party integrations
This commit is contained in:
parent
95450932a7
commit
1aac411c7f
4 changed files with 203 additions and 0 deletions
75
application/controllers/Integrations.php
Normal file
75
application/controllers/Integrations.php
Normal file
|
@ -0,0 +1,75 @@
|
|||
<?php defined('BASEPATH') or exit('No direct script access allowed');
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Easy!Appointments - Online Appointment Scheduler
|
||||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) Alex Tselegidis
|
||||
* @license https://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link https://easyappointments.org
|
||||
* @since v1.5.0
|
||||
* ---------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Integrations controller.
|
||||
*
|
||||
* Displays the integrations page.
|
||||
*
|
||||
* @package Controllers
|
||||
*/
|
||||
class Integrations extends EA_Controller {
|
||||
/**
|
||||
* Calendar constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->load->model('appointments_model');
|
||||
$this->load->model('customers_model');
|
||||
$this->load->model('services_model');
|
||||
$this->load->model('providers_model');
|
||||
$this->load->model('roles_model');
|
||||
$this->load->model('settings_model');
|
||||
|
||||
$this->load->library('accounts');
|
||||
$this->load->library('google_sync');
|
||||
$this->load->library('notifications');
|
||||
$this->load->library('synchronization');
|
||||
$this->load->library('timezones');
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the settings page.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
session(['dest_url' => site_url('about')]);
|
||||
|
||||
$user_id = session('user_id');
|
||||
|
||||
if (cannot('view', PRIV_SYSTEM_SETTINGS))
|
||||
{
|
||||
if ($user_id)
|
||||
{
|
||||
abort(403, 'Forbidden');
|
||||
}
|
||||
|
||||
redirect('login');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$role_slug = session('role_slug');
|
||||
|
||||
html_vars([
|
||||
'page_title' => lang('integrations'),
|
||||
'active_menu' => PRIV_SYSTEM_SETTINGS,
|
||||
'user_display_name' => $this->accounts->get_user_display_name($user_id),
|
||||
'privileges' => $this->roles_model->get_permissions_by_slug($role_slug),
|
||||
]);
|
||||
|
||||
$this->load->view('pages/integrations');
|
||||
}
|
||||
}
|
|
@ -102,6 +102,9 @@
|
|||
<a class="dropdown-item" href="<?= site_url('legal_settings') ?>">
|
||||
<?= lang('legal') ?>
|
||||
</a>
|
||||
<a class="dropdown-item" href="<?= site_url('integrations') ?>">
|
||||
<?= lang('integrations') ?>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
<a class="dropdown-item" href="<?= site_url('account') ?>">
|
||||
<?= lang('account') ?>
|
||||
|
|
118
application/views/pages/integrations.php
Executable file
118
application/views/pages/integrations.php
Executable file
|
@ -0,0 +1,118 @@
|
|||
<?php extend('layouts/backend_layout') ?>
|
||||
|
||||
<?php section('content') ?>
|
||||
|
||||
<div id="integrations-page" class="container backend-page">
|
||||
<div id="integrations" class="col-lg-8 offset-lg-2">
|
||||
|
||||
<h3 class="text-muted border-bottom py-2">
|
||||
<?= lang('integrations') ?>
|
||||
</h3>
|
||||
|
||||
<p class="mb-5">
|
||||
<?= lang('integrations_info') ?>
|
||||
</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="card mb-5">
|
||||
<div class="card-header">
|
||||
<strong>
|
||||
<?= lang('webhooks') ?>
|
||||
</strong>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="mb-3 integration-info">
|
||||
<small>
|
||||
<?= lang('webhooks_info') ?>
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<a href="<?= site_url('webhooks') ?>" class="btn btn-outline-primary">
|
||||
<i class="fas fa-cogs me-2"></i>
|
||||
<?= lang('configure') ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="card mb-5">
|
||||
<div class="card-header">
|
||||
<strong>
|
||||
<?= lang('google_analytics') ?>
|
||||
</strong>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="mb-3 integration-info">
|
||||
<small>
|
||||
<?= lang('google_analytics_info') ?>
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<a href="<?= site_url('google_analytics_settings') ?>" class="btn btn-outline-primary">
|
||||
<i class="fas fa-cogs me-2"></i>
|
||||
<?= lang('configure') ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="card mb-5">
|
||||
<div class="card-header">
|
||||
<strong>
|
||||
<?= lang('matomo_analytics') ?>
|
||||
</strong>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="mb-3 integration-info">
|
||||
<small>
|
||||
<?= lang('matomo_analytics_info') ?>
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<a href="<?= site_url('matomo_analytics_settings') ?>" class="btn btn-outline-primary">
|
||||
<i class="fas fa-cogs me-2"></i>
|
||||
<?= lang('configure') ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="card mb-5">
|
||||
<div class="card-header">
|
||||
<strong>
|
||||
<?= lang('api') ?>
|
||||
</strong>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="mb-3 integration-info">
|
||||
<small>
|
||||
<?= lang('api_info') ?>
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<a href="<?= site_url('api_settings') ?>" class="btn btn-outline-primary">
|
||||
<i class="fas fa-cogs me-2"></i>
|
||||
<?= lang('configure') ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php section('content') ?>
|
||||
|
||||
|
||||
<?php section('styles') ?>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/pages/integrations.css') ?>">
|
||||
|
||||
<?php section('styles') ?>
|
||||
|
||||
|
7
assets/css/pages/integrations.scss
Normal file
7
assets/css/pages/integrations.scss
Normal file
|
@ -0,0 +1,7 @@
|
|||
#integrations-page {
|
||||
.card-body {
|
||||
.integration-info {
|
||||
min-height: 150px;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue