From 29c2d23008808d7a4a9bd92343ff6095eae98839 Mon Sep 17 00:00:00 2001 From: asandikci Date: Fri, 22 Dec 2023 22:12:24 +0300 Subject: [PATCH] feat: branding and language improvements - added helper for branding - added new translations --- application/config/autoload.php | 7 +- application/config/config.php | 2 +- application/core/EA_Controller.php | 1 + .../helpers/iflrandevu/branding_helper.php | 86 ++++++++++++++++++ .../english/iflrandevu/translations_lang.php | 6 ++ .../language/english/iflrandevu_lang.php | 4 - .../turkish/iflrandevu/translations_lang.php | 6 ++ .../language/turkish/iflrandevu_lang.php | 4 - application/views/appointments/book.php | 4 +- .../views/appointments/book_success.php | 3 +- application/views/appointments/message.php | 5 +- application/views/backend/footer.php | 17 ++-- application/views/backend/settings.php | 18 +--- .../views/emails/appointment_details.php | 5 +- .../views/emails/delete_appointment.php | 5 +- application/views/emails/new_password.php | 5 +- application/views/general/error404.php | 5 +- application/views/general/installation.php | 22 ++--- application/views/general/update.php | 8 +- application/views/user/forgot_password.php | 5 +- application/views/user/login.php | 5 +- application/views/user/logout.php | 5 +- application/views/user/no_privileges.php | 5 +- assets/img/asandikci-logo-16x16.png | Bin 0 -> 678 bytes config-sample.php | 4 +- gulpfile.js | 2 +- index.php | 4 +- system/helpers/iflrandevu/branding_helper.php | 49 ---------- 28 files changed, 155 insertions(+), 137 deletions(-) create mode 100644 application/helpers/iflrandevu/branding_helper.php create mode 100644 application/language/english/iflrandevu/translations_lang.php delete mode 100644 application/language/english/iflrandevu_lang.php create mode 100644 application/language/turkish/iflrandevu/translations_lang.php delete mode 100644 application/language/turkish/iflrandevu_lang.php create mode 100644 assets/img/asandikci-logo-16x16.png delete mode 100644 system/helpers/iflrandevu/branding_helper.php diff --git a/application/config/autoload.php b/application/config/autoload.php index 20beb636..cf12504c 100644 --- a/application/config/autoload.php +++ b/application/config/autoload.php @@ -65,8 +65,7 @@ $autoload['libraries'] = ['database', 'session']; | $autoload['helper'] = array('url', 'file'); */ -$autoload['helper'] = ['custom_exceptions', 'url', 'file', 'language', 'asset', 'config', 'render', 'rate_limit', 'security']; - +$autoload['helper'] = ['iflrandevu/branding','custom_exceptions', 'url', 'file', 'language', 'asset', 'config', 'render', 'rate_limit', 'security']; /* | ------------------------------------------------------------------- @@ -81,7 +80,7 @@ $autoload['helper'] = ['custom_exceptions', 'url', 'file', 'language', 'asset', | */ -$autoload['config'] = ['google', 'email']; +$autoload['config'] = ['email']; /* @@ -97,7 +96,7 @@ $autoload['config'] = ['google', 'email']; | */ -$autoload['language'] = []; +$autoload['language'] = []; // see /application/core/EA_Controller.php for other added languages /* diff --git a/application/config/config.php b/application/config/config.php index 91019a86..cb89c4ae 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -83,7 +83,7 @@ $config['url_suffix'] = ''; */ $languages = [ - 'en' => 'english', + // 'en' => 'english', 'tr' => 'turkish', ]; diff --git a/application/core/EA_Controller.php b/application/core/EA_Controller.php index bb71d9f9..4fc68861 100644 --- a/application/core/EA_Controller.php +++ b/application/core/EA_Controller.php @@ -82,5 +82,6 @@ class EA_Controller extends CI_Controller { } $this->lang->load('translations'); + $this->lang->load('iflrandevu/translations'); } } diff --git a/application/helpers/iflrandevu/branding_helper.php b/application/helpers/iflrandevu/branding_helper.php new file mode 100644 index 00000000..b33dbd20 --- /dev/null +++ b/application/helpers/iflrandevu/branding_helper.php @@ -0,0 +1,86 @@ + "İFL Randevu", + "description" => "İzmir Fen Lisesi Randevu Portalı", + "maintainers" => "Aliberk Sandıkçı & Alex Tselegidis", // to also give credit to original maintainer + "maintainer_nickname" => "asandikci", + "maintainer_name" => "Aliberk Sandıkçı", + "maintainer_website" => "https://asandikci.com/", + "license" => "GPL3.0", + "website" => "https://iflpanel.com/about/iflrandevu", + "example" => "https://randevu.iflpanel.com/", + "source" => "https://git.aliberksandikci.com.tr/ifl/iflrandevu", + "issues" => "https://git.aliberksandikci.com.tr/ifl/iflrandevu/issues" + ); + + // Upstream Yazılım Sağlayıcı Bilgileri + $upstream = array ( + "name" => "Easy!Appointments", + "description" => "Self Hosted Appointment Scheduler ", + "maintainer_nickname" => "alextselegidis", + "maintainer_name" => "Alex Tselegidis", + "maintainer_website" => "https://alextselegidis.com", + "license" => "GPL3.0", + "website" => "https://easyappointments.org", + "example" => "https://demo.easyappointments.org/", + "source" => "https://github.com/alextselegidis/easyappointments", + "issues" => "https://github.com/alextselegidis/easyappointments/issues", + ); + + + switch ($product) { + case 'software': + return $software[$type]; + break; + case 'type': + return $upstream[$type]; + break; + } + } +} diff --git a/application/language/english/iflrandevu/translations_lang.php b/application/language/english/iflrandevu/translations_lang.php new file mode 100644 index 00000000..8a13ad85 --- /dev/null +++ b/application/language/english/iflrandevu/translations_lang.php @@ -0,0 +1,6 @@ +' . branding("software", "name") . ''; +// End diff --git a/application/language/english/iflrandevu_lang.php b/application/language/english/iflrandevu_lang.php deleted file mode 100644 index f568805b..00000000 --- a/application/language/english/iflrandevu_lang.php +++ /dev/null @@ -1,4 +0,0 @@ -' . branding("software", "name") . ' Gururla Sunar'; +// End diff --git a/application/language/turkish/iflrandevu_lang.php b/application/language/turkish/iflrandevu_lang.php deleted file mode 100644 index 5aedf3a7..00000000 --- a/application/language/turkish/iflrandevu_lang.php +++ /dev/null @@ -1,4 +0,0 @@ - - Powered By - - Easy!Appointments + diff --git a/application/views/appointments/book_success.php b/application/views/appointments/book_success.php index d2a3c0da..181e440b 100755 --- a/application/views/appointments/book_success.php +++ b/application/views/appointments/book_success.php @@ -60,8 +60,7 @@
- Powered by - Easy!Appointments +
diff --git a/application/views/appointments/message.php b/application/views/appointments/message.php index 352daa0d..689b6bdf 100644 --- a/application/views/appointments/message.php +++ b/application/views/appointments/message.php @@ -6,7 +6,7 @@ - <?= $message_title ?> | Easy!Appointments + <?= $message_title ?> | <?= branding("software", "name")?> @@ -49,8 +49,7 @@
- Powered by - Easy!Appointments +
diff --git a/application/views/backend/footer.php b/application/views/backend/footer.php index 91c5aed3..3d038b73 100644 --- a/application/views/backend/footer.php +++ b/application/views/backend/footer.php @@ -1,20 +1,20 @@