Changeset 11
- Timestamp:
- 01/14/06 02:44:09 (3 years ago)
- Files:
-
- trunk/agree.pl (added)
- trunk/annot.dtd (added)
- trunk/buildquery.html (added)
- trunk/cookie.htm (added)
- trunk/deadline-notes.txt (added)
- trunk/emancproc.final.html (added)
- trunk/emancproc.prelim.html (added)
- trunk/getnotes-mv.pl (added)
- trunk/getnotes.html (added)
- trunk/getnotes.pl (added)
- trunk/gpl2-gpl3.xml (deleted)
- trunk/intensity.html (added)
- trunk/Logout.html (added)
- trunk/noterequest.pl (added)
- trunk/perl-xmlrpc-basic-auth.txt (added)
- trunk/query.html (added)
- trunk/Reminder.html (added)
- trunk/revision-viewing-notes.txt (added)
- trunk/rt-test.pl (modified) (5 diffs)
- trunk/rtNoAuth/changeshown.html (modified) (3 diffs)
- trunk/rtNoAuth/Elements/PickCriteria (modified) (2 diffs)
- trunk/rtNoAuth/readsay.html (modified) (9 diffs)
- trunk/rtNoAuth/xmlresults.html (modified) (3 diffs)
- trunk/scratch.html (added)
- trunk/searchhi-dom.js (added)
- trunk/searchhi-para.js (added)
- trunk/searchhi-serialize.js (added)
- trunk/searchhi-works.js (added)
- trunk/searchhi.js (modified) (1 diff)
- trunk/selectxpath.xsl (modified) (2 diffs)
- trunk/showcomments.forBP.txt (added)
- trunk/showcomments.pl (added)
- trunk/stet-ahoy.js (added)
- trunk/stet-broken.css (added)
- trunk/stet-build-query.html (added)
- trunk/stet-mason.html (added)
- trunk/stet-spec.txt (modified) (2 diffs)
- trunk/stet-submit.pl (modified) (4 diffs)
- trunk/stet.css (modified) (2 diffs)
- trunk/stet.js (modified) (3 diffs)
- trunk/stetresults.rdf (added)
- trunk/stetsubs.pl (modified) (2 diffs)
- trunk/ticket-display.html (added)
- trunk/todo-2006-01-03 (added)
- trunk/xmlrpc-baughj.pl (added)
- trunk/xmlrpcinfo.txt (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/rt-test.pl
r9 r11 1 1 #!/usr/bin/perl -w 2 # Copyright 2005 Software Freedom Law Center, Inc. 2 # Copyright (C) 2005, 2006 Software Freedom Law Center, Inc. 3 # Author: Orion Montoya <orion@mdcclv.com> 3 4 # 4 # This program is free software: you may copy, modify, or redistribute it 5 # and/or modify it under either: 5 # This software gives you freedom; it is licensed to you under version 6 # 3 of the GNU Affero General Public License, along with the 7 # additional permission in the following paragraph. 6 8 # 7 # (a) the terms of the GNU Affero General Public License as published by 8 # the Free Software Foundation, either version 3 of the License, or 9 # (at your option) any later version. 10 # or 11 # (b) the terms of the GNU General Public license, version 2, as 12 # published by the Free Software Foundation. 13 # 14 # This program is distributed in the hope that it will be useful, but 15 # WITHOUT ANY WARRANTY; without even the implied warranty of 16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero 17 # General Public License and/or GNU General Public License for more 9 # This notice constitutes a grant of such permission as is necessary 10 # to combine or link this software, or a modified version of it, with 11 # Request Tracker (RT), published by Jesse Vincent and Best Practical 12 # Solutions, LLC, or a derivative work of RT, and to copy, modify, and 13 # distribute the resulting work. RT is licensed under version 2 of 14 # the GNU General Public License. 15 # 16 # This software is distributed WITHOUT ANY WARRANTY, without even the 17 # implied warranties of MERCHANTABILITY and FITNESS FOR A PARTICULAR 18 # PURPOSE. See the GNU Affero General Public License for further 18 19 # details. 19 # 20 # You should have received a copy of the GNU Affero General Public License 21 # and the GNU General Public License along with this program. If not, see 22 # <http://www.gnu.org/licenses/>. 23 24 # Copyright (c) 2005 Software Freedom Law Center 25 # Author: Orion Montoya <orion@mdcclv.com> 20 # 21 # You should have received a copy of the GNU Affero General Public 22 # License, version 3, and the GNU General Public License, version 2, 23 # along with this software. If not, see <http://www.gnu.org/licenses/>. 26 24 27 25 use CGI qw(:standard); 28 26 use lib '/usr/share/request-tracker3.4/lib/'; 29 27 use lib '/etc/request-tracker3.4/'; 28 29 use lib '/usr/share/request-tracker3.2/lib/'; 30 use lib '/etc/request-tracker3.2/'; 31 32 use MIME::Base64; 33 use Frontier::Client; 34 35 30 36 use RT::Interface::CLI qw(CleanEnv GetCurrentUser GetMessageContent); 31 37 use RT::Interface::Web; 32 38 33 39 use RT; … … 39 45 use RT::CustomField; 40 46 use Data::Dumper; 41 my $CurrentUser = RT::Interface::CLI::GetCurrentUser(); 42 my $CustomFieldObj = RT::CustomField->new($CurrentUser); 43 #my $Query= " Requestor.EmailAddress LIKE 'moglen' "; 44 my $Query; 45 if(param()) { 46 47 $NoteUrl = param('NoteUrl'); 48 # $Query = " CustomFields.NoteUrl LIKE '$NoteUrl' "; 49 } 50 # else { 51 $Query= " Requestor.EmailAddress LIKE 'moglen' "; 52 #} 53 54 my $TicketObj = new RT::Tickets( $RT::SystemUser ); 47 48 sub debug { 49 print STDERR @_ . "\n"; 50 51 } 52 53 $printargs = "default (20 most recent comments)"; 54 55 if (($name, $pass) = split(/:/, decode_base64(cookie('__ac')))) { 56 57 $name =~ s/\"//g; 58 $server = Frontier::Client->new(url => "http://gplv3.fsf.org:8800/launch/acl_users/Users/acl_users", 59 username => "stet_auth", 60 password => "fai1Iegh"); 61 62 63 $resp = $server->call('authRemoteUser',$name,$pass); 64 } 65 else { 66 ${$resp} = 0; 67 } 68 69 if (${$resp} == 0) { 70 print STDERR "auth boolean was 0\n"; 71 } 72 73 74 #my $CurrentUser = RT::Interface::CLI::GetCurrentUser(); 75 #my $CustomFieldObj = RT::CustomField->new($CurrentUser); 76 77 #my $Query; 78 #if(param()) { 79 # $NoteUrl = param('NoteUrl'); 80 # } 81 my $CurrentUser = $RT::SystemUser; 82 my $TicketObj = new RT::Tickets( $CurrentUser ); 83 if (param('WatcherOp') == "LIKE") { 84 $arg = "%".param('ValueOfWatcher')."%"; 85 } 86 else { 87 $arg = param('ValueOfWatcher'); 88 } 89 $Query = param('WatcherField')." ".param('WatcherOp'). 'Requestor.Name LIKE "%'.param('ValueOfWatcher').'%"' 55 90 $TicketObj->FromSQL($Query); 91 %session = ''; 92 # as a result of next line, searches are *not* sticky. 93 94 %ARGS = param(); 56 95 $TicketObj->Query(); 57 $TicketObj->LimitCustomField( 58 CUSTOMFIELD => 3, 59 VALUE => $NoteUrl, 60 OPERATOR => "=" 61 ); 62 #$count = $TicketObj->CountAll(); 63 #print $TicketObj->loc("Found [quant,_1,annotation].\n",$count); 96 &LimitByArgs; 97 98 99 100 101 # $TicketObj->FromSQL($Query); 102 103 # $TicketObj->LimitCustomField( 104 # CUSTOMFIELD => 3, 105 # VALUE => $NoteUrl, 106 # OPERATOR => "=" 107 # ); 108 109 110 $count = $TicketObj->CountAll(); 111 print STDERR $TicketObj->loc("Found [quant,_1,annotation].\n",$count); 64 112 65 113 print header('text/xml'); … … 70 118 my $annotation; 71 119 while (my $item = $TicketObj->Next) { 72 $annotation = "";120 $annotation = ""; 73 121 my $Transactions = $item->Transactions; 74 while (my $Transaction = $Transactions->Next) { 75 next unless ($Transaction->Type =~ /^(Create|Correspond|Comment$)/); 76 77 my $attachments = $Transaction->Attachments; 78 my $CustomFields = $item->QueueObj->TicketCustomFields(); 79 $attachments->GotoFirstItem; 80 my $message = $attachments->Next; 81 $annotation .= $message->Content; 82 } 122 while (my $Transaction = $Transactions->Next) { 123 next unless ($Transaction->Type =~ /^(Create|Correspond|Comment$)/); 124 125 my $attachments = $Transaction->Attachments; 126 # my $CustomFields = $item->QueueObj->TicketCustomFields(); 127 my $CustomFields = $item->QueueObj->CustomFields(); 128 $attachments->GotoFirstItem; 129 my $message = $attachments->Next; 130 $annotation .= $message->Content; 131 } 132 133 $showagree = ''; 134 $agr_vals = $item->CustomFieldValues(7); 135 if ($$resp == 1) { 136 137 while ($value = $agr_vals->Next) { 138 if (($name) && ($value->Content eq $name)) { 139 print STDERR "the user agrees with ".$item->id."\n"; 140 # $showagree = "<a label=\"you have indicated that you agree with this\" name=\"you have indicated that you agree with this\">unagree</a>"; 141 $showagree = "unagree"; 142 } 143 } 144 if (!$showagree) { 145 $showagree = "agree"; 146 } 147 } 148 else { 149 $showagree = "<a href=\"gplv3.fsf.org:8800/launch/login_form\">login</a> to agree"; 150 151 } 152 153 #print "ticket has ".$values->count." customfieldvalues\n"; 154 83 155 # 84 156 # my $Attachs = $item->TransactionObj->Attachments->First; … … 86 158 # while (my $CustomField = $CustomFields->Next()) { 87 159 # my $CustomFieldValues=$Ticket->CustomFieldValues($CustomField->Id); 88 $returnme .= "<annotation>\n"; 160 $returnme .= "<cs>Currently showing: $printargs. <a href=\"javascript:newQuery()\">change</a></cs>\n"; 161 $returnme .= "<annotation>\n"; 89 162 # $returnme .= " <url>" . $item->FirstCustomFieldValue('NoteUrl') . "</url>\n"; 90 163 # $returnme .= " <dompath>" . $item->FirstCustomFieldValue('NoteDomPath') . "</dompath>\n"; 91 $returnme .= " <n>$annotation</n>\n"; 92 $returnme .= " <e>" . $item->FirstCustomFieldValue('NoteEndNodeId') . "</e>\n"; 93 $returnme .= " <s>" . $item->FirstCustomFieldValue('NoteSelection') . "</s>\n"; 94 $returnme .= " <i>" . $item->FirstCustomFieldValue('NoteStartNodeId') . "</i>\n"; 95 164 $returnme .= " <n>$annotation</n>\n"; 165 $returnme .= " <e>" . $item->FirstCustomFieldValue('NoteEndNodeId') . "</e>\n"; 166 $noteSelection = $item->FirstCustomFieldValue('NoteSelection'); 167 $noteSelection =~ s/</</g; 168 $noteSelection =~ s/>/>/g; 169 $returnme .= " <s>" . $noteSelection . "</s>\n"; 170 $returnme .= " <i>" . $item->FirstCustomFieldValue('NoteStartNodeId') . "</i>\n"; 171 $returnme .= " <u>" . $item->Requestors->MemberEmailAddressesAsString . "</u>\n"; 172 $returnme .= " <ua>" . $showagree . "</ua>\n"; 173 $returnme .= " <at>" . $agr_vals->count . "</at>\n"; 96 174 $returnme .= " <id>" . $item->id . "</id>\n"; 97 $returnme .= "</annotation>\n";98 99 # print Dumper($content);100 175 $returnme .= "</annotation>\n"; 176 177 # print STDERR Dumper($item); 178 # print STDERR $item->requestors; 101 179 } 102 180 … … 106 184 print $returnme; 107 185 #print Dumper($TicketObj); 186 187 # LimitByArgs adapted from $RT/lib/Interface/Web.pm's ProcessSearchQuery 188 # (out of desperation) 189 190 sub LimitByArgs { 191 192 # {{{ Limit priority 193 if ( param('ValueOfPriority') ne '' ) { 194 $TicketObj->LimitPriority( 195 VALUE => param('ValueOfPriority'), 196 OPERATOR => param('PriorityOp') 197 ); 198 debug('limiting by '.param('ValueOfPriority')); 199 } 200 201 # }}} 202 # {{{ Limit owner 203 if ( param('ValueOfOwner') ne '' ) { 204 $TicketObj->LimitOwner( 205 VALUE => param('ValueOfOwner'), 206 OPERATOR => param('OwnerOp') 207 ); 208 debug('limiting by '.param('ValueOfOwner')); 209 } 210 211 # }}} 212 # {{{ Limit requestor email 213 if ( param('ValueOfWatcher') ne '' ) { 214 my ($field, $property) = split(/\./,param('WatcherField')); 215 $TicketObj->LimitWatcher( 216 # TYPE => $field, 217 VALUE => param('ValueOfWatcher'), 218 OPERATOR => param('WatcherOp'), 219 220 ); 221 debug('limiting by '.param('ValueOfWatcher')); 222 } 223 224 # }}} 225 # {{{ Limit Queue 226 if ( param('ValueOfQueue') ne '' ) { 227 $TicketObj->LimitQueue( 228 VALUE => param('ValueOfQueue'), 229 OPERATOR => param('QueueOp') 230 ); 231 debug('limiting by '.param('ValueOfQueue')); 232 } 233 234 # }}} 235 # {{{ Limit Status 236 if ( param('ValueOfStatus') ne '' ) { 237 if ( ref( param('ValueOfStatus') ) ) { 238 foreach my $value ( @{ param('ValueOfStatus') } ) { 239 $TicketObj->LimitStatus( 240 VALUE => $value, 241 OPERATOR => param('StatusOp'), 242 ); 243 } 244 debug('limiting by '.@{param('ValueOfStatus')}[0]); 245 } 246 else { 247 $TicketObj->LimitStatus( 248 VALUE => param('ValueOfStatus'), 249 OPERATOR => param('StatusOp'), 250 ); 251 debug('limiting by '.param('ValueOfStatus')); 252 } 253 254 } 255 256 # }}} 257 # {{{ Limit Subject 258 if ( param('ValueOfSubject') ne '' ) { 259 my $val = param('ValueOfSubject'); 260 if (param('SubjectOp') =~ /like/) { 261 $val = "%".$val."%"; 262 } 263 $TicketObj->LimitSubject( 264 VALUE => $val, 265 OPERATOR => param('SubjectOp'), 266 ); 267 debug('limiting by '.$val); 268 } 269 270 # }}} 271 # {{{ Limit Dates 272 if ( param('ValueOfDate') ne '' ) { 273 my $date = ParseDateToISO( param('ValueOfDate') ); 274 ARGS{'DateType'} =~ s/_Date$//; 275 276 if ( ARGS{'DateType'} eq 'Updated' ) { 277 $TicketObj->LimitTransactionDate( 278 VALUE => $date, 279 OPERATOR => param('DateOp'), 280 ); 281 } 282 else { 283 $TicketObj->LimitDate( FIELD => ARGS{'DateType'}, 284 VALUE => $date, 285 OPERATOR => param('DateOp'), 286 ); 287 } 288 } 289 290 # }}} 291 # {{{ Limit Content 292 if ( param('ValueOfAttachmentField') ne '' ) { 293 my $val = param('ValueOfAttachmentField'); 294 if (param('AttachmentFieldOp') =~ /like/) { 295 $val = "%".$val."%"; 296 } 297 $TicketObj->Limit( 298 FIELD => param('AttachmentField'), 299 VALUE => $val, 300 OPERATOR => param('AttachmentFieldOp'), 301 ); 302 } 303 304 # }}} 305 306 # {{{ Limit CustomFields 307 308 foreach my $arg ( keys %ARGS ) { 309 my $id; 310 if ( $arg =~ /^CustomField(\d+)$/ ) { 311 $id = $1; 312 } 313 else { 314 next; 315 } 316 next unless ( param($arg) ); 317 318 my $form = param($arg); 319 my $oper = param->{ "CustomFieldOp" . $id }; 320 foreach my $value ( ref($form) ? @{$form} : ($form) ) { 321 my $quote = 1; 322 if ($oper =~ /like/i) { 323 $value = "%".$value."%"; 324 } 325 if ( $value =~ /^null$/i ) { 326 327 #Don't quote the string 'null' 328 $quote = 0; 329 330 # Convert the operator to something apropriate for nulls 331 $oper = 'IS' if ( $oper eq '=' ); 332 $oper = 'IS NOT' if ( $oper eq '!=' ); 333 } 334 $TicketObj->LimitCustomField( CUSTOMFIELD => $id, 335 OPERATOR => $oper, 336 QUOTEVALUE => $quote, 337 VALUE => $value ); 338 } 339 } 340 341 342 } 343 # {{{ sub ParseDateToISO 344 345 =head2 ParseDateToISO 346 347 Takes a date in an arbitrary format. 348 Returns an ISO date and time in GMT 349 350 =cut 351 352 sub ParseDateToISO { 353 my $date = shift; 354 355 my $date_obj = RT::Date->new($session{'CurrentUser'}); 356 $date_obj->Set( 357 Format => 'unknown', 358 Value => $date 359 ); 360 return ( $date_obj->ISO ); 361 } 362 363 # }}} 364 365 366 367 =cut 368 369 # http://gplv3.fsf.org/stet/rt-test.pl?SearchId=new 370 Query= 371 Format=%27+++%3Cb%3E%3Ca+href%3D%22%2Frt%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__id__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3A%23%27%2C+%0D%0A%27%3Cb%3E%3Ca+href%3D%22%2Frt%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__Subject__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3ASubject%27%2C+%0D%0A%27__Status__%27%2C+%0D%0A%27__QueueName__%27%2C+%0D%0A%27__OwnerName__%27%2C+%0D%0A%27__Priority__%27%2C+%0D%0A%27__NEWLINE__%27%2C+%0D%0A%27%27%2C+%0D%0A%27%3Csmall%3E__Requestors__%3C%2Fsmall%3E%27%2C+%0D%0A%27%3Csmall%3E__CreatedRelative__%3C%2Fsmall%3E%27%2C+%0D%0A%27%3Csmall%3E__ToldRelative__%3C%2Fsmall%3E%27%2C+%0D%0A%27%3Csmall%3E__LastUpdatedRelative__%3C%2Fsmall%3E%27%2C+%0D%0A%27%3Csmall%3E__TimeLeft__%3C%2Fsmall%3E%27 372 AndOr=AND 373 AttachmentField=Subject 374 AttachmentOp=LIKE 375 ValueOfAttachment= 376 QueueOp=%3D 377 ValueOfQueue= 378 StatusOp=%3D 379 ValueOfStatus= 380 ActorField=Owner 381 ActorOp=%3D 382 ValueOfActor= 383 WatcherField=Requestor.Name 384 WatcherOp=LIKE 385 ValueOfWatcher=orion 386 DateField=Created 387 DateOp=%3C 388 ValueOfDate= 389 TimeField=TimeWorked 390 TimeOp=%3C 391 ValueOfTime= 392 PriorityField=Priority 393 PriorityOp=%3C 394 ValueOfPriority= 395 LinksField=HasMember 396 LinksOp=%3D 397 ValueOfLinks= 398 idOp=%3C 399 ValueOfid= 400 %27CF.NoteSelection%27Op=LIKE 401 ValueOf%27CF.NoteSelection%27= 402 %27CF.NoteDomPath%27Op=LIKE 403 ValueOf%27CF.NoteDomPath%27= 404 %27CF.NoteUrl%27Op=LIKE 405 ValueOf%27CF.NoteUrl%27= 406 %27CF.NoteStartNodeId%27Op=LIKE 407 ValueOf%27CF.NoteStartNodeId%27= 408 %27CF.NoteEndNodeId%27Op=LIKE 409 ValueOf%27CF.NoteEndNodeId%27= 410 %27CF.NoteText%27Op=LIKE 411 ValueOf%27CF.NoteText%27= 412 %27CF.Agreeers%27Op=LIKE 413 ValueOf%27CF.Agreeers%27= 414 AddClause=Add 415 Owner=RT%3A%3AUser-12 416 Description= 417 LoadSavedSearch= 418 Link=None 419 Title= 420 Size= 421 Face= 422 OrderBy=id 423 Order=ASC 424 RowsPerPage=50 trunk/rtNoAuth/changeshown.html
r10 r11 2 2 %# 3 3 %# COPYRIGHT: 4 %# 5 %# Copyright (C) 2006 Software Freedom Law Center, Inc. 6 %# Modified-By: Orion Montoya <orion@mdcclv.com> 7 %# 8 %# This software gives you freedom; it is licensed to you under version 9 %# 3 of the GNU Affero General Public License, along with the 10 %# additional permission in the following paragraph. 11 %# 12 %# This notice constitutes a grant of such permission as is necessary 13 %# to combine or link this software, or a modified version of it, with 14 %# Request Tracker (RT), published by Jesse Vincent and Best Practical 15 %# Solutions, LLC, or a derivative work of RT, and to copy, modify, and 16 %# distribute the resulting work. RT is licensed under version 2 of 17 %# the GNU General Public License. 18 %# 19 %# This software is distributed WITHOUT ANY WARRANTY, without even the 20 %# implied warranties of MERCHANTABILITY and FITNESS FOR A PARTICULAR 21 %# PURPOSE. See the GNU Affero General Public License for further 22 %# details. 23 %# 24 %# You should have received a copy of the GNU Affero General Public 25 %# License, version 3, and the GNU General Public License, version 2, 26 %# along with this software. If not, see <http://www.gnu.org/licenses/>. 4 27 %# 5 28 %# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC … … 47 70 <html> 48 71 <head> 49 <title> gpl comment system -query builder</title>72 <title>stet query builder</title> 50 73 %# <link rel="stylesheet" href="/rt/NoAuth/webrt.css" type="text/css"> 51 74 <script type="text/javascript" src="/comments/stet.js"></script> … … 75 98 <& /Elements/Submit, Caption => "Do the Search", Label => loc('Search'), Name => 'DoSearch'&> 76 99 <& /Elements/Submit, Caption => loc('Add additional criteria'), Label => loc('Add'), Name => 'AddClause'&> 77 <input type=hidden name="78 100 79 101 </td> trunk/rtNoAuth/Elements/PickCriteria
r10 r11 1 1 %# {{{ BEGIN BPS TAGGED BLOCK 2 2 %# 3 %# Copyright (C) 2006 Software Freedom Law Center, Inc. 4 %# Modified-By: Orion Montoya <orion@mdcclv.com> 5 %# 6 %# This software gives you freedom; it is licensed to you under version 7 %# 3 of the GNU Affero General Public License, along with the 8 %# additional permission in the following paragraph. 9 %# 10 %# This notice constitutes a grant of such permission as is necessary 11 %# to combine or link this software, or a modified version of it, with 12 %# Request Tracker (RT), published by Jesse Vincent and Best Practical 13 %# Solutions, LLC, or a derivative work of RT, and to copy, modify, and 14 %# distribute the resulting work. RT is licensed under version 2 of 15 %# the GNU General Public License. 16 %# 17 %# This software is distributed WITHOUT ANY WARRANTY, without even the 18 %# implied warranties of MERCHANTABILITY and FITNESS FOR A PARTICULAR 19 %# PURPOSE. See the GNU Affero General Public License for further 20 %# details. 21 %# 22 %# You should have received a copy of the GNU Affero General Public 23 %# License, version 3, and the GNU General Public License, version 2, 24 %# along with this software. If not, see <http://www.gnu.org/licenses/>. 25 %# 3 26 %# COPYRIGHT: 4 %# 27 %# 5 28 %# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC 6 29 %# <jesse@bestpractical.com> … … 49 72 <& PickBasics &> 50 73 <& PickCFs, cfqueues => \%cfqueues &> 74 <tr><td> </td></tr> 75 </table> 51 76 52 %#<& /Elements/TitleBoxEnd &>77 <& /Elements/TitleBoxEnd &> 53 78 54 79 <%ARGS> trunk/rtNoAuth/readsay.html
r10 r11 1 %# Copyright 2005 Software Freedom Law Center, Inc. 1 %# Copyright (C) 2006 Software Freedom Law Center, Inc. 2 %# Author: Orion Montoya <orion@mdcclv.com> 2 3 %# 3 %# This program is free software: you may copy, modify, or redistribute it 4 %# and/or modify it under either: 4 %# This software gives you freedom; it is licensed to you under version 5 %# 3 of the GNU Affero General Public License, along with the 6 %# additional permission in the following paragraph. 5 7 %# 6 %# (a) the terms of the GNU Affero General Public License as published by 7 %# the Free Software Foundation, either version 3 of the License, or 8 %# (at your option) any later version. 9 %# or 10 %# (b) the terms of the GNU General Public license, version 2, as 11 %# published by the Free Software Foundation. 12 %# 13 %# This program is distributed in the hope that it will be useful, but 14 %# WITHOUT ANY WARRANTY; without even the implied warranty of 15 %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero 16 %# General Public License and/or GNU General Public License for more 8 %# This notice constitutes a grant of such permission as is necessary 9 %# to combine or link this software, or a modified version of it, with 10 %# Request Tracker (RT), published by Jesse Vincent and Best Practical 11 %# Solutions, LLC, or a derivative work of RT, and to copy, modify, and 12 %# distribute the resulting work. RT is licensed under version 2 of 13 %# the GNU General Public License. 14 %# 15 %# This software is distributed WITHOUT ANY WARRANTY, without even the 16 %# implied warranties of MERCHANTABILITY and FITNESS FOR A PARTICULAR 17 %# PURPOSE. See the GNU Affero General Public License for further 17 18 %# details. 18 %# 19 %# You should have received a copy of the GNU Affero General Public License 20 %# and the GNU General Public License along with this program. If not, see 21 %# <http://www.gnu.org/licenses/>. 22 % 23 %# Copyright (c) 2005 Software Freedom Law Center 24 %# Author: Orion Montoya <orion@mdcclv.com> 19 %# 20 %# You should have received a copy of the GNU Affero General Public 21 %# License, version 3, and the GNU General Public License, version 2, 22 %# along with this software. If not, see <http://www.gnu.org/licenses/>. 25 23 % 26 24 <html> … … 30 28 </head> 31 29 <body> 32 < !-- <div id="maintext"> -->30 <div id="maintext"> 33 31 % if ($Tickets) { 34 <h3> Showing comments where <% humanQuery($ARGS{'Query'}) |n %> <a class="rsslink" href="<% $rsslink %>">[rss]</a> <a href="/comments/<% $Tickets->First->FirstCustomFieldValue('NoteUrl') %>?Query=<% $ARGS{'Query'} %>">[see on license]</a><h3>32 <h3> Showing comments where <% humanQuery($ARGS{'Query'}) |n %> <a class="rsslink" href="<% $rsslink %>">[rss]</a><h3> 35 33 <h4>Found <% $Tickets->CountAll()%></h4> 36 34 % } else { 37 <h3> Showing comment < a href="/rt/NoAuth/readsay.html?id=<% $ARGS{'id'} %>"><% $ARGS{'id'} %></a> <a class="rsslink" href="<% $rsslink %>">[rss]</a> <a href="/comments/<% $Ticket->FirstCustomFieldValue('NoteUrl') %>?id=<% $ARGS{'id'} %>#<% $Ticket->FirstCustomFieldValue('NoteStartNodeId') %>">[see on license]</a></h3>35 <h3> Showing comment <% $ARGS{'id'} %> <a class="rsslink" href="<% $rsslink %>">[rss]</a></h3> 38 36 % } 39 37 % … … 42 40 <& /Elements/ListActions, actions => \@msgresults &> 43 41 <& /Elements/ListActions, actions => \@linkresults &> 44 <h4>< % $thing %> <a href="readsay.html?id=<% $item->id %>"><% $item->id %>: <% $item->Subject %></a></h4>42 <h4><a href="readsay.html?id=<% $item->id %>"><% $item->id %>: <% $item->Subject %></a></h4> 45 43 <span class="tktheader">Regarding the text:</span> <span class="ontextText"><% $scrubber->scrub($item->FirstCustomFieldValue('NoteSelection')) %></span><br/> 46 44 In section: <span class="nodeLink"><% $scrubber->scrub($item->FirstCustomFieldValue('NoteStartNodeId')) %></span><br/> … … 51 49 <span class="agreecount"><% $agr_count %> agree</span></span><br/> 52 50 comments: <% getThread(\$item) |n %><br/> 51 % if (($makeissue) && ($item->Queue != $issuequeue)) { 52 <input type="checkbox" value="1" name="MakeIssue"/>Upgrade this to an Issue<br/> 53 % } 54 Parents: 55 % while (my $link = $item->MemberOf->Next) { 56 <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1"> 57 <& ShowLink, URI => $link->TargetURI &><br> 58 % } 59 <br/> 60 Children: 61 % while (my $link = $Object->Members->Next) { 62 <INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1"> 63 <& ShowLink, URI => $link->BaseURI &><br> 64 % } 53 65 % if ($resp == 1) { 54 66 <form action="readsay.html" method="POST" name="TicketUpdate" enctype="multipart/form-data"> 55 67 <input type="hidden" name="id" value="<% $item->id %>"> 56 % }57 % if (($makeissue) && ($item->Queue != $issuequeue)) {58 <input type="checkbox" value="1" name="MakeIssue"/>Upgrade this to an Issue<br/>59 % }60 <span class="TktLabel">Parents</span>61 % if (!$item->Members->GotoFirstItem) {62 <em>this <% $thing %> does not have any parents </em><br/>63 % }64 % while (my $link = $item->MemberOf->Next) {65 <& Elements/ShowLink, URI => $link->TargetURI &><span class="TktInput">66 % if ($resp == 1) {67 <span class="TktInput indent">[delete: <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1">]</span>68 % }69 <br/>70 % }71 % if ($makeissue) {72 <span class="TktInput indent">add new: <INPUT NAME="<% $item->id %>-MemberOf"> <span class="inputcaption">[comment id numbers, space separated]</span></span>73 % }74 <br/>75 <span class="TicketLabel">Children:76 % if (!$item->Members->GotoFirstItem) {77 <em>this <% $thing %> does not have any children </em><br/>78 % }79 % while (my $link = $item->Members->Next) {80 <& Elements/ShowLink, URI => $link->BaseURI &></span>81 % if ($makeissue) {82 <span class="TktInput indent">[delete: <INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1">]</span>83 % }84 <br/>85 % }86 % if ($makeissue) {87 <span class="TktInput indent">add new: <INPUT NAME="MemberOf-<% $item->id %>"> <span class="inputcaption">[comment id numbers, space separated]</span></span>88 </span><br/>89 <span class="TktInput">link to external item(s): <INPUT NAME="<% $item->id %>-RefersTo"> <span class="inputcaption">[URIs with protocol://, space separated]</span></span>90 % }91 </span><br/>92 % if ($resp == 1) {93 68 <textarea class="messagebox" COLS=72 ROWS=15 WRAP=HARD NAME="UpdateContent" onfocus="if(this.value=='Enter additional comments here') {this.value='';}" onblur="if(this.value==''){this.value='Enter additional comments here';}"> 94 69 % if($ARGS{'addcomments'}) { … … 104 79 <INPUT TYPE=SUBMIT NAME="SubmitTicket" VALUE='Add comment'></form> 105 80 % } 106 <!-- </div> -->107 81 % } 82 </div> 108 83 % $Ticket = ''; 109 84 % } 110 % 85 111 86 </body> 112 87 </html> … … 121 96 my $scrubber = HTML::Scrubber->new( allow => [ qw[ a b i u br ] ] ); 122 97 require "/var/www/stet/stetsubs.pl"; 123 my $issuequeue = 5; # I guess Issue will be queue 4...98 my $issuequeue = 4; # I guess Issue will be queue 4... 124 99 sub debug { 125 100 print STDERR @_ . "\n"; 126 101 } 127 102 128 my ($name, $resp, $pass, $agr_vals, $CurrentUser , $thing);103 my ($name, $resp, $pass, $agr_vals, $CurrentUser); 129 104 ($CurrentUser, $resp) = getUser("foo"); 130 105 131 my $rsslink = "/rt/NoAuth/rssresults.rdf? id=".$ARGS{'id'}."&Query=".$ARGS{'Query'};106 my $rsslink = "/rt/NoAuth/rssresults.rdf?Query=".$ARGS{'Query'}; 132 107 133 108 my ($Tickets, $Ticket, $makeissue, @msgresults, @linkresults); … … 142 117 $Ticket = LoadTicket($ARGS{'id'}); 143 118 if ($ARGS{'UpdateContent'}) { 144 ProcessUpdateMessage(TicketObj => $Ticket, ARGSRef=>\%ARGS, Actions=>\@msgresults); 119 ProcessUpdateMessage(TicketObj => $item, ARGSRef=>\%ARGS, Actions=>\@msgresults); 120 145 121 } 146 122 if ($ARGS{'MakeIssue'}) { … … 160 136 ) 161 137 ) 162 )163 138 { 164 139 $makeissue = 1; 165 140 } 166 else {$makeissue = '';}167 if ($Ticket->Queue == 5) {168 $thing = "issue";169 }170 else {171 $thing = "comment";172 }173 141 174 142 sub getThread($) { … … 199 167 # } 200 168 201 $allcomments .= "<blockquote><h4>$subj</h4>\n ".$message->Content."<br/>\n";169 $allcomments .= "<blockquote><h4>$subj</h4>\n$cont<br/>\n"; 202 170 $allcomments .= "<span class=\"posted\">noted by user <span class=\"userlink\">".$message->CreatorObj->Name."</span></span>\n"; 203 171 } trunk/rtNoAuth/xmlresults.html
r10 r11 1 1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> 2 %# Copyright 2005 Software Freedom Law Center, Inc. 2 %# Copyright (C) 2006 Software Freedom Law Center, Inc. 3 %# Author: Orion Montoya <orion@mdcclv.com> 3 4 %# 4 %# This program is free software: you may copy, modify, or redistribute it 5 %# and/or modify it under either: 5 %# This software gives you freedom; it is licensed to you under version 6 %# 3 of the GNU Affero General Public License, along with the 7 %# additional permission in the following paragraph. 6 8 %# 7 %# (a) the terms of the GNU Affero General Public License as published by 8 %# the Free Software Foundation, either version 3 of the License, or 9 %# (at your option) any later version. 10 %# or 11 %# (b) the terms of the GNU General Public license, version 2, as 12 %# published by the Free Software Foundation. 13 %# 14 %# This program is distributed in the hope that it will be useful, but 15 %# WITHOUT ANY WARRANTY; without even the implied warranty of 16 %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero 17 %# General Public License and/or GNU General Public License for more 9 %# This notice constitutes a grant of such permission as is necessary 10 %# to combine or link this software, or a modified version of it, with 11 %# Request Tracker (RT), published by Jesse Vincent and Best Practical 12 %# Solutions, LLC, or a derivative work of RT, and to copy, modify, and 13 %# distribute the resulting work. RT is licensed under version 2 of 14 %# the GNU General Public License. 15 %# 16 %# This software is distributed WITHOUT ANY WARRANTY, without even the 17 %# implied warranties of MERCHANTABILITY and FITNESS FOR A PARTICULAR 18 %# PURPOSE. See the GNU Affero General Public License for further 18 19 %# details. 19 %# 20 %# You should have received a copy of the GNU Affero General Public License21 %# and the GNU General Public License along with this program. If not, see22 %# <http://www.gnu.org/licenses/>.20 %# 21 %# You should have received a copy of the GNU Affero General Public 22 %# License, version 3, and the GNU General Public License, version 2, 23 %# along with this software. If not, see <http://www.gnu.org/licenses/>. 23 24 % 24 25 % 25 26 <response> 26 % if ($Tickets) { 27 <cs>Showing comments where <% humanQuery($ARGS{'Query'}) |n %> <a class="rsslink" href="<% $rsslink %>">[rss]</a> (found <% $Tickets->CountAll()%>)</cs> 28 % } else { 29 <cs> Showing comment <a href="/rt/NoAuth/readsay.html?id=<% $ARGS{'id'} %>"><% $ARGS{'id'} %></a> <a class="rsslink" href="<% $rsslink %>">[rss]</a> <a href="/rt/NoAuth/changeshown.html">change</a> </cs> 30 % } 31 % while (my $item = $Tickets ? $Tickets->Next : $Ticket) { 27 %# <cs>Showing comments where <% humanQuery($ARGS{'Query'} |n %> (<% $Tickets->CountAll() %> found) <a href="<% $rsslink %>">[rss]</a> <a href="javascript:newQuery()">change</a> </cs> 28 <cs>Currently showing <% $printargs %> <a href="<% $rsslink %>">[rss]</a> <a href="changeshown.html">change</a> </cs> 29 % while ( my $item = $Tickets->Next()) { 32 30 <annotation> 33 31 <n><% $item->Transactions->First->Content %></n> … … 42 40 <id><% $item->id %></id> 43 41 </annotation> 44 % $Ticket = '';45 42 % } 46 43 </response> … … 67 64 print STDERR "Currentuser $CurrentUser, $resp\n"; 68 65 #my $Tickets = RT::Tickets->new($session{'CurrentUser'}); 69 70 my ($Tickets, $Ticket); 71 72 if ($ARGS{'Query'}) { 73 $Tickets = RT::Tickets->new($CurrentUser); 74 $Tickets->FromSQL($ARGS{'Query'}); 75 } 76 elsif ($ARGS{'id'}) { 77 $Ticket = RT::Ticket->new($CurrentUser); 78 $Ticket = LoadTicket($ARGS{'id'}); 79 } 80 81 #my $Tickets = RT::Tickets->new($CurrentUser); 82 #$Tickets->FromSQL($ARGS{'Query'}); 83 #$Tickets->OrderBy( FIELD => 'id', ORDER => $ARGS{'Order'}); 66 my $Tickets = RT::Tickets->new($CurrentUser); 67 $Tickets->FromSQL($ARGS{'Query'}); 68 $Tickets->OrderBy( FIELD => 'id', ORDER => $ARGS{'Order'}); 84 69 85 70 $r->content_type('text/xml'); trunk/searchhi.js
r10 r11 1 /* This is believed to be copyrighted by Stuart Langridge; the license is */2 /* unkowning but we are clarifying with the author. */3 1 /* The MIT Licence, for code from kryogenix.org 4 2 ** trunk/selectxpath.xsl
r10 r11 1 <!-- Copyright 2005, Software Freedom Law Center, Inc. 2 3 -- This program is free software: you may copy, modify, or redistribute it 4 -- and/or modify it under the terms of the GNU Affero General Public 5 -- License as published by the Free Software Foundation, either version 3 6 -- of the License, or (at your option) any later version. 7 -- This program is distributed in the hope that it will be useful, but 8 -- WITHOUT ANY WARRANTY; without even the implied warranty of 9 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero 10 -- General Public License and/or GNU General Public License for more 1 <!-- Copyright (C) 2005 Software Freedom Law Center, Inc. 2 -- Author: Orion Montoya <orion@mdcclv.com> 3 -- 4 -- This software gives you freedom; it is licensed to you under version 5 -- 3 of the GNU Affero General Public License, along with the 6 -- additional permission in the following paragraph. 7 -- 8 -- This notice constitutes a grant of such permission as is necessary 9 -- to combine or link this software, or a modified version of it, with 10 -- Request Tracker (RT), published by Jesse Vincent and Best Practical 11 -- Solutions, LLC, or a derivative work of RT, and to copy, modify, and 12 -- distribute the resulting work. RT is licensed under version 2 of 13 -- the GNU General Public License. 14 -- 15 -- This software is distributed WITHOUT ANY WARRANTY, without even the 16 -- implied warranties of MERCHANTABILITY and FITNESS FOR A PARTICULAR 17 -- PURPOSE. See the GNU Affero General Public License for further 11 18 -- details. 12 -- 13 -- You should have received a copy of the GNU Affero General Public License14 -- and the GNU General Public License along with this program. If not, see15 -- <http://www.gnu.org/licenses/>.19 -- 20 -- You should have received a copy of the GNU Affero General Public 21 -- License, version 3, and the GNU General Public License, version 2, 22 -- along with this software. If not, see <http://www.gnu.org/licenses/>. 16 23 --> 17 18 24 <?xml version="1.0" encoding="utf-8"?> 19 25 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" … … 97 103 <xsl:for-each select="section"> 98 104 <h3><xsl:value-of select="title"/></h3> 99 <section id="{@id}" name="{@id}">105 <section id="{@id}"> 100 106 <xsl:for-each select="p"> 101 <p id="{@id}" name="{@id}">107 <p id="{@id}"> 102 108 <xsl:for-each select="sent"> 103 <sent id="{@id}" name="{@id}">109 <sent id="{@id}"> 104 110 <xsl:apply-templates select='node()|@*' /> 105 111 <xsl:text> </xsl:text> trunk/stet-spec.txt
r9 r11 1 1 Specification for stet, a system for public comment on gplv3 2 2 Orion Montoya <orion@diderot.uchicago.edu> 3 $Id: stet-spec.txt 4 2 2005-12-15 23:18:11Z orion $3 $Id: stet-spec.txt 46 2006-01-05 17:29:26Z orion $ 4 4 5 5 … … 249 249 - etc. [ *discuss* or request ] 250 250 251 To pr oliferateexcessive proliferation or disjunction of metadata252 properties, new properties should be added only after reasonable251 To prevent excessive proliferation or disjunction of metadata 252 properties, new properties should be added only after a reasonable 253<