[freeside-commits] freeside/httemplate/elements menu.html, 1.112, 1.113 select-hardware_class.html, NONE, 1.1 select-hardware_type.html, NONE, 1.1 tr-cust_svc.html, NONE, 1.1 tr-cust_svc_cancel.html, NONE, 1.1 tr-select-hardware_type.html, NONE, 1.1

Mark Wells mark at wavetail.420.am
Thu Mar 31 19:52:20 PDT 2011


Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail.420.am:/tmp/cvs-serv29538/httemplate/elements

Modified Files:
	menu.html 
Added Files:
	select-hardware_class.html select-hardware_type.html 
	tr-cust_svc.html tr-cust_svc_cancel.html 
	tr-select-hardware_type.html 
Log Message:
svc_hardware and svc_dish, #11454

--- NEW FILE: tr-cust_svc.html ---
<%doc>
tr-cust_svc - Short display of a customer service for use in view/cust_main.

Formerly part of view/cust_main/packages/services.html, moved here for 
cleanliness.
</%doc>
<TR>
  <TD ALIGN="right" VALIGN="top"><% 
FS::UI::Web::svc_link($m, $part_svc, $cust_svc)
%></TD>
  <TD STYLE="padding-bottom:0px"><B><%
FS::UI::Web::svc_label_link($m, $part_svc, $cust_svc)
%></B></TD>
</TR>
% if ( $cust_svc->overlimit ) {
<TR>
  <TD ALIGN="right" COLSPAN="3" VALIGN="top"
      STYLE="padding-bottom:1px; padding-top:0px">
    <FONT SIZE="-2" COLOR="#FFD000">Overlimit: <%
time2str('%b %o %Y' . $opt{'cust_pkg-display_times'} ? ' %l:%M %P' : '',
$cust_svc->overlimit )
    %></FONT>
  </TD>
</TR>
% }
<TR>
% # first column: recharge link
  <TD ALIGN="right" VALIGN="top" STYLE="padding-bottom:5px; padding-top:0px">
% if ( $curuser->access_right('Recharge customer service') 
%     && $part_svc->svcdb eq 'svc_acct'
%     && ( $svc_x->seconds ne '' 
%       || $svc_x->upbytes ne ''
%       || $svc_x->downbytes ne ''
%       || $svc_x->totalbytes ne ''
%     )
% ) {
    <FONT SIZE="-2">(&nbsp;<% svc_recharge_link($cust_svc)%>&nbsp;)</FONT>
% }
  </TD>
% # second column: all other action links
  <TD ALIGN="right" VALIGN="top" STYLE="padding-bottom:5px; padding-top:0px">
% if ( $part_svc->svcdb eq 'svc_broadband' ) {
    <FONT SIZE="-1" STYLE="float:left">(&nbsp;<%
      include('/elements/popup_link-ping.html',
              'ip' => $svc_x->ip_addr
      ) %>&nbsp;)</FONT>
%   my $manage_link = $opt{'svc_broadband-manage_link'};
%   if ( $manage_link ) {
    <FONT SIZE="-1" STYLE="float:left">(&nbsp;<A HREF="<% 
      eval(qq("$manage_link")) 
    %>">Manage Device</A>&nbsp;)</FONT>
%   }
% } #svc_broadband
% if ( $curuser->access_right('Unprovision customer service') ) {
    <FONT SIZE="-2">(&nbsp;<% $svc_unprovision_link %>&nbsp;)</FONT>
% }
% if ( $part_svc->svcdb eq 'svc_pbx' && $opt{'maestro-status_test'} ) {
    <FONT SIZE="-2">(&nbsp;<A HREF="<%$p%>misc/maestro-customer_status-test.html?<% $cust_pkg->custnum.'+'.$cust_svc->svcnum %>">Test maestro status</A>&nbsp;)
    </FONT>
% }
  </TD>
</TR>

<%init>
my %opt = @_;
my $curuser = $FS::CurrentUser::CurrentUser;

my $cust_svc = $opt{'cust_svc'};
my $part_svc = $opt{'part_svc'} || $cust_svc->part_svc;
my $cust_pkg = $opt{'cust_pkg'} || $cust_svc->cust_pkg;
my $svc_x = $cust_svc->svc_x;

my $svc_unprovision_link = 
  qq!<A HREF="javascript:areyousure('${p}misc/unprovision.cgi?! .
  $cust_svc->svcnum .
  qq!', 'Permanently unprovision and delete this service?')">Unprovision</A>!;

</%init>

--- NEW FILE: tr-cust_svc_cancel.html ---
<%doc>
tr-cust_svc_cancel - Short display of a canceled customer service 
for use in view/cust_main.
</%doc>
<TR STYLE="color:#cccccc;">
  <TD ALIGN="right" VALIGN="top"><% 
FS::UI::Web::svc_link($m, $part_svc, $cust_svc)
%></TD>
  <TD STYLE="padding-bottom:0px;"><B><%
FS::UI::Web::svc_label_link($m, $part_svc, $cust_svc)
%></B></TD>
</TR>
%# no action links, the service is canceled

<%init>
my %opt = @_;
my $curuser = $FS::CurrentUser::CurrentUser;

my $cust_svc = $opt{'cust_svc'};
my $part_svc = $opt{'part_svc'} || $cust_svc->part_svc;
my $cust_pkg = $opt{'cust_pkg'} || $cust_svc->cust_pkg;
my $svc_x = $cust_svc->svc_x;

</%init>

--- NEW FILE: tr-select-hardware_type.html ---
<TR>
  <TD ALIGN="right"><% $opt{'label'} || 'Device type: ' %></TD>
  <TD><% include('select-hardware_type.html', %opt) %></TD>
</TR>

<%init>

my %opt = @_;

</%init>

Index: menu.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/menu.html,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -w -d -r1.112 -r1.113
--- menu.html	21 Mar 2011 00:52:33 -0000	1.112
+++ menu.html	1 Apr 2011 02:52:15 -0000	1.113
@@ -191,7 +191,7 @@
       ];
   }
 
-  if ( $svcdb eq 'svc_acct' || $svcdb eq 'svc_broadband' ) {
+  if ( $svcdb =~ /^svc_(acct|broadband|hardware)$/ ) {
     $report_svc{"Advanced $lcsname reports"} = 
       [ $fsurl."search/report_$svcdb.html", '' ];
   }
@@ -532,6 +532,9 @@
   || $curuser->access_right('Edit global inventory')
   || $curuser->access_right('Configuration');
 
+$config_misc{'Hardware types'} = [ $fsurl.'browse/hardware_class.html', 'Set up hardware type catalog' ]
+  if $curuser->access_right('Configuration');
+
 tie my %config_menu, 'Tie::IxHash';
 if ( $curuser->access_right('Configuration' ) ) {
   %config_menu = (

--- NEW FILE: select-hardware_type.html ---
<% include( '/elements/select-table.html',
                 'table'         => 'hardware_type',
                 'name_col'      => 'model',
                 'hashref'       => $hashref,
                 %opt,
             )
%>
<%init>
my %opt = @_;
my $classnum = delete $opt{'classnum'};
my $hashref = $opt{'hashref'} || {};
$hashref->{'classnum'} = $classnum if $classnum;

</%init>

--- NEW FILE: select-hardware_class.html ---
<% include( '/elements/select-table.html',
                 'table'         => 'hardware_class',
                 'name_col'      => 'classname',
                 'hashref'       => { 'disabled' => '' },
                 %opt,
             )
%>
<%init>
my %opt = @_;
</%init>



More information about the freeside-commits mailing list