From cc2241d751d95de843cebff3e4a7f753ee3e0009 Mon Sep 17 00:00:00 2001 From: Igor Berdichevskiy Date: Thu, 4 Aug 2022 11:32:00 +0300 Subject: [PATCH] Prepare 1.6.0 Release Joomla! 4 Support --- com_swjprojects/admin/config.xml | 43 ++-- com_swjprojects/admin/controller.php | 6 +- .../admin/controllers/categories.php | 6 +- .../admin/controllers/category.php | 6 +- .../admin/controllers/document.php | 6 +- .../admin/controllers/documentation.php | 6 +- com_swjprojects/admin/controllers/images.php | 6 +- com_swjprojects/admin/controllers/key.php | 6 +- com_swjprojects/admin/controllers/keys.php | 6 +- com_swjprojects/admin/controllers/project.php | 6 +- .../admin/controllers/projects.php | 6 +- com_swjprojects/admin/controllers/version.php | 6 +- .../admin/controllers/versions.php | 6 +- com_swjprojects/admin/helpers/images.php | 6 +- com_swjprojects/admin/helpers/keys.php | 6 +- com_swjprojects/admin/helpers/swjprojects.php | 9 +- com_swjprojects/admin/helpers/translation.php | 6 +- .../language/en-GB/en-GB.com_swjprojects.ini | 11 +- .../en-GB/en-GB.com_swjprojects.sys.ini | 5 +- .../language/ru-RU/ru-RU.com_swjprojects.ini | 13 +- .../ru-RU/ru-RU.com_swjprojects.sys.ini | 5 +- com_swjprojects/admin/models/categories.php | 6 +- com_swjprojects/admin/models/category.php | 6 +- com_swjprojects/admin/models/document.php | 6 +- .../admin/models/documentation.php | 6 +- .../admin/models/fields/categories.php | 6 +- .../admin/models/fields/documentation.php | 6 +- com_swjprojects/admin/models/fields/image.php | 6 +- .../admin/models/fields/images.php | 6 +- .../admin/models/fields/jversion.php | 6 +- com_swjprojects/admin/models/fields/key.php | 6 +- .../admin/models/fields/projects.php | 6 +- .../admin/models/fields/versions.php | 6 +- .../admin/models/forms/category.xml | 6 +- .../admin/models/forms/document.xml | 6 +- .../admin/models/forms/filter_projects.xml | 3 +- .../admin/models/forms/filter_versions.xml | 3 +- com_swjprojects/admin/models/forms/key.xml | 3 +- .../admin/models/forms/project.xml | 12 +- .../admin/models/forms/version.xml | 6 +- com_swjprojects/admin/models/key.php | 14 +- com_swjprojects/admin/models/keys.php | 20 +- com_swjprojects/admin/models/project.php | 6 +- com_swjprojects/admin/models/projects.php | 6 +- com_swjprojects/admin/models/version.php | 12 +- com_swjprojects/admin/models/versions.php | 6 +- .../admin/sql/install.mysql.utf8.sql | 167 ++++++------ .../admin/sql/uninstall.mysql.utf8.sql | 9 + .../admin/sql/updates/mysql/1.1.0.sql | 9 + .../admin/sql/updates/mysql/1.3.0.sql | 9 + .../admin/sql/updates/mysql/1.5.0.sql | 9 + .../admin/sql/updates/mysql/1.5.1.sql | 9 + .../admin/sql/updates/mysql/1.5.5.sql | 9 + .../admin/sql/updates/mysql/1.5.7.sql | 9 + .../admin/sql/updates/mysql/1.6.0.sql | 41 +++ com_swjprojects/admin/swjprojects.php | 6 +- com_swjprojects/admin/tables/categories.php | 6 +- .../admin/tables/documentation.php | 6 +- com_swjprojects/admin/tables/keys.php | 6 +- com_swjprojects/admin/tables/projects.php | 6 +- com_swjprojects/admin/tables/versions.php | 6 +- .../admin/views/categories/tmpl/default.php | 159 +----------- .../views/categories/tmpl/default_j3.php | 164 ++++++++++++ .../views/categories/tmpl/default_j4.php | 154 +++++++++++ .../admin/views/categories/view.html.php | 25 +- .../admin/views/category/tmpl/edit.php | 70 +---- .../admin/views/category/tmpl/edit_j3.php | 75 ++++++ .../admin/views/category/tmpl/edit_j4.php | 68 +++++ .../admin/views/category/view.html.php | 39 +-- .../admin/views/document/tmpl/edit.php | 81 +----- .../admin/views/document/tmpl/edit_j3.php | 86 +++++++ .../admin/views/document/tmpl/edit_j4.php | 79 ++++++ .../admin/views/document/view.html.php | 63 +++-- .../views/documentation/tmpl/default.php | 139 +--------- .../views/documentation/tmpl/default_j3.php | 144 +++++++++++ .../views/documentation/tmpl/default_j4.php | 143 +++++++++++ .../admin/views/documentation/view.html.php | 35 +-- com_swjprojects/admin/views/key/tmpl/edit.php | 52 +--- .../admin/views/key/tmpl/edit_j3.php | 57 +++++ .../admin/views/key/tmpl/edit_j4.php | 50 ++++ com_swjprojects/admin/views/key/view.html.php | 25 +- .../admin/views/keys/tmpl/default.php | 129 +--------- .../admin/views/keys/tmpl/default_j3.php | 140 ++++++++++ .../admin/views/keys/tmpl/default_j4.php | 139 ++++++++++ .../admin/views/keys/view.html.php | 21 +- .../admin/views/project/tmpl/edit.php | 157 +----------- .../admin/views/project/tmpl/edit_j3.php | 162 ++++++++++++ .../admin/views/project/tmpl/edit_j4.php | 145 +++++++++++ .../admin/views/project/view.html.php | 45 ++-- .../admin/views/projects/tmpl/default.php | 163 +----------- .../admin/views/projects/tmpl/default_j3.php | 168 ++++++++++++ .../admin/views/projects/tmpl/default_j4.php | 179 +++++++++++++ .../admin/views/projects/view.html.php | 24 +- .../admin/views/version/tmpl/edit.php | 111 +------- .../admin/views/version/tmpl/edit_j3.php | 116 +++++++++ .../admin/views/version/tmpl/edit_j4.php | 113 +++++++++ .../admin/views/version/view.html.php | 67 +++-- .../admin/views/versions/tmpl/default.php | 135 +--------- .../admin/views/versions/tmpl/default_j3.php | 140 ++++++++++ .../admin/views/versions/tmpl/default_j4.php | 144 +++++++++++ .../admin/views/versions/view.html.php | 21 +- com_swjprojects/layouts/field/image.php | 10 +- com_swjprojects/layouts/field/images.php | 8 +- .../layouts/field/images/result.php | 12 +- com_swjprojects/layouts/field/key.php | 6 +- com_swjprojects/layouts/message/donate.php | 6 +- com_swjprojects/layouts/toolbar/link.php | 30 +-- .../layouts/toolbar/link/joomla3.php | 35 +++ .../layouts/toolbar/link/joomla4.php | 65 +++++ com_swjprojects/layouts/translate/field.php | 6 +- .../layouts/translate/fieldset.php | 6 +- com_swjprojects/layouts/translate/input.php | 6 +- .../layouts/translate/switcher.php | 8 +- com_swjprojects/layouts/translate/text.php | 6 +- .../media/css/{admin.css => admin-j3.css} | 4 +- com_swjprojects/media/css/admin-j3.min.css | 1 + com_swjprojects/media/css/admin-j4.css | 32 +++ com_swjprojects/media/css/admin-j4.min.css | 1 + com_swjprojects/media/css/admin.min.css | 1 - com_swjprojects/media/css/dragula.css | 9 + com_swjprojects/media/css/field-image.css | 4 +- com_swjprojects/media/css/field-image.min.css | 2 +- com_swjprojects/media/css/field-images.css | 4 +- .../media/css/field-images.min.css | 2 +- com_swjprojects/media/css/site.css | 4 +- com_swjprojects/media/css/site.min.css | 2 +- .../media/css/translate-switcher.css | 4 +- .../media/css/translate-switcher.min.css | 2 +- com_swjprojects/media/images/ajax-loader.gif | Bin 0 -> 9933 bytes com_swjprojects/media/images/no-image.svg | 9 + com_swjprojects/media/js/dragula.js | 9 + com_swjprojects/media/js/field-image.js | 4 +- com_swjprojects/media/js/field-images.js | 4 +- com_swjprojects/media/js/field-key.js | 4 +- com_swjprojects/media/js/popup.js | 4 +- .../media/js/translate-switcher.js | 4 +- com_swjprojects/script.php | 6 +- com_swjprojects/site/controller.php | 6 +- com_swjprojects/site/helpers/association.php | 6 +- com_swjprojects/site/helpers/images.php | 6 +- com_swjprojects/site/helpers/keys.php | 6 +- com_swjprojects/site/helpers/route.php | 6 +- .../language/en-GB/en-GB.com_swjprojects.ini | 4 +- .../en-GB/en-GB.com_swjprojects.sys.ini | 4 +- .../language/ru-RU/ru-RU.com_swjprojects.ini | 4 +- .../ru-RU/ru-RU.com_swjprojects.sys.ini | 4 +- com_swjprojects/site/models/document.php | 36 ++- com_swjprojects/site/models/documentation.php | 6 +- com_swjprojects/site/models/download.php | 6 +- com_swjprojects/site/models/jupdate.php | 6 +- com_swjprojects/site/models/project.php | 6 +- com_swjprojects/site/models/projects.php | 6 +- com_swjprojects/site/models/version.php | 16 +- com_swjprojects/site/models/versions.php | 27 +- com_swjprojects/site/router.php | 6 +- com_swjprojects/site/swjprojects.php | 6 +- .../site/views/document/tmpl/default.php | 25 +- .../site/views/document/tmpl/default.xml | 3 +- .../site/views/document/tmpl/default_j3.php | 30 +++ .../site/views/document/tmpl/default_j4.php | 131 ++++++++++ .../site/views/document/view.html.php | 6 +- .../site/views/documentation/tmpl/default.php | 132 +--------- .../site/views/documentation/tmpl/default.xml | 3 +- .../views/documentation/tmpl/default_j3.php | 137 ++++++++++ .../views/documentation/tmpl/default_j4.php | 158 ++++++++++++ .../site/views/documentation/view.html.php | 6 +- .../site/views/download/view.html.php | 6 +- .../site/views/jupdate/view.html.php | 6 +- .../site/views/project/tmpl/default.php | 229 +---------------- .../site/views/project/tmpl/default.xml | 3 +- .../site/views/project/tmpl/default_j3.php | 234 +++++++++++++++++ .../site/views/project/tmpl/default_j4.php | 240 ++++++++++++++++++ .../site/views/project/view.html.php | 6 +- .../site/views/projects/tmpl/default.php | 125 +-------- .../site/views/projects/tmpl/default.xml | 14 +- .../site/views/projects/tmpl/default_j3.php | 130 ++++++++++ .../site/views/projects/tmpl/default_j4.php | 137 ++++++++++ .../site/views/projects/view.html.php | 6 +- .../site/views/version/tmpl/default.php | 117 +-------- .../site/views/version/tmpl/default.xml | 3 +- .../site/views/version/tmpl/default_j3.php | 122 +++++++++ .../site/views/version/tmpl/default_j4.php | 140 ++++++++++ .../site/views/version/view.html.php | 6 +- .../site/views/versions/tmpl/default.php | 159 +----------- .../site/views/versions/tmpl/default.xml | 14 +- .../site/views/versions/tmpl/default_j3.php | 164 ++++++++++++ .../site/views/versions/tmpl/default_j4.php | 190 ++++++++++++++ .../site/views/versions/view.html.php | 6 +- com_swjprojects/swjprojects.xml | 11 +- language/en-GB/en-GB.pkg_swjprojects.sys.ini | 4 +- language/ru-RU/ru-RU.pkg_swjprojects.sys.ini | 4 +- .../en-GB/en-GB.mod_swjprojects_projects.ini | 4 +- .../en-GB.mod_swjprojects_projects.sys.ini | 4 +- .../ru-RU/ru-RU.mod_swjprojects_projects.ini | 4 +- .../ru-RU.mod_swjprojects_projects.sys.ini | 4 +- .../mod_swjprojects_projects.php | 4 +- .../mod_swjprojects_projects.xml | 6 +- mod_swjprojects_projects/tmpl/default.php | 4 +- .../en-GB/en-GB.mod_swjprojects_versions.ini | 4 +- .../en-GB.mod_swjprojects_versions.sys.ini | 4 +- .../ru-RU/ru-RU.mod_swjprojects_versions.ini | 4 +- .../ru-RU.mod_swjprojects_versions.sys.ini | 4 +- .../mod_swjprojects_versions.php | 4 +- .../mod_swjprojects_versions.xml | 6 +- mod_swjprojects_versions/tmpl/default.php | 4 +- pkg_swjprojects.xml | 6 +- script.php | 4 +- 207 files changed, 5396 insertions(+), 2553 deletions(-) create mode 100644 com_swjprojects/admin/sql/updates/mysql/1.6.0.sql create mode 100644 com_swjprojects/admin/views/categories/tmpl/default_j3.php create mode 100644 com_swjprojects/admin/views/categories/tmpl/default_j4.php create mode 100644 com_swjprojects/admin/views/category/tmpl/edit_j3.php create mode 100644 com_swjprojects/admin/views/category/tmpl/edit_j4.php create mode 100644 com_swjprojects/admin/views/document/tmpl/edit_j3.php create mode 100644 com_swjprojects/admin/views/document/tmpl/edit_j4.php create mode 100644 com_swjprojects/admin/views/documentation/tmpl/default_j3.php create mode 100644 com_swjprojects/admin/views/documentation/tmpl/default_j4.php create mode 100644 com_swjprojects/admin/views/key/tmpl/edit_j3.php create mode 100644 com_swjprojects/admin/views/key/tmpl/edit_j4.php create mode 100644 com_swjprojects/admin/views/keys/tmpl/default_j3.php create mode 100644 com_swjprojects/admin/views/keys/tmpl/default_j4.php create mode 100644 com_swjprojects/admin/views/project/tmpl/edit_j3.php create mode 100644 com_swjprojects/admin/views/project/tmpl/edit_j4.php create mode 100644 com_swjprojects/admin/views/projects/tmpl/default_j3.php create mode 100644 com_swjprojects/admin/views/projects/tmpl/default_j4.php create mode 100644 com_swjprojects/admin/views/version/tmpl/edit_j3.php create mode 100644 com_swjprojects/admin/views/version/tmpl/edit_j4.php create mode 100644 com_swjprojects/admin/views/versions/tmpl/default_j3.php create mode 100644 com_swjprojects/admin/views/versions/tmpl/default_j4.php create mode 100644 com_swjprojects/layouts/toolbar/link/joomla3.php create mode 100644 com_swjprojects/layouts/toolbar/link/joomla4.php rename com_swjprojects/media/css/{admin.css => admin-j3.css} (93%) create mode 100644 com_swjprojects/media/css/admin-j3.min.css create mode 100644 com_swjprojects/media/css/admin-j4.css create mode 100644 com_swjprojects/media/css/admin-j4.min.css delete mode 100644 com_swjprojects/media/css/admin.min.css create mode 100644 com_swjprojects/media/images/ajax-loader.gif create mode 100644 com_swjprojects/site/views/document/tmpl/default_j3.php create mode 100644 com_swjprojects/site/views/document/tmpl/default_j4.php create mode 100644 com_swjprojects/site/views/documentation/tmpl/default_j3.php create mode 100644 com_swjprojects/site/views/documentation/tmpl/default_j4.php create mode 100644 com_swjprojects/site/views/project/tmpl/default_j3.php create mode 100644 com_swjprojects/site/views/project/tmpl/default_j4.php create mode 100644 com_swjprojects/site/views/projects/tmpl/default_j3.php create mode 100644 com_swjprojects/site/views/projects/tmpl/default_j4.php create mode 100644 com_swjprojects/site/views/version/tmpl/default_j3.php create mode 100644 com_swjprojects/site/views/version/tmpl/default_j4.php create mode 100644 com_swjprojects/site/views/versions/tmpl/default_j3.php create mode 100644 com_swjprojects/site/views/versions/tmpl/default_j4.php diff --git a/com_swjprojects/admin/config.xml b/com_swjprojects/admin/config.xml index cfac48a7..ec7e62f8 100644 --- a/com_swjprojects/admin/config.xml +++ b/com_swjprojects/admin/config.xml @@ -11,56 +11,47 @@ label="COM_SWJPROJECTS_PARAMS_IMAGES_FOLDER" description="COM_SWJPROJECTS_PARAMS_IMAGES_FOLDER_DESC" class="input-xxlarge"/> - - - - - - - - - + first="1" last="100" step="1" default="10" + > + view="projects" + class="form-select"/> - + - - - - - - - - + first="1" last="100" step="1" default="10"> + view="versions" + class="form-select"/> + view="version" + class="form-select"/> + view="documentation" + class="form-select"/> + view="document" + class="form-select"/> diff --git a/com_swjprojects/admin/controller.php b/com_swjprojects/admin/controller.php index 6c53be51..a88af043 100644 --- a/com_swjprojects/admin/controller.php +++ b/com_swjprojects/admin/controller.php @@ -1,9 +1,9 @@ + required="true" + layout="joomla.form.field.list-fancy-select"> + view="projects" + class="form-select"/> diff --git a/com_swjprojects/admin/models/forms/document.xml b/com_swjprojects/admin/models/forms/document.xml index 51f826f2..3bfdf6a7 100644 --- a/com_swjprojects/admin/models/forms/document.xml +++ b/com_swjprojects/admin/models/forms/document.xml @@ -18,7 +18,8 @@ + onchange="projectHasChanged(this)" + layout="joomla.form.field.list-fancy-select"> + view="document" + class="form-select"/> diff --git a/com_swjprojects/admin/models/forms/filter_projects.xml b/com_swjprojects/admin/models/forms/filter_projects.xml index 35c4824a..6defb451 100644 --- a/com_swjprojects/admin/models/forms/filter_projects.xml +++ b/com_swjprojects/admin/models/forms/filter_projects.xml @@ -8,7 +8,8 @@ - + diff --git a/com_swjprojects/admin/models/forms/filter_versions.xml b/com_swjprojects/admin/models/forms/filter_versions.xml index b83c7420..5f9f13ab 100644 --- a/com_swjprojects/admin/models/forms/filter_versions.xml +++ b/com_swjprojects/admin/models/forms/filter_versions.xml @@ -8,7 +8,8 @@ - + diff --git a/com_swjprojects/admin/models/forms/key.xml b/com_swjprojects/admin/models/forms/key.xml index 4340c202..fa45b3e2 100644 --- a/com_swjprojects/admin/models/forms/key.xml +++ b/com_swjprojects/admin/models/forms/key.xml @@ -25,7 +25,8 @@ + multiple="true" + layout="joomla.form.field.list-fancy-select"> + required="true" + layout="joomla.form.field.list-fancy-select"> + multiple="true" + layout="joomla.form.field.list-fancy-select"/> + view="project" + class="form-select"/> @@ -131,7 +134,8 @@
+ default="-1" + layout="joomla.form.field.list-fancy-select"> + onchange="projectHasChanged(this)" + layout="joomla.form.field.list-fancy-select"> + view="version" + class="form-select"/>
diff --git a/com_swjprojects/admin/models/key.php b/com_swjprojects/admin/models/key.php index 5eab4584..5bb10eb5 100644 --- a/com_swjprojects/admin/models/key.php +++ b/com_swjprojects/admin/models/key.php @@ -1,9 +1,9 @@ toSql(); } + // Prepare date_end field data + if (isset($data['date_end']) && empty($data['date_end'])) + { + $data['date_end'] = $this->getDbo()->getNullDate(); + } + // Prepare plugins field data - if (isset($data['params'])) + if (isset($data['plugins'])) { $registry = new Registry($data['plugins']); $data['plugins'] = $registry->toString('json', array('bitmask' => JSON_UNESCAPED_UNICODE)); diff --git a/com_swjprojects/admin/models/keys.php b/com_swjprojects/admin/models/keys.php index 2a7473ab..4930a7b0 100644 --- a/com_swjprojects/admin/models/keys.php +++ b/com_swjprojects/admin/models/keys.php @@ -1,9 +1,9 @@ getProjects(implode(',', array_merge(ArrayHelper::getColumn($items, 'projects')))); $users = $this->getUsers(ArrayHelper::getColumn($items, 'user')); + $nullDate = $this->getDbo()->getNullDate(); foreach ($items as &$item) { // Set projects @@ -217,6 +218,9 @@ public function getItems() } else $item->projects = false; + // Set date_end + if ($item->date_end === $nullDate) $item->date_end = false; + // Set user $item->user = (!empty($users[$item->user])) ? $users[$item->user] : false; @@ -236,7 +240,7 @@ public function getItems() * * @return object[] Categories array. * - * @since __DEPLOY_VERSION__ + * @since 1.6.0 */ public function getProjects($pks = null) { @@ -303,7 +307,7 @@ public function getProjects($pks = null) * * @return object[] Users array. * - * @since __DEPLOY_VERSION__ + * @since 1.6.0 */ public function getUsers($pks = null) { @@ -327,7 +331,7 @@ public function getUsers($pks = null) { $db = $this->getDbo(); $query = $db->getQuery(true) - ->select(array('u.id', 'u.name', 'u.username')) + ->select(array('u.id', 'u.name', 'u.username', 'u.email')) ->from($db->quoteName('#__users', 'u')) ->where('u.id IN (' . implode(',', $get) . ')'); diff --git a/com_swjprojects/admin/models/project.php b/com_swjprojects/admin/models/project.php index bb61d2e9..207f1f83 100644 --- a/com_swjprojects/admin/models/project.php +++ b/com_swjprojects/admin/models/project.php @@ -1,9 +1,9 @@ setFieldAttribute('state', 'filter', 'unset'); } + if ((new Version())->isCompatible('4.0')) + { + $form->setFieldAttribute('joomla_version', 'type', 'text'); + } + return $form; } diff --git a/com_swjprojects/admin/models/versions.php b/com_swjprojects/admin/models/versions.php index 80d672d6..bdbbb3b1 100644 --- a/com_swjprojects/admin/models/versions.php +++ b/com_swjprojects/admin/models/versions.php @@ -1,9 +1,9 @@ 'auto', 'relative' => true)); - -$user = Factory::getUser(); -$listOrder = $this->escape($this->state->get('list.ordering')); -$listDirn = $this->escape($this->state->get('list.direction')); -$saveOrder = ($listOrder == 'c.lft' && strtolower($listDirn) == 'asc'); - -if ($saveOrder) -{ - $saveOrderingUrl = 'index.php?option=com_swjprojects&task=categories.saveOrderAjax&tmpl=component'; - HTMLHelper::_('sortablelist.sortable', 'categoriesList', 'adminForm', strtolower($listDirn), $saveOrderingUrl, false, true); -} - -$columns = 5; -?> - -
- sidebar; ?> -
-
- $this)); ?> - items)) : ?> -
- -
- - - - - - - - - - - - - - - - - - items as $i => $item) : - $orderKey = array_search($item->id, $this->ordering[$item->parent_id]); - $canEdit = $user->authorise('core.edit', 'com_swjprojects.category.' . $item->id); - $canChange = $user->authorise('core.edit.state', 'com_swjprojects.category.' . $item->id); - - // Get the parents of item for sorting - if ($item->level > 0) - { - $parentsStr = ''; - $_currentParentId = $item->parent_id; - $parentsStr = ' ' . $_currentParentId; - for ($i2 = 0; $i2 < $item->level; $i2++) - { - foreach ($this->ordering as $k => $v) - { - $v = implode('-', $v); - $v = '-' . $v . '-'; - if (strpos($v, '-' . $_currentParentId . '-') !== false) - { - $parentsStr .= ' ' . $k; - $_currentParentId = $k; - break; - } - } - } - } - else - { - $parentsStr = ''; - } - ?> - - - - - - - - - -
- - - - - - - - - -
- pagination->getListFooter(); ?> -
- - - - - - - id); ?> - -
- state, $i, 'categories.', $canChange); ?> -
-
- $item->level)); ?> - - - escape($item->title); ?> - - - escape($item->title); ?> - - - id; ?> -
- - - - -
- \ No newline at end of file +echo $this->loadTemplate(((new Version())->isCompatible('4.0')) ? 'j4' : 'j3'); \ No newline at end of file diff --git a/com_swjprojects/admin/views/categories/tmpl/default_j3.php b/com_swjprojects/admin/views/categories/tmpl/default_j3.php new file mode 100644 index 00000000..b854d659 --- /dev/null +++ b/com_swjprojects/admin/views/categories/tmpl/default_j3.php @@ -0,0 +1,164 @@ + 'auto', 'relative' => true)); + +$user = Factory::getUser(); +$listOrder = $this->escape($this->state->get('list.ordering')); +$listDirn = $this->escape($this->state->get('list.direction')); +$saveOrder = ($listOrder == 'c.lft' && strtolower($listDirn) == 'asc'); + +if ($saveOrder) +{ + $saveOrderingUrl = 'index.php?option=com_swjprojects&task=categories.saveOrderAjax&tmpl=component'; + HTMLHelper::_('sortablelist.sortable', 'categoriesList', 'adminForm', strtolower($listDirn), $saveOrderingUrl, false, true); +} + +$columns = 5; +?> +
+
+ sidebar; ?> +
+
+ $this)); ?> + items)) : ?> +
+ +
+ + + + + + + + + + + + + + + + + + items as $i => $item) : + $orderKey = array_search($item->id, $this->ordering[$item->parent_id]); + $canEdit = $user->authorise('core.edit', 'com_swjprojects.category.' . $item->id); + $canChange = $user->authorise('core.edit.state', 'com_swjprojects.category.' . $item->id); + + // Get the parents of item for sorting + if ($item->level > 0) + { + $parentsStr = ''; + $_currentParentId = $item->parent_id; + $parentsStr = ' ' . $_currentParentId; + for ($i2 = 0; $i2 < $item->level; $i2++) + { + foreach ($this->ordering as $k => $v) + { + $v = implode('-', $v); + $v = '-' . $v . '-'; + if (strpos($v, '-' . $_currentParentId . '-') !== false) + { + $parentsStr .= ' ' . $k; + $_currentParentId = $k; + break; + } + } + } + } + else + { + $parentsStr = ''; + } + ?> + + + + + + + + + +
+ + + + + + + + + +
+ pagination->getListFooter(); ?> +
+ + + + + + + id); ?> + +
+ state, $i, 'categories.', $canChange); ?> +
+
+ $item->level)); ?> + + + escape($item->title); ?> + + + escape($item->title); ?> + + + id; ?> +
+ + + + +
+
\ No newline at end of file diff --git a/com_swjprojects/admin/views/categories/tmpl/default_j4.php b/com_swjprojects/admin/views/categories/tmpl/default_j4.php new file mode 100644 index 00000000..905c9b1b --- /dev/null +++ b/com_swjprojects/admin/views/categories/tmpl/default_j4.php @@ -0,0 +1,154 @@ + 'auto', 'relative' => true)); + +$user = Factory::getUser(); +$listOrder = $this->escape($this->state->get('list.ordering')); +$listDirn = $this->escape($this->state->get('list.direction')); +$saveOrder = ($listOrder == 'c.lft' && strtolower($listDirn) == 'asc'); + +if ($saveOrder) +{ + $saveOrderingUrl = 'index.php?option=com_swjprojects&task=categories.saveOrderAjax&tmpl=component'; + HTMLHelper::_('draggablelist.draggable'); +} + +$columns = 6; +?> +
+
+
+
+ $this)); ?> + items)) : ?> +
+ + +
+ + + + + + + + + + + + + + + + + class="js-draggable" data-url="" + data-direction="" data-nested="false"> + items as $i => $item) : + $orderKey = array_search($item->id, $this->ordering[$item->parent_id]); + $canEdit = $user->authorise('core.edit', 'com_swjprojects.category.' . $item->id); + $canChange = $user->authorise('core.edit.state', 'com_swjprojects.category.' . $item->id); + $link = ($canEdit) ? Route::_('index.php?option=com_swjprojects&task=category.edit&id=' + . $item->id) : ''; + // Get the parents of item for sorting + if ($item->level > 0) + { + $parentsStr = ''; + $_currentParentId = $item->parent_id; + $parentsStr = ' ' . $_currentParentId; + for ($i2 = 0; $i2 < $item->level; $i2++) + { + foreach ($this->ordering as $k => $v) + { + $v = implode('-', $v); + $v = '-' . $v . '-'; + if (strpos($v, '-' . $_currentParentId . '-') !== false) + { + $parentsStr .= ' ' . $k; + $_currentParentId = $k; + break; + } + } + } + } + else $parentsStr = ''; + ?> + + + + + + + + + +
+ + + + + + + + + +
+ pagination->getResultsCounter(); ?> +
+ id, false, 'cid', 'cb', $item->title); ?> + + + + + + + + + + render((int) $item->state, $i, [ + 'task_prefix' => 'categories.', + 'disabled' => !$canChange, + 'id' => 'state-' . $item->id + ]); ?> + + > + $item->level)); ?> + title; ?> + + id; ?>
+ pagination->getListFooter(); ?> + + + + +
+
+
+
\ No newline at end of file diff --git a/com_swjprojects/admin/views/categories/view.html.php b/com_swjprojects/admin/views/categories/view.html.php index 30e1ca26..6f4f3c88 100644 --- a/com_swjprojects/admin/views/categories/view.html.php +++ b/com_swjprojects/admin/views/categories/view.html.php @@ -1,9 +1,9 @@ $link, 'text' => 'COM_SWJPROJECTS_SUPPORT', 'icon' => 'support', 'new' => true)); - $toolbar->appendButton('Custom', $download, 'support'); + $link = 'https://www.septdir.com/support#solution=SWJProjects'; + $support = LayoutHelper::render('components.swjprojects.toolbar.link', + array('link' => $link, 'text' => 'COM_SWJPROJECTS_SUPPORT', 'icon' => 'support', 'id' => 'toolbarSupport')); + $toolbar->appendButton('Custom', $support, 'support'); // Add donate button - $link = 'https://www.septdir.com/donate#solution=swjprojects'; - $download = LayoutHelper::render('components.swjprojects.toolbar.link', - array('link' => $link, 'text' => 'COM_SWJPROJECTS_DONATE', 'icon' => 'heart', 'new' => true)); - $toolbar->appendButton('Custom', $download, 'donate'); + $link = 'https://www.septdir.com/donate#solution=swjprojects'; + $donate = LayoutHelper::render('components.swjprojects.toolbar.link', + array('link' => $link, 'text' => 'COM_SWJPROJECTS_DONATE', 'icon' => 'heart', 'id' => 'toolbarSupport')); + $toolbar->appendButton('Custom', $donate, 'donate'); } /** diff --git a/com_swjprojects/admin/views/category/tmpl/edit.php b/com_swjprojects/admin/views/category/tmpl/edit.php index 1be3db96..66ee2dfc 100644 --- a/com_swjprojects/admin/views/category/tmpl/edit.php +++ b/com_swjprojects/admin/views/category/tmpl/edit.php @@ -1,75 +1,15 @@ 'auto', 'relative' => true)); - -Factory::getDocument()->addScriptDeclaration(' - Joomla.submitbutton = function(task) - { - if (task == "category.cancel" || document.formvalidator.isValid(document.getElementById("item-form"))) - { - Joomla.submitform(task, document.getElementById("item-form")); - } - }; -'); -?> -
-
- $this->translateForms, 'name' => 'title')); ?> - form->renderField('alias'); ?> -
-
-
- 'general', 'class')); ?> - -
-
-

