GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
templates
entries
entries/table.php
Go to the documentation of this file.
1
<?php
2
/**
3
* Display a single entry when using a table template
4
*
5
* @global \GV\Template_Context $gravityview
6
*/
7
8
if
( ! isset( $gravityview ) || empty( $gravityview->template ) ) {
9
gravityview
()->log->error(
'{file} template loaded without context'
, array(
'file'
=> __FILE__ ) );
10
return
;
11
}
12
13
\GV\Mocks\Legacy_Context::push
( array(
'view'
=> $gravityview->view ) );
14
15
gravityview_before
( $gravityview );
16
17
?><?php
if
(
$link
=
gravityview_back_link
( $gravityview ) ) { ?><p
class
=
"gv-back-link"
><?php echo
$link
; ?></p><?php } ?>
18
19
<div
class
=
"<?php gv_container_class( 'gv-table-view gv-table-container gv-table-single-container', true, $gravityview ); ?>"
>
20
<table
class
=
"gv-table-view-content"
>
21
<?php
if
( $gravityview->fields->by_position(
'single_table-columns'
)->by_visible( $gravityview->view )->count() ): ?>
22
<thead>
23
<?php
gravityview_header
( $gravityview ); ?>
24
</thead>
25
<tbody>
26
<?php
27
$gravityview->template->the_entry();
28
?>
29
</tbody>
30
<tfoot>
31
<?php
gravityview_footer
( $gravityview ); ?>
32
</tfoot>
33
<?php
endif
; ?>
34
</table>
35
</div><?php
36
37
gravityview_after
( $gravityview );
38
39
\GV\Mocks\Legacy_Context::pop
();
gravityview_after
gravityview_after()
Definition:
class-api.php:1274
gravityview_footer
gravityview_footer()
Definition:
class-api.php:1245
$link
if( $add_query_args) $link
Definition:
field-entry_link-html.php:52
gravityview_back_link
gravityview_back_link( $context=null)
Generate HTML for the back link from single entry view.
Definition:
class-api.php:953
GV\Mocks\Legacy_Context\pop
static pop()
Restores last saved state and context.
Definition:
_mocks.php:410
GV\Mocks\Legacy_Context\push
static push( $configuration)
Set the state depending on the provided configuration.
Definition:
_mocks.php:400
gravityview_header
gravityview_header()
Definition:
class-api.php:1216
endif
endif
Definition:
entries/table.php:33
gravityview
gravityview()
The main GravityView wrapper function.
Definition:
future/gravityview.php:26
gravityview_before
gravityview_before()
Definition:
class-api.php:1187