[Rt-commit] r3162 - in rtfm/branches/2.1-TESTING: . html/RTFM/Article html/RTFM/Article/Elements

alexmv at bestpractical.com alexmv at bestpractical.com
Wed Jun 15 01:47:18 EDT 2005


Author: alexmv
Date: Wed Jun 15 01:47:17 2005
New Revision: 3162

Added:
   rtfm/branches/2.1-TESTING/html/RTFM/Article/ExtractIntoTopic.html
Modified:
   rtfm/branches/2.1-TESTING/   (props changed)
   rtfm/branches/2.1-TESTING/html/RTFM/Article/Edit.html
   rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/EditTopics
   rtfm/branches/2.1-TESTING/html/RTFM/Article/ExtractFromTicket.html
   rtfm/branches/2.1-TESTING/html/RTFM/Article/ExtractIntoClass.html
Log:
 r4242 at zoq-fot-pik:  chmrr | 2005-06-15 01:47:07 -0400
  * Prompt for topics after asking for class


Modified: rtfm/branches/2.1-TESTING/html/RTFM/Article/Edit.html
==============================================================================
--- rtfm/branches/2.1-TESTING/html/RTFM/Article/Edit.html	(original)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Article/Edit.html	Wed Jun 15 01:47:17 2005
@@ -56,12 +56,17 @@
                        &>
 <tr><td><&|/l&>Topics</&>
 </td><td></td></tr>
+<tr>
+<td class="label"><&|/l&>Topics</&></td>
+<td>
 <& Elements/EditTopics, ArticleObj => $ArticleObj,
                         ClassObj => $ArticleObj->Id ? $ArticleObj->ClassObj : $ClassObj,
                         OnlyThisClass => 1,
                         %ARGS,
                         id => $id
                         &>
+</td>
+</tr>
 <& /Elements/Submit, Label => ($id eq 'new' ? loc('Create') : loc('Save Changes')), color => "#993333" &>
 </form>
 </table>

Modified: rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/EditTopics
==============================================================================
--- rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/EditTopics	(original)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Article/Elements/EditTopics	Wed Jun 15 01:47:17 2005
@@ -16,12 +16,6 @@
 %# 
 %# END LICENSE BLOCK
 
-% if ($ClassObj->Id) {
-<tr>
-<td class="label"><&|/l&>Topics</&></td>
-<td>
-% }
-
 <input type="hidden" name="EditTopics" value="1" />
 <select multiple size="<% $rows > 10 ? 10 : $rows %>" name="Topics">
 <%perl>
@@ -56,10 +50,6 @@
 </optgroup>
 % }
 </select>
-% if ($ClassObj->Id) {
-</td>
-</tr>
-% }
 
 <%INIT>
 use Tree::Simple;

Modified: rtfm/branches/2.1-TESTING/html/RTFM/Article/ExtractFromTicket.html
==============================================================================
--- rtfm/branches/2.1-TESTING/html/RTFM/Article/ExtractFromTicket.html	(original)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Article/ExtractFromTicket.html	Wed Jun 15 01:47:17 2005
@@ -20,6 +20,9 @@
 <form action="Edit.html" method="post">
 <input type="hidden" name="Class" value="<%$ARGS{'Class'}%>">
 <input type="hidden" name="Summary" value="<%$ticket->Subject%>">
+% for (@Topics) {
+<input type="hidden" name="Topics" value="<% $_ %>">
+% }
 <input type="hidden" name="new-RefersTo" value="t:<% $ticket->id%>">
 <table width="100%" valign="top" border=0 cellspacing=0>
 
@@ -67,6 +70,7 @@
 $CustomFields->Limit(FIELD => 'Type', OPERATOR => '=', VALUE => 'Freeform');
 </%init>
 <%ARGS>
-$Class=>undef
+$Class => undef
 $Ticket => undef
+ at Topics => ()
 </%ARGS>

Modified: rtfm/branches/2.1-TESTING/html/RTFM/Article/ExtractIntoClass.html
==============================================================================
--- rtfm/branches/2.1-TESTING/html/RTFM/Article/ExtractIntoClass.html	(original)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Article/ExtractIntoClass.html	Wed Jun 15 01:47:17 2005
@@ -20,16 +20,26 @@
 
 
 Select a class to create a new article in:
-<dl>
+<ul>
 % my $Classes = RT::FM::ClassCollection->new($session{'CurrentUser'});          
 % $Classes->UnLimit;                                                            
 % while (my $Class = $Classes->Next) {                                          
-<dt><a href="ExtractFromTicket.html?Ticket=<%$Ticket%>&Class=<%$Class->Id%>"><%$Class->Name%></a>
-</dt>
-<dd><%$Class->Description%></dd>
-
+<li><a href="ExtractIntoTopic.html?Ticket=<%$Ticket%>&Class=<%$Class->Id%>" onclick="document.getElementById('topics-<% $Class->Id %>').style.display = (document.getElementById('topics-<% $Class->Id %>').style.display == 'block') ? 'none' : 'block'; return false;"><%$Class->Name%></a>: 
+<%$Class->Description%>
+<div id="topics-<%$Class->Id%>" style="display: none">
+<form action="ExtractFromTicket.html">
+<input type="hidden" name="Ticket" value="<% $Ticket %>" />
+<input type="hidden" name="Class"  value="<% $Class->id %>" />
+<& Elements/EditTopics, ClassObj => $Class,
+                        OnlyThisClass => 1,
+                        id => 'new',
+                        &><br />
+<input type="submit" value="Create" />
+</form>
+<br /></div>
+</li>
 % }                                                                             
-</dl>
+</ul>
 <%args>
 $Ticket => undef
 </%args>

Added: rtfm/branches/2.1-TESTING/html/RTFM/Article/ExtractIntoTopic.html
==============================================================================
--- (empty file)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Article/ExtractIntoTopic.html	Wed Jun 15 01:47:17 2005
@@ -0,0 +1,42 @@
+%# BEGIN LICENSE BLOCK
+%# 
+%#  Copyright (c) 2002-2003 Jesse Vincent <jesse at bestpractical.com>
+%#  
+%#  This program is free software; you can redistribute it and/or modify
+%#  it under the terms of version 2 of the GNU General Public License 
+%#  as published by the Free Software Foundation.
+%# 
+%#  A copy of that license should have arrived with this
+%#  software, but in any event can be snarfed from www.gnu.org.
+%# 
+%#  This program is distributed in the hope that it will be useful,
+%#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+%#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+%#  GNU General Public License for more details.
+%# 
+%# END LICENSE BLOCK
+
+<& /RTFM/Elements/Tabs, Title => loc('Extract article from ticket #[_1]',$Ticket) &>
+
+
+Select topics in this class:
+<form action="ExtractFromTicket.html">
+<input type="hidden" name="Ticket" value="<% $Ticket %>" />
+<input type="hidden" name="Class"  value="<% $ClassObj->id %>" />
+<& Elements/EditTopics, ClassObj => $ClassObj,
+                        OnlyThisClass => 1,
+                        id => 'new',
+                        &><br />
+<input type="submit" value="Create" />
+</form>
+<%args>
+$Ticket => undef
+$Class => undef
+</%args>
+<%init>
+my $ClassObj = RT::FM::Class->new($session{'CurrentUser'});
+$ClassObj->Load($Class);
+unless ($ClassObj->Id) {
+    $m->comp("/RTFM/Elements/Error", Why => "'%1' isn't a valid class identifier", $Class);
+}
+</%init>
\ No newline at end of file


More information about the Rt-commit mailing list