- -

- $this->translateForms, 'name' => 'description')); ?> -
-
- - -
- $this->translateForms, 'name' => 'metadata')); ?> -
- - -
-
-
- form->renderFieldset('global'); ?> -
-
-
- - - -
\ No newline at end of file +echo $this->loadTemplate(((new Version())->isCompatible('4.0')) ? 'j4' : 'j3'); \ No newline at end of file diff --git a/com_swjprojects/admin/views/category/tmpl/edit_j3.php b/com_swjprojects/admin/views/category/tmpl/edit_j3.php new file mode 100644 index 00000000..47c607e5 --- /dev/null +++ b/com_swjprojects/admin/views/category/tmpl/edit_j3.php @@ -0,0 +1,75 @@ + 'auto', 'relative' => true)); + +Factory::getDocument()->addScriptDeclaration(' + Joomla.submitbutton = function(task) + { + if (task == "category.cancel" || document.formvalidator.isValid(document.getElementById("item-form"))) + { + Joomla.submitform(task, document.getElementById("item-form")); + } + }; +'); +?> +
+
+ $this->translateForms, 'name' => 'title')); ?> + form->renderField('alias'); ?> +
+
+
+ 'general', 'class')); ?> + +
+
+

+ +

+ $this->translateForms, 'name' => 'description')); ?> +
+
+ + +
+ $this->translateForms, 'name' => 'metadata')); ?> +
+ + +
+
+
+ form->renderFieldset('global'); ?> +
+
+
+ + + +
\ No newline at end of file diff --git a/com_swjprojects/admin/views/category/tmpl/edit_j4.php b/com_swjprojects/admin/views/category/tmpl/edit_j4.php new file mode 100644 index 00000000..756d7ff4 --- /dev/null +++ b/com_swjprojects/admin/views/category/tmpl/edit_j4.php @@ -0,0 +1,68 @@ +document->getWebAssetManager() + ->useScript('keepalive') + ->useScript('form.validate'); +HTMLHelper::stylesheet('com_swjprojects/admin-j4.min.css', array('version' => 'auto', 'relative' => true)); + +?> +
+
+
+ $this->translateForms, 'name' => 'title')); ?> +
+
+ form->renderField('alias'); ?> +
+
+
+
+
+ 'general', 'recall' => true, 'breakpoint' => 768]); ?> + +
+ $this->translateForms, 'name' => 'description')); ?> +
+ + + +
+ $this->translateForms, 'name' => 'metadata')); ?> +
+ + + +
+
+
+
+ form->renderFieldset('global'); ?> +
+
+
+
+
+ + + +
\ No newline at end of file diff --git a/com_swjprojects/admin/views/category/view.html.php b/com_swjprojects/admin/views/category/view.html.php index ed4be8f6..3c91ff61 100644 --- a/com_swjprojects/admin/views/category/view.html.php +++ b/com_swjprojects/admin/views/category/view.html.php @@ -1,9 +1,9 @@ item->id == 0); $canDo = SWJProjectsHelper::getActions('com_swjprojects', 'category', $this->item->id); - $toolbar = Toolbar::getInstance('toolbar'); + $toolbar = Toolbar::getInstance(); // Disable menu Factory::getApplication()->input->set('hidemainmenu', true); @@ -122,29 +123,29 @@ protected function addToolbar() // Add cancel button ToolbarHelper::cancel('category.cancel', 'JTOOLBAR_CLOSE'); - // Add preview button - if ($this->item->id) - { - $link = 'index.php?option=com_swjprojects&task=siteRedirect&page=projects&debug=1&id=' . $this->item->id; - $preview = LayoutHelper::render('components.swjprojects.toolbar.link', - array('link' => $link, 'text' => 'JGLOBAL_PREVIEW', 'icon' => 'eye')); - $toolbar->appendButton('Custom', $preview, 'preview'); - } - // Add translate switcher $switcher = LayoutHelper::render('components.swjprojects.translate.switcher'); $toolbar->appendButton('Custom', $switcher, 'translate-switcher'); // Add support button - $link = 'https://www.septdir.com/support#solution=SWJProjects'; - $download = LayoutHelper::render('components.swjprojects.toolbar.link', + $link = 'https://www.septdir.com/support#solution=SWJProjects'; + $support = LayoutHelper::render('components.swjprojects.toolbar.link', array('link' => $link, 'text' => 'COM_SWJPROJECTS_SUPPORT', 'icon' => 'support', 'new' => true)); - $toolbar->appendButton('Custom', $download, 'support'); + $toolbar->appendButton('Custom', $support, 'support'); // Add donate button - $link = 'https://www.septdir.com/donate#solution=swjprojects'; - $download = LayoutHelper::render('components.swjprojects.toolbar.link', + $link = 'https://www.septdir.com/donate#solution=swjprojects'; + $donate = LayoutHelper::render('components.swjprojects.toolbar.link', array('link' => $link, 'text' => 'COM_SWJPROJECTS_DONATE', 'icon' => 'heart', 'new' => true)); - $toolbar->appendButton('Custom', $download, 'donate'); + $toolbar->appendButton('Custom', $donate, 'donate'); + + // Add preview button + if ($this->item->id) + { + $link = 'index.php?option=com_swjprojects&task=siteRedirect&page=projects&debug=1&id=' . $this->item->id; + $preview = LayoutHelper::render('components.swjprojects.toolbar.link', + array('link' => $link, 'text' => 'JGLOBAL_PREVIEW', 'icon' => 'eye')); + $toolbar->appendButton('Custom', $preview, 'preview'); + } } } \ No newline at end of file diff --git a/com_swjprojects/admin/views/document/tmpl/edit.php b/com_swjprojects/admin/views/document/tmpl/edit.php index 53e04ef8..66ee2dfc 100644 --- a/com_swjprojects/admin/views/document/tmpl/edit.php +++ b/com_swjprojects/admin/views/document/tmpl/edit.php @@ -1,86 +1,15 @@ 'auto', 'relative' => true)); - -Factory::getDocument()->addScriptDeclaration(' - Joomla.submitbutton = function(task) - { - if (task == "document.cancel" || document.formvalidator.isValid(document.getElementById("item-form"))) - { - Joomla.submitform(task, document.getElementById("item-form")); - } - }; -'); -?> -
-
- $this->translateForms, 'name' => 'title')); ?> - form->renderField('alias'); ?> -
-
-
- 'general', 'class')); ?> - -
-
-

- -

- $this->translateForms, 'name' => 'introtext')); ?> -
-
-
-

- -

- $this->translateForms, 'name' => 'fulltext')); ?> -
-
- - - - -
- $this->translateForms, 'name' => 'metadata')); ?> -
- - -
-
-
- form->renderFieldset('global'); ?> -
-
-
- - - -
\ No newline at end of file +echo $this->loadTemplate(((new Version())->isCompatible('4.0')) ? 'j4' : 'j3'); \ No newline at end of file diff --git a/com_swjprojects/admin/views/document/tmpl/edit_j3.php b/com_swjprojects/admin/views/document/tmpl/edit_j3.php new file mode 100644 index 00000000..81f93c5b --- /dev/null +++ b/com_swjprojects/admin/views/document/tmpl/edit_j3.php @@ -0,0 +1,86 @@ + 'auto', 'relative' => true)); + +Factory::getDocument()->addScriptDeclaration(' + Joomla.submitbutton = function(task) + { + if (task == "document.cancel" || document.formvalidator.isValid(document.getElementById("item-form"))) + { + Joomla.submitform(task, document.getElementById("item-form")); + } + }; +'); +?> +
+
+ $this->translateForms, 'name' => 'title')); ?> + form->renderField('alias'); ?> +
+
+
+ 'general', 'class')); ?> + +
+
+

+ +

+ $this->translateForms, 'name' => 'introtext')); ?> +
+
+
+

+ +

+ $this->translateForms, 'name' => 'fulltext')); ?> +
+
+ + + + +
+ $this->translateForms, 'name' => 'metadata')); ?> +
+ + +
+
+
+ form->renderFieldset('global'); ?> +
+
+
+ + + +
\ No newline at end of file diff --git a/com_swjprojects/admin/views/document/tmpl/edit_j4.php b/com_swjprojects/admin/views/document/tmpl/edit_j4.php new file mode 100644 index 00000000..bcc16641 --- /dev/null +++ b/com_swjprojects/admin/views/document/tmpl/edit_j4.php @@ -0,0 +1,79 @@ +document->getWebAssetManager() + ->useScript('keepalive') + ->useScript('form.validate'); +HTMLHelper::stylesheet('com_swjprojects/admin-j4.min.css', array('version' => 'auto', 'relative' => true)); + +?> +
+
+
+ $this->translateForms, 'name' => 'title')); ?> +
+
+ form->renderField('alias'); ?> +
+
+
+
+
+ 'general', 'class')); ?> + +
+

+ +

+ $this->translateForms, 'name' => 'introtext')); ?> +
+

+ +

