[CS-Project-svn_notify] SF.net SVN: cs-project: [714] trunk
Brought to you by:
crazedsanity
From: <cra...@us...> - 2007-12-27 00:04:27
|
Revision: 714 http://cs-project.svn.sourceforge.net/cs-project/?rev=714&view=rev Author: crazedsanity Date: 2007-12-26 16:04:23 -0800 (Wed, 26 Dec 2007) Log Message: ----------- Remove ability to add/remove tags on closed issues (#119). Modified Paths: -------------- trunk/includes/content/helpdesk.inc trunk/templates/content/helpdesk/view.content.tmpl Modified: trunk/includes/content/helpdesk.inc =================================================================== --- trunk/includes/content/helpdesk.inc 2007-12-19 18:52:52 UTC (rev 713) +++ trunk/includes/content/helpdesk.inc 2007-12-27 00:04:23 UTC (rev 714) @@ -278,14 +278,16 @@ //if they're the owner, show the "solution" section. $assignedStr = $helpdeskData['leader_contact_id']; if($helpdeskData['status_id'] == 4) { - //allow the current user to re-open this issue. + //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"; @@ -353,7 +355,14 @@ $myTagList = $proj->tagObj->get_tags_for_record($helpdeskData['record_id']); if(is_array($myTagList)) { - $baseRow = $page->templateRows['removeable_tag']; + if($helpdeskData['status_id'] == 4) { + $tagListVar = 'text_tags'; + $baseRow = $page->templateRows['text_tags']; + } + else { + $tagListVar = 'removeable_tag'; + $baseRow = $page->templateRows['removeable_tag']; + } $myTagRow = ""; $tCount = 0; foreach($myTagList as $tagNameId=>$tagName) { @@ -371,12 +380,8 @@ ); $myTagRow .= mini_parser($baseRow, $repArr, '%%', '%%'); } + $page->add_template_var($tagListVar, $myTagRow); } - else { - //tell 'em there's no tags! - $myTagRow = ""; - } - $page->add_template_var('removeable_tag', $myTagRow); //Display tags that can be added. $availableTagsList = $proj->tagObj->get_available_tags_for_record($helpdeskData['record_id'], 3); Modified: trunk/templates/content/helpdesk/view.content.tmpl =================================================================== --- trunk/templates/content/helpdesk/view.content.tmpl 2007-12-19 18:52:52 UTC (rev 713) +++ trunk/templates/content/helpdesk/view.content.tmpl 2007-12-27 00:04:23 UTC (rev 714) @@ -149,19 +149,24 @@ </th> <td colspan="2"> + <!-- BEGIN editable_tags --> <!-- BEGIN removeable_tag --><a href="/content/tags/remove/%%tag_name_id%%/{record_id}">%%name%%</a>%%separator%% <!-- END removeable_tag --> - - <BR> - + + <BR> + <select> <!-- BEGIN addTag_option --> <option value='%%value%%'%%selectedString%% onClick="location.href='/content/tags/add/%%value%%/{record_id}'">%%display%%</option> <!-- END addTag_option --> {add_tag_list} </select> <i><font color="red">(NOTE: this will *immediately* add a tag -- don't do it if you've changed something!)</font></i><BR> - <input type="text" name="newTag" value=""><input type="button" value="Add New Tag" - onClick="this.value='Creating Tag...';document.main.newTag.readonly=true;document.hiddenAddTagForm.new_tag.value=document.main.newTag.value;document.hiddenAddTagForm.submit()"></td> + <input type="text" name="newTag" value=""><input type="button" value="Add New Tag" + onClick="this.value='Creating Tag...';document.main.newTag.readonly=true;document.hiddenAddTagForm.new_tag.value=document.main.newTag.value;document.hiddenAddTagForm.submit()"> + <!-- END editable_tags --> + <!-- BEGIN text_tags --><b>%%name%%</b>%%separator%% + <!-- END text_tags --> + </td> </tr> <tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |