1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-24 13:52:56 +02:00

Merge branch 'dev'

This commit is contained in:
Awilum
2019-09-21 16:24:23 +03:00
15 changed files with 225 additions and 178 deletions

View File

@@ -1,3 +1,33 @@
<a name="0.9.5"></a>
# [0.9.5](https://github.com/flextype/flextype/compare/v0.9.4...v0.9.5) (2019-09-21)
### Bug Fixes
* **core:** issue with cache in the Entries API - fetchAll method #234 2779777
* **core:** issue with emitter twig function #234 426a073
* **core:** issue with empty entries folder Entries API - fetchAll method #234 cf61f2d
* **core:** issue with Cache ID for Themes list #234 594f4a3
* **admin-plugin:** issue with active button styles on Themes Manager page #234 434f336
* **admin-plugin:** issue with emitter twig function #234 806b18e
* **admin-plugin:** Russian translations #233
* **site-plugin:** notice for undefined $query['format'] #234 8bde8eb
### Code Refactoring
* **core:** remove $response from Forms render method #234
* **core:** add property forms to Flextype\EntriesController #234
### BREAKING CHANGES
Changed emitter execution in the templates
FROM
```
{{ emitter.emit('EVENT_NAME') }}
```
TO
```
{% do emitter.emit('EVENT_NAME') %}
```
<a name="0.9.4"></a>
# [0.9.4](https://github.com/flextype/flextype/compare/v0.9.3...v0.9.4) (2019-09-11)
### Added

View File