+ $this->translateForms, 'name' => 'fulltext')); ?> +
+ + + + +
+ $this->translateForms, 'name' => 'metadata')); ?> +
+ + +
+
+
+
+ form->renderFieldset('global'); ?> +
+
+
+
+
+ + + +
\ No newline at end of file diff --git a/com_swjprojects/admin/views/document/view.html.php b/com_swjprojects/admin/views/document/view.html.php index 26486eb6..a8cfc442 100644 --- a/com_swjprojects/admin/views/document/view.html.php +++ b/com_swjprojects/admin/views/document/view.html.php @@ -1,9 +1,9 @@ item = $this->get('Item'); $this->project = $this->getModel()->getProject($this->form->getValue('project_id', '', 0)); + + if ((new Version())->isCompatible('4.0')) + { + Factory::getDocument()->addScriptDeclaration("function projectHasChanged(element) { + document.body.appendChild(document.createElement('joomla-core-loader')); + document.querySelector('input[name=task]').value = 'document.reload'; + element.form.submit(); + }"); + } + else + { + Factory::getDocument()->addScriptDeclaration("function projectHasChanged(element) { + var cat = jQuery(element); + Joomla.loadingLayer('show'); + jQuery('input[name=task]').val('document.reload'); + element.form.submit(); + }"); + } + // Check for errors if (count($errors = $this->get('Errors'))) { @@ -120,7 +140,7 @@ protected function addToolbar() { $isNew = ($this->item->id == 0); $canDo = SWJProjectsHelper::getActions('com_swjprojects', 'document', $this->item->id); - $toolbar = Toolbar::getInstance('toolbar'); + $toolbar = Toolbar::getInstance(); // Disable menu Factory::getApplication()->input->set('hidemainmenu', true); @@ -145,32 +165,31 @@ protected function addToolbar() // Add cancel button ToolbarHelper::cancel('document.cancel', 'JTOOLBAR_CLOSE'); - // Add preview & joomla update server buttons - if ($this->item->id) - { - // Preview button - $link = 'index.php?option=com_swjprojects&task=siteRedirect&page=document&debug=1&id=' . $this->item->id - . '&project_id=' . $this->project->id . '&catid=' . $this->project->catid; - $preview = LayoutHelper::render('components.swjprojects.toolbar.link', - array('link' => $link, 'text' => 'JGLOBAL_PREVIEW', 'icon' => 'eye')); - $toolbar->appendButton('Custom', $preview, 'preview'); - - } - // Add translate switcher $switcher = LayoutHelper::render('components.swjprojects.translate.switcher'); $toolbar->appendButton('Custom', $switcher, 'translate-switcher'); // Add support button $link = 'https://www.septdir.com/support#solution=SWJProjects'; - $download = LayoutHelper::render('components.swjprojects.toolbar.link', + $support = LayoutHelper::render('components.swjprojects.toolbar.link', array('link' => $link, 'text' => 'COM_SWJPROJECTS_SUPPORT', 'icon' => 'support', 'new' => true)); - $toolbar->appendButton('Custom', $download, 'support'); + $toolbar->appendButton('Custom', $support, 'support'); // Add donate button $link = 'https://www.septdir.com/donate#solution=swjprojects'; - $download = LayoutHelper::render('components.swjprojects.toolbar.link', + $donate = LayoutHelper::render('components.swjprojects.toolbar.link', array('link' => $link, 'text' => 'COM_SWJPROJECTS_DONATE', 'icon' => 'heart', 'new' => true)); - $toolbar->appendButton('Custom', $download, 'donate'); + $toolbar->appendButton('Custom', $donate, 'donate'); + + // Add preview button + if ($this->item->id) + { + // Preview button + $link = 'index.php?option=com_swjprojects&task=siteRedirect&page=document&debug=1&id=' . $this->item->id + . '&project_id=' . $this->project->id . '&catid=' . $this->project->catid; + $preview = LayoutHelper::render('components.swjprojects.toolbar.link', + array('link' => $link, 'text' => 'JGLOBAL_PREVIEW', 'icon' => 'eye')); + $toolbar->appendButton('Custom', $preview, 'preview'); + } } } \ No newline at end of file diff --git a/com_swjprojects/admin/views/documentation/tmpl/default.php b/com_swjprojects/admin/views/documentation/tmpl/default.php index d7951417..66ee2dfc 100644 --- a/com_swjprojects/admin/views/documentation/tmpl/default.php +++ b/com_swjprojects/admin/views/documentation/tmpl/default.php @@ -1,144 +1,15 @@ 'auto', 'relative' => true)); - -$user = Factory::getUser(); -$listOrder = $this->escape($this->state->get('list.ordering')); -$listDirn = $this->escape($this->state->get('list.direction')); -$saveOrder = ($listOrder == 'd.ordering' && strtolower($listDirn) == 'asc'); - -if ($saveOrder) -{ - $saveOrderingUrl = 'index.php?option=com_swjprojects&task=documentation.saveOrderAjax&tmpl=component'; - HTMLHelper::_('sortablelist.sortable', 'documentationList', 'adminForm', strtolower($listDirn), $saveOrderingUrl); -} - -$columns = 6; -?> -
-
- sidebar; ?> -
-
- $this)); ?> - items)) : ?> -
- -
- - - - - - - - - - - - - - - - - - - items as $i => $item) : - $canEdit = $user->authorise('core.edit', 'com_swjprojects.document.' . $item->id); - $canChange = $user->authorise('core.edit.state', 'com_swjprojects.document.' . $item->id); - ?> - - - - - - - - - - -
- - - - - - - - - - - -
- pagination->getListFooter(); ?> -
- - - - - - - id); ?> - -
- state, $i, 'documentation.', $canChange); ?> -
-
- - - escape($item->title); ?> - - - escape($item->title); ?> - - - escape($item->project_title); ?> - - id; ?> -
- - - - -
-
\ No newline at end of file +echo $this->loadTemplate(((new Version())->isCompatible('4.0')) ? 'j4' : 'j3'); \ No newline at end of file diff --git a/com_swjprojects/admin/views/documentation/tmpl/default_j3.php b/com_swjprojects/admin/views/documentation/tmpl/default_j3.php new file mode 100644 index 00000000..53c5fd2e --- /dev/null +++ b/com_swjprojects/admin/views/documentation/tmpl/default_j3.php @@ -0,0 +1,144 @@ + 'auto', 'relative' => true)); + +$user = Factory::getUser(); +$listOrder = $this->escape($this->state->get('list.ordering')); +$listDirn = $this->escape($this->state->get('list.direction')); +$saveOrder = ($listOrder == 'd.ordering' && strtolower($listDirn) == 'asc'); + +if ($saveOrder) +{ + $saveOrderingUrl = 'index.php?option=com_swjprojects&task=documentation.saveOrderAjax&tmpl=component'; + HTMLHelper::_('sortablelist.sortable', 'documentationList', 'adminForm', strtolower($listDirn), $saveOrderingUrl); +} + +$columns = 6; +?> +
+
+ sidebar; ?> +
+
+ $this)); ?> + items)) : ?> +
+ +
+ + + + + + + + + + + + + + + + + + + items as $i => $item) : + $canEdit = $user->authorise('core.edit', 'com_swjprojects.document.' . $item->id); + $canChange = $user->authorise('core.edit.state', 'com_swjprojects.document.' . $item->id); + ?> + + + + + + + + + + +
+ + + + + + + + + + + +
+ pagination->getListFooter(); ?> +
+ + + + + + + id); ?> + +
+ state, $i, 'documentation.', $canChange); ?> +
+
+ + + escape($item->title); ?> + + + escape($item->title); ?> + + + escape($item->project_title); ?> + + id; ?> +
+ + + + +
+
\ No newline at end of file diff --git a/com_swjprojects/admin/views/documentation/tmpl/default_j4.php b/com_swjprojects/admin/views/documentation/tmpl/default_j4.php new file mode 100644 index 00000000..25654b63 --- /dev/null +++ b/com_swjprojects/admin/views/documentation/tmpl/default_j4.php @@ -0,0 +1,143 @@ + 'auto', 'relative' => true)); + +$user = Factory::getUser(); +$listOrder = $this->escape($this->state->get('list.ordering')); +$listDirn = $this->escape($this->state->get('list.direction')); +$saveOrder = ($listOrder == 'd.ordering' && strtolower($listDirn) == 'asc'); + +if ($saveOrder) +{ + $saveOrderingUrl = 'index.php?option=com_swjprojects&task=documentation.saveOrderAjax&tmpl=component&' . Session::getFormToken() . '=1'; + HTMLHelper::_('draggablelist.draggable'); +} + +$columns = 8; +?> + +
+
+
+
+ $this)); ?> + items)) : ?> +
+ + +
+ + + + + + + + + + + + + + + + + + class="js-draggable" data-url="" + data-direction="" data-nested="true"> + items as $i => $item) : + $canEdit = $user->authorise('core.edit', 'com_swjprojects.document.' . $item->id); + $canChange = $user->authorise('core.edit.state', 'com_swjprojects.document.' . $item->id); + $link = ($canEdit) ? Route::_('index.php?option=com_swjprojects&task=document.edit&id=' + . $item->id) : ''; + ?> + + + + + + + + + + +
+ + + + + + + + + + + +
+ pagination->getResultsCounter(); ?> +
+ id, false, 'cid', 'cb', $item->title); ?> + + + + + + + + + + render((int) $item->state, $i, [ + 'task_prefix' => 'documentation.', + 'disabled' => !$canChange, + 'id' => 'state-' . $item->id + ]); ?> + + > + title; ?> + + + escape($item->project_title); ?> + id; ?>
+ pagination->getListFooter(); ?> + + + + +
+
+
+
\ No newline at end of file diff --git a/com_swjprojects/admin/views/documentation/view.html.php b/com_swjprojects/admin/views/documentation/view.html.php index 60f9bdcc..4150aaab 100644 --- a/com_swjprojects/admin/views/documentation/view.html.php +++ b/com_swjprojects/admin/views/documentation/view.html.php @@ -1,9 +1,9 @@ $link, 'text' => 'COM_SWJPROJECTS_SUPPORT', 'icon' => 'support', 'new' => true)); - $toolbar->appendButton('Custom', $download, 'support'); + $toolbar->appendButton('Custom', $support, 'support'); // Add donate button - $link = 'https://www.septdir.com/donate#solution=swjprojects'; - $download = LayoutHelper::render('components.swjprojects.toolbar.link', + $link = 'https://www.septdir.com/donate#solution=swjprojects'; + $donate = LayoutHelper::render('components.swjprojects.toolbar.link', array('link' => $link, 'text' => 'COM_SWJPROJECTS_DONATE', 'icon' => 'heart', 'new' => true)); - $toolbar->appendButton('Custom', $download, 'donate'); + $toolbar->appendButton('Custom', $donate, 'donate'); } /** @@ -186,11 +187,11 @@ protected function addToolbar() protected function getSortFields() { return [ - 'd.state' => Text::_('JSTATUS'), - 'd.id' => Text::_('JGRID_HEADING_ID'), - 'd.title' => Text::_('JGLOBAL_TITLE'), - 'project_title' => Text::_('COM_SWJPROJECTS_PROJECT'), - 'd.ordering' => Text::_('JGRID_HEADING_ORDERING') + 'd.state' => Text::_('JSTATUS'), + 'd.id' => Text::_('JGRID_HEADING_ID'), + 'd.title' => Text::_('JGLOBAL_TITLE'), + 'project_title' => Text::_('COM_SWJPROJECTS_PROJECT'), + 'd.ordering' => Text::_('JGRID_HEADING_ORDERING') ]; } } \ No newline at end of file diff --git a/com_swjprojects/admin/views/key/tmpl/edit.php b/com_swjprojects/admin/views/key/tmpl/edit.php index b6aed45e..66ee2dfc 100644 --- a/com_swjprojects/admin/views/key/tmpl/edit.php +++ b/com_swjprojects/admin/views/key/tmpl/edit.php @@ -1,57 +1,15 @@ 0)); -HTMLHelper::_('formbehavior.chosen', 'select'); -HTMLHelper::stylesheet('com_swjprojects/admin.min.css', array('version' => 'auto', 'relative' => true)); - -Factory::getDocument()->addScriptDeclaration(' - Joomla.submitbutton = function(task) - { - if (task == "key.cancel" || document.formvalidator.isValid(document.getElementById("item-form"))) - { - Joomla.submitform(task, document.getElementById("item-form")); - } - }; -'); -?> -
-
-
-
- form->renderFieldset('key'); ?> -
-
-
- form->renderFieldset('plugins'); ?> -
-
-
-
- form->renderFieldset('global'); ?> -
-
-
- - - -
\ No newline at end of file +echo $this->loadTemplate(((new Version())->isCompatible('4.0')) ? 'j4' : 'j3'); \ No newline at end of file diff --git a/com_swjprojects/admin/views/key/tmpl/edit_j3.php b/com_swjprojects/admin/views/key/tmpl/edit_j3.php new file mode 100644 index 00000000..27ffe1f6 --- /dev/null +++ b/com_swjprojects/admin/views/key/tmpl/edit_j3.php @@ -0,0 +1,57 @@ + 0)); +HTMLHelper::_('formbehavior.chosen', 'select'); +HTMLHelper::stylesheet('com_swjprojects/admin-j3.min.css', array('version' => 'auto', 'relative' => true)); + +Factory::getDocument()->addScriptDeclaration(' + Joomla.submitbutton = function(task) + { + if (task == "key.cancel" || document.formvalidator.isValid(document.getElementById("item-form"))) + { + Joomla.submitform(task, document.getElementById("item-form")); + } + }; +'); +?> +
+
+
+
+ form->renderFieldset('key'); ?> +
+
+
+ form->renderFieldset('plugins'); ?> +
+
+
+
+ form->renderFieldset('global'); ?> +
+
+
+ + + +
\ No newline at end of file diff --git a/com_swjprojects/admin/views/key/tmpl/edit_j4.php b/com_swjprojects/admin/views/key/tmpl/edit_j4.php new file mode 100644 index 00000000..7aca3f7f --- /dev/null +++ b/com_swjprojects/admin/views/key/tmpl/edit_j4.php @@ -0,0 +1,50 @@ +document->getWebAssetManager() + ->useScript('keepalive') + ->useScript('form.validate'); +HTMLHelper::stylesheet('com_swjprojects/admin-j4.min.css', array('version' => 'auto', 'relative' => true)); +?> +
+
+
+
+ 'general', 'recall' => true, 'breakpoint' => 768]); ?> + +
+ form->renderFieldset('key'); ?> + form->renderFieldset('plugins'); ?> +
+ + +
+
+
+
+ form->renderFieldset('global'); ?> +
+
+
+
+
+ + + +
\ No newline at end of file diff --git a/com_swjprojects/admin/views/key/view.html.php b/com_swjprojects/admin/views/key/view.html.php index 2a942a88..e9f3c719 100644 --- a/com_swjprojects/admin/views/key/view.html.php +++ b/com_swjprojects/admin/views/key/view.html.php @@ -1,9 +1,9 @@ item->id == 0); - $canDo = SWJProjectsHelper::getActions('com_swjprojects', 'key', $this->item->id); - $toolbar = Toolbar::getInstance('toolbar'); + $isNew = ($this->item->id == 0); + $canDo = SWJProjectsHelper::getActions('com_swjprojects', 'key', $this->item->id); + $toolbar = Toolbar::getInstance(); // Disable menu Factory::getApplication()->input->set('hidemainmenu', true); @@ -119,15 +120,15 @@ protected function addToolbar() ToolbarHelper::cancel('key.cancel', 'JTOOLBAR_CLOSE'); // Add support button - $link = 'https://www.septdir.com/support#solution=SWJProjects'; - $download = LayoutHelper::render('components.swjprojects.toolbar.link', + $link = 'https://www.septdir.com/support#solution=SWJProjects'; + $support = LayoutHelper::render('components.swjprojects.toolbar.link', array('link' => $link, 'text' => 'COM_SWJPROJECTS_SUPPORT', 'icon' => 'support', 'new' => true)); - $toolbar->appendButton('Custom', $download, 'support'); + $toolbar->appendButton('Custom', $support, 'support'); // Add donate button - $link = 'https://www.septdir.com/donate#solution=swjprojects'; - $download = LayoutHelper::render('components.swjprojects.toolbar.link', + $link = 'https://www.septdir.com/donate#solution=swjprojects'; + $donate = LayoutHelper::render('components.swjprojects.toolbar.link', array('link' => $link, 'text' => 'COM_SWJPROJECTS_DONATE', 'icon' => 'heart', 'new' => true)); - $toolbar->appendButton('Custom', $download, 'donate'); + $toolbar->appendButton('Custom', $donate, 'donate'); } } \ No newline at end of file diff --git a/com_swjprojects/admin/views/keys/tmpl/default.php b/com_swjprojects/admin/views/keys/tmpl/default.php index 236c4822..66ee2dfc 100644 --- a/com_swjprojects/admin/views/keys/tmpl/default.php +++ b/com_swjprojects/admin/views/keys/tmpl/default.php @@ -1,134 +1,15 @@ 'auto', 'relative' => true)); - -$user = Factory::getUser(); -$listOrder = $this->escape($this->state->get('list.ordering')); -$listDirn = $this->escape($this->state->get('list.direction')); - -$columns = 9; -?> -
-
- sidebar; ?> -
-
- $this)); ?> - items)) : ?> -
- -
- - - - - - - - - - - - - - - - - - - - - items as $i => $item) : - $canEdit = $user->authorise('core.edit', 'com_swjprojects.version.' . $item->id); - $canChange = $user->authorise('core.edit.state', 'com_swjprojects.version.' . $item->id); - ?> - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- pagination->getListFooter(); ?> -
- id); ?> - -
- state, $i, 'keys.', $canChange); ?> -
-
-
- - - escape($item->key); ?> - - - escape($item->key); ?> - -
-
- order; ?> - - projects, 'title')); ?> - - date_start, Text::_('DATE_FORMAT_LC6')); ?> - - date_end > 0) ? - HTMLHelper::_('date', $item->date_end, Text::_('DATE_FORMAT_LC6')) - : Text::_('JNEVER'); ?> - - id; ?> -
- - - - -
-
\ No newline at end of file +echo $this->loadTemplate(((new Version())->isCompatible('4.0')) ? 'j4' : 'j3'); \ No newline at end of file diff --git a/com_swjprojects/admin/views/keys/tmpl/default_j3.php b/com_swjprojects/admin/views/keys/tmpl/default_j3.php new file mode 100644 index 00000000..c8c19d1f --- /dev/null +++ b/com_swjprojects/admin/views/keys/tmpl/default_j3.php @@ -0,0 +1,140 @@ + 'auto', 'relative' => true)); + +$user = Factory::getUser(); +$listOrder = $this->escape($this->state->get('list.ordering')); +$listDirn = $this->escape($this->state->get('list.direction')); + +$columns = 9; +?> +
+
+ sidebar; ?> +
+
+ $this)); ?> + items)) : ?> +
+ +
+ + + + + + + + + + + + + + + + + + + + + + items as $i => $item) : + $canEdit = $user->authorise('core.edit', 'com_swjprojects.version.' . $item->id); + $canChange = $user->authorise('core.edit.state', 'com_swjprojects.version.' . $item->id); + ?> + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ pagination->getListFooter(); ?> +
+ id); ?> + +
+ state, $i, 'keys.', $canChange); ?> +
+
+
+ + + escape($item->key); ?> + + + escape($item->key); ?> + +
+
+ order; ?> + + user)) echo $item->user->name . ' (' . $item->user->email . ')'; ?> + + projects, 'title')); ?> + + date_start, Text::_('DATE_FORMAT_LC6')); ?> + + date_end > 0) ? + HTMLHelper::_('date', $item->date_end, Text::_('DATE_FORMAT_LC6')) + : Text::_('JNEVER'); ?> + + id; ?> +
+ + + + +
+
\ No newline at end of file diff --git a/com_swjprojects/admin/views/keys/tmpl/default_j4.php b/com_swjprojects/admin/views/keys/tmpl/default_j4.php new file mode 100644 index 00000000..c59b1663 --- /dev/null +++ b/com_swjprojects/admin/views/keys/tmpl/default_j4.php @@ -0,0 +1,139 @@ + 'auto', 'relative' => true)); + +$user = Factory::getUser(); +$listOrder = $this->escape($this->state->get('list.ordering')); +$listDirn = $this->escape($this->state->get('list.direction')); + +$columns = 9; +?> +
+
+
+
+ $this)); ?> + items)) : ?> +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + items as $i => $item) : + $canEdit = $user->authorise('core.edit', 'com_swjprojects.key.' . $item->id); + $canChange = $user->authorise('core.edit.state', 'com_swjprojects.key.' . $item->id); + $link = ($canEdit) ? Route::_('index.php?option=com_swjprojects&task=key.edit&id=' + . $item->id) : ''; + ?> + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ pagination->getResultsCounter(); ?> +
+ id, false, 'cid', 'cb', $item->key); ?> + + render((int) $item->state, $i, [ + 'task_prefix' => 'keys.', + 'disabled' => !$canChange, + 'id' => 'state-' . $item->id + ]); ?> + + > + escape($item->key); ?> + + + order; ?> + + user)) echo $item->user->name . ' (' . $item->user->email . ')'; ?> + + projects, 'title')); ?> + + date_start, Text::_('DATE_FORMAT_LC5')); ?> + + date_end > 0) ? + HTMLHelper::_('date', $item->date_end, Text::_('DATE_FORMAT_LC5')) + : Text::_('JNEVER'); ?> + id; ?>
+ pagination->getListFooter(); ?> + + + + +
+
+
+
\ No newline at end of file diff --git a/com_swjprojects/admin/views/keys/view.html.php b/com_swjprojects/admin/views/keys/view.html.php index 885e9bb2..803b5d65 100644 --- a/com_swjprojects/admin/views/keys/view.html.php +++ b/com_swjprojects/admin/views/keys/view.html.php @@ -1,9 +1,9 @@ $link, 'text' => 'COM_SWJPROJECTS_SUPPORT', 'icon' => 'support', 'new' => true)); - $toolbar->appendButton('Custom', $download, 'support'); + $toolbar->appendButton('Custom', $support, 'support'); // Add donate button - $link = 'https://www.septdir.com/donate#solution=swjprojects'; - $download = LayoutHelper::render('components.swjprojects.toolbar.link', + $link = 'https://www.septdir.com/donate#solution=swjprojects'; + $donate = LayoutHelper::render('components.swjprojects.toolbar.link', array('link' => $link, 'text' => 'COM_SWJPROJECTS_DONATE', 'icon' => 'heart', 'new' => true)); - $toolbar->appendButton('Custom', $download, 'donate'); + $toolbar->appendButton('Custom', $donate, 'donate'); } /** diff --git a/com_swjprojects/admin/views/project/tmpl/edit.php b/com_swjprojects/admin/views/project/tmpl/edit.php index 8af437ee..66ee2dfc 100644 --- a/com_swjprojects/admin/views/project/tmpl/edit.php +++ b/com_swjprojects/admin/views/project/tmpl/edit.php @@ -1,162 +1,15 @@ 'auto', 'relative' => true)); - -Factory::getDocument()->addScriptDeclaration(' - Joomla.submitbutton = function (task) { - if (task == "project.cancel" || document.formvalidator.isValid(document.getElementById("item-form"))) { - let form = document.querySelector("#item-form"), - mSelects = form.querySelectorAll("select[multiple]"); - for (let i = 0; i < mSelects.length; i++) { - let item = mSelects[i]; - if (item.value === "") { - let newInput = document.createElement("input"); - newInput.setAttribute("name", item.getAttribute("name").replace("[]", "")); - newInput.setAttribute("type", "hidden"); - form.append(newInput); - } - } - Joomla.submitform(task, document.getElementById("item-form")); - } - }; -'); -?> -
-
- $this->translateForms, 'name' => 'title')); ?> - form->renderField('element'); ?> - form->renderField('alias'); ?> -
-
-
- 'general', 'class')); ?> - -
-
-

