Skip to content

Commit

Permalink
leere Zeile in Artikelliste anzeigen (#3764)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbaddade committed Jun 24, 2020
1 parent 1b569dc commit a4906f9
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions redaxo/src/addons/structure/pages/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,14 +382,9 @@
<th class="rex-table-action" colspan="3">' . rex_i18n::msg('header_status') . '</th>
</tr>
</thead>
<tbody>
';

// tbody nur anzeigen, wenn später auch inhalt drinnen stehen wird
if ($sql->getRows() > 0 || 'add_art' == $structureContext->getFunction()) {
$echo .= '<tbody>
';
}

$canEdit = rex::getUser()->hasPerm('editArticle[]');
$canDelete = rex::getUser()->hasPerm('deleteArticle[]');
$colspan = (int) $canEdit + (int) $canDelete + 1;
Expand All @@ -413,6 +408,16 @@
<td class="rex-table-action" colspan="'.$colspan.'">'.rex_api_article_add::getHiddenFields().'<button class="btn btn-save" type="submit" name="artadd_function"' . rex::getAccesskey(rex_i18n::msg('article_add'), 'save') . '>' . rex_i18n::msg('article_add') . '</button></td>
</tr>
';
} elseif (0 === $sql->getRows()) {
$echo .= '<tr>
<td>&nbsp;</td>
<td></td>
<td></td>
'.('' !== $tmpl_head ? '<td></td>' : '').'
<td></td>
<td></td>
<td colspan="'.$colspan.'"></td>
</tr>';
}

// --------------------- ARTIKEL LIST
Expand Down Expand Up @@ -546,14 +551,7 @@
$sql->next();
}

// tbody nur anzeigen, wenn später auch inhalt drinnen stehen wird
if ($sql->getRows() > 0 || 'add_art' == $structureContext->getFunction()) {
$echo .= '
</tbody>';
}

$echo .= '
</table>';
$echo .= '</tbody></table>';

if ('add_art' == $structureContext->getFunction() || 'edit_art' == $structureContext->getFunction()) {
$echo .= '
Expand Down

0 comments on commit a4906f9

Please sign in to comment.