Skip to content

Commit

Permalink
fix(bazar-list-dynamic/video): remove
Browse files Browse the repository at this point in the history
  • Loading branch information
J9rem authored and mrflos committed Apr 26, 2024
1 parent 4766f71 commit 7e49c24
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 235 deletions.
73 changes: 0 additions & 73 deletions docs/actions/bazarliste.yaml
Expand Up @@ -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)
5 changes: 0 additions & 5 deletions docs/actions/lang/actionsbuilder_en.inc.php
Expand Up @@ -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",
Expand Down
5 changes: 0 additions & 5 deletions docs/actions/lang/actionsbuilder_fr.inc.php
Expand Up @@ -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.",
Expand Down
5 changes: 0 additions & 5 deletions docs/actions/lang/actionsbuilder_pt.inc.php
Expand Up @@ -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.",
Expand Down
34 changes: 17 additions & 17 deletions tools/bazar/actions/BazarListeAction.php
Expand Up @@ -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.<br />Il doit être de la forme icon="nomIcone1=valeur1, nomIcone2=valeur2"<br/>('.$th->getMessage().')');
throw new Exception('action bazarliste : le paramètre icon est mal rempli.<br />Il doit être de la forme icon="nomIcone1=valeur1, nomIcone2=valeur2"<br/>(' . $th->getMessage() . ')');
}
} else {
$icon = $this->params->get('baz_marker_icon');
Expand All @@ -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.<br />Il doit être de la forme color="couleur1=valeur1, couleur2=valeur2"<br/>('.$th->getMessage().')');
throw new Exception('action bazarliste : le paramètre color est mal rempli.<br />Il doit être de la forme color="couleur1=valeur1, couleur2=valeur2"<br/>(' . $th->getMessage() . ')');
}
} else {
$color = $this->params->get('baz_marker_color');
Expand All @@ -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') {
Expand Down Expand Up @@ -293,7 +293,7 @@ private function renderEntries($entries, $filters = []): string
}

$data['fiches'] = $entries;
$data['info_res'] = $showNumEntries ? '<div class="alert alert-info">'._t('BAZ_IL_Y_A').' '.count($data['fiches']).' '.(count($data['fiches']) <= 1 ? _t('BAZ_FICHE') : _t('BAZ_FICHES')).'</div>' : '';
$data['info_res'] = $showNumEntries ? '<div class="alert alert-info">' . _t('BAZ_IL_Y_A') . ' ' . count($data['fiches']) . ' ' . (count($data['fiches']) <= 1 ? _t('BAZ_FICHE') : _t('BAZ_FICHES')) . '</div>' : '';
$data['param'] = $this->arguments;
$data['pager_links'] = '';
$data['filters'] = $filters; // in case some template need it, like gogocarto
Expand All @@ -320,13 +320,13 @@ private function renderEntries($entries, $filters = []): string
'closeSession' => false,
]);
$data['fiches'] = $pager->getPageData();
$data['pager_links'] = '<div class="bazar_numero text-center"><ul class="pagination">'.$pager->links.'</ul></div>';
$data['pager_links'] = '<div class="bazar_numero text-center"><ul class="pagination">' . $pager->links . '</ul></div>';
}

try {
return $this->render("@bazar/{$templateName}", $data);
} catch (TemplateNotFound $e) {
return '<div class="alert alert-danger">'.$e->getMessage().'</div>';
return '<div class="alert alert-danger">' . $e->getMessage() . '</div>';
}
}

Expand Down Expand Up @@ -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] ?? '',
Expand Down
7 changes: 0 additions & 7 deletions tools/bazar/presentation/styles/card.css
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
123 changes: 0 additions & 123 deletions tools/bazar/templates/entries/index-dynamic-templates/video.twig

This file was deleted.

0 comments on commit 7e49c24

Please sign in to comment.