- -

- $this->translateForms, 'name' => 'introtext')); ?> -
-
-
-

- -

- $this->translateForms, 'name' => 'fulltext')); ?> -
-
- - -
- form->renderFieldset('payment'); ?> - $this->translateForms, 'name' => 'payment')); ?> -
- - - -
- form->renderFieldset('joomla'); ?> -
- - - -
- form->renderFieldset('urls'); ?> -
- - - -
- form->getInput('relations'); ?> -
- - - -
- item->id)): ?> -
- -
- - $this->translateForms, 'name' => 'images')); ?> - -
- - - -
-
-
-

- -

- $this->translateForms, 'name' => 'metadata_project')); ?> -
-
-

- -

- $this->translateForms, 'name' => 'metadata_versions')); ?> -
-
-
-
-

- -

- $this->translateForms, 'name' => 'metadata_documentation')); ?> -
-
-
- - -
-
-
- form->renderFieldset('global'); ?> -
-
-

- -

- form->renderFieldset('statistics'); ?> -
-
-
- - - -
\ No newline at end of file +echo $this->loadTemplate(((new Version())->isCompatible('4.0')) ? 'j4' : 'j3'); \ No newline at end of file diff --git a/com_swjprojects/admin/views/project/tmpl/edit_j3.php b/com_swjprojects/admin/views/project/tmpl/edit_j3.php new file mode 100644 index 00000000..78d4c9f3 --- /dev/null +++ b/com_swjprojects/admin/views/project/tmpl/edit_j3.php @@ -0,0 +1,162 @@ + 'auto', 'relative' => true)); + +Factory::getDocument()->addScriptDeclaration(' + Joomla.submitbutton = function (task) { + if (task == "project.cancel" || document.formvalidator.isValid(document.getElementById("item-form"))) { + let form = document.querySelector("#item-form"), + mSelects = form.querySelectorAll("select[multiple]"); + for (let i = 0; i < mSelects.length; i++) { + let item = mSelects[i]; + if (item.value === "") { + let newInput = document.createElement("input"); + newInput.setAttribute("name", item.getAttribute("name").replace("[]", "")); + newInput.setAttribute("type", "hidden"); + form.append(newInput); + } + } + Joomla.submitform(task, document.getElementById("item-form")); + } + }; +'); +?> +
+
+ $this->translateForms, 'name' => 'title')); ?> + form->renderField('element'); ?> + form->renderField('alias'); ?> +
+
+
+ 'general', 'class')); ?> + +
+
+

+ +

+ $this->translateForms, 'name' => 'introtext')); ?> +
+
+
+

+ +

+ $this->translateForms, 'name' => 'fulltext')); ?> +
+
+ + +
+ form->renderFieldset('payment'); ?> + $this->translateForms, 'name' => 'payment')); ?> +
+ + + +
+ form->renderFieldset('joomla'); ?> +
+ + + +
+ form->renderFieldset('urls'); ?> +
+ + + +
+ form->getInput('relations'); ?> +
+ + + +
+ item->id)): ?> +
+ +
+ + $this->translateForms, 'name' => 'images')); ?> + +
+ + + +
+
+
+

+ +

+ $this->translateForms, 'name' => 'metadata_project')); ?> +
+
+

+ +

+ $this->translateForms, 'name' => 'metadata_versions')); ?> +
+
+
+
+

+ +

+ $this->translateForms, 'name' => 'metadata_documentation')); ?> +
+
+
+ + +
+
+
+ form->renderFieldset('global'); ?> +
+
+

+ +

+ form->renderFieldset('statistics'); ?> +
+
+
+ + + +
\ No newline at end of file diff --git a/com_swjprojects/admin/views/project/tmpl/edit_j4.php b/com_swjprojects/admin/views/project/tmpl/edit_j4.php new file mode 100644 index 00000000..8daf07e2 --- /dev/null +++ b/com_swjprojects/admin/views/project/tmpl/edit_j4.php @@ -0,0 +1,145 @@ +document->getWebAssetManager() + ->useScript('keepalive') + ->useScript('form.validate'); +HTMLHelper::stylesheet('com_swjprojects/admin-j4.min.css', array('version' => 'auto', 'relative' => true)); +?> +
+
+
+ $this->translateForms, 'name' => 'title')); ?> +
+
+ form->renderField('element'); ?> +
+
+ form->renderField('alias'); ?> +
+
+
+
+
+ 'general', 'class')); ?> + +
+

+ +

+ $this->translateForms, 'name' => 'introtext')); ?> +
+

+ +

+ $this->translateForms, 'name' => 'fulltext')); ?> +
+ + +
+ form->renderFieldset('payment'); ?> + $this->translateForms, 'name' => 'payment')); ?> +
+ + + +
+ form->renderFieldset('joomla'); ?> +
+ + + +
+ form->renderFieldset('urls'); ?> +
+ + + +
+ form->getInput('relations'); ?> +
+ + + +
+ item->id)): ?> +
+ +
+ + $this->translateForms, 'name' => 'images')); ?> + +
+ + + +
+
+
+

+ +

+ $this->translateForms, 'name' => 'metadata_project')); ?> +
+
+

+ +

+ $this->translateForms, 'name' => 'metadata_versions')); ?> +
+
+
+
+

+ +

+ $this->translateForms, 'name' => 'metadata_documentation')); ?> +
+
+
+ + +
+
+
+
+ form->renderFieldset('global'); ?> +
+
+ + form->renderFieldset('statistics'); ?> +
+
+
+
+
+ + + +
\ No newline at end of file diff --git a/com_swjprojects/admin/views/project/view.html.php b/com_swjprojects/admin/views/project/view.html.php index ec2cdf37..12c58751 100644 --- a/com_swjprojects/admin/views/project/view.html.php +++ b/com_swjprojects/admin/views/project/view.html.php @@ -1,9 +1,9 @@ item->id == 0); - $canDo = SWJProjectsHelper::getActions('com_swjprojects', 'project', $this->item->id); - $toolbar = Toolbar::getInstance('toolbar'); + $isNew = ($this->item->id == 0); + $canDo = SWJProjectsHelper::getActions('com_swjprojects', 'project', $this->item->id); + $toolbar = Toolbar::getInstance(); // Disable menu Factory::getApplication()->input->set('hidemainmenu', true); @@ -123,16 +124,9 @@ protected function addToolbar() // Add cancel button ToolbarHelper::cancel('project.cancel', 'JTOOLBAR_CLOSE'); - // Add preview & joomla update server buttons + // Add лoomla update server buttons if ($this->item->id) { - // Preview button - $link = 'index.php?option=com_swjprojects&task=siteRedirect&page=project&debug=1&id=' . $this->item->id - . '&catid=' . $this->item->catid; - $preview = LayoutHelper::render('components.swjprojects.toolbar.link', - array('link' => $link, 'text' => 'JGLOBAL_PREVIEW', 'icon' => 'eye')); - $toolbar->appendButton('Custom', $preview, 'preview'); - // Joomla update server button $link = 'index.php?option=com_swjprojects&task=siteRedirect&page=jupdate&debug=1&element=' . $this->item->element; if ($this->item->download_type === 'paid') @@ -149,15 +143,26 @@ protected function addToolbar() $toolbar->appendButton('Custom', $switcher, 'translate-switcher'); // Add support button - $link = 'https://www.septdir.com/support#solution=SWJProjects'; - $download = LayoutHelper::render('components.swjprojects.toolbar.link', + $link = 'https://www.septdir.com/support#solution=SWJProjects'; + $support = LayoutHelper::render('components.swjprojects.toolbar.link', array('link' => $link, 'text' => 'COM_SWJPROJECTS_SUPPORT', 'icon' => 'support', 'new' => true)); - $toolbar->appendButton('Custom', $download, 'support'); + $toolbar->appendButton('Custom', $support, 'support'); // Add donate button - $link = 'https://www.septdir.com/donate#solution=swjprojects'; - $download = LayoutHelper::render('components.swjprojects.toolbar.link', + $link = 'https://www.septdir.com/donate#solution=swjprojects'; + $donate = LayoutHelper::render('components.swjprojects.toolbar.link', array('link' => $link, 'text' => 'COM_SWJPROJECTS_DONATE', 'icon' => 'heart', 'new' => true)); - $toolbar->appendButton('Custom', $download, 'donate'); + $toolbar->appendButton('Custom', $donate, 'donate'); + + // Add preview button + if ($this->item->id) + { + + $link = 'index.php?option=com_swjprojects&task=siteRedirect&page=project&debug=1&id=' . $this->item->id + . '&catid=' . $this->item->catid; + $preview = LayoutHelper::render('components.swjprojects.toolbar.link', + array('link' => $link, 'text' => 'JGLOBAL_PREVIEW', 'icon' => 'eye')); + $toolbar->appendButton('Custom', $preview, 'preview'); + } } } \ No newline at end of file diff --git a/com_swjprojects/admin/views/projects/tmpl/default.php b/com_swjprojects/admin/views/projects/tmpl/default.php index 9b695f7c..66ee2dfc 100644 --- a/com_swjprojects/admin/views/projects/tmpl/default.php +++ b/com_swjprojects/admin/views/projects/tmpl/default.php @@ -1,168 +1,15 @@ 'auto', 'relative' => true)); - -$user = Factory::getUser(); -$listOrder = $this->escape($this->state->get('list.ordering')); -$listDirn = $this->escape($this->state->get('list.direction')); -$saveOrder = ($listOrder == 'p.ordering' && strtolower($listDirn) == 'asc'); - -if ($saveOrder) -{ - $saveOrderingUrl = 'index.php?option=com_swjprojects&task=projects.saveOrderAjax&tmpl=component'; - HTMLHelper::_('sortablelist.sortable', 'projectsList', 'adminForm', strtolower($listDirn), $saveOrderingUrl); -} - -$columns = 8; -?> -
-
- sidebar; ?> -
-
- $this)); ?> - items)) : ?> -
- -
- - - - - - - - - - - - - - - - - - - - - - items as $i => $item) : - $canEdit = $user->authorise('core.edit', 'com_swjprojects.project.' . $item->id); - $canChange = $user->authorise('core.edit.state', 'com_swjprojects.project.' . $item->id); - ?> - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - -
- pagination->getListFooter(); ?> -
- - - - - - - id); ?> - -
- state, $i, 'projects.', $canChange); ?> -
-
- - - escape($item->title); ?> - - - escape($item->title); ?> - - - escape($item->category_title)); ?> - - download_type); ?> - - - downloads; ?> - - - - hits; ?> - - - id; ?> -
- - - - -
-
\ No newline at end of file +echo $this->loadTemplate(((new Version())->isCompatible('4.0')) ? 'j4' : 'j3'); \ No newline at end of file diff --git a/com_swjprojects/admin/views/projects/tmpl/default_j3.php b/com_swjprojects/admin/views/projects/tmpl/default_j3.php new file mode 100644 index 00000000..b297d7ef --- /dev/null +++ b/com_swjprojects/admin/views/projects/tmpl/default_j3.php @@ -0,0 +1,168 @@ + 'auto', 'relative' => true)); + +$user = Factory::getUser(); +$listOrder = $this->escape($this->state->get('list.ordering')); +$listDirn = $this->escape($this->state->get('list.direction')); +$saveOrder = ($listOrder == 'p.ordering' && strtolower($listDirn) == 'asc'); + +if ($saveOrder) +{ + $saveOrderingUrl = 'index.php?option=com_swjprojects&task=projects.saveOrderAjax&tmpl=component'; + HTMLHelper::_('sortablelist.sortable', 'projectsList', 'adminForm', strtolower($listDirn), $saveOrderingUrl); +} + +$columns = 8; +?> +
+
+ sidebar; ?> +
+
+ $this)); ?> + items)) : ?> +
+ +
+ + + + + + + + + + + + + + + + + + + + + + items as $i => $item) : + $canEdit = $user->authorise('core.edit', 'com_swjprojects.project.' . $item->id); + $canChange = $user->authorise('core.edit.state', 'com_swjprojects.project.' . $item->id); + ?> + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ pagination->getListFooter(); ?> +
+ + + + + + + id); ?> + +
+ state, $i, 'projects.', $canChange); ?> +
+
+ + + escape($item->title); ?> + + + escape($item->title); ?> + + + escape($item->category_title)); ?> + + download_type); ?> + + + downloads; ?> + + + + hits; ?> + + + id; ?> +
+ + + + +
+
\ No newline at end of file diff --git a/com_swjprojects/admin/views/projects/tmpl/default_j4.php b/com_swjprojects/admin/views/projects/tmpl/default_j4.php new file mode 100644 index 00000000..6024392f --- /dev/null +++ b/com_swjprojects/admin/views/projects/tmpl/default_j4.php @@ -0,0 +1,179 @@ + 'auto', 'relative' => true)); + +$user = Factory::getUser(); +$listOrder = $this->escape($this->state->get('list.ordering')); +$listDirn = $this->escape($this->state->get('list.direction')); +$saveOrder = ($listOrder == 'p.ordering' && strtolower($listDirn) == 'asc'); + +if ($saveOrder) +{ + $saveOrderingUrl = 'index.php?option=com_swjprojects&task=projects.saveOrderAjax&tmpl=component&' . Session::getFormToken() . '=1'; + HTMLHelper::_('draggablelist.draggable'); +} + +$columns = 9; +?> + +
+
+
+
+ $this)); ?> + items)) : ?> +
+ + +
+ + + + + + + + + + + + + + + + + + + + + class="js-draggable" data-url="" + data-direction="" data-nested="true"> + items as $i => $item) : + $canEdit = $user->authorise('core.edit', 'com_swjprojects.project.' . $item->id); + $canChange = $user->authorise('core.edit.state', 'com_swjprojects.project.' . $item->id); + $link = ($canEdit) ? Route::_('index.php?option=com_swjprojects&task=project.edit&id=' + . $item->id) : ''; + ?> + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ pagination->getResultsCounter(); ?> +
+ id, false, 'cid', 'cb', $item->title); ?> + + + + + + + + + + render((int) $item->state, $i, [ + 'task_prefix' => 'projects.', + 'disabled' => !$canChange, + 'id' => 'state-' . $item->id + ]); ?> + + > +
+ title; ?> + code)): ?> + (code; ?>) + +
+ categories) && $item->state != 2): ?> +
+ categories, 'title')); ?> +
+ +
+
+ escape($item->category_title)); ?> + + download_type); ?> + + + downloads; ?> + + + + hits; ?> + + id; ?>
+ pagination->getListFooter(); ?> + + + + +
+
+
+
\ No newline at end of file diff --git a/com_swjprojects/admin/views/projects/view.html.php b/com_swjprojects/admin/views/projects/view.html.php index eea8d883..010df2a0 100644 --- a/com_swjprojects/admin/views/projects/view.html.php +++ b/com_swjprojects/admin/views/projects/view.html.php @@ -1,9 +1,9 @@ $link, 'text' => 'COM_SWJPROJECTS_JOOMLA_UPDATE_SERVER', 'icon' => 'joomla')); $toolbar->appendButton('Custom', $jupdate, 'joomla'); + // Add preferences button if ($canDo->get('core.admin') || $canDo->get('core.options')) { @@ -160,16 +162,16 @@ protected function addToolbar() } // Add support button - $link = 'https://www.septdir.com/support#solution=SWJProjects'; - $download = LayoutHelper::render('components.swjprojects.toolbar.link', + $link = 'https://www.septdir.com/support#solution=SWJProjects'; + $support = LayoutHelper::render('components.swjprojects.toolbar.link', array('link' => $link, 'text' => 'COM_SWJPROJECTS_SUPPORT', 'icon' => 'support', 'new' => true)); - $toolbar->appendButton('Custom', $download, 'support'); + $toolbar->appendButton('Custom', $support, 'support'); // Add donate button - $link = 'https://www.septdir.com/donate#solution=swjprojects'; - $download = LayoutHelper::render('components.swjprojects.toolbar.link', + $link = 'https://www.septdir.com/donate#solution=swjprojects'; + $donate = LayoutHelper::render('components.swjprojects.toolbar.link', array('link' => $link, 'text' => 'COM_SWJPROJECTS_DONATE', 'icon' => 'heart', 'new' => true)); - $toolbar->appendButton('Custom', $download, 'donate'); + $toolbar->appendButton('Custom', $donate, 'donate'); } /** diff --git a/com_swjprojects/admin/views/version/tmpl/edit.php b/com_swjprojects/admin/views/version/tmpl/edit.php index f06c3213..66ee2dfc 100644 --- a/com_swjprojects/admin/views/version/tmpl/edit.php +++ b/com_swjprojects/admin/views/version/tmpl/edit.php @@ -1,116 +1,15 @@ 0)); -HTMLHelper::_('formbehavior.chosen', 'select'); -HTMLHelper::stylesheet('com_swjprojects/admin.min.css', array('version' => 'auto', 'relative' => true)); - -Factory::getDocument()->addScriptDeclaration(' - Joomla.submitbutton = function(task) - { - if (task == "version.cancel" || document.formvalidator.isValid(document.getElementById("item-form"))) - { - Joomla.submitform(task, document.getElementById("item-form")); - } - }; -'); -?> -
-
- form->renderField('project_id'); ?> -
-
- -  * -
-
- form->setFieldAttribute('stage', 'hiddenLabel', 'true'); - echo $this->form->getInput('major') - . $this->form->getInput('minor') - . $this->form->getInput('micro') - . $this->form->getInput('tag') - . $this->form->renderField('stage'); - ?> -
-
-
-
-
- 'general', 'class')); ?> - -
-
-

- -

- $this->translateForms, 'name' => 'changelog')); ?> -
-
- - -
- $this->translateForms, 'name' => 'metadata')); ?> -
- - -
-
-
-
-
- -
-
- item->file): ?> - - - - - - - - -
-
- form->renderFieldset('file'); ?> -
-
- form->renderFieldset('global'); ?> -
-
-

- -

- form->renderFieldset('statistics'); ?> -
-
-
- - - -
\ No newline at end of file +echo $this->loadTemplate(((new Version())->isCompatible('4.0')) ? 'j4' : 'j3'); \ No newline at end of file diff --git a/com_swjprojects/admin/views/version/tmpl/edit_j3.php b/com_swjprojects/admin/views/version/tmpl/edit_j3.php new file mode 100644 index 00000000..1e7ce801 --- /dev/null +++ b/com_swjprojects/admin/views/version/tmpl/edit_j3.php @@ -0,0 +1,116 @@ + 0)); +HTMLHelper::_('formbehavior.chosen', 'select'); +HTMLHelper::stylesheet('com_swjprojects/admin-j3.min.css', array('version' => 'auto', 'relative' => true)); + +Factory::getDocument()->addScriptDeclaration(' + Joomla.submitbutton = function(task) + { + if (task == "version.cancel" || document.formvalidator.isValid(document.getElementById("item-form"))) + { + Joomla.submitform(task, document.getElementById("item-form")); + } + }; +'); +?> +
+
+ form->renderField('project_id'); ?> +
+
+ +  * +
+
+ form->setFieldAttribute('stage', 'hiddenLabel', 'true'); + echo $this->form->getInput('major') + . $this->form->getInput('minor') + . $this->form->getInput('micro') + . $this->form->getInput('tag') + . $this->form->renderField('stage'); + ?> +
+
+
+
+
+ 'general', 'class')); ?> + +
+
+

