/**
 * Echoes the output of bp_docs_get_group_doc_permalink()
 *
 * @since 1.0-beta
 */
function bp_docs_group_doc_permalink()
{
    echo bp_docs_get_group_doc_permalink();
}
/**
 * Echo the History header tab.
 *
 * This is hooked to bp_docs_header_tabs, so that it only loads if the History addon is
 * enabled.
 *
 * @package BuddyPress Docs
 * @since 1.1.4
 */
function bp_docs_history_tab()
{
    if (bp_docs_current_user_can('view_history')) {
        ?>
		<li<?php 
        if ('history' == bp_docs_current_view()) {
            ?>
 class="current"<?php 
        }
        ?>
>	
			<a href="<?php 
        echo bp_docs_get_group_doc_permalink() . '/' . BP_DOCS_HISTORY_SLUG;
        ?>
"><?php 
        _e('History', 'bp-docs');
        ?>
</a> 
		</li>
	<?php 
    }
}
    ?>
</a> 
			</li>
			
			<?php 
    if (bp_docs_current_user_can('edit')) {
        ?>
				<li<?php 
        if ('edit' == bp_docs_current_view()) {
            ?>
 class="current"<?php 
        }
        ?>
>	
					<a href="<?php 
        echo bp_docs_get_group_doc_permalink() . '/' . BP_DOCS_EDIT_SLUG;
        ?>
"><?php 
        _e('Edit', 'bp-docs');
        ?>
</a> 
				</li>
			<?php 
    }
    ?>
			
			<?php 
    do_action('bp_docs_header_tabs');
    ?>
		</ul>
	</div>
/**
 * Outputs the links that appear under each Doc in the Doc listing
 *
 * @package BuddyPress Docs
 */
function bp_docs_doc_action_links()
{
    $links = array();
    $links[] = '<a href="' . bp_docs_get_group_doc_permalink() . '">' . __('Read', 'bp-docs') . '</a>';
    if (bp_docs_user_can('edit', bp_loggedin_user_id())) {
        $links[] = '<a href="' . bp_docs_get_group_doc_permalink() . '/' . BP_DOCS_EDIT_SLUG . '">' . __('Edit', 'bp-docs') . '</a>';
    }
    if (bp_docs_user_can('view_history', bp_loggedin_user_id())) {
        $links[] = '<a href="' . bp_docs_get_group_doc_permalink() . '/' . BP_DOCS_HISTORY_SLUG . '">' . __('History', 'bp-docs') . '</a>';
    }
    echo implode(' &#124; ', $links);
}