1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-16 18:14:04 +02:00

fix(admin-panel): fix create new sub entry logic issue. #381

This commit is contained in:
Awilum
2020-02-26 16:59:31 +03:00
parent 0a990d6a2b
commit 633dae8bc8
2 changed files with 4 additions and 4 deletions

View File

@@ -121,7 +121,7 @@ class EntriesController extends Controller
'create' => [
'link' => 'javascript:;',
'title' => __('admin_create_new_entry'),
'onclick' => 'event.preventDefault(); selectEntryType("", 0);'
'onclick' => 'event.preventDefault(); selectEntryType("'.$this->getEntryID($query).'", 0);'
]
]
]

View File

@@ -10,7 +10,7 @@
{% else %}
{% set _entries = entries.fetch(entry.slug, {}) %}
{% set _entries_length = _entries | length %}
{% do
{% do
cache.save(entry.slug ~ '_counter', _entries_length) %}
{% endif %}
<div class="w-full md:w-3/12 lg:w-2/12 text-center p-4 relative">
@@ -146,7 +146,7 @@
{% else %}
{% set _entries = entries.fetch(entry.slug, {}) %}
{% set _entries_length = _entries | length %}
{% do
{% do
cache.save(entry.slug ~ '_counter', _entries_length) %}
{% endif %}
<a href="{% if _entries_length > 0 %}{{ path_for('admin.entries.index') }}?id={{ entry.slug }}{% else %}{{ path_for('admin.entries.edit') }}?id={{ entry.slug }}&type=editor{% endif %}">
@@ -294,4 +294,4 @@
});
}
</script>
{% endblock %}
{% endblock %}