Release of v2.0.1

This commit is contained in:
Robot 2023-08-11 14:03:38 +02:00
parent 4c6cc04574
commit 6e5734b055
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
7 changed files with 444 additions and 219 deletions

View File

@ -1,4 +1,4 @@
# Version Calendar in SVG (1.0.2) # Version Calendar in SVG (2.0.1)
> The original source code was taken from the [PHP supported versions](https://github.com/php/web-php/blob/master/images/supported-versions.php). > The original source code was taken from the [PHP supported versions](https://github.com/php/web-php/blob/master/images/supported-versions.php).
@ -8,6 +8,6 @@
+ *Author*: [Joomla! Project](mailto:admin@joomla.org) + *Author*: [Joomla! Project](mailto:admin@joomla.org)
+ *Name*: [Version Calendar svg](http://www.joomla.org) + *Name*: [Version Calendar svg](http://www.joomla.org)
+ *First Build*: 3rd September, 2022 + *First Build*: 3rd September, 2022
+ *Version*: 1.0.2 + *Version*: 2.0.1
+ *Copyright*: (C) 2022 Open Source Matters, Inc. + *Copyright*: (C) 2022 Open Source Matters, Inc.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt

View File

@ -39,6 +39,14 @@ class ModVersion_Calendar_svgHelper
*/ */
protected $branches; protected $branches;
/**
* The Legend
*
* @var array
* @since 1.0
*/
protected $legend;
/** /**
* The Width * The Width
* *
@ -132,72 +140,102 @@ class ModVersion_Calendar_svgHelper
/** /**
* Get Branches * Get Branches
* *
* Fetches and processes the branches or versions from the parameters.
* It sanitizes the branch data, calculates their positions, sorts them, and then returns.
* If no valid branches or versions are found, it throws an exception.
*
* @return array * @return array
* @since 1.0.0 *
* @since 2.0.1
* @throws Exception If no valid branches or versions are found.
*/ */
public function branches(): array public function branches(): array
{ {
if (empty($this->branches)) if (empty($this->branches))
{ {
$branches = (array) $this->params->get('dates', null); $branches = (array) $this->params->get('versions');
if (is_array($branches) && count($branches) > 0) if (empty($branches))
{ {
$branch_height = $this->params->get('branch_height', 30); throw new Exception("No versions found.");
$header_height = $this->params->get('header_height', 24);
$i = 0;
foreach ($branches as $k => &$branch)
{
$branch->top = $header_height + ($branch_height * $i++);
} }
$this->sanitize($branches);
if (empty($branches))
{
throw new Exception("No versions found.");
}
$this->setTop($branches);
$this->sort($branches);
$this->branches = $branches; $this->branches = $branches;
} }
else
{
// we should add exception here
}
}
return $this->branches; return $this->branches;
} }
/**
* Get Legend values (by color)
*
* @return array
* @since 2.0.1
*/
public function legend(): array
{
if (empty($this->legend))
{
$branches = $this->branches();
foreach ($branches as $version)
{
foreach ($version->dates as $date)
{
$this->legend[$date->color] = $date;
}
}
}
return $this->legend;
}
/** /**
* Current state of a branch * Current state of a branch
* *
* @param stdClass $branch The branch values * @param array $dates The branch dates
* *
* @return string|null * @return string|null
* @since 1.0.0 * @since 2.0.1
*/ */
public function state(stdClass $branch): ?string public function state(array $dates): ?string
{ {
$initial = new DateTime($branch->start); // Determine the current state.
$security = new DateTime($branch->security); $now = new DateTime();
$end = new DateTime($branch->end);
if ($initial && $security) // Check if today's date is before the earliest start date.
$earliestDate = DateTime::createFromFormat('d-m-Y', $dates[0]->start);
if ($now < $earliestDate)
{ {
$now = new DateTime; return 'vcs-future';
if ($now >= $end)
{
return 'eol';
} }
if ($security && $now >= $security) // Check if today's date is after the latest end date.
$latestDate = DateTime::createFromFormat('d-m-Y', end($dates)->end);
if ($now > $latestDate)
{ {
return 'security'; return 'vcs-eol';
} }
if ($now >= $initial) // Determine which state the current date falls under.
foreach ($dates as $date)
{ {
return 'stable'; $initial = DateTime::createFromFormat('d-m-Y', $date->start);
} $end = DateTime::createFromFormat('d-m-Y', $date->end);
return 'future'; if ($now >= $initial && $now <= $end)
{
return $date->state;
}
} }
return null; return null;
@ -252,4 +290,119 @@ class ModVersion_Calendar_svgHelper
); );
} }
/**
* Sort Branches state's by date
*
* @param array $branches The branches
*
* @return void
* @since 2.0.1
*/
protected function sort(array &$branches): void
{
foreach ($branches as $key => &$branch)
{
usort($branch->dates, function($a, $b) {
$startDateA = DateTime::createFromFormat('d-m-Y', $a->start);
$startDateB = DateTime::createFromFormat('d-m-Y', $b->start);
if ($startDateA == $startDateB)
{
$endDateA = DateTime::createFromFormat('d-m-Y', $a->end);
$endDateB = DateTime::createFromFormat('d-m-Y', $b->end);
return $endDateA <=> $endDateB;
}
return $startDateA <=> $startDateB;
});
}
}
/**
* Set Top
*
* Calculates the top position for each branch based on parameters for branch height and header height.
*
* @param array $branches Reference to the branches array.
*
* @return void
* @since 2.0.1
*/
protected function setTop(array &$branches): void
{
$branch_height = $this->params->get('branch_height', 30);
$header_height = $this->params->get('header_height', 24);
$i = 0;
foreach ($branches as $key => &$branch)
{
$branch->top = $header_height + ($branch_height * $i++);
}
}
/**
* Sanitize
*
* Sanitizes the branches by checking the existence and type of 'dates' and 'date->state'.
* Also modifies the state of each date entry within a branch.
*
* @param array $branches Reference to the branches array.
*
* @return void
* @since 2.0.1
*/
protected function sanitize(array &$branches): void
{
foreach ($branches as $key => &$branch)
{
if (empty($branch->dates) || !is_object($branch->dates))
{
unset($branches[$key]);
continue;
}
$branch->dates = (array) $branch->dates;
$remove = false;
foreach ($branch->dates as $k => &$date)
{
if (empty($date->state))
{
$remove = true;
continue;
}
$date->state = $this->makeSafe($key . '-' . $date->state);
}
if ($remove)
{
unset($branches[$key]);
}
}
}
/**
* Get css safe class name
*
* @param string $name The string to make safe
*
* @return string
* @since 2.0.1
*/
protected function makeSafe(string $name): string
{
// Ensure it doesn't start with a digit
if (preg_match('/^[0-9]/', $name))
{
$name = 'vcs-' . $name;
}
// Replace any non-alphanumeric characters with hyphens
$name = preg_replace('/[^a-zA-Z0-9]+/', '-', $name);
// Convert to lowercase
$name = strtolower($name);
return $name;
}
} }

