Permalink
Browse files

[com_fields] Moving dd tag from field JLayout to fields JLayout (#15013)

* Moving <dd> from field JLayout to fields JLayout

* Remove no longer used $class
  • Loading branch information...
Bakual authored and rdeutz committed Apr 18, 2017
1 parent b0d83f6 commit 72bbc90750ef79beac1543ce877f0f7081af6c08
Showing with 15 additions and 25 deletions.
  1. +3 −8 components/com_fields/layouts/field/render.php
  2. +12 −17 components/com_fields/layouts/fields/render.php
@@ -16,19 +16,14 @@
$field = $displayData['field'];
$label = JText::_($field->label);
$value = $field->value;
$class = $field->params->get('render_class');
$showlabel = $field->params->get('showlabel');
if ($value == '')
{
return;
}
?>

<dd class="field-entry <?php echo $class; ?>">
<?php if ($showlabel == 1) : ?>
<?php if ($showlabel == 1) : ?>
<span class="field-label"><?php echo htmlentities($label, ENT_QUOTES | ENT_IGNORE, 'UTF-8'); ?>: </span>
<?php endif; ?>
<span class="field-value"><?php echo $value; ?></span>
</dd>
<?php endif; ?>
<span class="field-value"><?php echo $value; ?></span>
@@ -48,21 +48,16 @@
{
return;
}
// Print the container tag
echo '<dl class="fields-container">';
// Loop through the fields and print them
foreach ($fields as $field)
{
// If the value is empty do nothing
if (!isset($field->value) || $field->value == '')
{
?>
<dl class="fields-container">
<?php foreach ($fields as $field) : ?>
<?php // If the value is empty do nothing
if (!isset($field->value) or $field->value == '') :
continue;
}
echo FieldsHelper::render($context, 'field.render', array('field' => $field));
}
// Close the container
echo '</dl>';
endif; ?>
<?php $class = $field->params->get('render_class'); ?>
<dd class="field-entry <?php echo $class; ?>">
<?php echo FieldsHelper::render($context, 'field.render', array('field' => $field)); ?>
</dd>
<?php endforeach; ?>
</dl>

0 comments on commit 72bbc90

Please sign in to comment.