}
?>

		<span class="activity"><?php 
printf(_n('Only %s person has unlocked this Achievement', '%s people have unlocked this Achievement', bp_core_number_format(dpa_get_achievement_unlocked_count()), 'dpa'), bp_core_number_format(dpa_get_achievement_unlocked_count()));
?>
</span>
	</p>

	<?php 
do_action('dpa_before_achievement_header_meta');
?>

	<div id="item-meta">
		<?php 
dpa_achievement_description_excerpt();
?>

		<div id="item-buttons">
			<?php 
do_action('dpa_achievement_header_actions');
?>
		</div><!-- #item-buttons -->

		<?php 
do_action('dpa_achievement_header_meta');
?>
	</div>
</div><!-- #item-header-content -->

<?php 
    /**
     * Outputs the HTML for this widget.
     *
     * @global DPA_Achievement_Template $achievements_template Achievements template tag object
     * @global object $bp BuddyPress global settings
     * @param array $args An array of standard parameters for widgets
     * @param array $instance An array of settings for this widget instance
     * @since 2.0
     */
    function widget($args, $instance)
    {
        global $achievements_template, $bp;
        extract($args, EXTR_SKIP);
        if (dpa_has_achievements(array('slug' => $instance['achievement_slug'], 'populate_extras' => false, 'type' => 'single'))) {
            echo $before_widget;
            if ($instance['title']) {
                echo $before_title;
                echo esc_html(apply_filters('dpa_widget_title', $instance['title']));
                echo $after_title;
            }
            ?>

			<?php 
            while (dpa_achievements()) {
                dpa_the_achievement();
                ?>

				<div class="item-avatar">
					<a href="<?php 
                dpa_achievement_slug_permalink();
                ?>
"><?php 
                dpa_achievement_picture();
                ?>
</a>
					<div class="item-title"><a href="<?php 
                dpa_achievement_slug_permalink();
                ?>
"><?php 
                dpa_achievement_name();
                ?>
</a></div>
					<div class="item-meta"><span class="activity"><?php 
                printf(__("%s points", 'dpa'), bp_core_number_format(dpa_get_achievement_points()));
                ?>
</span></div>

					<div class="item-desc"><?php 
                dpa_achievement_description_excerpt();
                ?>
</div>
				</div>

			<?php 
            }
            ?>

			<p class="achievements-widget-showall"><a href="<?php 
            dpa_achievement_slug_permalink();
            ?>
"><?php 
            _e('Show More', 'dpa');
            ?>
</a></p>
			<div style="clear: right;"></div>

		<?php 
            echo $after_widget;
        }
        $achievements_template = null;
    }