View File

@ -1,33 +1,29 @@
MOD_VERSION_CALENDAR_SVG="Version Calendar Svg" MOD_VERSION_CALENDAR_SVG="Version Calendar Svg"
MOD_VERSION_CALENDAR_SVG_DESCRIPTION="Version Calendar in SVG" MOD_VERSION_CALENDAR_SVG_DESCRIPTION="Version Calendar in SVG"
MOD_VERSION_CALENDAR_SVG_XML_DESCRIPTION="<h1>Version Calendar Svg (v.1.0.2)</h1> <div style='clear: both;'></div><p>Version Calendar in SVG</p><p>Created by <a href='http://www.joomla.org' target='_blank'>Joomla! Project</a><br /><small>Development started 3rd September, 2022</small></p>" MOD_VERSION_CALENDAR_SVG_XML_DESCRIPTION="<h1>Version Calendar Svg (v.2.0.1)</h1> <div style='clear: both;'></div><p>Version Calendar in SVG</p><p>Created by <a href='http://www.joomla.org' target='_blank'>Joomla! Project</a><br /><small>Development started 3rd September, 2022</small></p>"
MOD_VERSION_CALENDAR_SVG_TODAY="Today"
MOD_VERSION_CALENDAR_SVG_PLANNED_RELEASE_SCHEDULE="Planned release schedule" MOD_VERSION_CALENDAR_SVG_PLANNED_RELEASE_SCHEDULE="Planned release schedule"
MOD_VERSION_CALENDAR_SVG_FUTURE_RELEASES="Future Releases" MOD_VERSION_CALENDAR_SVG_FUTURE_RELEASES="Future Releases"
MOD_VERSION_CALENDAR_SVG_STABLE_RELEASE_SCHEDULE_EXPECT_FULL_SUPPORT_AND_UPDATES="Stable release schedule - expect full support and updates"
MOD_VERSION_CALENDAR_SVG_STABLE_RELEASE="Stable Release"
MOD_VERSION_CALENDAR_SVG_SECURITY_SCHEDULE_EXPECT_ONLY_SECURITY_UPDATES="Security schedule - expect only security updates"
MOD_VERSION_CALENDAR_SVG_SECURITY_RELEASE="Security Release"
MOD_VERSION_CALENDAR_SVG_VERSION_END_OF_LIFE_SCHEDULE_EXPECT_NO_MORE_SUPPORT="Version End of Life schedule - expect no more support" MOD_VERSION_CALENDAR_SVG_VERSION_END_OF_LIFE_SCHEDULE_EXPECT_NO_MORE_SUPPORT="Version End of Life schedule - expect no more support"
MOD_VERSION_CALENDAR_SVG_VERSION_AT_END_OF_LIFE="Version at End of Life" MOD_VERSION_CALENDAR_SVG_VERSION_AT_END_OF_LIFE="Version at End of Life"
MOD_VERSION_CALENDAR_SVG_DIMENTIONS="Dimentions" MOD_VERSION_CALENDAR_SVG_DIMENTIONS="Dimentions"
MOD_VERSION_CALENDAR_SVG_STYLES="Styles" MOD_VERSION_CALENDAR_SVG_STYLES="Styles"
MOD_VERSION_CALENDAR_SVG_DATES="Dates" MOD_VERSION_CALENDAR_SVG_VERSIONS="Versions"
MOD_VERSION_CALENDAR_SVG_HEADER_HEIGHT_LABEL="Header Height" MOD_VERSION_CALENDAR_SVG_HEADER_HEIGHT_LABEL="Header Height"
MOD_VERSION_CALENDAR_SVG_BRANCH_HEIGHT_LABEL="Branch Height" MOD_VERSION_CALENDAR_SVG_BRANCH_HEIGHT_LABEL="Branch Height"
MOD_VERSION_CALENDAR_SVG_MARGIN_RIGHT_LABEL="Margin Right" MOD_VERSION_CALENDAR_SVG_MARGIN_RIGHT_LABEL="Margin Right"
MOD_VERSION_CALENDAR_SVG_MARGIN_LEFT_LABEL="Margin Left" MOD_VERSION_CALENDAR_SVG_MARGIN_LEFT_LABEL="Margin Left"
MOD_VERSION_CALENDAR_SVG_YEAR_WIDTH_LABEL="Year Width" MOD_VERSION_CALENDAR_SVG_YEAR_WIDTH_LABEL="Year Width"
MOD_VERSION_CALENDAR_SVG_FOOTER_HEIGHT_LABEL="Footer Height" MOD_VERSION_CALENDAR_SVG_FOOTER_HEIGHT_LABEL="Footer Height"
MOD_VERSION_CALENDAR_SVG_TEXT_COLOR_LABEL="Default Text Color" MOD_VERSION_CALENDAR_SVG_TEXT_COLOR_LABEL="Default Text Colour"
MOD_VERSION_CALENDAR_SVG_FUTURE_COLOR_LABEL="Future Background Color" MOD_VERSION_CALENDAR_SVG_FUTURE_TEXT_COLOR_LABEL="Future Text Colour"
MOD_VERSION_CALENDAR_SVG_STABLE_COLOR_LABEL="Stable Background Color" MOD_VERSION_CALENDAR_SVG_FUTURE_COLOR_LABEL="Future Background Colour"
MOD_VERSION_CALENDAR_SVG_SECURITY_COLOR_LABEL="Security Background Color" MOD_VERSION_CALENDAR_SVG_END_OF_LIFE_TEXT_COLOR_LABEL="End of Life Text Colour"
MOD_VERSION_CALENDAR_SVG_END_OF_LIFE_COLOR_LABEL="End of Life Background Color" MOD_VERSION_CALENDAR_SVG_END_OF_LIFE_COLOR_LABEL="End of Life Background Colour"
MOD_VERSION_CALENDAR_SVG_END_OF_LIFE_TEXT_COLOR_LABEL="End of Life Text Color" MOD_VERSION_CALENDAR_SVG_YEARS_LINE_COLOR_LABEL="Years Line Colour"
MOD_VERSION_CALENDAR_SVG_YEARS_LINE_COLOR_LABEL="Years Line Color" MOD_VERSION_CALENDAR_SVG_YEARS_TEXT_COLOR_LABEL="Years Text Colour"
MOD_VERSION_CALENDAR_SVG_YEARS_TEXT_COLOR_LABEL="Years Text Color" MOD_VERSION_CALENDAR_SVG_TODAY_LINE_COLOR_LABEL="Today Line Colour"
MOD_VERSION_CALENDAR_SVG_TODAY_LINE_COLOR_LABEL="Today Line Color" MOD_VERSION_CALENDAR_SVG_TODAY_TEXT_COLOR_LABEL="Today Text Colour"
MOD_VERSION_CALENDAR_SVG_TODAY_TEXT_COLOR_LABEL="Today Text Color"
MOD_VERSION_CALENDAR_SVG_SHOW_LEGEND_LABEL="Show Legend" MOD_VERSION_CALENDAR_SVG_SHOW_LEGEND_LABEL="Show Legend"
MOD_VERSION_CALENDAR_SVG_SHOW_LEGEND_DESCRIPTION="Allow the legend to be shown below the calendar." MOD_VERSION_CALENDAR_SVG_SHOW_LEGEND_DESCRIPTION="Allow the legend to be shown below the calendar."
MOD_VERSION_CALENDAR_SVG_YES="Yes" MOD_VERSION_CALENDAR_SVG_YES="Yes"
@ -36,14 +32,21 @@ MOD_VERSION_CALENDAR_SVG_LEGEND_BACKGROUND_COLOR_LABEL="Legend Background Colour
MOD_VERSION_CALENDAR_SVG_LEGEND_TEXT_COLOR_LABEL="Legend Text Colour" MOD_VERSION_CALENDAR_SVG_LEGEND_TEXT_COLOR_LABEL="Legend Text Colour"
MOD_VERSION_CALENDAR_SVG_MAX_YEARS_LABEL="Max Years" MOD_VERSION_CALENDAR_SVG_MAX_YEARS_LABEL="Max Years"
MOD_VERSION_CALENDAR_SVG_MIN_YEARS_LABEL="Min Years" MOD_VERSION_CALENDAR_SVG_MIN_YEARS_LABEL="Min Years"
MOD_VERSION_CALENDAR_SVG_DATES_LABEL="Dates" MOD_VERSION_CALENDAR_SVG_VERSIONS_LABEL="Versions"
MOD_VERSION_CALENDAR_SVG_VERSION_LABEL="Version" MOD_VERSION_CALENDAR_SVG_VERSION_LABEL="Version"
MOD_VERSION_CALENDAR_SVG_VERSION_DESCRIPTION="Name" MOD_VERSION_CALENDAR_SVG_VERSION_DESCRIPTION="Name"
MOD_VERSION_CALENDAR_SVG_VERSION_MESSAGE="Error! Please add version here." MOD_VERSION_CALENDAR_SVG_VERSION_MESSAGE="Error! Please add version here."
MOD_VERSION_CALENDAR_SVG_VERSION_HINT="1.0.0" MOD_VERSION_CALENDAR_SVG_VERSION_HINT="1.0.0"
MOD_VERSION_CALENDAR_SVG_DATES_LABEL="Dates"
MOD_VERSION_CALENDAR_SVG_STATE_LABEL="State"
MOD_VERSION_CALENDAR_SVG_STATE_HINT="stable"
MOD_VERSION_CALENDAR_SVG_LABEL_LABEL="Label"
MOD_VERSION_CALENDAR_SVG_LABEL_HINT="State label"
MOD_VERSION_CALENDAR_SVG_DESCRIPTION_LABEL="Description"
MOD_VERSION_CALENDAR_SVG_DESCRIPTION_HINT="Describe the state"
MOD_VERSION_CALENDAR_SVG_COLOR_LABEL="Background"
MOD_VERSION_CALENDAR_SVG_COLOR_DESCRIPTION="Color"
MOD_VERSION_CALENDAR_SVG_START_LABEL="Start Date" MOD_VERSION_CALENDAR_SVG_START_LABEL="Start Date"
MOD_VERSION_CALENDAR_SVG_START_MESSAGE="Error! Please add date here." MOD_VERSION_CALENDAR_SVG_START_MESSAGE="Error! Please add date here."
MOD_VERSION_CALENDAR_SVG_SECURITY_LABEL="Security Support Date"
MOD_VERSION_CALENDAR_SVG_SECURITY_MESSAGE="Error! Please add date here."
MOD_VERSION_CALENDAR_SVG_END_LABEL="End Date" MOD_VERSION_CALENDAR_SVG_END_LABEL="End Date"
MOD_VERSION_CALENDAR_SVG_END_MESSAGE="Error! Please add date here." MOD_VERSION_CALENDAR_SVG_END_MESSAGE="Error! Please add date here."

