[Bio] / FigWebServices / assignments.cgi Repository:
ViewVC logotype

Diff of /FigWebServices/assignments.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9, Tue May 25 17:27:49 2004 UTC revision 1.13, Sun Jan 23 16:54:49 2005 UTC
# Line 103  Line 103 
103  sub edit_link {  sub edit_link {
104      my($cgi,$set) = @_;      my($cgi,$set) = @_;
105    
106      return "<a href=" . $cgi->self_url() . "&request=edit_set&set=$set&all=0>edit</a>" . "/" .      # modified by RAE so that this can be called from within assignments.cgi and the options can be changed.
107             "<a href=" . $cgi->self_url() . "&request=edit_set&set=$set&all=1>examine</a>";      return "<a href=" . $cgi->url() . "?user=".$cgi->param('user') . "&request=edit_set&set=$set&all=0>edit</a>" . "/" .
108               "<a href=" . $cgi->url() . "?user=".$cgi->param('user') . "&request=edit_set&set=$set&all=1>examine</a>";
109  }  }
110    
111  sub delete_link {  sub delete_link {
112      my($cgi,$set) = @_;      my($cgi,$set) = @_;
113    
114      return "<a href=" . $cgi->self_url() . "&request=delete_set&set=$set>delete</a>";      # modified by RAE so that this can be called from within assignments.cgi and the options can be changed.
115        return "<a href=" . $cgi->url() . "?user=".$cgi->param('user')."&request=delete_set&set=$set>delete</a>";
116        #return "<a href=" . $cgi->self_url() . "&request=delete_set&set=$set>delete</a>";
117  }  }
118    
119  sub accept_link {  sub accept_link {
120      my($cgi,$set) = @_;      my($cgi,$set) = @_;
121    
122      return "<a href=" . $cgi->self_url() . "&request=accept_set&set=$set>accept</a>";      # modified by RAE so that this can be called from within assignments.cgi and the options can be changed.
123        return "<a href=" . $cgi->url() . "?user=".$cgi->param('user')."&request=accept_set&set=$set>accept</a>";
124  }  }
125    
126  sub assignment_sets {  sub assignment_sets {
# Line 191  Line 195 
195                           $cgi->hidden(-name => 'set', -value => $set)                           $cgi->hidden(-name => 'set', -value => $set)
196                   );                   );
197    
198              $col_hdrs = ["delete","PEG","Functions"];              $col_hdrs = ["delete","PEG","In SubSys","Proposed Function", "Current function","UniProt ID","UniProt Function"];
199              $tab      = [];              $tab      = [];
200              my @keep = ();              my @keep = ();
201              while (defined($line = <SET>))              while (defined($line = <SET>))
# Line 203  Line 207 
207                  if ($func1 ne $func2)                  if ($func1 ne $func2)
208                  {                  {
209                      push(@keep,"$line\n");                      push(@keep,"$line\n");
210                        my @subs    = $fig->peg_to_subsystems($peg);
211                        my $in_sub  = @subs;
212                        my @uni = $fig->to_alias($peg,"uni");
213                        my $uni_link = (@uni > 0) ? &HTML::uni_link($cgi,$uni[0]) : "";
214                        my $uni_func = $uni_link ? $fig->function_of($uni[0]) : "";
215                      push(@$tab,[                      push(@$tab,[
216                                  $cgi->checkbox(-name => 'checked', -value => $peg, -checked => 0,-override => 1),                                  $cgi->checkbox(
217                                                   -name => 'checked',
218                                                   -value => $peg,
219                                                   -checked => 0,
220                                                   -override => 1,
221                                                   -label => ""
222                                                  ),
223                                  &HTML::fid_link($cgi,$peg),                                  &HTML::fid_link($cgi,$peg),
224                                  "\@nowrap:$func1<br>$func2"                                  $in_sub,
225                                    $func1, $func2,
226                                    $uni_link,$uni_func
227                                 ]                                 ]
228                           );                           );
229                  }                  }
230              }              }
231              close(SET);              close(SET);
232    
 #           if (open(SET,">$FIG_Config::data/Assignments/$userR/$set"))  
 #           {  
 #               foreach $line (@keep)  
 #               {  
 #                   print SET $line;  
 #               }  
 #               close(SET);  
 #               chmod(0777,"$FIG_Config::data/Assignments/$userR/$set");  
 #           }  
   
233              if (@$tab > 0)              if (@$tab > 0)
234              {              {
235                  push(@$html,&HTML::make_table($col_hdrs,$tab,""));                  push(@$html,&HTML::make_table($col_hdrs,$tab,""));
236                  push(@$html,$cgi->submit("delete checked entries"));                  push(@$html,$cgi->submit("delete checked entries"));
237                    # modified by RAE to include these links at the bottom of the page so that you can accept after reviewing
238                    push(@$html,"<p><b>", &accept_link($cgi, $set), "/", &edit_link($cgi, $set), " these annotations</b></p>");
239              }              }
240              else              else
241              {              {
# Line 254  Line 263 
263      if (-e "$FIG_Config::data/Assignments/$userR/$set")      if (-e "$FIG_Config::data/Assignments/$userR/$set")
264      {      {
265          unlink("$FIG_Config::data/Assignments/$userR/$set");          unlink("$FIG_Config::data/Assignments/$userR/$set");
266          push(@$html,$cgi->h1("Deleted set $set"));          push(@$html,$cgi->h2("Deleted set $set"));
267            push(@$html,$cgi->h2("<a href=" . $cgi->url() . "?user=".$cgi->param('user').">Return to Assignment Sets</a>"));
268      }      }
269      else      else
270      {      {
# Line 280  Line 290 
290    
291          if (system("$FIG_Config::bin/fig assign_functionF $who $FIG_Config::data/Assignments/$userR/$set > /dev/null") == 0)          if (system("$FIG_Config::bin/fig assign_functionF $who $FIG_Config::data/Assignments/$userR/$set > /dev/null") == 0)
292          {          {
293              push(@$html,$cgi->h1("Made Assignments from $set"));              push(@$html,$cgi->h2("Made Assignments from $set"));
294                my $dellink=&delete_link($cgi,$set);
295                $dellink =~ s/>delete</>Delete</;
296                push(@$html,$cgi->h2("$dellink this Assignment Set from the pending assignments"));
297          }          }
298          else          else
299          {          {

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.13

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3