<?php echo $this->render_table_name($mode); ?>
<div class="xcrud-top-actions mdl-grid">
    <?php if ($this->is_next_previous): ?>
        <div class='btn-group mdl-button--raised' role='group'>
            <?php echo $this->render_previous('Previous', 'edit', '', 'mdl-button mdl-js-button mdl-button--raised mdl-button--primary', '', 'edit'); ?>
            <?php echo $this->details_counter(); ?>
            <?php echo $this->render_next('Next', 'edit', '', 'mdl-button mdl-js-button mdl-button--raised mdl-button--primary', '', 'edit'); ?>
        </div>
        <br><br>
    <?php endif; ?>
</div>

<div class="xcrud-top-actions mdl-grid">   
    <?php 
        echo $this->render_button('save_return', 'save', 'list', 'mdl-button mdl-js-button mdl-button--raised mdl-button--primary', '', 'create,edit');
        echo $this->render_button('save_new', 'save', 'create', 'mdl-button mdl-js-button mdl-button--raised mdl-button--primary', '', 'create,edit');
        echo $this->render_button('save_edit', 'save', 'edit', 'mdl-button mdl-js-button mdl-button--raised mdl-button--primary', '', 'create,edit');
        echo $this->render_button('return', 'list', '', 'mdl-button mdl-js-button mdl-button--raised mdl-button--accent');
    ?>
</div>

<form data-parsley-validate='' class="parsley-form">
    <div class="xcrud-view">
        <?php echo $mode == 'view' ? $this->render_fields_list($mode, array('tag' => 'table', 'class' => 'mdl-data-table mdl-js-data-table')) : $this->render_fields_list($mode, 'div', 'div', 'label', 'div'); ?>
    </div>
</form>

<div class="xcrud-nav mdl-grid">
    <?php echo $this->render_benchmark(); ?>
</div>

<?php if ($this->parsley_active): ?>
    <?php include("xcrud_parsley.php"); ?>
<?php endif; ?>

<?php if ($this->bulk_image_upload_active): ?>
    <?php include "bulk_image_upload.php"; ?>
<?php endif; ?>
