コード例 #1
0
    echo cpm_url_user($message->post_author, true, 32);
    ?>
</span>
            </td>
            <td class="message">
                <a href="<?php 
    echo cpm_url_single_message($project_id, $message->ID);
    ?>
">
                    <span class="title"><?php 
    echo cpm_excerpt($message->post_title, 50);
    ?>
</span>
                    <?php 
    if ($message->post_content) {
        printf('<span class="excerpt"> - %s</span>', cpm_excerpt($message->post_content, 100));
    }
    ?>
                </a>
            </td>
            <td class="date"><span><?php 
    echo date_i18n('j M, Y', strtotime($message->post_date));
    ?>
</span></td>
            <td class="comment-count"><span><?php 
    echo cpm_get_number($message->comment_count);
    ?>
</span></td>
            <td class="cpm-actions">
                <?php 
    if ($message->post_author == get_current_user_id() || $pro_obj->has_admin_rights()) {
コード例 #2
0
ファイル: index.php プロジェクト: kasuparu/wp-timecraft
        continue;
    }
    ?>

        <article class="cpm-project">
            <a href="<?php 
    echo cpm_url_project_details($project->ID);
    ?>
">
                <h5><?php 
    echo get_the_title($project->ID);
    ?>
</h5>

                <div class="cpm-project-detail"><?php 
    echo cpm_excerpt($project->post_content, 55);
    ?>
</div>
                <div class="cpm-project-meta">
                    <?php 
    echo cpm_project_summary($project->info);
    ?>
                </div>
                <footer class="cpm-project-people">
                    <?php 
    foreach ($project->users as $user) {
        echo get_avatar($user['id'], 48, '', $user['name']);
    }
    ?>
                </footer>
            </a>
コード例 #3
0
ファイル: frontend.php プロジェクト: javalidigital/multipla
    /**
     * List all projects
     *
     * @since 1.0
     */
    function list_projects()
    {
        $project_obj = CPM_Project::getInstance();
        $projects = $project_obj->get_projects();
        $status_class = isset($_GET['status']) ? $_GET['status'] : 'active';
        if (function_exists('cpm_project_count')) {
            $count = cpm_project_count();
        }
        ?>

        <div class="icon32" id="icon-themes"><br></div>
        <h2><?php 
        _e('Project Manager', 'cpm');
        ?>
</h2>

        <?php 
        if (function_exists('cpm_project_filters')) {
            cpm_project_filters();
        }
        ?>

        <div class="cpm-projects">

            <?php 
        if (function_exists('cpm_project_filters')) {
            ?>
                <ul class="list-inline order-statuses-filter">
                    <li<?php 
            echo $status_class == 'all' ? ' class="active"' : '';
            ?>
>
                        <a href="<?php 
            echo cpm_url_all();
            ?>
"><?php 
            _e('All', 'cpm');
            ?>
</a>
                    </li>
                    <li<?php 
            echo $status_class == 'active' ? ' class="active"' : '';
            ?>
>
                        <a class="cpm-active" href="<?php 
            echo cpm_url_active();
            ?>
"><?php 
            printf(__('Active (%d)', 'cpm'), $count['active']);
            ?>
</a>
                    </li>
                    <li<?php 
            echo $status_class == 'archive' ? ' class="active"' : '';
            ?>
>
                        <a class="cpm-archive-head" href="<?php 
            echo cpm_url_archive();
            ?>
"><?php 
            printf(__('Completed (%d)', 'cpm'), $count['archive']);
            ?>
</a>
                    </li>
                </ul>
            <?php 
        }
        ?>

            <?php 
        if (cpm_manage_capability('project_create_role')) {
            ?>
                <nav class="cpm-new-project">
                    <a href="#" id="cpm-create-project"><span><?php 
            _e('New Project', 'cpm');
            ?>
</span></a>
                </nav>
            <?php 
        }
        ?>

            <?php 
        foreach ($projects as $project) {
            if (!$project_obj->has_permission($project)) {
                continue;
            }
            ?>
                <article class="cpm-project">
                    <?php 
            if (cpm_is_project_archived($project->ID)) {
                ?>
                        <div class="cpm-completed-wrap"><div class="ribbon-green"><?php 
                _e('Completed', 'cpm');
                ?>
</div></div>
                    <?php 
            }
            ?>

                    <a href="<?php 
            echo cpm_url_project_details($project->ID);
            ?>
">
                        <h5><?php 
            echo get_the_title($project->ID);
            ?>
</h5>

                        <div class="cpm-project-detail"><?php 
            echo cpm_excerpt($project->post_content, 55);
            ?>
</div>
                        <div class="cpm-project-meta">
                            <?php 
            echo cpm_project_summary($project->info);
            ?>
                        </div>

                        <footer class="cpm-project-people">
                            <div class="cpm-scroll">
                            <?php 
            if (count($project->users)) {
                foreach ($project->users as $id => $user_meta) {
                    echo get_avatar($id, 48, '', $user_meta['name']);
                }
            }
            ?>
                            </div>
                        </footer>
                    </a>

                    <?php 
            $progress = $project_obj->get_progress_by_tasks($project->ID);
            echo cpm_task_completeness($progress['total'], $progress['completed']);
            if (cpm_user_can_access($project->ID)) {
                cpm_project_actions($project->ID);
            }
            ?>


                </article>

            <?php 
        }
        ?>

        </div>

        <div id="cpm-project-dialog" title="<?php 
        _e('Start a new project', 'cpm');
        ?>
" style="display: none;">
            <?php 
        if ($project_obj->has_admin_rights()) {
            ?>
                <?php 
            cpm_project_form();
            ?>
            <?php 
        }
        ?>
        </div>

        <div id="cpm-create-user-wrap">
            <?php 
        if ($project_obj->has_admin_rights()) {
            ?>
                <?php 
            cpm_user_create_form();
            ?>
            <?php 
        }
        ?>
        </div>


        <script type="text/javascript">
            jQuery(function($) {
                $( "#cpm-project-dialog, #cpm-create-user-wrap" ).dialog({
                    autoOpen: false,
                    modal: true,
                    dialogClass: 'cpm-ui-dialog',
                    width: 485,
                    height: 425,
                    position:['middle', 100]
                });
            });

            jQuery(function($) {
                $( "#cpm-create-user-wrap" ).dialog({
                    autoOpen: false,
                    modal: true,
                    dialogClass: 'cpm-ui-dialog',
                    width: 400,
                    height: 353,
                    position:['middle', 100]
                });
            });
        </script>
        <?php 
    }