[CS-Project-svn_notify] SF.net SVN: cs-project:[928] trunk/1.2/includes/content/helpdesk
Brought to you by:
crazedsanity
From: <cra...@us...> - 2009-02-06 16:59:53
|
Revision: 928 http://cs-project.svn.sourceforge.net/cs-project/?rev=928&view=rev Author: crazedsanity Date: 2009-02-06 16:59:50 +0000 (Fri, 06 Feb 2009) Log Message: ----------- Split helpdesk.inc into pieces (#244). Modified Paths: -------------- trunk/1.2/includes/content/helpdesk/shared.inc Added Paths: ----------- trunk/1.2/includes/content/helpdesk/index.inc trunk/1.2/includes/content/helpdesk/view.inc Copied: trunk/1.2/includes/content/helpdesk/index.inc (from rev 927, trunk/1.2/includes/content/helpdesk/shared.inc) =================================================================== --- trunk/1.2/includes/content/helpdesk/index.inc (rev 0) +++ trunk/1.2/includes/content/helpdesk/index.inc 2009-02-06 16:59:50 UTC (rev 928) @@ -0,0 +1,108 @@ +<?php +/* + * SVN INFORMATION::: + * ------------------ + * Last Author: $Author:crazedsanity $ + * Current Revision: $Revision:637 $ + * Repository Location: $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/includes/content/helpdesk.inc $ + * Last Updated: $Date:2007-11-20 11:04:33 -0600 (Tue, 20 Nov 2007) $ + */ + + + $helpdeskId = $_GET['ID']; + $action = $page->ftsSections[2]; + + if(is_numeric($page->ui->get_cache("project/linkToIssue"))) { + $page->ui->unset_cache("project/linkToIssue"); + } + + + //remove the link in the session that they should return to if not requested. + if($_SESSION['goBackLink'] && !$_GET['goBack']) { + unset($_SESSION['goBackLink']); + } + + + //DISPLAY ALL AVAILABLE HELPDESK ISSUES. + //change the content of the page properly. + $page->set_all_block_rows("content", array("helpdesk_search")); + + $filterData = $page->ui->get_cache("helpdesk/filter"); + if(is_array($filterData)) { + $page->add_template_var("filter_keyword", $filterData['keyword']); + $page->add_template_var("filter_field_". $filterData['field'] ."_selected", "selected"); + } + else { + //no filter array... set one. + $filterData = array(); + $page->ui->set_cache("helpdesk/filter", $filterData); + } + $page->add_template_var("filter_status_id_". $filterData['status_id'] ."_selected", "selected"); + + if($filterData['status_id'] == 'all') { + $primaryFilterArr = NULL; + } + elseif(is_numeric($filterData['status_id'])) { + //the data will already show only items with the given status, so don't add that to the filter again. + $primaryFilterArr = array("status_id" => $filterData['status_id']); + } + else { + $primaryFilterArr = array(); + } + $filter = $filterData; + unset($filter['status_id'], $filter['status']); + + //pull the recordset. + $helpdeskArr = $proj->helpdeskObj->get_records($primaryFilterArr, $currentSortArr, $filter); + + $issueCount = 0; + if(is_array($helpdeskArr)) { + $issueCount = count($helpdeskArr); + } + $page->add_template_var("numRows", $issueCount); + //if there's an array, show it... + if(is_array($helpdeskArr) && count($helpdeskArr) > 0) { + //got good data. + $baseRow = $page->templateRows['helpdesk_row']; + foreach($helpdeskArr as $helpdeskId=>$subData) { + unset($deleteLink); + + + swapValue($bgColor, "rgb(213, 213, 213)", "rgb(194, 194, 194)"); + swapValue($bgColor2, "#d5d5d5", "#c2c2c2"); + + $subData['bgColor'] = $bgColor; + $subData['bgColor2']= $bgColor2; + + //define the text fields, so they can be cleaned & truncated. + $previewLength = 110; + $textFieldArr = array("name", "subject"); + foreach($textFieldArr as $cleanThisField) { + //truncate them... + $subData[$cleanThisField] = truncate_string($subData[$cleanThisField], $previewLength, "... [more]", TRUE); + + //now clean 'em (clean after to avoid truncating html special characters. + $subData[$cleanThisField] = cleanString($subData[$cleanThisField], "htmlentity"); + + //more special parsing to ensure GenericPage{} doesn't make the $ (and random characters after it) disappear. + $subData[$cleanThisField] = str_replace('$', '\$', $subData[$cleanThisField]); + } + + //parse bbCode in preview... + $subData['subject'] = $bbCodeParser->parseString($subData['subject']); + + //truncate the email address... + $subData['email'] = truncate_string($subData['email'], 20, "...", TRUE); + + $subData['helpdesk_id'] = $helpdeskId; + unset($subData['id']); + + //show the "created" and "updated" strings properly... + $subData['created'] = parse_date_string($subData['div1'],TRUE); + $subData['updated'] = parse_date_string($subData['div2'],TRUE); + $finalRow .= mini_parser($baseRow, $subData, "%%", "%%"); + } + $page->add_template_var("helpdesk_row", $finalRow); + } + +?> \ No newline at end of file Modified: trunk/1.2/includes/content/helpdesk/shared.inc =================================================================== --- trunk/1.2/includes/content/helpdesk/shared.inc 2009-02-05 18:23:11 UTC (rev 927) +++ trunk/1.2/includes/content/helpdesk/shared.inc 2009-02-06 16:59:50 UTC (rev 928) @@ -10,7 +10,6 @@ - if($_POST) { $action = strtolower($_POST['action']); $helpdeskId = $_POST['id']; @@ -255,293 +254,8 @@ exit; } } -else { - $helpdeskId = $_GET['ID']; - $action = $page->ftsSections[2]; - - if(is_numeric($page->ui->get_cache("project/linkToIssue"))) { - $page->ui->unset_cache("project/linkToIssue"); - } - - - //remove the link in the session that they should return to if not requested. - if($_SESSION['goBackLink'] && !$_GET['goBack']) { - unset($_SESSION['goBackLink']); - } - - if($action == "create") { - create_page_title($page, array('title' => "Create a Helpdesk Issue")); - $page->set_all_block_rows("content"); - - //show the "category" selection. - $categoryList = $proj->helpdeskObj->get_category_list('bug', TRUE); - $page->add_template_var("select_tags", $categoryList); - - // - $page->add_template_var("email", $_SESSION['email']); - $page->add_template_var("linked_proj", cleanString($_GET['proj']),"numeric"); - - } - elseif($action == "view" && !is_numeric($helpdeskId)) { - //missing ID: throw a message & send 'em packin'. - set_message_wrapper(array( - "title" => "Invalid ID Specified", - "message" => "Unable to retrieve the requested record, due to an invalid ID:<BR>" . - " you were automatically redirected.<BR>" . - "Requested ID: [$helpdeskId]", - "type" => "error" - )); - conditional_header("/". $page->ftsSections[0] ."/". $page->ftsSections[1]); - exit; - } - elseif($action == "view" && is_numeric($helpdeskId)) { - $doNotRipRows = array("edit_form", "info_block", "access_block", "associatedUserBlock"); - $helpdeskData = $proj->helpdeskObj->get_record($helpdeskId); - create_page_title($page, array('title' => "Issue #". $helpdeskId .": \"". $helpdeskData['name'] ."\"")); - - //TODO: handle this better, somehow... AJAX comes to mind. ;) - if($_GET['newTag'] && !$_SESSION['addTag_cache'][$helpdeskData['record_id']][$_GET['newTag']]) { - $tempObj = new tagClass($proj->helpdeskObj->db); - $addRes = $tempObj->add_tag($helpdeskData['record_id'], $_GET['newTag']); - if($addRes) { - $_SESSION['addTag_cache'][$helpdeskData['record_id']][$_GET['newTag']] = $addRes; - } - } - - //show it's "access" properly.. - $page->add_template_var("select_acc_". $helpdeskData['acc'], "selected"); - - //show the "category" properly. - $categoryList = $proj->helpdeskObj->get_category_list($helpdeskData['helpdesk_cat_id']); - $page->add_template_var("select_category_list", $categoryList); - - //convert the returned data into htmlentities so brackets show properly. - $helpdeskData['subject'] = $bbCodeParser->parseString(cleanString($helpdeskData['subject'], "htmlentity_plus_brackets"), TRUE); - $helpdeskData['subject'] = preg_replace('/\s\s/', ' ', $helpdeskData['subject']); - $helpdeskData['subject'] = preg_replace('/\S\s\s/', ' ', $helpdeskData['subject']); - - - $helpdeskData['name'] = cleanString($helpdeskData['name'], "htmlentity_plus_brackets"); - $helpdeskData['solution'] = cleanString($helpdeskData['solution'], "htmlentity_plus_brackets"); - - //make the wrapping SANE. - #$helpdeskData['subject'] = wordwrap($helpdeskData['subject'], FORMAT_WORDWRAP); - - //show the buttons appropriate to their membership level & ownership. - //if they're the owner, show the "solution" section. - $assignedStr = $helpdeskData['leader_contact_id']; - if($helpdeskData['status_id'] == 4) { - //CLOSED: allow the current user to re-open this issue. - $doNotRipRows[] = "assigned_text"; - $doNotRipRows[] = "priority_text"; - $doNotRipRows[] = "reopen_button"; - } - else { - //NOT closed... - $doNotRipRows[] = "assigned_optionList"; - $doNotRipRows[] = "priority_optionList"; - $doNotRipRows[] = "editable_tags"; - if(($assignedStr == $_SESSION['contact_id']) || ($assignedStr == "" || is_null($assignedStr))) { - //well, we can show 'em the update/modify button. - $doNotRipRows[] = "update_button"; - if($_SESSION['contact_id'] == $assignedStr) { - //they're the owner... show 'em more options. - $doNotRipRows[] = "solution_row"; - $doNotRipRows[] = "owner_options"; - } - //if they're the owner, show 'em more options... - } - elseif($_SESSION['isGroupOwner']) { - //we got an OWNER!!! - $doNotRipRows[] = "owner_options"; - } - $doNotRipRows[] = "remark_row"; - $doNotRipRows[] = "buttons_row"; - $doNotRipRows[] = 'accessBlock__modifyButton'; - $doNotRipRows[] = 'linkToIssue'; - - if($helpdeskData['status_id'] == 6) { - //yeah, it's dirty... but it highlights the fact that it's been re-opened. - $helpdeskData['status_text'] = '<font color="red">'. $helpdeskData['status_text'] .'</font>'; - } - - //keep the set of data allows it to be linked to a project. - $doNotRipRows[] = "edit_project_selection"; - - //TODO: implement a link for updating project associations. - #$page->add_template_var("select_project_list", $proj->create_project_option_list($helpdeskData['ancestry'], NULL)); - } - $doNotRipRows[] = 'update_button'; - - //TODO: get ancestry data for this! - if($helpdeskData['ancestry_level'] > 1) { - $doNotRipRows[] = "link_to_parent_project"; - - //get the parent. - //TODO: since mainRecord{} tries to enforce having criteria of "is_helpdesk_issue" set, there's extra crap logic required. - //TODO: fix the afore-mentioned bug by splitting helpdesk & project issues into separate tables. - $oldIsHelpdesk = $proj->helpdeskObj->isHelpdeskIssue; - $proj->helpdeskObj->isHelpdeskIssue=FALSE; - $parentData = $proj->helpdeskObj->get_parent_record($helpdeskData['ancestry']); - $proj->helpdeskObj->isHelpdeskIssue=$oldIsHelpdesk; - $page->add_template_var("ancestryLinkList", $proj->get_ancestry_link_list($parentData['public_id'], TRUE, TRUE, TRUE)); - } - - //create the priority list. - $page->add_template_var("select_priority_list", create_priority_option_list($helpdeskData['priority'],9,0)); - - //create the list of users. - //TODO: retrieve list of attached contacts. - $page->add_template_var("user_assign_list", $proj->create_user_option_list($helpdeskData['leader_contact_id'],NULL,NULL,"n/a")); - - //add everything to the page as a template var... - $myNotes = $helpdeskData['notes']; - unset($helpdeskData['notes']); - foreach($helpdeskData as $field=>$value) { - $page->add_template_var($field, $value); - } - - //now, rip all block rows that don't need to be there... - $page->set_all_block_rows("content", $doNotRipRows); - - $taskData = $proj->helpdeskObj->get_tasks($helpdeskId); - $page->set_all_block_rows('related_task'); - if(is_array($taskData)) { - parse_related_task($taskData); - } - - - - $useTextTags = FALSE; - if($helpdeskData['status_id'] == 4) { - $useTextTags = TRUE; - } - generate_tag_list($helpdeskData['record_id'], $useTextTags); - - - - //Display tags that can be added. - generate_addable_tags($helpdeskData['record_id']); - - //now parse the note rows. - if(is_array($myNotes) && count($myNotes)) { - $baseRow = $page->templateRows['issueNotes']; - foreach($myNotes as $repArr) { - $repArr['body'] = $bbCodeParser->parseString($repArr['body']); - - $repArr['subject'] = cleanString($repArr['subject'], "htmlentity_plus_brackets"); - - - $repArr['solutionIndicator'] = ""; - if($repArr['is_solution'] == 't') { - $repArr['solutionIndicator'] = "<img src='/images/checkmark_green.jpg' height='14px'>"; - } - $issueNotesRow .= mini_parser($baseRow, $repArr, '%%', '%%'); - } - $page->add_template_var('issueNotes', $issueNotesRow); - } - - - //show the list of associated users. - $parsedRow = $page->templateRows['associatedUser_none']; - if(is_array($helpdeskData['associatedUsers'])) { - $baseRow = $page->templateRows['associatedUser_data']; - $parsedRow = ""; - foreach($helpdeskData['associatedUsers'] as $id => $data) { - $displayName = truncate_string($data['fname'] ." ". $data['lname'], 20); - $repArr = $data; - $repArr['displayName'] = $displayName; - $parsedRow .= $page->mini_parser($baseRow, $repArr, '%%', '%%'); - } - } - $page->add_template_var('associatedUser_data', $parsedRow); - - } - else { - //DISPLAY ALL AVAILABLE HELPDESK ISSUES. - //change the content of the page properly. - $page->set_all_block_rows("content", array("helpdesk_search")); - - $filterData = $page->ui->get_cache("helpdesk/filter"); - if(is_array($filterData)) { - $page->add_template_var("filter_keyword", $filterData['keyword']); - $page->add_template_var("filter_field_". $filterData['field'] ."_selected", "selected"); - } - else { - //no filter array... set one. - $filterData = array(); - $page->ui->set_cache("helpdesk/filter", $filterData); - } - $page->add_template_var("filter_status_id_". $filterData['status_id'] ."_selected", "selected"); - - if($filterData['status_id'] == 'all') { - $primaryFilterArr = NULL; - } - elseif(is_numeric($filterData['status_id'])) { - //the data will already show only items with the given status, so don't add that to the filter again. - $primaryFilterArr = array("status_id" => $filterData['status_id']); - } - else { - $primaryFilterArr = array(); - } - $filter = $filterData; - unset($filter['status_id'], $filter['status']); - - //pull the recordset. - $helpdeskArr = $proj->helpdeskObj->get_records($primaryFilterArr, $currentSortArr, $filter); - - $issueCount = 0; - if(is_array($helpdeskArr)) { - $issueCount = count($helpdeskArr); - } - $page->add_template_var("numRows", $issueCount); - //if there's an array, show it... - if(is_array($helpdeskArr) && count($helpdeskArr) > 0) { - //got good data. - $baseRow = $page->templateRows['helpdesk_row']; - foreach($helpdeskArr as $helpdeskId=>$subData) { - unset($deleteLink); - - - swapValue($bgColor, "rgb(213, 213, 213)", "rgb(194, 194, 194)"); - swapValue($bgColor2, "#d5d5d5", "#c2c2c2"); - - $subData['bgColor'] = $bgColor; - $subData['bgColor2']= $bgColor2; - - //define the text fields, so they can be cleaned & truncated. - $previewLength = 110; - $textFieldArr = array("name", "subject"); - foreach($textFieldArr as $cleanThisField) { - //truncate them... - $subData[$cleanThisField] = truncate_string($subData[$cleanThisField], $previewLength, "... [more]", TRUE); - - //now clean 'em (clean after to avoid truncating html special characters. - $subData[$cleanThisField] = cleanString($subData[$cleanThisField], "htmlentity"); - - //more special parsing to ensure GenericPage{} doesn't make the $ (and random characters after it) disappear. - $subData[$cleanThisField] = str_replace('$', '\$', $subData[$cleanThisField]); - } - - //parse bbCode in preview... - $subData['subject'] = $bbCodeParser->parseString($subData['subject']); - - //truncate the email address... - $subData['email'] = truncate_string($subData['email'], 20, "...", TRUE); - - $subData['helpdesk_id'] = $helpdeskId; - unset($subData['id']); - - //show the "created" and "updated" strings properly... - $subData['created'] = parse_date_string($subData['div1'],TRUE); - $subData['updated'] = parse_date_string($subData['div2'],TRUE); - $finalRow .= mini_parser($baseRow, $subData, "%%", "%%"); - } - $page->add_template_var("helpdesk_row", $finalRow); - } - } -} + //call the function to add AJAX stuff... addAjax(); Copied: trunk/1.2/includes/content/helpdesk/view.inc (from rev 927, trunk/1.2/includes/content/helpdesk/shared.inc) =================================================================== --- trunk/1.2/includes/content/helpdesk/view.inc (rev 0) +++ trunk/1.2/includes/content/helpdesk/view.inc 2009-02-06 16:59:50 UTC (rev 928) @@ -0,0 +1,218 @@ +<?php +/* + * SVN INFORMATION::: + * ------------------ + * Last Author: $Author:crazedsanity $ + * Current Revision: $Revision:637 $ + * Repository Location: $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/includes/content/helpdesk.inc $ + * Last Updated: $Date:2007-11-20 11:04:33 -0600 (Tue, 20 Nov 2007) $ + */ + + + + $helpdeskId = $_GET['ID']; + $action = $page->ftsSections[2]; + + if(is_numeric($page->ui->get_cache("project/linkToIssue"))) { + $page->ui->unset_cache("project/linkToIssue"); + } + + + //remove the link in the session that they should return to if not requested. + if($_SESSION['goBackLink'] && !$_GET['goBack']) { + unset($_SESSION['goBackLink']); + } + + if($action == "create") { + create_page_title($page, array('title' => "Create a Helpdesk Issue")); + $page->set_all_block_rows("content"); + + //show the "category" selection. + $categoryList = $proj->helpdeskObj->get_category_list('bug', TRUE); + $page->add_template_var("select_tags", $categoryList); + + // + $page->add_template_var("email", $_SESSION['email']); + $page->add_template_var("linked_proj", cleanString($_GET['proj']),"numeric"); + + } + elseif($action == "view" && !is_numeric($helpdeskId)) { + //missing ID: throw a message & send 'em packin'. + set_message_wrapper(array( + "title" => "Invalid ID Specified", + "message" => "Unable to retrieve the requested record, due to an invalid ID:<BR>" . + " you were automatically redirected.<BR>" . + "Requested ID: [$helpdeskId]", + "type" => "error" + )); + conditional_header("/". $page->ftsSections[0] ."/". $page->ftsSections[1]); + exit; + } + elseif($action == "view" && is_numeric($helpdeskId)) { + $doNotRipRows = array("edit_form", "info_block", "access_block", "associatedUserBlock"); + $helpdeskData = $proj->helpdeskObj->get_record($helpdeskId); + create_page_title($page, array('title' => "Issue #". $helpdeskId .": \"". $helpdeskData['name'] ."\"")); + + //TODO: handle this better, somehow... AJAX comes to mind. ;) + if($_GET['newTag'] && !$_SESSION['addTag_cache'][$helpdeskData['record_id']][$_GET['newTag']]) { + $tempObj = new tagClass($proj->helpdeskObj->db); + $addRes = $tempObj->add_tag($helpdeskData['record_id'], $_GET['newTag']); + if($addRes) { + $_SESSION['addTag_cache'][$helpdeskData['record_id']][$_GET['newTag']] = $addRes; + } + } + + //show it's "access" properly.. + $page->add_template_var("select_acc_". $helpdeskData['acc'], "selected"); + + //show the "category" properly. + $categoryList = $proj->helpdeskObj->get_category_list($helpdeskData['helpdesk_cat_id']); + $page->add_template_var("select_category_list", $categoryList); + + //convert the returned data into htmlentities so brackets show properly. + $helpdeskData['subject'] = $bbCodeParser->parseString(cleanString($helpdeskData['subject'], "htmlentity_plus_brackets"), TRUE); + $helpdeskData['subject'] = preg_replace('/\s\s/', ' ', $helpdeskData['subject']); + $helpdeskData['subject'] = preg_replace('/\S\s\s/', ' ', $helpdeskData['subject']); + + + $helpdeskData['name'] = cleanString($helpdeskData['name'], "htmlentity_plus_brackets"); + $helpdeskData['solution'] = cleanString($helpdeskData['solution'], "htmlentity_plus_brackets"); + + //make the wrapping SANE. + #$helpdeskData['subject'] = wordwrap($helpdeskData['subject'], FORMAT_WORDWRAP); + + //show the buttons appropriate to their membership level & ownership. + //if they're the owner, show the "solution" section. + $assignedStr = $helpdeskData['leader_contact_id']; + if($helpdeskData['status_id'] == 4) { + //CLOSED: allow the current user to re-open this issue. + $doNotRipRows[] = "assigned_text"; + $doNotRipRows[] = "priority_text"; + $doNotRipRows[] = "reopen_button"; + } + else { + //NOT closed... + $doNotRipRows[] = "assigned_optionList"; + $doNotRipRows[] = "priority_optionList"; + $doNotRipRows[] = "editable_tags"; + if(($assignedStr == $_SESSION['contact_id']) || ($assignedStr == "" || is_null($assignedStr))) { + //well, we can show 'em the update/modify button. + $doNotRipRows[] = "update_button"; + if($_SESSION['contact_id'] == $assignedStr) { + //they're the owner... show 'em more options. + $doNotRipRows[] = "solution_row"; + $doNotRipRows[] = "owner_options"; + } + //if they're the owner, show 'em more options... + } + elseif($_SESSION['isGroupOwner']) { + //we got an OWNER!!! + $doNotRipRows[] = "owner_options"; + } + $doNotRipRows[] = "remark_row"; + $doNotRipRows[] = "buttons_row"; + $doNotRipRows[] = 'accessBlock__modifyButton'; + $doNotRipRows[] = 'linkToIssue'; + + if($helpdeskData['status_id'] == 6) { + //yeah, it's dirty... but it highlights the fact that it's been re-opened. + $helpdeskData['status_text'] = '<font color="red">'. $helpdeskData['status_text'] .'</font>'; + } + + //keep the set of data allows it to be linked to a project. + $doNotRipRows[] = "edit_project_selection"; + + //TODO: implement a link for updating project associations. + #$page->add_template_var("select_project_list", $proj->create_project_option_list($helpdeskData['ancestry'], NULL)); + } + $doNotRipRows[] = 'update_button'; + + //TODO: get ancestry data for this! + if($helpdeskData['ancestry_level'] > 1) { + $doNotRipRows[] = "link_to_parent_project"; + + //get the parent. + //TODO: since mainRecord{} tries to enforce having criteria of "is_helpdesk_issue" set, there's extra crap logic required. + //TODO: fix the afore-mentioned bug by splitting helpdesk & project issues into separate tables. + $oldIsHelpdesk = $proj->helpdeskObj->isHelpdeskIssue; + $proj->helpdeskObj->isHelpdeskIssue=FALSE; + $parentData = $proj->helpdeskObj->get_parent_record($helpdeskData['ancestry']); + $proj->helpdeskObj->isHelpdeskIssue=$oldIsHelpdesk; + $page->add_template_var("ancestryLinkList", $proj->get_ancestry_link_list($parentData['public_id'], TRUE, TRUE, TRUE)); + } + + //create the priority list. + $page->add_template_var("select_priority_list", create_priority_option_list($helpdeskData['priority'],9,0)); + + //create the list of users. + //TODO: retrieve list of attached contacts. + $page->add_template_var("user_assign_list", $proj->create_user_option_list($helpdeskData['leader_contact_id'],NULL,NULL,"n/a")); + + //add everything to the page as a template var... + $myNotes = $helpdeskData['notes']; + unset($helpdeskData['notes']); + foreach($helpdeskData as $field=>$value) { + $page->add_template_var($field, $value); + } + + //now, rip all block rows that don't need to be there... + $page->set_all_block_rows("content", $doNotRipRows); + + $taskData = $proj->helpdeskObj->get_tasks($helpdeskId); + $page->set_all_block_rows('related_task'); + if(is_array($taskData)) { + parse_related_task($taskData); + } + + + + $useTextTags = FALSE; + if($helpdeskData['status_id'] == 4) { + $useTextTags = TRUE; + } + generate_tag_list($helpdeskData['record_id'], $useTextTags); + + + + //Display tags that can be added. + generate_addable_tags($helpdeskData['record_id']); + + //now parse the note rows. + if(is_array($myNotes) && count($myNotes)) { + $baseRow = $page->templateRows['issueNotes']; + foreach($myNotes as $repArr) { + $repArr['body'] = $bbCodeParser->parseString($repArr['body']); + + $repArr['subject'] = cleanString($repArr['subject'], "htmlentity_plus_brackets"); + + + $repArr['solutionIndicator'] = ""; + if($repArr['is_solution'] == 't') { + $repArr['solutionIndicator'] = "<img src='/images/checkmark_green.jpg' height='14px'>"; + } + $issueNotesRow .= mini_parser($baseRow, $repArr, '%%', '%%'); + } + $page->add_template_var('issueNotes', $issueNotesRow); + } + + + //show the list of associated users. + $parsedRow = $page->templateRows['associatedUser_none']; + if(is_array($helpdeskData['associatedUsers'])) { + $baseRow = $page->templateRows['associatedUser_data']; + $parsedRow = ""; + foreach($helpdeskData['associatedUsers'] as $id => $data) { + $displayName = truncate_string($data['fname'] ." ". $data['lname'], 20); + $repArr = $data; + $repArr['displayName'] = $displayName; + $parsedRow .= $page->mini_parser($baseRow, $repArr, '%%', '%%'); + } + } + $page->add_template_var('associatedUser_data', $parsedRow); + + } + +//call the function to add AJAX stuff... +addAjax(); + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |