← Back to team overview

mvhub-dev team mailing list archive

[Merge] lp:~priya/mvhub/search_box_help_text into lp:mvhub

 

Priya Ravindran has proposed merging lp:~priya/mvhub/search_box_help_text into lp:mvhub.

Requested reviews:
  MVHub devs with commit rights (mvhub-commit)


site configuration values not passed into sub routine add_site_specific_values, the problem was fixed
-- 
https://code.launchpad.net/~priya/mvhub/search_box_help_text/+merge/25346
Your team MVHub Developers is subscribed to branch lp:mvhub.
=== modified file 'app-mvhub/conf/templates/html/search_bar.tmpl'
--- app-mvhub/conf/templates/html/search_bar.tmpl	2010-01-31 23:15:07 +0000
+++ app-mvhub/conf/templates/html/search_bar.tmpl	2010-05-14 17:25:40 +0000
@@ -2,9 +2,11 @@
 <!-- start search_bar.tmpl -->
 <div id='searchbar'>
 <p> &nbsp;</p>
+
+
 <h1> Search for Social Services in <!--TMPL_VAR ESCAPE=HTML NAME=site_location --> </h1>
-     <b>services</b>.  (family counseling,job training, health care,food,shelter...)<br />
-     or <b>organizations</b> (YMCA, NSCAP,UTEC,House of Hope)<br />
+You can search for services by <b>key word:</b>
+				   <!--TMPL_VAR  NAME=search_box_help_text -->
 
      <form  method="GET" action="/cgi-bin/mvhub/guide.pl">
          <input name="rm" 

=== modified file 'app-mvhub/project-tools/bin/mv_setup'
--- app-mvhub/project-tools/bin/mv_setup	2010-04-30 21:05:11 +0000
+++ app-mvhub/project-tools/bin/mv_setup	2010-05-14 17:25:40 +0000
@@ -120,12 +120,14 @@
 sub add_site_specific_values {
     my $template_cfg = shift or croak 'missing param: $template_cfg';
     my $username     = shift or croak 'missing param: $username';
-    my %site_specific_values = %_;
+    my %site_specific_values = @_;
 
     foreach my $key ( keys %site_specific_values ) {
         $template_cfg->param( $key, $site_specific_values{$key} );
     }
+
     return $template_cfg;
+
 }
 
 sub add_user_generated_values {
@@ -319,11 +321,13 @@
     my %hash_of_site_specific_values = (
         'mvh' => {
             'SITE.location'            => '"Massachusetts Merrimack Valley"',
+            'SITE.search_box_help_text' => q|' (e.g. family counseling, job training, health care, food, shelter, childcare ...) or <b>organizations</b> (YMCA, UTEC, House of Hope)'|,
             'SITE.website_description' => 'Merrimack Valley Hub',
             'NOTIFICATION.team_name'   => 'Merrimack Valley Hub Team'
         },
         'nsp' => {
             'SITE.location'            => '"Massachusetts North Shore"',
+            'SITE.search_box_help_text' => q|'(e.g. family counseling , job training, health care, shelter  ...) or <b>organizations</b> (YMCA, NSCAP)'|, 
             'SITE.website_description' => 'North Shore Portal',
             'NOTIFICATION.team_name'   => 'North Shore Portal Team'
         }
@@ -363,6 +367,7 @@
 
     die $msg if $msg;
     return 1;
+
 }
 
 sub get_username_or_die {
@@ -430,7 +435,6 @@
 
         print "Editing Config: $cfg_file\n";
         my %site_specific_values = get_site_specific_values($site_code);
-
         $template_cfg = add_site_specific_values( $template_cfg, $username,
             %site_specific_values );
         $template_cfg =

=== modified file 'app-mvhub/project-tools/templates/template.conf'
--- app-mvhub/project-tools/templates/template.conf	2010-04-30 20:23:54 +0000
+++ app-mvhub/project-tools/templates/template.conf	2010-05-14 17:25:40 +0000
@@ -88,6 +88,8 @@
 # or Merrimack Valley
 location="Massachusetts Merrimack Valley"
 
+search_box_help_text=BAD_SEARCH_BOX_HELP_TEXT_FIX_IN_CONFIG_FILE
+
 # right now either "North Shore Portal"
 # or "Merrimack Valley Hub"
 website_description=North Shore Portal

=== modified file 'lib-mvhub/lib/MVHub/Guide.pm'
--- lib-mvhub/lib/MVHub/Guide.pm	2010-04-26 19:58:07 +0000
+++ lib-mvhub/lib/MVHub/Guide.pm	2010-05-14 17:25:40 +0000
@@ -395,7 +395,11 @@
     # needed by search_bar.tmpl
     $self->param( 'site_location', $self->get_config_param('SITE.location') );
 
+    $self->param( 'search_box_help_text',
+        $self->get_config_param('SITE.search_box_help_text') );
+
     return $tmpl->output();
+
 }
 
 sub _add_program_urls_to {

=== modified file 'lib-mvhub/lib/MVHub/Page.pm'
--- lib-mvhub/lib/MVHub/Page.pm	2010-04-26 19:58:07 +0000
+++ lib-mvhub/lib/MVHub/Page.pm	2010-05-14 17:25:40 +0000
@@ -20,6 +20,9 @@
 # the search phrase the user previously used:
 our $SEARCH_PHRASE_TAG = 'last_search_phrase';
 
+my $CFG
+    = MVHub::Utils::ConfigSimple::create_config_from( $ENV{MV_CONFIG_FILE} );
+
 my $M_BODY_TAG               = 'mode_body';
 my $M_SHOW_SEARCH_BAR_TAG    = 'show_search_bar';
 my $M_OMIT_LEFT_MENU_TAG     = 'omit_left_menu';
@@ -100,8 +103,11 @@
         if ($agency_search) {
             $tmpl->param( $SB_CHECK_BY_AGENCY_TAG, $agency_search );
         }
+
         $tmpl->param( $SEARCH_PHRASE_TAG, $search_phrase );
-        $tmpl->param( 'site_location',    $site_location );
+        $tmpl->param( 'site_location',    $CFG->param('SITE.location') );
+        $tmpl->param( 'search_box_help_text',
+            $CFG->param('SITE.search_box_help_text') );
     }
 
     return $tmpl->output();

=== modified file 'lib-mvhub/t/conf/all.conf'
--- lib-mvhub/t/conf/all.conf	2010-04-30 20:23:54 +0000
+++ lib-mvhub/t/conf/all.conf	2010-05-14 17:25:40 +0000
@@ -75,7 +75,7 @@
 # or Merrimack Valley
 location="Massachusetts Merrimack Valley"
 website_description=
-
+search_box_help_text=ignore
 ############################ DANGER DANGER DANGER ####################
 # 	constants BELOW used **internally** by application, 
 # 	DON'T mess with them unless you know what you are doing