Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/administrator/components/com_ccm/access.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<access component="com_ccm">
    <section name="component">
        <action name="core.admin" title="JACTION_ADMIN" />
        <action name="core.options" title="JACTION_OPTIONS" />
        <action name="core.manage" title="JACTION_MANAGE" />
        <action name="core.create" title="JACTION_CREATE" />
        <action name="core.delete" title="JACTION_DELETE" />
        <action name="core.edit" title="JACTION_EDIT" />
    </section>
<section name="component">
<action name="core.admin" title="JACTION_ADMIN" />
<action name="core.options" title="JACTION_OPTIONS" />
<action name="core.manage" title="JACTION_MANAGE" />
<action name="core.create" title="JACTION_CREATE" />
<action name="core.delete" title="JACTION_DELETE" />
<action name="core.edit" title="JACTION_EDIT" />
</section>
</access>
6 changes: 3 additions & 3 deletions src/administrator/components/com_ccm/ccm.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" method="upgrade">
<name>COM_CCM</name>
<name>com_ccm</name>
<creationDate>2025-05-14</creationDate>
<author>Joomla! Project</author>
<authorEmail>joomla@example.com</authorEmail>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>1.0.1</version>
<version>0.10.0</version>
<description>COM_CCM_DESCRIPTION</description>
<namespace path="src">Joomla\Component\CCM</namespace>
<install>
Expand Down Expand Up @@ -42,7 +42,7 @@
<language tag="en-GB">language/en-GB/com_ccm.sys.ini</language>
<language tag="en-GB">language/en-GB/com_ccm.ini</language>
</languages>
<menu link="option=com_ccm&amp;view=cmss" img="class:default">COM_CCM_MENU_BACKEND</menu>
<menu link="option=com_ccm" img="class:default">COM_CCM_MENU_BACKEND</menu>
<submenu>
<menu link="option=com_ccm&amp;view=cmss" img="class:default">COM_CCM_SUBMENU_CMS</menu>
<menu link="option=com_ccm&amp;view=migration" img="class:default">COM_CCM_SUBMENU_MIGRATION</menu>
Expand Down
10 changes: 3 additions & 7 deletions src/administrator/components/com_ccm/config.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<config addfieldprefix="Joomla\Component\CCM\Administrator\Field">
<help key="CCM"/>
<inlinehelp button="show"/>
<fieldset name="ccm" label="COM_CCM_OPTIONS">
<field
type="text"
label="COM_CCM_CONFIG_CMS_NAME_LABEL"
description="COM_CCM_CONFIG_CMS_NAME_DESCRIPTION"
/>