+ +

+ $this->translateForms, 'name' => 'changelog')); ?> +
+
+ + +
+ $this->translateForms, 'name' => 'metadata')); ?> +
+ + +
+
+
+
+
+ +
+
+ item->file): ?> + + + + + + + + +
+
+ form->renderFieldset('file'); ?> +
+
+ form->renderFieldset('global'); ?> +
+
+

+ +

+ form->renderFieldset('statistics'); ?> +
+
+
+ + + +
\ No newline at end of file diff --git a/com_swjprojects/admin/views/version/tmpl/edit_j4.php b/com_swjprojects/admin/views/version/tmpl/edit_j4.php new file mode 100644 index 00000000..a1570667 --- /dev/null +++ b/com_swjprojects/admin/views/version/tmpl/edit_j4.php @@ -0,0 +1,113 @@ +document->getWebAssetManager() + ->useScript('keepalive') + ->useScript('form.validate'); +HTMLHelper::stylesheet('com_swjprojects/admin-j4.min.css', array('version' => 'auto', 'relative' => true)); + +?> +
+
+
+ form->renderField('project_id'); ?> +
+
+
+
+ +  * +
+
+ form->setFieldAttribute('stage', 'hiddenLabel', 'true'); + ?> +
+ form->getInput('major'); ?> +
+
+ form->getInput('minor'); ?> +
+
+ form->getInput('micro'); ?> +
+
+ form->getInput('tag'); ?> +
+
+ form->renderField('stage'); ?> +
+
+
+
+
+
+
+
+ 'general', 'class')); ?> + +
+ $this->translateForms, 'name' => 'changelog')); ?> +
+ + +
+ $this->translateForms, 'name' => 'metadata'), '', ['class' => 'asdasd']); ?> +
+ + +
+
+
+
+
+
+ +
+
+ item->file): ?> + + + + + + + + +
+
+ form->renderFieldset('file'); ?> +
+
+ form->renderFieldset('global'); ?> +
+
+ + form->renderFieldset('statistics'); ?> +
+
+
+
+
+ + + +
\ No newline at end of file diff --git a/com_swjprojects/admin/views/version/view.html.php b/com_swjprojects/admin/views/version/view.html.php index de45f85b..1db055d8 100644 --- a/com_swjprojects/admin/views/version/view.html.php +++ b/com_swjprojects/admin/views/version/view.html.php @@ -1,9 +1,9 @@ form->removeField('joomla_version', ''); } - Factory::getDocument()->addScriptDeclaration("function projectHasChanged(element) { - var cat = jQuery(element); - Joomla.loadingLayer('show'); - jQuery('input[name=task]').val('version.reload'); - element.form.submit(); - }"); + if ((new Version())->isCompatible('4.0')) + { + Factory::getDocument()->addScriptDeclaration("function projectHasChanged(element) { + document.body.appendChild(document.createElement('joomla-core-loader')); + document.querySelector('input[name=task]').value = 'version.reload'; + element.form.submit(); + }"); + } + else + { + Factory::getDocument()->addScriptDeclaration("function projectHasChanged(element) { + var cat = jQuery(element); + Joomla.loadingLayer('show'); + jQuery('input[name=task]').val('version.reload'); + element.form.submit(); + }"); + } + // Add title and toolbar $this->addToolbar(); @@ -119,9 +132,9 @@ public function display($tpl = null) */ protected function addToolbar() { - $isNew = ($this->item->id == 0); - $canDo = SWJProjectsHelper::getActions('com_swjprojects', 'version', $this->item->id); - $toolbar = Toolbar::getInstance('toolbar'); + $isNew = ($this->item->id == 0); + $canDo = SWJProjectsHelper::getActions('com_swjprojects', 'version', $this->item->id); + $toolbar = Toolbar::getInstance(); // Disable menu Factory::getApplication()->input->set('hidemainmenu', true); @@ -149,13 +162,6 @@ protected function addToolbar() // Add preview & download buttons if ($this->item->id) { - // Preview button - $link = 'index.php?option=com_swjprojects&task=siteRedirect&page=version&debug=1&id=' . $this->item->id - . '&project_id=' . $this->project->id . '&catid=' . $this->project->catid; - $preview = LayoutHelper::render('components.swjprojects.toolbar.link', - array('link' => $link, 'text' => 'JGLOBAL_PREVIEW', 'icon' => 'eye')); - $toolbar->appendButton('Custom', $preview, 'preview'); - // Download button if ($this->item->file) { @@ -176,15 +182,26 @@ protected function addToolbar() $toolbar->appendButton('Custom', $switcher, 'translate-switcher'); // Add support button - $link = 'https://www.septdir.com/support#solution=SWJProjects'; - $download = LayoutHelper::render('components.swjprojects.toolbar.link', + $link = 'https://www.septdir.com/support#solution=SWJProjects'; + $support = LayoutHelper::render('components.swjprojects.toolbar.link', array('link' => $link, 'text' => 'COM_SWJPROJECTS_SUPPORT', 'icon' => 'support', 'new' => true)); - $toolbar->appendButton('Custom', $download, 'support'); + $toolbar->appendButton('Custom', $support, 'support'); // Add donate button - $link = 'https://www.septdir.com/donate#solution=swjprojects'; - $download = LayoutHelper::render('components.swjprojects.toolbar.link', + $link = 'https://www.septdir.com/donate#solution=swjprojects'; + $donate = LayoutHelper::render('components.swjprojects.toolbar.link', array('link' => $link, 'text' => 'COM_SWJPROJECTS_DONATE', 'icon' => 'heart', 'new' => true)); - $toolbar->appendButton('Custom', $download, 'donate'); + $toolbar->appendButton('Custom', $donate, 'donate'); + + // Add preview button + if ($this->item->id) + { + // Preview button + $link = 'index.php?option=com_swjprojects&task=siteRedirect&page=version&debug=1&id=' . $this->item->id + . '&project_id=' . $this->project->id . '&catid=' . $this->project->catid; + $preview = LayoutHelper::render('components.swjprojects.toolbar.link', + array('link' => $link, 'text' => 'JGLOBAL_PREVIEW', 'icon' => 'eye')); + $toolbar->appendButton('Custom', $preview, 'preview'); + } } } \ No newline at end of file diff --git a/com_swjprojects/admin/views/versions/tmpl/default.php b/com_swjprojects/admin/views/versions/tmpl/default.php index bbcc6d99..66ee2dfc 100644 --- a/com_swjprojects/admin/views/versions/tmpl/default.php +++ b/com_swjprojects/admin/views/versions/tmpl/default.php @@ -1,140 +1,15 @@ 'auto', 'relative' => true)); - -$user = Factory::getUser(); -$listOrder = $this->escape($this->state->get('list.ordering')); -$listDirn = $this->escape($this->state->get('list.direction')); - -$columns = 9; -?> -
-
- sidebar; ?> -
-
- $this)); ?> - items)) : ?> -
- -
- - - - - - - - - - - - - - - - - - - - - - items as $i => $item) : - $canEdit = $user->authorise('core.edit', 'com_swjprojects.version.' . $item->id); - $canChange = $user->authorise('core.edit.state', 'com_swjprojects.version.' . $item->id); - ?> - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - -
- pagination->getListFooter(); ?> -
- id); ?> - -
- state, $i, 'versions.', $canChange); ?> -
-
- - - escape($item->title); ?> - - - escape($item->title); ?> - - - escape($item->project_title); ?> - - escape($item->version); ?> - - escape(Text::_('COM_SWJPROJECTS_VERSION_TAG_' . $item->tag)); ?> - - date, Text::_('DATE_FORMAT_LC6')); ?> - - - downloads; ?> - - - id; ?> -
- - - - -
-
\ No newline at end of file +echo $this->loadTemplate(((new Version())->isCompatible('4.0')) ? 'j4' : 'j3'); \ No newline at end of file diff --git a/com_swjprojects/admin/views/versions/tmpl/default_j3.php b/com_swjprojects/admin/views/versions/tmpl/default_j3.php new file mode 100644 index 00000000..a9d01dd8 --- /dev/null +++ b/com_swjprojects/admin/views/versions/tmpl/default_j3.php @@ -0,0 +1,140 @@ + 'auto', 'relative' => true)); + +$user = Factory::getUser(); +$listOrder = $this->escape($this->state->get('list.ordering')); +$listDirn = $this->escape($this->state->get('list.direction')); + +$columns = 9; +?> +
+
+ sidebar; ?> +
+
+ $this)); ?> + items)) : ?> +
+ +
+ + + + + + + + + + + + + + + + + + + + + + items as $i => $item) : + $canEdit = $user->authorise('core.edit', 'com_swjprojects.version.' . $item->id); + $canChange = $user->authorise('core.edit.state', 'com_swjprojects.version.' . $item->id); + ?> + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ pagination->getListFooter(); ?> +
+ id); ?> + +
+ state, $i, 'versions.', $canChange); ?> +
+
+ + + escape($item->title); ?> + + + escape($item->title); ?> + + + escape($item->project_title); ?> + + escape($item->version); ?> + + escape(Text::_('COM_SWJPROJECTS_VERSION_TAG_' . $item->tag)); ?> + + date, Text::_('DATE_FORMAT_LC6')); ?> + + + downloads; ?> + + + id; ?> +
+ + + + +
+
\ No newline at end of file diff --git a/com_swjprojects/admin/views/versions/tmpl/default_j4.php b/com_swjprojects/admin/views/versions/tmpl/default_j4.php new file mode 100644 index 00000000..f06ee05c --- /dev/null +++ b/com_swjprojects/admin/views/versions/tmpl/default_j4.php @@ -0,0 +1,144 @@ + 'auto', 'relative' => true)); + +$user = Factory::getUser(); +$listOrder = $this->escape($this->state->get('list.ordering')); +$listDirn = $this->escape($this->state->get('list.direction')); + +$columns = 9; +?> +
+
+
+
+ $this)); ?> + items)) : ?> +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + items as $i => $item) : + $canEdit = $user->authorise('core.edit', 'com_swjprojects.version.' . $item->id); + $canChange = $user->authorise('core.edit.state', 'com_swjprojects.version.' . $item->id); + $link = ($canEdit) ? Route::_('index.php?option=com_swjprojects&task=version.edit&id=' + . $item->id) : ''; + ?> + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ pagination->getResultsCounter(); ?> +
+ id, false, 'cid', 'cb', $item->title); ?> + + render((int) $item->state, $i, [ + 'task_prefix' => 'versions.', + 'disabled' => !$canChange, + 'id' => 'state-' . $item->id + ]); ?> + + > + title; ?> + + + escape($item->project_title); ?> + + escape($item->version); ?> + + escape(Text::_('COM_SWJPROJECTS_VERSION_TAG_' . $item->tag)); ?> + + date, Text::_('DATE_FORMAT_LC5')); ?> + + + downloads; ?> + + id; ?>
+ pagination->getListFooter(); ?> + + + + +
+
+
+
\ No newline at end of file diff --git a/com_swjprojects/admin/views/versions/view.html.php b/com_swjprojects/admin/views/versions/view.html.php index 3c54686c..b2be4d0f 100644 --- a/com_swjprojects/admin/views/versions/view.html.php +++ b/com_swjprojects/admin/views/versions/view.html.php @@ -1,9 +1,9 @@ $link, 'text' => 'COM_SWJPROJECTS_SUPPORT', 'icon' => 'support', 'new' => true)); - $toolbar->appendButton('Custom', $download, 'support'); + $toolbar->appendButton('Custom', $support, 'support'); // Add donate button - $link = 'https://www.septdir.com/donate#solution=swjprojects'; - $download = LayoutHelper::render('components.swjprojects.toolbar.link', + $link = 'https://www.septdir.com/donate#solution=swjprojects'; + $donate = LayoutHelper::render('components.swjprojects.toolbar.link', array('link' => $link, 'text' => 'COM_SWJPROJECTS_DONATE', 'icon' => 'heart', 'new' => true)); - $toolbar->appendButton('Custom', $download, 'donate'); + $toolbar->appendButton('Custom', $donate, 'donate'); } /** diff --git a/com_swjprojects/layouts/field/image.php b/com_swjprojects/layouts/field/image.php index fbf0cacb..9aa73cce 100644 --- a/com_swjprojects/layouts/field/image.php +++ b/com_swjprojects/layouts/field/image.php @@ -1,9 +1,9 @@ 'auto', 'relative' => true)); HTMLHelper::script('com_swjprojects/field-image.min.js', array('version' => 'auto', 'relative' => true)); -$loading = str_replace('//', '/', Uri::root(true) . '/media/jui/images/ajax-loader.gif'); +$loading = str_replace('//', '/', Uri::root(true) . '/media/com_swjprojects/images/ajax-loader.gif'); ?>
'preview', 'data-loading' => $loading), true); ?>
- diff --git a/com_swjprojects/layouts/field/images.php b/com_swjprojects/layouts/field/images.php index a4b52ca9..9608e143 100644 --- a/com_swjprojects/layouts/field/images.php +++ b/com_swjprojects/layouts/field/images.php @@ -1,9 +1,9 @@ 'auto', 'relative' => true)); HTMLHelper::script('com_swjprojects/field-images.min.js', array('version' => 'auto', 'relative' => true)); -$loading = str_replace('//', '/', Uri::root(true) . '/media/jui/images/ajax-loader.gif'); +$loading = str_replace('//', '/', Uri::root(true) . '/media/com_swjprojects/images/ajax-loader.gif'); ?>
$image) : ?> @@ -39,7 +39,7 @@ 'noimage', 'style' => (empty($image->src)) ? '' : 'display: none;'), true); ?>
-
isCompatible('4.0'))) ? 'joomla4' : 'joomla3'; -/** - * Layout variables - * ----------------- - * - * @var string $link Button link - * @var string $text Button text - * @var string $icon Button icon - * @var boolean $new Button target - * - */ - -$new = (isset($new)) ? $new : true; -?> -> - - - \ No newline at end of file +echo LayoutHelper::render('components.swjprojects.toolbar.link.' . $version, $displayData); \ No newline at end of file diff --git a/com_swjprojects/layouts/toolbar/link/joomla3.php b/com_swjprojects/layouts/toolbar/link/joomla3.php new file mode 100644 index 00000000..8cf9b143 --- /dev/null +++ b/com_swjprojects/layouts/toolbar/link/joomla3.php @@ -0,0 +1,35 @@ + +> + + + \ No newline at end of file diff --git a/com_swjprojects/layouts/toolbar/link/joomla4.php b/com_swjprojects/layouts/toolbar/link/joomla4.php new file mode 100644 index 00000000..7d7d0e10 --- /dev/null +++ b/com_swjprojects/layouts/toolbar/link/joomla4.php @@ -0,0 +1,65 @@ +addStyleDeclaration(' + joomla-toolbar-button > a[href="' . $link . '"]:before{display:none;}; +'); +?> +> + + title=""> + + + + + + + \ No newline at end of file diff --git a/com_swjprojects/layouts/translate/field.php b/com_swjprojects/layouts/translate/field.php index 21c772fb..1aca301b 100644 --- a/com_swjprojects/layouts/translate/field.php +++ b/com_swjprojects/layouts/translate/field.php @@ -1,9 +1,9 @@ 'auto', 'relative' => true)); HTMLHelper::script('com_swjprojects/translate-switcher.min.js', array('version' => 'auto', 'relative' => true)); ?> -
+
label{display:inline-block}#item-form .span3 .well.form-horizontal .controls{margin-left:0}} \ No newline at end of file diff --git a/com_swjprojects/media/css/admin-j4.css b/com_swjprojects/media/css/admin-j4.css new file mode 100644 index 00000000..6d53c15e --- /dev/null +++ b/com_swjprojects/media/css/admin-j4.css @@ -0,0 +1,32 @@ +/* + * @package SW JProjects Component + * @version 1.6.0 + * @author Septdir Workshop - www.septdir.com + * @copyright Copyright (c) 2018 - 2022 Septdir Workshop. All rights reserved. + * @license GNU/GPL license: https://www.gnu.org/copyleft/gpl.html + * @link https://www.septdir.com/ + */ + + +#toolbar.btn-toolbar .btn-group .active { + background-color: var(--subhead-btn-accent); + border-color: var(--subhead-btn-accent); + color: hsla(0, 0%, 100%, .9); +} + +[input-image="container"] .btn[class*="icon"], +[input-images="container"] .btn[class*="icon"], +[input-images="container"] .icon-upload.lead { + font-weight: 900 !important; +} + +[input-images="image"] img { + height: auto; + width: auto; + max-width: 100%; + max-height: 100%; +} + +.subhead #toolbar.btn-toolbar a[target=_blank]:before { + content: ''; +} \ No newline at end of file diff --git a/com_swjprojects/media/css/admin-j4.min.css b/com_swjprojects/media/css/admin-j4.min.css new file mode 100644 index 00000000..175fb58f --- /dev/null +++ b/com_swjprojects/media/css/admin-j4.min.css @@ -0,0 +1 @@ +#toolbar.btn-toolbar .btn-group .active{background-color:var(--subhead-btn-accent);border-color:var(--subhead-btn-accent);color:rgba(255,255,255,.9)}[input-image=container] .btn[class*=icon],[input-images=container] .btn[class*=icon],[input-images=container] .icon-upload.lead{font-weight:900!important}[input-images=image] img{height:auto;width:auto;max-width:100%;max-height:100%}.subhead #toolbar.btn-toolbar a[target=_blank]:before{content:''} \ No newline at end of file diff --git a/com_swjprojects/media/css/admin.min.css b/com_swjprojects/media/css/admin.min.css deleted file mode 100644 index a16b4f23..00000000 --- a/com_swjprojects/media/css/admin.min.css +++ /dev/null @@ -1 +0,0 @@ -#toolbar a.btn:hover,#toolbar a.btn:focus,#toolbar a.btn:active{color:inherit}#toolbar-support,#toolbar-donate{float:right}#item-form .span3 .well.form-horizontal{box-sizing:border-box;max-width:100%}#item-form .span3 .well.form-horizontal .controls input[type="text"],#item-form .span3 .well.form-horizontal .controls input[type="number"],#item-form .span3 .well.form-horizontal .controls input[type="email"],#item-form .span3 .well.form-horizontal .controls select,#item-form .span3 .well.form-horizontal .controls textarea{width:100%;height:26px;box-sizing:border-box}#item-form .span3 .well.form-horizontal .controls .chzn-container{width:100% !important}#item-form .span3 .well.form-horizontal .controls .field-calendar input{width:165px}#item-form .span3 .well.form-horizontal .controls .field-calendar button{vertical-align:middle}@media(max-width:1599px){#item-form .span3 .well.form-horizontal .control-label{float:none;width:auto;padding-right:0;padding-top:0;text-align:left}#item-form .span3 .well.form-horizontal .control-label>label{display:inline-block}#item-form .span3 .well.form-horizontal .controls{margin-left:0}} \ No newline at end of file diff --git a/com_swjprojects/media/css/dragula.css b/com_swjprojects/media/css/dragula.css index b18c16e7..825ce1ed 100644 --- a/com_swjprojects/media/css/dragula.css +++ b/com_swjprojects/media/css/dragula.css @@ -1,3 +1,12 @@ +/* + * @package SW JProjects Component + * @version 1.6.0 + * @author Septdir Workshop - www.septdir.com + * @copyright Copyright (c) 2018 - 2022 Septdir Workshop. All rights reserved. + * @license GNU/GPL license: https://www.gnu.org/copyleft/gpl.html + * @link https://www.septdir.com/ + */ + .gu-mirror { position: fixed !important; margin: 0 !important; diff --git a/com_swjprojects/media/css/field-image.css b/com_swjprojects/media/css/field-image.css index ab431ad0..c7275afb 100644 --- a/com_swjprojects/media/css/field-image.css +++ b/com_swjprojects/media/css/field-image.css @@ -1,8 +1,8 @@ /* * @package SW JProjects Component - * @version __DEPLOY_VERSION__ + * @version 1.6.0 * @author Septdir Workshop - www.septdir.com - * @copyright Copyright (c) 2018 - 2020 Septdir Workshop. All rights reserved. + * @copyright Copyright (c) 2018 - 2022 Septdir Workshop. All rights reserved. * @license GNU/GPL license: https://www.gnu.org/copyleft/gpl.html * @link https://www.septdir.com/ */ diff --git a/com_swjprojects/media/css/field-image.min.css b/com_swjprojects/media/css/field-image.min.css index 508830bb..1fc0f5be 100644 --- a/com_swjprojects/media/css/field-image.min.css +++ b/com_swjprojects/media/css/field-image.min.css @@ -1 +1 @@ -[input-image="container"]{display:block;overflow:hidden;box-sizing:border-box}[input-image="container"] [input-image="field"]{display:none}[input-image="container"] [input-image="upload"]{display:inline-block;position:relative;min-width:250px;max-width:100%;max-height:250px;overflow:hidden;padding:5px;border:1px dashed #999;background-color:#fafbfc;box-sizing:border-box}[input-image="container"] [input-image="upload"].dragend{background-color:#e5e5e5;border-color:#0071bc}[input-image="container"] [input-image="upload"].dragend [input-image="preview"]{opacity:.3}[input-image="container"] .preview-block{display:inline-flex;height:240px;min-width:240px;align-items:center;justify-content:center}[input-image="container"] [input-image="preview"]{max-height:100%}[input-image="container"] [input-image="actions"]{position:absolute;top:0;right:0;z-index:2;box-sizing:border-box}[input-image="container"] [input-image="actions"] label{margin-bottom:0}[input-image="container"] [input-image="actions"] .btn{cursor:pointer;text-decoration:none;margin-right:0;min-width:auto !important;border-radius:0 !important}[input-image="container"] [input-image="actions"]>*:hover{text-decoration:none}[input-image="container"] [input-image="drag"]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1} \ No newline at end of file +[input-image=container]{display:block;overflow:hidden;box-sizing:border-box}[input-image=container] [input-image=field]{display:none}[input-image=container] [input-image=upload]{display:inline-block;position:relative;min-width:250px;max-width:100%;max-height:250px;overflow:hidden;padding:5px;border:1px dashed #999;background-color:#fafbfc;box-sizing:border-box}[input-image=container] [input-image=upload].dragend{background-color:#e5e5e5;border-color:#0071bc}[input-image=container] [input-image=upload].dragend [input-image=preview]{opacity:.3}[input-image=container] .preview-block{display:inline-flex;height:240px;min-width:240px;align-items:center;justify-content:center}[input-image=container] [input-image=preview]{max-height:100%}[input-image=container] [input-image=actions]{position:absolute;top:0;right:0;z-index:2;box-sizing:border-box}[input-image=container] [input-image=actions] label{margin-bottom:0}[input-image=container] [input-image=actions] .btn{cursor:pointer;text-decoration:none;margin-right:0;min-width:auto!important;border-radius:0!important}[input-image=container] [input-image=actions]>:hover{text-decoration:none}[input-image=container] [input-image=drag]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1} \ No newline at end of file diff --git a/com_swjprojects/media/css/field-images.css b/com_swjprojects/media/css/field-images.css index 0a2de785..0bcbe554 100644 --- a/com_swjprojects/media/css/field-images.css +++ b/com_swjprojects/media/css/field-images.css @@ -1,8 +1,8 @@ /* * @package SW JProjects Component - * @version __DEPLOY_VERSION__ + * @version 1.6.0 * @author Septdir Workshop - www.septdir.com - * @copyright Copyright (c) 2018 - 2020 Septdir Workshop. All rights reserved. + * @copyright Copyright (c) 2018 - 2022 Septdir Workshop. All rights reserved. * @license GNU/GPL license: https://www.gnu.org/copyleft/gpl.html * @link https://www.septdir.com/ */ diff --git a/com_swjprojects/media/css/field-images.min.css b/com_swjprojects/media/css/field-images.min.css index da45d357..07854ac8 100644 --- a/com_swjprojects/media/css/field-images.min.css +++ b/com_swjprojects/media/css/field-images.min.css @@ -1 +1 @@ -[input-images="container"]{display:block;overflow:hidden;box-sizing:border-box}[input-images="container"] [input-images="field"]{display:none}[input-images="container"] [input-images="upload"]{display:flex;justify-content:center;align-items:center;position:relative;width:100%;height:250px;overflow:hidden;padding:5px;border:1px dashed #999;background-color:#fafbfc;box-sizing:border-box;margin-bottom:25px}[input-images="container"] [input-images="upload"].dragend{background-color:#e5e5e5;border-color:#0071bc;opacity:.3}[input-images="container"] [input-images="upload"] .text{text-align:center}[input-images="container"] [input-images="loading"]{position:absolute;top:0;right:0;left:0;bottom:0;display:flex;justify-content:center;align-items:center;background-color:#fafbfc;z-index:2}[input-images="container"] [input-images="drag"]{position:absolute;top:0;right:0;left:0;bottom:0;z-index:1}[input-images="container"] [input-images="result"]{margin-top:10px}[input-images="container"] [input-images="result"] .images{display:flex;flex-wrap:wrap;align-items:center}[input-images="image"]{display:inline-block;margin:10px;width:280px;box-sizing:border-box}[input-images="image"] [input-images="image_field"]{display:none}[input-images="image"] .previewBlock{display:flex;position:relative;padding:10px;width:280px;height:250px;justify-content:center;align-items:center;background:#ccc;border:1px solid #e5e5e5;border-bottom:0;box-sizing:border-box}[input-images="image"] .previewBlock img{max-height:100%}[input-images="image"] .previewBlock>label{position:absolute;top:0;right:0;left:0;bottom:0;z-index:1}[input-images="image"] [input-images="actions"]{position:absolute;top:0;right:0;z-index:2}[input-images="image"] [input-images="text"]{border-radius:0 !important;width:280px;box-sizing:border-box}[input-images="image"] [input-images="actions"] label{margin-bottom:0}[input-images="image"] [input-images="actions"] .btn{cursor:pointer;text-decoration:none;margin-right:0;min-width:auto !important;border-radius:0 !important}[input-images="image"] [input-images="actions"]>*:hover{text-decoration:none} \ No newline at end of file +[input-images=container]{display:block;overflow:hidden;box-sizing:border-box}[input-images=container] [input-images=field]{display:none}[input-images=container] [input-images=upload]{display:flex;justify-content:center;align-items:center;position:relative;width:100%;height:250px;overflow:hidden;padding:5px;border:1px dashed #999;background-color:#fafbfc;box-sizing:border-box;margin-bottom:25px}[input-images=container] [input-images=upload].dragend{background-color:#e5e5e5;border-color:#0071bc;opacity:.3}[input-images=container] [input-images=upload] .text{text-align:center}[input-images=container] [input-images=loading]{position:absolute;top:0;right:0;left:0;bottom:0;display:flex;justify-content:center;align-items:center;background-color:#fafbfc;z-index:2}[input-images=container] [input-images=drag],[input-images=image] .previewBlock>label{position:absolute;top:0;right:0;left:0;bottom:0;z-index:1}[input-images=container] [input-images=result]{margin-top:10px}[input-images=container] [input-images=result] .images{display:flex;flex-wrap:wrap;align-items:center}[input-images=image]{display:inline-block;margin:10px;width:280px;box-sizing:border-box}[input-images=image] [input-images=image_field]{display:none}[input-images=image] .previewBlock{display:flex;position:relative;padding:10px;width:280px;height:250px;justify-content:center;align-items:center;background:#ccc;border:1px solid #e5e5e5;border-bottom:none;box-sizing:border-box}[input-images=image] .previewBlock img{max-height:100%}[input-images=image] [input-images=actions]{position:absolute;top:0;right:0;z-index:2}[input-images=image] [input-images=text]{border-radius:0!important;width:280px;box-sizing:border-box}[input-images=image] [input-images=actions] label{margin-bottom:0}[input-images=image] [input-images=actions] .btn{cursor:pointer;text-decoration:none;margin-right:0;min-width:auto!important;border-radius:0!important}[input-images=image] [input-images=actions]>:hover{text-decoration:none} \ No newline at end of file diff --git a/com_swjprojects/media/css/site.css b/com_swjprojects/media/css/site.css index 9ef04d98..b3981f0e 100644 --- a/com_swjprojects/media/css/site.css +++ b/com_swjprojects/media/css/site.css @@ -1,8 +1,8 @@ /* * @package SW JProjects Component - * @version __DEPLOY_VERSION__ + * @version 1.6.0 * @author Septdir Workshop - www.septdir.com - * @copyright Copyright (c) 2018 - 2020 Septdir Workshop. All rights reserved. + * @copyright Copyright (c) 2018 - 2022 Septdir Workshop. All rights reserved. * @license GNU/GPL license: https://www.gnu.org/copyleft/gpl.html * @link https://www.septdir.com/ */ diff --git a/com_swjprojects/media/css/site.min.css b/com_swjprojects/media/css/site.min.css index 55ed1ef8..20dc3add 100644 --- a/com_swjprojects/media/css/site.min.css +++ b/com_swjprojects/media/css/site.min.css @@ -1 +1 @@ -#SWJProjects.projects .category.info h1,#SWJProjects.project .project.info h1,#SWJProjects.versions .project.info h1{margin:0 0 5px}#SWJProjects.projects .projectsList .meta li:first-child,#SWJProjects.project .project.info .meta ul li:first-child,#SWJProjects.versions .project.info .meta ul li:first-child,#SWJProjects.version .version.info .meta ul li:first-child{padding-left:0} \ No newline at end of file +#SWJProjects.project .project.info h1,#SWJProjects.projects .category.info h1,#SWJProjects.versions .project.info h1{margin:0 0 5px}#SWJProjects.project .project.info .meta ul li:first-child,#SWJProjects.projects .projectsList .meta li:first-child,#SWJProjects.version .version.info .meta ul li:first-child,#SWJProjects.versions .project.info .meta ul li:first-child{padding-left:0} \ No newline at end of file diff --git a/com_swjprojects/media/css/translate-switcher.css b/com_swjprojects/media/css/translate-switcher.css index 37ae0e62..b87c678e 100644 --- a/com_swjprojects/media/css/translate-switcher.css +++ b/com_swjprojects/media/css/translate-switcher.css @@ -1,8 +1,8 @@ /* * @package SW JProjects Component - * @version __DEPLOY_VERSION__ + * @version 1.6.0 * @author Septdir Workshop - www.septdir.com - * @copyright Copyright (c) 2018 - 2020 Septdir Workshop. All rights reserved. + * @copyright Copyright (c) 2018 - 2022 Septdir Workshop. All rights reserved. * @license GNU/GPL license: https://www.gnu.org/copyleft/gpl.html * @link https://www.septdir.com/ */ diff --git a/com_swjprojects/media/css/translate-switcher.min.css b/com_swjprojects/media/css/translate-switcher.min.css index 02a8b351..9c609563 100644 --- a/com_swjprojects/media/css/translate-switcher.min.css +++ b/com_swjprojects/media/css/translate-switcher.min.css @@ -1 +1 @@ -#toolbar #toolbar-translate-switcher{float:right}#toolbar #toolbar-translate-switcher .btn{margin-right:0;min-width:unset}#toolbar #toolbar-translate-switcher .btn.active{border:1px solid rgba(0,0,0,0.2);color:#fff;background-color:#2384d3;cursor:unset} \ No newline at end of file +#toolbar #toolbar-translate-switcher{float:right}#toolbar #toolbar-translate-switcher .btn{margin-right:0;min-width:unset}#toolbar #toolbar-translate-switcher .btn.active{border:1px solid rgba(0,0,0,.2);color:#fff;background-color:#2384d3;cursor:unset} \ No newline at end of file diff --git a/com_swjprojects/media/images/ajax-loader.gif b/com_swjprojects/media/images/ajax-loader.gif new file mode 100644 index 0000000000000000000000000000000000000000..c3c5a6b3af3573bbd90451e90cb485184b286fe4 GIT binary patch literal 9933 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 + + diff --git a/com_swjprojects/media/js/dragula.js b/com_swjprojects/media/js/dragula.js index 67b93812..3ff8347f 100644 --- a/com_swjprojects/media/js/dragula.js +++ b/com_swjprojects/media/js/dragula.js @@ -1,3 +1,12 @@ +/* + * @package SW JProjects Component + * @version 1.6.0 + * @author Septdir Workshop - www.septdir.com + * @copyright Copyright (c) 2018 - 2022 Septdir Workshop. All rights reserved. + * @license GNU/GPL license: https://www.gnu.org/copyleft/gpl.html + * @link https://www.septdir.com/ + */ + (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.dragula = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;oquoteName('td_p.language') . ' = ' . $db->quote($default)); } + // Join over versions for last version + $subQuery = $db->getQuery(true) + ->select(array('CONCAT(lv.id, ":", lv.alias, "|", lv.major, ".", lv.minor, ".", lv.micro)')) + ->from($db->quoteName('#__swjprojects_versions', 'lv')) + ->where('lv.project_id = p.id') + ->where('lv.state = 1') + ->where($db->quoteName('lv.tag') . ' = ' . $db->quote('stable')) + ->order($db->escape('lv.major') . ' ' . $db->escape('desc')) + ->order($db->escape('lv.minor') . ' ' . $db->escape('desc')) + ->order($db->escape('lv.micro') . ' ' . $db->escape('desc')) + ->setLimit(1); + $query->select('(' . $subQuery->__toString() . ') as last_version'); + + // Join over versions for download counter + $query->select(array('SUM(dc.downloads) as downloads')) + ->leftJoin($db->quoteName('#__swjprojects_versions', 'dc') . ' ON dc.project_id = p.id' + . ' AND dc.state = 1'); + // Filter by published state $published = $this->getState('filter.published'); if (is_numeric($published)) @@ -266,6 +284,7 @@ public function getItem($pk = null) $data->project->alias = $data->project_alias; $data->project->elemet = $data->project_element; $data->project->introtext = nl2br($data->project_introtext); + $data->project->downloads = $data->downloads; $data->project->urls = new Registry($data->project_urls); $data->project->slug = $data->pslug; $data->project->link = Route::_(SWJProjectsHelperRoute::getProjectRoute($data->pslug, $data->cslug)); @@ -277,6 +296,17 @@ public function getItem($pk = null) $data->project->images->set('cover', SWJProjectsHelperImages::getImage('projects', $data->project_id, 'cover', $data->project_language)); + // Set version + $data->project->version = false; + if (!empty($data->last_version)) + { + $data->project->version = new stdClass(); + list($data->project->version->slug, $data->project->version->version) = explode('|', $data->last_version, 2); + list($data->project->version->id, $data->project->version->alias) = explode(':', $data->project->version->slug, 2); + $data->project->version->link = Route::_(SWJProjectsHelperRoute::getVersionRoute($data->project->version->slug, + $data->slug, $data->cslug)); + } + // Set payment $data->payment = new Registry($data->payment); $data->project->download_type = $data->download_type; diff --git a/com_swjprojects/site/models/documentation.php b/com_swjprojects/site/models/documentation.php index c11d7c29..0c905f03 100644 --- a/com_swjprojects/site/models/documentation.php +++ b/com_swjprojects/site/models/documentation.php @@ -1,9 +1,9 @@ where('c.state IN (' . $published . ')'); } + // Join over documentation for documentation link + $query->select(array('d.id as documentation')) + ->leftJoin($db->quoteName('#__swjprojects_documentation', 'd') . + ' ON d.project_id = p.id AND d.state = 1'); + $data = $db->setQuery($query)->loadObject(); if (empty($data)) @@ -312,6 +317,11 @@ public function getItem($pk = null) $data->project->slug = $data->pslug; $data->project->link = Route::_(SWJProjectsHelperRoute::getProjectRoute($data->pslug, $data->cslug)); $data->project->versions = Route::_(SWJProjectsHelperRoute::getVersionsRoute($data->pslug, $data->cslug)); + $data->project->documentation = (!$data->documentation) ? false : + Route::_(SWJProjectsHelperRoute::getDocumentationRoute($data->project->slug, $data->cslug)); + if (!empty($data->project->urls->get('documentation'))) { + $data->project->documentation = false; + } $data->project->images = new Registry(); $data->project->images->set('icon', SWJProjectsHelperImages::getImage('projects', $data->project_id, 'icon', $data->project_language)); diff --git a/com_swjprojects/site/models/versions.php b/com_swjprojects/site/models/versions.php index acf97bad..1bd11f7c 100644 --- a/com_swjprojects/site/models/versions.php +++ b/com_swjprojects/site/models/versions.php @@ -1,9 +1,9 @@ where('c.state IN (' . $published . ')'); } + // Join over documentation for documentation link + $query->select(array('d.id as documentation')) + ->leftJoin($db->quoteName('#__swjprojects_documentation', 'd') . + ' ON d.project_id = p.id AND d.state = 1'); + $data = $db->setQuery($query)->loadObject(); if (!$data->id) @@ -520,11 +525,17 @@ public function getItem($pk = null) SWJProjectsHelperImages::getImage('projects', $data->id, 'cover', $data->language)); // Set link - $data->slug = $data->id . ':' . $data->alias; - $data->cslug = ($data->category) ? $data->category->slug : $data->catid; - $data->link = Route::_(SWJProjectsHelperRoute::getProjectRoute($data->slug, $data->cslug)); - $data->versions = Route::_(SWJProjectsHelperRoute::getVersionsRoute($data->slug, $data->cslug)); - $data->download = Route::_(SWJProjectsHelperRoute::getDownloadRoute(null, $data->id)); + $data->slug = $data->id . ':' . $data->alias; + $data->cslug = ($data->category) ? $data->category->slug : $data->catid; + $data->link = Route::_(SWJProjectsHelperRoute::getProjectRoute($data->slug, $data->cslug)); + $data->versions = Route::_(SWJProjectsHelperRoute::getVersionsRoute($data->slug, $data->cslug)); + $data->download = Route::_(SWJProjectsHelperRoute::getDownloadRoute(null, $data->id)); + $data->documentation = (!$data->documentation) ? false : + Route::_(SWJProjectsHelperRoute::getDocumentationRoute($data->slug, $data->cslug)); + if (!empty($data->urls->get('documentation'))) + { + $data->documentation = false; + } // Set version $data->version = false; diff --git a/com_swjprojects/site/router.php b/com_swjprojects/site/router.php index 4c7d054e..5cfed8b2 100644 --- a/com_swjprojects/site/router.php +++ b/com_swjprojects/site/router.php @@ -1,9 +1,9 @@ 'auto', 'relative' => true)); -?> -
- project->images->get('cover')): ?> -

