Skip to content

Commit

Permalink
Show search bar when hiding data until search is performed
Browse files Browse the repository at this point in the history
  • Loading branch information
doekenorg committed Jan 22, 2025
1 parent 1cc5307 commit ff48567
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 18 deletions.
4 changes: 4 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Beautifully display your Gravity Forms entries. Learn more on [gravitykit.com](h

== Changelog ==

= develop =

* Fixed: The Search Bar would not always be visible on Views with the Layout Builder.

= 2.34 on January 9, 2025 =

This release introduces the [Layout Builder](https://www.gravitykit.com/announcing-gravityview-2-34-all-new-layout-builder) that allows creating custom layouts with rows and columns directly in the View editor, adds support for exporting entries by Approval Status, and includes various fixes and improvements.
Expand Down
39 changes: 21 additions & 18 deletions templates/views/gravityview-layout-builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@
gravityview_before( $gravityview );

gravityview_header( $gravityview );

?>
<div class="<?php echo esc_attr( gv_container_class( 'gv-layout-builder-container', false, $gravityview ) ); ?>"
<?php
// There are no entries.
if ( ! $gravityview->entries->count() ) {
?>
<div class="gv-layout-builder-view gv-no-results">
<div class="gv-layout-builder-view-title">
<h3><?php echo gv_no_results( true, $gravityview ); ?></h3>
</div>
</div>
<div class="gv-layout-builder-view gv-no-results">
<div class="gv-layout-builder-view-title">
<h3><?php echo gv_no_results( true, $gravityview ); ?></h3>
</div>
</div>
<?php
} else {
$zone = 'directory';
Expand All @@ -35,14 +37,14 @@
// There are entries. Loop through them.
foreach ( $gravityview->entries->all() as $entry ) {
?>
<div class="gv-layout-builder-view gv-layout-builder-view--entry gv-grid">
<div class="gv-layout-builder-view gv-layout-builder-view--entry gv-grid">
<?php foreach ( $rows as $row ) { ?>
<div class="gv-grid-row">
<div class="gv-grid-row">
<?php
foreach ( $row as $col => $areas ) {
$column = $col;
?>
<div class="gv-grid-col-<?php echo esc_attr( $column ); ?>">
<div class="gv-grid-col-<?php echo esc_attr( $column ); ?>">
<?php
if ( ! empty( $areas ) ) {
foreach ( $areas as $area ) {
Expand All @@ -52,15 +54,17 @@
}
}
?>
</div>
</div>
<?php } // $row ?>
</div>
</div>
<?php } // $rows ?>
</div>
</div>
<?php
}
}

?>
</div>
<?php
gravityview_footer( $gravityview );

gravityview_after( $gravityview );
Expand All @@ -71,14 +75,13 @@
*
* @since 2.15
*
* @param string $wrapper_container Wrapper container HTML markup
* @param string $anchor_id (optional) Unique anchor ID to identify the view.
* @param \GV\View $view The View.
* @param string $wrapper_container Wrapper container HTML markup
* @param string $anchor_id (optional) Unique anchor ID to identify the view.
* @param \GV\View $view The View.
*/
$class = gv_container_class( 'gv-layout-builder-container', false, $gravityview );
$wrapper_container = apply_filters(
'gravityview/view/wrapper_container',
'<div id="' . esc_attr( $gravityview->view->get_anchor_id() ) . '" class="' . esc_attr( $class ) . '">{content}</div>',
'<div id="' . esc_attr( $gravityview->view->get_anchor_id() ) . '">{content}</div>',
$gravityview->view->get_anchor_id(),
$gravityview->view
);
Expand Down

0 comments on commit ff48567

Please sign in to comment.