Пример #1
0
 function enable_nav_item($bp_gtm)
 {
     global $bp;
     if (is_user_logged_in() && ($bp_gtm['groups'] == 'all' || $bp_gtm['groups'][$bp->groups->current_group->id] == 'on') && bp_gtm_check_access('project_view')) {
         return true;
     } else {
         return false;
     }
 }
Пример #2
0
 function init()
 {
     global $bp;
     $bp_gtm = get_option('bp_gtm');
     //        var_dump($bp_gtm);die;
     if (bp_gtm_check_access('involved_roles') && ($bp_gtm['groups'] == 'all' || array_key_exists($bp->groups->current_group->id, $bp_gtm['groups']))) {
         add_action('bp_directory_involved_actions', array($this, 'role_extra_button'));
     }
     add_action('wp_footer', array($this, 'role_popup'));
     add_action('wp_print_scripts', array($this, 'show_role_js'));
 }
Пример #3
0
}
?>
        </p>
    </div>
</div>

    <?php 
if ($bp_gtm_group_settings['discuss'] == 'on' && bp_gtm_check_access('discuss_view')) {
    ?>
    <ul id="topic-post-list" class="item-list discussions">
        <?php 
    bp_gtm_discussion_list($project[0]->id, 'project', $avatar);
    ?>

    <?php 
    if (bp_gtm_check_access('discuss_create')) {
        ?>
            <div id="post-topic-reply">
                <p id="post-reply"></p>

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

                <h4 class="reply"><?php 
        _e('Add a reply:', 'bp_gtm');
        ?>
</h4>

                <textarea name="discuss_text" id="discuss_text"></textarea>
Пример #4
0
    echo $bp_gtm_group_settings['discuss'] == 'on' ? 'checked="checked" ' : ' ';
    ?>
/>
            <?php 
    _e('Enable tasks and projects discussion (disabling it will make impossible to discuss any tasks or projects).', 'bp_gtm');
    ?>
        </label>
    </div>


<?php 
}
?>
    
<?php 
if (bp_gtm_check_access('settings_edit_roles')) {
    // here will be the code for adding/deleting/editing group own roles
}
?>
    
<?php 
do_action('bp_gtm_after_settings');
?>

<p>&nbsp;</p>

<input type="submit" value="<?php 
_e('Save Changes', 'bp_gtm');
?>
 &rarr;" id="save" name="saveSettings" />
Пример #5
0
<?php

$tags = BP_GTM_Taxon::get_terms_in_group($bp->groups->current_group->id, 'tag');
$cats = BP_GTM_Taxon::get_terms_in_group($bp->groups->current_group->id, 'cat');
?>
<h4><?php 
_e('Tags and Categories', 'bp_gtm');
?>
 
    <?php 
if (bp_gtm_check_access('taxon_create')) {
    ?>
        &rarr; <a class="button" id="open" href="#"><?php 
    _e('Create new', 'bp_gtm');
    ?>
</a>
    </h4>
    <div id="toggler" class="add-new12">
        <div id="box">
            <p>
                <label for="term_name"><?php 
    _e('New term name', 'bp_gtm');
    ?>
</label>
                <input name="term_name" type="text" value="" id="term_name" />
            </p>
            <p>
                <label for="term_taxon"><?php 
    _e('What\'s this?', 'bp_gtm');
    ?>
</label>
Пример #6
0
function bp_gtm_done_link($type, $elem_id, $el_type = false)
{
    if (!empty($_GET['filter']) && $_GET['filter'] == 'done') {
        if (bp_gtm_check_access($el_type . '_undone')) {
            echo "<a class='undone_me' id='{$elem_id}' href='#' title='" . __('Mark as pending', 'bp_gtm') . "'><img height='16' width='16' src='" . plugins_url("_inc/images/undone.png", __FILE__) . "' alt='" . __('Undone', 'bp_gtm') . "' /></a>";
        }
    } else {
        if (bp_gtm_check_access($el_type . '_done')) {
            echo "<a class='done_me' id='{$elem_id}' href='#' title='" . __('Mark as completed', 'bp_gtm') . "'><img height='16' width='16' src='" . plugins_url("_inc/images/done.png", __FILE__) . "' alt='" . __('Done', 'bp_gtm') . "' /></a>";
        }
    }
}
Пример #7
0
<?php

$options = bp_gtm_project_list_settings();
do_action('bp_gtm_delete_view_notification', $bp->loggedin_user->id, $ids = 'none', $option['action']);
if (bp_gtm_check_access('project_create')) {
    bp_gtm_create_button($gtm_link, 'project');
}
?>
<h4><?php 
echo $options['page_h4'];
?>
</h4>


<div class="group-navi">
    <div class="pagination no-ajax">
        <div id="post-count" class="pag-count">
            <p><?php 
_e('List of projects in this group. Use links in the right to filter them.', 'bp_gtm');
?>
</p>
        </div>

        <div id="projects-filter">
                <?php 
_e('Filter: ', 'bp_gtm');
?>
            <a <?php 
if (!empty($options['alpha_style'])) {
    echo $options['alpha_style'];
}
Пример #8
0
        echo bp_core_get_userlink($file->owner_id);
        ?>
                    </td>
                    <td>
                        <?php 
        bp_gtm_get_upload_target($file, $gtm_link);
        ?>
                    </td>
                    <td>
                        <?php 
        echo date_i18n(get_option('date_format'), $file->date_uploaded);
        ?>
                    </td>
                    <td id="file" class="td-freshness">
                            <?php 
        if (bp_gtm_check_access('files_delete')) {
            ?>
                            <a class="delete_me" id="<?php 
            echo $file->id;
            ?>
" href="#"><img height='16' width='16' src="<?php 
            echo GTM_URL;
            ?>
_inc/images/delete.png" alt="<?php 
            _e('Delete', 'bp_gtm');
            ?>
" /></a>
                            <?php 
        }
        ?>
                    </td>
Пример #9
0
/**
 * Get link with description with description in title
 * @param object $parent_task 
 */
function bp_gtm_get_parent_task_link($parent_task, $gtm_link)
{
    //       var_dump($parent_task);
    //       var_dump($parent_task[0]);
    if (bp_gtm_check_access('task_view')) {
        return '<a class="topic-title parent-task-link" href="' . $gtm_link . 'tasks/view/' . $parent_task[0]->id . '" 
                        title="' . trim(strip_tags($parent_task[0]->desc)) . '">' . $parent_task[0]->name . '</a>';
    }
    return false;
}
Пример #10
0
   <li><?php 
echo sprintf(_n('%s tag', '%s tags', $count['tags'], 'bp_gtm'), $count['tags']);
?>
</li>
   <li><?php 
echo sprintf(_n('%s category', '%s categories', $count['cats'], 'bp_gtm'), $count['cats']);
?>
</li>
</ul>

<p><?php 
_e('Later you will have the ability to create new projects/tasks/tags/categories if site administrator doesn\'t disable GTM System for this group.', 'bp_gtm');
?>
</p>

<?php 
if (bp_gtm_check_access('delete_all')) {
    ?>
    <input type="hidden" name="cur_group" value="<?php 
    echo $bp->groups->current_group->id;
    ?>
"/>
    <p><input type="submit" name="deleteAll" value="<?php 
    _e('Delete everything', 'bp_gtm');
    ?>
"/></p>
     <?php 
    wp_nonce_field('bp_gtm_delete');
    ?>
 <?php 
}
Пример #11
0
     if (bp_is_gtm_screen('terms') && $bp->action_variables[1] == 'view' && bp_gtm_check_access('taxon_view')) {
         include dirname(__FILE__) . '/terms/term_view.php';
     } else {
         if (bp_is_gtm_screen('involved') && empty($bp->action_variables[1]) && bp_gtm_check_access('involved_view')) {
             include dirname(__FILE__) . '/involved/involved_list.php';
         } else {
             if (bp_is_gtm_screen('discuss') && empty($bp->action_variables[1]) && $bp_gtm_group_settings['discuss'] == 'on' && bp_gtm_check_access('discuss_view')) {
                 include dirname(__FILE__) . '/discuss.php';
             } else {
                 if (bp_is_gtm_screen('files') && !$bp->action_variables[1]) {
                     include dirname(__FILE__) . '/files.php';
                 } else {
                     if (bp_is_gtm_screen('settings') && bp_gtm_check_access('settings_view')) {
                         include dirname(__FILE__) . '/settings.php';
                     } else {
                         if (bp_is_gtm_screen('delete') && bp_gtm_check_access('delete_all')) {
                             include dirname(__FILE__) . '/delete.php';
                         } else {
                             if (bp_is_gtm_screen('api')) {
                                 include dirname(__FILE__) . '/api.php';
                             } else {
                                 _e('<h4>Error 404</h4>', 'bp_gtm');
                                 _e('<p>No such page exists in GTM System or you don\'t have enough rights to access it.</p>', 'bp_gtm');
                             }
                         }
                     }
                 }
             }
         }
     }
 }