View File

@ -1,33 +1,29 @@
MOD_VERSION_CALENDAR_SVG="Version Calendar Svg" MOD_VERSION_CALENDAR_SVG="Version Calendar Svg"
MOD_VERSION_CALENDAR_SVG_DESCRIPTION="Version Calendar in SVG" MOD_VERSION_CALENDAR_SVG_DESCRIPTION="Version Calendar in SVG"
MOD_VERSION_CALENDAR_SVG_XML_DESCRIPTION="<h1>Version Calendar Svg (v.1.0.2)</h1> <div style='clear: both;'></div><p>Version Calendar in SVG</p><p>Created by <a href='http://www.joomla.org' target='_blank'>Joomla! Project</a><br /><small>Development started 3rd September, 2022</small></p>" MOD_VERSION_CALENDAR_SVG_XML_DESCRIPTION="<h1>Version Calendar Svg (v.2.0.1)</h1> <div style='clear: both;'></div><p>Version Calendar in SVG</p><p>Created by <a href='http://www.joomla.org' target='_blank'>Joomla! Project</a><br /><small>Development started 3rd September, 2022</small></p>"
MOD_VERSION_CALENDAR_SVG_TODAY="Today"
MOD_VERSION_CALENDAR_SVG_PLANNED_RELEASE_SCHEDULE="Planned release schedule" MOD_VERSION_CALENDAR_SVG_PLANNED_RELEASE_SCHEDULE="Planned release schedule"
MOD_VERSION_CALENDAR_SVG_FUTURE_RELEASES="Future Releases" MOD_VERSION_CALENDAR_SVG_FUTURE_RELEASES="Future Releases"
MOD_VERSION_CALENDAR_SVG_STABLE_RELEASE_SCHEDULE_EXPECT_FULL_SUPPORT_AND_UPDATES="Stable release schedule - expect full support and updates"
MOD_VERSION_CALENDAR_SVG_STABLE_RELEASE="Stable Release"
MOD_VERSION_CALENDAR_SVG_SECURITY_SCHEDULE_EXPECT_ONLY_SECURITY_UPDATES="Security schedule - expect only security updates"
MOD_VERSION_CALENDAR_SVG_SECURITY_RELEASE="Security Release"
MOD_VERSION_CALENDAR_SVG_VERSION_END_OF_LIFE_SCHEDULE_EXPECT_NO_MORE_SUPPORT="Version End of Life schedule - expect no more support" MOD_VERSION_CALENDAR_SVG_VERSION_END_OF_LIFE_SCHEDULE_EXPECT_NO_MORE_SUPPORT="Version End of Life schedule - expect no more support"
MOD_VERSION_CALENDAR_SVG_VERSION_AT_END_OF_LIFE="Version at End of Life" MOD_VERSION_CALENDAR_SVG_VERSION_AT_END_OF_LIFE="Version at End of Life"
MOD_VERSION_CALENDAR_SVG_DIMENTIONS="Dimentions" MOD_VERSION_CALENDAR_SVG_DIMENTIONS="Dimentions"
MOD_VERSION_CALENDAR_SVG_STYLES="Styles" MOD_VERSION_CALENDAR_SVG_STYLES="Styles"
MOD_VERSION_CALENDAR_SVG_DATES="Dates" MOD_VERSION_CALENDAR_SVG_VERSIONS="Versions"
MOD_VERSION_CALENDAR_SVG_HEADER_HEIGHT_LABEL="Header Height" MOD_VERSION_CALENDAR_SVG_HEADER_HEIGHT_LABEL="Header Height"
MOD_VERSION_CALENDAR_SVG_BRANCH_HEIGHT_LABEL="Branch Height" MOD_VERSION_CALENDAR_SVG_BRANCH_HEIGHT_LABEL="Branch Height"
MOD_VERSION_CALENDAR_SVG_MARGIN_RIGHT_LABEL="Margin Right" MOD_VERSION_CALENDAR_SVG_MARGIN_RIGHT_LABEL="Margin Right"
MOD_VERSION_CALENDAR_SVG_MARGIN_LEFT_LABEL="Margin Left" MOD_VERSION_CALENDAR_SVG_MARGIN_LEFT_LABEL="Margin Left"
MOD_VERSION_CALENDAR_SVG_YEAR_WIDTH_LABEL="Year Width" MOD_VERSION_CALENDAR_SVG_YEAR_WIDTH_LABEL="Year Width"
MOD_VERSION_CALENDAR_SVG_FOOTER_HEIGHT_LABEL="Footer Height" MOD_VERSION_CALENDAR_SVG_FOOTER_HEIGHT_LABEL="Footer Height"
MOD_VERSION_CALENDAR_SVG_TEXT_COLOR_LABEL="Default Text Color" MOD_VERSION_CALENDAR_SVG_TEXT_COLOR_LABEL="Default Text Colour"
MOD_VERSION_CALENDAR_SVG_FUTURE_COLOR_LABEL="Future Background Color" MOD_VERSION_CALENDAR_SVG_FUTURE_TEXT_COLOR_LABEL="Future Text Colour"
MOD_VERSION_CALENDAR_SVG_STABLE_COLOR_LABEL="Stable Background Color" MOD_VERSION_CALENDAR_SVG_FUTURE_COLOR_LABEL="Future Background Colour"
MOD_VERSION_CALENDAR_SVG_SECURITY_COLOR_LABEL="Security Background Color" MOD_VERSION_CALENDAR_SVG_END_OF_LIFE_TEXT_COLOR_LABEL="End of Life Text Colour"
MOD_VERSION_CALENDAR_SVG_END_OF_LIFE_COLOR_LABEL="End of Life Background Color" MOD_VERSION_CALENDAR_SVG_END_OF_LIFE_COLOR_LABEL="End of Life Background Colour"
MOD_VERSION_CALENDAR_SVG_END_OF_LIFE_TEXT_COLOR_LABEL="End of Life Text Color" MOD_VERSION_CALENDAR_SVG_YEARS_LINE_COLOR_LABEL="Years Line Colour"
MOD_VERSION_CALENDAR_SVG_YEARS_LINE_COLOR_LABEL="Years Line Color" MOD_VERSION_CALENDAR_SVG_YEARS_TEXT_COLOR_LABEL="Years Text Colour"
MOD_VERSION_CALENDAR_SVG_YEARS_TEXT_COLOR_LABEL="Years Text Color" MOD_VERSION_CALENDAR_SVG_TODAY_LINE_COLOR_LABEL="Today Line Colour"
MOD_VERSION_CALENDAR_SVG_TODAY_LINE_COLOR_LABEL="Today Line Color" MOD_VERSION_CALENDAR_SVG_TODAY_TEXT_COLOR_LABEL="Today Text Colour"
MOD_VERSION_CALENDAR_SVG_TODAY_TEXT_COLOR_LABEL="Today Text Color"
MOD_VERSION_CALENDAR_SVG_SHOW_LEGEND_LABEL="Show Legend" MOD_VERSION_CALENDAR_SVG_SHOW_LEGEND_LABEL="Show Legend"
MOD_VERSION_CALENDAR_SVG_SHOW_LEGEND_DESCRIPTION="Allow the legend to be shown below the calendar." MOD_VERSION_CALENDAR_SVG_SHOW_LEGEND_DESCRIPTION="Allow the legend to be shown below the calendar."
MOD_VERSION_CALENDAR_SVG_YES="Yes" MOD_VERSION_CALENDAR_SVG_YES="Yes"
@ -36,14 +32,21 @@ MOD_VERSION_CALENDAR_SVG_LEGEND_BACKGROUND_COLOR_LABEL="Legend Background Colour
MOD_VERSION_CALENDAR_SVG_LEGEND_TEXT_COLOR_LABEL="Legend Text Colour" MOD_VERSION_CALENDAR_SVG_LEGEND_TEXT_COLOR_LABEL="Legend Text Colour"
MOD_VERSION_CALENDAR_SVG_MAX_YEARS_LABEL="Max Years" MOD_VERSION_CALENDAR_SVG_MAX_YEARS_LABEL="Max Years"
MOD_VERSION_CALENDAR_SVG_MIN_YEARS_LABEL="Min Years" MOD_VERSION_CALENDAR_SVG_MIN_YEARS_LABEL="Min Years"
MOD_VERSION_CALENDAR_SVG_DATES_LABEL="Dates" MOD_VERSION_CALENDAR_SVG_VERSIONS_LABEL="Versions"
MOD_VERSION_CALENDAR_SVG_VERSION_LABEL="Version" MOD_VERSION_CALENDAR_SVG_VERSION_LABEL="Version"
MOD_VERSION_CALENDAR_SVG_VERSION_DESCRIPTION="Name" MOD_VERSION_CALENDAR_SVG_VERSION_DESCRIPTION="Name"
MOD_VERSION_CALENDAR_SVG_VERSION_MESSAGE="Error! Please add version here." MOD_VERSION_CALENDAR_SVG_VERSION_MESSAGE="Error! Please add version here."
MOD_VERSION_CALENDAR_SVG_VERSION_HINT="1.0.0" MOD_VERSION_CALENDAR_SVG_VERSION_HINT="1.0.0"
MOD_VERSION_CALENDAR_SVG_DATES_LABEL="Dates"
MOD_VERSION_CALENDAR_SVG_STATE_LABEL="State"
MOD_VERSION_CALENDAR_SVG_STATE_HINT="stable"
MOD_VERSION_CALENDAR_SVG_LABEL_LABEL="Label"
MOD_VERSION_CALENDAR_SVG_LABEL_HINT="State label"
MOD_VERSION_CALENDAR_SVG_DESCRIPTION_LABEL="Description"
MOD_VERSION_CALENDAR_SVG_DESCRIPTION_HINT="Describe the state"
MOD_VERSION_CALENDAR_SVG_COLOR_LABEL="Background"
MOD_VERSION_CALENDAR_SVG_COLOR_DESCRIPTION="Color"
MOD_VERSION_CALENDAR_SVG_START_LABEL="Start Date" MOD_VERSION_CALENDAR_SVG_START_LABEL="Start Date"
MOD_VERSION_CALENDAR_SVG_START_MESSAGE="Error! Please add date here." MOD_VERSION_CALENDAR_SVG_START_MESSAGE="Error! Please add date here."
MOD_VERSION_CALENDAR_SVG_SECURITY_LABEL="Security Support Date"
MOD_VERSION_CALENDAR_SVG_SECURITY_MESSAGE="Error! Please add date here."
MOD_VERSION_CALENDAR_SVG_END_LABEL="End Date" MOD_VERSION_CALENDAR_SVG_END_LABEL="End Date"
MOD_VERSION_CALENDAR_SVG_END_MESSAGE="Error! Please add date here." MOD_VERSION_CALENDAR_SVG_END_MESSAGE="Error! Please add date here."

