echo $revisionCount + 1; ?> " id="revision_<?php echo $revision['id']; ?> " /> </div> </td> <td> <?php echo Util::getFormattedDate($page['date_created'], $clientSettings['timezone']); ?> </td> <td> <?php echo LinkHelper::getUserProfileLink($revision['user_id'], SystemProduct::SYS_PRODUCT_YONGO, $page['first_name'], $page['last_name']); ?> </td> </tr> <?php } ?> </table> </td> </tr> </table> <?php } else { ?> <div class="infoBox">There are no revisions for this page.</div> <?php
public function getCommentsLayoutHTML($comments, &$htmlLayout, $commentParentId, $identationIndex) { for ($i = 0; $i < count($comments); $i++) { if ($comments[$i]['parent_comment_id'] == $commentParentId && $comments[$i]['printed'] == 0) { if ($comments[$i]['parent_comment_id'] == null) { $identationIndex = 0; } $htmlLayout .= '<table class="table table-hover table-condensed">'; $htmlLayout .= '<tr>'; for ($j = 0; $j < $identationIndex; $j++) { $htmlLayout .= '<td width="30"></td>'; } $htmlLayout .= '<td width="25px" style="vertical-align: top">'; $htmlLayout .= '<img src="' . UbirimiContainer::get()['repository']->get(UbirimiUser::class)->getUserAvatarPicture(UbirimiContainer::get()['session']->get('user'), 'small') . '" style="vertical-align: top" />'; $htmlLayout .= '</td>'; $htmlLayout .= '<td>'; $htmlLayout .= LinkHelper::getUserProfileLink($comments[$i]['user_id'], SystemProduct::SYS_PRODUCT_DOCUMENTADOR, $comments[$i]['first_name'], $comments[$i]['last_name']); $htmlLayout .= '<div>' . str_replace("\n", "<br />", $comments[$i]['content']) . '</div>'; $htmlLayout .= '<div style="margin-top: 4px">'; $htmlLayout .= '<a href="#" id="entity_reply_comment_' . $comments[$i]['id'] . '">Reply</a>'; $htmlLayout .= '<span> | </span>'; $htmlLayout .= '<a href="#" id="entity_delete_comment_' . $comments[$i]['id'] . '">Delete</a>'; $htmlLayout .= '</div>'; $htmlLayout .= '<div id="innerCommentSection_' . $comments[$i]['id'] . '" style="display: none;">'; $htmlLayout .= '<textarea class="inputTextAreaLarge" id="inner_doc_view_page_add_comment_content_' . $comments[$i]['id'] . '" style="width: 100%"></textarea>'; $htmlLayout .= '<div style="height: 2px"></div>'; $htmlLayout .= '<table width="100%" cellpadding="0" cellspacing="0" border="0">'; $htmlLayout .= '<tr>'; $htmlLayout .= '<td>'; $htmlLayout .= '<div>'; $htmlLayout .= '<input type="button" name="add_comment" id="inner_btn_doc_view_page_add_comment_' . $comments[$i]['id'] . '" value="Add Comment" class="btn ubirimi-btn"/>'; $htmlLayout .= '</div>'; $htmlLayout .= '</td>'; $htmlLayout .= '</tr>'; $htmlLayout .= '</table>'; $htmlLayout .= '</div>'; $htmlLayout .= '</td>'; $htmlLayout .= '</tr>'; $htmlLayout .= '</table>'; $comments[$i]['printed'] = 1; $identationIndex++; EntityComment::getCommentsLayoutHTML($comments, $htmlLayout, $comments[$i]['id'], $identationIndex); $identationIndex--; } } return $htmlLayout; }
$date = date("F j, Y", strtotime($lastRevision['date_created'])); $lastEditedText .= LinkHelper::getUserProfileLink($lastRevision['user_id'], SystemProduct::SYS_PRODUCT_DOCUMENTADOR, $lastRevision['first_name'], $lastRevision['last_name']) . ' on ' . $date; } else { $date = date("F j, Y", strtotime($page['date_created'])); $lastEditedText .= LinkHelper::getUserProfileLink($page['user_id'], SystemProduct::SYS_PRODUCT_DOCUMENTADOR, $page['first_name'], $page['last_name']) . ' on ' . $date; } $linkAttachments = ''; if ($attachments) { $linkAttachments = '<a href="/documentador/page/attachments/' . $entityId . '"><img border="0" src="/img/attachment.png" height="10px" /></a> <a href="/documentador/page/attachments/' . $entityId . '">' . $attachments->num_rows . '</a>'; } ?> <div class="smallDescription"><?php echo $linkAttachments; ?> Added by <?php echo LinkHelper::getUserProfileLink($page['user_id'], SystemProduct::SYS_PRODUCT_DOCUMENTADOR, $page['first_name'], $page['last_name']); ?> , <?php echo $lastEditedText; ?> </div> <div> <?php if ($revisionId) { echo '<div class="infoBox">'; echo '<div>You are viewing an old version of this page. View the <a href="/documentador/page/view/' . $entityId . '">current version</a>.</div>'; echo '<div>Restore this Version | <a href="/documentador/page/history/' . $entityId . '">View Page History</a></div>'; echo '</div>'; echo $revision['content']; } else {
?> " height="16px" src="/yongo/img/issue_priority/<?php echo $childIssue['issue_priority_icon_name']; ?> " /> </td> <td style="width: 150px;"> <?php echo $childIssue['status_name']; ?> </td> <td style="text-align: right; width: 200px;"> <?php echo LinkHelper::getUserProfileLink($issue[Field::FIELD_ASSIGNEE_CODE], SystemProduct::SYS_PRODUCT_YONGO, $childIssue['ua_first_name'], $childIssue['ua_last_name']); ?> </td> <td align="right" style="text-align: right;"> <div class="btn-group" align="right"> <a id="btnOptions" href="#" class="btn ubirimi-btn dropdown-toggle" data-toggle="dropdown"> <i class="icon-asterisk"></i> <span class="caret"></span> </a> <ul class="dropdown-menu pull-right"> <li><a id="edit_issue_child_<?php echo $childIssue['id']; ?> " href="#">Edit</a></li> <?php if ($childIssue['assignee'] != $loggedInUserId) {
public function indexAction(Request $request, SessionInterface $session) { $issueId = $request->get('id'); if (Util::checkUserIsLoggedIn()) { $issue = $this->getRepository(Issue::class)->getById($issueId, $session->get('user/id')); $clientSettings = $session->get('client/settings'); $session->set('selected_product_id', SystemProduct::SYS_PRODUCT_YONGO); } else { $clientId = $this->getRepository(UbirimiClient::class)->getClientIdAnonymous(); $session->set('client/id', $clientId); $session->set('user/id', null); $clientSettings = $this->getRepository(UbirimiClient::class)->getSettings($session->get('client/id')); $issue = $this->getRepository(Issue::class)->getById($issueId, $session->get('user/id')); $session->set('yongo/settings', $this->getRepository(UbirimiClient::class)->getYongoSettings($session->get('client/id'))); } $issueValid = true; if ($issue) { $projectId = $issue['issue_project_id']; $session->set('selected_project_id', $projectId); $issueProject = $this->getRepository(YongoProject::class)->getById($projectId); $hasBrowsingPermission = $this->getRepository(YongoProject::class)->userHasPermission(array($projectId), Permission::PERM_BROWSE_PROJECTS, $session->get('user/id'), $issueId); } else { $issueValid = false; } // before going further, check to is if the issue id a valid id if (!$issue || !isset($issueProject) || isset($issueProject) && $session->get('client/id') != $issueProject['client_id']) { $issueValid = false; } if ($issueValid && !$hasBrowsingPermission) { Util::checkUserIsLoggedInAndRedirect('?context=/yongo/issue/' . $issueId); } if ($issueValid) { $sectionPageTitle = $clientSettings['title_name'] . ' / ' . SystemProduct::SYS_PRODUCT_YONGO_NAME . ' / ' . $issue['project_code'] . '-' . $issue['nr'] . ' ' . $issue['summary']; $components = $this->getRepository(IssueComponent::class)->getByIssueIdAndProjectId($issueId, $projectId); $versionsAffected = $this->getRepository(IssueVersion::class)->getByIssueIdAndProjectId($issueId, $projectId, Issue::ISSUE_AFFECTED_VERSION_FLAG); $versionsTargeted = $this->getRepository(IssueVersion::class)->getByIssueIdAndProjectId($issueId, $projectId, Issue::ISSUE_FIX_VERSION_FLAG); $arrayListResultIds = null; if ($session->has('array_ids')) { $arrayListResultIds = $session->get('array_ids'); $index = array_search($issueId, $arrayListResultIds); } $hasCreatePermission = $this->getRepository(YongoProject::class)->userHasPermission($projectId, Permission::PERM_CREATE_ISSUE, $session->get('user/id')); $hasEditPermission = $this->getRepository(YongoProject::class)->userHasPermission($projectId, Permission::PERM_EDIT_ISSUE, $session->get('user/id')); $hasDeletePermission = $this->getRepository(YongoProject::class)->userHasPermission($projectId, Permission::PERM_DELETE_ISSUE, $session->get('user/id')); $hasAssignPermission = $this->getRepository(YongoProject::class)->userHasPermission($projectId, Permission::PERM_ASSIGN_ISSUE, $session->get('user/id')); $hasAssignablePermission = $this->getRepository(YongoProject::class)->userHasPermission($projectId, Permission::PERM_ASSIGNABLE_USER, $session->get('user/id')); $hasLinkIssuePermission = $this->getRepository(YongoProject::class)->userHasPermission($projectId, Permission::PERM_LINK_ISSUE, $session->get('user/id')); $hasWorkOnIssuePermission = $this->getRepository(YongoProject::class)->userHasPermission($projectId, Permission::PERM_WORK_ON_ISSUE, $session->get('user/id')); $hasMoveIssuePermission = $this->getRepository(YongoProject::class)->userHasPermission($projectId, Permission::PERM_MOVE_ISSUE, $session->get('user/id')); $hasCreateAttachmentPermission = $this->getRepository(YongoProject::class)->userHasPermission($projectId, Permission::PERM_CREATE_ATTACHMENTS, $session->get('user/id')); $hasAddCommentsPermission = $this->getRepository(YongoProject::class)->userHasPermission($projectId, Permission::PERM_ADD_COMMENTS, $session->get('user/id')); $workflowUsed = $this->getRepository(YongoProject::class)->getWorkflowUsedForType($projectId, $issue[Field::FIELD_ISSUE_TYPE_CODE]); $step = $this->getRepository(Workflow::class)->getStepByWorkflowIdAndStatusId($workflowUsed['id'], $issue[Field::FIELD_STATUS_CODE]); $stepProperties = $this->getRepository(Workflow::class)->getStepProperties($step['id'], 'array'); $issueEditableProperty = true; for ($i = 0; $i < count($stepProperties); $i++) { if ($stepProperties[$i]['name'] == StepProperty::ISSUE_EDITABLE && $stepProperties[$i]['value'] == 'false') { $issueEditableProperty = false; } } $workflowActions = $this->getRepository(Workflow::class)->getTransitionsForStepId($workflowUsed['id'], $step['id']); $screenData = $this->getRepository(YongoProject::class)->getScreenData($issueProject, $issue[Field::FIELD_ISSUE_TYPE_CODE], SystemOperation::OPERATION_CREATE, 'array'); $childrenIssues = null; $parentIssue = null; if ($issue['parent_id'] == null) { $childrenIssues = UbirimiContainer::get()['repository']->get(Issue::class)->getByParameters(array('parent_id' => $issue['id']), $session->get('user/id'), null, $session->get('user/id')); } else { $parentIssue = $this->getRepository(Issue::class)->getByParameters(array('issue_id' => $issue['parent_id']), $session->get('user/id'), null, $session->get('user/id')); } $customFieldsData = $this->getRepository(CustomField::class)->getCustomFieldsData($issue['id']); $customFieldsDataUserPickerMultipleUser = $this->getRepository(CustomField::class)->getUserPickerData($issue['id']); $subTaskIssueTypes = $this->getRepository(YongoProject::class)->getSubTasksIssueTypes($projectId); $attachments = $this->getRepository(IssueAttachment::class)->getByIssueId($issue['id'], true); $countAttachments = count($attachments); if ($countAttachments) { $hasDeleteOwnAttachmentsPermission = $this->getRepository(YongoProject::class)->userHasPermission($projectId, Permission::PERM_DELETE_OWN_ATTACHMENTS, $session->get('user/id')); $hasDeleteAllAttachmentsPermission = $this->getRepository(YongoProject::class)->userHasPermission($projectId, Permission::PERM_DELETE_OWN_ATTACHMENTS, $session->get('user/id')); } // get the worklogs $workLogs = $this->getRepository(WorkLog::class)->getByIssueId($issueId); // get the watchers, if any $watchers = $this->getRepository(Watcher::class)->getByIssueId($issueId); $linkedIssues = $this->getRepository(IssueLinkType::class)->getLinksByParentId($issueId); $linkIssueTypes = $this->getRepository(IssueLinkType::class)->getByClientId($session->get('client/id')); $issueLinkingFlag = $session->get('yongo/settings/issue_linking_flag'); $hoursPerDay = $session->get('yongo/settings/time_tracking_hours_per_day'); $daysPerWeek = $session->get('yongo/settings/time_tracking_days_per_week'); $timeTrackingFlag = $session->get('yongo/settings/time_tracking_flag'); $slasPrintData = null; if ($issueProject['help_desk_enabled_flag']) { $slasPrintData = $this->getRepository(Issue::class)->updateSLAValue($issue, $session->get('client/id'), $clientSettings); } // voters and watchers $hasViewVotersAndWatchersPermission = $this->getRepository(YongoProject::class)->userHasPermission($projectId, Permission::PERM_VIEW_VOTERS_AND_WATCHERS, $session->get('user/id')); $recentIssues = $session->get('yongo/recent_issues'); if (!isset($recentIssues)) { $recentIssues = array(); } $issueFoundInRecent = false; for ($i = 0; $i < count($recentIssues); $i++) { if ($recentIssues[$i]['link'] == LinkHelper::getYongoIssueViewLink($issue['id'], $issue['nr'], $issue['project_code'], 1)) { $issueFoundInRecent = true; break; } } if (!$issueFoundInRecent) { array_unshift($recentIssues, array('summary' => $issue['summary'], 'project_code' => $issue['project_code'], 'nr' => $issue['nr'], 'link' => LinkHelper::getYongoIssueViewLink($issue['id'], $issue['nr'], $issue['project_code'], 1))); $recentIssues = array_slice($recentIssues, 0, 5); } $session->set('yongo/recent_issues', $recentIssues); } $menuSelectedCategory = 'issue'; return $this->render(__DIR__ . '/../../Resources/views/issue/View.php', get_defined_vars()); }
use Ubirimi\LinkHelper; use Ubirimi\Util; require_once __DIR__ . '/../_header.php'; ?> <body> <?php require_once __DIR__ . '/../_menu.php'; ?> <div class="headerPageBackground"> <table width="100%"> <tr> <td> <div class="headerPageText"> <?php echo LinkHelper::getYongoProjectLink($projectId, $project['name']); ?> > <a class="linkNoUnderline" href="/yongo/project/versions/<?php echo $projectId; ?> ">Versions</a> > <?php echo $version['name']; ?> </div> </td> </tr> </table> </div> <div class="pageContent"> <ul class="nav nav-tabs" style="padding: 0px;"> <li><a href="/yongo/project/version/<?php
echo $page['name']; ?> </td> </tr> <?php $childPages->data_seek(0); ?> <?php while ($childPages && ($childPage = $childPages->fetch_array(MYSQLI_ASSOC))) { ?> <tr> <td align="center"> <img src="/documentador/img/tree_child.png" style="margin-top: -24px"/> </td> <td><?php echo LinkHelper::getDocumentadorPageLink($childPage['id'], $childPage['name']); ?> </td> </tr> <?php } ?> <?php } else { ?> <tr> <td>There are no child pages</td> </tr> <?php } ?>
} else { ?> <tr> <td colspan="3">No Issues</td> </tr> <?php } ?> <?php foreach ($statsComponent as $key => $value) { ?> <tr> <td width="180px"> <?php echo LinkHelper::getYongoIssueListPageLink($key, array('page' => 1, 'project' => $projectId, 'link_to_page' => '/helpdesk/customer-portal/tickets', 'sort' => 'created', 'sort_order' => 'desc', 'component' => $value[0], 'resolution' => -2)); ?> </td> <td width="30" align="right"><?php echo $value[1]; ?> </td> <?php $perc = round($value[1] / $count * 100); ?> <td valign="top"> <div style="margin-top: 5px; margin-right: 4px; float:left; background-color: #56A5EC; height: 18px; width: <?php echo $perc * 3; ?> px"></div> <div style="float: left"><?php
public function renderTreeNavigation($treeStructure, $parentPosition, $index, $visible) { $html = ''; foreach ($treeStructure as $parent => $childData) { if ($parent == $parentPosition) { foreach ($childData as $indexPosition => $data) { if (!$visible) { $style = 'style="display: none; overflow: visible;"'; } else { $style = 'style="display: block; overflow: visible;"'; } $html .= '<div ' . $style . ' id="tree_' . $parentPosition . '_' . $data['id'] . '">'; $smallIndent = ''; $bigIndent = ''; for ($i = 0; $i < $index * 2; $i++) { $smallIndent .= ' '; } for ($i = 0; $i < $index * 3; $i++) { $bigIndent .= ' '; } $html .= ''; if (array_key_exists($data['id'], $treeStructure)) { $html .= $smallIndent . '<a style="margin-top: -8px;" href="#" id="tree_show_content_' . $data['id'] . '_x">'; $html .= '<img style="vertical-align: middle;" src="/documentador/img/arrow_down.png" /></a> ' . LinkHelper::getDocumentadorPageLink($data['id'], $data['title']); } else { $html .= $bigIndent . '• ' . LinkHelper::getDocumentadorPageLink($data['id'], $data['title']); } $index++; $html .= UbirimiContainer::get()['repository']->get(Entity::class)->renderTreeNavigation($treeStructure, $data['id'], $index, $data['expanded']); $html .= '</div>'; $index--; } } } return $html; }
<?php use Ubirimi\LinkHelper; use Ubirimi\Util; require_once __DIR__ . '/../_header.php'; ?> <body> <?php require_once __DIR__ . '/../_menu.php'; ?> <?php $breadCrumb = LinkHelper::getYongoProjectLink($projectId, $project['name']) . ' > <a class="linkNoUnderline" href="/yongo/project/versions/' . $projectId . '">Versions</a> > ' . $version['name']; Util::renderBreadCrumb($breadCrumb); ?> <div class="pageContent"> <ul class="nav nav-tabs" style="padding: 0px;"> <li class="active"><a href="/yongo/project/version/<?php echo $versionId; ?> ">Details</a></li> <li><a href="/yongo/project/version/issues/<?php echo $versionId; ?> " title="Issues">Issues</a></li> </ul> <table> <tr> <td><span class="textLabel">Name:</span></td>
use Ubirimi\SystemProduct; ?> <table width="100%"> <tr> <td id="sectPeople" width="74%" class="sectionDetail" colspan="3"><span class="headerPageText sectionDetailTitle">People</span></td> </tr> <tr> <td> <table width="100%" id="contentPeople"> <tr> <td> <span>Ubirimi enables you to allocate particular people to specific roles in your project. Roles are used when defining other settings, like notifications and permissions.</span> </td> </tr> <tr> <td valign="top" width="330"> <div>Project Lead: <?php echo LinkHelper::getUserProfileLink($project['lead_id'], SystemProduct::SYS_PRODUCT_YONGO, $project['first_name'], $project['last_name']); ?> </div> <div>Default Assignee: Project Lead</div> <div>Roles: <a href="/yongo/administration/project/people/<?php echo $projectId; ?> ">View Project Roles</a></div> </td> </tr> </table> </td> </tr> </table>
} else { ?> <tr> <td colspan="3">No Issues</td> </tr> <?php } ?> <?php foreach ($statsComponent as $key => $value) { ?> <tr> <td width="180px"> <?php echo LinkHelper::getYongoIssueListPageLink($key, array('page' => 1, 'project' => $projectId, 'link_to_page' => '/yongo/issue/search', 'sort' => 'created', 'sort_order' => 'desc', 'component' => $value[0], 'resolution' => -2)); ?> </td> <td width="30" align="right"><?php echo $value[1]; ?> </td> <?php $perc = round($value[1] / $count * 100); ?> <td valign="top"> <div style="margin-top: 5px; margin-right: 4px; float:left; background-color: #56A5EC; height: 18px; width: <?php echo $perc * 3; ?> px"></div> <div style="float: left"><?php
public static function drawYongoProjectCalendar($projectId, $month, $year, $userId) { /* draw table */ $calendar = '<table cellpadding="0" cellspacing="0" class="calendar">'; /* table headings */ $headings = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'); $calendar .= '<tr>'; $calendar .= '<td class="calendar-day-head">' . implode('</td><td class="calendar-day-head">', $headings) . '</td>'; $calendar .= '</tr>'; /* days and weeks vars now ... */ $runningDay = date('w', mktime(0, 0, 0, $month, 1, $year)); $daysInMonth = date('t', mktime(0, 0, 0, $month, 1, $year)); $daysInThisWeek = 1; $dayCounter = 0; $dates_array = array(); /* row for week one */ $calendar .= '<tr class="calendar-row">'; /* print "blank" days until the first of the current week */ for ($x = 0; $x < $runningDay; $x++) { $calendar .= '<td class="calendar-day-np"> </td>'; $daysInThisWeek++; } /* keep going with days.... */ for ($list_day = 1; $list_day <= $daysInMonth; $list_day++) { $calendar .= '<td class="calendar-day" valign="top">'; /* add in the day number */ $calendar .= '<div class="day-number">' . $list_day . '</div>'; $dayNr = $list_day; if ($list_day < 10) { $dayNr = '0' . $list_day; } $date = $year . '-' . $month . '-' . $dayNr; /** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/ $issueQueryParameters = array('date_due' => $date, 'project' => $projectId); $issues = UbirimiContainer::get()['repository']->get(Issue::class)->getByParameters($issueQueryParameters, $userId); if ($issues) { $calendar .= '<div>Issues: <a href="/yongo/issue/search?project=' . $projectId . '&date_due_after=' . $date . '&date_due_before=' . $date . '">' . $issues->num_rows . '</a></div>'; while ($issue = $issues->fetch_array(MYSQLI_ASSOC)) { $calendar .= '<a class="calendar-issue-box" href="' . LinkHelper::getYongoIssueViewLinkJustHref($issue['id']) . '">'; $calendar .= '<span style="width: 19px; margin-right: 4px; margin-bottom: 4px; display: inline-block; background-color: ' . $issue['priority_color'] . '"> </span>'; $calendar .= '<div style="display: none" class="calendar-issue-box-content">'; $calendar .= '<a href="/yongo/issue/' . $issue['id'] . '">' . $issue['project_code'] . '-' . $issue['nr'] . '</a> ' . $issue['summary']; $calendar .= '<div>' . str_replace("\n", "<br />", $issue['description']) . '</div>'; $calendar .= '</div>'; $calendar .= '</a>'; } } $calendar .= str_repeat('<p> </p>', 2); $calendar .= '</td>'; if ($runningDay == 6) { $calendar .= '</tr>'; if ($dayCounter + 1 != $daysInMonth) { $calendar .= '<tr class="calendar-row">'; } $runningDay = -1; $daysInThisWeek = 0; } $daysInThisWeek++; $runningDay++; $dayCounter++; } /* finish the rest of the days in the week */ if ($daysInThisWeek < 8 && 8 - $daysInThisWeek != 7) { for ($x = 1; $x <= 8 - $daysInThisWeek; $x++) { $calendar .= '<td class="calendar-day-np"> </td>'; } } /* final row */ $calendar .= '</tr>'; /* end the table */ $calendar .= '</table>'; /* all done, return result */ return $calendar; }
<td> <div class="textLabel">Fix Version/s:</div> </td> <td> <?php $indexVersion = 1; ?> <?php if ($versionsTargeted) { ?> <?php while ($version = $versionsTargeted->fetch_array(MYSQLI_ASSOC)) { ?> <span> <?php echo LinkHelper::getYongoProjectVersionLink($version['project_version_id'], $version['name']); if ($indexVersion < $versionsTargeted->num_rows) { echo ', '; } ?> </span> <?php $indexVersion++; ?> <?php } ?> <?php } else { ?> <span>None</span>
<?php use Ubirimi\LinkHelper; use Ubirimi\Util; require_once __DIR__ . '/../_header.php'; ?> <body> <?php require_once __DIR__ . '/../_menu.php'; ?> <?php $title = LinkHelper::getYongoProjectLink($projectId, $project['name']) . ' > <a class="linkNoUnderline" href="/yongo/project/components/' . $projectId . '">Components</a> > ' . $component['name']; Util::renderBreadCrumb($title); ?> <div class="pageContent"> <ul class="nav nav-tabs" style="padding: 0px;"> <li><a href="/yongo/project/component/<?php echo $componentId; ?> ">Details</a></li> <li class="active"><a href="/yongo/project/component/issues/<?php echo $componentId; ?> " title="Issues">Issues</a></li> </ul> <table width="100%" cellpadding="8"> <tr> <td valign="top"> <?php
foreach ($customFieldsDataUserPickerMultipleUser as $fieldId => $fieldData) { ?> <tr> <td width="160px" class="textLabel"><?php echo $fieldData[0]['field_name']; ?> :</td> <td> <?php $usersCustomField = array(); ?> <?php foreach ($fieldData as $userSelected) { ?> <?php $usersCustomField[] = LinkHelper::getUserProfileLink($userSelected['user_id'], SystemProduct::SYS_PRODUCT_YONGO, $userSelected['first_name'], $userSelected['last_name']); ?> <?php } ?> <?php echo implode(', ', $usersCustomField); ?> </td> </tr> <?php } ?> <?php } ?>
public function indexAction(Request $request, SessionInterface $session) { Util::checkUserIsLoggedInAndRedirect(); $clientId = $session->get('client/id'); $loggedInUserId = $session->get('user/id'); $issueId = $request->get('id'); $issueQueryParameters = array('issue_id' => $issueId); $issue = $this->getRepository(Issue::class)->getByParameters($issueQueryParameters, $loggedInUserId); $projectId = $issue['issue_project_id']; $issueProject = $this->getRepository(YongoProject::class)->getById($projectId); // before going further, check to is if the issue project belongs to the client if ($clientId != $issueProject['client_id']) { return new RedirectResponse('/general-settings/bad-link-access-denied'); } $session->set('selected_product_id', SystemProduct::SYS_PRODUCT_YONGO); if ($request->request->has('move_issue_step_4')) { $currentDate = Util::getServerCurrentDateTime(); $oldIssueData = $this->getRepository(Issue::class)->getByParameters(array('issue_id' => $issueId), $loggedInUserId); $oldIssueData['component'] = $this->getRepository(IssueComponent::class)->getByIssueIdAndProjectId($issueId, $projectId, 'array', 'name'); if ($oldIssueData['component'] == null) { $oldIssueData['component'] = array(); } $oldIssueData['affects_version'] = $this->getRepository(IssueVersion::class)->getByIssueIdAndProjectId($issueId, $projectId, Issue::ISSUE_AFFECTED_VERSION_FLAG, 'array', 'name'); if ($oldIssueData['affects_version'] == null) { $oldIssueData['affects_version'] = array(); } $oldIssueData['fix_version'] = $this->getRepository(IssueVersion::class)->getByIssueIdAndProjectId($issueId, $projectId, Issue::ISSUE_FIX_VERSION_FLAG, 'array', 'name'); if ($oldIssueData['fix_version'] == null) { $oldIssueData['fix_version'] = array(); } $this->getRepository(IssueComponent::class)->deleteByIssueId($issueId); $this->getRepository(IssueVersion::class)->deleteByIssueIdAndFlag($issueId, Issue::ISSUE_FIX_VERSION_FLAG); $this->getRepository(IssueVersion::class)->deleteByIssueIdAndFlag($issueId, Issue::ISSUE_AFFECTED_VERSION_FLAG); if ($session->has('move_issue/new_assignee')) { $this->getRepository(Issue::class)->updateAssigneeRaw($issueId, $session->get('move_issue/new_assignee')); } if (count($session->get('move_issue/new_component'))) { $this->getRepository(Issue::class)->addComponentVersion($issueId, $session->get('move_issue/new_component'), 'issue_component'); } if (count($session->get('move_issue/new_fix_version'))) { $this->getRepository(Issue::class)->addComponentVersion($issueId, $session->get('move_issue/new_fix_version'), 'issue_version', Issue::ISSUE_FIX_VERSION_FLAG); } if (count($session->get('move_issue/new_affects_version'))) { $this->getRepository(Issue::class)->addComponentVersion($issueId, $session->get('move_issue/new_affects_version'), 'issue_version', Issue::ISSUE_AFFECTED_VERSION_FLAG); } $newProjectId = $session->get('move_issue/new_project'); // move the issue $this->getRepository(Issue::class)->move($issueId, $newProjectId, $session->get('move_issue/new_type'), $session->get('move_issue/sub_task_new_issue_type')); $session->remove('move_issue'); $newIssueData = $this->getRepository(Issue::class)->getByParameters(array('issue_id' => $issueId), $loggedInUserId); $fieldChanges = $this->getRepository(Issue::class)->computeDifference($oldIssueData, $newIssueData, array(), array()); $this->getRepository(Issue::class)->updateHistory($issueId, $loggedInUserId, $fieldChanges, $currentDate); $issueEvent = new IssueEvent(null, null, IssueEvent::STATUS_UPDATE, array('oldIssueData' => $oldIssueData, 'fieldChanges' => $fieldChanges)); $this->getLogger()->addInfo('MOVE Yongo issue ' . $oldIssueData['project_code'] . '-' . $oldIssueData['nr'], $this->getLoggerContext()); UbirimiContainer::get()['dispatcher']->dispatch(YongoEvents::YONGO_ISSUE_EMAIL, $issueEvent); return new RedirectResponse(LinkHelper::getYongoIssueViewLinkJustHref($issueId)); } $sectionPageTitle = $session->get('client/settings/title_name') . ' / ' . SystemProduct::SYS_PRODUCT_YONGO_NAME . ' / Move Issue - ' . $issue['project_code'] . '-' . $issue['nr'] . ' ' . $issue['summary']; $previousData = $session->get('move_issue'); $menuSelectedCategory = 'issue'; $newStatusName = $this->getRepository(IssueSettings::class)->getById($session->get('move_issue/new_status'), 'status', 'name'); $newProject = $this->getRepository(YongoProject::class)->getById($session->get('move_issue/new_project')); $newTypeName = $this->getRepository(IssueSettings::class)->getById($session->get('move_issue/new_type'), 'type', 'name'); $issueComponents = $this->getRepository(IssueComponent::class)->getByIssueIdAndProjectId($issue['id'], $projectId); $issueFixVersions = $this->getRepository(IssueVersion::class)->getByIssueIdAndProjectId($issue['id'], $projectId, Issue::ISSUE_FIX_VERSION_FLAG); $issueAffectedVersions = $this->getRepository(IssueVersion::class)->getByIssueIdAndProjectId($issue['id'], $projectId, Issue::ISSUE_AFFECTED_VERSION_FLAG); $newIssueComponents = null; $newIssueFixVersions = null; $newIssueAffectsVersions = null; if (count($session->get('move_issue/new_component'))) { $newIssueComponents = $this->getRepository(IssueComponent::class)->getByIds($session->get('move_issue/new_component')); } if (count($session->get('move_issue/new_fix_version'))) { $newIssueFixVersions = $this->getRepository(IssueVersion::class)->getByIds($session->get('move_issue/new_fix_version')); } if (count($session->get('move_issue/new_affects_version'))) { $newIssueAffectsVersions = $this->getRepository(IssueVersion::class)->getByIds($session->get('move_issue/new_affects_version')); } $newUserAssignee = $this->getRepository(UbirimiUser::class)->getById($session->get('move_issue/new_assignee')); return $this->render(__DIR__ . '/../../../Resources/views/issue/move/MoveStep4.php', get_defined_vars()); }
<td><div class="textLabel">Assignee:</div></td> <td> <?php if ($issue[Field::FIELD_ASSIGNEE_CODE]) { echo LinkHelper::getUserProfileLink($issue[Field::FIELD_ASSIGNEE_CODE], SystemProduct::SYS_PRODUCT_YONGO, $issue['ua_first_name'], $issue['ua_last_name']); } else { echo 'Unassigned'; } ?> </td> </tr> <tr> <td><div class="textLabel">Reporter:</div></td> <td> <?php echo LinkHelper::getUserProfileLink($issue[Field::FIELD_REPORTER_CODE], SystemProduct::SYS_PRODUCT_YONGO, $issue['ur_first_name'], $issue['ur_last_name']); ?> </td> </tr> <tr> <td id="sectDescription" class="sectionDetail" colspan="2"> <span class="sectionDetailTitle headerPageTextSmall">Dates</span> </td> </tr> <tr> <td> <div class="textLabel">Created:</div> </td> <td><?php if ($issue['date_created']) { echo date('j M Y H:i', strtotime($issue['date_created']));
> <?php if (Util::userHasClientAdministrationPermission()) { ?> <td width="22"> <input type="checkbox" value="1" id="el_check_<?php echo $user['id']; ?> " /> </td> <?php } ?> <td> <?php echo LinkHelper::getUserProfileLink($user['id'], SystemProduct::SYS_PRODUCT_YONGO, $user['first_name'], $user['last_name']); ?> </td> <td><?php echo $user['username']; ?> </td> <td><?php echo $user['email']; ?> </td> <td> <?php if ($user['customer_service_desk_flag']) { ?> <span>Yes</span>
<?php use Ubirimi\LinkHelper; use Ubirimi\Util; Util::checkUserIsLoggedInAndRedirect(); $projectId = $request->get('id'); ?> <table cellpadding="8px"> <tr> <td colspan="3"><div class="headerPageText">Project predefined filters</div></td> </tr> <tr> <td><?php echo LinkHelper::getYongoIssueListPageLink('All Issues', array('page' => 1, 'class' => ' ', 'link_to_page' => '/yongo/issue/search', 'sort' => 'created', 'project' => $projectId, 'sort_order' => 'desc')); ?> </td> <td><?php echo LinkHelper::getYongoIssueListPageLink('All Open Issues', array('page' => 1, 'link_to_page' => '/yongo/issue/search', 'sort' => 'created', 'sort_order' => 'desc', 'resolution' => '-2', 'project' => $projectId)); ?> </td> <td><?php echo LinkHelper::getYongoIssueListPageLink('My Open Issues', array('page' => 1, 'assignee' => $loggedInUserId, 'link_to_page' => '/yongo/issue/search', 'sort' => 'created', 'sort_order' => 'desc', 'resolution' => '-2', 'project' => $projectId)); ?> </td> </tr> </table>
if ($columns[$i] == 'reporter') { ?> <td class="issueUR"> <?php echo LinkHelper::getUserProfileLink($issue[Field::FIELD_REPORTER_CODE], $selectedProductId, $issue['ur_first_name'], $issue['ur_last_name']); ?> </td> <?php } ?> <?php if ($columns[$i] == 'assignee') { ?> <td class="issueUA"> <?php echo LinkHelper::getUserProfileLink($issue[Field::FIELD_ASSIGNEE_CODE], $selectedProductId, $issue['ua_first_name'], $issue['ua_last_name']); ?> </td> <?php } ?> <?php if (substr($columns[$i], 0, 4) == 'sla_') { ?> <?php $slaIds = explode("_", str_replace('sla_', '', $columns[$i])); ?> <td class="issueSLA"> <?php for ($j = 0; $j < count($slaIds); $j++) { ?>
if ($permData) { echo '<ul>'; while ($data = $permData->fetch_array(MYSQLI_ASSOC)) { if ($data['current_assignee']) { echo '<li>Current Assignee (<a href="#" id="perm_delete_' . $data['id'] . '">Delete</a>)</li>'; } else { if ($data['reporter']) { echo '<li>Reporter (<a href="#" id="perm_delete_' . $data['id'] . '">Delete</a>)</li>'; } else { if ($data['project_lead']) { echo '<li>Project Lead (<a href="#" id="perm_delete_' . $data['id'] . '">Delete</a>)</li>'; } } } if ($data['user_id']) { echo '<li>Single User (' . LinkHelper::getUserProfileLink($data['user_id'], SystemProduct::SYS_PRODUCT_YONGO, $data['first_name'], $data['last_name']) . ') (<a href="#" id="perm_delete_' . $data['id'] . '">Delete</a>)</li>'; } if (isset($data['group_id'])) { if (0 == $data['group_id']) { echo '<li>Group (Anyone) (<a href="#" id="perm_delete_' . $data['id'] . '">Delete</a>)</li>'; } else { echo '<li>Group (' . $data['group_name'] . ') (<a href="#" id="perm_delete_' . $data['id'] . '">Delete</a>)</li>'; } } if ($data['permission_role_id']) { echo '<li>Project Role (' . $data['permission_role_name'] . ') (<a href="#" id="perm_delete_' . $data['id'] . '">Delete</a>)</li>'; } } echo '</ul>'; } ?>
<option value="<?php echo $status['linked_issue_status_id']; ?> "><?php echo $status['name']; ?> </option> <?php } ?> </select> </td> </tr> </table> <hr size="1" /> <div align="left"> <button type="submit" name="move_issue_step_2" class="btn ubirimi-btn">Next</button> <a class="btn ubirimi-btn" href="<?php echo LinkHelper::getYongoIssueViewLinkJustHref($issue['id']); ?> ">Cancel</a> </div> </form> </td> </tr> </table> </div> <?php require_once __DIR__ . '/../../_footer.php'; ?> </body>
<td> <div><a class="linkSubMenu" href="#" id="btnCreateNotebook">Create Notebook</a></div> </td> </tr> </table> </div> <?php if ($loggedInUserId) { ?> <div style="display: none;" id="contentUserHome"> <table class="tableMenu" width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><div><?php echo LinkHelper::getUserProfileLink($loggedInUserId, SystemProduct::SYS_PRODUCT_YONGO, 'Profile', '', 'linkSubMenu'); ?> </div></td> </tr> <tr> <td> <span style="border-bottom: 1px solid #BBBBBB; margin-bottom: 4px; padding-bottom: 4px; display: block;"></span> </td> </tr> <tr> <td><div><a class="linkSubMenu" href="/sign-out">Sign out</a></div></td> </tr> </table> </div> <?php }
<tr> <td colspan="2" class="sectionDetail"><span class="sectionDetailSimple headerPageText">Unresolved Issues By Project</span></td> </tr> <?php if ($stats) { ?> <?php while ($row = $stats->fetch_array(MYSQLI_ASSOC)) { ?> <?php if ($row['name']) { ?> <tr> <td> <?php echo LinkHelper::getYongoIssueListPageLink($row['name'], array('page' => 1, 'link_to_page' => '/yongo/issue/search', 'sort' => 'created', 'resolution' => '-2', 'assignee' => $userId, 'project' => $row['project_id'], 'sort_order' => 'desc')); ?> </td> <td><?php echo $row['total']; ?> </td> </tr> <?php } ?> <?php } ?> <?php } else {
?> " title="New">Issues</a></li> </ul> <table> <tr> <td><span class="textLabel">Description:</span></td> <td><?php echo $component['description']; ?> </td> </tr> <tr> <td><span class="textLabel">Leader:</span></td> <td><?php echo LinkHelper::getUserProfileLink($component['user_id'], SystemProduct::SYS_PRODUCT_YONGO, $component['first_name'], $component['last_name']); ?> </td> </tr> </table> <table width="100%" cellpadding="2"> <tr> <td colspan="3" class="sectionDetail"><span class="sectionDetailSimple headerPageText">Issues: Unresolved</span></td> </tr> </table> <?php if ($issues) { ?> <?php $renderParameters = array('issues' => $issues, 'render_checkbox' => false, 'show_header' => true);
echo $activity['name']; ?> </a> created on <?php echo Util::getFormattedDate($activity['date'], $clientSettings['timezone']); ?> <?php } elseif ($activity['action'] == 'edited') { ?> <?php echo LinkHelper::getDocumentadorPageLink($activity['id'], $activity['name']) . ' updated on ' . Util::getFormattedDate($activity['date'], $clientSettings['timezone']); ?> <?php } elseif ($activity['action'] == 'comment') { ?> <?php echo LinkHelper::getDocumentadorPageLink($activity['id'], $activity['name']) . ' commented on ' . Util::getFormattedDate($activity['date'], $clientSettings['timezone']); ?> <?php } ?> </td> </tr> <?php } ?> </table> <?php } else { ?> <div class="infoBox">There is no activity for this user.</div> <?php
$htmlOutputIssueRow .= '<img title="' . $issue['type_name'] . ' - ' . $issue['issue_type_description'] . '" height="16px" src="/yongo/img/issue_type/' . $issue['issue_type_icon_name'] . '" /> '; $htmlOutputIssueRow .= '<a href="/yongo/issue/' . $issue['id'] . '">' . $issue['project_code'] . '-' . $issue['nr'] . '</a>'; $htmlOutputIssueRow .= '</td>'; $htmlOutputIssueRow .= '<td class="tdElementList issueSummary"><a href="/yongo/issue/' . $issue['id'] . '">' . $issue['summary'] . '</a></td>'; $htmlOutputIssueRow .= '<td class="tdElementList issuePriority">'; $htmlOutputIssueRow .= '<img title="' . $issue['priority_name'] . ' - ' . $issue['issue_priority_description'] . '" height="16px" src="/yongo/img/issue_priority/' . $issue['issue_priority_icon_name'] . '" />'; $htmlOutputIssueRow .= '</td>'; $htmlOutputIssueRow .= '<td class="tdElementList issueStatus">' . $issue['status_name'] . '</td>'; $htmlOutputIssueRow .= '<td class="tdElementList issueDC">' . date('j/M/Y', strtotime($issue['date_created'])) . '</td>'; $htmlOutputIssueRow .= '<td class="tdElementList issueDU">'; if ($issue['date_updated']) { $htmlOutputIssueRow .= date('j/M/Y', strtotime($issue['date_updated'])); } $htmlOutputIssueRow .= '</td>'; $htmlOutputIssueRow .= '<td class="tdElementList issueUR">' . LinkHelper::getUserProfileLink($issue[Field::FIELD_REPORTER_CODE], SystemProduct::SYS_PRODUCT_YONGO, $issue['ur_first_name'], $issue['ur_last_name']) . '</td>'; $htmlOutputIssueRow .= '<td class="tdElementList issueUA">' . LinkHelper::getUserProfileLink($issue[Field::FIELD_ASSIGNEE_CODE], SystemProduct::SYS_PRODUCT_YONGO, $issue['ua_first_name'], $issue['ua_last_name']) . '</td>'; $htmlOutputIssueRow .= '</tr>'; } $session->set('array_ids', $arrayIds); if ($htmlOutputIssueRow != '') { echo '<table class="table table-hover table-condensed">'; echo Util::renderTableHeader($getSearchParameters, $columns); echo $htmlOutputIssueRow; echo '</table>'; } else { $htmlOutputIssueRow .= '<table class="table table-hover table-condensed">'; $htmlOutputIssueRow .= '<tr id="table_row_' . $issue['id'] . '">'; $htmlOutputIssueRow .= '<td colspan="' . count($columns) . '">No issues were found to match your search</td>'; $htmlOutputIssueRow .= '</tr>'; $htmlOutputIssueRow .= '</table>'; echo $htmlOutputIssueRow;
<td><?php echo $board['name']; ?> </td> </tr> <tr> <td>Description</td> <td><?php echo $board['description']; ?> </td> </tr> <tr> <td>Created by</td> <td><?php echo LinkHelper::getUserProfileLink($board['user_created_id'], SystemProduct::SYS_PRODUCT_YONGO, $board['first_name'], $board['last_name']); ?> </td> </tr> </table> <ul class="nav nav-tabs" style="padding: 0px;"> <li class="active"><a href="/agile/configure-board/<?php echo $boardId; ?> " title="Summary">Filter</a></li> <li><a href="/agile/edit-board-columns/<?php echo $boardId; ?> " title="Issues">Columns</a></li> <li><a href="/agile/board-swimlane/<?php
public function renderTreeComponents($components, $identationIndex) { ?> <?php while ($components && ($component = $components->fetch_array(MYSQLI_ASSOC))) { ?> <tr id="table_row_<?php echo $component['id']; ?> "> <td width="22"><input type="checkbox" value="1" id="el_check_<?php echo $component['id']; ?> "/></td> <td> <?php for ($i = 0; $i < $identationIndex; $i++) { ?> <?php } ?> <?php echo $component['name']; ?> </td> <td><?php echo $component['description']; ?> </td> <td> <?php if ($component['user_id']) { ?> <?php echo LinkHelper::getUserProfileLink($component['user_id'], SystemProduct::SYS_PRODUCT_YONGO, $component['first_name'], $component['last_name']); ?> </td> <?php } else { ?> <span>No one</span> <?php } ?> </tr> <?php $subComponents = UbirimiContainer::get()['repository']->get(YongoProject::class)->getSubComponents($component['id']); $identationIndex++; if ($subComponents) { UbirimiContainer::get()['repository']->get(YongoProject::class)->renderTreeComponents($subComponents, $identationIndex); } $identationIndex--; ?> <?php } ?> <?php }