Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / httemplate / browse / part_virtual_field.cgi
1 <% include('/elements/header.html', 'Virtual field definitions') %>
2
3 <% include('/elements/error.html') %>
4
5 <A HREF="<%$p2%>edit/part_virtual_field.cgi"><I>Add a new field</I></A><BR><BR>
6 % foreach $dbtable (sort { $a cmp $b } keys (%pvfs)) { 
7
8 <H3><%$dbtable%></H3>
9
10 <%table()%>
11 <TH><TD>Field name</TD><TD>Description</TD></TH>
12 % foreach my $pvf (sort {$a->name cmp $b->name} @{ $pvfs{$dbtable} }) { 
13
14   <TR>
15     <TD></TD>
16     <TD>
17       <A HREF="<%$p2%>edit/part_virtual_field.cgi?<%$pvf->vfieldpart%>">
18         <%$pvf->name%></A></TD>
19     <TD><%$pvf->label%></TD>
20   </TR>
21 %   } 
22
23 </TABLE>
24 % } 
25
26 <% include('/elements/footer.html') %>
27
28 <%init>
29
30 die "access denied"
31   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
32
33 my %pvfs;
34 my $block;
35 my $p2 = popurl(2);
36 my $dbtable;
37
38 foreach (qsearch('part_virtual_field', {})) {
39   push @{ $pvfs{$_->dbtable} }, $_;
40 }
41
42 </%init>