</fieldset>
</config>
</config>
10 changes: 4 additions & 6 deletions src/administrator/components/com_ccm/language/en-GB/com_ccm.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
COM_CCM="CMS Migration"
COM_CCM="CMS Content Migration"
COM_CCM_APPLY_MIGRATION_BTN="Apply Migration"
COM_CCM_CMS_ID="CMS ID"
COM_CCM_CMS_NAME="CMS Name"
COM_CCM_CMS_NAME_ADD="Add new CMS"
COM_CCM_CMS_NAME_EDIT="Edit CMS"
COM_CCM_CMS_NAME_LIST="CMS Names List"
COM_CCM_CMSS_TABLE_CAPTION="Content Management Systems"
COM_CCM_CONFIG_CCM_MAPPED_FIELDS_LABEL="CCM Mapped Fields"
COM_CCM_CONFIG_CCM_MAPPING_LABEL="CCM Mapping"
COM_CCM_CONFIG_CCM_UNMAPPED_FIELDS_LABEL="CCM Unmapped Fields"
Expand All @@ -16,14 +17,11 @@ COM_CCM_CONFIG_MIGRATION_LABEL="Select CMS you want to migrate with"
COM_CCM_CONFIG_NAME_LABEL="CMS Name"
COM_CCM_CONFIG_URL_LABEL="CMS URL"
COM_CCM_CONFIGURATION="CCM Migration Configuration"
COM_CCM_DESCRIPTION="CONTENT MIGRATION COMPONENT"
COM_CCM_DESCRIPTION="CMS Content Migration . Migrating content via the web services API from a source CMS to a target CMS."
COM_CCM_FILTER_SEARCH="Search"
COM_CCM_MENU_BACKEND="CMSs"
COM_CCM_MIGRATION_FIELDSET_LABEL="Migration Settings"
COM_CCM_MIGRATION_SOURCE_CMS="Source CMS"
COM_CCM_MIGRATION_TARGET_CMS="Target CMS"
COM_CCM_OPTIONS="Options"
COM_CCM_SUBMENU_CMS="CMS Management"
COM_CCM_SUBMENU_MIGRATION="Migration"
COM_CCM_TITLE_CMS="Content Management Systems"
COM_CCM_TITLE_MIGRATION="Content Migration"
COM_CCM_TITLE_MIGRATION="Content Migration"
Original file line number Diff line number Diff line change
@@ -1,28 +1,5 @@
COM_CCM="CMS Migration"
COM_CCM_APPLY_MIGRATION_BTN="Apply Migration"
COM_CCM_CMS_ID="CMS ID"
COM_CCM_CMS_NAME="CMS Name"
COM_CCM_CMS_NAME_ADD="Add new CMS"
COM_CCM_CMS_NAME_EDIT="Edit CMS"
COM_CCM_CMS_NAME_LIST="CMS Names List"
COM_CCM_CONFIG_CCM_MAPPED_FIELDS_LABEL="CCM Mapped Fields"
COM_CCM_CONFIG_CCM_MAPPING_LABEL="CCM Mapping"
COM_CCM_CONFIG_CCM_UNMAPPED_FIELDS_LABEL="CCM Unmapped Fields"
COM_CCM_CONFIG_CMS_NAME_DESCRIPTION="The name of the CMS to migrate from."
COM_CCM_CONFIG_CREDENTIALS_LABEL="Credentials"
COM_CCM_CONFIG_ID_LABEL="CMS ID"
COM_CCM_CONFIG_MIGRATION_LABEL="Select CMS you want to migrate with"
COM_CCM_CONFIG_NAME_LABEL="CMS Name"
COM_CCM_CONFIG_URL_LABEL="CMS URL"
COM_CCM_CONFIGURATION="CCM Migration Configuration"
COM_CCM_DESCRIPTION="CONTENT MIGRATION COMPONENT"
COM_CCM_FILTER_SEARCH="Search"
COM_CCM_MENU_BACKEND="CMSs"
COM_CCM_MIGRATION_FIELDSET_LABEL="Migration Settings"
COM_CCM_MIGRATION_SOURCE_CMS="Source CMS"
COM_CCM_MIGRATION_TARGET_CMS="Target CMS"
COM_CCM_OPTIONS="Options"
COM_CCM="CMS Content Migration"
COM_CCM_DESCRIPTION="CMS Content Migration . Migrating content via the web services API from a source CMS to a target CMS."
COM_CCM_MENU_BACKEND="CMS Content Migration"
COM_CCM_SUBMENU_CMS="CMS Management"
COM_CCM_SUBMENU_MIGRATION="Migration"
COM_CCM_TITLE_CMS="Content Management Systems"
COM_CCM_TITLE_MIGRATION="Content Migration"
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// phpcs:enable PSR1.Files.SideEffects

use Joomla\CMS\MVC\Controller\FormController;
use Joomla\Component\CCM\Administrator\Model\CmsModel;

class CmsController extends FormController
{
protected function getRedirectToListAppend()
Expand All @@ -38,6 +40,8 @@ public function migrate()
* @param string $urlVar The name of the URL variable if different from the primary key.
*
* @return void
*
* @since 1.0.0
*/
public function save($key = null, $urlVar = null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/**
* CmssController class.
*
* @since __DEV__
* @since 1.0.0
*/
class CmssController extends ListController
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class DisplayController extends BaseController
* The default view.
*
* @var string
* @since __DEV__
* @since 1.0.0
*/
protected $default_view = 'Cmss';

Expand All @@ -34,7 +34,7 @@ class DisplayController extends BaseController
*
* @return static This object to support chaining.
*
* @since __DEV__
* @since 1.0.0
*/
public function display($cachable = false, $urlparams = [])
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function boot(ContainerInterface $container) {
*
* @return array
*
* @since __DEV__
* @since 1.0.0
*/
public function getContexts(): array
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// what if data is null (e.g. image), then I can't get its type

class CcmField extends ListField {
// define a custom form field

// the name of the type for our new field
protected $type = 'ccm';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use Joomla\CMS\Form\Field\ListField;

class CmsField extends ListField { // this should be named CmsNameField
// define a custom form field

// the name of the type for our new field
protected $type = 'cms';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use Joomla\CMS\Form\Field\ListField;

class CmsObjTypeField extends ListField {
// define a custom form field

// the name of the type for our new field
protected $type = 'cmsobjtype';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ class MigrationHelper
* Parse credentials for HTTP authentication headers.
*
* @param string $credentials Credentials string (token or username:password)
*
* @return array Headers array for HTTP requests
*
* @since 1.0.0
*/
public static function parseAuthentication($credentials)
{
Expand Down
24 changes: 0 additions & 24 deletions src/administrator/components/com_ccm/src/Service/Router.php

This file was deleted.

17 changes: 11 additions & 6 deletions src/administrator/components/com_ccm/tmpl/cmss/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,20 @@
</div>
<?php else : ?>
<table class="table table-striped" id="cmsList">
<caption class="visually-hidden">
<?php echo Text::_('COM_CCM_CMSS_TABLE_CAPTION'); ?>,
<span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>,
<span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span>
</caption>
<thead>
<tr>
<th width="1%" class="nowrap center">
<td class="w-1 text-center">
<?php echo HTMLHelper::_('grid.checkall'); ?>
</th>
<th class="nowrap">
</td>
<th scope="col" class="w-50">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_CCM_CMS_NAME', 'a.name', $listDirn, $listOrder); ?>
</th>
<th width="10%" class="nowrap center">
<th scope="col" class="w-5 text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
Expand All @@ -57,11 +62,11 @@
<td class="center">
<?php echo HTMLHelper::_('grid.id', $i, $item->id); ?>
</td>
<td class="nowrap has-context">
<th scope="row" class="has-context">
<a href="<?php echo Route::_('index.php?option=com_ccm&task=cms.edit&id=' . (int) $item->id); ?>">
<?php echo $this->escape($item->name); ?>
</a>
</td>
</th>
<td class="center">
<?php echo (int) $item->id; ?>
</td>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
namespace Joomla\Tests\Unit\Component\CCM\Administrator\Model;

use Joomla\Tests\Unit\UnitTestCase;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
use Joomla\Component\CCM\Administrator\Model\CmsModel;
use Joomla\Tests\Unit\UnitTestCase;

class CmsModelTest extends UnitTestCase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php
namespace Joomla\Tests\Unit\Component\CCM\Administrator\Model;

use Joomla\Tests\Unit\UnitTestCase;
use Joomla\Component\CCM\Administrator\Model\CmssModel;
use Joomla\CMS\Table\Table;
use Joomla\Component\CCM\Administrator\Model\CmssModel;
use Joomla\Database\DatabaseDriver;
use Joomla\Database\QueryInterface;
use Joomla\Registry\Registry;
use Joomla\Tests\Unit\UnitTestCase;

class CmssModelTest extends UnitTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

namespace Joomla\Tests\Unit\Component\CCM\Administrator\Model;

use Joomla\Tests\Unit\UnitTestCase;
use Joomla\CMS\Http\Http;

use Joomla\Component\CCM\Administrator\Model\MigrationModel;
use Joomla\Component\CCM\Administrator\Helper\MigrationHelper;
use Joomla\Tests\Unit\UnitTestCase;

class MigrationModelTest extends UnitTestCase
{
Expand Down