mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-28 10:53:40 +03:00
Ported the current about content to a new standalone page
This commit is contained in:
parent
a622f2f295
commit
83bfd87d5d
2 changed files with 157 additions and 0 deletions
78
application/controllers/settings/About.php
Normal file
78
application/controllers/settings/About.php
Normal file
|
@ -0,0 +1,78 @@
|
|||
<?php defined('BASEPATH') or exit('No direct script access allowed');
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Easy!Appointments - Open Source Web Scheduler
|
||||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @copyright Copyright (c) 2013 - 2020, Alex Tselegidis
|
||||
* @license https://opensource.org/licenses/GPL-3.0 - GPLv3
|
||||
* @link https://easyappointments.org
|
||||
* @since v1.5.0
|
||||
* ---------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* About controller.
|
||||
*
|
||||
* Handles about settings related operations.
|
||||
*
|
||||
* @package Controllers
|
||||
*/
|
||||
class About extends EA_Controller {
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $permissions;
|
||||
|
||||
/**
|
||||
* 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');
|
||||
|
||||
$role_slug = session('role_slug');
|
||||
|
||||
if ($role_slug)
|
||||
{
|
||||
$this->permissions = $this->roles_model->get_permissions_by_slug($role_slug);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the settings page.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
session(['dest_url' => site_url('services')]);
|
||||
|
||||
if (cannot('view', 'services'))
|
||||
{
|
||||
show_error('Forbidden', 403);
|
||||
}
|
||||
|
||||
$user_id = session('user_id');
|
||||
|
||||
$role_slug = session('role_slug');
|
||||
|
||||
$this->load->view('pages/settings/about/about_page', [
|
||||
'page_title' => lang('settings'),
|
||||
'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),
|
||||
]);
|
||||
}
|
||||
}
|
79
application/views/pages/settings/about/about_page.php
Executable file
79
application/views/pages/settings/about/about_page.php
Executable file
|
@ -0,0 +1,79 @@
|
|||
<?php
|
||||
/**
|
||||
* @var array $privileges
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php extend('layouts/backend/backend_layout') ?>
|
||||
|
||||
<?php section('content') ?>
|
||||
|
||||
<script>
|
||||
var GlobalVariables = {
|
||||
csrfToken: <?= json_encode($this->security->get_csrf_hash()) ?>,
|
||||
baseUrl: <?= json_encode(config('base_url')) ?>,
|
||||
dateFormat: <?= json_encode(setting('date_format')) ?>,
|
||||
timeFormat: <?= json_encode(setting('time_format')) ?>,
|
||||
user: {
|
||||
id: <?= session('user_id') ?>,
|
||||
email: <?= json_encode(session('user_email')) ?>,
|
||||
timezone: <?= json_encode(session('timezone')) ?>,
|
||||
role_slug: <?= json_encode(session('role_slug')) ?>,
|
||||
privileges: <?= json_encode($privileges) ?>
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<div id="about-page" class="container-fluid backend-page">
|
||||
<div id="about">
|
||||
<h3>Easy!Appointments</h3>
|
||||
|
||||
<p>
|
||||
<?= lang('about_app_info') ?>
|
||||
</p>
|
||||
|
||||
<div class="current-version card card-body bg-light border-light mb-3">
|
||||
<?= lang('current_version') ?>
|
||||
<?= config('version') ?>
|
||||
<?php if (config('release_label')): ?>
|
||||
- <?= config('release_label') ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
<h3><?= lang('support') ?></h3>
|
||||
<p>
|
||||
<?= lang('about_app_support') ?>
|
||||
|
||||
<br><br>
|
||||
|
||||
<a href="https://easyappointments.org">
|
||||
<?= lang('official_website') ?>
|
||||
</a>
|
||||
|
|
||||
<a href="https://groups.google.com/forum/#!forum/easy-appointments">
|
||||
<?= lang('support_group') ?>
|
||||
</a>
|
||||
|
|
||||
<a href="https://github.com/alextselegidis/easyappointments/issues">
|
||||
<?= lang('project_issues') ?>
|
||||
</a>
|
||||
|
|
||||
<a href="https://facebook.com/easyappts">
|
||||
Facebook
|
||||
</a>
|
||||
|
|
||||
<a href="https://twitter.com/easyappts">
|
||||
Twitter
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<h3><?= lang('license') ?></h3>
|
||||
|
||||
<p>
|
||||
<?= lang('about_app_license') ?>
|
||||
<a href="http://www.gnu.org/copyleft/gpl.html">http://www.gnu.org/copyleft/gpl.html</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php section('content') ?>
|
Loading…
Reference in a new issue