[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 00068a5f2d8535d64b4900d2fd8470c1333ea7ac

Ivan ivan at 420.am
Wed Apr 4 16:48:18 PDT 2012


The branch, FREESIDE_2_3_BRANCH has been updated
       via  00068a5f2d8535d64b4900d2fd8470c1333ea7ac (commit)
      from  9e710a89ff6b8a1e6b0dc407e7522390dc168079 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 00068a5f2d8535d64b4900d2fd8470c1333ea7ac
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Apr 4 16:48:07 2012 -0700

    add brand-agent option, RT#17055

diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 4a4f92c..a984db8 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -2835,6 +2835,14 @@ and customer address. Include units.',
   },
 
   {
+    'key'         => 'company_url',
+    'section'     => 'UI',
+    'description' => 'Your company URL',
+    'type'        => 'text',
+    'per_agent'   => 1,
+  },
+
+  {
     'key'         => 'company_address',
     'section'     => 'required',
     'description' => 'Your company address',
@@ -4830,6 +4838,14 @@ and customer address. Include units.',
     'type'        => 'checkbox',
   },
 
+  {
+    'key'         => 'brand-agent',
+    'section'     => 'UI',
+    'description' => 'Brand the backoffice interface (currently Help->About) using the company_name, company_url and logo.png configuration settings of the selected agent.  Typically used when selling or bundling hosted access to the backoffice interface.  NOTE: The AGPL software license has specific requirements for source code availability in this situation.',
+    'type'        => 'select-agent',
+  },
+
+
   { key => "apacheroot", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
   { key => "apachemachine", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
   { key => "apachemachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
diff --git a/httemplate/docs/about.html b/httemplate/docs/about.html
index 7aa72a5..ac81ed7 100644
--- a/httemplate/docs/about.html
+++ b/httemplate/docs/about.html
@@ -1,14 +1,34 @@
-<% include('/elements/header-popup.html', { title=>'Freeside', nobr=>1 } ) %>
+<% include('/elements/header-popup.html', { title=>$title, nobr=>1 } ) %>
 
 <% include('/elements/init_overlib.html') %>
 
 <CENTER>
-<IMG SRC="<%$fsurl%>images/small-logo.png" BORDER="0"><BR>
-<H3>version <% $FS::VERSION %></H3>
+% if ( $agentnum ) {
+
+    <IMG SRC="<%$fsurl%>view/logo-agent.cgi?agentnum=<%$agentnum%>" BORDER="0"><BR>
+
+%   my $url = $conf->config('company_url', $agentnum);
+%   if ( $url ) {
+      <BR><BR>
+      <A HREF="<% $conf->config('company_url', $agentnum) %>" TARGET="_blank"><%$title%> homepage</A>
+%   }
+
+% } else {
+
+  <IMG SRC="<%$fsurl%>images/small-logo.png" BORDER="0"><BR>
+  <H3>version <% $FS::VERSION %></H3>
+
+% }
 </CENTER>
 
 <CENTER>
-<FONT SIZE="-1">© 2012 Freeside Internet Services, Inc.<BR>
+% if ( $agentnum ) {
+  <BR><BR>
+  <FONT SIZE="-2">Based on Freeside version <% $FS::VERSION %><BR>
+% } else {
+  <FONT SIZE="-1">
+% }
+© 2012 Freeside Internet Services, Inc.<BR>
 All rights reserved.<BR>
 Licensed under the terms of the<BR>
 GNU <b>Affero</b> General Public License.<BR>
@@ -17,6 +37,9 @@ GNU <b>Affero</b> General Public License.<BR>
 <BR>
 
 <CENTER>
+% if ( $agentnum ) {
+  <FONT SIZE="-2">
+% }
 <A HREF="credits.html">Credits</A>
      
 <A HREF="javascript:void(0)" onClick="openLicense()">License</A>
@@ -24,13 +47,18 @@ GNU <b>Affero</b> General Public License.<BR>
 
 <BR><BR>
 <A HREF="http://www.freeside.biz/freeside" TARGET="_blank">Freeside homepage</A>
+% if ( $agentnum ) {
+  </FONT>
+% }
 </CENTER>
 
 <BR>
 
-<CENTER>
-<FONT SIZE="-3">"I had to learn the hard way, to let her pass by" -R. Hunter</FONT>
-</CENTER>
+% unless ( $agentnum ) {
+  <CENTER>
+  <FONT SIZE="-3">"I had to learn the hard way, to let her pass by" -R. Hunter</FONT>
+  </CENTER>
+% }
 
 <SCRIPT TYPE="text/javascript">
 
@@ -51,3 +79,11 @@ function openLicense() {
 
 </BODY>
 </HTML>
+<%init>
+
+my $conf = new FS::Conf;
+my $agentnum = $conf->config('brand-agent');
+
+my $title = $agentnum ? $conf->config('company_name', $agentnum) : 'Freeside';
+
+</%init>
diff --git a/httemplate/docs/credits.html b/httemplate/docs/credits.html
index 9bb1dec..c1d0d87 100644
--- a/httemplate/docs/credits.html
+++ b/httemplate/docs/credits.html
@@ -120,6 +120,9 @@ Tim Yardley<BR>
 <BR>
 <BR>
 <BR>
+<BR>
+<BR>
+<BR>
 
 <SCRIPT TYPE="text/javascript">
 
@@ -154,12 +157,12 @@ function myHeight() {
         return document.body.document.height;
     else
 */
-        return 1850; // approx height (add more per contributors)
+        return 1900; // approx height (add more per contributors)
 }
 
 document.body.style.overflow = 'hidden';
 
-var startingPosition = 360;
+var startingPosition = 340;
 
 //huh, adjust for firefox
 var ua = navigator.userAgent;
diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html
index ce2bbe9..11e4104 100644
--- a/httemplate/elements/menu.html
+++ b/httemplate/elements/menu.html
@@ -28,7 +28,7 @@
 %                           'width'       => 300,
 %                           'height'      => 375,
 %                           'color'       => '#7e0079',
-%                           'scrolling'   => 'no',
+%                           #'scrolling'   => 'no',
 %                       );
 % $fs_popup =~ s/return false;//;
   function about_freeside() {
@@ -619,11 +619,18 @@ $help_menu{'Ticketing documentation'} = [ 'http://wiki.bestpractical.com/', 'Req
 $help_menu{'Networking monitoring documentation'} = [ 'http://torrus.org/userguide.pod.html', 'Torrus User Guide' ]
   if $conf->config('network_monitoring_system') eq 'Torrus_Internal';
 $help_menu{'separator'} = '';
-$help_menu{"About Freeside v$FS::VERSION"} = [ "javascript:about_freeside()", '' ];
-$help_menu{"About RT v$RT::VERSION"} = [ 'http://www.bestpractical.com/rt', 'Request Tracker Homepage' ]
-  if $conf->config('ticket_system') eq 'RT_Internal';
-$help_menu{"About Torrus v1.0.9"} = [ 'http://www.torrus.org/', 'Torrus Homepage' ] #XXX manual version
-  if $conf->config('network_monitoring_system') eq 'Torrus_Internal';
+
+my $agentnum = $conf->config('brand-agent');
+if ( $agentnum ) {
+  my $company_name = $conf->config('company_name', $agentnum);
+  $help_menu{"About $company_name"} = [ "javascript:about_freeside()", '' ];
+} else {
+  $help_menu{"About Freeside v$FS::VERSION"} = [ "javascript:about_freeside()", '' ];
+  $help_menu{"About RT v$RT::VERSION"} = [ 'http://www.bestpractical.com/rt', 'Request Tracker Homepage' ]
+    if $conf->config('ticket_system') eq 'RT_Internal';
+  $help_menu{"About Torrus v1.0.9"} = [ 'http://www.torrus.org/', 'Torrus Homepage' ] #XXX manual version
+    if $conf->config('network_monitoring_system') eq 'Torrus_Internal';
+}
 
 
 tie my %menu, 'Tie::IxHash';
diff --git a/httemplate/view/logo-agent.cgi b/httemplate/view/logo-agent.cgi
new file mode 100755
index 0000000..0f65414
--- /dev/null
+++ b/httemplate/view/logo-agent.cgi
@@ -0,0 +1,10 @@
+<% $conf->config_binary("logo.png", $agentnum) %>
+<%init>
+
+my $conf = new FS::Conf;
+
+my $agentnum = $cgi->param('agentnum');
+
+http_header('Content-Type' => 'image/png' );
+
+</%init>

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/Conf.pm                  |   16 ++++++++++++
 httemplate/docs/about.html     |   50 ++++++++++++++++++++++++++++++++++-----
 httemplate/docs/credits.html   |    7 ++++-
 httemplate/elements/menu.html  |   19 ++++++++++----
 httemplate/view/logo-agent.cgi |   10 ++++++++
 5 files changed, 87 insertions(+), 15 deletions(-)
 create mode 100755 httemplate/view/logo-agent.cgi




More information about the freeside-commits mailing list