View File

@ -14,17 +14,25 @@ defined('_JEXEC') or die('Restricted access');
// Include the helper functions only once // Include the helper functions only once
JLoader::register('ModVersion_Calendar_svgHelper', __DIR__ . '/helper.php'); JLoader::register('ModVersion_Calendar_svgHelper', __DIR__ . '/helper.php');
// Get the Helper class try
$helper = new ModVersion_Calendar_svgHelper($params); {
// Get the Helper class
$helper = new ModVersion_Calendar_svgHelper($params);
// set the branches // set the branches
$branches = $helper->branches(); $branches = $helper->branches();
// set branch qty // set branch qty
$qty = count($branches); $qty = count($branches);
// get the module class sfx (local) // get the module class sfx (local)
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8'); $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8');
// load the default Tmpl // load the default Tmpl
require JModuleHelper::getLayoutPath('mod_version_calendar_svg', $params->get('layout', 'default')); require JModuleHelper::getLayoutPath('mod_version_calendar_svg', $params->get('layout', 'default'));
}
catch (Exception $e)
{
// Output a warning message along with the exception message
echo "Warning: " . $e->getMessage();
}

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<extension type="module" version="4" client="site" method="upgrade"> <extension type="module" version="4" client="site" method="upgrade">
<name>MOD_VERSION_CALENDAR_SVG</name> <name>MOD_VERSION_CALENDAR_SVG</name>
<creationDate>10th August, 2023</creationDate> <creationDate>11th August, 2023</creationDate>
<author>Joomla! Project</author> <author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail> <authorEmail>admin@joomla.org</authorEmail>
<authorUrl>http://www.joomla.org</authorUrl> <authorUrl>http://www.joomla.org</authorUrl>
<copyright>(C) 2020 Open Source Matters, Inc.</copyright> <copyright>(C) 2020 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license> <license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>1.0.2</version> <version>2.0.1</version>
<description>MOD_VERSION_CALENDAR_SVG_XML_DESCRIPTION</description> <description>MOD_VERSION_CALENDAR_SVG_XML_DESCRIPTION</description>
<!-- Scripts to run on installation --> <!-- Scripts to run on installation -->
@ -132,6 +132,14 @@
label="MOD_VERSION_CALENDAR_SVG_TEXT_COLOR_LABEL" label="MOD_VERSION_CALENDAR_SVG_TEXT_COLOR_LABEL"
required="true" required="true"
/> />
<!-- Future_text_color Field. Type: Color. (joomla) -->
<field
type="color"
name="future_text_color"
default="#fbf3ef"
label="MOD_VERSION_CALENDAR_SVG_FUTURE_TEXT_COLOR_LABEL"
required="true"
/>
<!-- Future_color Field. Type: Color. (joomla) --> <!-- Future_color Field. Type: Color. (joomla) -->
<field <field
type="color" type="color"
@ -140,20 +148,12 @@
label="MOD_VERSION_CALENDAR_SVG_FUTURE_COLOR_LABEL" label="MOD_VERSION_CALENDAR_SVG_FUTURE_COLOR_LABEL"
required="true" required="true"
/> />
<!-- Stable_color Field. Type: Color. (joomla) --> <!-- End_of_life_text_color Field. Type: Color. (joomla) -->
<field <field
type="color" type="color"
name="stable_color" name="end_of_life_text_color"
default="#7ac143" default="#ffffff"
label="MOD_VERSION_CALENDAR_SVG_STABLE_COLOR_LABEL" label="MOD_VERSION_CALENDAR_SVG_END_OF_LIFE_TEXT_COLOR_LABEL"
required="true"
/>
<!-- Security_color Field. Type: Color. (joomla) -->
<field
type="color"
name="security_color"
default="#f9a541"
label="MOD_VERSION_CALENDAR_SVG_SECURITY_COLOR_LABEL"
required="true" required="true"
/> />
<!-- End_of_life_color Field. Type: Color. (joomla) --> <!-- End_of_life_color Field. Type: Color. (joomla) -->
@ -164,14 +164,6 @@
label="MOD_VERSION_CALENDAR_SVG_END_OF_LIFE_COLOR_LABEL" label="MOD_VERSION_CALENDAR_SVG_END_OF_LIFE_COLOR_LABEL"
required="true" required="true"
/> />
<!-- End_of_life_text_color Field. Type: Color. (joomla) -->
<field
type="color"
name="end_of_life_text_color"
default="#ffffff"
label="MOD_VERSION_CALENDAR_SVG_END_OF_LIFE_TEXT_COLOR_LABEL"
required="true"
/>
<!-- Years_line_color Field. Type: Color. (joomla) --> <!-- Years_line_color Field. Type: Color. (joomla) -->
<field <field
type="color" type="color"
@ -235,8 +227,8 @@
showon="show_legend:1" showon="show_legend:1"
/> />
</fieldset> </fieldset>
<!-- default paths of dates fieldset points to the module --> <!-- default paths of versions fieldset points to the module -->
<fieldset name="dates" label="MOD_VERSION_CALENDAR_SVG_DATES" <fieldset name="versions" label="MOD_VERSION_CALENDAR_SVG_VERSIONS"
addrulepath="/modules/mod_version_calendar_svg/rules" addrulepath="/modules/mod_version_calendar_svg/rules"
addfieldpath="/modules/mod_version_calendar_svg/fields" addfieldpath="/modules/mod_version_calendar_svg/fields"
> >
@ -266,18 +258,18 @@
step="1" step="1"
validate="number" validate="number"
/> />
<!-- Dates Field. Type: Subform. (joomla) --> <!-- Versions Field. Type: Subform. (joomla) -->
<field <field
type="subform" type="subform"
name="dates" name="versions"
label="MOD_VERSION_CALENDAR_SVG_DATES_LABEL" label="MOD_VERSION_CALENDAR_SVG_VERSIONS_LABEL"
layout="joomla.form.field.subform.repeatable" layout="joomla.form.field.subform.repeatable"
multiple="true" multiple="true"
buttons="add,remove,move" buttons="add,remove,move"
icon="list" icon="list"
max="50" max="10"
min="1"> min="1">
<form hidden="true" name="list_dates_modal" repeat="true"> <form hidden="true" name="list_versions_modal" repeat="true">
<!-- Version Field. Type: Text. (joomla) --> <!-- Version Field. Type: Text. (joomla) -->
<field <field
type="text" type="text"
@ -293,6 +285,67 @@
message="MOD_VERSION_CALENDAR_SVG_VERSION_MESSAGE" message="MOD_VERSION_CALENDAR_SVG_VERSION_MESSAGE"
hint="MOD_VERSION_CALENDAR_SVG_VERSION_HINT" hint="MOD_VERSION_CALENDAR_SVG_VERSION_HINT"
/> />
<!-- Dates Field. Type: Subform. (joomla) -->
<field
type="subform"
name="dates"
label="MOD_VERSION_CALENDAR_SVG_DATES_LABEL"
layout="joomla.form.field.subform.repeatable"
multiple="true"
buttons="add,remove,move"
icon="list"
max="10"
min="1"
nested_depth="1">
<form hidden="true" name="list_dates_modal" repeat="true">
<!-- State Field. Type: Text. (joomla) -->
<field
type="text"
name="state"
label="MOD_VERSION_CALENDAR_SVG_STATE_LABEL"
size="10"
maxlength="50"
class="text_area"
required="true"
filter="WORD"
hint="MOD_VERSION_CALENDAR_SVG_STATE_HINT"
autocomplete="on"
/>
<!-- Label Field. Type: Text. (joomla) -->
<field
type="text"
name="label"
label="MOD_VERSION_CALENDAR_SVG_LABEL_LABEL"
size="40"
maxlength="50"
class="text_area"
required="true"
filter="STRING"
hint="MOD_VERSION_CALENDAR_SVG_LABEL_HINT"
autocomplete="on"
/>
<!-- Description Field. Type: Text. (joomla) -->
<field
type="text"
name="description"
label="MOD_VERSION_CALENDAR_SVG_DESCRIPTION_LABEL"
size="50"
maxlength="150"
class="text_area"
required="false"
filter="STRING"
hint="MOD_VERSION_CALENDAR_SVG_DESCRIPTION_HINT"
autocomplete="on"
/>
<!-- Color Field. Type: Color. (joomla) -->
<field
type="color"
name="color"
default="#5091cd"
label="MOD_VERSION_CALENDAR_SVG_COLOR_LABEL"
description="MOD_VERSION_CALENDAR_SVG_COLOR_DESCRIPTION"
required="true"
/>
<!-- Start Field. Type: Calendar. (joomla) --> <!-- Start Field. Type: Calendar. (joomla) -->
<field <field
type="calendar" type="calendar"
@ -304,17 +357,6 @@
size="40" size="40"
required="true" required="true"
/> />
<!-- Security Field. Type: Calendar. (joomla) -->
<field
type="calendar"
name="security"
label="MOD_VERSION_CALENDAR_SVG_SECURITY_LABEL"
format="%d-%m-%Y"
filter="CMD"
message="MOD_VERSION_CALENDAR_SVG_SECURITY_MESSAGE"
size="40"
required="false"
/>
<!-- End Field. Type: Calendar. (joomla) --> <!-- End Field. Type: Calendar. (joomla) -->
<field <field
type="calendar" type="calendar"
@ -328,6 +370,8 @@
/> />
</form> </form>
</field> </field>
</form>
</field>
</fieldset> </fieldset>
</fields> </fields>
</config> </config>

