Skip to content

Commit

Permalink
Merge branch 'release/5.4.28'
Browse files Browse the repository at this point in the history
  • Loading branch information
mahagr committed Mar 11, 2019
2 parents ec86290 + 375c9be commit 53410ce
Show file tree
Hide file tree
Showing 18 changed files with 187 additions and 112 deletions.
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,35 @@
# 5.4.28
## 03/11/2019

1. [Common](#common)
1. [](#new)
- Added `webp` to supported image types for image picker (#2450)
1. [](#improved)
- Logo particle: Added logo image max height (#2424)
1. [](#bugfix)
- Social particle: Improved link target handling (#2214)
- Helium Copyright particle: fixed missing link (#2214)
- Fixed `mkdir(...)` race condition
- Fixed `Obtaining write lock failed on file...` error
- Fixed caching and CSS generation not working if underlaying filesystem does not support file locking or it is disabled
- Fixed rare file corruption issue
1. [Joomla](#joomla)
1. [](#improved)
- Added edit link to content array (#2471, thanks @Chrissi2812)
1. [WordPress](#wordpress)
1. [](#new)
- Updated Timber to v1.9.1
1. [](#bugfix)
- Fixed potential query conflicts in `WordPress Posts` particle

# 5.4.27
## 12/14/2018

1. [Common](#common)
1. [](#new)
- Added Section Variation field for Layout sections.
1. [](#improved)
- Updated Lightcase version.
1. [](#bugfix)
- Fixed fatal error on PHP 5.4 (#2378)
- Fixed `Folder::doDelete($folder, false)` removing symlink when it should not (#2396)
Expand Down
5 changes: 3 additions & 2 deletions engines/common/nucleus/particles/logo.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
{% if (url == gantry.siteUrl()) %}{% set rel='rel="home"' %}{% endif %}
{% set class=(particle.class ? 'class="'~ particle.class ~'"') %}
{% set image = url(particle.image) %}

{% set height = particle.height ? 'style="max-height: ' ~ particle.height ~ '"' %}

{% if particle.link == true %}
<a href="{{ url }}" target="{{ particle.target|default('_self') }}" title="{{ particle.text }}" {{ rel|default('')|raw }} {{ class|default('')|raw }}>
{% else %}<div {{ class|default('')|raw }}>{% endif %}
{% if particle.svg is not empty %}
{{ particle.svg|raw }}
{% elseif image %}
<img src="{{ url(particle.image) }}" alt="{{ particle.text }}" />
<img src="{{ url(particle.image) }}" {{ height|default('')|raw }} alt="{{ particle.text }}" />
{% else %}
{{ particle.text|default('Logo') }}
{% endif %}
Expand Down
8 changes: 7 additions & 1 deletion engines/common/nucleus/particles/logo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ form:
type: input.imagepicker
label: Image
description: Select desired logo image.


height:
type: input.text
label: Maximum Height
description: Set image max. height in rem, em, px, or percentage unit values. Leave empty to use the default height.
pattern: '\d+(\.\d+){0,1}(rem|em|ex|ch|vw|vh|vmin|vmax|%|px|cm|mm|in|pt|pc)'

link:
type: input.checkbox
label: Link
Expand Down
11 changes: 9 additions & 2 deletions engines/common/nucleus/particles/social.html.twig
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
{% extends '@nucleus/partials/particle.html.twig' %}

{% if particle.target %}
{% set targetAttrib = ' target="' ~ particle.target|e ~ '"' %}
{% set targetAttrib = (target == '_blank') ? targetAttrib ~ ' rel="noopener noreferrer"' : targetAttrib %}
{% endif %}

{% block particle %}
{% if particle.title %}<h2 class="g-title">{{ particle.title|raw }}</h2>{% endif %}
<div class="g-social {{ particle.css.class }}">
{% for item in particle.items %}
<a target="{{ particle.target|default('_blank')|e }}" href="{{ item.link|e }}" title="{{ item.text|e }}" aria-label="{{ item.text|e }}">
{% set title = (item.title is not empty) ? item.title|e : item.text|e %}
{% set titleAttrib = (title is not empty) ? ' title="' ~ title ~ '" aria-label="' ~ title ~ '"' : '' %}
<a href="{{ item.link|e }}"{{ targetAttrib|raw }}{{ titleAttrib|raw }}>
{% if particle.display in ['both', 'icons_only'] %}<span class="{{ item.icon|e }}"></span>{% endif %}
{% if particle.display in ['both', 'text_only'] %}<span class="g-social-text">{{ item.text|e }}</span>{% endif %}
</a>
{% endfor %}
</div>
{% endblock %}
{% endblock %}
14 changes: 10 additions & 4 deletions engines/common/nucleus/particles/social.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ form:
label: Target
description: Target browser window when item is clicked.
placeholder: 'Select...'
default: _blank
default: ''
options:
_parent: Self
'': None
_self: Self
_parent: Parent
_top: Top
_blank: New Window

display:
Expand All @@ -56,7 +59,6 @@ form:
ajax: true

fields:

.name:
type: input.text
label: Name
Expand All @@ -70,6 +72,10 @@ form:
type: input.text
label: Text

.title:
type: input.text
label: Title

.link:
type: input.text
label: Link
label: Link
3 changes: 3 additions & 0 deletions engines/joomla/nucleus/particles/contentarray.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
<div class="g-block">
<div class="g-content">
<div class="g-array-item">
{% if display.edit and article.edit %}
<a class="g-array-item-edit" href="{{ article.edit }}">{{ 'COM_CONTENT_FORM_EDIT_ARTICLE'|trans }}</a>
{% endif %}
{% if display.image.enabled and article.images.image_intro or article.images.image_fulltext %}
{% if article.images.image_intro and display.image.enabled == 'intro' or display.image.enabled == 'show' %}
<div class="g-array-item-image">
Expand Down
6 changes: 6 additions & 0 deletions engines/joomla/nucleus/particles/contentarray.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ form:
description: Use Joomla Content Plugins
default: false

article.display.edit:
type: input.checkbox
label: Show Edit Link
description: Display a link to the article edit form
default: false

article.display.title.enabled:
type: select.select
label: Title
Expand Down
2 changes: 1 addition & 1 deletion engines/wordpress/nucleus/particles/contentarray.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
{% set query_parameters = query_parameters|merge({'cat': filter.categories|replace({' ': ',', ', ': ','})}) %}
{% endif %}

{% set posts = wordpress.call('Timber::query_posts', query_parameters) %}
{% set posts = wordpress.call('Timber::get_posts', query_parameters) %}
{% set total = posts.get_pagination([]).total|abs %}
{% set total = max(posts|length, (total * max(0, limit.total)) - 1) %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends 'forms/fields/input/filepicker.html.twig' %}

{% block input %}
{% set field = {'icon': 'fa-file-image-o', 'filter': '\.(jpe?g|gif|png|svg)$'}|merge(field) %}
{% set field = {'icon': 'fa-file-image-o', 'filter': '\.(jpe?g|gif|png|svg|webp)$'}|merge(field) %}
{{ parent() }}
{% endblock %}
4 changes: 2 additions & 2 deletions platforms/wordpress/gantry5/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Contributors: gantry
Author URI: http://gantry.org
Tags: gantry, gantry5, framework, template, theme, yaml, twig, timber, scss, html5, css3, bourbon, layout, builder, widgets, flexible, extensible, configurable, flex, grid, columns, powerful, buddypress, woocommerce, bbpress
Requires at least: 4.2
Tested up to: 5.0.1
Requires PHP: 5.4
Tested up to: 5.1
Requires PHP: 5.6
Stable tag: @version@

Gantry is a comprehensive set of building blocks to enable the rapid development and realization of a design into a flexible and powerful web platform
Expand Down
4 changes: 2 additions & 2 deletions src/classes/Gantry/Admin/Controller/Json/Filepicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ protected function attachData(&$node, $iteration, $folder)
$node->{$keyMethod} = $this->isStream($folder) ? $iteration->getUrl() : Folder::getRelativePath($node->{$keyMethod});
} else {
if ($method == 'getExtension') {
$node->isImage = in_array(strtolower($node->{$keyMethod}), ['jpg', 'jpeg', 'png', 'gif', 'ico', 'svg', 'bmp']);
$node->isImage = in_array(strtolower($node->{$keyMethod}), ['jpg', 'jpeg', 'png', 'gif', 'ico', 'svg', 'bmp', 'webp']);
}
}
}
Expand Down Expand Up @@ -480,4 +480,4 @@ private function isStream($folder)
{
return $folder instanceof UniformResourceIterator || strpos($folder, '://');
}
}
}
4 changes: 2 additions & 2 deletions src/classes/Gantry/Component/Filesystem/Folder.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ public static function delete($target, $include_target = true)
/**
* @param string $folder
* @throws \RuntimeException
* @internal
*/
public static function create($folder)
{
Expand All @@ -321,7 +320,8 @@ public static function create($folder)
$success = @mkdir($folder, 0777, true);

if (!$success) {
// Double check if the folder exists.
// Take yet another look, make sure that the folder doesn't exist.
clearstatcache(true, $folder);
if (is_dir($folder)) {
return;
}
Expand Down
50 changes: 26 additions & 24 deletions src/platforms/grav/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions src/platforms/joomla/classes/Gantry/Joomla/Content/Content.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@ public function route()
return \JRoute::_(\ContentHelperRoute::getArticleRoute($this->id . ':' . $this->alias, $category->id . ':' . $category->alias), false);
}

public function edit()
{
$user = \JFactory::getUser();
$asset = "com_content.article.{$this->id}";

if ($user->authorise('core.edit', $asset) || $user->authorise('core.edit.own', $asset)) {
return "index.php?option=com_content&task=article.edit&a_id={$this->id}&tmpl=component";
}

return false;
}

public function render($file)
{
return Gantry::instance()['theme']->render($file, ['article' => $this]);
Expand Down

0 comments on commit 53410ce

Please sign in to comment.