From 308be859aea3b1babd387fccadbfb315500c9d70 Mon Sep 17 00:00:00 2001 From: sujitprasad Date: Tue, 29 Dec 2015 11:05:21 +0530 Subject: [PATCH] update v1.0.3.5 --- DB/demodatabase.sql | 183 +++++---- app/Events/ClientTicketFormPost.php | 2 +- app/Exceptions/Handler.php | 29 +- .../Admin/helpdesk/SettingsController.php | 14 + .../Agent/helpdesk/MailController.php | 7 +- app/Http/Controllers/Auth/UserController.php | 388 ++++++++++++++++++ .../Controllers/Common/SettingsController.php | 6 +- app/Http/routes.php | 6 +- app/Model/helpdesk/Settings/Plugin.php | 10 + config/app.php | 38 +- config/chumper.datatable.php | 146 +++++++ ...2015_12_14_072307_create_plugins_table.php | 35 ++ resources/lang/en/lang.php | 7 + .../admin/helpdesk/emails/smtp.blade.php | 10 +- .../admin/helpdesk/settings/alert.blade.php | 19 + .../admin/helpdesk/settings/plugins.blade.php | 4 +- .../client/kb/article-list/profile.blade.php | 4 +- .../chumper.datatable/javascript.blade.php | 8 + .../chumper.datatable/template.blade.php | 27 ++ 19 files changed, 828 insertions(+), 115 deletions(-) create mode 100644 app/Http/Controllers/Auth/UserController.php create mode 100644 app/Model/helpdesk/Settings/Plugin.php create mode 100644 config/chumper.datatable.php create mode 100644 database/migrations/2015_12_14_072307_create_plugins_table.php create mode 100644 resources/views/vendor/chumper.datatable/javascript.blade.php create mode 100644 resources/views/vendor/chumper.datatable/template.blade.php diff --git a/DB/demodatabase.sql b/DB/demodatabase.sql index 4afe60ad8..2918a5569 100644 --- a/DB/demodatabase.sql +++ b/DB/demodatabase.sql @@ -3,7 +3,7 @@ -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 --- Generation Time: Dec 14, 2015 at 03:00 PM +-- Generation Time: Dec 29, 2015 at 11:02 AM -- Server version: 5.6.17 -- PHP Version: 5.5.12 @@ -47,7 +47,7 @@ CREATE TABLE IF NOT EXISTS `access` ( -- INSERT INTO `access` (`id`, `password_expire`, `reg_method`, `user_session`, `agent_session`, `reset_ticket_expire`, `password_reset`, `bind_agent_ip`, `reg_require`, `quick_access`, `created_at`, `updated_at`) VALUES -(1, '', '', '', '', '', 0, 0, 0, 0, '2015-12-14 02:27:48', '2015-12-14 02:27:48'); +(1, '', '', '', '', '', 0, 0, 0, 0, '2015-12-28 22:43:03', '2015-12-28 22:43:03'); -- -------------------------------------------------------- @@ -96,7 +96,7 @@ CREATE TABLE IF NOT EXISTS `alert_notice` ( -- INSERT INTO `alert_notice` (`id`, `ticket_status`, `ticket_admin_email`, `ticket_department_manager`, `ticket_department_member`, `ticket_organization_accmanager`, `message_status`, `message_last_responder`, `message_assigned_agent`, `message_department_manager`, `message_organization_accmanager`, `internal_status`, `internal_last_responder`, `internal_assigned_agent`, `internal_department_manager`, `assignment_status`, `assignment_assigned_agent`, `assignment_team_leader`, `assignment_team_member`, `transfer_status`, `transfer_assigned_agent`, `transfer_department_manager`, `transfer_department_member`, `overdue_status`, `overdue_assigned_agent`, `overdue_department_manager`, `overdue_department_member`, `system_error`, `sql_error`, `excessive_failure`, `created_at`, `updated_at`) VALUES -(1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '2015-12-14 02:27:48', '2015-12-14 03:52:53'); +(1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '2015-12-28 22:43:03', '2015-12-28 23:11:22'); -- -------------------------------------------------------- @@ -129,8 +129,8 @@ CREATE TABLE IF NOT EXISTS `article_relationship` ( `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`), - KEY `article_relationship_article_id_foreign` (`article_id`), - KEY `article_relationship_category_id_foreign` (`category_id`) + KEY `article_relationship_category_id_foreign` (`category_id`), + KEY `article_relationship_article_id_foreign` (`article_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -156,7 +156,7 @@ CREATE TABLE IF NOT EXISTS `auto_response` ( -- INSERT INTO `auto_response` (`id`, `new_ticket`, `agent_new_ticket`, `submitter`, `participants`, `overlimit`, `created_at`, `updated_at`) VALUES -(1, 1, 1, 0, 0, 0, '2015-12-14 02:27:48', '2015-12-14 03:52:43'); +(1, 1, 1, 0, 0, 0, '2015-12-28 22:43:03', '2015-12-28 23:11:04'); -- -------------------------------------------------------- @@ -255,7 +255,7 @@ CREATE TABLE IF NOT EXISTS `company` ( -- INSERT INTO `company` (`id`, `company_name`, `website`, `phone`, `address`, `landing_page`, `offline_page`, `thank_page`, `logo`, `use_logo`, `created_at`, `updated_at`) VALUES -(1, '', '', '', '', '', '', '', '', '', '2015-12-14 02:27:48', '2015-12-14 02:27:48'); +(1, 'DEMO COMPANY', 'https://www.demo.com', '', '', '', '', '', '', '0', '2015-12-28 22:43:03', '2015-12-28 23:10:04'); -- -------------------------------------------------------- @@ -360,9 +360,9 @@ CREATE TABLE IF NOT EXISTS `department` ( -- INSERT INTO `department` (`id`, `name`, `type`, `sla`, `manager`, `ticket_assignment`, `outgoing_email`, `template_set`, `auto_ticket_response`, `auto_message_response`, `auto_response_email`, `recipient`, `group_access`, `department_sign`, `created_at`, `updated_at`) VALUES -(1, 'Support', '', '', '', '', '', '', '', '', '', '', '', '', '2015-12-14 02:27:48', '2015-12-14 02:27:48'), -(2, 'Sales', '', '', '', '', '', '', '', '', '', '', '', '', '2015-12-14 02:27:48', '2015-12-14 02:27:48'), -(3, 'Operation', '', '', '', '', '', '', '', '', '', '', '', '', '2015-12-14 02:27:48', '2015-12-14 02:27:48'); +(1, 'Support', '', '', '', '', '', '', '', '', '', '', '', '', '2015-12-28 22:43:02', '2015-12-28 22:43:02'), +(2, 'Sales', '', '', '', '', '', '', '', '', '', '', '', '', '2015-12-28 22:43:02', '2015-12-28 22:43:02'), +(3, 'Operation', '', '', '', '', '', '', '', '', '', '', '', '', '2015-12-28 22:43:02', '2015-12-28 22:43:02'); -- -------------------------------------------------------- @@ -378,6 +378,7 @@ CREATE TABLE IF NOT EXISTS `email` ( `admin_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `mta` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `email_fetching` tinyint(1) NOT NULL, + `notification_cron` tinyint(1) NOT NULL, `strip` tinyint(1) NOT NULL, `separator` tinyint(1) NOT NULL, `all_emails` tinyint(1) NOT NULL, @@ -392,8 +393,8 @@ CREATE TABLE IF NOT EXISTS `email` ( -- Dumping data for table `email` -- -INSERT INTO `email` (`id`, `template`, `sys_email`, `alert_email`, `admin_email`, `mta`, `email_fetching`, `strip`, `separator`, `all_emails`, `email_collaborator`, `attachment`, `created_at`, `updated_at`) VALUES -(1, '', '', '', '', '', 1, 0, 0, 1, 1, 1, '2015-12-14 02:27:48', '2015-12-14 03:52:20'); +INSERT INTO `email` (`id`, `template`, `sys_email`, `alert_email`, `admin_email`, `mta`, `email_fetching`, `notification_cron`, `strip`, `separator`, `all_emails`, `email_collaborator`, `attachment`, `created_at`, `updated_at`) VALUES +(1, '', '', '', '', '', 1, 1, 0, 0, 1, 1, 1, '2015-12-28 22:43:03', '2015-12-28 23:10:52'); -- -------------------------------------------------------- @@ -429,7 +430,7 @@ CREATE TABLE IF NOT EXISTS `emails` ( `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; -- -------------------------------------------------------- @@ -483,7 +484,7 @@ CREATE TABLE IF NOT EXISTS `footer` ( -- INSERT INTO `footer` (`id`, `title`, `footer`, `created_at`, `updated_at`) VALUES -(1, '', '', '2015-12-14 02:27:48', '2015-12-14 02:27:48'); +(1, '', '', '2015-12-28 22:43:03', '2015-12-28 22:43:03'); -- -------------------------------------------------------- @@ -505,7 +506,7 @@ CREATE TABLE IF NOT EXISTS `footer2` ( -- INSERT INTO `footer2` (`id`, `title`, `footer`, `created_at`, `updated_at`) VALUES -(1, '', '', '2015-12-14 02:27:48', '2015-12-14 02:27:48'); +(1, '', '', '2015-12-28 22:43:04', '2015-12-28 22:43:04'); -- -------------------------------------------------------- @@ -527,7 +528,7 @@ CREATE TABLE IF NOT EXISTS `footer3` ( -- INSERT INTO `footer3` (`id`, `title`, `footer`, `created_at`, `updated_at`) VALUES -(1, '', '', '2015-12-14 02:27:48', '2015-12-14 02:27:48'); +(1, '', '', '2015-12-28 22:43:04', '2015-12-28 22:43:04'); -- -------------------------------------------------------- @@ -549,7 +550,7 @@ CREATE TABLE IF NOT EXISTS `footer4` ( -- INSERT INTO `footer4` (`id`, `title`, `footer`, `created_at`, `updated_at`) VALUES -(1, '', '', '2015-12-14 02:27:48', '2015-12-14 02:27:48'); +(1, '', '', '2015-12-28 22:43:04', '2015-12-28 22:43:04'); -- -------------------------------------------------------- @@ -665,9 +666,9 @@ CREATE TABLE IF NOT EXISTS `groups` ( -- INSERT INTO `groups` (`id`, `name`, `group_status`, `can_create_ticket`, `can_edit_ticket`, `can_post_ticket`, `can_close_ticket`, `can_assign_ticket`, `can_trasfer_ticket`, `can_delete_ticket`, `can_ban_email`, `can_manage_canned`, `can_manage_faq`, `can_view_agent_stats`, `department_access`, `admin_notes`, `created_at`, `updated_at`) VALUES -(1, 'Group A', 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, '', '2015-12-14 02:27:48', '2015-12-14 02:27:48'), -(2, 'Group B', 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, '', '2015-12-14 02:27:48', '2015-12-14 02:27:48'), -(3, 'Group C', 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, '', '2015-12-14 02:27:48', '2015-12-14 02:27:48'); +(1, 'Group A', 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, '', '2015-12-28 22:43:02', '2015-12-28 22:43:02'), +(2, 'Group B', 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, '', '2015-12-28 22:43:02', '2015-12-28 22:43:02'), +(3, 'Group C', 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, '', '2015-12-28 22:43:02', '2015-12-28 22:43:02'); -- -------------------------------------------------------- @@ -736,9 +737,9 @@ CREATE TABLE IF NOT EXISTS `help_topic` ( -- INSERT INTO `help_topic` (`id`, `topic`, `parent_topic`, `custom_form`, `department`, `ticket_status`, `priority`, `sla_plan`, `thank_page`, `ticket_num_format`, `internal_notes`, `status`, `type`, `auto_assign`, `auto_response`, `created_at`, `updated_at`) VALUES -(1, 'Support query', 'Support query', '1', '1', '1', '2', '1', '', '1', '', 1, 1, 0, 0, '2015-12-14 02:27:48', '2015-12-14 02:27:48'), -(2, 'Sales query', 'Sale query', '1', '2', '1', '2', '1', '', '1', '', 1, 1, 0, 0, '2015-12-14 02:27:48', '2015-12-14 02:27:48'), -(3, 'Operational query', 'Operational query', '1', '3', '1', '2', '1', '', '1', '', 1, 1, 0, 0, '2015-12-14 02:27:48', '2015-12-14 02:27:48'); +(1, 'Support query', 'Support query', '1', '1', '1', '2', '1', '', '1', '', 1, 1, 0, 0, '2015-12-28 22:43:03', '2015-12-28 22:43:03'), +(2, 'Sales query', 'Sale query', '1', '2', '1', '2', '1', '', '1', '', 1, 1, 0, 0, '2015-12-28 22:43:03', '2015-12-28 22:43:03'), +(3, 'Operational query', 'Operational query', '1', '3', '1', '2', '1', '', '1', '', 1, 1, 0, 0, '2015-12-28 22:43:03', '2015-12-28 22:43:03'); -- -------------------------------------------------------- @@ -791,6 +792,27 @@ INSERT INTO `logs` (`id`, `level`) VALUES -- -------------------------------------------------------- +-- +-- Table structure for table `log_notification` +-- + +CREATE TABLE IF NOT EXISTS `log_notification` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `log` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; + +-- +-- Dumping data for table `log_notification` +-- + +INSERT INTO `log_notification` (`id`, `log`, `created_at`, `updated_at`) VALUES +(1, 'NOT-1', '2015-12-28 22:43:03', '2015-12-28 22:43:03'); + +-- -------------------------------------------------------- + -- -- Table structure for table `mailbox_protocol` -- @@ -887,7 +909,9 @@ INSERT INTO `migrations` (`migration`, `batch`) VALUES ('2015_09_17_050549_create_version_check_table', 1), ('2015_10_09_105525_create_canned_response_table', 1), ('2015_10_20_154640_create_ticket_form_data_table', 1), -('2015_11_02_063848_create_side_table', 1); +('2015_11_02_063848_create_side_table', 1), +('2015_12_14_072307_create_plugins_table', 1), +('2015_12_23_074831_create_notification_log_table', 1); -- -------------------------------------------------------- @@ -910,28 +934,28 @@ CREATE TABLE IF NOT EXISTS `options` ( -- INSERT INTO `options` (`id`, `option_name`, `option_value`, `autoload`, `created_at`, `updated_at`) VALUES -(1, 'gmt_offset', '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'), -(2, 'date_format', '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'), -(3, 'time_format', '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'), -(4, 'date_time_format', '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'), -(5, 'sitename', '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'), -(6, 'sitedescription', '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'), -(7, 'admin_email', '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'), -(8, 'template', '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'), -(9, 'upload_url_path', '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'), -(10, 'timezone_string', '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'), -(11, 'siteurl', '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'), -(12, 'home', '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'), -(13, 'start_of_week', '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'), -(14, 'language', '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'), -(15, 'port', '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'), -(16, 'host', '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'), -(17, 'encryption', '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'), -(18, 'username', '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'), -(19, 'password', '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'), -(20, 'footer', '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'), -(21, 'uselogo', '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'), -(22, 'logo', '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'); +(1, 'gmt_offset', '', '', '2015-12-28 22:43:04', '2015-12-28 22:43:04'), +(2, 'date_format', '', '', '2015-12-28 22:43:04', '2015-12-28 22:43:04'), +(3, 'time_format', '', '', '2015-12-28 22:43:04', '2015-12-28 22:43:04'), +(4, 'date_time_format', '', '', '2015-12-28 22:43:04', '2015-12-28 22:43:04'), +(5, 'sitename', '', '', '2015-12-28 22:43:04', '2015-12-28 22:43:04'), +(6, 'sitedescription', '', '', '2015-12-28 22:43:04', '2015-12-28 22:43:04'), +(7, 'admin_email', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'), +(8, 'template', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'), +(9, 'upload_url_path', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'), +(10, 'timezone_string', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'), +(11, 'siteurl', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'), +(12, 'home', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'), +(13, 'start_of_week', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'), +(14, 'language', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'), +(15, 'port', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'), +(16, 'host', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'), +(17, 'encryption', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'), +(18, 'username', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'), +(19, 'password', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'), +(20, 'footer', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'), +(21, 'uselogo', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'), +(22, 'logo', '', '', '2015-12-28 22:43:05', '2015-12-28 22:43:05'); -- -------------------------------------------------------- @@ -986,6 +1010,22 @@ CREATE TABLE IF NOT EXISTS `password_resets` ( -- -------------------------------------------------------- +-- +-- Table structure for table `plugins` +-- + +CREATE TABLE IF NOT EXISTS `plugins` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `path` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `status` int(11) NOT NULL, + `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + -- -- Table structure for table `priority` -- @@ -1022,13 +1062,6 @@ CREATE TABLE IF NOT EXISTS `send_mail` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; --- --- Dumping data for table `send_mail` --- - -INSERT INTO `send_mail` (`id`, `driver`, `host`, `port`, `encryption`, `name`, `email`, `password`) VALUES -(1, '', '', '', '', '', '', ''); - -- -------------------------------------------------------- -- @@ -1062,7 +1095,7 @@ CREATE TABLE IF NOT EXISTS `settings` ( -- INSERT INTO `settings` (`id`, `company_name`, `phone`, `website`, `address`, `logo`, `background`, `version`, `port`, `host`, `encryption`, `email`, `password`, `pagination`, `timezone`, `dateformat`, `created_at`, `updated_at`) VALUES -(1, '', '', '', '', '', '', '', '', '', '', '', '', 10, '', '', '2015-12-14 02:27:49', '2015-12-14 02:30:42'); +(1, '', '', '', '', '', '', '', '', '', '', '', '', 0, '', '', '2015-12-28 22:43:06', '2015-12-28 22:43:06'); -- -------------------------------------------------------- @@ -1084,7 +1117,7 @@ CREATE TABLE IF NOT EXISTS `side1` ( -- INSERT INTO `side1` (`id`, `title`, `content`, `created_at`, `updated_at`) VALUES -(1, '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'); +(1, '', '', '2015-12-28 22:43:06', '2015-12-28 22:43:06'); -- -------------------------------------------------------- @@ -1106,7 +1139,7 @@ CREATE TABLE IF NOT EXISTS `side2` ( -- INSERT INTO `side2` (`id`, `title`, `content`, `created_at`, `updated_at`) VALUES -(1, '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'); +(1, '', '', '2015-12-28 22:43:06', '2015-12-28 22:43:06'); -- -------------------------------------------------------- @@ -1132,9 +1165,9 @@ CREATE TABLE IF NOT EXISTS `sla_plan` ( -- INSERT INTO `sla_plan` (`id`, `name`, `grace_period`, `admin_note`, `status`, `transient`, `ticket_overdue`, `created_at`, `updated_at`) VALUES -(1, 'Sla 1', '6 Hours', '', 1, 0, 0, '2015-12-14 02:27:46', '2015-12-14 02:27:46'), -(2, 'Sla 2', '12 Hours', '', 1, 0, 0, '2015-12-14 02:27:46', '2015-12-14 02:27:46'), -(3, 'Sla 3', '24 Hours', '', 1, 0, 0, '2015-12-14 02:27:46', '2015-12-14 02:27:46'); +(1, 'Sla 1', '6 Hours', '', 1, 0, 0, '2015-12-28 22:43:00', '2015-12-28 22:43:00'), +(2, 'Sla 2', '12 Hours', '', 1, 0, 0, '2015-12-28 22:43:00', '2015-12-28 22:43:00'), +(3, 'Sla 3', '24 Hours', '', 1, 0, 0, '2015-12-28 22:43:00', '2015-12-28 22:43:00'); -- -------------------------------------------------------- @@ -1168,7 +1201,7 @@ CREATE TABLE IF NOT EXISTS `social` ( -- INSERT INTO `social` (`id`, `linkedin`, `stumble`, `google`, `deviantart`, `flickr`, `skype`, `rss`, `twitter`, `facebook`, `youtube`, `vimeo`, `pinterest`, `dribbble`, `instagram`, `created_at`, `updated_at`) VALUES -(1, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'); +(1, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '2015-12-28 22:43:06', '2015-12-28 22:43:06'); -- -------------------------------------------------------- @@ -1202,7 +1235,7 @@ CREATE TABLE IF NOT EXISTS `system` ( -- INSERT INTO `system` (`id`, `status`, `url`, `name`, `department`, `page_size`, `log_level`, `purge_log`, `name_format`, `time_farmat`, `date_format`, `date_time_format`, `day_date_time`, `time_zone`, `content`, `created_at`, `updated_at`) VALUES -(1, 1, '', '', '1', '', '', '', '', '', '', 'd/m/Y H:i:s', '', 'Asia/Kolkata', '', '2015-12-14 02:27:48', '2015-12-14 03:52:08'); +(1, 1, '', 'SUPPORT CENTER', '1', '', '', '', '', '', '', 'd/m/Y H:i:s', '', 'Asia/Kolkata', '', '2015-12-28 22:43:03', '2015-12-28 23:10:44'); -- -------------------------------------------------------- @@ -1227,9 +1260,9 @@ CREATE TABLE IF NOT EXISTS `teams` ( -- INSERT INTO `teams` (`id`, `name`, `status`, `team_lead`, `assign_alert`, `admin_notes`, `created_at`, `updated_at`) VALUES -(1, 'Level 1 Support', 0, '', 0, '', '2015-12-14 02:27:47', '2015-12-14 02:27:47'), -(2, 'Level 2 Support', 0, '', 0, '', '2015-12-14 02:27:47', '2015-12-14 02:27:47'), -(3, 'Developer', 0, '', 0, '', '2015-12-14 02:27:47', '2015-12-14 02:27:47'); +(1, 'Level 1 Support', 0, '', 0, '', '2015-12-28 22:43:02', '2015-12-28 22:43:02'), +(2, 'Level 2 Support', 0, '', 0, '', '2015-12-28 22:43:02', '2015-12-28 22:43:02'), +(3, 'Developer', 0, '', 0, '', '2015-12-28 22:43:02', '2015-12-28 22:43:02'); -- -------------------------------------------------------- @@ -1300,7 +1333,7 @@ CREATE TABLE IF NOT EXISTS `tickets` ( `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; -- -------------------------------------------------------- @@ -1414,7 +1447,7 @@ CREATE TABLE IF NOT EXISTS `ticket_settings` ( -- INSERT INTO `ticket_settings` (`id`, `num_format`, `num_sequence`, `priority`, `sla`, `help_topic`, `max_open_ticket`, `collision_avoid`, `captcha`, `status`, `claim_response`, `assigned_ticket`, `answered_ticket`, `agent_mask`, `html`, `client_update`, `max_file_size`, `created_at`, `updated_at`) VALUES -(1, '#ABCD 1234 1234567', '0', '1', '1', '1', '', '', '', 1, 0, 0, 0, 0, 0, 0, 0, '2015-12-14 02:27:46', '2015-12-14 03:52:35'); +(1, '#ABCD 1234 1234567', '0', '1', '1', '1', '', '', '', 1, 0, 0, 0, 0, 0, 0, 0, '2015-12-28 22:43:00', '2015-12-28 23:10:58'); -- -------------------------------------------------------- @@ -1463,11 +1496,11 @@ CREATE TABLE IF NOT EXISTS `ticket_status` ( -- INSERT INTO `ticket_status` (`id`, `name`, `state`, `mode`, `message`, `flags`, `sort`, `properties`, `created_at`, `updated_at`) VALUES -(1, 'Open', 'open', 3, 'Ticket have been Reopened by', 0, 1, 'Open tickets.', '2015-12-14 02:27:46', '2015-12-14 02:27:46'), -(2, 'Resolved', 'closed', 1, 'Ticket have been Resolved by', 0, 2, 'Resolved tickets.', '2015-12-14 02:27:46', '2015-12-14 02:27:46'), -(3, 'Closed', 'closed', 3, 'Ticket have been Closed by', 0, 3, 'Closed tickets. Tickets will still be accessible on client and staff panels.', '2015-12-14 02:27:46', '2015-12-14 02:27:46'), -(4, 'Archived', 'archived', 3, 'Ticket have been Archived by', 0, 4, 'Tickets only adminstratively available but no longer accessible on ticket queues and client panel.', '2015-12-14 02:27:46', '2015-12-14 02:27:46'), -(5, 'Deleted', 'deleted', 3, 'Ticket have been Deleted by', 0, 5, 'Tickets queued for deletion. Not accessible on ticket queues.', '2015-12-14 02:27:46', '2015-12-14 02:27:46'); +(1, 'Open', 'open', 3, 'Ticket have been Reopened by', 0, 1, 'Open tickets.', '2015-12-28 22:42:59', '2015-12-28 22:42:59'), +(2, 'Resolved', 'closed', 1, 'Ticket have been Resolved by', 0, 2, 'Resolved tickets.', '2015-12-28 22:42:59', '2015-12-28 22:42:59'), +(3, 'Closed', 'closed', 3, 'Ticket have been Closed by', 0, 3, 'Closed tickets. Tickets will still be accessible on client and staff panels.', '2015-12-28 22:42:59', '2015-12-28 22:42:59'), +(4, 'Archived', 'archived', 3, 'Ticket have been Archived by', 0, 4, 'Tickets only adminstratively available but no longer accessible on ticket queues and client panel.', '2015-12-28 22:42:59', '2015-12-28 22:42:59'), +(5, 'Deleted', 'deleted', 3, 'Ticket have been Deleted by', 0, 5, 'Tickets queued for deletion. Not accessible on ticket queues.', '2015-12-28 22:43:00', '2015-12-28 22:43:00'); -- -------------------------------------------------------- @@ -1491,7 +1524,7 @@ CREATE TABLE IF NOT EXISTS `ticket_thread` ( `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=8 ; -- -------------------------------------------------------- @@ -1683,14 +1716,14 @@ CREATE TABLE IF NOT EXISTS `users` ( `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`), UNIQUE KEY `users_email_unique` (`email`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `user_name`, `first_name`, `last_name`, `gender`, `email`, `ban`, `password`, `active`, `ext`, `phone_number`, `mobile`, `agent_sign`, `account_type`, `account_status`, `assign_group`, `primary_dpt`, `agent_tzone`, `daylight_save`, `limit_access`, `directory_listing`, `vocation_mode`, `company`, `role`, `internal_note`, `profile_pic`, `remember_token`, `created_at`, `updated_at`) VALUES -(1, 'demo@admin.com', 'demo', 'demo', 0, 'demo@admin.com', 0, '$2y$10$.Jmab0dl9ZNlw0gGjGgP6OxCIkcEDlBQPSHQkZquwie1GI83.5o9S', 1, '', '', '', '', '', '', 'group A', 'support', '', '', '', '', '', '', 'admin', '', '', NULL, '2015-12-14 02:27:50', '2015-12-14 02:27:50'); +(1, 'demo@demo.com', 'demo', 'demo', 0, 'demo@demo.com', 0, '$2y$10$lejFGejiVlooHhCmqIo16uB7M0bxCV07BbJN8liMe9mrbSLGc8Y7C', 1, '', '', '', '', '', '', 'group A', 'support', '', '', '', '', '', '', 'admin', '', '', NULL, '2015-12-28 22:43:07', '2015-12-28 22:43:07'); -- -------------------------------------------------------- @@ -1727,7 +1760,7 @@ CREATE TABLE IF NOT EXISTS `version_check` ( -- INSERT INTO `version_check` (`id`, `current_version`, `new_version`, `created_at`, `updated_at`) VALUES -(1, '', '', '2015-12-14 02:27:49', '2015-12-14 02:27:49'); +(1, '', '', '2015-12-28 22:43:04', '2015-12-28 22:43:04'); -- -- Constraints for dumped tables diff --git a/app/Events/ClientTicketFormPost.php b/app/Events/ClientTicketFormPost.php index e3dc60f20..ae045d75a 100644 --- a/app/Events/ClientTicketFormPost.php +++ b/app/Events/ClientTicketFormPost.php @@ -6,7 +6,7 @@ use Illuminate\Queue\SerializesModels; class ClientTicketFormPost extends Event { - use SerializesModels; + use SerializesModels; public $para1; public $para2; diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 773d0cbe4..f191a0fb6 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -46,27 +46,28 @@ class Handler extends ExceptionHandler { */ public function render($request, Exception $e) { - // if ($this->isHttpException($e) && $e->getStatusCode() == 404) { - // return response()->view('errors.404', []); - // } else { - // if(\Config::get('database.install') == 1) { - // // if(\Config::get('app.ErrorLog') == '%1%') { - // // \App\Http\Controllers\Common\SettingsController::smtp(); - // // \Mail::send('errors.report', array('e' => $e), function ($message) { - // // $message->to('', '')->subject(''); - // // }); - // // } + // if(config('app.debug') == false) { + // if ($this->isHttpException($e) && $e->getStatusCode() == 404) { + // return response()->view('errors.404', []); + // } else { + // if(\Config::get('database.install') == 1) { + // if(\Config::get('app.ErrorLog') == '%1%') { + // // \App\Http\Controllers\Common\SettingsController::smtp(); + // // \Mail::send('errors.report', array('e' => $e), function ($message) { + // // $message->to('', '')->subject(''); + // // }); + // } + // } + // return response()->view('errors.500', []); // } - // return response()->view('errors.500', []); - // } - return parent::render($request, $e); + // } + // return parent::render($request, $e); if ($this->isHttpException($e)) { return $this->renderHttpException($e); } - if (config('app.debug')) { return $this->renderExceptionWithWhoops($e); diff --git a/app/Http/Controllers/Admin/helpdesk/SettingsController.php b/app/Http/Controllers/Admin/helpdesk/SettingsController.php index 84d08da93..518098f65 100644 --- a/app/Http/Controllers/Admin/helpdesk/SettingsController.php +++ b/app/Http/Controllers/Admin/helpdesk/SettingsController.php @@ -418,6 +418,20 @@ class SettingsController extends Controller { $alerts->ticket_department_manager = $request->input('ticket_department_manager'); $alerts->ticket_department_member = $request->input('ticket_department_member'); $alerts->ticket_admin_email = $request->input('ticket_admin_email'); + + if($request->input('system_error') == null){ + $str = '%0%'; + $path = app_path('../config/app.php'); + $content = \File::get($path); + $content = str_replace('%1%', $str, $content); + \File::put($path, $content); + } else { + $str = '%1%'; + $path = app_path('../config/app.php'); + $content = \File::get($path); + $content = str_replace('%0%', $str, $content); + \File::put($path, $content); + } /* fill the values to coompany table */ /* Check whether function success or not */ if ($alerts->save() == true) { diff --git a/app/Http/Controllers/Agent/helpdesk/MailController.php b/app/Http/Controllers/Agent/helpdesk/MailController.php index d2b678aa0..80b97bb3e 100644 --- a/app/Http/Controllers/Agent/helpdesk/MailController.php +++ b/app/Http/Controllers/Agent/helpdesk/MailController.php @@ -115,9 +115,10 @@ class MailController extends Controller { // echo $_SERVER['DOCUMENT_ROOT']; $dir_img_paths = __DIR__; $dir_img_path = explode('/code', $dir_img_paths); - $filepath = explode('../../../../../public/',$attachment->filePath); - - $path = $dir_img_path[0]."/code/public/".$filepath[1]; + $filepath = explode('../../../../../../public/',$attachment->filePath); + // dd($filepath); + // $path = $dir_img_path[0]."/public/".$filepath[1]; + $path = public_path().'/'.$filepath[1]; // dd($path); $filesize = filesize($path); $file_data = file_get_contents($path); diff --git a/app/Http/Controllers/Auth/UserController.php b/app/Http/Controllers/Auth/UserController.php new file mode 100644 index 000000000..7431237b3 --- /dev/null +++ b/app/Http/Controllers/Auth/UserController.php @@ -0,0 +1,388 @@ + + */ +class UserController extends Controller { + + /** + * Create a new controller instance. + * constructor to check + * 1. authentication + * 2. user roles + * 3. roles must be agent + * + * @return void + */ + public function __construct() { + $this->middleware('auth'); + $this->middleware('role.agent'); + // $this->middleware('roles'); + } + + /** + * Display a listing of the resource. + * @param type User $user + * @return type Response + */ + public function index() { + try { + /* get all values in Sys_user */ + return view('themes.default1.agent.helpdesk.user.index'); + } catch (Exception $e) { + return view('404'); + } + } + + /** + * This function is used to display the list of users + * @return datatable + */ + public function user_list() { + + return \Datatable::collection(User::where('role','!=','admin')->where('role','!=','agent')->get()) + ->searchColumns('user_name') + ->orderColumns('user_name', 'email') + ->addColumn('user_name', function ($model) { + return $model->user_name; + }) + ->addColumn('email', function ($model) { + $email = $model->email; + return $email; + }) + ->addColumn('phone', function ($model) { + $phone = ""; + if($model->phone_number) { + $phone = $model->ext . ' ' . $model->phone_number; + } + $mobile = ""; + if($model->mobile) { + $mobile = $model->mobile; + } + $phone = $phone ."   ". $mobile; + return $phone; + }) + ->addColumn('status', function ($model) { + $status = $model->active; + if($status == 1) { + $stat = ''; + } else { + $stat = ''; + } + return $stat; + }) + ->addColumn('lastlogin', function ($model) { + $t = $model->updated_at; + return TicketController::usertimezone($t); + }) + ->addColumn('Actions', function ($model) { + //return 'id . ' class="btn btn-danger btn-flat" onclick="myFunction()">Delete id . '/edit class="btn btn-warning btn-flat">Edit id . ' class="btn btn-warning btn-flat">View'; + //return '
id . '/edit class="btn btn-warning btn-flat">Edit id . ' class="btn btn-warning btn-flat">View'; + return ' ' . \Lang::get('lang.edit') . ' ' . \Lang::get('lang.view') . ' + '; + }) + ->make(); + } + + /** + * Show the form for creating a new resource. + * @return type Response + */ + public function create() { + try { + return view('themes.default1.agent.helpdesk.user.create'); + } catch (Exception $e) { + return view('404'); + } + } + + /** + * Store a newly created resource in storage. + * @param type User $user + * @param type Sys_userRequest $request + * @return type Response + */ + public function store(User $user, Sys_userRequest $request) { + try { + /* insert the input request to sys_user table */ + /* Check whether function success or not */ + $user->email = $request->input('email'); + $user->user_name = $request->input('full_name'); + $user->mobile = $request->input('mobile'); + $user->ext = $request->input('ext'); + $user->phone_number = $request->input('phone_number'); + $user->active = $request->input('active'); + $user->internal_note = $request->input('internal_note'); + $user->role = 'user'; + if ($user->save() == true) { + /* redirect to Index page with Success Message */ + return redirect('user')->with('success', 'User Created Successfully'); + } else { + /* redirect to Index page with Fails Message */ + return redirect('user')->with('fails', 'User can not Create'); + } + } catch (Exception $e) { + /* redirect to Index page with Fails Message */ + return redirect('user')->with('fails', 'User can not Create'); + } + } + + /** + * Display the specified resource. + * @param type int $id + * @param type User $user + * @return type Response + */ + public function show($id, User $user) { + try { + /* select the field where id = $id(request Id) */ + $users = $user->whereId($id)->first(); + return view('themes.default1.agent.helpdesk.user.show', compact('users')); + } catch (Exception $e) { + return view('404'); + } + } + + /** + * Show the form for editing the specified resource. + * @param type int $id + * @param type User $user + * @return type Response + */ + public function edit($id, User $user) { + try { + /* select the field where id = $id(request Id) */ + $users = $user->whereId($id)->first(); + return view('themes.default1.agent.helpdesk.user.edit', compact('users')); + } catch (Exception $e) { + return view('404'); + } + } + + /** + * Update the specified resource in storage. + * @param type int $id + * @param type User $user + * @param type Sys_userUpdate $request + * @return type Response + */ + public function update($id, User $user, Sys_userUpdate $request) { + try { + /* select the field where id = $id(request Id) */ + $users = $user->whereId($id)->first(); + /* Update the value by selected field */ + /* Check whether function success or not */ + if ($users->fill($request->input())->save() == true) { + /* redirect to Index page with Success Message */ + return redirect('user')->with('success', 'User Updated Successfully'); + } else { + /* redirect to Index page with Fails Message */ + return redirect('user')->with('fails', 'User can not Update'); + } + } catch (Exception $e) { + /* redirect to Index page with Fails Message */ + return redirect('user')->with('fails', 'User can not Update'); + } + } + + /** + * Remove the specified resource from storage. + * @param type int $id + * @param type User $user + * @return type Response + */ + public function destroy($id, User $user) { + try { + /* select the field where id = $id(request Id) */ + $users = $user->whereId($id)->first(); + /* delete the selected field */ + /* Check whether function success or not */ + if ($users->delete() == true) { + /* redirect to Index page with Success Message */ + return redirect('user')->with('success', 'User Deleted Successfully'); + } else { + /* redirect to Index page with Fails Message */ + return redirect('user')->with('fails', 'User can not Delete'); + } + } catch (Exception $e) { + /* redirect to Index page with Fails Message */ + return redirect('user')->with('fails', 'User can not Delete'); + } + } + + /** + * get profile page + * @return type Response + */ + public function getProfile() { + $user = Auth::user(); + return view('themes.default1.agent.helpdesk.user.profile', compact('user')); + } + + /** + * get profile edit page + * @return type Response + */ + public function getProfileedit() { + $user = Auth::user(); + return view('themes.default1.agent.helpdesk.user.profile-edit', compact('user')); + } + + /** + * post profile page + * @param type int $id + * @param type ProfileRequest $request + * @return type Response + */ + public function postProfileedit(ProfileRequest $request) { + $user = Auth::user(); + $user->gender = $request->input('gender'); + $user->save(); + if ($user->profile_pic == 'avatar5.png' || $user->profile_pic == 'avatar2.png') { + if ($request->input('gender') == 1) { + $name = 'avatar5.png'; + $destinationPath = 'lb-faveo/profilepic'; + $user->profile_pic = $name; + } elseif ($request->input('gender') == 0) { + $name = 'avatar2.png'; + $destinationPath = 'lb-faveo/profilepic'; + $user->profile_pic = $name; + } + } + if (Input::file('profile_pic')) { + //$extension = Input::file('profile_pic')->getClientOriginalExtension(); + $name = Input::file('profile_pic')->getClientOriginalName(); + $destinationPath = 'lb-faveo/profilepic'; + $fileName = rand(0000, 9999) . '.' . $name; + //echo $fileName; + Input::file('profile_pic')->move($destinationPath, $fileName); + $user->profile_pic = $fileName; + } else { + $user->fill($request->except('profile_pic', 'gender'))->save(); + return Redirect::route('profile')->with('success', 'Profile Updated sucessfully'); + } + if ($user->fill($request->except('profile_pic'))->save()) { + return Redirect::route('profile')->with('success', 'Profile Updated sucessfully'); + } + } + + /** + * Post profile password + * @param type int $id + * @param type ProfilePassword $request + * @return type Response + */ + public function postProfilePassword($id, ProfilePassword $request) { + $user = Auth::user(); + //echo $user->password; + if (Hash::check($request->input('old_password'), $user->getAuthPassword())) { + $user->password = Hash::make($request->input('new_password')); + $user->save(); + return redirect('profile-edit')->with('success1', 'Password Updated sucessfully'); + } else { + return redirect('profile-edit')->with('fails1', 'Password was not Updated. Incorrect old password'); + } + } + + /** + * User Assign Org + * @param type $id + * @return type boolean + */ + public function UserAssignOrg($id) { + $org = Input::get('org'); + $user_org = new User_org; + $user_org->org_id = $org; + $user_org->user_id = $id; + $user_org->save(); + return 1; + } + + /** + * user create organisation + * @return type value + */ + public function User_Create_Org($id) { + + if(Input::get('website')!=null) { + // checking website + $check = Organization::where('website','=',Input::get('website'))->first(); + } else { + $check = null; + } + + // checking name + $check2 = Organization::where('name','=',Input::get('name'))->first(); + + if (\Input::get('name') == null) { + return "Name is required"; + } elseif($check2 != null) { + return "Name should be Unique"; + } elseif($check != null) { + return "Website should be Unique"; + } else { + $org = new Organization; + $org->name = Input::get('name'); + $org->phone = Input::get('phone'); + $org->website = Input::get('website'); + $org->address = Input::get('address'); + $org->internal_notes = Input::get('internal'); + $org->save(); + + $user_org = new User_org; + $user_org->org_id = $org->id; + $user_org->user_id = $id; + $user_org->save(); + + return 0; + } + } +} \ No newline at end of file diff --git a/app/Http/Controllers/Common/SettingsController.php b/app/Http/Controllers/Common/SettingsController.php index 67b681404..2d0549bc0 100644 --- a/app/Http/Controllers/Common/SettingsController.php +++ b/app/Http/Controllers/Common/SettingsController.php @@ -454,13 +454,13 @@ class SettingsController extends Controller { $faveoconfig = config_path() . '/plugins/' . $filename . '.php'; if ($faveoconfig) { - copy($config, $faveoconfig); + //copy($config, $faveoconfig); /** * write provider list in app.php line 128 */ $app = base_path() . '/config/app.php'; $str = "\n\n\t\t\t'App\\Plugins\\$filename" . "\\ServiceProvider',"; - $line_i_am_looking_for = 128; + $line_i_am_looking_for = 144; $lines = file($app, FILE_IGNORE_NEW_LINES); $lines[$line_i_am_looking_for] = $str; file_put_contents($app, implode("\n", $lines)); @@ -602,7 +602,7 @@ class SettingsController extends Controller { $app = base_path() . '/config/app.php'; $str = "'App\\Plugins\\$slug" . "\\ServiceProvider',"; - $line_i_am_looking_for = 128; + $line_i_am_looking_for = 144; $lines = file($app, FILE_IGNORE_NEW_LINES); $lines[$line_i_am_looking_for] = $str; file_put_contents($app, implode("\n", $lines)); diff --git a/app/Http/routes.php b/app/Http/routes.php index 1211c0094..bfd09815b 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -525,9 +525,9 @@ $router->post('post-contact',['as'=>'post-contact' , 'uses'=> 'Client\kb\UserCon //to get the value for page content $router->get('pages/{name}', ['as' => 'pages', 'uses' =>'Client\kb\UserController@getPage']); //profile -$router->get('client-profile',['as' => 'client-profile', 'uses' => 'Client\kb\UserController@clientProfile']); -Route::patch('client-profile-edit',['as' => 'client-profile-edit', 'uses' => 'Client\kb\UserController@postClientProfile']); -Route::patch('client-profile-password/{id}',['as' => 'client-profile-password', 'uses' => 'Client\kb\UserController@postClientProfilePassword']); +// $router->get('client-profile',['as' => 'client-profile', 'uses' => 'Client\kb\UserController@clientProfile']); +// Route::patch('client-profile-edit',['as' => 'client-profile-edit', 'uses' => 'Client\kb\UserController@postClientProfile']); +// Route::patch('client-profile-password/{id}',['as' => 'client-profile-password', 'uses' => 'Client\kb\UserController@postClientProfilePassword']); diff --git a/app/Model/helpdesk/Settings/Plugin.php b/app/Model/helpdesk/Settings/Plugin.php new file mode 100644 index 000000000..393cd8154 --- /dev/null +++ b/app/Model/helpdesk/Settings/Plugin.php @@ -0,0 +1,10 @@ + '%1%', + 'ErrorLog' => '%0%', /* |-------------------------------------------------------------------------- @@ -38,7 +38,7 @@ return [ | */ - 'version' => 'Community 1.0.3.4', + 'version' => 'COMMUNITY 1.0.3.5', /* |-------------------------------------------------------------------------- @@ -134,6 +134,34 @@ return [ */ 'providers' => [ + + + + + + + + + + + // + + // + + + + + + + + + + + + + + + /* * Laravel Framework Service Providers... @@ -174,7 +202,6 @@ return [ 'Vsmoraes\Pdf\PdfServiceProvider', 'Thomaswelton\LaravelGravatar\LaravelGravatarServiceProvider', 'Chumper\Datatable\DatatableServiceProvider', - ], /* @@ -231,7 +258,6 @@ return [ 'UTC' => 'App\Http\Controllers\Agent\helpdesk\TicketController', 'SMTPS' => 'App\Http\Controllers\HomeController', 'Datatable' => 'Chumper\Datatable\Facades\DatatableFacade', - ], -]; +]; \ No newline at end of file diff --git a/config/chumper.datatable.php b/config/chumper.datatable.php new file mode 100644 index 000000000..013421802 --- /dev/null +++ b/config/chumper.datatable.php @@ -0,0 +1,146 @@ + array( + + /* + |-------------------------------------------------------------------------- + | Table class + |-------------------------------------------------------------------------- + | + | Class(es) added to the table + | Supported: string + | + */ + + 'class' => 'table table-bordered', + + /* + |-------------------------------------------------------------------------- + | Table ID + |-------------------------------------------------------------------------- + | + | ID given to the table. Used for connecting the table and the Datatables + | jQuery plugin. If left empty a random ID will be generated. + | Supported: string + | + */ + + 'id' => '', + + /* + |-------------------------------------------------------------------------- + | DataTable options + |-------------------------------------------------------------------------- + | + | jQuery dataTable plugin options. The array will be json_encoded and + | passed through to the plugin. See https://datatables.net/usage/options + | for more information. + | Supported: array + | + */ + + 'options' => array( + + "sPaginationType" => "full_numbers", + + "bProcessing" => false + + ), + + /* + |-------------------------------------------------------------------------- + | DataTable callbacks + |-------------------------------------------------------------------------- + | + | jQuery dataTable plugin callbacks. The array will be json_encoded and + | passed through to the plugin. See https://datatables.net/usage/callbacks + | for more information. + | Supported: array + | + */ + + 'callbacks' => array(), + + /* + |-------------------------------------------------------------------------- + | Skip javascript in table template + |-------------------------------------------------------------------------- + | + | Determines if the template should echo the javascript + | Supported: boolean + | + */ + + 'noScript' => false, + + + /* + |-------------------------------------------------------------------------- + | Table view + |-------------------------------------------------------------------------- + | + | Template used to render the table + | Supported: string + | + */ + + 'table_view' => 'chumper.datatable::template', + + + /* + |-------------------------------------------------------------------------- + | Script view + |-------------------------------------------------------------------------- + | + | Template used to render the javascript + | Supported: string + | + */ + + 'script_view' => 'chumper.datatable::javascript', + ), + + + /* + |-------------------------------------------------------------------------- + | Engine specific configuration options. + |-------------------------------------------------------------------------- + | + */ + + 'engine' => array( + + /* + |-------------------------------------------------------------------------- + | Search for exact words + |-------------------------------------------------------------------------- + | + | If the search should be done with exact matching + | Supported: boolean + | + */ + + 'exactWordSearch' => false, + + ), + /* + |-------------------------------------------------------------------------- + | Allow overrides Datatable core classes + |-------------------------------------------------------------------------- + | + */ + 'classmap' => array( + 'CollectionEngine' => 'Chumper\Datatable\Engines\CollectionEngine', + 'QueryEngine' => 'Chumper\Datatable\Engines\QueryEngine', + 'Table' => 'Chumper\Datatable\Table', + ) +); diff --git a/database/migrations/2015_12_14_072307_create_plugins_table.php b/database/migrations/2015_12_14_072307_create_plugins_table.php new file mode 100644 index 000000000..1f0d42084 --- /dev/null +++ b/database/migrations/2015_12_14_072307_create_plugins_table.php @@ -0,0 +1,35 @@ +increments('id'); + $table->string('name'); + $table->string('path'); + $table->integer('status'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('plugins'); + } + +} diff --git a/resources/lang/en/lang.php b/resources/lang/en/lang.php index 8c9df92ec..c667f582f 100644 --- a/resources/lang/en/lang.php +++ b/resources/lang/en/lang.php @@ -47,6 +47,11 @@ return array( */ 'registration' => 'Registration', 'full_name' => 'Full name', + 'firstname' => 'First Name', + 'lastname' => 'Last Name', + 'profilepicture' => 'Profile Picture', + 'oldpassword' => 'Old Password', + 'newpassword' => 'New Password', 'retype_password' => 'Retype Password', 'i_agree_to_the' => 'I agree to the', 'terms' => 'terms', @@ -298,6 +303,8 @@ return array( 'system_errors' =>'System Errors', 'SQL_errors' =>'SQL errors', 'excessive_failed_login_attempts' =>'Excessive failed login attempts', + 'system_error_reports' => 'System error Reports', + 'Send_app_crash_reports_to_help_Ladybird_improve_Faveo' => 'Send app crash reports to help Ladybird improve Faveo', /* |---------------------------------------------------------------------------------------- diff --git a/resources/views/themes/default1/admin/helpdesk/emails/smtp.blade.php b/resources/views/themes/default1/admin/helpdesk/emails/smtp.blade.php index 26a354da2..e8ba1e583 100644 --- a/resources/views/themes/default1/admin/helpdesk/emails/smtp.blade.php +++ b/resources/views/themes/default1/admin/helpdesk/emails/smtp.blade.php @@ -53,9 +53,8 @@ class="active" {!! Form::label('driver',Lang::get('lang.driver')) !!} {!! $errors->first('driver', ':message') !!} @@ -75,7 +74,6 @@ class="active" {!! Form::label('encryption',Lang::get('lang.encryption')) !!} {!! $errors->first('encryption', ':message') !!} @@ -96,10 +94,10 @@ class="active"
{!! Form::label('password',Lang::get('lang.password')) !!} {!! $errors->first('password', ':message') !!} - @if(isset($settings->password)) + @if($settings->password) - @else - + @else + @endif
diff --git a/resources/views/themes/default1/admin/helpdesk/settings/alert.blade.php b/resources/views/themes/default1/admin/helpdesk/settings/alert.blade.php index 91e4a05b1..15bf42be6 100644 --- a/resources/views/themes/default1/admin/helpdesk/settings/alert.blade.php +++ b/resources/views/themes/default1/admin/helpdesk/settings/alert.blade.php @@ -352,6 +352,25 @@ class="active" +
+
+
+

{{Lang::get('lang.system_error_reports')}}

+
+ + +
+
+ + +
+ {!! Form::checkbox('system_error',1) !!} + {!! Form::label('system_error',Lang::get('lang.Send_app_crash_reports_to_help_Ladybird_improve_Faveo')) !!} +
+
+
+
+ @stop diff --git a/resources/views/themes/default1/admin/helpdesk/settings/plugins.blade.php b/resources/views/themes/default1/admin/helpdesk/settings/plugins.blade.php index ef10d975a..759923d4c 100644 --- a/resources/views/themes/default1/admin/helpdesk/settings/plugins.blade.php +++ b/resources/views/themes/default1/admin/helpdesk/settings/plugins.blade.php @@ -1,10 +1,10 @@ @extends('themes.default1.admin.layout.admin') -@section('Plugin') +@section('Settings') class="active" @stop -@section('plugin-bar') +@section('settings-bar') active @stop diff --git a/resources/views/themes/default1/client/kb/article-list/profile.blade.php b/resources/views/themes/default1/client/kb/article-list/profile.blade.php index 4e00c7d47..c97ef424a 100644 --- a/resources/views/themes/default1/client/kb/article-list/profile.blade.php +++ b/resources/views/themes/default1/client/kb/article-list/profile.blade.php @@ -24,7 +24,7 @@
- {!! Form::model($user,['url'=>'post-profile', 'method' => 'PATCH','files'=>true]) !!} + {!! Form::model($user,['url'=>'client-profile-edit', 'method' => 'PATCH','files'=>true]) !!}
@@ -145,7 +145,7 @@
- {!! Form::model($user,['url'=>'client-profile-password/'.$user->id , 'method' => 'PATCH']) !!} + {!! Form::model($user,['url'=>'client-profile-password' , 'method' => 'PATCH']) !!}
diff --git a/resources/views/vendor/chumper.datatable/javascript.blade.php b/resources/views/vendor/chumper.datatable/javascript.blade.php new file mode 100644 index 000000000..8e216c848 --- /dev/null +++ b/resources/views/vendor/chumper.datatable/javascript.blade.php @@ -0,0 +1,8 @@ + diff --git a/resources/views/vendor/chumper.datatable/template.blade.php b/resources/views/vendor/chumper.datatable/template.blade.php new file mode 100644 index 000000000..d6c226407 --- /dev/null +++ b/resources/views/vendor/chumper.datatable/template.blade.php @@ -0,0 +1,27 @@ + + + @for ($i = 0; $i < count($columns); $i++) + + @endfor + + + + @foreach($columns as $i => $c) + + @endforeach + + + + @foreach($data as $d) + + @foreach($d as $dd) + + @endforeach + + @endforeach + +
{!! $c !!}
{!! $dd !!}
+ +@if (!$noScript) + @include(Config::get('chumper.datatable.table.script_view'), array('id' => $id, 'options' => $options)) +@endif