project->title); ?>

-
- -

item->title; ?>

-
- item->fulltext)): ?> - item->fulltext; ?> - item->introtext)): ?> -

item->introtext); ?>

- -
-
\ No newline at end of file +echo $this->loadTemplate(((new Version())->isCompatible('4.0')) ? 'j4' : 'j3'); \ No newline at end of file diff --git a/com_swjprojects/site/views/document/tmpl/default.xml b/com_swjprojects/site/views/document/tmpl/default.xml index e62071aa..34e573c9 100644 --- a/com_swjprojects/site/views/document/tmpl/default.xml +++ b/com_swjprojects/site/views/document/tmpl/default.xml @@ -9,7 +9,8 @@
+ required="true" + layout="joomla.form.field.list-fancy-select">
diff --git a/com_swjprojects/site/views/document/tmpl/default_j3.php b/com_swjprojects/site/views/document/tmpl/default_j3.php new file mode 100644 index 00000000..7551a65d --- /dev/null +++ b/com_swjprojects/site/views/document/tmpl/default_j3.php @@ -0,0 +1,30 @@ + 'auto', 'relative' => true)); +?> +
+ project->images->get('cover')): ?> +

project->title); ?>

+
+ +

item->title; ?>

+
+ item->fulltext)): ?> + item->fulltext; ?> + item->introtext)): ?> +

item->introtext); ?>

+ +
+
\ No newline at end of file diff --git a/com_swjprojects/site/views/document/tmpl/default_j4.php b/com_swjprojects/site/views/document/tmpl/default_j4.php new file mode 100644 index 00000000..76433009 --- /dev/null +++ b/com_swjprojects/site/views/document/tmpl/default_j4.php @@ -0,0 +1,131 @@ + +
+ +
+
+
+ project->images->get('icon')): ?> + + project->title, array('class' => 'card-img-top')); ?> + + +
+
    +
  • + : + project->download_type); ?> +
  • + project->download_type === 'paid' && $this->project->payment->get('price')): ?> +
  • + : + project->payment->get('price'); ?> +
  • + + project->version): ?> +
  • + : + + project->version->version; ?> + +
  • + + project->downloads): ?> +
  • + : + project->downloads; ?> +
  • + +
+
+ project->download_type === 'paid' && $this->project->payment->get('link'))): ?> + + + + project->download_type === 'free'): ?> + + + + +
+
+
+
+
+
+ + + + + + + project->documentation): ?> + + + + + project->urls->toArray()): ?> + $url): + if (empty($url)) continue; ?> + + + + + +
+
+
+

+ item->title; ?> +

+ item->introtext)): ?> +

item->introtext); ?>

+ + item->fulltext)): ?> +
item->fulltext; ?>
+ +
+
+
+
+
\ No newline at end of file diff --git a/com_swjprojects/site/views/document/view.html.php b/com_swjprojects/site/views/document/view.html.php index da30cf0b..646cbded 100644 --- a/com_swjprojects/site/views/document/view.html.php +++ b/com_swjprojects/site/views/document/view.html.php @@ -1,9 +1,9 @@ 'auto', 'relative' => true)); -?> -
-
-
- project->images->get('icon')): ?> -
project->title); ?>
- -
-

