/** * Return checkbox link * * @access public * @param string $link * @param boolean $checked * @param string $hint * @return string */ function checkbox_link($link, $checked = false, $hint = null) { $title_attribute = is_null($hint) ? '' : 'title="' . clean($hint) . '"'; $icon_url = $checked ? icon_url('checked.jpg') : icon_url('not-checked.jpg'); return "<a class=\"internalLink\" href=\"{$link}\" {$title_attribute}><img src=\"{$icon_url}\" alt=\"\" /></a>"; //return "<a class=\"checkboxLink\" href=\"$link\" $title_attribute onclick=\"og.openLink(this.href);\"><img src=\"$icon_url\" alt=\"\" /></a>"; }
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> </td> <td></td> </tr>'; } // if } // foreach if (!$on_list_page && $counter > 5) { $content .= '<tr> <td colspan="2"><a class="internalLink" href="' . get_url("task", "new_list_tasks", array('status' => '1', 'filter' => 'milestone', 'fval' => $milestone->getId())) . '"> ' . lang('view all completed tasks', $counter) . '</a></td> </tr>'; } // if
<?php foreach ($tagged_objects['task_lists'] as $task_list) { ?> <li> <a href="<?php echo $task_list->getViewUrl(); ?> "><?php echo clean($task_list->getName()); ?> </a> <?php if ($task_list->isCompleted()) { ?> <img src="<?php echo icon_url('ok.gif'); ?> " alt="<?php echo lang('completed task list'); ?> " title="<?php echo lang('completed task list'); ?> " /> <?php } ?> </li> <?php } // foreach
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->getObjectName()) .'</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 Contact ? $task->getCompletedBy()->getCardUserUrl() : '#', $task->getCompletedBy() instanceof Contact ? clean($task->getCompletedBy()->getObjectName()) : lang('n/a')) . ')</span> </td> <td></td> </tr>'; } // if } // foreach if(!$on_list_page && $counter > 5) { $content .= '<tr> <td colspan="2"><a class="internalLink" href="'. get_url("task","new_list_tasks",array('status' => '1','filter' => 'milestone','fval' => $milestone->getId())) .'"> ' . lang('view all completed tasks', $counter) .'</a></td> </tr>'; } // if $content .= ' </table> </div> </td></tr></table>'; } // if else {
?> " alt="" /></a><?php } // if ?> <?php if ($folder->canDelete(logged_user())) { ?> <a href="<?php echo $folder->getDeleteUrl(); ?> " class="blank" title="<?php echo lang('delete folder'); ?> "><img src="<?php echo icon_url('cancel_gray.gif'); ?> " alt="" /></a><?php } // if echo render_folder_tree($folder); // if ?> </li> <?php } // if } // foreach ?> </ul>
?> </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 echo $project->getOverviewUrl(); ?> "><?php echo clean($project->getName());
<?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) {?> <span class="taskCompletedOnBy">(<?php echo lang('completed on by', format_date($task->getCompletedOn()), $task->getCompletedBy()->getCardUserUrl(), clean($task->getCompletedBy()->getObjectName())) ?>)</span> <?php } else { ?> <span class="taskCompletedOnBy">(<?php echo lang('completed on by', format_date($task->getCompletedOn()), "#", lang("n/a")) ?>)</span> <?php } ?> </td> <td></td> </tr> <?php } // if ?> <?php } // foreach ?> <?php if(!$on_list_page && $counter > 5) { ?> <tr> <td colspan="2"><a class="internalLink" href="<?php echo $task_list->getViewUrl() ?>"><?php echo lang('view all completed tasks', $counter) ?></a></td>
/** * Render folder tree * * @param string $name Control name * @param Project $project * @param integer $selected ID of selected folder * @param array $attributes Select box attributes * @return string */ function render_folder_tree($folder, $depth = 0, $project = null, $selected = null, $attributes = null) { if ($depth > 5) { return; } if (is_null($project)) { $project = active_project(); } // if if (!$project instanceof Project) { throw new InvalidInstanceError('$project', $project, 'Project'); } // if if (is_array($attributes)) { if (!isset($attributes['class'])) { $attributes['class'] = 'select_folder'; } } else { $attributes = array('class' => 'select_folder'); } // if $options = array(option_tag(lang('none'), 0)); $html = ''; if ($folder instanceof ProjectFolder) { $folders = ProjectFolders::getProjectFolderTree($project, $folder->getId()); } else { $folders = ProjectFolders::getProjectFolderTree($project); } if (is_array($folders)) { $html .= '<ul>'; foreach ($folders as $folder) { $class = $folder->getId() == $selected ? $class = 'class="selected"' : ''; //$html .= '<li>' . $folder->getName() . render_folder_tree( $folder, $depth, $project, $selected, $attributes ) . '</li>'; $html .= '<li><a href="' . $folder->getBrowseUrl() . '" ' . $class . '>' . clean($folder->getName()) . '</a>'; if ($folder->canEdit(logged_user())) { $html .= ' <a href="' . $folder->getEditUrl() . '" class="blank" title="' . lang('edit folder') . '"><img src="' . icon_url('edit.gif') . '" alt="" /></a>'; } // if if ($folder->canDelete(logged_user())) { $html .= ' <a href="' . $folder->getDeleteUrl() . '" class="blank" title="' . lang('delete folder') . '"><img src="' . icon_url('cancel_gray.gif') . '" alt="" /></a>'; } // if $html .= render_folder_tree($folder, $depth + 1, $project, $selected, $attributes); $html .= '</li>'; } // foreach $html .= '</ul>'; } // if return $html; }
echo get_url('reporting', 'view_custom_report', array('id' => $id, 'order_by' => $db_columns[$col], 'order_by_asc' => $asc ? 0 : 1)) . $parameterURL; ?> "><?php echo clean($col); ?> </a> <?php } } ?> </b> <?php if (!($to_print || $col === lang('tags') || $col === lang('workspaces')) && $sorted) { ?> <img src="<?php echo icon_url($asc ? 'asc.png' : 'desc.png'); ?> " /> <?php } //if ?> </td> <?php } //foreach ?> </tr> <?php $isAlt = true; foreach ($rows as $row) {
statics: { renderAction: function(value) { if(value == 1) { return '<img class="img-button btn-default" style="cursor: pointer" src="<?php echo icon_url('default.png'); ?> " /> <img class="img-button btn-delete" style="cursor: pointer" src="<?php echo icon_url('delete.png'); ?> " />'; }else { return '<img class="img-button btn-set-default" style="cursor: pointer" src="<?php echo icon_url('default_grey.png'); ?> " /> <img class="img-button btn-delete" style="cursor: pointer" src="<?php echo icon_url('delete.png'); ?> " />'; } } }, constructor: function(config) { var statics = this.statics(); config = config || {}; config.productsId = config.productsId || null; config.border = false; config.region = 'center';
/** * Return checkbox link * * @access public * @param string $link * @param boolean $checked * @param string $hint * @return string */ function checkbox_link($link, $checked = false, $hint = null) { $title_attribute = is_null($hint) ? '' : 'title="' . clean($hint) . '"'; $icon_url = $checked ? icon_url('checked.jpg') : icon_url('not-checked.jpg'); return "<a href=\"{$link}\" class=\"checkboxLink\" {$title_attribute}><img src=\"{$icon_url}\" alt=\"\" /></a>"; }