Files
roi-theme/wp-content/plugins/wp-database-tools/admin/partials/sections/wp-database-tools-section-details.php
root a22573bf0b Commit inicial - WordPress Análisis de Precios Unitarios
- WordPress core y plugins
- Tema Twenty Twenty-Four configurado
- Plugin allow-unfiltered-html.php simplificado
- .gitignore configurado para excluir wp-config.php y uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 21:04:30 -06:00

136 lines
4.2 KiB
PHP
Executable File

<?php
$table_titles = $this->database->get_table_titles( $data['table'] );
?>
<div id="list-display" class="details">
<!-- SEARCH-->
<?php require plugin_dir_path( __DIR__ ) . 'components/list/wp-database-tools-component-list-search.php'; ?>
<div class="mt-10">
<!-- BULK ACTIONS -->
<?php require plugin_dir_path( __DIR__ ) . 'components/wp-database-tools-admin-component-bulk-actions.php'; ?>
<div class="d-flex-between">
<!-- BULK ACTIONS SELECTIONS-->
<?php require plugin_dir_path( __DIR__ ) . 'components/wp-database-tools-admin-component-bulk-actions-selectors.php'; ?>
<div class="d-flex-between">
<!-- SELECT PAGINATION -->
<?php require plugin_dir_path( __DIR__ ) . 'components/wp-database-tools-admin-component-pagination-select.php'; ?>
</div>
</div>
</div>
<!-- HEADER TABLE -->
<div class="d-flex-between bg-light-blue-color-x2 px-20">
<?php foreach ( $table_titles as $key => $title ) : ?>
<?php
$class = ( $key == ( count( $table_titles ) - 1 ) ) ? 'text-align-right' : 'text-align-left'
?>
<?php if ( $key == 0 ) : ?>
<div class="w-60p d-flex-start align-items-center">
<input id="check-typebox-all" class="m-0" type="checkbox" onchange="checkAll(this)">
<p class="m-0 ml-10 font-bold mr-10"><?php echo $title; ?></p>
</div>
<?php else : ?>
<p class="w-100p mr-10 <?php echo $class; ?>"><?php echo $title; ?></p>
<?php endif; ?>
<?php endforeach ?>
</div>
<!-- NOT RESULTS -->
<div id="container_list_not_found" style="display: none;">
<?php require plugin_dir_path( __DIR__ ) . 'components/wp-database-tools-admin-component-not-found.php'; ?>
</div>
<!-- LOADER -->
<div id="container_list_loader">
<?php require plugin_dir_path( __DIR__ ) . 'components/wp-database-tools-admin-component-loader.php'; ?>
</div>
<!-- LIST -->
<div id="container_list_display" style="display: none;">
<ul class="list m-0">
<?php if ( count( $data['data'] ) == 0 ) : ?>
<li class="d-flex-between px-20 bb-solid">
</li>
<?php endif; ?>
<?php foreach ( $data['data'] as $index => $row ) : ?>
<?php
$info_tables = $this->database->get_info_tables( $data['table'], $row );
?>
<li class="d-flex-between px-20 bb-solid">
<?php foreach ( $info_tables as $key => $value ) : ?>
<?php if ( $key == 'id' ) : ?>
<div class="w-60p d-flex-start align-items-center">
<input id="cb-select-all-1" class="m-0 check-elements" type="checkbox" data-key="<?php echo $index; ?>" data-check="false" onchange="checkSelected(this)">
<p class="m-0 ml-10 id"><?php echo $value; ?></p>
</div>
<?php else : ?>
<?php
$value = esc_attr( wp_strip_all_tags( $value ) );
// Prepare content
if ( strlen( $value ) > 20 && ( $key == 'content' || $key == 'meta-value' || $key == 'option-value' ) ) {
$span_element = '<span class="tooltiptext value">' . $value . '</span>';
$image = '<img width="15px" src="' . WPDBT_ADMIN_URL . 'img/icon-information.svg">';
$content = $image . substr( $value, 0, 20 ) . '...' . $span_element;
} else {
$content = $value;
}
?>
<?php
$key = str_contains( $key, 'name' ) ? 'name' : $key;
$key = ( $key == 'title' ) ? 'name' : $key;
?>
<p class="w-100p text-align-left tooltip extract break-word mr-10 <?php echo $key; ?>"><?php echo $content; ?></p>
<?php endif; ?>
<?php endforeach ?>
<div class="d-flex-end align-items-left w-100p">
<var class="key d-none" data-key="<?php echo $index; ?>"></var>
<var class="is-days d-none" data-isdays="no"></var>
<button onclick="showModal(this)" data-label="<?php echo __( 'Remove', $this->plugin_name ); ?>" data-individual="yes" data-modal="delete" class="tooltip b-none bg-none p-0">
<span class="tooltiptext small">
<?php echo __( 'Remove', $this->plugin_name ); ?>
</span>
<img src="<?php echo $settings_page['admin_url']; ?>img/icon-delete.svg">
</button>
</div>
</li>
<?php endforeach ?>
</ul>
<!-- PAGINATION -->
<?php require plugin_dir_path( __DIR__ ) . 'components/wp-database-tools-admin-component-pagination.php'; ?>
</div>
</div>