示例#1
0
# Cobalt
# ------------------------------------------------------------------------
# @author Cobalt
# @copyright Copyright (C) 2012 cobaltcrm.org All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Website: http://www.cobaltcrm.org
-------------------------------------------------------------------------*/
// no direct access
defined('_CEXEC') or die('Restricted access');
$current_heading = "";
if (count($this->events) > 0) {
    foreach ($this->events as $event) {
        $display_date = $event['type'] == "event" ? $event['start_time'] . " " . $event['start_time_hour'] : $event['due_date'] . " " . $event['due_date_hour'];
        $time = $event['type'] == "event" ? $event['start_time_hour'] : $event['due_date_hour'];
        $display_date = $display_date == "" ? TextHelper::_('COBALT_NA') : DateHelper::formatDate($display_date, false, false);
        $relative_date_title = DateHelper::getRelativeDate($display_date);
        if ($event['completed'] == 1) {
            $completed = "line-through";
        } else {
            $completed = "";
        }
        if ($current_heading != $relative_date_title) {
            if ($current_heading != "") {
                echo '</table>';
            }
            echo '<h4>' . $relative_date_title . '</h4>';
            $current_heading = $relative_date_title;
            echo '<table class="table table-striped table-hover">';
        }
        echo '<tr class="com_crmery_task_event" id="com_crmery_listing_' . $event['id'] . '">';
        echo '<td><input type="checkbox" class="event_list_checkbox" name="item_id[' . $event['id'] . ']" /></td>';
示例#2
0
                <?php 
echo ucwords(TextHelper::_('COBALT_ADD_TASK'));
?>
            </a>
    </div>

    <div data-role="content">
        <ul class="ui-listview" data-role="listview" data-filter="true" data-autodividers="true" data-theme="c">
            <?php 
$n = count($this->events);
for ($i = 0; $i < $n; $i++) {
    $event = $this->events[$i];
    $event_date = DateHelper::formatDate($event['due_date']);
    $k = $i % 2;
    if ($i == 0 || substr_compare($event['due_date'], $this->events[$i - 1]['due_date'], 0)) {
        echo "<li data-role='list-divider'>" . DateHelper::getRelativeDate($event_date) . " " . $event_date . "</li>";
    }
    ?>
                    <li data-filtertext="<?php 
    echo $event['name'];
    ?>
">
                        <a href="<?php 
    echo RouteHelper::_('index.php?view=events&layout=event&id=' . $event['id']);
    ?>
">
                            <h3 class="ui-li-heading"><?php 
    echo $event['name'];
    ?>
</h3>
                            <p class="ui-li-desc"><?php