- project->title; ?> -

- project->introtext)): ?> -

- project->introtext; ?> -

- -
-
    -
  • - : - project->download_type); ?> -
  • - project->download_type === 'paid' && $this->project->payment->get('price')): ?> -
  • - : - project->payment->get('price'); ?> -
  • - - project->categories)): ?> -
  • - : - project->categories as $category) - { - if ($i > 0) echo ', '; - $i++; - echo '' . $category->title . ''; - } - ?> -
  • - -
  • - : - - category->title; ?> - -
  • - - project->version): ?> -
  • - : - - project->version->version; ?> - -
  • - - project->downloads): ?> -
  • - : - project->downloads; ?> -
  • - - project->hits): ?> -
  • - : - project->hits; ?> -
  • - -
-
- project->download_type === 'paid' && $this->project->payment->get('link'))): ?> - - - - project->download_type === 'free'): ?> - - - - - - - - project->urls->toArray()): ?> - $url): - if (empty($url)) continue; ?> - - - - - -
-
-
-
-
- items)) : ?> -
- -
- -
-
- items as $item) : ?> -
-

- title; ?> -

- introtext)): ?> -

introtext); ?>

- -
-
- -
- -
- -
\ No newline at end of file +echo $this->loadTemplate(((new Version())->isCompatible('4.0')) ? 'j4' : 'j3'); \ No newline at end of file diff --git a/com_swjprojects/site/views/documentation/tmpl/default.xml b/com_swjprojects/site/views/documentation/tmpl/default.xml index ba7b039b..20dd54ab 100644 --- a/com_swjprojects/site/views/documentation/tmpl/default.xml +++ b/com_swjprojects/site/views/documentation/tmpl/default.xml @@ -9,7 +9,8 @@
+ required="true" + layout="joomla.form.field.list-fancy-select">
diff --git a/com_swjprojects/site/views/documentation/tmpl/default_j3.php b/com_swjprojects/site/views/documentation/tmpl/default_j3.php new file mode 100644 index 00000000..fa504269 --- /dev/null +++ b/com_swjprojects/site/views/documentation/tmpl/default_j3.php @@ -0,0 +1,137 @@ + 'auto', 'relative' => true)); +?> +
+
+
+ project->images->get('icon')): ?> +
project->title); ?>
+ +
+

+ project->title; ?> +

+ project->introtext)): ?> +

+ project->introtext; ?> +

+ +
+
    +
  • + : + project->download_type); ?> +
  • + project->download_type === 'paid' && $this->project->payment->get('price')): ?> +
  • + : + project->payment->get('price'); ?> +
  • + + project->categories)): ?> +
  • + : + project->categories as $category) + { + if ($i > 0) echo ', '; + $i++; + echo '' . $category->title . ''; + } + ?> +
  • + +
  • + : + + category->title; ?> + +
  • + + project->version): ?> +
  • + : + + project->version->version; ?> + +
  • + + project->downloads): ?> +
  • + : + project->downloads; ?> +
  • + + project->hits): ?> +
  • + : + project->hits; ?> +
  • + +
+
+ project->download_type === 'paid' && $this->project->payment->get('link'))): ?> + + + + project->download_type === 'free'): ?> + + + + + + + + project->urls->toArray()): ?> + $url): + if (empty($url)) continue; ?> + + + + + +
+
+
+
+
+ items)) : ?> +
+ +
+ +
+
+ items as $item) : ?> +
+

+ title; ?> +

+ introtext)): ?> +

introtext); ?>

+ +
+
+ +
+ +
+ +
\ No newline at end of file diff --git a/com_swjprojects/site/views/documentation/tmpl/default_j4.php b/com_swjprojects/site/views/documentation/tmpl/default_j4.php new file mode 100644 index 00000000..98c1a010 --- /dev/null +++ b/com_swjprojects/site/views/documentation/tmpl/default_j4.php @@ -0,0 +1,158 @@ + +
+
+

project->title . ' - ' . Text::_('COM_SWJPROJECTS_DOCUMENTATION'); ?>

+
+ project->categories)): ?> + : + project->categories as $category) + { + if ($i > 0) echo ', '; + $i++; + echo '' . $category->title . ''; + } + ?> + + : + + category->title; ?> + + +
+
+
+
+
+ project->images->get('icon')): ?> + + project->title, array('class' => 'card-img-top')); ?> + + +
+
    +
  • + : + project->download_type); ?> +
  • + project->download_type === 'paid' && $this->project->payment->get('price')): ?> +
  • + : + project->payment->get('price'); ?> +
  • + + project->version): ?> +
  • + : + + project->version->version; ?> + +
  • + + project->downloads): ?> +
  • + : + project->downloads; ?> +
  • + + + project->hits): ?> +
  • + : + project->hits; ?> +
  • + +
+
+ project->download_type === 'paid' && $this->project->payment->get('link'))): ?> + + + + project->download_type === 'free'): ?> + + + + +
+
+
+
+
+
+ + + + + + + project->documentation): ?> + + + + + project->urls->toArray()): ?> + $url): + if (empty($url)) continue; ?> + + + + + +
+ items)) : ?> +
+ + +
+ +
+
+ items as $item) : ?> +
+
+
+ title; ?> +
+ introtext)): ?> +

introtext); ?>

+ +
+ + + +
+
+
+ +
+ +
+ +
+
+
\ No newline at end of file diff --git a/com_swjprojects/site/views/documentation/view.html.php b/com_swjprojects/site/views/documentation/view.html.php index 7fb6431d..fbe7f5b2 100644 --- a/com_swjprojects/site/views/documentation/view.html.php +++ b/com_swjprojects/site/views/documentation/view.html.php @@ -1,9 +1,9 @@ 'auto', 'relative' => true)); -HTMLHelper::script('com_swjprojects/popup.min.js', array('version' => 'auto', 'relative' => true)); -?> -
- project->images->get('cover')): ?> -

project->title); ?>

-
- -
-
- project->images->get('icon')): ?> -
project->title); ?>
- -
-

project->title; ?>

- project->introtext)): ?> -

- project->introtext; ?> -

- -
-
    -
  • - : - project->download_type); ?> -
  • - project->download_type === 'paid' && $this->project->payment->get('price')): ?> -
  • - : - project->payment->get('price'); ?> -
  • - - project->categories)): ?> -
  • - : - project->categories as $category) - { - if ($i > 0) echo ', '; - $i++; - echo '' . $category->title . ''; - } - ?> -
  • - -
  • - : - - category->title; ?> - -
  • - - version): ?> -
  • - : - - version->version; ?> - -
  • - - project->downloads): ?> -
  • - : - project->downloads; ?> -
  • - - - project->hits): ?> -
  • - : - project->hits; ?> -
  • - -
-
- project->download_type === 'paid' && $this->project->payment->get('link'))): ?> - - - - project->download_type === 'free'): ?> - - - - - - - - project->documentation): ?> - - - - - project->urls->toArray()): ?> - $url): - if (empty($url)) continue; ?> - - - - - -
-
-
-
-
- 'description', 'class')); ?> - - project->fulltext)) echo $this->project->fulltext; ?> - - - project->joomla): - $type = $this->project->joomla->get('type'); ?> - -
    -
  • - : - -
  • - -
  • - : - project->joomla->get('folder')); ?> -
  • - - -
  • - : - project->joomla->get('client_id')) ? - Text::_('COM_SWJPROJECTS_JOOMLA_LOCATION_ADMINISTRATOR') - : Text::_('COM_SWJPROJECTS_JOOMLA_LOCATION_SITE') ?> -
  • - - project->joomla->get('package_composition'))): ?> -
  • - : - project->joomla->get('package_composition') as $composition) - { - $compositions[] = Text::_('COM_SWJPROJECTS_JOOMLA_TYPE_' . $composition); - } - echo implode(', ', $compositions); ?> -
  • - - project->joomla->get('version')): ?> -
  • - : - project->joomla->get('version')); ?> -
  • - -
- - - project->gallery): ?> - - project->gallery, 2) as $r => $row): - echo ($r > 0) ? '
' : ''; ?> - - - - - - relations)): ?> - - relations, 2) as $r => $row): - echo ($r > 0) ? '
' : ''; ?> -
- -
-

- -

- - -

-
- -
- - - - - version && !empty($this->version->changelog)): ?> - - version->changelog as $item): - if (empty($item['title']) && empty($item['description'])) continue; - ?> -
- -

- - -
- -
-
- -
- version->date, Text::_('DATE_FORMAT_LC6')); ?> -
- - - -
\ No newline at end of file +echo $this->loadTemplate(((new Version())->isCompatible('4.0')) ? 'j4' : 'j3'); \ No newline at end of file diff --git a/com_swjprojects/site/views/project/tmpl/default.xml b/com_swjprojects/site/views/project/tmpl/default.xml index 27d626f2..5124b60e 100644 --- a/com_swjprojects/site/views/project/tmpl/default.xml +++ b/com_swjprojects/site/views/project/tmpl/default.xml @@ -9,7 +9,8 @@
+ required="true" + layout="joomla.form.field.list-fancy-select">
diff --git a/com_swjprojects/site/views/project/tmpl/default_j3.php b/com_swjprojects/site/views/project/tmpl/default_j3.php new file mode 100644 index 00000000..2a265325 --- /dev/null +++ b/com_swjprojects/site/views/project/tmpl/default_j3.php @@ -0,0 +1,234 @@ + 'auto', 'relative' => true)); +HTMLHelper::script('com_swjprojects/popup.min.js', array('version' => 'auto', 'relative' => true)); +?> +
+ project->images->get('cover')): ?> +

project->title); ?>

+
+ +
+
+ project->images->get('icon')): ?> +
project->title); ?>
+ +
+

project->title; ?>

+ project->introtext)): ?> +

+ project->introtext; ?> +

+ +
+
    +
  • + : + project->download_type); ?> +
  • + project->download_type === 'paid' && $this->project->payment->get('price')): ?> +
  • + : + project->payment->get('price'); ?> +
  • + + project->categories)): ?> +
  • + : + project->categories as $category) + { + if ($i > 0) echo ', '; + $i++; + echo '' . $category->title . ''; + } + ?> +
  • + +
  • + : + + category->title; ?> + +
  • + + version): ?> +
  • + : + + version->version; ?> + +
  • + + project->downloads): ?> +
  • + : + project->downloads; ?> +
  • + + + project->hits): ?> +
  • + : + project->hits; ?> +
  • + +
+
+ project->download_type === 'paid' && $this->project->payment->get('link'))): ?> + + + + project->download_type === 'free'): ?> + + + + + + + + project->documentation): ?> + + + + + project->urls->toArray()): ?> + $url): + if (empty($url)) continue; ?> + + + + + +
+
+
+
+
+ 'description', 'class')); ?> + + project->fulltext)) echo $this->project->fulltext; ?> + + + project->joomla): + $type = $this->project->joomla->get('type'); ?> + +
    +
  • + : + +
  • + +
  • + : + project->joomla->get('folder')); ?> +
  • + + +
  • + : + project->joomla->get('client_id')) ? + Text::_('COM_SWJPROJECTS_JOOMLA_LOCATION_ADMINISTRATOR') + : Text::_('COM_SWJPROJECTS_JOOMLA_LOCATION_SITE') ?> +
  • + + project->joomla->get('package_composition'))): ?> +
  • + : + project->joomla->get('package_composition') as $composition) + { + $compositions[] = Text::_('COM_SWJPROJECTS_JOOMLA_TYPE_' . $composition); + } + echo implode(', ', $compositions); ?> +
  • + + project->joomla->get('version')): ?> +
  • + : + project->joomla->get('version')); ?> +
  • + +
+ + + project->gallery): ?> + + project->gallery, 2) as $r => $row): + echo ($r > 0) ? '
' : ''; ?> + + + + + + relations)): ?> + + relations, 2) as $r => $row): + echo ($r > 0) ? '
' : ''; ?> +
+ +
+

+ +

+ + +

+
+ +
+ + + + + version && !empty($this->version->changelog)): ?> + + version->changelog as $item): + if (empty($item['title']) && empty($item['description'])) continue; + ?> +
+ +

+ + +
+ +
+
+ +
+ version->date, Text::_('DATE_FORMAT_LC6')); ?> +
+ + + +
\ No newline at end of file diff --git a/com_swjprojects/site/views/project/tmpl/default_j4.php b/com_swjprojects/site/views/project/tmpl/default_j4.php new file mode 100644 index 00000000..e76ab796 --- /dev/null +++ b/com_swjprojects/site/views/project/tmpl/default_j4.php @@ -0,0 +1,240 @@ + 'auto', 'relative' => true)); +?> +
+
+

project->title; ?>

+
+ project->categories)): ?> + : + project->categories as $category) + { + if ($i > 0) echo ', '; + $i++; + echo '' . $category->title . ''; + } + ?> + + : + + category->title; ?> + + +
+
+
+
+
+ project->images->get('icon')) + { + echo HTMLHelper::image($icon, $this->project->title, array('class' => 'card-img-top')); + } ?> +
+
    +
  • + : + project->download_type); ?> +
  • + project->download_type === 'paid' && $this->project->payment->get('price')): ?> +
  • + : + project->payment->get('price'); ?> +
  • + + version): ?> +
  • + : + + version->version; ?> + +
  • + + project->downloads): ?> +
  • + : + project->downloads; ?> +
  • + + + project->hits): ?> +
  • + : + project->hits; ?> +
  • + +
+
+ project->download_type === 'paid' && $this->project->payment->get('link'))): ?> + + + + project->download_type === 'free'): ?> + + + + +
+
+
+
+
+
+ + + + + + + project->documentation): ?> + + + + + project->urls->toArray()): ?> + $url): + if (empty($url)) continue; ?> + + + + + +
+
+
+ project->introtext)): ?> +

+ project->introtext; ?> +

+ + project->fulltext)): ?> +
+ project->fulltext; ?> +
+ +
+
+ 'whats_new', 'class')); ?> + + version && !empty($this->version->changelog)): ?> + version->changelog as $item): + if (empty($item['title']) && empty($item['description'])) continue; + ?> +
+ +

+ + +
+ +
+
+ +
+ version->date, Text::_('DATE_FORMAT_LC6')); ?> +
+ + + project->joomla): + $type = $this->project->joomla->get('type'); ?> + +
    +
  • + : + +
  • + +
  • + : + project->joomla->get('folder')); ?> +
  • + + +
  • + : + project->joomla->get('client_id')) ? + Text::_('COM_SWJPROJECTS_JOOMLA_LOCATION_ADMINISTRATOR') + : Text::_('COM_SWJPROJECTS_JOOMLA_LOCATION_SITE') ?> +
  • + + project->joomla->get('package_composition'))): ?> +
  • + : + project->joomla->get('package_composition') as $composition) + { + $compositions[] = Text::_('COM_SWJPROJECTS_JOOMLA_TYPE_' . $composition); + } + echo implode(', ', $compositions); ?> +
  • + + project->joomla->get('version')): ?> +
  • + : + project->joomla->get('version')); ?> +
  • + +
+ + + project->gallery): ?> + + project->gallery, 2) as $r => $row): ?> + + + + + + relations)): ?> + + relations, 2) as $r => $row): ?> +
+ + + +
+ + + + +
+
+
\ No newline at end of file diff --git a/com_swjprojects/site/views/project/view.html.php b/com_swjprojects/site/views/project/view.html.php index 7e147a09..d474da14 100644 --- a/com_swjprojects/site/views/project/view.html.php +++ b/com_swjprojects/site/views/project/view.html.php @@ -1,9 +1,9 @@ 'auto', 'relative' => true)); -?> -
- category->id > 1): ?> -
-

category->title; ?>

- category->description)): ?> -
- category->description; ?> -
- -
- - items)) : ?> -
- -
- -
-
- items as $i => $item) : - echo ($i > 0) ? '
' : ''; ?> -
- images->get('icon')): ?> -
title); ?>
- -
-

- title; ?> -

-
    -
  • - : - download_type); ?> -
  • - download_type === 'paid' && $item->payment->get('price')): ?> -
  • - : - payment->get('price'); ?> -
  • - - categories)): ?> -
  • - : - categories as $category) - { - if ($i > 0) echo ', '; - $i++; - echo '' . $category->title . ''; - } - ?> -
  • - -
  • - : - - category->title; ?> - -
  • - - version): ?> -
  • - : - - version->version; ?> - -
  • - - downloads): ?> -
  • - - : - downloads; ?> -
  • - - hits): ?> -
  • - : - hits; ?> -
  • - -
- introtext)): ?> -
- introtext; ?> -
- -
-
- download_type === 'paid' && $item->payment->get('link'))): ?> - - - - download_type === 'free'): ?> - - - - - - - -
-
-
-
- -
- -
- -
\ No newline at end of file +echo $this->loadTemplate(((new Version())->isCompatible('4.0')) ? 'j4' : 'j3'); \ No newline at end of file diff --git a/com_swjprojects/site/views/projects/tmpl/default.xml b/com_swjprojects/site/views/projects/tmpl/default.xml index 4c87064c..cc6ac480 100644 --- a/com_swjprojects/site/views/projects/tmpl/default.xml +++ b/com_swjprojects/site/views/projects/tmpl/default.xml @@ -9,25 +9,19 @@
+ required="true" + layout="joomla.form.field.list-fancy-select">
- - - - - - - - -
diff --git a/com_swjprojects/site/views/projects/tmpl/default_j3.php b/com_swjprojects/site/views/projects/tmpl/default_j3.php new file mode 100644 index 00000000..360a9d81 --- /dev/null +++ b/com_swjprojects/site/views/projects/tmpl/default_j3.php @@ -0,0 +1,130 @@ + 'auto', 'relative' => true)); +?> +
+ category->id > 1): ?> +
+

category->title; ?>

+ category->description)): ?> +
+ category->description; ?> +
+ +
+ + items)) : ?> +
+ +
+ +
+
+ items as $i => $item) : + echo ($i > 0) ? '
' : ''; ?> +
+ images->get('icon')): ?> +
title); ?>
+ +
+

+ title; ?> +

+
    +
  • + : + download_type); ?> +
  • + download_type === 'paid' && $item->payment->get('price')): ?> +
  • + : + payment->get('price'); ?> +
  • + + categories)): ?> +
  • + : + categories as $category) + { + if ($i > 0) echo ', '; + $i++; + echo '' . $category->title . ''; + } + ?> +
  • + +
  • + : + + category->title; ?> + +
  • + + version): ?> +
  • + : + + version->version; ?> + +
  • + + downloads): ?> +
  • + + : + downloads; ?> +
  • + + hits): ?> +
  • + : + hits; ?> +
  • + +
+ introtext)): ?> +
+ introtext; ?> +
+ +
+
+ download_type === 'paid' && $item->payment->get('link'))): ?> + + + + download_type === 'free'): ?> + + + + + + + +
+
+
+
+ +
+ +
+ +
\ No newline at end of file diff --git a/com_swjprojects/site/views/projects/tmpl/default_j4.php b/com_swjprojects/site/views/projects/tmpl/default_j4.php new file mode 100644 index 00000000..7dfa5f7a --- /dev/null +++ b/com_swjprojects/site/views/projects/tmpl/default_j4.php @@ -0,0 +1,137 @@ + 'auto', 'relative' => true)); + +$title = ($this->category->id > 1) ? $this->category->title + : Factory::getApplication()->getMenu()->getActive()->title; +?> +
+
+

+ category->description)): ?> +
+ category->description; ?> +
+ +
+ items)) : ?> +
+ + +
+ +
+
+ items, 3) as $r => $row): ?> +
+ $item): ?> +
+
+ images->get('icon')): ?> + + title, array('class' => 'card-img-top')); ?> + + +
+
+ title; ?> +
+
    +
  • + + : + download_type); ?> +
  • + download_type === 'paid' && $item->payment->get('price')): ?> +
  • + : + payment->get('price'); ?> +
  • + + categories)): ?> +
  • + + : + categories as $category) + { + if ($i > 0) echo ', '; + $i++; + echo '' . $category->title . ''; + } + ?> +
  • + +
  • + + : + + category->title; ?> + +
  • + + version): ?> +
  • + : + + version->version; ?> + +
  • + + downloads): ?> +
  • + + : + downloads; ?> +
  • + + hits): ?> +
  • + + : + hits; ?> +
  • + +
+ download_type === 'paid' && $item->payment->get('link'))): ?> + + + + download_type === 'free'): ?> + + + + + + + +
+
+
+ +
+ +
+ +
+ +
\ No newline at end of file diff --git a/com_swjprojects/site/views/projects/view.html.php b/com_swjprojects/site/views/projects/view.html.php index a4795a3d..91c27593 100644 --- a/com_swjprojects/site/views/projects/view.html.php +++ b/com_swjprojects/site/views/projects/view.html.php @@ -1,9 +1,9 @@ 'auto', 'relative' => true)); -?> -
- project->images->get('cover')): ?> -

project->title); ?>

-
- -
-
- project->images->get('icon')): ?> -
project->title); ?>
- -
-

