Subversion Repositories PEEPS

Rev

Rev 32 | Rev 41 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 32 Rev 40
Line 387... Line 387...
387
  my $YEAR = 1900 + (localtime)[5];
387
  my $YEAR = 1900 + (localtime)[5];
Line 388... Line 388...
388
  
388
  
389
  # Everything beyond here only applies to an existing user.
389
  # Everything beyond here only applies to an existing user.
Line 390... Line -...
390
  return unless $view ne "New User";  
-
 
391
  
-
 
392
  my ($isAWFTDAAdmin)  = $dbh->selectrow_array ("select 1 from role where role = ? and member_org_id = ? and person_id = ?", undef, "System Admin", 4276, $ORCUSER->{person_id});
390
  return unless $view ne "New User";  
393
  
391
  
394
  # Display the list of roles per League Affiliation.  If the viewing user is a league (or wftda) admin, include a button to manage roles.
392
  # Display the list of roles per League Affiliation.  If the viewing user is a league (or wftda) admin, include a button to manage roles.
395
  my $leagues = getLeagueAffiliation($person_id);
393
  my $leagues = getLeagueAffiliation($person_id);
396
  my @leagueroles;
394
  my @leagueroles;
Line 397... Line 395...
397
  foreach (sort keys %{$leagues}) {
395
  foreach (sort keys %{$leagues}) {
398
    my ($isALeagueAdmin) = inArray ($_, isLeagueAdmin ($ORCUSER->{person_id}));
396
    my ($isALeagueAdmin) = inArray ($_, isLeagueAdmin ($ORCUSER->{person_id}));
399
    
397
    
400
    push @leagueroles, $h->div ({ class=>"rTableRow shaded", onClick=>"window.location.href='view_league?id=$_'" },[ 
398
    push @leagueroles, $h->div ({ class=>"rTableRow shaded", onClick=>"window.location.href='view_league?id=$_'" },[ 
401
                         $h->div ({ class=>"rTableCellr".($leagues->{$_}->[0] eq "Pending" ? " highlighted" : ""), style=>"font-size: smaller;".($leagues->{$_}->[0] eq "Pending" ? " font-style: italic;" : "") },
399
                         $h->div ({ class=>"rTableCellr".($leagues->{$_}->[0] eq "Pending" ? " highlighted" : ""), style=>"font-size: smaller;".($leagues->{$_}->[0] eq "Pending" ? " font-style: italic;" : "") },
402
                           getLeagueName ($_),
400
                           getLeagueName ($_),
403
                           join ($h->br, sort @{$leagues->{$_}}),
401
                           join ($h->br, sort @{$leagues->{$_}}),
404
                           ($isALeagueAdmin or $isAWFTDAAdmin) ? $h->input ({type=>"button", onClick=>"event.stopPropagation(); window.location.href='manage_role?league_id=$_&person_id=$person_id'", value=>"Manage Role"}) : undef ) ]);
402
                           ($isALeagueAdmin or $ORCUSER->{SYSADMIN}) ? $h->input ({type=>"button", onClick=>"event.stopPropagation(); window.location.href='manage_role?league_id=$_&person_id=$person_id'", value=>"Manage Role"}) : undef ) ]);
Line 405... Line 403...
405
  }
403
  }
406
  unshift (@leagueroles, $h->div ({ class=>"rTableRow" },[ $h->div ({ class=>"rTableHead", style=>"font-size: smaller;" }, ($isAWFTDAAdmin or isLeagueAdmin ($ORCUSER->{person_id})) ? qw(League Role Admin) : qw(League Role) ) ]) );
404
  unshift (@leagueroles, $h->div ({ class=>"rTableRow" },[ $h->div ({ class=>"rTableHead", style=>"font-size: smaller;" }, ($ORCUSER->{SYSADMIN} or isLeagueAdmin ($ORCUSER->{person_id})) ? qw(League Role Admin) : qw(League Role) ) ]) );
407
  print $h->ul ([@leagueroles]);
405
  print $h->ul ([@leagueroles]);