Skip to content

Commit

Permalink
Merge branch 'release/1.0.12'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Jun 2, 2021
2 parents 45f3028 + 37aed6c commit ee99992
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# v1.0.12
## 06/02/2021

1. [](#bugfix)
* Fixed logic to get form blueprints and object, prevents events from being fired twice
* Fixed breadcrumb item in Pages list not translating HTML entities [#127](https://github.com/trilbymedia/grav-plugin-flex-objects/issues/127)

# v1.0.11
## 05/24/2021

Expand Down
8 changes: 6 additions & 2 deletions admin/templates/flex-objects/types/default/edit.html.twig
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{% extends 'partials/base.html.twig' %}
{% use 'flex-objects/types/default/titlebar/edit.html.twig' %}

{% set form = form ?? object.form %}
{# Avoid defining form and object twice: object should always come from the form! #}
{% if form is not defined %}
{% set form = object.form %}
{% set object = form.object %}
{% endif %}

{# Allowed actions #}
{% set can_list = can_list ?? directory.isAuthorized('list', 'admin', user) %}
Expand Down Expand Up @@ -51,7 +55,7 @@
{% block body %}
{% set back_url = back_url ?? admin_route(back_route) %}
{% set id = key %}
{% set blueprint = blueprint ?? object.blueprint ?? directory.blueprint %}
{% set blueprint = blueprint ?? form.blueprint %}

{{ parent() }}
{% endblock body %}
Expand Down
7 changes: 6 additions & 1 deletion admin/templates/flex-objects/types/pages/edit.html.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{% extends 'flex-objects/types/default/edit.html.twig' %}

{% set form = form ?? object.form(user.authorize('admin.super') and admin.session.expert != '0' ? 'raw') %}
{# Avoid defining form and object twice: object should always come from the form! #}
{% if form is not defined %}
{% set form = object.form(user.authorize('admin.super') and admin.session.expert != '0' ? 'raw') %}
{% set form = object.form %}
{% set object = form.object %}
{% endif %}

{% set title = title ?? form.getValue('header.title') ?? object.title ?? key %}
{% set parent = object.parent %}
Expand Down
2 changes: 1 addition & 1 deletion app/utils/finder.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ class Finder {
this.pathBar.append(`
<span class="breadcrumb-node ${item.icon}" ${item.type === 'dir' || item.child_count > 0 ? `data-breadcrumb-node="${itemKeys}"` : ''}>
<i class="${item.icon}"></i>
<span class="breadcrumb-node-name">${$('<div />').text(item[this.config.labelKey]).html()}</span>
<span class="breadcrumb-node-name">${$('<div />').html(item[this.config.labelKey]).html()}</span>
${!isLast ? '<i class="fa fa-fw fa-chevron-right"></i>' : ''}
</span>
`);
Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Flex Objects
slug: flex-objects
type: plugin
version: 1.0.11
version: 1.0.12
description: Flex Objects plugin allows you to manage Flex Objects in Grav Admin.
icon: list-alt
author:
Expand Down
2 changes: 1 addition & 1 deletion js/flex-objects.js

Large diffs are not rendered by default.

0 comments on commit ee99992

Please sign in to comment.