- version->title; ?> -

-
-
    -
  • - : - version->download_type); ?> -
  • - version->download_type === 'paid' && $this->version->payment->get('price')): ?> -
  • - : - version->payment->get('price'); ?> -
  • - -
  • - : - - project->title; ?> - -
  • - project->categories)): ?> -
  • - : - project->categories as $category) - { - if ($i > 0) echo ', '; - $i++; - echo '' . $category->title . ''; - } - ?> -
  • - -
  • - : - - category->title; ?> - -
  • - - version->downloads): ?> -
  • - : - version->downloads; ?> -
  • - -
-
- version->download_type === 'paid' && $this->version->payment->get('link'))): ?> - - - - version->download_type === 'free'): ?> - - - - - - - - - - - project->urls->toArray()): ?> - $url): - if (empty($url)) continue; ?> - - - - - -
-
-
-
-
-
- version->changelog as $item): - if (empty($item['title']) && empty($item['description'])) continue; - ?> -
- -

- - -
- -
-
- -
-
\ No newline at end of file +echo $this->loadTemplate(((new Version())->isCompatible('4.0')) ? 'j4' : 'j3'); \ No newline at end of file diff --git a/com_swjprojects/site/views/version/tmpl/default.xml b/com_swjprojects/site/views/version/tmpl/default.xml index 288b68bd..d19bbb3e 100644 --- a/com_swjprojects/site/views/version/tmpl/default.xml +++ b/com_swjprojects/site/views/version/tmpl/default.xml @@ -9,7 +9,8 @@
+ required="true" + layout="joomla.form.field.list-fancy-select">
diff --git a/com_swjprojects/site/views/version/tmpl/default_j3.php b/com_swjprojects/site/views/version/tmpl/default_j3.php new file mode 100644 index 00000000..229d5357 --- /dev/null +++ b/com_swjprojects/site/views/version/tmpl/default_j3.php @@ -0,0 +1,122 @@ + 'auto', 'relative' => true)); +?> +
+ project->images->get('cover')): ?> +

project->title); ?>

+
+ +
+
+ project->images->get('icon')): ?> +
project->title); ?>
+ +
+

+ version->title; ?> +

+
+
    +
  • + : + version->download_type); ?> +
  • + version->download_type === 'paid' && $this->version->payment->get('price')): ?> +
  • + : + version->payment->get('price'); ?> +
  • + +
  • + : + + project->title; ?> + +
  • + project->categories)): ?> +
  • + : + project->categories as $category) + { + if ($i > 0) echo ', '; + $i++; + echo '' . $category->title . ''; + } + ?> +
  • + +
  • + : + + category->title; ?> + +
  • + + version->downloads): ?> +
  • + : + version->downloads; ?> +
  • + +
+
+ version->download_type === 'paid' && $this->version->payment->get('link'))): ?> + + + + version->download_type === 'free'): ?> + + + + + + + + + + + project->urls->toArray()): ?> + $url): + if (empty($url)) continue; ?> + + + + + +
+
+
+
+
+
+ version->changelog as $item): + if (empty($item['title']) && empty($item['description'])) continue; + ?> +
+ +

+ + +
+ +
+
+ +
+
\ No newline at end of file diff --git a/com_swjprojects/site/views/version/tmpl/default_j4.php b/com_swjprojects/site/views/version/tmpl/default_j4.php new file mode 100644 index 00000000..5ed1853f --- /dev/null +++ b/com_swjprojects/site/views/version/tmpl/default_j4.php @@ -0,0 +1,140 @@ + +
+
+

version->title; ?>

+
+ project->categories)): ?> + + : + project->categories as $category) + { + if ($i > 0) echo ', '; + $i++; + echo '' . $category->title . ''; + } + ?> + + : + + category->title; ?> + + +
+
+
+
+
+ project->images->get('icon')): ?> + + project->title, array('class' => 'card-img-top')); ?> + + +
+
    +
  • + : + project->download_type); ?> +
  • + project->download_type === 'paid' && $this->project->payment->get('price')): ?> +
  • + : + project->payment->get('price'); ?> +
  • + + version->version->version): ?> +
  • + : + version->version->version; ?> +
  • + + version->downloads): ?> +
  • + : + version->downloads; ?> +
  • + +
+
+ project->download_type === 'paid' && $this->project->payment->get('link'))): ?> + + + + project->download_type === 'free'): ?> + + + + +
+
+
+
+
+
+ + + + + + + project->documentation): ?> + + + + + project->urls->toArray()): ?> + $url): + if (empty($url)) continue; ?> + + + + + +
+
+
+

+
+ version->changelog as $item): + if (empty($item['title']) && empty($item['description'])) continue; + if ($i > 0) echo '
'; + $i++; + ?> +
+ +
+ + +
+ +
+ +
+
+
+
+
+
\ No newline at end of file diff --git a/com_swjprojects/site/views/version/view.html.php b/com_swjprojects/site/views/version/view.html.php index 4305d1ca..b7f63476 100644 --- a/com_swjprojects/site/views/version/view.html.php +++ b/com_swjprojects/site/views/version/view.html.php @@ -1,9 +1,9 @@ 'auto', 'relative' => true)); -?> -
-
-
- project->images->get('icon')): ?> -
project->title); ?>
- -
-

- project->title; ?> -

- project->introtext)): ?> -

- project->introtext; ?> -

- -
-
    -
  • - : - project->download_type); ?> -
  • - project->download_type === 'paid' && $this->project->payment->get('price')): ?> -
  • - : - project->payment->get('price'); ?> -
  • - - project->categories)): ?> -
  • - : - project->categories as $category) - { - if ($i > 0) echo ', '; - $i++; - echo '' . $category->title . ''; - } - ?> -
  • - -
  • - : - - category->title; ?> - -
  • - - project->version): ?> -
  • - : - - project->version->version; ?> - -
  • - - project->downloads): ?> -
  • - : - project->downloads; ?> -
  • - - project->hits): ?> -
  • - : - project->hits; ?> -
  • - -
-
- project->download_type === 'paid' && $this->project->payment->get('link'))): ?> - - - - project->download_type === 'free'): ?> - - - - - - - - project->urls->toArray()): ?> - $url): - if (empty($url)) continue; ?> - - - - - -
-
-
-
-
- items)) : ?> -
- -
- -
-
- items as $item) : ?> -
-

- title; ?> - download_type === 'free'): ?> - - - - -

-
    -
  • - : - date, Text::_('DATE_FORMAT_LC3')); ?> -
  • -
  • - : - - tag->title; ?> - -
  • - joomla_version)): ?> -
  • - : - joomla_version; ?> -
  • - - downloads): ?> -
  • - : - downloads; ?> -
  • - -
-
-
- -
- -
- -
\ No newline at end of file +echo $this->loadTemplate(((new Version())->isCompatible('4.0')) ? 'j4' : 'j3'); \ No newline at end of file diff --git a/com_swjprojects/site/views/versions/tmpl/default.xml b/com_swjprojects/site/views/versions/tmpl/default.xml index 6949bdc0..abf3bd9c 100644 --- a/com_swjprojects/site/views/versions/tmpl/default.xml +++ b/com_swjprojects/site/views/versions/tmpl/default.xml @@ -9,25 +9,19 @@
+ required="true" + layout="joomla.form.field.list-fancy-select">
- - - - - - - - -
diff --git a/com_swjprojects/site/views/versions/tmpl/default_j3.php b/com_swjprojects/site/views/versions/tmpl/default_j3.php new file mode 100644 index 00000000..c16ccded --- /dev/null +++ b/com_swjprojects/site/views/versions/tmpl/default_j3.php @@ -0,0 +1,164 @@ + 'auto', 'relative' => true)); +?> +
+
+
+ project->images->get('icon')): ?> +
project->title); ?>
+ +
+

+ project->title; ?> +

+ project->introtext)): ?> +

+ project->introtext; ?> +

+ +
+
    +
  • + : + project->download_type); ?> +
  • + project->download_type === 'paid' && $this->project->payment->get('price')): ?> +
  • + : + project->payment->get('price'); ?> +
  • + + project->categories)): ?> +
  • + : + project->categories as $category) + { + if ($i > 0) echo ', '; + $i++; + echo '' . $category->title . ''; + } + ?> +
  • + +
  • + : + + category->title; ?> + +
  • + + project->version): ?> +
  • + : + + project->version->version; ?> + +
  • + + project->downloads): ?> +
  • + : + project->downloads; ?> +
  • + + project->hits): ?> +
  • + : + project->hits; ?> +
  • + +
+
+ project->download_type === 'paid' && $this->project->payment->get('link'))): ?> + + + + project->download_type === 'free'): ?> + + + + + + + + project->urls->toArray()): ?> + $url): + if (empty($url)) continue; ?> + + + + + +
+
+
+
+
+ items)) : ?> +
+ +
+ +
+
+ items as $item) : ?> +
+

+ title; ?> + download_type === 'free'): ?> + + + + +

+
    +
  • + : + date, Text::_('DATE_FORMAT_LC3')); ?> +
  • +
  • + : + + tag->title; ?> + +
  • + joomla_version)): ?> +
  • + : + joomla_version; ?> +
  • + + downloads): ?> +
  • + : + downloads; ?> +
  • + +
+
+
+ +
+ +
+ +
\ No newline at end of file diff --git a/com_swjprojects/site/views/versions/tmpl/default_j4.php b/com_swjprojects/site/views/versions/tmpl/default_j4.php new file mode 100644 index 00000000..ee8a1d5b --- /dev/null +++ b/com_swjprojects/site/views/versions/tmpl/default_j4.php @@ -0,0 +1,190 @@ + +
+
+

project->title . ' - ' . Text::_('COM_SWJPROJECTS_VERSIONS'); ?>

+
+ project->categories)): ?> + : + project->categories as $category) + { + if ($i > 0) echo ', '; + $i++; + echo '' . $category->title . ''; + } + ?> + + : + + category->title; ?> + + +
+
+
+
+
+ project->images->get('icon')): ?> + + project->title, array('class' => 'card-img-top')); ?> + + +
+
    +
  • + : + project->download_type); ?> +
  • + project->download_type === 'paid' && $this->project->payment->get('price')): ?> +
  • + : + project->payment->get('price'); ?> +
  • + + project->version): ?> +
  • + : + + project->version->version; ?> + +
  • + + project->downloads): ?> +
  • + : + project->downloads; ?> +
  • + + + project->hits): ?> +
  • + : + project->hits; ?> +
  • + +
+
+ project->download_type === 'paid' && $this->project->payment->get('link'))): ?> + + + + project->download_type === 'free'): ?> + + + + +
+
+
+
+
+
+ + + + + + + project->documentation): ?> + + + + + project->urls->toArray()): ?> + $url): + if (empty($url)) continue; ?> + + + + + +
+ items)) : ?> +
+ + +
+ +
+
+ items, 3) as $r => $row): ?> +
+ $item): ?> +
+
+
+
+ version->version; ?> +
+
    +
  • + : + date, Text::_('DATE_FORMAT_LC3')); ?> +
  • +
  • + + : + + tag->title; ?> + +
  • + joomla_version)): ?> +
  • + + : + joomla_version; ?> +
  • + + downloads): ?> +
  • + + : + downloads; ?> +
  • + +
+ download_type === 'free'): ?> +
+ + + +
+ +
+
+
+ +
+ +
+
+ + +
+
+
\ No newline at end of file diff --git a/com_swjprojects/site/views/versions/view.html.php b/com_swjprojects/site/views/versions/view.html.php index c73b82bf..4d5e0efa 100644 --- a/com_swjprojects/site/views/versions/view.html.php +++ b/com_swjprojects/site/views/versions/view.html.php @@ -1,9 +1,9 @@ - + COM_SWJPROJECTS Septdir Workshop - July 2020 - Copyright (c) 2018 - 2020 Septdir Workshop. All rights reserved. + August 2022 + Copyright (c) 2018 - 2022 Septdir Workshop. All rights reserved. https://www.gnu.org/copyleft/gpl.html GNU/GPL development@septdir.com https://www.septdir.com/ - 1.5.6-dev + 1.6.0 COM_SWJPROJECTS_DESCRIPTION script.php @@ -47,6 +47,9 @@ COM_SWJPROJECTS_KEYS COM_SWJPROJECTS_DOCUMENTATION COM_SWJPROJECTS_CATEGORIES + + COM_SWJPROJECTS_CONFIG + controllers diff --git a/language/en-GB/en-GB.pkg_swjprojects.sys.ini b/language/en-GB/en-GB.pkg_swjprojects.sys.ini index fe62e64d..b36f4d69 100644 --- a/language/en-GB/en-GB.pkg_swjprojects.sys.ini +++ b/language/en-GB/en-GB.pkg_swjprojects.sys.ini @@ -1,7 +1,7 @@ ; @package SW JProjects Package -; @version __DEPLOY_VERSION__ +; @version 1.6.0 ; @author Septdir Workshop - www.septdir.com -; @copyright Copyright (c) 2018 - 2020 Septdir Workshop. All rights reserved. +; @copyright Copyright (c) 2018 - 2022 Septdir Workshop. All rights reserved. ; @license GNU/GPL license: https://www.gnu.org/copyleft/gpl.html ; @link https://www.septdir.com/ ; Note : All ini files need to be saved as UTF-8 diff --git a/language/ru-RU/ru-RU.pkg_swjprojects.sys.ini b/language/ru-RU/ru-RU.pkg_swjprojects.sys.ini index 148e2efd..caebf119 100644 --- a/language/ru-RU/ru-RU.pkg_swjprojects.sys.ini +++ b/language/ru-RU/ru-RU.pkg_swjprojects.sys.ini @@ -1,7 +1,7 @@ ; @package SW JProjects Package -; @version __DEPLOY_VERSION__ +; @version 1.6.0 ; @author Septdir Workshop - www.septdir.com -; @copyright Copyright (c) 2018 - 2020 Septdir Workshop. All rights reserved. +; @copyright Copyright (c) 2018 - 2022 Septdir Workshop. All rights reserved. ; @license GNU/GPL license: https://www.gnu.org/copyleft/gpl.html ; @link https://www.septdir.com/ ; Note : All ini files need to be saved as UTF-8 diff --git a/mod_swjprojects_projects/language/en-GB/en-GB.mod_swjprojects_projects.ini b/mod_swjprojects_projects/language/en-GB/en-GB.mod_swjprojects_projects.ini index 4503a907..9d150c6e 100644 --- a/mod_swjprojects_projects/language/en-GB/en-GB.mod_swjprojects_projects.ini +++ b/mod_swjprojects_projects/language/en-GB/en-GB.mod_swjprojects_projects.ini @@ -1,7 +1,7 @@ ; @package SW JProjects - Projects Module -; @version __DEPLOY_VERSION__ +; @version 1.6.0 ; @author Septdir Workshop - www.septdir.com -; @copyright Copyright (c) 2018 - 2020 Septdir Workshop. All rights reserved. +; @copyright Copyright (c) 2018 - 2022 Septdir Workshop. All rights reserved. ; @license GNU/GPL license: https://www.gnu.org/copyleft/gpl.html ; @link https://www.septdir.com/ ; Note : All ini files need to be saved as UTF-8 diff --git a/mod_swjprojects_projects/language/en-GB/en-GB.mod_swjprojects_projects.sys.ini b/mod_swjprojects_projects/language/en-GB/en-GB.mod_swjprojects_projects.sys.ini index 58230e89..4265f14d 100644 --- a/mod_swjprojects_projects/language/en-GB/en-GB.mod_swjprojects_projects.sys.ini +++ b/mod_swjprojects_projects/language/en-GB/en-GB.mod_swjprojects_projects.sys.ini @@ -1,7 +1,7 @@ ; @package SW JProjects - Projects Module -; @version __DEPLOY_VERSION__ +; @version 1.6.0 ; @author Septdir Workshop - www.septdir.com -; @copyright Copyright (c) 2018 - 2020 Septdir Workshop. All rights reserved. +; @copyright Copyright (c) 2018 - 2022 Septdir Workshop. All rights reserved. ; @license GNU/GPL license: https://www.gnu.org/copyleft/gpl.html ; @link https://www.septdir.com/ ; Note : All ini files need to be saved as UTF-8 diff --git a/mod_swjprojects_projects/language/ru-RU/ru-RU.mod_swjprojects_projects.ini b/mod_swjprojects_projects/language/ru-RU/ru-RU.mod_swjprojects_projects.ini index 4e2b9ee2..e8af0d54 100644 --- a/mod_swjprojects_projects/language/ru-RU/ru-RU.mod_swjprojects_projects.ini +++ b/mod_swjprojects_projects/language/ru-RU/ru-RU.mod_swjprojects_projects.ini @@ -1,7 +1,7 @@ ; @package SW JProjects - Projects Module -; @version __DEPLOY_VERSION__ +; @version 1.6.0 ; @author Septdir Workshop - www.septdir.com -; @copyright Copyright (c) 2018 - 2020 Septdir Workshop. All rights reserved. +; @copyright Copyright (c) 2018 - 2022 Septdir Workshop. All rights reserved. ; @license GNU/GPL license: https://www.gnu.org/copyleft/gpl.html ; @link https://www.septdir.com/ ; Note : All ini files need to be saved as UTF-8 diff --git a/mod_swjprojects_projects/language/ru-RU/ru-RU.mod_swjprojects_projects.sys.ini b/mod_swjprojects_projects/language/ru-RU/ru-RU.mod_swjprojects_projects.sys.ini index e5fb76b2..a8103591 100644 --- a/mod_swjprojects_projects/language/ru-RU/ru-RU.mod_swjprojects_projects.sys.ini +++ b/mod_swjprojects_projects/language/ru-RU/ru-RU.mod_swjprojects_projects.sys.ini @@ -1,7 +1,7 @@ ; @package SW JProjects - Projects Module -; @version __DEPLOY_VERSION__ +; @version 1.6.0 ; @author Septdir Workshop - www.septdir.com -; @copyright Copyright (c) 2018 - 2020 Septdir Workshop. All rights reserved. +; @copyright Copyright (c) 2018 - 2022 Septdir Workshop. All rights reserved. ; @license GNU/GPL license: https://www.gnu.org/copyleft/gpl.html ; @link https://www.septdir.com/ ; Note : All ini files need to be saved as UTF-8 diff --git a/mod_swjprojects_projects/mod_swjprojects_projects.php b/mod_swjprojects_projects/mod_swjprojects_projects.php index 853a88c9..8397bdc5 100644 --- a/mod_swjprojects_projects/mod_swjprojects_projects.php +++ b/mod_swjprojects_projects/mod_swjprojects_projects.php @@ -1,9 +1,9 @@ MOD_SWJPROJECTS_PROJECTS Septdir Workshop - July 2020 - Copyright (c) 2018 - 2020 Septdir Workshop. All rights reserved. + August 2022 + Copyright (c) 2018 - 2022 Septdir Workshop. All rights reserved. https://www.gnu.org/copyleft/gpl.html GNU/GPL development@septdir.com https://www.septdir.com/ - 1.5.6-dev + 1.6.0 MOD_SWJPROJECTS_PROJECTS_DESCRIPTION en-GB/en-GB.mod_swjprojects_projects.ini diff --git a/mod_swjprojects_projects/tmpl/default.php b/mod_swjprojects_projects/tmpl/default.php index ef12c9f0..ba5bf12b 100644 --- a/mod_swjprojects_projects/tmpl/default.php +++ b/mod_swjprojects_projects/tmpl/default.php @@ -1,9 +1,9 @@ MOD_SWJPROJECTS_VERSIONS Septdir Workshop - July 2020 - Copyright (c) 2018 - 2020 Septdir Workshop. All rights reserved. + August 2022 + Copyright (c) 2018 - 2022 Septdir Workshop. All rights reserved. https://www.gnu.org/copyleft/gpl.html GNU/GPL development@septdir.com https://www.septdir.com/ - 1.5.6-dev + 1.6.0 MOD_SWJPROJECTS_VERSIONS_DESCRIPTION en-GB/en-GB.mod_swjprojects_versions.ini diff --git a/mod_swjprojects_versions/tmpl/default.php b/mod_swjprojects_versions/tmpl/default.php index 1e74ac1d..84711949 100644 --- a/mod_swjprojects_versions/tmpl/default.php +++ b/mod_swjprojects_versions/tmpl/default.php @@ -1,9 +1,9 @@ PKG_SWJPROJECTS swjprojects Septdir Workshop - July 2020 - Copyright (c) 2018 - 2020 Septdir Workshop. All rights reserved. + August 2022 + Copyright (c) 2018 - 2022 Septdir Workshop. All rights reserved. https://www.gnu.org/copyleft/gpl.html GNU/GPL development@septdir.com https://www.septdir.com/ - 1.5.6-dev + 1.6.0 PKG_SWJPROJECTS_DESCRIPTION script.php diff --git a/script.php b/script.php index 36caac91..9da3ae3a 100644 --- a/script.php +++ b/script.php @@ -1,9 +1,9 @@