-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
100 changed files
with
12,335 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<access component="com_swjprojects"> | ||
<section name="component"> | ||
<action name="core.admin" title="JACTION_ADMIN" description="JACTION_ADMIN_COMPONENT_DESC"/> | ||
<action name="core.manage" title="JACTION_MANAGE" description="JACTION_MANAGE_COMPONENT_DESC"/> | ||
<action name="core.create" title="JACTION_CREATE" description="JACTION_CREATE_COMPONENT_DESC"/> | ||
<action name="core.delete" title="JACTION_DELETE" description="JACTION_DELETE_COMPONENT_DESC"/> | ||
<action name="core.edit" title="JACTION_EDIT" description="JACTION_EDIT_COMPONENT_DESC"/> | ||
<action name="core.edit.state" title="JACTION_EDITSTATE" description="JACTION_EDITSTATE_COMPONENT_DESC"/> | ||
</section> | ||
</access> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?xml version="1.0"?> | ||
<config> | ||
<fieldset name="global" label="JGLOBAL_FIELDSET_OPTIONS"> | ||
<field name="sef_advanced" type="hidden" default="1"/> | ||
<field name="files_folder" type="text" | ||
label="COM_SWJPROJECTS_PARAMS_FILES_FOLDER" | ||
description="COM_SWJPROJECTS_PARAMS_FILES_FOLDER_DESC" | ||
class="input-xxlarge"/> | ||
<field name="projects_limit" type="list" | ||
label="COM_SWJPROJECTS_PARAMS_PROJECTS_LIMIT" | ||
default="10"> | ||
<option value="5">J5</option> | ||
<option value="10">J10</option> | ||
<option value="15">J15</option> | ||
<option value="20">J20</option> | ||
<option value="25">J25</option> | ||
<option value="30">J30</option> | ||
<option value="50">J50</option> | ||
<option value="100">J100</option> | ||
<option value="0">JALL</option> | ||
</field> | ||
<field name="projects_layout" type="componentlayout" | ||
label="COM_SWJPROJECTS_PARAMS_PROJECTS_LAYOUT" | ||
extension="com_swjprojects" | ||
view="projects"/> | ||
<field name="project_layout" type="componentlayout" | ||
label="COM_SWJPROJECTS_PARAMS_PROJECT_LAYOUT" | ||
extension="com_swjprojects" | ||
view="project"/> | ||
<field name="versions_limit" type="list" | ||
label="COM_SWJPROJECTS_PARAMS_VERSIONS_LIMIT" | ||
default="10"> | ||
<option value="5">J5</option> | ||
<option value="10">J10</option> | ||
<option value="15">J15</option> | ||
<option value="20">J20</option> | ||
<option value="25">J25</option> | ||
<option value="30">J30</option> | ||
<option value="50">J50</option> | ||
<option value="100">J100</option> | ||
<option value="0">JALL</option> | ||
</field> | ||
<field name="versions_layout" type="componentlayout" | ||
label="COM_SWJPROJECTS_PARAMS_VERSIONS_LAYOUT" | ||
extension="com_swjprojects" | ||
view="versions"/> | ||
<field name="version_layout" type="componentlayout" | ||
label="COM_SWJPROJECTS_PARAMS_VERSION_LAYOUT" | ||
extension="com_swjprojects" | ||
view="version"/> | ||
<field name="jupdate_cachetimeout" type="integer" | ||
label="COM_SWJPROJECTS_PARAMS_JUPDATE_CACHETIMEOUT" | ||
description="COM_SWJPROJECTS_PARAMS_JUPDATE_CACHETIMEOUT_DESC" | ||
first="0" | ||
last="24" | ||
step="1" | ||
default="0"/> | ||
</fieldset> | ||
<fieldset name="permissions" | ||
label="JCONFIG_PERMISSIONS_LABEL" | ||
description="JCONFIG_PERMISSIONS_DESC"> | ||
<field name="rules" type="rules" | ||
label="JCONFIG_PERMISSIONS_LABEL" | ||
class="inputbox" | ||
validate="rules" | ||
filter="rules" | ||
component="com_swjprojects" | ||
section="component"/> | ||
</fieldset> | ||
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<?php | ||
/** | ||
* @package SW JProjects Component | ||
* @version 1.0.0 | ||
* @author Septdir Workshop - www.septdir.com | ||
* @copyright Copyright (c) 2018 - 2018 Septdir Workshop. All rights reserved. | ||
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html | ||
* @link https://www.septdir.com/ | ||
*/ | ||
|
||
defined('_JEXEC') or die; | ||
|
||
use Joomla\CMS\Language\Text; | ||
use Joomla\CMS\MVC\Controller\BaseController; | ||
use Joomla\CMS\Router\Route; | ||
use Joomla\CMS\Uri\Uri; | ||
|
||
class SWJProjectsController extends BaseController | ||
{ | ||
/** | ||
* The default view. | ||
* | ||
* @var string | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
protected $default_view = 'versions'; | ||
|
||
/** | ||
* Redirect to site. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
public function siteRedirect() | ||
{ | ||
JLoader::register('SWJProjectsHelperRoute', JPATH_SITE . '/components/com_swjprojects/helpers/route.php'); | ||
|
||
$page = $this->input->get('page', false); | ||
$id = $this->input->getInt('id'); | ||
$catid = $this->input->getInt('catid'); | ||
$project_id = $this->input->getInt('project_id'); | ||
$version_id = $this->input->getInt('version_id'); | ||
$element = $this->input->get('element'); | ||
|
||
$redirects = array( | ||
'projects' => SWJProjectsHelperRoute::getProjectsRoute($id), | ||
'project' => SWJProjectsHelperRoute::getProjectRoute($id, $catid), | ||
'versions' => SWJProjectsHelperRoute::getVersionsRoute($id, $catid), | ||
'version' => SWJProjectsHelperRoute::getVersionRoute($id, $project_id, $catid), | ||
'download' => SWJProjectsHelperRoute::getDownloadRoute($version_id, $project_id, $element), | ||
'jupdate' => SWJProjectsHelperRoute::getJUpdateRoute($project_id, $element) | ||
); | ||
|
||
$redirect = (!empty($page) && !empty($redirects[$page])) ? $redirects[$page] : false; | ||
|
||
if (!$redirect) | ||
{ | ||
$this->setMessage(Text::_('COM_SWJPROJECTS_ERROR_PAGE_NOT_FOUND'), 'error'); | ||
$this->setRedirect(Route::_('index.php?option=com_centers&view=' . $this->input->get('view'))); | ||
$this->redirect(); | ||
} | ||
|
||
// Set Redirect | ||
$debug = ($this->input->get('debug', false)) ? '&debug=1' : ''; | ||
$this->setRedirect(Uri::root() . $redirect . $debug); | ||
$this->redirect(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?php | ||
/** | ||
* @package SW JProjects Component | ||
* @version 1.0.0 | ||
* @author Septdir Workshop - www.septdir.com | ||
* @copyright Copyright (c) 2018 - 2018 Septdir Workshop. All rights reserved. | ||
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html | ||
* @link https://www.septdir.com/ | ||
*/ | ||
|
||
defined('_JEXEC') or die; | ||
|
||
use Joomla\CMS\Language\Text; | ||
use Joomla\CMS\MVC\Controller\AdminController; | ||
use Joomla\CMS\Router\Route; | ||
use Joomla\CMS\Session\Session; | ||
|
||
class SWJProjectsControllerCategories extends AdminController | ||
{ | ||
/** | ||
* The prefix to use with controller messages. | ||
* | ||
* @var string | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
protected $text_prefix = 'COM_SWJPROJECTS_CATEGORIES'; | ||
|
||
/** | ||
* Rebuild the nested set tree. | ||
* | ||
* @return boolean False on failure or error, true on success. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
public function rebuild() | ||
{ | ||
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN')); | ||
|
||
$this->setRedirect(Route::_('index.php?option=com_swjprojects&view=categories', false)); | ||
|
||
if ($this->getModel()->rebuild()) | ||
{ | ||
// Rebuild succeeded | ||
$this->setMessage(Text::_('COM_SWJPROJECTS_CATEGORIES_REBUILD_SUCCESS')); | ||
|
||
return true; | ||
} | ||
|
||
// Rebuild failed | ||
$this->setMessage(Text::_('COM_SWJPROJECTS_CATEGORIES_REBUILD_FAILURE')); | ||
|
||
return false; | ||
} | ||
|
||
/** | ||
* Proxy for getModel. | ||
* | ||
* @param string $name The model name. | ||
* @param string $prefix The class prefix. | ||
* @param array $config The array of possible config values. | ||
* | ||
* @return \Joomla\CMS\MVC\Model\BaseDatabaseModel A model object. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
public function getModel($name = 'Category', $prefix = 'SWJProjectsModel', $config = array('ignore_request' => true)) | ||
{ | ||
return parent::getModel($name, $prefix, $config); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
/** | ||
* @package SW JProjects Component | ||
* @version 1.0.0 | ||
* @author Septdir Workshop - www.septdir.com | ||
* @copyright Copyright (c) 2018 - 2018 Septdir Workshop. All rights reserved. | ||
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html | ||
* @link https://www.septdir.com/ | ||
*/ | ||
|
||
defined('_JEXEC') or die; | ||
|
||
use Joomla\CMS\MVC\Controller\FormController; | ||
|
||
class SWJProjectsControllerCategory extends FormController | ||
{ | ||
/** | ||
* The prefix to use with controller messages. | ||
* | ||
* @var string | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
protected $text_prefix = 'COM_SWJPROJECTS_CATEGORY'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
/** | ||
* @package SW JProjects Component | ||
* @version 1.0.0 | ||
* @author Septdir Workshop - www.septdir.com | ||
* @copyright Copyright (c) 2018 - 2018 Septdir Workshop. All rights reserved. | ||
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html | ||
* @link https://www.septdir.com/ | ||
*/ | ||
|
||
defined('_JEXEC') or die; | ||
|
||
use Joomla\CMS\MVC\Controller\FormController; | ||
|
||
class SWJProjectsControllerProject extends FormController | ||
{ | ||
/** | ||
* The prefix to use with controller messages. | ||
* | ||
* @var string | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
protected $text_prefix = 'COM_SWJPROJECTS_PROJECT'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
/** | ||
* @package SW JProjects Component | ||
* @version 1.0.0 | ||
* @author Septdir Workshop - www.septdir.com | ||
* @copyright Copyright (c) 2018 - 2018 Septdir Workshop. All rights reserved. | ||
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html | ||
* @link https://www.septdir.com/ | ||
*/ | ||
|
||
defined('_JEXEC') or die; | ||
|
||
use Joomla\CMS\MVC\Controller\AdminController; | ||
|
||
class SWJProjectsControllerProjects extends AdminController | ||
{ | ||
/** | ||
* The prefix to use with controller messages. | ||
* | ||
* @var string | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
protected $text_prefix = 'COM_SWJPROJECTS_PROJECTS'; | ||
|
||
/** | ||
* Proxy for getModel. | ||
* | ||
* @param string $name The model name. | ||
* @param string $prefix The class prefix. | ||
* @param array $config The array of possible config values. | ||
* | ||
* @return \Joomla\CMS\MVC\Model\BaseDatabaseModel A model object. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
public function getModel($name = 'Project', $prefix = 'SWJProjectsModel', $config = array('ignore_request' => true)) | ||
{ | ||
return parent::getModel($name, $prefix, $config); | ||
} | ||
} |
Oops, something went wrong.