[CS-Project-svn_notify] SF.net SVN: cs-project: [664] trunk
Brought to you by:
crazedsanity
From: <cra...@us...> - 2007-11-21 20:34:26
|
Revision: 664 http://cs-project.svn.sourceforge.net/cs-project/?rev=664&view=rev Author: crazedsanity Date: 2007-11-21 12:34:21 -0800 (Wed, 21 Nov 2007) Log Message: ----------- Formatting of helpdesk issue body & notes without "pre" tags. Modified Paths: -------------- trunk/includes/content/helpdesk.inc trunk/includes/extern/helpdesk.inc trunk/templates/content/helpdesk/view.content.tmpl trunk/templates/extern/helpdesk/view.content.tmpl Modified: trunk/includes/content/helpdesk.inc =================================================================== --- trunk/includes/content/helpdesk.inc 2007-11-21 19:03:03 UTC (rev 663) +++ trunk/includes/content/helpdesk.inc 2007-11-21 20:34:21 UTC (rev 664) @@ -247,12 +247,16 @@ $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")); + $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); + #$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. @@ -367,6 +371,9 @@ foreach($myNotes as $repArr) { $repArr['body'] = $bbCodeParser->parseString(cleanString($repArr['body'], "htmlentity_plus_brackets")); $repArr['subject'] = cleanString($repArr['subject'], "htmlentity_plus_brackets"); + $repArr['subject'] = preg_replace('/\s\s/', ' ', $repArr['subject']); + $repArr['subject'] = preg_replace('/\S\s\s/', ' ', $repArr['subject']); + $repArr['solutionIndicator'] = ""; if($repArr['is_solution'] == 't') { Modified: trunk/includes/extern/helpdesk.inc =================================================================== --- trunk/includes/extern/helpdesk.inc 2007-11-21 19:03:03 UTC (rev 663) +++ trunk/includes/extern/helpdesk.inc 2007-11-21 20:34:21 UTC (rev 664) @@ -147,7 +147,9 @@ //make the wrapping SANE. $helpdeskData['subject'] = wordwrap($helpdeskData['subject'], FORMAT_WORDWRAP); - $helpdeskData['subject'] = $bbCodeParser->parseString($helpdeskData['subject'],FALSE); + $helpdeskData['subject'] = $bbCodeParser->parseString($helpdeskData['subject'], TRUE); + $helpdeskData['subject'] = preg_replace('/\s\s/', ' ', $helpdeskData['subject']); + $helpdeskData['subject'] = preg_replace('/\S\s\s/', ' ', $helpdeskData['subject']); //add everything to the page as a template var... foreach($helpdeskData as $field=>$value) { @@ -177,7 +179,10 @@ $baseRow = $page->templateRows['issueNotes']; foreach($myNotes as $repArr) { $repArr['body'] = cleanString($repArr['body'], "htmlentity_plus_brackets"); - $repArr['body'] = $bbCodeParser->parseString($repArr['body'], FALSE); + $repArr['body'] = $bbCodeParser->parseString($repArr['body'], TRUE); + $repArr['body'] = preg_replace('/\s\s/', ' ', $repArr['body']); + $repArr['body'] = preg_replace('/\S\s\s/', ' ', $repArr['body']); + $repArr['subject'] = cleanString($repArr['subject'], "htmlentity_plus_brackets"); $repArr['solutionIndicator'] = ""; Modified: trunk/templates/content/helpdesk/view.content.tmpl =================================================================== --- trunk/templates/content/helpdesk/view.content.tmpl 2007-11-21 19:03:03 UTC (rev 663) +++ trunk/templates/content/helpdesk/view.content.tmpl 2007-11-21 20:34:21 UTC (rev 664) @@ -142,7 +142,7 @@ <th style="border-bottom:solid #000 1px;" align="right">Issue Text:</th> - <td style="border-bottom:solid #000 1px;" width="650" colspan="2" nowrap><pre>{subject}</pre></td> + <td style="border-bottom:solid #000 1px;" width="650" colspan="2" nowrap><code>{subject}</code></td> </tr> <tr> <th style="border-bottom:solid #000 1px;" align="right">Notes:<BR><font size="-3"><i>(Includes previous/current<BR>solution(s), if available)</i></font></th> Modified: trunk/templates/extern/helpdesk/view.content.tmpl =================================================================== --- trunk/templates/extern/helpdesk/view.content.tmpl 2007-11-21 19:03:03 UTC (rev 663) +++ trunk/templates/extern/helpdesk/view.content.tmpl 2007-11-21 20:34:21 UTC (rev 664) @@ -37,17 +37,17 @@ <th style="border-bottom:solid #000 1px;" align="right" valign="top">Issue Text:</th> - <td style="border-bottom:solid #000 1px;" width="650" colspan="2"><pre>{subject}</pre></td> + <td style="border-bottom:solid #000 1px;" width="650" colspan="2"><code>{subject}</code></td> </tr> <tr> <th style="border-bottom:solid #000 1px;" align="right">Notes:<BR><font size="-3"><i>(Includes previous/current<BR>solution(s), if available)</i></font></th> <td style="border-bottom:solid #000 1px;" colspan="2"> <!-- BEGIN issueNotes --><div style="border-top:dashed #000 1px;">%%solutionIndicator%% <u> [#%%note_id%%] <b>%%subject%%</b> (%%fname%%@%%created%%)</u></div> - <div style="width:100%; overflow:auto"><pre style="font-size:10px;">%%body%%</pre></div> + <div style="width:100%; overflow:auto"><code style="font-size:10px;">%%body%%</code></div> <!-- END issueNotes --> </td> </tr> -<!-- BEGIN remark_row --> + <tr> <td colspan="3"><h3 style="display:inline">Email:</h3> @@ -72,7 +72,7 @@ <input name="action" value="Remark" type="submit"> </td> </tr> -<!-- END remxark_row --> + </tbody> </table> </form> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |