Skip to content

Commit

Permalink
Merge branch '4.0-dev' into j4/fix/tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonge committed Dec 14, 2018
2 parents 37bbdb5 + c32bb41 commit 4690f6c
Show file tree
Hide file tree
Showing 136 changed files with 5,374 additions and 3,694 deletions.
15 changes: 0 additions & 15 deletions .babelrc

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ CREATE TABLE IF NOT EXISTS `#__workflows` (
`description` text NOT NULL,
`extension` varchar(50) NOT NULL,
`default` tinyint(1) NOT NULL DEFAULT 0,
`core` tinyint(1) NOT NULL DEFAULT 0,
`ordering` int(11) NOT NULL DEFAULT 0,
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`created_by` int(10) NOT NULL DEFAULT 0,
Expand All @@ -30,8 +31,8 @@ CREATE TABLE IF NOT EXISTS `#__workflows` (
-- Dumping data for table `#__workflows`
--

INSERT INTO `#__workflows` (`id`, `asset_id`, `published`, `title`, `description`, `extension`, `default`, `ordering`, `created`, `created_by`, `modified`, `modified_by`) VALUES
(1, 0, 1, 'COM_WORKFLOW_DEFAULT_WORKFLOW', '', 'com_content', 1, 1, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0);
INSERT INTO `#__workflows` (`id`, `asset_id`, `published`, `title`, `description`, `extension`, `default`, `core`, `ordering`, `created`, `created_by`, `modified`, `modified_by`) VALUES
(1, 0, 1, 'COM_WORKFLOW_DEFAULT_WORKFLOW', '', 'com_content', 1, 1, 1, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0);

--
-- Table structure for table `#__workflow_associations`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ CREATE TABLE IF NOT EXISTS "#__workflows" (
"description" text NOT NULL,
"extension" varchar(50) NOT NULL,
"default" smallint NOT NULL DEFAULT 0,
"core" smallint NOT NULL DEFAULT 0,
"ordering" bigint NOT NULL DEFAULT 0,
"created" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL,
"created_by" bigint DEFAULT 0 NOT NULL,
Expand All @@ -27,8 +28,8 @@ CREATE INDEX "#__workflows_idx_created_by" ON "#__workflows" ("created_by");
CREATE INDEX "#__workflows_idx_modified" ON "#__workflows" ("modified");
CREATE INDEX "#__workflows_idx_modified_by" ON "#__workflows" ("modified_by");

INSERT INTO "#__workflows" ("id", "asset_id", "published", "title", "description", "extension", "default", "ordering", "created", "created_by", "modified", "modified_by") VALUES
(1, 0, 1, 'COM_WORKFLOW_DEFAULT_WORKFLOW', '', 'com_content', 1, 1, '1970-01-01 00:00:00', 0, '1970-01-01 00:00:00', 0);
INSERT INTO "#__workflows" ("id", "asset_id", "published", "title", "description", "extension", "default", "core", "ordering", "created", "created_by", "modified", "modified_by") VALUES
(1, 0, 1, 'COM_WORKFLOW_DEFAULT_WORKFLOW', '', 'com_content', 1, 1, 1, '1970-01-01 00:00:00', 0, '1970-01-01 00:00:00', 0);

--
-- Table structure for table "#__workflow_associations"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<table class="table">
<thead>
<tr>
<th scope="col" style="width:650px">
<th scope="col" style="width:850px">
<?php echo Text::_('COM_ADMIN_DIRECTORY'); ?>
</th>
<th scope="col">
Expand All @@ -35,7 +35,7 @@
<?php foreach ($this->directory as $dir => $info) : ?>
<tr>
<th scope="row">
<?php echo HTMLHelper::_('directory.message', $dir, $info['message']); ?>
<?php echo '&#x200E;' . HTMLHelper::_('directory.message', $dir, $info['message']); ?>
</th>
<td>
<?php echo HTMLHelper::_('directory.writable', $info['writable']); ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Session\Session;
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_cache/tmpl/cache/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<?php echo $item->count; ?>
</td>
<td class="text-right">
<?php echo HTMLHelper::_('number.bytes', $item->size); ?>
<?php echo '&#x200E;' . HTMLHelper::_('number.bytes', $item->size); ?>
</td>
</tr>
<?php $i++; endforeach; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

defined('JPATH_BASE') or die;

use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Field\ListField;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\Utilities\ArrayHelper;

/**
* Category Edit field..
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,20 @@ protected function getTableNameForSection(string $section = null)
return '#__content';
}

/**
* Returns a table name for the state association
*
* @param string $section An optional section to separate different areas in the component
*
* @return string
*
* @since __DEPLOY_VERSION__
*/
public function getWorkflowTableBySection(string $section = null) : string
{
return '#__content';
}

/**
* Method to filter transitions by given id of state.
*
Expand Down
123 changes: 123 additions & 0 deletions administrator/components/com_cpanel/Entities/SystemHeader.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_cpanel
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

namespace Joomla\Component\Cpanel\Administrator\Entities;

defined('_JEXEC') or die;

/**
* Class representing a section in the system view.
*
* @since __DEPLOY_VERSION__
*/
class SystemHeader
{
/**
* The class for an icon to display for the header
*
* @var string
*
* @since __DEPLOY_VERSION__
*/
private $icon;

/**
* The title of the header
*
* @var string
*
* @since __DEPLOY_VERSION__
*/
private $title;

/**
* The list of items in this section
*
* @var SystemItem[]
*
* @since __DEPLOY_VERSION__
*/
private $items = [];

/**
* SystemHeader constructor.
*
* @param string $title The title of the header
* @param string $icon The class for an icon to display for the header
*
* @since __DEPLOY_VERSION__
*/
public function __construct($title, $icon)
{
$this->title = $title;
$this->icon = $icon;
}

/**
* Method to add an item to the section
*
* @param SystemItem $item The item to add to this section
*
* @return void
*
* @since __DEPLOY_VERSION__
*/
public function addItem(SystemItem $item)
{
$this->items[] = $item;
}

/**
* Get the icon associated with the section
*
* @return string
*
* @since __DEPLOY_VERSION__
*/
public function getIcon()
{
return $this->icon;
}

/**
* Get the title associated with the section
*
* @return string
*
* @since __DEPLOY_VERSION__
*/
public function getTitle()
{
return $this->title;
}

/**
* Get the items added into the section
*
* @return SystemItem[]
*
* @since __DEPLOY_VERSION__
*/
public function getItems()
{
return $this->items;
}

/**
* Does the section contain any items
*
* @return boolean
*
* @since __DEPLOY_VERSION__
*/
public function hasItems()
{
return count($this->items) !== 0;
}
}
97 changes: 97 additions & 0 deletions administrator/components/com_cpanel/Entities/SystemItem.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_cpanel
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

namespace Joomla\Component\Cpanel\Administrator\Entities;

defined('_JEXEC') or die;

/**
* Class representing a item in the system view.
*
* @since __DEPLOY_VERSION__
*/
class SystemItem
{
/**
* The title of the item
*
* @var string
*/
private $title;

/**
* The link of the item
*
* @var string
*/
private $link;

/**
* An optional badge of the item
*
* @var string|null
*/
private $badge;

/**
* Class constructor.
*
* @param string $title The title of the item
* @param string $link The link for the item
* @param string $badge The optional badge for the item
*
* @since __DEPLOY_VERSION__
*/
public function __construct($title, $link, $badge = '')
{
$this->title = $title;
$this->link = $link;

if (!empty($badge))
{
$this->badge = $badge;
}
}

/**
* The item title
*
* @return string
*
* @since __DEPLOY_VERSION__
*/
public function getTitle()
{
return $this->title;
}

/**
* The item link
*
* @return string
*
* @since __DEPLOY_VERSION__
*/
public function getLink()
{
return $this->link;
}

/**
* The string to display in the notification badge if there is one. Else null.
*
* @return string|null
*
* @since __DEPLOY_VERSION__
*/
public function getBadge()
{
return $this->badge;
}
}

0 comments on commit 4690f6c

Please sign in to comment.