コード例 #1
0
ファイル: functions.php プロジェクト: samoakley/labtheme
/**
 * Replacement for bp_docs_tabs()
 *
 * Outputs the tabs at the top of the Docs view (All Docs, New Doc, etc)
 *
 * At the moment, the group-specific stuff is hard coded in here.
 * @todo Get the group stuff out
 */
function newwriting_bp_docs_tabs($show_create_button = true)
{
    $current_view = '';
    ?>

	<ul id="bp-docs-all-docs">

		<?php 
    if (is_user_logged_in()) {
        ?>

			<?php 
        if (function_exists('bp_is_group') && bp_is_group()) {
            ?>

				<li<?php 
            if (bp_is_current_action('docs')) {
                ?>
 class="current"<?php 
            }
            ?>
><a href="<?php 
            bp_group_permalink(groups_get_current_group());
            bp_docs_slug();
            ?>
"><?php 
            printf(__("Assignments in %s", 'bp-docs'), bp_get_current_group_name());
            ?>
</a></li>

				<?php 
            if ($show_create_button) {
                ?>
					<?php 
                bp_docs_create_button();
                ?>
				<?php 
            }
            ?>

			<?php 
        } else {
            ?>

				<li><a href="<?php 
            bp_docs_mydocs_started_link();
            ?>
"><?php 
            _e('Started By Me', 'bp-docs');
            ?>
</a></li>
				<li><a href="<?php 
            bp_docs_mydocs_edited_link();
            ?>
"><?php 
            _e('Edited By Me', 'bp-docs');
            ?>
</a></li>

				<?php 
            if (bp_is_active('groups')) {
                ?>
					<li<?php 
                if (bp_docs_is_mygroups_docs()) {
                    ?>
 class="current"<?php 
                }
                ?>
><a href="<?php 
                bp_docs_mygroups_link();
                ?>
"><?php 
                _e('My Groups', 'bp-docs');
                ?>
</a></li>
				<?php 
            }
            ?>

			<?php 
        }
        ?>

		<?php 
    }
    ?>

	</ul>
	<?php 
}
コード例 #2
0
/**
 * Puts a Create A Doc button on the members nav of member doc lists
 *
 * @since 1.2.1
 */
function bp_docs_member_create_button()
{
    if (bp_docs_is_docs_component()) {
        ?>
		<?php 
        bp_docs_create_button();
        ?>
	<?php 
    }
}
コード例 #3
0
ファイル: templatetags.php プロジェクト: hscale/webento
/**
 * Puts a Create A Doc button on the members nav of member doc lists
 *
 * @since 1.2.1
 */
function bp_docs_member_create_button()
{
    if (bp_docs_is_docs_component()) {
        bp_docs_create_button();
    }
}