Esempio n. 1
0
                        echo format_days('days late', $assigned_milestone->getLateInDays());
                        ?>
</span>
<?php 
                    } elseif ($assigned_milestone->isToday()) {
                        ?>
            <span><?php 
                        echo lang('today');
                        ?>
</span>
<?php 
                    }
                    // if
                    ?>
          <td class="milestoneCheckbox"><?php 
                    echo checkbox_link($assigned_milestone->getCompleteUrl(), false);
                    ?>
</td>
          </td>
        </tr>
<?php 
                }
                // foreach
                ?>
      </table>
<?php 
            }
            // if
            ?>

<?php 
Esempio n. 2
0
    }
    // if
    $on_list_page = false;
    //show completed tasks for the milestone
    $completed_subtasks = $milestone->getCompletedSubTasks();
    if (is_array($milestone->getCompletedSubTasks($completed_subtasks))) {
        $content .= '  <table style="border:1px solid #717FA1;width:100%; padding-left:10px;"><tr><th style="padding-left:10px;padding-top:4px;padding-bottom:4px;background-color:#E8EDF7;font-size:120%;font-weight:bolder;color:#717FA1;width:100%;">' . lang("completed tasks") . '</th></tr><tr><td style="padding-left:10px;">
			  <div class="completedTasks">
			  <table class="blank">';
        $counter = 0;
        foreach ($completed_subtasks as $task) {
            $counter++;
            if ($on_list_page || $counter <= 5) {
                $content .= '<tr>';
                if ($task->canChangeStatus(logged_user())) {
                    $content .= '<td class="taskCheckbox">' . checkbox_link($task->getOpenUrl(rawurlencode(get_url('milestone', 'view', array('id' => $milestone->getId())))), true, lang('mark task as open')) . '</td>';
                } else {
                    $content .= '<td class="taskCheckbox"><img src="' . icon_url('checked.jpg') . '" alt="' . lang('completed task') . '" /></td>';
                }
                // if
                $content .= '    <td class="taskText">
			        	<a class="internalLink" href="' . $task->getObjectUrl() . '">' . clean($task->getTitle()) . '</a> ';
                if ($task->canEdit(logged_user())) {
                    $content .= '<a class="internalLink" href="' . $task->getEditListUrl() . '" class="blank" title="' . lang('edit task') . '"><img src="' . icon_url('edit.gif') . '" alt="" /></a> ';
                }
                // if
                if ($task->canDelete(logged_user())) {
                    $content .= '<a href="' . $task->getDeleteUrl() . '" class="blank internalLink" onclick="return confirm(\'' . escape_single_quotes(lang('confirm delete task')) . '\')" title="' . lang('delete task') . '"><img src="' . icon_url('cancel_gray.gif') . '" alt="" /></a> ';
                }
                // if <br />
                $content .= '<span class="taskCompletedOnBy">(' . lang('completed on by', format_date($task->getCompletedOn()), $task->getCompletedBy() instanceof User ? $task->getCompletedBy()->getCardUrl() : '#', $task->getCompletedBy() instanceof User ? clean($task->getCompletedBy()->getDisplayName()) : lang('n/a')) . ')</span>
:</span>
      <span class="milestoneName">
<?php 
        if ($milestone->canChangeStatus(logged_user())) {
            ?>
  <?php 
            if ($milestone->isCompleted()) {
                ?>
    <?php 
                echo checkbox_link($milestone->getOpenUrl(), true);
                ?>
  <?php 
            } else {
                ?>
    <?php 
                echo checkbox_link($milestone->getCompleteUrl(), false);
                ?>
  <?php 
            }
            // if
        } else {
            ?>
  <?php 
            if ($milestone->isCompleted()) {
                ?>
        <img src="<?php 
                echo get_image_url('icons/checked.jpg');
                ?>
"/>
  <?php 
            } else {
Esempio n. 4
0
    ?>
</th>
    <th><?php 
    echo lang('options');
    ?>
</th>
  </tr>

<?php 
    foreach ($projects as $project) {
        ?>
  <tr>
    <td class="middle">
<?php 
        if ($project->canChangeStatus(logged_user())) {
            echo checkbox_link($project->isActive() ? $project->getCompleteUrl() : $project->getOpenUrl(), !$project->isActive(), $project->isActive() ? lang('mark project as finished') : lang('mark project as active'));
        } else {
            ?>
<img src="<?php 
            echo $project->isActive() ? icon_url('not-checked.jpg') : icon_url('checked.jpg');
            ?>
" alt="" title="<?php 
            echo $project->isActive() ? lang('active project') : lang('finished project');
            ?>
" />
<?php 
        }
        // if
        ?>
    </td>
    <td class="long middle"><a href="<?php 
Esempio n. 5
0
<?php if ($assigned_to instanceof Company) { ?>
            <span class="assignedTo"><?php echo clean($assigned_to->getName()) ?> | </span> 
<?php } elseif ($assigned_to instanceof User) { ?>
            <span class="assignedTo"><?php echo clean($assigned_to->getDisplayName()) ?> | </span> 
<?php } else { ?>
            <span class="assignedTo"><?php echo lang('anyone') ?> | </span> 
<?php } // if ?>
            <a href="<?php echo $assigned_milestone->getViewUrl() ?>"><?php echo clean($assigned_milestone->getName()) ?></a> - 
<?php if ($assigned_milestone->isUpcoming()) { ?>
            <span><?php echo format_days('days left', $assigned_milestone->getLeftInDays()) ?></span>
<?php } elseif ($assigned_milestone->isLate()) { ?>
            <span class="error"><?php echo format_days('days late', $assigned_milestone->getLateInDays()) ?></span>
<?php } elseif ($assigned_milestone->isToday()) { ?>
            <span><?php echo lang('today') ?></span>
<?php } // if ?>
          <td class="milestoneCheckbox"><?php echo checkbox_link($assigned_milestone->getCompleteUrl(), false) ?></td>
          </td>
        </tr>
<?php } // foreach?>
      </table>
<?php } // if ?>

<?php if (is_array($assigned_tasks) && count($assigned_tasks)) { ?>
      <p><a href="<?php echo $active_project->getTasksUrl() ?>"><?php echo lang('tasks') ?></a>:</p>
      <table class="blank">
<?php foreach ($assigned_tasks as $assigned_task) { ?>
        <tr>
          <td class="taskText">
<?php $assigned_to = $assigned_task->getAssignedTo() ?>
<?php if ($assigned_to instanceof Company) { ?>
            <span class="assignedTo"><?php echo clean($assigned_to->getName()) ?></span>
Esempio n. 6
0
if (is_array($task_list->getCompletedTasks())) {
    ?>
  <div class="completedTasks">
    <table class="blank">
<?php 
    $counter = 0;
    foreach ($task_list->getCompletedTasks() as $task) {
        $counter++;
        if ($on_list_page || $counter <= 5) {
            ?>
      <tr>
<?php 
            if ($task->canChangeStatus(logged_user())) {
                ?>
        <td class="taskCheckbox"><?php 
                echo checkbox_link($task->getOpenUrl(), true, lang('mark task as open'));
                ?>
</td>
<?php 
            } else {
                ?>
        <td class="taskCheckbox"><img src="<?php 
                echo icon_url('checked.jpg');
                ?>
" alt="<?php 
                echo lang('completed task');
                ?>
" /></td>
<?php 
            }
            // if
Esempio n. 7
0

if($showCompletedSubtasksDiv) { ?>
<br/>
  <table style="border:1px solid #717FA1;width:100%; padding-left:10px;">
  <tr><th style="padding-left:10px;padding-top:4px;padding-bottom:4px;background-color:#E8EDF7;font-size:120%;font-weight:bolder;color:#717FA1;width:100%;"><?php echo lang("completed subtasks") ?></th></tr>
  <tr><td style="padding-left:10px;">
  <div class="completedTasks">
    <table class="blank">
<?php $counter = 0; ?>
<?php foreach($task_list->getCompletedSubTasks() as $task) { ?>
<?php $counter++; ?>
<?php if($on_list_page || ($counter <= 5)) { ?>
      <tr>
<?php if($task->canChangeStatus(logged_user()) && !$task->isTrashed()) { ?>
    <td class="taskCheckbox"><?php echo checkbox_link($task->getOpenUrl(rawurlencode(get_url('task', 'view', array('id' => $task_list->getId())))), true, lang('mark task as open')) ?></td>
<?php } else { ?>
        <td class="taskCheckbox"><img src="<?php echo icon_url('checked.jpg') ?>" alt="<?php echo lang('completed task') ?>" /></td>
<?php } // if ?>
        <td class="taskText">
        	<a class="internalLink" href="<?php echo $task->getObjectUrl() ?>"><?php echo clean($task->getObjectName()) ?></a> 
          <?php if($task->canEdit(logged_user()) && !$task->isTrashed()) { ?>
          	<a class="internalLink" href="<?php echo $task->getEditListUrl() ?>" class="blank" title="<?php echo lang('edit task') ?>">
          	<img src="<?php echo icon_url('edit.gif') ?>" alt="" /></a>
          <?php } // if ?> 
          <?php if($task->canDelete(logged_user()) && !$task->isTrashed()) { ?>
          	<a href="<?php echo $task->getDeleteUrl() ?>" class="blank internalLink" onclick="return confirm('<?php echo escape_single_quotes(lang('confirm delete task')) ?>')" title="<?php echo lang('delete task') ?>">
          	<img src="<?php echo icon_url('cancel_gray.gif') ?>" alt="" /></a>
          <?php } // if ?>
          <br />
          <?php if ($task->getCompletedBy() instanceof Contact) {?>
Esempio n. 8
0
            if (is_array($assigned_tasks) && count($assigned_tasks)) {
                ?>
      <p><a href="<?php 
                echo $active_project->getTasksUrl();
                ?>
"><?php 
                echo lang('tasks');
                ?>
</a>:</p>
      <table class="blank">
<?php 
                foreach ($assigned_tasks as $assigned_task) {
                    ?>
        <tr>
          <td class="taskCheckbox"><?php 
                    echo checkbox_link($assigned_task->getCompleteUrl(), false, lang('mark task as completed'));
                    ?>
</td>
          <td class="taskText">
<?php 
                    $assigned_to = $assigned_task->getAssignedTo();
                    if ($assigned_to instanceof Company) {
                        ?>
            <span class="assignedTo"><?php 
                        echo clean($assigned_to->getName());
                        ?>
:</span>
<?php 
                    } elseif ($assigned_to instanceof User) {
                        ?>
            <span class="assignedTo"><?php 
Esempio n. 9
0
</th></tr>
  <tr><td style="padding-left:10px;">
  <div class="completedTasks">
    <table class="blank">
<?php 
    $counter = 0;
    foreach ($task_list->getCompletedSubTasks() as $task) {
        $counter++;
        if ($on_list_page || $counter <= 5) {
            ?>
      <tr>
<?php 
            if ($task->canChangeStatus(logged_user()) && !$task->isTrashed()) {
                ?>
    <td class="taskCheckbox"><?php 
                echo checkbox_link($task->getOpenUrl(rawurlencode(get_url('task', 'view', array('id' => $task_list->getId())))), true, lang('mark task as open'));
                ?>
</td>
<?php 
            } else {
                ?>
        <td class="taskCheckbox"><img src="<?php 
                echo icon_url('checked.jpg');
                ?>
" alt="<?php 
                echo lang('completed task');
                ?>
" /></td>
<?php 
            }
            // if