diff --git a/.eslintrc.js b/.eslintrc.js index e6aab1bf1..b92707670 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -24,6 +24,8 @@ module.exports = { 'class-methods-use-this': 'off', 'import/no-unresolved': 'off', 'import/extensions': ['error', 'always'], + 'import/prefer-default-export': ['off'], + 'no-use-before-define': ['off'], eqeqeq: ['error', 'smart'], 'comma-dangle': ['error', 'never'], 'object-curly-newline': ['error', { multiline: true }], @@ -32,28 +34,28 @@ module.exports = { 'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }] }, ignorePatterns: [ - "vendor/", - "!/custom", - "!/javascripts", - "javascripts/vendor", - "!/styles", - "!/tools", - "/tools/*", - "!tools/autoupdate", - "!tools/aceditor", - "!tools/attach", - "!tools/bazar", - "!tools/contact", - "!tools/helloworld", - "!tools/lang", - "!tools/login", - "!tools/progressbar", - "!tools/rss", - "!tools/security", - "!tools/syndication", - "!tools/tableau", - "!tools/tags", - "!tools/templates", - "!tools/toc" + 'vendor/', + '!/custom', + '!/javascripts', + 'javascripts/vendor', + '!/styles', + '!/tools', + '/tools/*', + '!tools/autoupdate', + '!tools/aceditor', + '!tools/attach', + '!tools/bazar', + '!tools/contact', + '!tools/helloworld', + '!tools/lang', + '!tools/login', + '!tools/progressbar', + '!tools/rss', + '!tools/security', + '!tools/syndication', + '!tools/tableau', + '!tools/tags', + '!tools/templates', + '!tools/toc' ] } diff --git a/actions/EditConfigAction.php b/actions/EditConfigAction.php index 891032fb5..729e0763f 100644 --- a/actions/EditConfigAction.php +++ b/actions/EditConfigAction.php @@ -20,6 +20,7 @@ class EditConfigAction extends YesWikiAction 'default_comment_avatar' => 'core', 'htmlPurifierActivated' => 'core', 'favorites_activated' => 'core', + 'preview_before_save' => 'core', 'default_read_acl' => 'access', 'default_write_acl' => 'access', diff --git a/actions/EditGroupsAction.php b/actions/EditGroupsAction.php index 794b181ee..0d030e844 100755 --- a/actions/EditGroupsAction.php +++ b/actions/EditGroupsAction.php @@ -1,5 +1,10 @@ wiki; - $list = $wiki->GetGroupsList(); // retrieves an array of group names from table 'triples' (content of 'resource' starts with 'ThisWikiGroup' and content of 'property' equals 'http://www.wikini.net/_vocabulary/acls') - if (!$wiki->UserIsAdmin()) { // If user not in admin group, remove admin group from the list - $list = array_diff($list, array(ADMIN_GROUP)); - } - sort($list); - // Start of group edition - $res = $wiki->FormOpen('', '', 'get', 'form-inline'); - $res .= '
'."\n".'
'."\n" . $wiki->FormClose(); - // End of group edition - // Start of group creation - $res .= $wiki->FormOpen('', '', 'get', 'form-inline') . ''; - $res .= '
' . $wiki->FormClose(); - // End of group creation - // Start of group deletion - $res .= $wiki->FormOpen('', '', 'get', 'form-inline'); - $res .= ''; - $res .= ''."\n".'
'."\n" . $wiki->FormClose(); - // End of group deletion - // End of form definition - - // Form action handling - if ($_POST && !empty($_POST['groupname']) && isset($_POST['acl'])) { // save ACL's - // The form method is 'post' - // it returns a groupname and list of users (acl), therefore - // The group has been edited - $name = $_POST['groupname']; - $newacl = $_POST['acl']; - if (strtolower($name) == ADMIN_GROUP) { - if (!$wiki->UserIsAdmin()) { - return $res . _t('ONLY_ADMINS_CAN_CHANGE_MEMBERS') .'.Href()."\">"._t('FORM_RETURN').".
"; diff --git a/actions/UsersTableAction.php b/actions/UsersTableAction.php index c97ade9ff..699130123 100644 --- a/actions/UsersTableAction.php +++ b/actions/UsersTableAction.php @@ -124,7 +124,7 @@ private function managePostActions(array $post, bool $isAdmin): ?string $userName = in_array($username, [false,null], true) ? "" : htmlspecialchars(strip_tags($userName)); try { $rawUserName = str_replace([''','''], ['\'','\''], $userName); - $this->csrfTokenController->checkToken("action\\userstable\\deleteUser\\{$rawUserName}", 'POST', 'csrf-token-delete'); + $this->csrfTokenController->checkToken('main', 'POST', 'csrf-token-delete',false); $user = $this->userManager->getOneByName($rawUserName); if (empty($user)) { return $this->render("@templates/alert-message.twig", [ diff --git a/composer.lock b/composer.lock index 5366fbc1c..fb949fcfb 100644 --- a/composer.lock +++ b/composer.lock @@ -698,16 +698,16 @@ }, { "name": "nesbot/carbon", - "version": "2.67.0", + "version": "2.68.1", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "c1001b3bc75039b07f38a79db5237c4c529e04c8" + "reference": "4f991ed2a403c85efbc4f23eb4030063fdbe01da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/c1001b3bc75039b07f38a79db5237c4c529e04c8", - "reference": "c1001b3bc75039b07f38a79db5237c4c529e04c8", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4f991ed2a403c85efbc4f23eb4030063fdbe01da", + "reference": "4f991ed2a403c85efbc4f23eb4030063fdbe01da", "shasum": "" }, "require": { @@ -796,7 +796,7 @@ "type": "tidelift" } ], - "time": "2023-05-25T22:09:47+00:00" + "time": "2023-06-20T18:29:04+00:00" }, { "name": "oomphinc/composer-installers-extender", @@ -1374,16 +1374,16 @@ }, { "name": "symfony/dependency-injection", - "version": "v5.4.24", + "version": "v5.4.25", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "4645e032d0963fb614969398ca28e47605b1a7da" + "reference": "f0410c30a6c86bbce6c719c2b5cfc343362b982e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/4645e032d0963fb614969398ca28e47605b1a7da", - "reference": "4645e032d0963fb614969398ca28e47605b1a7da", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/f0410c30a6c86bbce6c719c2b5cfc343362b982e", + "reference": "f0410c30a6c86bbce6c719c2b5cfc343362b982e", "shasum": "" }, "require": { @@ -1443,7 +1443,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v5.4.24" + "source": "https://github.com/symfony/dependency-injection/tree/v5.4.25" }, "funding": [ { @@ -1459,7 +1459,7 @@ "type": "tidelift" } ], - "time": "2023-05-05T14:42:55+00:00" + "time": "2023-06-24T09:45:28+00:00" }, { "name": "symfony/deprecation-contracts", @@ -1765,16 +1765,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.4.23", + "version": "v5.4.25", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5" + "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5", - "reference": "b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", + "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", "shasum": "" }, "require": { @@ -1809,7 +1809,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.23" + "source": "https://github.com/symfony/filesystem/tree/v5.4.25" }, "funding": [ { @@ -1825,20 +1825,20 @@ "type": "tidelift" } ], - "time": "2023-03-02T11:38:35+00:00" + "time": "2023-05-31T13:04:02+00:00" }, { "name": "symfony/http-foundation", - "version": "v5.4.24", + "version": "v5.4.25", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "3c59f97f6249ce552a44f01b93bfcbd786a954f5" + "reference": "f66be2706075c5f6325d2fe2b743a57fb5d23f6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/3c59f97f6249ce552a44f01b93bfcbd786a954f5", - "reference": "3c59f97f6249ce552a44f01b93bfcbd786a954f5", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f66be2706075c5f6325d2fe2b743a57fb5d23f6b", + "reference": "f66be2706075c5f6325d2fe2b743a57fb5d23f6b", "shasum": "" }, "require": { @@ -1885,7 +1885,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.4.24" + "source": "https://github.com/symfony/http-foundation/tree/v5.4.25" }, "funding": [ { @@ -1901,20 +1901,20 @@ "type": "tidelift" } ], - "time": "2023-05-19T07:21:23+00:00" + "time": "2023-06-22T08:06:06+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.4.24", + "version": "v5.4.25", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "f38b722e1557eb3f487d351b48f5a1279b50e9d1" + "reference": "f6c92fe64bbdad7616cb90663c24f6350f3ca464" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/f38b722e1557eb3f487d351b48f5a1279b50e9d1", - "reference": "f38b722e1557eb3f487d351b48f5a1279b50e9d1", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/f6c92fe64bbdad7616cb90663c24f6350f3ca464", + "reference": "f6c92fe64bbdad7616cb90663c24f6350f3ca464", "shasum": "" }, "require": { @@ -1997,7 +1997,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.4.24" + "source": "https://github.com/symfony/http-kernel/tree/v5.4.25" }, "funding": [ { @@ -2013,7 +2013,7 @@ "type": "tidelift" } ], - "time": "2023-05-27T08:06:30+00:00" + "time": "2023-06-26T05:58:08+00:00" }, { "name": "symfony/password-hasher", @@ -2882,16 +2882,16 @@ }, { "name": "symfony/routing", - "version": "v5.4.22", + "version": "v5.4.25", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "c2ac11eb34947999b7c38fb4c835a57306907e6d" + "reference": "56bfc1394f7011303eb2e22724f9b422d3f14649" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/c2ac11eb34947999b7c38fb4c835a57306907e6d", - "reference": "c2ac11eb34947999b7c38fb4c835a57306907e6d", + "url": "https://api.github.com/repos/symfony/routing/zipball/56bfc1394f7011303eb2e22724f9b422d3f14649", + "reference": "56bfc1394f7011303eb2e22724f9b422d3f14649", "shasum": "" }, "require": { @@ -2952,7 +2952,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v5.4.22" + "source": "https://github.com/symfony/routing/tree/v5.4.25" }, "funding": [ { @@ -2968,7 +2968,7 @@ "type": "tidelift" } ], - "time": "2023-03-14T14:59:20+00:00" + "time": "2023-06-05T14:18:47+00:00" }, { "name": "symfony/security-core", @@ -3481,16 +3481,16 @@ }, { "name": "symfony/var-dumper", - "version": "v5.4.24", + "version": "v5.4.25", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "8e12706bf9c68a2da633f23bfdc15b4dce5970b3" + "reference": "82269f73c0f0f9859ab9b6900eebacbe54954ede" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/8e12706bf9c68a2da633f23bfdc15b4dce5970b3", - "reference": "8e12706bf9c68a2da633f23bfdc15b4dce5970b3", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/82269f73c0f0f9859ab9b6900eebacbe54954ede", + "reference": "82269f73c0f0f9859ab9b6900eebacbe54954ede", "shasum": "" }, "require": { @@ -3549,7 +3549,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.4.24" + "source": "https://github.com/symfony/var-dumper/tree/v5.4.25" }, "funding": [ { @@ -3565,7 +3565,7 @@ "type": "tidelift" } ], - "time": "2023-05-25T13:05:00+00:00" + "time": "2023-06-20T20:56:26+00:00" }, { "name": "symfony/yaml", @@ -3707,16 +3707,16 @@ }, { "name": "twig/twig", - "version": "v3.6.0", + "version": "v3.6.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "106c170d08e8415d78be2d16c3d057d0d108262b" + "reference": "7e7d5839d4bec168dfeef0ac66d5c5a2edbabffd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/106c170d08e8415d78be2d16c3d057d0d108262b", - "reference": "106c170d08e8415d78be2d16c3d057d0d108262b", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/7e7d5839d4bec168dfeef0ac66d5c5a2edbabffd", + "reference": "7e7d5839d4bec168dfeef0ac66d5c5a2edbabffd", "shasum": "" }, "require": { @@ -3762,7 +3762,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.6.0" + "source": "https://github.com/twigphp/Twig/tree/v3.6.1" }, "funding": [ { @@ -3774,20 +3774,20 @@ "type": "tidelift" } ], - "time": "2023-05-03T19:06:57+00:00" + "time": "2023-06-08T12:52:13+00:00" }, { "name": "voku/anti-xss", - "version": "4.1.41", + "version": "4.1.42", "source": { "type": "git", "url": "https://github.com/voku/anti-xss.git", - "reference": "55a403436494e44a2547a8d42de68e6cad4bca1d" + "reference": "bca1f8607e55a3c5077483615cd93bd8f11bd675" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/voku/anti-xss/zipball/55a403436494e44a2547a8d42de68e6cad4bca1d", - "reference": "55a403436494e44a2547a8d42de68e6cad4bca1d", + "url": "https://api.github.com/repos/voku/anti-xss/zipball/bca1f8607e55a3c5077483615cd93bd8f11bd675", + "reference": "bca1f8607e55a3c5077483615cd93bd8f11bd675", "shasum": "" }, "require": { @@ -3833,7 +3833,7 @@ ], "support": { "issues": "https://github.com/voku/anti-xss/issues", - "source": "https://github.com/voku/anti-xss/tree/4.1.41" + "source": "https://github.com/voku/anti-xss/tree/4.1.42" }, "funding": [ { @@ -3857,7 +3857,7 @@ "type": "tidelift" } ], - "time": "2023-02-12T15:56:55+00:00" + "time": "2023-07-03T14:40:46+00:00" }, { "name": "voku/portable-ascii", @@ -4247,16 +4247,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.15.5", + "version": "v4.16.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e" + "reference": "19526a33fb561ef417e822e85f08a00db4059c17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e", - "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", + "reference": "19526a33fb561ef417e822e85f08a00db4059c17", "shasum": "" }, "require": { @@ -4297,9 +4297,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" }, - "time": "2023-05-19T20:20:00+00:00" + "time": "2023-06-25T14:52:30+00:00" }, { "name": "phar-io/manifest", @@ -4732,16 +4732,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.8", + "version": "9.6.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "17d621b3aff84d0c8b62539e269e87d8d5baa76e" + "reference": "a6d351645c3fe5a30f5e86be6577d946af65a328" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/17d621b3aff84d0c8b62539e269e87d8d5baa76e", - "reference": "17d621b3aff84d0c8b62539e269e87d8d5baa76e", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a6d351645c3fe5a30f5e86be6577d946af65a328", + "reference": "a6d351645c3fe5a30f5e86be6577d946af65a328", "shasum": "" }, "require": { @@ -4815,7 +4815,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.8" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.10" }, "funding": [ { @@ -4831,7 +4831,7 @@ "type": "tidelift" } ], - "time": "2023-05-11T05:14:45+00:00" + "time": "2023-07-10T04:04:23+00:00" }, { "name": "sebastian/cli-parser", @@ -5871,5 +5871,5 @@ "platform-overrides": { "php": "7.3.0" }, - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } diff --git a/docs/actions/bazarliste.yaml b/docs/actions/bazarliste.yaml index 4668a8533..a04d6fc0f 100644 --- a/docs/actions/bazarliste.yaml +++ b/docs/actions/bazarliste.yaml @@ -14,10 +14,10 @@ actions: label: _t(AB_bazar_commons_search_label) type: list icon: search - options: + options: 'true': _t(AB_attach_yes) 'false': _t(AB_attach_no) - dynamic: + dynamic: label: _t(AB_bazar_commons_search_label_dynamic) showif: dynamic searchfields: @@ -30,6 +30,7 @@ actions: showOnlyFor: - bazarliste - bazarcarto + - bazarmapandtable showExceptFor: - bazarcarousel dynamic: @@ -37,7 +38,9 @@ actions: showOnlyFor: - bazarliste - bazarcarto + - bazarmapandtable - bazarcalendar + - bazartableau type: checkbox advanced: true pagination: @@ -46,12 +49,13 @@ actions: type: number showExceptFor: - bazarcarto + - bazarmapandtable - bazargogocarto - bazartimeline - bazarcarousel - bazarcalendar - bazartableau - + colorfield: label: _t(AB_bazar_commons_colorfield_label) type: form-field @@ -59,6 +63,7 @@ actions: only: lists # ce champ doit être de type checkboxListe, listeListe ... showOnlyFor: - bazarcarto + - bazarmapandtable - bazargogocarto - bazarliste - bazarcalendar @@ -68,6 +73,7 @@ actions: showif: colorfield showOnlyFor: - bazarcarto + - bazarmapandtable - bazargogocarto - bazarliste - bazarcalendar @@ -88,6 +94,7 @@ actions: only: lists # ce champ doit être de type checkboxListe, listeListe ... showOnlyFor: - bazarcarto + - bazarmapandtable - bazargogocarto - bazarliste - bazarcalendar @@ -97,6 +104,7 @@ actions: showif: iconfield showOnlyFor: - bazarcarto + - bazarmapandtable - bazargogocarto - bazarliste - bazarcalendar @@ -131,6 +139,18 @@ actions: showExceptFor: - bazarcarousel - bazarcalendar + showmapinlistview: + label: _t(AB_bazar_commons2_showmapinlistview_label) + hint: _t(AB_bazar_commons2_showmapinlistview_hint) + type: checkbox + advanced: true + default: "0" + checkedvalue: "1" + uncheckedvalue: "0" + showExceptFor: + - bazarcarto + - bazarmapandtable + - bazargogocarto # ------------------------------------- # Champs Communs concernant les filtres @@ -189,7 +209,7 @@ actions: hint: _t(AB_bazar_commons2_champ_hint) doclink: https://yeswiki.net/?DocQuery type: form-field - extraFields: + extraFields: - id_typeannonce - date_creation_fiche - date_maj_fiche @@ -275,7 +295,7 @@ actions: default: bf_titre subtitle: type: form-field - extraFields: + extraFields: - owner - date_creation_fiche - date_maj_fiche @@ -283,7 +303,7 @@ actions: default: "" floating: type: form-field - extraFields: + extraFields: - owner - date_creation_fiche - date_maj_fiche @@ -291,7 +311,7 @@ actions: default: "" visual: type: form-field - extraFields: + extraFields: - owner - date_creation_fiche - date_maj_fiche @@ -314,7 +334,7 @@ actions: label: _t(AB_bazarcard_style_label) icon: paint-brush default: vertical - options: + options: vertical: _t(AB_bazarcard_style_vertical) square: _t(AB_bazarcard_style_square) horizontal: _t(AB_bazarcard_style_horizontal) @@ -351,7 +371,7 @@ actions: extraFields: owner label: _t(AB_bazarliste_displayfields_floating_label) default: "" - + advanced: type: divider label: _t(AB_advanced) @@ -446,7 +466,7 @@ actions: modal: _t(AB_bazarcarto_entrydisplay_option_modal) newtab: _t(AB_bazarcarto_entrydisplay_option_newtab) popup: _t(AB_bazarcarto_entrydisplay_option_popup) - popuptemplate: + popuptemplate: label: _t(AB_bazarcarto_popuptemplate_label) type: list value: '_map_popup_html.twig' @@ -455,7 +475,7 @@ actions: '_map_popup_html.twig': _t(AB_bazarcarto_popuptemplate_entry_from_html) '_map_popup_from_data.twig': _t(AB_bazarcarto_popuptemplate_entry_from_data) 'custom': _t(AB_bazarcarto_popuptemplate_custom) - showif: + showif: dynamic: true entrydisplay: 'popup' popupcustomtemplate: @@ -464,7 +484,7 @@ actions: value: 'custom_map_popup.twig' hint: _t(AB_bazarcarto_popupcustomtemplate_hint) advanced: true - showif: + showif: dynamic: true entrydisplay: 'popup' popuptemplate: 'custom' @@ -474,7 +494,7 @@ actions: multiple: true advanced: true default: "" - showif: + showif: dynamic: true entrydisplay: 'popup' popuptemplate: '_map_popup_html.twig|custom' @@ -484,7 +504,7 @@ actions: multiple: true advanced: true value: "bf_titre,imagebf_image" - showif: + showif: dynamic: true entrydisplay: 'popup' popuptemplate: '_map_popup_from_data.twig|custom' @@ -547,7 +567,7 @@ actions: type: list label: _t(AB_bazarcalendar_showlist_label) default: 'year' - options: + options: week: _t(AB_bazarcalendar_showlist_week) month: _t(AB_bazarcalendar_showlist_month) year: _t(AB_bazarcalendar_showlist_year) @@ -587,14 +607,14 @@ actions: subproperties: bf_date_debut_evenement: type: form-field - extraFields: + extraFields: - date_creation_fiche - date_maj_fiche label: _t(AB_bazar_bf_date_debut_evenement_label) default: "" bf_date_fin_evenement: type: form-field - extraFields: + extraFields: - date_creation_fiche - date_maj_fiche label: _t(AB_bazar_bf_date_fin_evenement_label) @@ -610,7 +630,7 @@ actions: default: advanced: true checkedvalue: "1" - uncheckedvalue: + uncheckedvalue: bazarannuaire: label: _t(AB_bazarannuaire_label) @@ -631,7 +651,7 @@ actions: subproperties: bf_date_debut_evenement: type: form-field - extraFields: + extraFields: - date_creation_fiche - date_maj_fiche label: _t(AB_bazar_bf_date_debut_evenement_label) @@ -752,7 +772,7 @@ actions: subproperties: date_creation_fiche: type: form-field - extraFields: + extraFields: - date_creation_fiche - date_maj_fiche label: _t(AB_bazarblog_date_creation_fiche_label) @@ -803,6 +823,272 @@ actions: hint: _t(AB_bazartableau_columnfieldsids_hint) multiple: true default: '' + extraFields: + - id_typeannonce + - date_creation_fiche + - date_maj_fiche + - url + columntitles: + type: text + label: _t(AB_bazartableau_columntitles_label) + hint: _t(AB_bazartableau_columntitles_hint) + default: '' + checkboxfieldsincolumns: + type: checkbox + label: _t(AB_bazartableau_checkboxfieldsincolumns_label) + default: "true" + checkedvalue: "true" + uncheckedvalue: "false" + displayimagesasthumbnails: + type: checkbox + label: _t(AB_bazartableau_displayimagesasthumbnails_label) + default: "false" + checkedvalue: "true" + uncheckedvalue: "false" + displayvaluesinsteadofkeys: + type: checkbox + label: _t(AB_bazartableau_displayvaluesinsteadofkeys_label) + default: "false" + checkedvalue: "true" + uncheckedvalue: "false" + sumfieldsids: + type: form-field + label: _t(AB_bazartableau_sumfieldsids_label) + hint: _t(AB_bazartableau_sumfieldsids_hint) + multiple: true + default: '' + displayadmincol: + type: list + label: _t(AB_bazartableau_displayadmincol_label) + hint: _t(AB_bazartableau_displayadmincol_hint) + default: '' + options: + '': _t(NO) + yes: _t(YES) + onlyadmins: _t(AB_bazartableau_displayadmincol_onlyadmins) + displaycreationdate: + type: list + label: _t(AB_bazartableau_displaycreationdate_label) + advanced: true + default: '' + options: + '': _t(NO) + yes: _t(YES) + onlyadmins: _t(AB_bazartableau_displayadmincol_onlyadmins) + displaylastchangedate: + type: list + label: _t(AB_bazartableau_displaylastchangedate_label) + advanced: true + default: '' + options: + '': _t(NO) + yes: _t(YES) + onlyadmins: _t(AB_bazartableau_displayadmincol_onlyadmins) + displayowner: + type: list + label: _t(AB_bazartableau_displayowner_label) + advanced: true + default: '' + options: + '': _t(NO) + yes: _t(YES) + onlyadmins: _t(AB_bazartableau_displayadmincol_onlyadmins) + defaultcolumnwidth: + label: _t(AB_bazartableau_defaultcolumnwidth_label) + hint: _t(AB_bazartableau_defaultcolumnwidth_hint) + type: text + advanced: true + default: '' + columnswidth: + label: _t(AB_bazartableau_columnswidth_label) + hint: _t(AB_bazartableau_columnswidth_hint) + type: columns-width + advanced: true + subproperties: + field: + label: _t(AB_bazartableau_columnswidth_field_label) + type: form-field + width: + label: _t(AB_bazartableau_columnswidth_width_label) + type: text + default: '' + exportallcolumns: + label: _t(AB_bazartableau_exportallcolumns_label) + advanced: true + type: checkbox + default: 'false' + + bazarmapandtable: + label: _t(AB_BAZAR_MAP_AND_TABLE_LABEL) + description: _t(AB_bazarcarto_description) + hint: _t(AB_bazarcarto_hint) + width: 35% + properties: + template: + value: map-and-table + provider: + label: _t(AB_bazarcarto_provider_label) + required: true + type: list + default: OpenStreetMap.Mapnik # TODO change to Stadia.OSMBright if community agrees? + options: + - OpenStreetMap.Mapnik + - OpenStreetMap.BlackAndWhite + - OpenStreetMap.DE + - OpenStreetMap.France + - OpenStreetMap.HOT + - OpenTopoMap + - Stadia.AlidadeSmooth + - Stadia.AlidadeSmoothDark + - Stadia.OSMBright + - Stamen.Toner + - Stamen.TonerBackground + - Stamen.TonerLite + - Stamen.Watercolor + - Stamen.Terrain + - Stamen.TerrainBackground + - Esri.WorldStreetMap + - Esri.DeLorme + - Esri.WorldTopoMap + - Esri.WorldImagery + - Esri.WorldTerrain + - Esri.WorldShadedRelief + - Esri.WorldPhysical + - Esri.OceanBasemap + - Esri.NatGeoWorldMap + - Esri.WorldGrayCanvas + - HERE.normalDay + - MtbMap + - CartoDB.Positron + - CartoDB.PositronNoLabels + - CartoDB.PositronOnlyLabels + - CartoDB.DarkMatter + - CartoDB.DarkMatterNoLabels + - CartoDB.DarkMatterOnlyLabels + - HikeBike.HikeBike + - HikeBike.HillShading + - BasemapAT.orthofoto + - NASAGIBS.ViirsEarthAtNight2012 + coordinates: + label: _t(AB_bazarcarto_coordinates_label) + type: geo + cluster: + label: _t(AB_bazarcarto_cluster_label) + type: checkbox + default: "false" + width: + advanced: true + label: _t(AB_bazarcarto_width_label) + hint: 500px, 100%... + type: text + default: 100% + height: + advanced: true + label: _t(AB_bazarcarto_height_label) + type: text + default: 300px + entrydisplay: + label: _t(AB_bazarcarto_entrydisplay_label) + type: list + default: sidebar + advanced: true + showif: dynamic + options: + direct: _t(AB_bazarcarto_entrydisplay_option_direct) + sidebar: _t(AB_bazarcarto_entrydisplay_option_sidebar) + modal: _t(AB_bazarcarto_entrydisplay_option_modal) + newtab: _t(AB_bazarcarto_entrydisplay_option_newtab) + popup: _t(AB_bazarcarto_entrydisplay_option_popup) + popuptemplate: + label: _t(AB_bazarcarto_popuptemplate_label) + type: list + value: '_map_popup_html.twig' + advanced: true + options: + '_map_popup_html.twig': _t(AB_bazarcarto_popuptemplate_entry_from_html) + '_map_popup_from_data.twig': _t(AB_bazarcarto_popuptemplate_entry_from_data) + 'custom': _t(AB_bazarcarto_popuptemplate_custom) + showif: + dynamic: true + entrydisplay: 'popup' + popupcustomtemplate: + label: _t(AB_bazarcarto_popupcustomtemplate_label) + type: text + value: 'custom_map_popup.twig' + hint: _t(AB_bazarcarto_popupcustomtemplate_hint) + advanced: true + showif: + dynamic: true + entrydisplay: 'popup' + popuptemplate: 'custom' + popupselectedfields: + type: form-field + label: _t(AB_bazarliste_popupselectedfields_label) + multiple: true + advanced: true + default: "" + showif: + dynamic: true + entrydisplay: 'popup' + popuptemplate: '_map_popup_html.twig|custom' + necessary_fields: + type: form-field + label: _t(AB_bazarliste_popupneededfields_label) + multiple: true + advanced: true + value: "bf_titre,imagebf_image" + showif: + dynamic: true + entrydisplay: 'popup' + popuptemplate: '_map_popup_from_data.twig|custom' + displayfields: + type: correspondance + showif: dynamic + advanced: true + subproperties: + markerhover: + type: form-field + label: _t(AB_bazarcarto_displayfields_markhover_label) + default: bf_titre + smallmarker: + advanced: true + label: _t(AB_bazarcarto_smallmarker_label) + type: checkbox + default: "0" + checkedvalue: "1" + uncheckedvalue: "0" + # spider: + # advanced: true + # label: _t(AB_bazarcarto_spider_label) + # hint: _t(AB_bazarcarto_spider_hint) + # type: checkbox + # default: "false" + # barregestion: + # advanced: true + # label: _t(AB_bazarcarto_barregestion_label) + # type: checkbox + # default: "false" + # navigation: + # advanced: true + # label: _t(AB_bazarcarto_navigation_label) + # type: checkbox + # default: "true" + zoommolette: + advanced: true + label: _t(AB_bazarcarto_zoommolette_label) + type: checkbox + default: "false" + columnfieldsids: + type: form-field + label: _t(AB_bazartableau_columnfieldsids_label) + hint: _t(AB_bazartableau_columnfieldsids_hint) + multiple: true + default: '' + extraFields: + - id_typeannonce + - date_creation_fiche + - date_maj_fiche + - url columntitles: type: text label: _t(AB_bazartableau_columntitles_label) @@ -837,7 +1123,7 @@ actions: label: _t(AB_bazartableau_displayadmincol_label) hint: _t(AB_bazartableau_displayadmincol_hint) default: '' - options: + options: '': _t(NO) yes: _t(YES) onlyadmins: _t(AB_bazartableau_displayadmincol_onlyadmins) @@ -846,7 +1132,7 @@ actions: label: _t(AB_bazartableau_displaycreationdate_label) advanced: true default: '' - options: + options: '': _t(NO) yes: _t(YES) onlyadmins: _t(AB_bazartableau_displayadmincol_onlyadmins) @@ -855,7 +1141,7 @@ actions: label: _t(AB_bazartableau_displaylastchangedate_label) advanced: true default: '' - options: + options: '': _t(NO) yes: _t(YES) onlyadmins: _t(AB_bazartableau_displayadmincol_onlyadmins) @@ -864,7 +1150,7 @@ actions: label: _t(AB_bazartableau_displayowner_label) advanced: true default: '' - options: + options: '': _t(NO) yes: _t(YES) onlyadmins: _t(AB_bazartableau_displayadmincol_onlyadmins) @@ -892,3 +1178,11 @@ actions: advanced: true type: checkbox default: 'false' + tablewith: + label: _t(AB_BAZAR_MAP_AND_TABLE_TABLEWITH_LABEL) + type: list + default: '' + options: + '': _t(AB_BAZAR_MAP_AND_TABLE_TABLEWITH_ALL) + only-geolocation : _t(AB_BAZAR_MAP_AND_TABLE_TABLEWITH_ONLY_GEOLOC) + no-geolocation: _t(AB_BAZAR_MAP_AND_TABLE_TABLEWITH_NO_GEOLOC) diff --git a/docs/actions/lang/actionsbuilder_en.inc.php b/docs/actions/lang/actionsbuilder_en.inc.php index 78263c891..d89037b35 100644 --- a/docs/actions/lang/actionsbuilder_en.inc.php +++ b/docs/actions/lang/actionsbuilder_en.inc.php @@ -120,6 +120,12 @@ // "AB_bazarcard_style_vertical" => 'Vertical', // "AB_bazarcard_style_square" => 'Carré', // "AB_bazarcard_style_horizontal" => 'Horizontal', + // BazarTable + 'AB_BAZAR_MAP_AND_TABLE_LABEL' => 'Map and table', + 'AB_BAZAR_MAP_AND_TABLE_TABLEWITH_LABEL' => 'Table with all entries', + 'AB_BAZAR_MAP_AND_TABLE_TABLEWITH_ALL' => 'with or withour geolocalization', + 'AB_BAZAR_MAP_AND_TABLE_TABLEWITH_ONLY_GEOLOC' => 'only with geolocalization', + 'AB_BAZAR_MAP_AND_TABLE_TABLEWITH_NO_GEOLOC' => 'only without geolocalization', // // BazarTrombi // "AB_bazartrombi_label" => "Trombinoscope", // "AB_bazartrombi_description" => "Les fiches seront sous forme de Trombinoscope.", diff --git a/docs/actions/lang/actionsbuilder_fr.inc.php b/docs/actions/lang/actionsbuilder_fr.inc.php index d358ab0b5..0f6149428 100644 --- a/docs/actions/lang/actionsbuilder_fr.inc.php +++ b/docs/actions/lang/actionsbuilder_fr.inc.php @@ -50,6 +50,8 @@ "AB_bazar_commons2_resetfiltersbutton_label" => "Bouton pour réinitialiser les filtres", "AB_bazar_commons2_showexportbuttons" => "Boutons d'export (CSV, JSON...)", "AB_bazar_commons2_title" => "Filtres / Facettes", + "AB_bazar_commons2_showmapinlistview_label" => "Présenter une carte associée à chaque fiche", + "AB_bazar_commons2_showmapinlistview_hint" => "Uniquement pour les fiches qui ont été géolocalisées", "AB_bazar_facettes_btn-label-add" => "Ajouter Une Facette", "AB_bazar_facettes_field_label" => "Champ", "AB_bazar_facettes_title_label" => "Titre", @@ -120,6 +122,12 @@ "AB_bazarcard_style_vertical" => 'Vertical', "AB_bazarcard_style_square" => 'Carré', "AB_bazarcard_style_horizontal" => 'Horizontal', + // BazarTable + 'AB_BAZAR_MAP_AND_TABLE_LABEL' => 'Carte et tableau', + 'AB_BAZAR_MAP_AND_TABLE_TABLEWITH_LABEL' => 'Tableau contenant toutes les fiches', + 'AB_BAZAR_MAP_AND_TABLE_TABLEWITH_ALL' => 'avec ou sans geolocalisation', + 'AB_BAZAR_MAP_AND_TABLE_TABLEWITH_ONLY_GEOLOC' => 'seulement avec geolocalisation', + 'AB_BAZAR_MAP_AND_TABLE_TABLEWITH_NO_GEOLOC' => 'seulement sans geolocalisation', // BazarTrombi "AB_bazartrombi_label" => "Trombinoscope", "AB_bazartrombi_description" => "Les fiches seront sous forme de Trombinoscope.", diff --git a/docs/actions/lang/actionsbuilder_pt.inc.php b/docs/actions/lang/actionsbuilder_pt.inc.php index 20427f803..2d84c1980 100644 --- a/docs/actions/lang/actionsbuilder_pt.inc.php +++ b/docs/actions/lang/actionsbuilder_pt.inc.php @@ -120,6 +120,12 @@ // "AB_bazarcard_style_vertical" => 'Vertical', // "AB_bazarcard_style_square" => 'Carré', // "AB_bazarcard_style_horizontal" => 'Horizontal', + // BazarTable + // 'AB_BAZAR_MAP_AND_TABLE_LABEL' => 'Carte et tableau', + // 'AB_BAZAR_MAP_AND_TABLE_TABLEWITH_LABEL' => 'Tableau contenant toutes les fiches', + // 'AB_BAZAR_MAP_AND_TABLE_TABLEWITH_ALL' => 'avec ou sans geolocalisation', + // 'AB_BAZAR_MAP_AND_TABLE_TABLEWITH_ONLY_GEOLOC' => 'seulement avec geolocalisation', + // 'AB_BAZAR_MAP_AND_TABLE_TABLEWITH_NO_GEOLOC' => 'seulement sans geolocalisation', // BazarTrombi // "AB_bazartrombi_label" => "Trombinoscope", // "AB_bazartrombi_description" => "Les fiches seront sous forme de Trombinoscope.", diff --git a/docs/code/csrf.md b/docs/code/csrf.md index e686811a7..c7fbcc248 100644 --- a/docs/code/csrf.md +++ b/docs/code/csrf.md @@ -61,6 +61,10 @@ Previous token will be considered as invalid after calling `refreshToken`. ## Rules to name 'tokenId' +In most case, we use `main` as tokenId and does not `GET` request with `token`. + +### Previous rules + We propose the following rule to name token and avoid trouble between methods. `