mvhub-dev team mailing list archive
-
mvhub-dev team
-
Mailing list archive
-
Message #00072
[Merge] lp:~leegoodrich/mvhub/fix_nsp_documents into lp:mvhub
Lee Goodrich has proposed merging lp:~leegoodrich/mvhub/fix_nsp_documents into lp:mvhub.
Requested reviews:
mvhub-dev (mvhub-dev)
See commit message for details. Adds the NSP documents section into
version control and only adds the menu item on NSP, not MVH.
--
https://code.launchpad.net/~leegoodrich/mvhub/fix_nsp_documents/+merge/22913
Your team mvhub-dev is subscribed to branch lp:mvhub.
=== modified file 'app-mvhub/DocumentRoot/cgi-bin/mvhub/contact_form.pl'
--- app-mvhub/DocumentRoot/cgi-bin/mvhub/contact_form.pl 2009-12-29 17:26:17 +0000
+++ app-mvhub/DocumentRoot/cgi-bin/mvhub/contact_form.pl 2010-04-06 21:10:35 +0000
@@ -20,6 +20,7 @@
= MVHub::Utils::ConfigSimple::create_config_from( $ENV{MV_CONFIG_FILE} )
or croak
"couldn't create config object with file: '$ENV{MV_CONFIG_FILE}' ";
+my $site_code = $cfg->param('SITE.website_code');
{ # main
my $cgi = CGI->new();
@@ -93,6 +94,12 @@
}
else {
+ my $show_nsp_left_menu = 0;
+ if ( $site_code eq 'nsp' ) {
+ $show_nsp_left_menu = 1;
+ }
+ $form->tmpl_param( 'show_nsp_left_menu' => $show_nsp_left_menu );
+
$form->tmpl_param(
'admin_name' => $cfg->param('NOTIFICATION.admin_name') );
$form->tmpl_param(
=== modified file 'app-mvhub/DocumentRoot/static/nsp/html/about.shtml'
--- app-mvhub/DocumentRoot/static/nsp/html/about.shtml 2009-10-09 21:49:40 +0000
+++ app-mvhub/DocumentRoot/static/nsp/html/about.shtml 2010-04-06 21:10:35 +0000
@@ -74,6 +74,7 @@
<div id="leftcolumn">
<div class="innertube">
<!--#include virtual="/all/inc/left_menu.inc"-->
+ <!--#include virtual="/inc/site_left_menu.inc"-->
</div>
</div>
=== added directory 'app-mvhub/DocumentRoot/static/nsp/html/documents'
=== added file 'app-mvhub/DocumentRoot/static/nsp/html/documents.shtml'
--- app-mvhub/DocumentRoot/static/nsp/html/documents.shtml 1970-01-01 00:00:00 +0000
+++ app-mvhub/DocumentRoot/static/nsp/html/documents.shtml 2010-04-06 21:10:35 +0000
@@ -0,0 +1,45 @@
+<!--#include virtual='/all/inc/doctype.inc' -->
+<html>
+<head>
+ <title>
+ Documents: North Shore Portal
+ </title>
+ <!--#include virtual="/all/inc/head.inc"-->
+</head>
+
+<body>
+ <div id="maincontainer">
+ <div id="topsection">
+ </div>
+
+ <div id="contentwrapper">
+ <div id="contentcolumn">
+ <div class="innertube">
+
+ <h2>Documents</h2>
+
+ <p>
+ <a href="documents/NSCAP_Community_Action_Plan_FY09_to_FY11.pdf">
+ NSCAP Community Action Plan FY09 to FY11
+ </a> (PDF)</p>
+
+ <p>
+ <a href="documents/Plan_to_End_Homelessness_on_the_North_Shore.pdf">
+ Plan to End Homelessness on the North Shore
+ </a> (PDF)</p>
+
+ </div>
+ </div>
+ </div>
+
+ <div id="leftcolumn">
+ <div class="innertube">
+ <!--#include virtual="/all/inc/left_menu.inc"-->
+ <!--#include virtual="/inc/site_left_menu.inc"-->
+ </div>
+ </div>
+
+ <!--#include virtual="/all/inc/footer.inc"-->
+</div> <!-- id="maincontainer" -->
+</body>
+</html>
=== added file 'app-mvhub/DocumentRoot/static/nsp/html/documents/NSCAP_Community_Action_Plan_FY09_to_FY11.pdf'
Binary files app-mvhub/DocumentRoot/static/nsp/html/documents/NSCAP_Community_Action_Plan_FY09_to_FY11.pdf 1970-01-01 00:00:00 +0000 and app-mvhub/DocumentRoot/static/nsp/html/documents/NSCAP_Community_Action_Plan_FY09_to_FY11.pdf 2010-04-06 21:10:35 +0000 differ
=== added file 'app-mvhub/DocumentRoot/static/nsp/html/documents/Plan_to_End_Homelessness_on_the_North_Shore.pdf'
Binary files app-mvhub/DocumentRoot/static/nsp/html/documents/Plan_to_End_Homelessness_on_the_North_Shore.pdf 1970-01-01 00:00:00 +0000 and app-mvhub/DocumentRoot/static/nsp/html/documents/Plan_to_End_Homelessness_on_the_North_Shore.pdf 2010-04-06 21:10:35 +0000 differ
=== modified file 'app-mvhub/DocumentRoot/static/nsp/html/help.shtml'
--- app-mvhub/DocumentRoot/static/nsp/html/help.shtml 2009-10-09 21:49:40 +0000
+++ app-mvhub/DocumentRoot/static/nsp/html/help.shtml 2010-04-06 21:10:35 +0000
@@ -156,6 +156,7 @@
<div id="leftcolumn">
<div class="innertube">
<!--#include virtual="/all/inc/left_menu.inc"-->
+ <!--#include virtual="/inc/site_left_menu.inc"-->
</div>
</div>
<!--#include virtual="/all/inc/footer.inc"-->
=== modified file 'app-mvhub/DocumentRoot/static/nsp/html/links.shtml'
--- app-mvhub/DocumentRoot/static/nsp/html/links.shtml 2010-01-07 19:16:56 +0000
+++ app-mvhub/DocumentRoot/static/nsp/html/links.shtml 2010-04-06 21:10:35 +0000
@@ -46,7 +46,8 @@
<DIV id=leftcolumn>
<DIV class=innertube><!-- start left_menu.inc -->
- <!--#include virtual="/all/inc/left_menu.inc"-->
+ <!--#include virtual="/all/inc/left_menu.inc"-->
+ <!--#include virtual="/inc/site_left_menu.inc"-->
<!-- stop left_menu.inc --></DIV></DIV><!-- start footer.inc -->
=== modified file 'app-mvhub/DocumentRoot/static/nsp/html/register.shtml'
--- app-mvhub/DocumentRoot/static/nsp/html/register.shtml 2009-10-09 21:49:40 +0000
+++ app-mvhub/DocumentRoot/static/nsp/html/register.shtml 2010-04-06 21:10:35 +0000
@@ -188,6 +188,7 @@
<div class="innertube">
<!--#include virtual="/all/inc/left_menu.inc"-->
+ <!--#include virtual="/inc/site_left_menu.inc"-->
</div><!-- id=innertube -->
</div><!-- id=leftcolumn -->
=== modified file 'app-mvhub/DocumentRoot/static/nsp/html/reports.shtml'
--- app-mvhub/DocumentRoot/static/nsp/html/reports.shtml 2010-02-01 02:16:47 +0000
+++ app-mvhub/DocumentRoot/static/nsp/html/reports.shtml 2010-04-06 21:10:35 +0000
@@ -35,6 +35,7 @@
<div id="leftcolumn">
<div class="innertube">
<!--#include virtual="/all/inc/left_menu.inc"-->
+ <!--#include virtual="/inc/site_left_menu.inc"-->
</div>
</div>
=== modified file 'app-mvhub/DocumentRoot/static/nsp/html/servicearea.shtml'
--- app-mvhub/DocumentRoot/static/nsp/html/servicearea.shtml 2009-10-09 21:49:40 +0000
+++ app-mvhub/DocumentRoot/static/nsp/html/servicearea.shtml 2010-04-06 21:10:35 +0000
@@ -87,6 +87,7 @@
<div class="innertube">
<!--#include virtual="/all/inc/left_menu.inc"-->
+<!--#include virtual="/inc/site_left_menu.inc"-->
</div><!-- id="innertube" -->
</div><!-- id="leftcolumn" -->
=== added file 'app-mvhub/DocumentRoot/static/nsp/inc/site_left_menu.inc'
--- app-mvhub/DocumentRoot/static/nsp/inc/site_left_menu.inc 1970-01-01 00:00:00 +0000
+++ app-mvhub/DocumentRoot/static/nsp/inc/site_left_menu.inc 2010-04-06 21:10:35 +0000
@@ -0,0 +1,8 @@
+
+<!-- start nsp_left_menu.inc -->
+ <p><a href="/html/documents.shtml">
+ Documents
+ </a></p>
+
+<!-- stop nsp_left_menu.inc -->
+
=== added symlink 'app-mvhub/conf/templates/html/all'
=== target is u'../../../DocumentRoot/static/all/'
=== modified file 'app-mvhub/conf/templates/html/contact_form.tmpl'
--- app-mvhub/conf/templates/html/contact_form.tmpl 2009-10-09 21:49:40 +0000
+++ app-mvhub/conf/templates/html/contact_form.tmpl 2010-04-06 21:10:35 +0000
@@ -125,6 +125,9 @@
<div id="leftcolumn">
<div class="innertube">
<!--tmpl_include name="inc/left_menu.inc"-->
+ <!-- tmpl_if name="show_nsp_left_menu" -->
+ <!-- tmpl_include name="nsp/inc/site_left_menu.inc" -->
+ <!--/tmpl_if-->
</div>
</div>
=== modified file 'app-mvhub/conf/templates/html/main.tmpl'
--- app-mvhub/conf/templates/html/main.tmpl 2009-10-09 21:49:40 +0000
+++ app-mvhub/conf/templates/html/main.tmpl 2010-04-06 21:10:35 +0000
@@ -29,7 +29,10 @@
<div id="leftcolumn">
<div class="innertube">
<!--TMPL_UNLESS name="omit_left_menu"-->
- <!-- tmpl_include name="inc/left_menu.inc" -->
+ <!-- tmpl_include name="all/inc/left_menu.inc" -->
+ <!-- tmpl_if name="show_nsp_left_menu" -->
+ <!-- tmpl_include name="nsp/inc/site_left_menu.inc" -->
+ <!--/tmpl_if-->
<!--/TMPL_UNLESS-->
</div>
</div>
=== added symlink 'app-mvhub/conf/templates/html/nsp'
=== target is u'../../../DocumentRoot/static/nsp/'
=== modified file 'app-mvhub/doc/checklists/move_to_production.txt'
--- app-mvhub/doc/checklists/move_to_production.txt 2010-03-12 01:40:52 +0000
+++ app-mvhub/doc/checklists/move_to_production.txt 2010-04-06 21:10:35 +0000
@@ -60,13 +60,34 @@
bzr export ../$RELEASE_TAG -rtag:$RELEASE_TAG
+___ ***IMPORTANT*** Backup documents section, as it will be deleted in
+ the overwrite of the release code.
+ cd
+ mkdir nsp_documents
+
+ cdws
+ cd release
+ cp app-mvhub/DocumentRoot/static/nsp/html/documents.shtml ~/nsp_documents/
+ cp app-mvhub/DocumentRoot/static/nsp/html/documents/ ~/nsp_documents/ -r
+ cp app-mvhub/DocumentRoot/static/all/inc/left_menu.inc ~/nsp_documents/
+
+
___ Import the release into the release branch
cdws
cd release
bzr pull
bzr import ../$RELEASE_TAG
- bzr commit -m "$RELEASE_TAG Release"
+
+___ Copy documents section back into release branch
+
+ cp ~/nsp_documents/documents.shtml app-mvhub/DocumentRoot/static/nsp/html/documents.shtml
+ cp ~/nsp_documents/documents/ app-mvhub/DocumentRoot/static/nsp/html/documents/ -r
+ cp ~/nsp_documents/left_menu.inc app-mvhub/DocumentRoot/static/all/inc/left_menu.inc
+
+___ Commit changes & push branch to launchpad
+
+ bzr commit -m "$RELEASE_TAG Major Release"
# Import/Export strips the tag, so it needs to be recreated
bzr tag $RELEASE_TAG
@@ -78,11 +99,13 @@
___ Pull the new release into Staging
- cd /var/www/mvhub/staging/source-code/release
- sudo su staging -c "bzr pull"
+ ssh penguin.inside
+ cd /var/www/mvhub/www-data/source-code/release
+ sudo su www-data -c "bzr pull"
___ put production data into staging database
+ ssh brave.inside
cd
# export production data
pg_dump --format=p --no-owner --clean --column-inserts \
@@ -100,37 +123,20 @@
____ handle schema changes
- ____handle conf file changes
-
-
- ____ (***IF*** conf has changed) test new apache conf w/ staging user
+ ____run mv_setup to handle conf file changes
+ ssh penguin.inside
+ sudo su www-data -l
+ cdw
+
+ # DO NOT DESTROY DATABASE. That will undo the import of the
+ # production data in previous step.
+ mv_setup
+
+ ____ (***IF*** apache conf has changed) test new apache conf w/ staging user
cd
sudo cp app-mvhub/setup/etc/apache2/sites-available/mvhub.conf \
- /etc/apache2/sites-available/mvhub-test.conf
-
- ___ Change data file used by macro
-
- # in brave:/etc/apache2/sites-available/mvhub/mvhub-test.conf
- # Remove line:
- Include /etc/apache2/sites-available/mvhub_developer.data
-
- # in brave:/etc/apache2/sites-available/mvhub/mvhub-test.conf
- # Add line:
- Include /etc/apache2/sites-available/mvhub_test.data
-
- # In file: /etc/apache2/sites-available/mvhub-test.conf
- # Remove line from
- Include /etc/apache2/sites-available/mvhub_production.data
-
- # remove staging from current production config
-
- # In file: /etc/apache2/sites-available/mvhub_production.data
- # comment out lines for staging
-
- # Add these lines to: /etc/apache2/sites-available/mvhub_test.data
- Use MVHub staging nsp nsp.staging.testing123.net
- Use MVHub staging mvh mvh.staging.testing123.net
+ /etc/apache2/sites-available/mvhub.conf
___ Restart apache
sudo /etc/init.d/apache2 restart
@@ -138,15 +144,24 @@
___ Run tests
cdw
- sudo app-mvhub/project-tools/bin/mv_su_test staging
+ sudo app-mvhub/project-tools/bin/mv_su_test www-data
____ move to production
___ update release branch in production
- cd /var/www/mvhub/production/source-code/release/
- sudo su production -c 'bzr pull'
-
+ ssh parrot.inside
+ cd /var/www/mvhub/www-data/source-code/release/
+ sudo su www-data -c 'bzr pull'
+
+ ___ run mv_setup to handle conf file changes
+ sudo su www-data -l
+ cdw
+
+ # DO NOT DESTROY DATABASE. That will undo the import of the
+ # production data in previous step.
+ mv_setup
+
___ (if needed) replace apache config
cdw
sudo cp app-mvhub/setup/etc/apache2/sites-available/mvhub.conf \
=== modified file 'app-mvhub/project-tools/bin/mv_setup'
--- app-mvhub/project-tools/bin/mv_setup 2010-03-28 12:28:41 +0000
+++ app-mvhub/project-tools/bin/mv_setup 2010-04-06 21:10:35 +0000
@@ -57,6 +57,7 @@
$template_cfg->param('NOTIFICATION.admin_email', "$username\@thecsl.org");
$template_cfg->param('NOTIFICATION.dev_email', "$username\@thecsl.org");
$template_cfg->param('SITE.website_name',"$site_code.$username.testing123.net");
+ $template_cfg->param('SITE.website_code',"$site_code");
return $template_cfg;
}
=== modified file 'app-mvhub/project-tools/templates/template.conf'
--- app-mvhub/project-tools/templates/template.conf 2010-03-31 16:11:24 +0000
+++ app-mvhub/project-tools/templates/template.conf 2010-04-06 21:10:35 +0000
@@ -79,6 +79,9 @@
website_name=BAD_WEBSITE_NAME_BROKEN_FIX_IN_CONFIG_FILE
+# the 3-letter code that uniquely identifies which type of site
+# this is: currently it can be either mvh or nsp
+website_code=BAD_PREFIX
# the geographic location the site
# covers. currently North Shore
=== modified file 'lib-mvhub/lib/MVHub/Page.pm'
--- lib-mvhub/lib/MVHub/Page.pm 2009-12-29 17:45:06 +0000
+++ lib-mvhub/lib/MVHub/Page.pm 2010-04-06 21:10:35 +0000
@@ -23,13 +23,15 @@
my $CFG
= MVHub::Utils::ConfigSimple::create_config_from( $ENV{MV_CONFIG_FILE} );
+my $SITE_CODE = $CFG->param('SITE.website_code');
-my $M_BODY_TAG = 'mode_body';
-my $M_SHOW_SEARCH_BAR_TAG = 'show_search_bar';
-my $M_OMIT_LEFT_MENU_TAG = 'omit_left_menu';
-my $M_JAVASCRIPT_TAG = 'javascript_tag';
-my $M_STYLE_TAG = 'style_tag';
-my $M_TITLE_TAG = 'title_tag';
+my $M_BODY_TAG = 'mode_body';
+my $M_SHOW_SEARCH_BAR_TAG = 'show_search_bar';
+my $M_OMIT_LEFT_MENU_TAG = 'omit_left_menu';
+my $M_SHOW_NSP_LEFT_MENU_TAG = 'show_nsp_left_menu';
+my $M_JAVASCRIPT_TAG = 'javascript_tag';
+my $M_STYLE_TAG = 'style_tag';
+my $M_TITLE_TAG = 'title_tag';
# TMPL VAR for the search bar template:
my $SB_CHECK_BY_AGENCY_TAG = 'search_bar_check_by_agency';
@@ -83,11 +85,17 @@
$tmpl->param( $M_STYLE_TAG, $styles ) if $styles;
}
- $tmpl->param( $M_BODY_TAG, $body );
- $tmpl->param( $M_TITLE_TAG, _make_title($title) );
- $tmpl->param( $M_SHOW_SEARCH_BAR_TAG, $show_search_bar );
- $tmpl->param( $M_JAVASCRIPT_TAG, $javascript );
- $tmpl->param( $M_OMIT_LEFT_MENU_TAG, !$show_left_menu );
+ my $show_nsp_left_menu = 0;
+ if ( $SITE_CODE eq 'nsp' ) {
+ $show_nsp_left_menu = 1;
+ }
+
+ $tmpl->param( $M_BODY_TAG, $body );
+ $tmpl->param( $M_TITLE_TAG, _make_title($title) );
+ $tmpl->param( $M_SHOW_SEARCH_BAR_TAG, $show_search_bar );
+ $tmpl->param( $M_JAVASCRIPT_TAG, $javascript );
+ $tmpl->param( $M_OMIT_LEFT_MENU_TAG, !$show_left_menu );
+ $tmpl->param( $M_SHOW_NSP_LEFT_MENU_TAG, $show_nsp_left_menu );
# The above template does a tmpl_include of the search bar.
# Initialize the search bar, as appropriate:
=== modified file 'lib-mvhub/t/conf/all.conf'
--- lib-mvhub/t/conf/all.conf 2010-04-01 18:19:48 +0000
+++ lib-mvhub/t/conf/all.conf 2010-04-06 21:10:35 +0000
@@ -69,7 +69,7 @@
[SITE]
# the name of the website right now either NorthShorePort.org or MVHub.com
website_name=nsp.omacneil.testing123.net
-
+website_code=nsp
# the geographic location the site
# covers. currently North Shore
# or Merrimack Valley
Follow ups