[freeside-commits] freeside/httemplate/edit part_device.html, 1.1, 1.1.2.1

Jeff Finucane,420,, jeff at wavetail.420.am
Mon Feb 8 07:32:40 PST 2010


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

Modified Files:
      Tag: FREESIDE_1_9_BRANCH
	part_device.html 
Log Message:
grandstream device configuration support #4220

Index: part_device.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/part_device.html,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -d -r1.1 -r1.1.2.1
--- part_device.html	30 Jun 2009 01:42:55 -0000	1.1
+++ part_device.html	8 Feb 2010 15:32:38 -0000	1.1.2.1
@@ -6,6 +6,7 @@
                                'devicename' => 'Device name',
                              },
                  'viewall_dir' => 'browse',
+                 'html_bottom' => $html_bottom_sub,
            )
 %>
 <%init>
@@ -13,4 +14,33 @@
 die "access denied"
   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
 
+my $extra_sql =
+  join( ' OR ', map { "exporttype = '$_'" }
+                keys %{FS::part_export::export_info('part_device')}
+      );
+$extra_sql = $extra_sql ? " WHERE ( $extra_sql ) " : " WHERE 0 = 1 ";
+
+my $html_bottom_sub = sub {
+  my $part_device = shift;
+
+  '<BR>'.
+  '<FONT SIZE="+1">Exports</FONT><BR>'.
+
+  '<TABLE BGCOLOR="#cccccc" WIDTH=100%>'.
+  '<TR><TD>'.
+  include( '/elements/checkboxes-table.html',
+             'source_obj'    => $part_device,
+             'link_table'    => 'export_device',
+             'target_table'  => 'part_export',
+             'extra_sql'     => $extra_sql,
+             'name_callback' => sub { my $o = shift;
+                                      $o->exporttype. ' to '. $o->machine;
+                                    },
+         ).
+  '<BR>'.
+  '</TD></TR></TABLE>';
+
+};
+
 </%init>
+



More information about the freeside-commits mailing list