@@ -29,7 +29,7 @@ use function mb_regex_encoding;
*
* @var string
*/
define('FLEXTYPE_VERSION', '0.9.4');
define('FLEXTYPE_VERSION', '0.9.5');
/**
* Start the session

View File

@@ -172,6 +172,9 @@ class Entries
// Init Entries
$entries = [];
// Init Entries
$this->entries = $entries;
// Set Expression
$expression = $this->expression;
@@ -235,34 +238,16 @@ class Entries
// Get entries list
$entries_list = Filesystem::listContents($entries_path, $bind_recursive);
// Get Entries Timestamp
$entries_timestamp = Filesystem::getDirTimestamp($entries_path);
// If entries founded in entries folder
if (count($entries_list) > 0) {
// Create unique entries $cache_id
$cache_id = md5($entries_timestamp .
$bind_id .
($bind_recursive ? 'true' : 'false') .
($bind_set_max_result ? $bind_set_max_result : 'false') .
($bind_set_first_result ? $bind_set_first_result : 'false') .
($bind_where['where']['key'] ? $bind_where['where']['key'] : 'false') .
($bind_where['where']['expr'] ? $bind_where['where']['expr'] : 'false') .
($bind_where['where']['value'] ? $bind_where['where']['value'] : 'false') .
($bind_and_where['and_where']['key'] ? $bind_and_where['and_where']['key'] : 'false') .
($bind_and_where['and_where']['expr'] ? $bind_and_where['and_where']['expr'] : 'false') .
($bind_and_where['and_where']['value'] ? $bind_and_where['and_where']['value'] : 'false') .
($bind_or_where['or_where']['key'] ? $bind_or_where['or_where']['key'] : 'false') .
($bind_or_where['or_where']['expr'] ? $bind_or_where['or_where']['expr'] : 'false') .
($bind_or_where['or_where']['value'] ? $bind_or_where['or_where']['value'] : 'false') .
($bind_order_by['order_by']['field'] ? $bind_order_by['order_by']['field'] : 'false') .
($bind_order_by['order_by']['direction'] ? $bind_order_by['order_by']['direction'] : 'false'));
// Entries IDs
$entries_ids = '';
// Entries IDs timestamps
$entries_ids_timestamps = '';
// If requested entries exist with a specific cache_id,
// then we take them from the cache otherwise we look for them.
if ($this->flextype['cache']->contains($cache_id)) {
$entries = $this->flextype['cache']->fetch($cache_id);
} else {
// Create entries array from entries list and ignore current requested entry
//echo count($entries_list);
foreach ($entries_list as $current_entry) {
if (strpos($current_entry['path'], $bind_id . '/entry' . '.' . 'md') !== false) {
// ignore ...
@@ -280,65 +265,97 @@ class Entries
// Add entry into the entries
$entries[$uid] = $entry;
// Create entries IDs list
$entries_ids .= $uid;
// Create entries IDs timestamps
$entries_ids_timestamps .= Filesystem::getTimestamp($current_entry['path'] . '/entry.md');
}
}
}
// Create Array Collection from entries array
$collection = new ArrayCollection($entries);
// Create unique entries $cache_id
$cache_id = md5($bind_id .
$entries_ids .
$entries_ids_timestamps .
($bind_recursive ? 'true' : 'false') .
($bind_set_max_result ? $bind_set_max_result : 'false') .
($bind_set_first_result ? $bind_set_first_result : 'false') .
($bind_where['where']['key'] ? $bind_where['where']['key'] : 'false') .
($bind_where['where']['expr'] ? $bind_where['where']['expr'] : 'false') .
($bind_where['where']['value'] ? $bind_where['where']['value'] : 'false') .
($bind_and_where['and_where']['key'] ? $bind_and_where['and_where']['key'] : 'false') .
($bind_and_where['and_where']['expr'] ? $bind_and_where['and_where']['expr'] : 'false') .
($bind_and_where['and_where']['value'] ? $bind_and_where['and_where']['value'] : 'false') .
($bind_or_where['or_where']['key'] ? $bind_or_where['or_where']['key'] : 'false') .
($bind_or_where['or_where']['expr'] ? $bind_or_where['or_where']['expr'] : 'false') .
($bind_or_where['or_where']['value'] ? $bind_or_where['or_where']['value'] : 'false') .
($bind_order_by['order_by']['field'] ? $bind_order_by['order_by']['field'] : 'false') .
($bind_order_by['order_by']['direction'] ? $bind_order_by['order_by']['direction'] : 'false'));
// Create Criteria for filtering Selectable collections.
$criteria = new Criteria();
// If requested entries exist with a specific cache_id,
// then we take them from the cache otherwise we look for them.
if ($this->flextype['cache']->contains($cache_id)) {
$entries = $this->flextype['cache']->fetch($cache_id);
} else {
// Exec: where
if (isset($bind_where['where']['key']) && isset($bind_where['where']['expr']) && isset($bind_where['where']['value'])) {
$expr = new Comparison($bind_where['where']['key'], $bind_where['where']['expr'], $bind_where['where']['value']);
$criteria->where($expr);
// Create Array Collection from entries array
$collection = new ArrayCollection($entries);
// Create Criteria for filtering Selectable collections.
$criteria = new Criteria();
// Exec: where
if (isset($bind_where['where']['key']) && isset($bind_where['where']['expr']) && isset($bind_where['where']['value'])) {
$expr = new Comparison($bind_where['where']['key'], $bind_where['where']['expr'], $bind_where['where']['value']);
$criteria->where($expr);
}
// Exec: and where
if (isset($bind_and_where['and_where']['key']) && isset($bind_and_where['and_where']['expr']) && isset($bind_and_where['and_where']['value'])) {
$expr = new Comparison($bind_and_where['and_where']['key'], $bind_and_where['and_where']['expr'], $bind_and_where['and_where']['value']);
$criteria->andWhere($expr);
}
// Exec: or where
if (isset($bind_or_where['or_where']['key']) && isset($bind_or_where['or_where']['expr']) && isset($bind_or_where['or_where']['value'])) {
$expr = new Comparison($bind_or_where['or_where']['key'], $bind_or_where['or_where']['expr'], $bind_or_where['or_where']['value']);
$criteria->orWhere($expr);
}
// Exec: order by
if (isset($bind_order_by['order_by']['field']) && isset($bind_order_by['order_by']['direction'])) {
$criteria->orderBy([$bind_order_by['order_by']['field'] => $direction[$bind_order_by['order_by']['direction']]]);
}
// Exec: set max result
if ($bind_set_max_result) {
$criteria->setMaxResults($bind_set_max_result);
}
// Exec: set first result
if ($bind_set_first_result) {
$criteria->setFirstResult($bind_set_first_result);
}
// Get entries for matching criterias
$entries = $collection->matching($criteria);
// Gets a native PHP array representation of the collection.
$entries = $entries->toArray();
// Save entries into the cache
$this->flextype['cache']->save($cache_id, $entries);
}
// Exec: and where
if (isset($bind_and_where['and_where']['key']) && isset($bind_and_where['and_where']['expr']) && isset($bind_and_where['and_where']['value'])) {
$expr = new Comparison($bind_and_where['and_where']['key'], $bind_and_where['and_where']['expr'], $bind_and_where['and_where']['value']);
$criteria->andWhere($expr);
}
// Set entries into the property entries
$this->entries = $entries;
// Exec: or where
if (isset($bind_or_where['or_where']['key']) && isset($bind_or_where['or_where']['expr']) && isset($bind_or_where['or_where']['value'])) {
$expr = new Comparison($bind_or_where['or_where']['key'], $bind_or_where['or_where']['expr'], $bind_or_where['or_where']['value']);
$criteria->orWhere($expr);
}
// Exec: order by
if (isset($bind_order_by['order_by']['field']) && isset($bind_order_by['order_by']['direction'])) {
$criteria->orderBy([$bind_order_by['order_by']['field'] => $direction[$bind_order_by['order_by']['direction']]]);
}
// Exec: set max result
if ($bind_set_max_result) {
$criteria->setMaxResults($bind_set_max_result);
}
// Exec: set first result
if ($bind_set_first_result) {
$criteria->setFirstResult($bind_set_first_result);
}
// Get entries for matching criterias
$entries = $collection->matching($criteria);
// Gets a native PHP array representation of the collection.
$entries = $entries->toArray();
// Save entries into the cache
$this->flextype['cache']->save($cache_id, $entries);
// Run event onEntriesAfterInitialized
$this->flextype['emitter']->emit('onEntriesAfterInitialized');
}
// Set entries into the property entries
$this->entries = $entries;
// Run event onEntriesAfterInitialized
$this->flextype['emitter']->emit('onEntriesAfterInitialized');
// Return entries
return $this->entries;
}

View File

@@ -77,13 +77,12 @@ class Forms
* @param array $fieldset Fieldset
* @param array $values Fieldset values
* @param Request $request PSR7 request
* @param Response $response PSR7 response
*
* @return string Returns form based on fieldsets
*
* @access public
*/
public function render(array $fieldset, array $values = [], Request $request, Response $response) : string
public function render(array $fieldset, array $values = [], Request $request) : string
{
$form = Form::open(null, ['id' => 'form']);
$form .= $this->_csrfHiddenField();

View File

@@ -105,11 +105,11 @@ class Themes
if (is_array($themes_list) && count($themes_list) > 0) {
foreach ($themes_list as $theme) {
if (! Filesystem::has($_themes_settings = PATH['themes'] . '/' . $theme['dirname'] . '/settings.yaml') or
! Filesystem::has($_themes_manifest = PATH['themes'] . '/' . $theme['dirname'] . '/plugin.yaml')) {
! Filesystem::has($_themes_manifest = PATH['themes'] . '/' . $theme['dirname'] . '/theme.yaml')) {
continue;
}
$_themes_cache_id .= filemtime($_themes_settings) . filemtime($_themes_manifest);
$_themes_cache_id .= $_themes_settings . filemtime($_themes_settings) . $_themes_manifest . filemtime($_themes_manifest);
}
}

View File

@@ -33,7 +33,7 @@ class EmitterTwigExtension extends Twig_Extension implements Twig_Extension_Glob
public function getGlobals()
{
return [
'emmiter' => new EmitterTwig($this->flextype),
'emitter' => new EmitterTwig($this->flextype),
];
}
}
@@ -56,7 +56,7 @@ class EmitterTwig
/**
* Emitting event
*/
public function emmit($event)
public function emit($event)
{
return $this->flextype['emitter']->emit($event);
}

