Skip to content

Commit

Permalink
Revert develop
Browse files Browse the repository at this point in the history
  • Loading branch information
doishub authored and zoglo committed Jan 5, 2024
1 parent c3d52b1 commit 9af44fe
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 64 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ The recommendation list can display published (and verified) recommendations fro
</tr>
<tr>
<td>Meta fields</td>
<td>Here you can select meta fields to display <br><br><i>(Additional data utilizes the *addAdditionalRecommendationData* Hook and includes data from other plugins.)</i></td>
<td>Here you can select meta fields to display</td>
</tr>
<tr>
<td>Recommendation template</td>
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
},
"extra": {
"branch-alias": {
"dev-main": "1.5.x-dev"
"dev-main": "1.4.x-dev"
},
"contao-manager-plugin": "Oveleon\\ContaoRecommendationBundle\\ContaoManager\\Plugin"
},
Expand Down
2 changes: 1 addition & 1 deletion contao/dca/tl_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
'default' => ['date', 'author'],
'exclude' => true,
'inputType' => 'checkbox',
'options' => ['image', 'date', 'author', 'rating', 'location', 'customField', 'additionalData'],
'options' => ['image', 'date', 'author', 'rating', 'location', 'customField'],
'reference' => &$GLOBALS['TL_LANG']['tl_recommendation'],
'eval' => ['multiple'=>true],
'sql' => "varchar(255) NOT NULL default ''"
Expand Down
8 changes: 0 additions & 8 deletions contao/languages/de/tl_recommendation.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,6 @@
<source>Here you can add additional text that should be displayed within the recommendation.</source>
<target>Hier können Sie einen zusätzlichen Text hinzufügen, der in der Bewertung angezeigt werden soll.</target>
</trans-unit>
<trans-unit id="tl_recommendation.additionalData.0">
<source>Additional data</source>
<target>Weitere Daten</target>
</trans-unit>
<trans-unit id="tl_recommendation.additionalData.1">
<source>This option can be used to display data from other plugins.</source>
<target>Diese Option kann verwendet werden, um Daten aus anderen Plugins anzuzeigen.</target>
</trans-unit>
<trans-unit id="tl_recommendation.teaser.0">
<source>Recommendation teaser</source>
<target>Teasertext</target>
Expand Down
6 changes: 0 additions & 6 deletions contao/languages/en/tl_recommendation.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@
<trans-unit id="tl_recommendation.customField.1">
<source>Here you can add additional text that should be displayed within the recommendation.</source>
</trans-unit>
<trans-unit id="tl_recommendation.additionalData.0">
<source>Additional data</source>
</trans-unit>
<trans-unit id="tl_recommendation.additionalData.1">
<source>This option can be used to display data from other plugins.</source>
</trans-unit>
<trans-unit id="tl_recommendation.teaser.0">
<source>Recommendation teaser</source>
</trans-unit>
Expand Down
23 changes: 0 additions & 23 deletions contao/modules/ModuleRecommendation.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,25 +120,6 @@ protected function parseRecommendation(RecommendationModel $objRecommendation, R
// Parsing image meta field to template for backwards compatibility // Works for recommendation_default.html5
$objTemplate->addRecommendationImage = array_key_exists('image', $arrMeta);

// Add extra information that can be parsed with class and value
$additionalData = [];

// HOOK: add custom logic
if (
isset($arrMeta['additionalData']) &&
isset($GLOBALS['TL_HOOKS']['addAdditionalRecommendationData']) &&
\is_array($GLOBALS['TL_HOOKS']['addAdditionalRecommendationData'])
)
{
foreach ($GLOBALS['TL_HOOKS']['addAdditionalRecommendationData'] as $callback)
{
$this->import($callback[0]);
$this->{$callback[0]}->{$callback[1]}($objTemplate, $objRecommendation->row(), $additionalData, $this);
}
}

$objTemplate->recommendationAdditional = $additionalData;

$container = System::getContainer();

// Add an image
Expand Down Expand Up @@ -244,10 +225,6 @@ protected function getMetaFields(RecommendationModel $objRecommendation): array
$return['image'] = true;
break;

case 'additionalData':
$return['additionalData'] = true;
break;

default:
$return[ $field ] = $objRecommendation->{$field};
}
Expand Down
8 changes: 0 additions & 8 deletions contao/templates/recommendation/recommendation_default.html5
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,6 @@
<?php endif; ?>
</div>

<?php if ($recommendationProps = $this->recommendationAdditional): ?>
<div class="additional">
<?php foreach ($recommendationProps as $prop): ?>
<div class="<?=$prop['class']?>"><?=$prop['value']?></div>
<?php endforeach; ?>
</div>
<?php endif; ?>

<?php if ($this->allowRedirect): ?>
<p class="more"><?= $this->more ?></p>
<?php endif; ?>
Expand Down
8 changes: 0 additions & 8 deletions contao/templates/recommendation/recommendation_full.html5
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,4 @@
<?= $this->text ?>
</div>

<?php if ($recommendationProps = $this->recommendationAdditional): ?>
<div class="additional">
<?php foreach ($recommendationProps as $prop): ?>
<div class="<?=$prop['class']?>"><?=$prop['value']?></div>
<?php endforeach; ?>
</div>
<?php endif; ?>

</div>
8 changes: 0 additions & 8 deletions contao/templates/recommendation/recommendation_latest.html5
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,6 @@
<?php endif; ?>
</div>

<?php if ($recommendationProps = $this->recommendationAdditional): ?>
<div class="additional">
<?php foreach ($recommendationProps as $prop): ?>
<div class="<?=$prop['class']?>"><?=$prop['value']?></div>
<?php endforeach; ?>
</div>
<?php endif; ?>

<?php if ($this->allowRedirect): ?>
<p class="more"><?= $this->more ?></p>
<?php endif; ?>
Expand Down

0 comments on commit 9af44fe

Please sign in to comment.