<?php get_header() ?>

    <?php locate_template( array( 'leftsidebar.php' ), true ) ?>

    <div id="content">

        <div id="iron-encabezado-container">
            <h2 class="iron-encabezado-seccion"><?php echo __('Hitos','buddypress'); ?></h2>
            <ul class="iron-encabezado-ul">
                <li class="iron-encabezado-li">
                <a href="<?php echo site_url(); ?>/achievements" title="<?php _e( 'Volver al listado', 'buddypress' ) ?>"><?php _e( 'Volver al listado', 'buddypress' ) ?></a>
                </li>
            </ul>
        </div>

        <div class="padder">
        
            <div id="content-top"></div>
                 
                 <div id="content-middle" style="padding: 5px 0 0 15px;">
                 
            <?php if ( dpa_has_achievements( 'skip_detail_page_result=0') ) : while ( dpa_achievements() ) : dpa_the_achievement(); ?>

            <?php do_action( 'dpa_before_achievement_home_content' ) ?>

            <div id="item-header">
                <?php dpa_load_template( array( 'achievements/single/achievement-header.php' ) ) ?>
            </div><!-- #item-header -->

            <div id="item-nav">
                <div class="item-list-tabs no-ajax" id="object-nav">
						<ul>
							<?php /*<li <?php if (dpa_is_achievement_activity_page()) { echo ' class="current selected"'; } ?>><a href="<?php dpa_achievement_slug_permalink() ?>/home">Detalles</a></li>*/ ?>
							<li <?php if (dpa_is_achievement_unlocked_by_page()) { echo ' class="current selected"'; } ?>><a href="<?php dpa_achievement_slug_permalink() ?>/unlocked-by"><?php _e ('Usuarios', 'buddypress'); ?></a></li>

							<?php
							if (current_user_can ('manage_options')) { ?>
								<li <?php if (dpa_is_achievement_grant_page()) { echo ' class="current selected"'; } ?>><a href="<?php dpa_achievement_slug_permalink() ?>give"><?php _e ('Conceder', 'buddypress'); ?></a></li>
								<li <?php if (dpa_is_achievement_change_picture_page()) { echo ' class="current selected"'; } ?>><a href="<?php dpa_achievement_slug_permalink() ?>change-picture"><?php _e ('Imagen', 'buddypress'); ?></a></li>
								<li <?php if (dpa_is_achievement_edit_page()) { echo ' class="current selected"'; } ?>><a href="<?php dpa_achievement_slug_permalink() ?>edit"><?php _e ('Editar', 'buddypress'); ?></a></li>
								<li <?php if (dpa_is_achievement_delete_page()) { echo ' class="current selected"'; } ?>><a href="<?php dpa_achievement_slug_permalink() ?>delete"><?php _e ('Eliminar', 'buddypress'); ?></a></li>
								<?php }
							?>
						<?php ?>
						</ul>
					</div>
            </div><!-- #item-nav -->

            <div id="item-body">
                <?php do_action( 'dpa_before_achievement_home_body' ) ?>

                <?php if ( dpa_is_achievement_change_picture_page() ) : ?>
                    <?php dpa_load_template( array( 'achievements/single/change-picture.php' ) ) ?>

                <?php elseif ( dpa_is_achievement_unlocked_by_page() ) : ?>
                    <?php dpa_load_template( array( 'achievements/single/unlocked-by.php' ) ) ?>

                <?php elseif ( dpa_is_achievement_delete_page() ) : ?>
                    <?php dpa_load_template( array( 'achievements/single/delete.php' ) ) ?>

                <?php elseif ( dpa_is_achievement_edit_page() ) : ?>
                    <?php dpa_load_template( array( 'achievements/single/edit.php' ) ) ?>

                <?php elseif ( dpa_is_achievement_grant_page() ) : ?>
                    <?php dpa_load_template( array( 'achievements/single/grant.php' ) ) ?>
                <?php endif; ?>

                <?php do_action( 'dpa_after_achievement_home_body' ) ?>
            </div><!-- #item-body -->

            <?php do_action( 'dpa_after_achievement_home_content' ) ?>

            <?php endwhile; endif; ?>
            
                </div><!-- content-middle -->
            
            <div id="content-bottom"></div>
            
        </div><!-- .padder -->
    </div><!-- #content -->

    <?php get_sidebar( 'buddypress' ) ?>

<?php get_footer( 'buddypress' ) ?>