<?php
/**
 * Custom Template for Event Loop
 * based on Standart Templates
 * Base Template
 */

$_eventstatus = eventstatus(
                            jes_bp_get_event_edtsd(),
                            jes_bp_get_event_edtsth(),
                            jes_bp_get_event_edtstm(),
                            jes_bp_get_event_edted(),
                            jes_bp_get_event_edteth(),
                            jes_bp_get_event_edtetm()
                            );
?>
<li>
    <div class="item-avatar" id="jes-avatar">
        <a href="<?php jes_bp_event_permalink() ?>">
            <?php jes_bp_event_avatar( 'type=thumb&width='.$jes_adata['jes_events_show_avatar_directory_size'].'&height='.$jes_adata['jes_events_show_avatar_directory_size'] ) ?>
        </a>
    </div>

    <div class="item" id="jes-item">
        
        <div class="item-title" id="jes-title">
            <a href="<?php jes_bp_event_permalink() ?>">
                <?php jes_bp_event_name() ?>
            </a>
        </div>
        
        <div class="item-meta">
            <?php
            echo $_eventstatus;
            ?>
            
            <div class="item-desc" id="jes-timedate">
                <?php _e('Ini: ', 'buddypress') ?>
                <span class="meta">
                    <?php jes_bp_event_edtsd() ?>, <?php jes_bp_event_edtsth() ?>:<?php jes_bp_event_edtstm() ?>
                </span>
                <br />
                <?php _e('Fin: ', 'buddypress') ?>
                <span>
                    <?php jes_bp_event_edted() ?>, <?php jes_bp_event_edteth() ?>:<?php jes_bp_event_edtetm() ?>
                </span>
            </div>
        </div>
        
        <?php do_action( 'bp_directory_events_item' ) ?>
        
    </div>
    
    <div class="action" id="jes-button">
        
        <?php bp_event_join_button(); ?>
        
        <div class="meta" id="jes-approval">
            <?php
            if ( $shiftcan ) { ?>
                <span class="meta"><?php _e('Event requires approval!', 'buddypress'); ?></span>
            <?php
            }
            ?>
            
        </div>
        
        <?php do_action( 'bp_directory_events_actions' ) ?>
    </div>
</li>