View File

@ -21,50 +21,53 @@ defined('_JEXEC') or die('Restricted access');
font-family: "Source Sans Pro", Helvetica, Arial, sans-serif; font-family: "Source Sans Pro", Helvetica, Arial, sans-serif;
font-size: <?php echo (2 / 3) * $params->get('header_height', 24); ?>px; font-size: <?php echo (2 / 3) * $params->get('header_height', 24); ?>px;
} }
g.future rect, g.vcs-future rect,
.branches rect.future { .vcs-branches rect.vcs-future {
fill: <?php echo $params->get('future_color', '#000'); ?>; fill: <?php echo $params->get('future_color', '#5091cd'); ?>;
} }
g.eol rect, g.vcs-future text {
.branches rect.eol { fill: <?php echo $params->get('future_text_color', '#fff'); ?>;
}
g.vcs-eol rect,
.vcs-branches rect.vcs-eol {
fill: <?php echo $params->get('end_of_life_color', '#f33'); ?>; fill: <?php echo $params->get('end_of_life_color', '#f33'); ?>;
} }
g.eol text { g.vcs-eol text {
fill: <?php echo $params->get('end_of_life_text_color', '#fff'); ?>; fill: <?php echo $params->get('end_of_life_text_color', '#fff'); ?>;
} }
g.security rect, <?php foreach ($branches as $version): ?>
.branches rect.security { <?php foreach ($version->dates as $date): ?>
fill: <?php echo $params->get('security_color', '#f93'); ?>; g.<?php echo $date->state; ?> rect,
.vcs-branches rect.<?php echo $date->state; ?> {
fill: <?php echo $date->color; ?>;
} }
g.stable rect, <?php endforeach; ?>
.branches rect.stable { <?php endforeach; ?>
fill: <?php echo $params->get('stable_color', '#9c9'); ?>; .vcs-branch-labels text {
}
.branch-labels text {
dominant-baseline: central; dominant-baseline: central;
text-anchor: middle; text-anchor: middle;
} }
.today line { .vcs-today line {
stroke: <?php echo $params->get('today_line_color', '#f33'); ?>; stroke: <?php echo $params->get('today_line_color', '#f33'); ?>;
stroke-dasharray: 7, 7; stroke-dasharray: 7, 7;
stroke-width: 3px; stroke-width: 3px;
} }
.today text { .vcs-today text {
fill: <?php echo $params->get('today_text_color', '#f33'); ?>; fill: <?php echo $params->get('today_text_color', '#f33'); ?>;
text-anchor: middle; text-anchor: middle;
} }
.years line { .vcs-years line {
stroke: <?php echo $params->get('years_line_color', '#000'); ?>; stroke: <?php echo $params->get('years_line_color', '#000'); ?>;
} }
.years text { .vcs-years text {
fill: <?php echo $params->get('years_text_color', '#000'); ?>; fill: <?php echo $params->get('years_text_color', '#000'); ?>;
text-anchor: middle; text-anchor: middle;
} }
</style> </style>
<!-- Branch labels --> <!-- Branch labels -->
<g class="branch-labels"> <g class="vcs-branch-labels">
<?php foreach ($branches as $branch): ?> <?php foreach ($branches as $key => $branch): ?>
<g class="<?php echo $helper->state($branch); ?>"> <g class="<?php echo $helper->state($branch->dates); ?>">
<rect x="0" y="<?php echo $branch->top; ?>" width="<?php echo 0.5 * $params->get('margin_left', 80); ?>" <rect x="0" y="<?php echo $branch->top; ?>" width="<?php echo 0.5 * $params->get('margin_left', 80); ?>"
height="<?php echo $params->get('branch_height', 30); ?>"/> height="<?php echo $params->get('branch_height', 30); ?>"/>
<text x="<?php echo 0.25 * $params->get('margin_left', 80); ?>" y="<?php echo $branch->top + (0.5 * $params->get('branch_height', 30)); ?>"> <text x="<?php echo 0.25 * $params->get('margin_left', 80); ?>" y="<?php echo $branch->top + (0.5 * $params->get('branch_height', 30)); ?>">
@ -74,21 +77,31 @@ defined('_JEXEC') or die('Restricted access');
<?php endforeach; ?> <?php endforeach; ?>
</g> </g>
<!-- Branch blocks --> <!-- Branch blocks -->
<g class="branches"> <g class="vcs-branches">
<?php foreach ($branches as $branch): ?> <?php foreach ($branches as $key => $version): ?>
<?php <?php
$x_release = $helper->coordinates(new DateTime($branch->start)); $y = $version->top;
$x_eol = $helper->coordinates(new DateTime($branch->end)); $height = $params->get('branch_height', 30);
$x_security = (empty($branch->security)) ? $x_eol : $helper->coordinates(new DateTime($branch->security));
?> ?>
<rect class="stable" x="<?php echo $x_release; ?>" y="<?php echo $branch->top; ?>" <?php foreach ($version->dates as $date): ?>
width="<?php echo $x_security - $x_release; ?>" height="<?php echo $params->get('branch_height', 30); ?>"/> <?php
<rect class="security" x="<?php echo $x_security; ?>" y="<?php echo $branch->top; ?>" $x_start = $helper->coordinates(new DateTime($date->start));
width="<?php echo $x_eol - $x_security; ?>" height="<?php echo $params->get('branch_height', 30); ?>"/> $x_end = $helper->coordinates(new DateTime($date->end));
?>
<g class="<?php echo $date->state; ?>">
<rect
x="<?php echo $x_start; ?>"
y="<?php echo $y; ?>"
width="<?php echo $x_end - $x_start; ?>"
height="<?php echo $height; ?>">
<title><?php echo htmlspecialchars($date->label); ?></title>
</rect>
</g>
<?php endforeach; ?>
<?php endforeach; ?> <?php endforeach; ?>
</g> </g>
<!-- Year lines --> <!-- Year lines -->
<g class="years"> <g class="vcs-years">
<?php foreach ($helper->years() as $date): ?> <?php foreach ($helper->years() as $date): ?>
<line x1="<?php echo $helper->coordinates($date); ?>" y1="<?php echo $params->get('header_height', 24); ?>" <line x1="<?php echo $helper->coordinates($date); ?>" y1="<?php echo $params->get('header_height', 24); ?>"
x2="<?php echo $helper->coordinates($date); ?>" x2="<?php echo $helper->coordinates($date); ?>"
@ -99,7 +112,7 @@ defined('_JEXEC') or die('Restricted access');
<?php endforeach; ?> <?php endforeach; ?>
</g> </g>
<!-- Today --> <!-- Today -->
<g class="today"> <g class="vcs-today">
<?php <?php
$now = new DateTime; $now = new DateTime;
$x = $helper->coordinates($now); $x = $helper->coordinates($now);
@ -108,96 +121,97 @@ defined('_JEXEC') or die('Restricted access');
y2="<?php echo $params->get('header_height', 24) + ($qty * $params->get('branch_height', 30)); ?>"/> y2="<?php echo $params->get('header_height', 24) + ($qty * $params->get('branch_height', 30)); ?>"/>
<text x="<?php echo $x; ?>" <text x="<?php echo $x; ?>"
y="<?php echo $params->get('header_height', 24) + ($qty * $params->get('branch_height', 30)) + (0.8 * $params->get('footer_height', 24)); ?>"> y="<?php echo $params->get('header_height', 24) + ($qty * $params->get('branch_height', 30)) + (0.8 * $params->get('footer_height', 24)); ?>">
<?php echo 'Today: ' . $now->format('j M Y'); ?> <?php echo JText::_('MOD_VERSION_CALENDAR_SVG_TODAY') . ': ' . $now->format('j M Y'); ?>
</text> </text>
</g> </g>
</svg> </svg>
<?php if ($params->get('show_legend', 0) == 1): ?> <?php if ($params->get('show_legend', 0) == 1): ?>
<?php
// get the legend values
$legend = $helper->legend();
?>
<style type="text/css"> <style type="text/css">
/* Box Shadow */ /* Box Shadow */
.vdm-box-shadow-medium { .vcs-box-shadow-medium {
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0.5rem 1.5rem rgba(0, 0, 0, 0.25); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0.5rem 1.5rem rgba(0, 0, 0, 0.25);
} }
/* Card Styles */ /* Card Styles */
.vdm-card { .vcs-card {
border-radius: 4px; border-radius: 4px;
margin-top: 15px; margin-top: 15px;
} }
.vdm-card-legend { .vcs-card-legend {
background-color: <?php echo $params->get('legend_background_color', '#494444'); ?>; background-color: <?php echo $params->get('legend_background_color', '#494444'); ?>;
color: <?php echo $params->get('legend_text_color', '#fbf3ef'); ?>; color: <?php echo $params->get('legend_text_color', '#fbf3ef'); ?>;
} }
.vdm-card-body { .vcs-card-body {
padding: 4px; padding: 4px;
} }
/* Grid Styles */ /* Grid Styles */
.vdm-grid { .vcs-grid {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.vdm-grid-match > div { .vcs-grid-match > div {
padding: 5px; padding: 5px;
min-height: 1px; min-height: 1px;
margin: 10px; margin: 10px;
} }
/* Flexbox Styles */ /* Flexbox Styles */
.vdm-flex { .vcs-flex {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.vdm-flex-middle { .vcs-flex-middle {
align-items: center; align-items: center;
} }
/* Color Box Styles */ /* Color Box Styles */
.vdm-color-box { .vcs-color-box {
width: 20px; width: 20px;
height: 20px; height: 20px;
display: inline-block; display: inline-block;
margin-right: 5px; margin-right: 5px;
} }
.vdm-future { background-color: <?php echo $params->get('future_color', '#000'); ?>; } .vcs-future { background-color: <?php echo $params->get('future_color', '#000'); ?>; }
.vdm-stable { background-color: <?php echo $params->get('stable_color', '#9c9'); ?>; } .vcs-eol { background-color: <?php echo $params->get('end_of_life_color', '#f33'); ?>; }
.vdm-security { background-color: <?php echo $params->get('security_color', '#f93'); ?>; } <?php foreach ($legend as $state): ?>
.vdm-end-of-life { background-color: <?php echo $params->get('end_of_life_color', '#f33'); ?>; } .<?php echo $state->state; ?> { background-color: <?php echo $state->color; ?>; }
<?php endforeach; ?>
/* Media Query for smaller screens */ /* Media Query for smaller screens */
@media (max-width: 768px) { @media (max-width: 768px) {
.vdm-grid { .vcs-grid {
flex-direction: column; flex-direction: column;
} }
.vdm-flex { .vcs-flex {
display: block; display: block;
} }
.vdm-grid-match > div { .vcs-grid-match > div {
margin: 4px; margin: 4px;
padding: 0; padding: 0;
} }
} }
</style> </style>
<div class="vdm-box-shadow-medium"> <div class="vcs-box-shadow-medium">
<div class="vdm-card vdm-card-legend vdm-card-body"> <div class="vcs-card vcs-card-legend vcs-card-body">
<div class="vdm-grid-match vdm-grid"> <div class="vcs-grid-match vcs-grid">
<div class="vdm-flex vdm-flex-middle"> <div class="vcs-flex vcs-flex-middle">
<span <span
class="vdm-color-box vdm-future hasTooltip" class="vcs-color-box vcs-future hasTooltip"
title="<?php echo JText::_('MOD_VERSION_CALENDAR_SVG_PLANNED_RELEASE_SCHEDULE'); ?>" title="<?php echo JText::_('MOD_VERSION_CALENDAR_SVG_PLANNED_RELEASE_SCHEDULE'); ?>"
></span><?php echo JText::_('MOD_VERSION_CALENDAR_SVG_FUTURE_RELEASES'); ?> ></span><?php echo JText::_('MOD_VERSION_CALENDAR_SVG_FUTURE_RELEASES'); ?>
</div> </div>
<div class="vdm-flex vdm-flex-middle"> <?php foreach ($legend as $state): ?>
<div class="vcs-flex vcs-flex-middle">
<span <span
class="vdm-color-box vdm-stable hasTooltip" class="vcs-color-box <?php echo $state->state; ?> hasTooltip"
title="<?php echo JText::_('MOD_VERSION_CALENDAR_SVG_STABLE_RELEASE_SCHEDULE_EXPECT_FULL_SUPPORT_AND_UPDATES'); ?>" title="<?php echo $state->description ?? ''; ?>"
></span><?php echo JText::_('MOD_VERSION_CALENDAR_SVG_STABLE_RELEASE'); ?> ></span><?php echo $state->label; ?>
</div> </div>
<div class="vdm-flex vdm-flex-middle"> <?php endforeach; ?>
<div class="vcs-flex vcs-flex-middle">
<span <span
class="vdm-color-box vdm-security hasTooltip" class="vcs-color-box vcs-eol hasTooltip"
title="<?php echo JText::_('MOD_VERSION_CALENDAR_SVG_SECURITY_SCHEDULE_EXPECT_ONLY_SECURITY_UPDATES'); ?>"
></span><?php echo JText::_('MOD_VERSION_CALENDAR_SVG_SECURITY_RELEASE'); ?>
</div>
<div class="vdm-flex vdm-flex-middle">
<span
class="vdm-color-box vdm-end-of-life hasTooltip"
title="<?php echo JText::_('MOD_VERSION_CALENDAR_SVG_VERSION_END_OF_LIFE_SCHEDULE_EXPECT_NO_MORE_SUPPORT'); ?>" title="<?php echo JText::_('MOD_VERSION_CALENDAR_SVG_VERSION_END_OF_LIFE_SCHEDULE_EXPECT_NO_MORE_SUPPORT'); ?>"
></span><?php echo JText::_('MOD_VERSION_CALENDAR_SVG_VERSION_AT_END_OF_LIFE'); ?> ></span><?php echo JText::_('MOD_VERSION_CALENDAR_SVG_VERSION_AT_END_OF_LIFE'); ?>
</div> </div>