Changeset 388 for trunk/dns.cgi


Ignore:
Timestamp:
09/21/12 13:05:17 (12 years ago)
Author:
Kris Deugau
Message:

/trunk

Extend location view on the record page to either show a dropdown
when adding/editing if the user has record_locchg permission, or
just show the location's short description if not. See #10.
Also add the new permission to the permissions subtemplate.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns.cgi

    r383 r388  
    21212121  return unless ($permissions{admin} || $permissions{location_view});
    21222122
    2123   my $loclist = getLocDropdown($dbh, $cur, $defloc);
    2124 
    21252123  $page->param(location_view => ($permissions{admin} || $permissions{location_view}));
    2126   $page->param(loclist => $loclist);
     2124
     2125  if ($permissions{admin} || $permissions{record_locchg}) {
     2126    my $loclist = getLocDropdown($dbh, $cur, $defloc);
     2127    $page->param(record_locchg => 1);
     2128    $page->param(loclist => $loclist);
     2129  } else {
     2130    my $loc = getLoc($dbh, $defloc);
     2131    $page->param(loc_name => $loc->{description});
     2132  }
    21272133} # end fill_loclist()
    21282134
Note: See TracChangeset for help on using the changeset viewer.