View File

@@ -28,6 +28,7 @@ use Ramsey\Uuid\Exception\UnsatisfiedDependencyException;
* @property Csrf $csrf
* @property Themes $themes
* @property Slugify $slugify
* @property Forms $forms
*/
class EntriesController extends Controller
{
@@ -697,7 +698,7 @@ class EntriesController extends Controller
'parts' => $parts,
'i' => count($parts),
'last' => Arr::last($parts),
'form' => $this->forms->render($fieldsets, $entry, $request, $response),
'form' => $this->forms->render($fieldsets, $entry, $request),
'menu_item' => 'entries',
'links' => [
'entries' => [

View File

@@ -1,6 +1,6 @@
---
admin: "Admin"
admin_welcome: "Welcome"
admin: "Adminisztráció"
admin_welcome: "Üdvözlet"
admin_create_new_user_welcome: "To finish setup and secure your site, please create the first user by entering the necessary information below."
admin_cancel: "Mégsem"
admin_create: "Létrehozás"
@@ -14,7 +14,7 @@ admin_documentation: "Dokumentáció"
admin_memcache_server: "Memcache szerver"
admin_memcache_port: "Memcache port"
admin_login: "Belépés"
admin_entries: "Bejegyzések"
admin_entries: "Oldalak"
admin_extends: "Extends"
admin_plugins: "Pluginok"
admin_themes: "Sablonok"
@@ -32,7 +32,7 @@ admin_add: "Hozzáadás"
admin_entry_attributes: "Entry Attributes"
admin_fieldset_for_template: "Fieldset for template"
admin_content: "Tartalom"
admin_create_new_entry: "Új bejegyzés létrehozása"
admin_create_new_entry: "Új oldal létrehozása"
admin_date: "Dátum"
admin_draft: "Piszkozat"
admin_edit: "Szerkesztés"
@@ -51,7 +51,7 @@ admin_parent_entry: "Entry parent"
admin_preview: "Előnézet"
admin_publish: "Publikálás"
admin_rename: "Átnevezés"
admin_save_entry: "Bejegyzés mentése"
admin_save_entry: "Oldal mentése"
admin_template: "Sablon"
admin_title: "Cím"
admin_url: "URL"
@@ -89,8 +89,8 @@ admin_heading: "Beállítások"
admin_general: "Általános"
admin_error_404_page: "404-es hiba oldal"
admin_cache: "Gyorsítótár"
admin_author_email: "Szerző e-mail"
admin_author_name: "Szerző neve"
admin_author_email: "Készítő e-mail"
admin_author_name: "Készítő neve"
admin_site_description: "Oldal leírása"
admin_site_keywords: "Oldal kulcsszavai"
admin_site_robots: "Robots"
@@ -101,8 +101,8 @@ admin_cache_enabled: "Gyorsítótár engedélyezve"
admin_cache_lifetime: "Gyorsítótár élettartama"
admin_cache_prefix: "Gyorsítótár előtag"
admin_charset: "Karakterkészlet"
admin_date_format: "Date format"
admin_date_display_format: "Display date format"
admin_date_format: "Dátum formátum"
admin_date_display_format: "Dátum formátum kijelzése"
admin_errors_display: "Hibák megjelenítése"
admin_locale: "Nyelv"
admin_entry_main: "Main entry"
@@ -155,12 +155,12 @@ admin_message_fieldset_created: "Fieldset created"
admin_message_fieldset_deleted: "Fieldset deleted"
admin_message_fieldset_renamed: "Fieldset renamed"
admin_message_fieldset_duplicated: "Fieldset duplicated"
admin_message_entry_duplicated: "Entry duplicated"
admin_message_entry_was_not_duplicated: "Entry was not duplicated"
admin_message_entry_duplicated: "Az oldal lemásolva"
admin_message_entry_was_not_duplicated: "Az oldalt nem lehet duplikálni"
admin_message_cache_files_deleted: "Gyorsítótárfájlok törölve"
admin_message_entry_changes_saved: "Changes successfully saved"
admin_message_entry_changes_not_saved: "Changes not saved"
admin_message_entry_cloned: "Entry cloned"
admin_message_entry_cloned: "Az oldal klónozva"
admin_message_entry_created: "Bejegyzés létrehozva"
admin_message_entry_was_not_created: "Entry was not created"
admin_message_entry_deleted: "Bejegyzés törölve"
@@ -169,9 +169,9 @@ admin_message_entry_was_not_deleted: "A bejegyzés nem lett törölve"
admin_message_entry_file_deleted: "A fájl sikeresen törölve"
admin_message_entry_file_uploaded: "Fájl sikeresen feltöltve"
admin_message_entry_file_not_uploaded: "A fájlt nem lehet feltölteni"
admin_message_entry_moved: "Bejegyzés átmozgatva"
admin_message_entry_was_not_moved: "Entry was not moved"
admin_message_entry_renamed: "Bejegyzés átnevezve"
admin_message_entry_moved: "Az oldal átmozgatva"
admin_message_entry_was_not_moved: "Az oldalt nem lehet átmozgatni"
admin_message_entry_renamed: "Az oldal átnevezve"
admin_message_settings_saved: "Beállítások elmentve"
admin_message_settings_was_not_saved: "Beállítások nem lettek mentve"
admin_message_wrong_username_password: "Hibás felhasználónév vagy jelszó"
@@ -211,15 +211,15 @@ admin_you_have_not_created_any_entries_yet: "You haven't created any entries yet
admin_you_have_not_created_any_snippets_yet: "You haven't created any snippets yet!"
admin_you_have_not_created_any_templates_yet: "You haven't created any templates yet!"
admin_you_have_not_created_any_fieldsets_yet: "You haven't created any fieldsets yet!"
admin_twig_auto_reload: "Auto reload"
admin_display_error_details: "Display error details"
admin_twig_auto_reload: "Automatikus újratöltés"
admin_display_error_details: "Hiba részletek megjelenítése"
admin_add_content_length_header: "Add content length header"
admin_router_cache_file: "Route cache file"
admin_determine_route_before_app_middleware: "Determine route before app middleware"
admin_output_buffering: "Output buffering"
admin_response_chunk_size: "Response chunk size"
admin_http_version: "HTTP verzió"
admin_image_driver: "Image driver"
admin_image_driver: "Kép kezelő"
admin_whoops_editor: "Whoops editor"
admin_whoops_page_title: "Whoops page title"
admin_editor: "Szerkesztő"
@@ -231,7 +231,7 @@ admin_registry: "Registry"
admin_key: "Kulcs"
admin_value: "Érték"
admin_activate: "Aktiválás"
admin_active_theme: "Active Theme"
admin_active_theme: "Aktív sablon"
admin_get_more_themes: "További sablonok"
admin_images: "Képek"
admin_data: "Adat"
@@ -244,12 +244,12 @@ admin_slugify_lowercase: "Kisbetű"
admin_slugify_trim: "Trim"
admin_slugify_strip_tags: "HTML tagek kiszűrése"
admin_slugify_lowercase_after_regexp: "Lowercase after regexp"
admin_slugify_regexp: "Regexp"
admin_slugify_regexp: "Szabályos kifejezés"
admin_gallery_img: "Galéria kép"
admin_tags: "Tags"
admin_twig_templating: "Twig Templating"
admin_twig_debug: "Debug"
admin_twig_charset: "Charset"
admin_twig_cache: "Cache"
admin_published_at: "Published at"
admin_licence: "Licence"
admin_tags: "Cimkék"
admin_twig_templating: "Twig sablonok"
admin_twig_debug: "Hibakeresés"
admin_twig_charset: "Karakterkészlet"
admin_twig_cache: "Gyorsítótár"
admin_published_at: "Publikálás ideje"
admin_licence: "Licensz"

View File

@@ -1,54 +1,54 @@
---
admin: "Admin"
admin_welcome: "Welcome"
admin: "관리자"
admin_welcome: "환영합니다!"
admin_create_new_user_welcome: "To finish setup and secure your site, please create the first user by entering the necessary information below."
admin_cancel: "Cancel"
admin_create: "Create"
admin_debugging: "Debugging"
admin_email: "Email"
admin_cancel: "취소"
admin_create: "만들기"
admin_debugging: "디버깅"
admin_email: "이메일"
admin_flextype_version: "Flextype Version"
admin_information: "Information"
admin_installed: "Installed"
admin_information: "정보"
admin_installed: "설치"
admin_keywords: "Keywords"
admin_documentation: "Documentation"
admin_documentation: "문서"
admin_memcache_server: "Memcache Server"
admin_memcache_port: "Memcache Port"
admin_login: "Login"
admin_entries: "Entries"
admin_extends: "Extends"
admin_plugins: "Plugins"
admin_themes: "Themes"
admin_login: "로그인"
admin_entries: "항목"
admin_extends: "확장"
admin_plugins: "플러그인"
admin_themes: "테마"
admin_help: "Help"
admin_getting_help: "Getting Help"
admin_message_json_invalid: "Invalid JSON"
admin_logout: "Logout"
admin_profile: "Profile"
admin_view_site: "View Site"
admin_snippets: "Snippets"
admin_not_installed: "Not Installed"
admin_off: "Off"
admin_on: "On"
admin_add: "Add"
admin_message_json_invalid: "잘못된 JSON"
admin_logout: "로그아웃"
admin_profile: "프로필"
admin_view_site: "사이트 보기"
admin_snippets: "스니펫"
admin_not_installed: "다시 해보세요"
admin_off: "끄기"
admin_on: "켜기"
admin_add: "추가"
admin_entry_attributes: "Entry Attributes"
admin_fieldset_for_template: "Fieldset for template"
admin_content: "Content"
admin_create_new_entry: "Create New Entry"
admin_date: "Date"
admin_draft: "Draft"
admin_edit: "Edit"
admin_blocks: "Blocks"
admin_media: "Media"
admin_settings: "Settings"
admin_templates: "Templates"
admin_entry: "Entry"
admin_fieldset: "Fieldset"
admin_source: "Source"
admin_upload: "Upload"
admin_hidden: "Hidden"
admin_image_preview: "Image preview"
admin_move: "Move"
admin_content: "콘텐츠"
admin_create_new_entry: "새 항목 만들기"
admin_date: "날짜"
admin_draft: "임시보관함"
admin_edit: "편집"
admin_blocks: "블록"
admin_media: "신문 보도"
admin_settings: "설정"
admin_templates: "템플릿"
admin_entry: "진입점"
admin_fieldset: "항목세트"
admin_source: "소스"
admin_upload: "올리기"
admin_hidden: "아이콘 숨김"
admin_image_preview: "이미지 미리보기"
admin_move: "움직이기"
admin_parent_entry: "Entry parent"
admin_preview: "Preview"
admin_preview: "미리 보기"
admin_publish: "Publish"
admin_rename: "Rename"
admin_save_entry: "Save entry"
@@ -90,28 +90,28 @@ admin_general: "General"
admin_error_404_page: "Error 404 page"
admin_cache: "Cache"
admin_author_email: "Author email"
admin_author_name: "Author name"
admin_author_name: "저작자"
admin_site_description: "Site description"
admin_site_keywords: "Site keywords"
admin_site_robots: "Robots"
admin_site_title: "Site title"
admin_system: "System"
admin_cache_driver: "Cache driver"
admin_site_robots: "로봇"
admin_site_title: "사이트 제목:"
admin_system: "시스템"
admin_cache_driver: "캐시 드라이버"
admin_cache_enabled: "Cache enabled"
admin_cache_lifetime: "Cache lifetime"
admin_cache_prefix: "Cache prefix"
admin_charset: "Charset"
admin_date_format: "Date format"
admin_cache_lifetime: "케쉬 지속기간"
admin_cache_prefix: "경칭"
admin_charset: "문자코드"
admin_date_format: "날짜 형식"
admin_date_display_format: "Display date format"
admin_errors_display: "Display errors"
admin_locale: "Locale"
admin_errors_display: "오류 표시"
admin_locale: "로케일"
admin_entry_main: "Main entry"
admin_theme: "Theme"
admin_timezone: "Timezone"
admin_username: "Username"
admin_create_user: "Create User"
admin_create_new_user: "Create New User"
admin_web_server: "Web Server"
admin_theme: "테마 바꾸기"
admin_timezone: "시간대"
admin_username: "사용자이름"
admin_create_user: "사용자 만들기"
admin_create_new_user: "사용자 새로만들기"
admin_web_server: "2U 웹서버"
admin_web_server_php_interface: "WebServer to PHP Interface"
admin_create_new_category: "Create New Category"
admin_delete_category: "Delete Category"

View File

@@ -32,7 +32,7 @@ admin_add: "Добавить"
admin_entry_attributes: "Атрибуты Записи"
admin_fieldset_for_template: "Набор полей для шаблона"
admin_content: "Контент"
admin_create_new_entry: "Создать Новую Запись"
admin_create_new_entry: "Создать новую запись"
admin_date: "Дата"
admin_draft: "Черновик"
admin_edit: "Редактировать"
@@ -64,7 +64,7 @@ admin_php_version: "PHP Версия"
admin_author_url: "Ссылка Автора"
admin_bugs: "Баги"
admin_description: "Описание"
admin_get_more_plugins: "Скачать Новые Плагины"
admin_get_more_plugins: "Скачать новые плагины"
admin_homepage: "Домашняя страничка"
admin_info: "Информация"
admin_license: "Лицензия"

View File

@@ -101,7 +101,7 @@ admin_cache_enabled: "Кеш включений"
admin_cache_lifetime: "Тривалість зберігання кешу"
admin_cache_prefix: "Кеш префікс"
admin_charset: "Кодування"
admin_date_format: "Date format"
admin_date_format: "Формат дати"
admin_date_display_format: "Display date format"
admin_errors_display: "Відображати помилки"
admin_locale: "Мова"

View File

@@ -8,7 +8,7 @@
<meta name="author" content="">
<meta name="robots" content="noindex,nofollow">
{{ emitter.emit('onAdminThemeMeta') }}
{% do emitter.emit('onAdminThemeMeta') %}
<title>FLEXTYPE</title>
@@ -58,7 +58,7 @@
}
</style>
{{ emitter.emit('onAdminThemeHeader') }}
{% do emitter.emit('onAdminThemeHeader') %}
{% endblock %}
</head>
<body {% if not is_logged %} class="content-full-size" {% endif %}>
@@ -227,7 +227,7 @@
</div>
</div>
{{ emitter.emit('onAdminThemeFooter') }}
{% do emitter.emit('onAdminThemeFooter') %}
{% if registry.settings.locale == 'en_US' %}
{% set locale = 'en' %}

View File

@@ -19,14 +19,14 @@
{% if key == registry.settings.theme %}
<a class="btn btn-default" href="javascript:;">{{ tr('admin_active_theme') }}</a>
{% else %}
<a class="btn btn-default" href="javascript:;"
onclick="event.preventDefault();
document.getElementById('activate-theme-id-{{ key }}').submit();">{{ tr('admin_activate') }}</a>
<form id="activate-theme-id-{{ key }}" action="{{ path_for('admin.themes.activateProcess') }}" method="POST" style="display: none;">
{{ csrf() }}
<input type="hidden" name="theme-id" value="{{ key }}">
<input type="hidden" name="theme-status" value="true">
</form>
<a class="btn btn-default" href="javascript:;"
onclick="event.preventDefault();
document.getElementById('activate-theme-id-{{ key }}').submit();">{{ tr('admin_activate') }}</a>
{% endif %}
<button type="button" class="btn btn-default dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="sr-only">Toggle Dropdown</span>

View File

@@ -41,7 +41,7 @@ class SiteController extends Controller
$uri = $args['uri'];
// Is JSON Format
$is_json = ($query['format'] && $query['format'] == 'json') ? true : false;
$is_json = (isset($query['format']) && $query['format'] == 'json') ? true : false;
// If uri is empty then it is main page else use entry uri
if ($uri === '/') {

View File

@@ -9,7 +9,7 @@
<meta name="robots" content="{% if entry.robots %}{{ entry.robots }}{% else %}{{ registry.settings.robots }}{% endif %}">
<meta name="generator" content="Powered by Flextype {{ FLEXTYPE_VERSION }}" />
{{ emitter.emit('onThemeMeta') }}
{% do emitter.emit('onThemeMeta') %}
<title>{% if entry.title %}{{ entry.title|e('html') }} | {% endif %}{{ registry.settings.title|e('html') }}</title>
@@ -23,7 +23,7 @@
{% endfor %}
{% endfor %}
{{ emitter.emit('onThemeHeader') }}
{% do emitter.emit('onThemeHeader') %}
{{ snippets.exec('google-analytics')|raw }}
{% endblock %}
</head>
@@ -88,6 +88,6 @@
}
</script>
{{ emitter.emit('onThemeTail') }}
{% do emitter.emit('onThemeTail') %}
</body>
</html>