summaryrefslogtreecommitdiff
path: root/httemplate/browse
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/browse')
-rwxr-xr-xhttemplate/browse/agent.cgi30
-rwxr-xr-xhttemplate/browse/agent_type.cgi24
-rwxr-xr-xhttemplate/browse/part_bill_event.cgi6
-rwxr-xr-xhttemplate/browse/part_export.cgi7
-rwxr-xr-xhttemplate/browse/part_pkg.cgi17
-rwxr-xr-xhttemplate/browse/part_referral.cgi23
-rwxr-xr-xhttemplate/browse/part_svc.cgi20
-rwxr-xr-xhttemplate/browse/svc_acct_pop.cgi8
8 files changed, 69 insertions, 66 deletions
diff --git a/httemplate/browse/agent.cgi b/httemplate/browse/agent.cgi
index 2465009..cff111c 100755
--- a/httemplate/browse/agent.cgi
+++ b/httemplate/browse/agent.cgi
@@ -1,6 +1,5 @@
<!-- mason kludge -->
<%
-
#Begin silliness
#
#use FS::UI::CGI;
@@ -11,23 +10,25 @@
#exit;
#__END__
#End silliness
+%>
-print header('Agent Listing', menubar(
+<%= header('Agent Listing', menubar(
'Main Menu' => $p,
'Agent Types' => $p. 'browse/agent_type.cgi',
# 'Add new agent' => '../edit/agent.cgi'
-)), <<END;
+)) %>
Agents are resellers of your service. Agents may be limited to a subset of your
full offerings (via their type).<BR><BR>
-END
-print &table(), <<END;
- <TR>
- <TH COLSPAN=2>Agent</TH>
- <TH>Type</TH>
- <TH><FONT SIZE=-1>Freq.</FONT></TH>
- <TH><FONT SIZE=-1>Prog.</FONT></TH>
- </TR>
-END
+<A HREF="<%= $p %>edit/agent.cgi"><I>Add a new agent</I></A><BR><BR>
+
+<%= table() %>
+<TR>
+ <TH COLSPAN=2>Agent</TH>
+ <TH>Type</TH>
+ <TH><FONT SIZE=-1>Freq.</FONT></TH>
+ <TH><FONT SIZE=-1>Prog.</FONT></TH>
+</TR>
+<%
# <TH><FONT SIZE=-1>Agent #</FONT></TH>
# <TH>Agent</TH>
@@ -54,12 +55,7 @@ END
}
print <<END;
- <TR>
- <TD COLSPAN=2><A HREF="${p}edit/agent.cgi"><I>Add a new agent</I></A></TD>
- <TD><A HREF="${p}edit/agent_type.cgi"><I>Add a new agent type</I></A></TD>
- </TR>
</TABLE>
-
</BODY>
</HTML>
END
diff --git a/httemplate/browse/agent_type.cgi b/httemplate/browse/agent_type.cgi
index eb20c64..5a84385 100755
--- a/httemplate/browse/agent_type.cgi
+++ b/httemplate/browse/agent_type.cgi
@@ -1,16 +1,19 @@
<!-- mason kludge -->
-<%
-
-print header("Agent Type Listing", menubar(
+<%= header("Agent Type Listing", menubar(
'Main Menu' => $p,
-)), "Agent types define groups of packages that you can then assign to".
- " particular agents.<BR><BR>", &table(), <<END;
- <TR>
- <TH COLSPAN=2>Agent Type</TH>
- <TH COLSPAN=2>Packages</TH>
- </TR>
-END
+ 'Agents' => $p. 'browse/agent.cgi',
+)) %>
+Agent types define groups of packages that you can then assign to particular
+agents.<BR><BR>
+<A HREF="<%= $p %>edit/agent_type.cgi"><I>Add a new agent type</I></A><BR><BR>
+
+<%= table() %>
+<TR>
+ <TH COLSPAN=2>Agent Type</TH>
+ <TH COLSPAN=2>Packages</TH>
+</TR>
+<%
foreach my $agent_type ( sort {
$a->getfield('typenum') <=> $b->getfield('typenum')
} qsearch('agent_type',{}) ) {
@@ -47,7 +50,6 @@ END
}
print <<END;
- <TR><TD COLSPAN=4><I><A HREF="${p}edit/agent_type.cgi">Add a new agent type</A></I></TD></TR>
</TABLE>
</BODY>
</HTML>
diff --git a/httemplate/browse/part_bill_event.cgi b/httemplate/browse/part_bill_event.cgi
index 1d674f7..670474d 100755
--- a/httemplate/browse/part_bill_event.cgi
+++ b/httemplate/browse/part_bill_event.cgi
@@ -15,6 +15,8 @@ my $total = scalar(@part_bill_event);
<%= header('Invoice Event Listing', menubar( 'Main Menu' => $p) ) %>
Invoice events are actions taken on overdue invoices.<BR><BR>
+<A HREF="<%= $p %>edit/part_bill_event.cgi"><I>Add a new invoice event</I></A>
+<BR><BR>
<%= $total %> events
<%= $cgi->param('showdisabled')
? do { $cgi->param('showdisabled', 0);
@@ -64,10 +66,6 @@ my $total = scalar(@part_bill_event);
<%= $part_bill_event->eventcode %></FONT></TD>
</TR>
<% } %>
-
- <TR>
- <TD COLSPAN=8><A HREF="<%= $p %>edit/part_bill_event.cgi"><I>Add a new invoice event</I></A></TD>
- </TR>
</TABLE>
</BODY>
</HTML>
diff --git a/httemplate/browse/part_export.cgi b/httemplate/browse/part_export.cgi
index e9d9fa3..76662e0 100755
--- a/httemplate/browse/part_export.cgi
+++ b/httemplate/browse/part_export.cgi
@@ -1,7 +1,7 @@
<!-- mason kludge -->
-<%= header("Export Listing", menubar( 'Main Menu' => $p )) %>
+<%= header("Export Listing", menubar( 'Main Menu' => "$p#sysadmin" )) %>
Provisioning services to external machines, databases and APIs.<BR><BR>
-
+<A HREF="<%= $p %>edit/part_export.cgi"><I>Add a new export</I></A><BR><BR>
<SCRIPT>
function part_export_areyousure(href) {
if (confirm("Are you sure you want to delete this export?") == true)
@@ -34,9 +34,6 @@ function part_export_areyousure(href) {
<% } %>
- <TR>
- <TD COLSPAN=3><A HREF="<%= $p %>edit/part_export.cgi"><I>Add a new export</I></A></TD>
- </TR>
</TABLE>
</BODY>
</HTML>
diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi
index c208114..58422c6 100755
--- a/httemplate/browse/part_pkg.cgi
+++ b/httemplate/browse/part_pkg.cgi
@@ -11,13 +11,16 @@ if ( $cgi->param('showdisabled') ) {
my @part_pkg = qsearch('part_pkg', \%search );
my $total = scalar(@part_pkg);
-print header("Package Definition Listing",menubar(
- 'Main Menu' => $p,
-)). "One or more services are grouped together into a package and given".
- " pricing information. Customers purchase packages".
- " rather than purchase services directly.<BR><BR>".
- "$total packages ";
+%>
+<%= header("Package Definition Listing",menubar( 'Main Menu' => $p )) %>
+One or more services are grouped together into a package and given pricing
+information. Customers purchase packages rather than purchase services
+directly.<BR><BR>
+<A HREF="<%= $p %>edit/part_pkg.cgi"><I>Add a new package definition</I></A>
+<BR><BR>
+<%= $total %> packages
+<%
if ( $cgi->param('showdisabled') ) {
$cgi->param('showdisabled', 0);
print qq!( <a href="!. $cgi->self_url. qq!">hide disabled packages</a> )!;
@@ -91,7 +94,7 @@ END
$colspan = $cgi->param('showdisabled') ? 8 : 9;
print <<END;
- <TR><TD COLSPAN=$colspan><I><A HREF="${p}edit/part_pkg.cgi">Add a new package definition</A></I></TD></TR>
+
</TABLE>
</BODY>
</HTML>
diff --git a/httemplate/browse/part_referral.cgi b/httemplate/browse/part_referral.cgi
index 93a6976..084c21b 100755
--- a/httemplate/browse/part_referral.cgi
+++ b/httemplate/browse/part_referral.cgi
@@ -1,15 +1,19 @@
<!-- mason kludge -->
-<%
-
-print header("Advertising source Listing", menubar(
+<%= header("Advertising source Listing", menubar(
'Main Menu' => $p,
# 'Add new referral' => "../edit/part_referral.cgi",
-)), "Where a customer heard about your service. Tracked for informational purposes.<BR><BR>", &table(), <<END;
- <TR>
- <TH COLSPAN=2>Advertising source</TH>
- </TR>
-END
+)) %>
+Where a customer heard about your service. Tracked for informational purposes.
+<BR><BR>
+<A HREF="<%= $p %>edit/part_referral.cgi"><I>Add a new advertising source</I></A>
+<BR><BR>
+<%= table() %>
+<TR>
+ <TH COLSPAN=2>Advertising source</TH>
+</TR>
+
+<%
foreach my $part_referral ( sort {
$a->getfield('refnum') <=> $b->getfield('refnum')
} qsearch('part_referral',{}) ) {
@@ -26,9 +30,6 @@ END
}
print <<END;
- <TR>
- <TD COLSPAN=2><A HREF="${p}edit/part_referral.cgi"><I>Add a new advertising source</I></A></TD>
- </TR>
</TABLE>
</BODY>
</HTML>
diff --git a/httemplate/browse/part_svc.cgi b/httemplate/browse/part_svc.cgi
index 5c33e68..9fb359d 100755
--- a/httemplate/browse/part_svc.cgi
+++ b/httemplate/browse/part_svc.cgi
@@ -8,7 +8,9 @@ if ( $cgi->param('showdisabled') ) {
%search = ( 'disabled' => '' );
}
-my @part_svc = qsearch('part_svc', \%search );
+my @part_svc =
+ sort { $a->getfield('svcpart') <=> $b->getfield('svcpart') }
+ qsearch('part_svc', \%search );
my $total = scalar(@part_svc);
%>
@@ -22,6 +24,14 @@ function part_export_areyousure(href) {
</SCRIPT>
Services are items you offer to your customers.<BR><BR>
+
+<FORM METHOD="POST" ACTION="<%= $p %>edit/part_svc.cgi"><A HREF="<%= $p %>edit/part_svc.cgi"><I>Add a new service definition</I></A>&nbsp;or&nbsp;<SELECT NAME="clone"><OPTION></OPTION>
+<% foreach my $part_svc ( @part_svc ) { %>
+ <OPTION VALUE="<%= $part_svc->svcpart %>"><%= $part_svc->svc %></OPTION>
+<% } %>
+</SELECT><INPUT TYPE="submit" VALUE="Clone existing service">
+</FORM><BR>
+
<%= $total %> services
<%= $cgi->param('showdisabled')
? do { $cgi->param('showdisabled', 0);
@@ -38,9 +48,7 @@ function part_export_areyousure(href) {
<TH COLSPAN=2>Modifier</TH>
</TR>
-<% foreach my $part_svc ( sort {
- $a->getfield('svcpart') <=> $b->getfield('svcpart')
- } @part_svc ) {
+<% foreach my $part_svc ( @part_svc ) {
my $hashref = $part_svc->hashref;
my $svcdb = $hashref->{svcdb};
my @dfields = fields($svcdb);
@@ -94,10 +102,6 @@ map { qsearchs('part_export', { exportnum => $_->exportnum } ) } qsearch('export
%>
</TR>
<% } %>
-
- <TR>
- <TD COLSPAN=<%= $cgi->param('showdisabled') ? 7 : 8 %>><A HREF="<%= $p %>edit/part_svc.cgi"><I>Add a new service definition</I></A></TD>
- </TR>
</TABLE>
</BODY>
</HTML>
diff --git a/httemplate/browse/svc_acct_pop.cgi b/httemplate/browse/svc_acct_pop.cgi
index f8ee58c..e890f07 100755
--- a/httemplate/browse/svc_acct_pop.cgi
+++ b/httemplate/browse/svc_acct_pop.cgi
@@ -3,7 +3,10 @@
print header('Access Number Listing', menubar(
'Main Menu' => $p,
-)), "Points of Presence<BR><BR>", &table(), <<END;
+)) %>
+Points of Presence<BR><BR>
+<A HREF="<%= $p %>edit/svc_acct_pop.cgi"><I>Add new Access Number</I></A><BR><BR>
+<%= table() %>
<TR>
<TH></TH>
<TH>City</TH>
@@ -12,8 +15,8 @@ print header('Access Number Listing', menubar(
<TH>Exchange</TH>
<TH>Local</TH>
</TR>
-END
+<%
foreach my $svc_acct_pop ( sort {
#$a->getfield('popnum') <=> $b->getfield('popnum')
$a->state cmp $b->state || $a->city cmp $b->city
@@ -41,7 +44,6 @@ END
print <<END;
<TR>
- <TD COLSPAN=5><A HREF="${p}edit/svc_acct_pop.cgi"><I>Add new Access Number</I></A></TD>
</TR>
</TABLE>
</BODY>