Exemplo n.º 1
0
 if ($event['type'] == "task") {
     echo '<input type="hidden" name="due_date" value="' . $event['due_date'] . '" />';
 } else {
     echo '<input type="hidden" name="start_time" value="' . $event['start_time'] . '" />';
     echo '<input type="hidden" name="end_time" value="' . $event['end_time'] . '" />';
 }
 echo '<input type="hidden" name="event_type" value="' . $event['type'] . '" />';
 echo '<input type="hidden" name="repeats" value="' . $event['repeats'] . '" />';
 echo '<input type="hidden" name="type" value="single" />';
 echo '</div>';
 echo '</td>';
 $display_date = $event['type'] == "event" ? $event['start_time'] : $event['due_date'];
 if ($display_date == "") {
     $display_date = TextHelper::_('COBALT_NA');
 }
 echo '<td class="date"><small>' . DateHelper::formatDateString($display_date) . ' ' . DateHelper::formatTime($time, "(" . UsersHelper::getTimeFormat() . ")") . '</small></td>';
 switch ($event['association_type']) {
     case "company":
         echo "<td><i class='glyphicon glyphicon-briefcase'></i> <a href='" . RouteHelper::_('index.php?view=companies&layout=company&id=' . $event['company_id']) . "'>" . $event['company_name'] . "</a></td>";
         break;
     case "deal":
         echo "<td><i class='glyphicon glyphicon-tag'></i> <a href='" . RouteHelper::_('index.php?view=deals&layout=deal&id=' . $event['deal_id']) . "'>" . $event['deal_name'] . "</a></td>";
         break;
     case "person":
         echo "<td><i class='glyphicon glyphicon-user'></i> <a href='" . RouteHelper::_('index.php?view=people&layout=person&id=' . $event['person_id']) . "'>" . $event['person_first_name'] . " " . $event['person_last_name'] . "</a></td>";
         break;
     default:
         echo "<td>&nbsp;</td>";
         break;
 }
 echo '</tr>';
Exemplo n.º 2
0
 echo $event['name'];
 echo '</a>';
 echo '<ul class="dropdown-menu" role="menu" aria-labelledby="event_menu_' . $event['id'] . '_link">';
 if ($event['completed'] == 1) {
     echo '<li><a href="javascript:void(0);" onclick="Calendar.markEventIncomplete(this)" >' . TextHelper::_('COBALT_MARK_INCOMPLETE') . '</a></li>';
 } else {
     echo '<li><a href="javascript:void(0);" onclick="Calendar.markEventComplete(this)" >' . TextHelper::_('COBALT_MARK_COMPLETE') . '</a></li>';
     echo '<li><a href="javascript:void(0);" onclick="Calendar.postponeEvent(this,1)" >' . TextHelper::_('COBALT_POSTPONE_1_DAY') . '</a></li>';
     echo '<li><a href="javascript:void(0);" onclick="Calendar.postponeEvent(this,7)" >' . TextHelper::_('COBALT_POSTPONE_7_DAYS') . '</a></li>';
 }
 $id = (array_key_exists('parent_id', $event) && $event['parent_id']) != 0 ? $event['parent_id'] : $event['id'];
 echo '<li><a href="javascript:void(0);" onclick="Calendar.editEvent(' . $id . ',\'' . $event['type'] . '\')" >' . TextHelper::_('COBALT_EDIT') . '</a></li>';
 echo '<li><a href="javascript:void(0);" onclick="Calendar.removeCalendarEvent(this)" >' . TextHelper::_('COBALT_DELETE') . '</a></li>';
 echo '</ul>';
 echo '</div></td>';
 echo '<td class="due_date_column">' . $due_date . ' ' . DateHelper::formatTime($time, "(" . UsersHelper::getTimeFormat() . ")") . '</td>';
 echo '<td>';
 if ($event['deal_name']) {
     echo '<a href=' . RouteHelper::_('index.php?view=deals&layout=deal&id=' . $event['deal_id']) . '>' . $event['deal_name'] . '</a><br />';
 }
 if ($event['company_name']) {
     echo '<a href=' . RouteHelper::_('index.php?view=companies&layout=company&id=' . $event['company_id']) . '>' . $event['company_name'] . '</a>';
 }
 if ($event['person_id']) {
     echo '<a href=' . RouteHelper::_('index.php?view=people&layout=person&id=' . $event['person_id']) . '>' . $event['person_first_name'] . ' ' . $event['person_last_name'] . '</a>';
 }
 echo '</td>';
 echo '<td>' . $event['owner_first_name'] . ' ' . $event['owner_last_name'] . '</td>';
 echo '<td>' . $event['assignee_first_name'] . ' ' . $event['assignee_last_name'] . '</td>';
 echo '<td>' . ucwords($event['category_name']) . '</td>';
 echo '<td class="contacts" ><a href="javascript:void(0);" onclick="Calendar.showEventContactsDialogModal(' . $event['id'] . ');"><img src="' . JURI::base() . 'src/Cobalt/media/images/card.png' . '"/></a></td>';