diff --git a/docs/actions/bazarliste.yaml b/docs/actions/bazarliste.yaml index 7d5b1c57d..902010cf9 100644 --- a/docs/actions/bazarliste.yaml +++ b/docs/actions/bazarliste.yaml @@ -1198,76 +1198,3 @@ actions: '': _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) - - bazarvideo: - label: _t(AB_bazarvideo_action_label) - width: 35% - properties: - template: - value: 'video' - nbcol: - label: _t(AB_bazarmaterialcard_nbcol_label) - type: number - value: 3 - icon: columns - style: - type: list - label: _t(AB_bazarcard_style_label) - icon: paint-brush - default: vertical - options: - vertical: _t(AB_bazarcard_style_vertical) - square: _t(AB_bazarcard_style_square) - horizontal: _t(AB_bazarcard_style_horizontal) - div: - type: divider - label: _t(AB_bazarliste_displayfields_title) - displayfields: - type: correspondance - subproperties: - urlfieldname: - type: form-field - label: _t(AB_bazarvideo_action_link_fieldname_label) - value: bf_url - imagefieldname: - type: form-field - label: _t(AB_bazarvideo_displayfields_imagefieldname_label) - default: "" - hint: _t(AB_bazarvideo_displayfields_imagefieldname_hint) - title: - type: form-field - label: _t(AB_bazarliste_displayfields_title_label) - value: bf_titre - subtitle: - type: form-field - extraFields: owner - label: _t(AB_bazarliste_displayfields_subtitle_label) - default: "" - text: - type: form-field - label: _t(AB_bazarliste_displayfields_text_label) - default: "" - footer: - type: form-field - extraFields: owner - label: _t(AB_bazarliste_displayfields_footer_label) - default: "" - floating: - type: form-field - extraFields: owner - label: _t(AB_bazarliste_displayfields_floating_label) - default: "" - - advanced: - type: divider - label: _t(AB_advanced) - advanced: true - entrydisplay: - label: _t(AB_bazarcarto_entrydisplay_label) - type: list - default: modal - advanced: true - options: - direct: _t(AB_bazarcarto_entrydisplay_option_direct) - newtab: _t(AB_bazarcarto_entrydisplay_option_newtab) - modal: _t(AB_bazarcarto_entrydisplay_option_modal) diff --git a/docs/actions/lang/actionsbuilder_en.inc.php b/docs/actions/lang/actionsbuilder_en.inc.php index 6090485d2..fbcc974c2 100644 --- a/docs/actions/lang/actionsbuilder_en.inc.php +++ b/docs/actions/lang/actionsbuilder_en.inc.php @@ -203,11 +203,6 @@ // "Pensez aussi à choisir un champ pour l'icone et la couleur des marqueurs", // "AB_bazargogocarto_height_label" => "Hauteur de la carte", // "AB_bazargogocarto_width_label" => "Largeur de la carte", - // bazarvideo - 'AB_bazarvideo_action_label' => 'Display videos in blocks', - 'AB_bazarvideo_action_link_fieldname_label' => 'Link field', - 'AB_bazarvideo_displayfields_imagefieldname_hint' => 'Optional, field replace video frame by an image', - 'AB_bazarvideo_displayfields_imagefieldname_label' => 'Image field', // BazarAction "AB_bazar_action_label" => "Display a form to create an entry", "AB_bazar_action_description" => "Help to display a form to create an entry", diff --git a/docs/actions/lang/actionsbuilder_fr.inc.php b/docs/actions/lang/actionsbuilder_fr.inc.php index b024d46ba..9f4f75fad 100644 --- a/docs/actions/lang/actionsbuilder_fr.inc.php +++ b/docs/actions/lang/actionsbuilder_fr.inc.php @@ -206,11 +206,6 @@ "Pensez aussi à choisir un champ pour l'icone et la couleur des marqueurs", "AB_bazargogocarto_height_label" => "Hauteur de la carte", "AB_bazargogocarto_width_label" => "Largeur de la carte", - // bazarvideo - 'AB_bazarvideo_action_label' => 'Affichage des vidéos par bloc', - 'AB_bazarvideo_action_link_fieldname_label' => 'Champ lien', - 'AB_bazarvideo_displayfields_imagefieldname_hint' => 'Facultatif, champ pour remplacer la vignette d\'incrustation vidéo par une image', - 'AB_bazarvideo_displayfields_imagefieldname_label' => 'Champ image', // BazarAction "AB_bazar_action_label" => "Afficher un formulaire de création de fiche", "AB_bazar_action_description" => "Permet d'afficher le formulaire pour créer une fiche.", diff --git a/docs/actions/lang/actionsbuilder_pt.inc.php b/docs/actions/lang/actionsbuilder_pt.inc.php index 9c8c228fe..d6551de1d 100644 --- a/docs/actions/lang/actionsbuilder_pt.inc.php +++ b/docs/actions/lang/actionsbuilder_pt.inc.php @@ -199,11 +199,6 @@ // "Pensez aussi à choisir un champ pour l'icone et la couleur des marqueurs", // "AB_bazargogocarto_height_label" => "Hauteur de la carte", // "AB_bazargogocarto_width_label" => "Largeur de la carte", - // bazarvideo - // 'AB_bazarvideo_action_label' => 'Affichage des vidéos par bloc', - // 'AB_bazarvideo_action_link_fieldname_label' => 'Champ lien', - 'AB_bazarvideo_displayfields_imagefieldname_hint' => 'Facultatif, champ pour remplacer la vignette d\'incrustation vidéo par une image', - 'AB_bazarvideo_displayfields_imagefieldname_label' => 'Champ image', // BazarAction "AB_bazar_action_label" => "Exibir um formulário de criação de arquivo", "AB_bazar_action_description" => "Usado para exibir o formulário para criar um arquivo.", diff --git a/tools/bazar/actions/BazarListeAction.php b/tools/bazar/actions/BazarListeAction.php index 1ce445ef1..1edc40931 100755 --- a/tools/bazar/actions/BazarListeAction.php +++ b/tools/bazar/actions/BazarListeAction.php @@ -40,7 +40,7 @@ public function formatArguments($arg) $icon = trim(array_values($tabparam)[0]); } } catch (ParsingMultipleException $th) { - throw new Exception('action bazarliste : le paramètre icon est mal rempli.
Il doit être de la forme icon="nomIcone1=valeur1, nomIcone2=valeur2"
('.$th->getMessage().')'); + throw new Exception('action bazarliste : le paramètre icon est mal rempli.
Il doit être de la forme icon="nomIcone1=valeur1, nomIcone2=valeur2"
(' . $th->getMessage() . ')'); } } else { $icon = $this->params->get('baz_marker_icon'); @@ -67,7 +67,7 @@ public function formatArguments($arg) $color = trim(array_values($tabparam)[0]); } } catch (ParsingMultipleException $th) { - throw new Exception('action bazarliste : le paramètre color est mal rempli.
Il doit être de la forme color="couleur1=valeur1, couleur2=valeur2"
('.$th->getMessage().')'); + throw new Exception('action bazarliste : le paramètre color est mal rempli.
Il doit être de la forme color="couleur1=valeur1, couleur2=valeur2"
(' . $th->getMessage() . ')'); } } else { $color = $this->params->get('baz_marker_color'); @@ -91,7 +91,7 @@ public function formatArguments($arg) } } - if (in_array($template, ['list', 'card','map-and-table','table','video'])) { + if (in_array($template, ['list', 'card','map-and-table','table'])) { $dynamic = true; } if ($dynamic && $template == 'liste_accordeon') { @@ -293,7 +293,7 @@ private function renderEntries($entries, $filters = []): string } $data['fiches'] = $entries; - $data['info_res'] = $showNumEntries ? '
'._t('BAZ_IL_Y_A').' '.count($data['fiches']).' '.(count($data['fiches']) <= 1 ? _t('BAZ_FICHE') : _t('BAZ_FICHES')).'
' : ''; + $data['info_res'] = $showNumEntries ? '
' . _t('BAZ_IL_Y_A') . ' ' . count($data['fiches']) . ' ' . (count($data['fiches']) <= 1 ? _t('BAZ_FICHE') : _t('BAZ_FICHES')) . '
' : ''; $data['param'] = $this->arguments; $data['pager_links'] = ''; $data['filters'] = $filters; // in case some template need it, like gogocarto @@ -320,13 +320,13 @@ private function renderEntries($entries, $filters = []): string 'closeSession' => false, ]); $data['fiches'] = $pager->getPageData(); - $data['pager_links'] = '
'; + $data['pager_links'] = '
'; } try { return $this->render("@bazar/{$templateName}", $data); } catch (TemplateNotFound $e) { - return '
'.$e->getMessage().'
'; + return '
' . $e->getMessage() . '
'; } } @@ -390,18 +390,18 @@ private function getExternalUrlsFromIds(?string $ids) // external ids $externalIds = []; if (!is_null($ids) && preg_match_all('/(?:' - .'(' // begin url capturing - .'(?:(?:https?):\/\/)' // http or https protocol - .'(?:\S+(?::\S*)?@|\d{1,3}(?:\.\d{1,3}){3}|(?:(?:[a-z\d\x{00a1}-\x{ffff}]+-?)*[a-z\d\x{00a1}-\x{ffff}]+)' // long part to catch url - .'(?:\.(?:[a-z\d\x{00a1}-\x{ffff}]+-?)*[a-z\d\x{00a1}-\x{ffff}]+)*(?:\.[a-z\x{00a1}-\x{ffff}]{2,6})' - .'|(?:localhost))' // or localhost - .'(?::\d+)?' // optionnal port - .'(?:[^\s^,^|]*)?)' - .'\|' // following by a '|' + . '(' // begin url capturing + . '(?:(?:https?):\/\/)' // http or https protocol + . '(?:\S+(?::\S*)?@|\d{1,3}(?:\.\d{1,3}){3}|(?:(?:[a-z\d\x{00a1}-\x{ffff}]+-?)*[a-z\d\x{00a1}-\x{ffff}]+)' // long part to catch url + . '(?:\.(?:[a-z\d\x{00a1}-\x{ffff}]+-?)*[a-z\d\x{00a1}-\x{ffff}]+)*(?:\.[a-z\x{00a1}-\x{ffff}]{2,6})' + . '|(?:localhost))' // or localhost + . '(?::\d+)?' // optionnal port + . '(?:[^\s^,^|]*)?)' + . '\|' // following by a '|' . ')?' // 0 or 1 time - capturing - .'([0-9]+)' // and a number - .'(?:->([0-9]+))?' // optionnaly following by '->' and a number - .'/u', $ids, $matches)) { + . '([0-9]+)' // and a number + . '(?:->([0-9]+))?' // optionnaly following by '->' and a number + . '/u', $ids, $matches)) { foreach ($matches[0] as $index => $match) { $externalIds[] = [ 'url' => $matches[1][$index] ?? '', diff --git a/tools/bazar/presentation/styles/card.css b/tools/bazar/presentation/styles/card.css index 551ed5b71..17f0338e7 100644 --- a/tools/bazar/presentation/styles/card.css +++ b/tools/bazar/presentation/styles/card.css @@ -132,9 +132,6 @@ a.bazar-card { border: 1px solid #ebebeb; background-color: var(--neutral-light-color);; } -.style-vertical .bazar-card.bazar-video { - padding: 0.5rem; -} .style-vertical .bazar-card .visual-area { margin: -1.5rem; margin-bottom: 1.5rem; @@ -143,10 +140,6 @@ a.bazar-card { border-bottom: 1px solid #ebebeb; object-fit: cover; } -.style-vertical .bazar-card.bazar-video .visual-area { - margin: -0.5rem; - margin-bottom: 0.5rem; -} .style-vertical .bazar-card .footer-area { margin: -1.5rem; margin-top: 1rem; diff --git a/tools/bazar/templates/entries/index-dynamic-templates/video.twig b/tools/bazar/templates/entries/index-dynamic-templates/video.twig deleted file mode 100644 index 9e729d77c..000000000 --- a/tools/bazar/templates/entries/index-dynamic-templates/video.twig +++ /dev/null @@ -1,123 +0,0 @@ -{% extends "@bazar/entries/index-dynamic.twig" %} - -{% block assets %} - {{ include_css('tools/bazar/presentation/styles/card.css') }} -{% endblock %} - -{% block display_entries %} - {% set nbcol = params.nbcol %} - {% set isModal = (params.entrydisplay == 'modal' or params.entrydisplay is empty or params.entrydisplay not in ['modal','direct','newtab']) %} - {% set isLink = isModal or (params.entrydisplay == 'direct') %} - {# Restrict number of columns for horizontal card #} - {% if nbcol > 2 and params.displayfields.visual and params.style == "horizontal" %} - {% set nbcol = 2 %} - {{ include('@templates/alert-message.twig',{type:'info',message:_t('BAZ_CARD_NBCOL_TOO_HIGH')}) }} - {% endif %} - {% set imWidth = (nbcol == 4) ? 250 : (nbcol == 5 ? 200 : 300 ) %} - {% set imHeight = params.style == "square" ? imWidth : (params.style == "horizontal" ? imWidth*23//27 : imWidth*2//3 ) %} - {% set firstTokenFit = csrfToken("POST api/images/cache/#{imWidth}/#{imHeight}/fit") %} -
- -
- {{ _t('BAZ_NO_RESULT') }} -
- - {% if isLink %} - - {# VISUAL AREA #} - - -
- {# TITLE AREA #} -

- - - -

- - {# SUBTITLE AREA #} - - - {# TEXT AREA #} - - - {# FOOTER AREA #} - - - {# FLOATING AREA #} - -
- {% if isLink %}{% else %}
{% endif %} - - - - -{% endblock %}