# Copyright for the Uniform Repository Service (c) 1995 - 2013, # by Gerald Banon. All rights reserved. # Version 2.1 # review.tcl # return the reviews (if any) of the document contained in the repository # Example: # http://banon-pc.dpi.inpe.br:1905/review/iconet.com.br/banon/2002/05.26.16.17 proc Review {} { if [catch { global env global cgi global orderingTable global homePath ;# used by SynchronizeRepository (sourceDisplayControl), namespace in enRegister.tcl, ... global serverAddress ;# used by SetFieldValue global localSite ;# used by SynchronizeRepository (sourceDisplayControl) and Help global loCoInRep ;# used by SynchronizeRepository (sourceDisplayControl) global loBiMiRep ;# used while executing SynchronizeRepository (sourceDisplayControl) global URLibServiceRepository ;# used while executing SynchronizeRepository (sourceDisplayControl) # serverAddress set serverAddress [list $env(SERVER_NAME) $env(URLIB_PORT)] # localSite set localSite $env(SERVER_NAME):$env(SERVER_PORT) # loCoInRep set loCoInRep $env(LOCOINREP) # loBiMiRep set loBiMiRep $env(LOBIMIREP) # homePath set homePath $env(DOCUMENT_ROOT) # used in sourceDisplayControl set mirrorHomePageRepository dpi.inpe.br/banon/2000/01.23.20.24 set col ../../../../.. # URLibServiceRepository set URLibServiceRepository $env(URLIB_SERVICE_REP) puts {Content-Type: text/html} puts {} source ../$col/$URLibServiceRepository/doc/utilities1.tcl source ../$col/$URLibServiceRepository/doc/cgi/mirrorfind-.tcl set pathInfo [file split $env(PATH_INFO)] # rep (repository that contains the reviewed document) regsub -all { } [lrange $pathInfo 1 4] {/} rep if [regexp {(returnaddress)=(.*)$} $env(QUERY_STRING) m name value] { regsub {&metadatarepository=.*$} $value {} value ;# metadatarepository field comes from env(REQUEST_URI) (see CreateBriefEntry) it was needed for Submit (update option) but is not used in the returnaddress set cgi($name) $value } regsub {&?returnaddress=.*$} $env(QUERY_STRING) {} queryString foreach {name value} [split $queryString &=] { set cgi([DecodeURL $name]) [DecodeURL $value] } ## changing return button default # if ![info exists cgi(returnbutton)] {set cgi(returnbutton) {yes}} if ![info exists cgi(requiredmirror)] {set cgi(requiredmirror) $loBiMiRep} set currentRep $cgi(requiredmirror) set referenceType {Misc} # display set display [GetFrameName] # Find the language and the language repository # use the same languages as used for the local bibliographic mirror foreach {language languageRep1 languageRep2 firstLanguageRep \ submissionFormRep submissionFormLanguage submissionFormLanguageRep} \ [FindLanguage $currentRep] {break} # Find the language and the language repository - end # if ![info exists cgi(targetframe)] {set cgi(targetframe) $display} if ![info exists cgi(targetframe)] {set cgi(targetframe) {}} source ../$col/$languageRep2/doc/mirror/${language}Register.tcl global "${languageRep2}::Return" # Source displayControl.tcl set enableOutput 1 eval $sourceDisplayControl # Source displayControl.tc - end if [catch {source ../$col/$submissionFormLanguageRep/doc/${submissionFormLanguage}FillingInstructions.tcl} error] { puts "error in sourcing file <\;../$col/$submissionFormLanguageRep/doc/${submissionFormLanguage}FillingInstructions.tcl>\;:" puts
puts $error } # Get some metadata set localURLibClientSocketId \ [StartCommunication $env(SERVER_NAME) $env(URLIB_PORT)] set metadataRep [Submit $localURLibClientSocketId \ [list FindMetadataRep $rep] 0] ;# not async close $localURLibClientSocketId # Get some metadata - end SetFieldValue $serverAddress $metadataRep-0 {childrepositories} # puts --$childrepositories-- foreach childRep $childrepositories { set childMetadataRep [Execute $serverAddress [list FindMetadataRep $childRep]] # puts --$childMetadataRep-- SetFieldValue $serverAddress $childMetadataRep-0 {title documentstage} # puts --$title-- # puts --$documentstage-- if {[string compare {Closed Review} $documentstage] == 0} { source $homePath/col/$childRep/doc/.reviewArray.tcl set titleArray($childRep) $title } } # puts --[array get titleArray]-- Load $homePath/col/$URLibServiceRepository/doc/reviewSheet.html fileContent set author {} set reviewsForAuthorFlag 1 ;# could be any value # puts [array get cgi returnbutton] if {[info exists cgi(returnbutton)] && \ [string compare {yes} $cgi(returnbutton)] == 0} { set returnButtonForReviewSheet [CreateReturnButton
http://$localSite/col/$languageRep2/doc/mirror {} $cgi(targetframe) $Return] } else { set returnButtonForReviewSheet {} } # SUBST set fileContent [subst $fileContent] puts $fileContent } m] {puts $m; if 0 {global errorInfo; puts $errorInfo}} }