Skip to content
This repository has been archived by the owner on Jun 26, 2018. It is now read-only.

Commit

Permalink
initial party-in-the-park addition
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Whiteland committed May 10, 2012
1 parent 82b4b08 commit df8fe00
Show file tree
Hide file tree
Showing 8 changed files with 214 additions and 3 deletions.
41 changes: 41 additions & 0 deletions phplib/microsites.php
Expand Up @@ -804,6 +804,27 @@ function microsites_get_pledge_type_details($pledge_type, $key=null, $secondary_
)
));
break;
case "jubileeparkparty":
$details = array_merge($defaults, array(
"title" => "Party in the Park",
"action" => "organise a Diamond Jubnilee party in the park",
"ref_label" => "The park",
"ref_note" => "(it helps us if you include the park's postcode, but don't worry if you don't know it)",
"ref_error_msg" => "Please enter the name of the park you want to use",
"default_image_url" => microsite_preloaded_image_url('trees_and_leaves.jpg'),
"preloaded_data" => array(
"name" => "Barnet Council",
"title" => "arrange free public liability insurance for a Diamond Jubilee/Olympics party in %s,",
"target" => 3,
"type" => "households",
"signup" => "volunteer to organise the party",
"detail" => "Please note:\nIf you agree to become a volunteer, we will automatically share your contact " .
"details with other participants in your street.",
"date" => "13 July 2012"
)
));
break;

case "grit_my_school":
$details = array_merge($defaults, array(
"title" => "Grit My School",
Expand Down Expand Up @@ -849,6 +870,26 @@ function microsites_get_pledge_type_details($pledge_type, $key=null, $secondary_
)
));
break;
case "olympicparkparty":
$details = array_merge($defaults, array(
"title" => "Party in the Park",
"action" => "organise a London Olympic 2012 party in the park",
"ref_label" => "The park",
"ref_note" => "(it helps us if you include the park's postcode, but don't worry if you don't know it)",
"ref_error_msg" => "Please enter the name of the park you want to use",
"default_image_url" => microsite_preloaded_image_url('trees_and_leaves.jpg'),
"preloaded_data" => array(
"name" => "Barnet Council",
"title" => "arrange free public liability insurance for a Diamond Jubilee/Olympics party in %s,",
"target" => 3,
"type" => "households",
"signup" => "volunteer to organise the party",
"detail" => "Please note:\nIf you agree to become a volunteer, we will automatically share your contact " .
"details with other participants in your street.",
"date" => "13 July 2012"
)
));
break;
case "olympics2012":
$details = array_merge($defaults, array(
"title" => "London Olympic 2012 Street Party",
Expand Down
10 changes: 10 additions & 0 deletions templates/barnet/index.php
Expand Up @@ -25,9 +25,15 @@
Sign up or <a href="/type/diamondjubilee">start a pledge</a> to arrange your party!
</p>
<? print pledge_get_ul_list_by_type('diamondjubilee', 2, 3, "", true); ?>
<p style="clear:both;">
We can also help arrange <a href="/type/jubileeparkparty">Jubilee parties in the park</a>.
</p>
<? print pledge_get_ul_list_by_type('jubileeparkparty', 2, 3, "", true); ?>
<div style='clear:both;height:0.3em'></div>
</div>

<? print pledge_get_ul_list_by_type('diamondjubilee', 2, 3, "", true); ?>

<!-- ============================= London 2012 Olympics ================================ -->
<ul class="search_results">
<li><a href="/type/olympics2012" title="London 2012 Olympics street parties" class="ms-pledge-list-a"><div class="ms-pledge-list-icon" style="background-image:url(/microsites/barnet/preloaded/olympics2012.jpg);"></div></a><a href="/type/olympics2012">London 2012 Olympic street party pledges</a><br>
Expand All @@ -42,6 +48,10 @@
Sign up or <a href="/type/olympics2012">start a pledge</a> to arrange your party!
</p>
<? print pledge_get_ul_list_by_type('olympics2012', 2); ?>
<p style="clear:both;">
We can also help arrange <a href="/type/olympicparkparty">2012 Olympic parties in the park</a>.
</p>
<? print pledge_get_ul_list_by_type('olympicparkparty', 2, 3, "", true); ?>
<div style='clear:both;height:0.3em'></div>
</div>

Expand Down
3 changes: 3 additions & 0 deletions templates/barnet/types/diamondjubilee.php
Expand Up @@ -6,6 +6,9 @@
<h3>Our Big Jubilee Lunch street party pledges:</h3>
<? print pledge_get_ul_list_by_type('diamondjubilee', 3, 3, "pledge_type_auto_width_column"); ?>
<div style="width:100%;clear:both;height:1px"></div>
<? print pledge_get_ul_list_by_type('jubileeparkparty', 3, 3, "pledge_type_auto_width_column"); ?>
<div style="width:100%;clear:both;height:1px"></div>

</div>
<div style="ms-general-box">
<img src="/microsites/barnet/diamond_jubilee_150_x_200.png" alt="2012 Diamond Jubilee logo" style="width:150px;height:200px;margin:0 0 8px 1em; float:right;" />
Expand Down
74 changes: 74 additions & 0 deletions templates/barnet/types/jubileeparkparty.php
@@ -0,0 +1,74 @@
<!-- =========================== jubilee park party =================================== -->

<h1>Arrange a Diamond Jubilee party in the park</h1>
<div class='ms-jubileeparkparty-banner' style="height:200px;"></div>
<div id="ms-explicit-party-list">
<h3>Our Party-in-a-Park pledges:</h3>
<? print pledge_get_ul_list_by_type('jubileeparkparty', 3, 3, "pledge_type_auto_width_column"); ?>
<div style="width:100%;clear:both;height:1px"></div>
</div>
<div style="ms-general-box">
<p>
Not only are we supporting <a href="/type/diamondjubilee">Diamond Jubilee street parties</a>,
but we can also help you arrange a party in a <b>Barnet park</b>.
</p>
<ul>
<li>
Your Diamond Jubilee party in the park
should be on or close to the Jubilee weekend which is 2&ndash;5 June 2012.
</li>
</ul>
<div class="pb-barnet-breakout" style="position:relative;padding-top: 1em;">
<p class="corner-label">
Please note:
</p>
<h4>
Sharing your contact details with other volunteers
</h4>
<p>
If you agree to become a volunteer, we will automatically share your contact details with other participants.
</p>
</div>
<p>
The council will provide advice and insurance cover.
</p>
</div>
<div style="width:100%;clear:both;height:1px"></div>
<div style="float:right; width:45%;margin-left:1em;position:relative;" class="pb-barnet-breakout">
<h3>
What you need to do: Sign up to a pledge!
</h3>
<p>
Check to see if the park you'd like to use is shown at the top of this page &mdash; click on it and sign up!
</p>
<h3>
Can&rsquo;t see the park? Start a new pledge!
</h3>
<p>
If there&rsquo;s not already a pledge for the park, simply start one by
filling in the application form.
You will need to get a minimum of
<?= microsites_get_pledge_type_details('jubileeparkparty', 'preloaded_data', 'target') ?>
households involved for the pledge to be successful.
</p>
</form><!-- close existing global form :-( -->
<form class="basic_form xform" method="get" action="http://www.barnet.gov.uk/forms/form/246/en/party_in_the_park_application" >
<p class="center">
<input type="submit" class="button next" title="Begin application" name="next" value="Begin application »">
</p>
</form>
<form action="#"> <!-- open global form, no action -->
</div>
<p>The PledgeBank team will . . .</p>
<ul>
<li>
start a pledge page to help encourage people to get involved and invite you to be the first to sign it
</li>
<li>
or, if we&rsquo;ve created one already, we'll let you know so you can sign up to it
</li>
</ul>
<p>
After that, it&rsquo;s up to you to spread the word to your friends and neighbours to get them to sign your pledge and get involved!
</p>

75 changes: 75 additions & 0 deletions templates/barnet/types/olympicparkparty.php
@@ -0,0 +1,75 @@
<!-- =========================== olympics 2012 park party =================================== -->

<h1>Arrange a London Olympic 2012 party in the park</h1>
<div class='ms-olympicparkparty-banner' style="height:200px;"></div>
<div id="ms-explicit-party-list">
<h3>Our Party-in-a-Park pledges:</h3>
<? print pledge_get_ul_list_by_type('olympicparkparty', 3, 3, "pledge_type_auto_width_column"); ?>
<div style="width:100%;clear:both;height:1px"></div>
</div>
<div style="ms-general-box">
<p>
Not only are we supporting <a href="/type/olympics2012">London Olympic 2012 street parties</a>,
but we can also help you arrange a party in a <b>Barnet park</b>.
</p>
<ul>
<li>
Your London Olympic 2012
party in the park can be on any day between the games' start and end,
that is, between 27 July and 12 August 2012.
</li>
</ul>
<div class="pb-barnet-breakout" style="position:relative;padding-top: 1em;">
<p class="corner-label">
Please note:
</p>
<h4>
Sharing your contact details with other volunteers
</h4>
<p>
If you agree to become a volunteer, we will automatically share your contact details with other participants.
</p>
</div>
<p>
The council will provide advice and insurance cover.
</p>
</div>
<div style="width:100%;clear:both;height:1px"></div>
<div style="float:right; width:45%;margin-left:1em;position:relative;" class="pb-barnet-breakout">
<h3>
What you need to do: Sign up to a pledge!
</h3>
<p>
Check to see if the park you'd like to use is shown at the top of this page &mdash; click on it and sign up!
</p>
<h3>
Can&rsquo;t see the park? Start a new pledge!
</h3>
<p>
If there&rsquo;s not already a pledge for the park, simply start one by
filling in the application form.
You will need to get a minimum of
<?= microsites_get_pledge_type_details('olympicparkparty', 'preloaded_data', 'target') ?>
households involved for the pledge to be successful.
</p>
</form><!-- close existing global form :-( -->
<form class="basic_form xform" method="get" action="http://www.barnet.gov.uk/forms/form/246/en/party_in_the_park_application" >
<p class="center">
<input type="submit" class="button next" title="Begin application" name="next" value="Begin application »">
</p>
</form>
<form action="#"> <!-- open global form, no action -->
</div>
<p>The PledgeBank team will . . .</p>
<ul>
<li>
start a pledge page to help encourage people to get involved and invite you to be the first to sign it
</li>
<li>
or, if we&rsquo;ve created one already, we'll let you know so you can sign up to it
</li>
</ul>
<p>
After that, it&rsquo;s up to you to spread the word to your friends and neighbours to get them to sign your pledge and get involved!
</p>

2 changes: 2 additions & 0 deletions templates/barnet/types/olympics2012.php
Expand Up @@ -6,6 +6,8 @@
<h3>Our 2012 Olympic street party pledges:</h3>
<? print pledge_get_ul_list_by_type('olympics2012', 3, 3, "pledge_type_auto_width_column"); ?>
<div style="width:100%;clear:both;height:1px"></div>
<? print pledge_get_ul_list_by_type('olympicparkparty', 3, 3, "pledge_type_auto_width_column"); ?>
<div style="width:100%;clear:both;height:1px"></div>
</div>
<div style="ms-general-box">
<p>
Expand Down
8 changes: 6 additions & 2 deletions web/microsites/barnet/css.css
Expand Up @@ -420,7 +420,7 @@ body.js #ms-signup-reveal {
.ms-pledge-banner, .ms-diamondjubilee-banner,
.ms-royalwedding-banner, .ms-thebiglunch-banner, ms-adoptastreet-banner,
.ms-grit_my_school-banner, .ms-grit_my_street-banner,
.ms-olympics2012-banner {
.ms-olympics2012-banner, .ms-jubileeparkparty-banner, .ms-olympicparkparty-banner {
width: 100%;
height: 50px;
background-position:center center;
Expand Down Expand Up @@ -455,6 +455,10 @@ body.js #ms-signup-reveal {
background-image: url('preloaded/olympics2012.jpg');
}

.ms-jubileeparkparty-banner, .ms-olympicparkparty-banner {
background-image: url('preloaded/trees_and_leaves.jpg');
}

/* pledge creation styling */

/* Breadcrumbs when creating a pledge */
Expand Down Expand Up @@ -494,7 +498,7 @@ ol#breadcrumbs li.hilight em {

#tips {
float: right;
width: 40%;
width: 230px; /* Barnet layout is fixed width now */
margin-top: 1em;
margin-left: 1em;
}
Expand Down
4 changes: 3 additions & 1 deletion web/new.php
Expand Up @@ -183,6 +183,7 @@ function pledge_form_one($data = array(), $errors = array()) {
<h2>
<?= sprintf(_('This is a custom "%s" pledge.'), htmlspecialchars($data['pledge_type'])); ?>
</h2>
<div class="ms-pledge-list-icon" style="background-image:url(<?= microsites_get_pledge_type_details( $canonical_pledge_type, 'default_image_url')?>);margin:1em 0 1em 0;width:400px;"></div>
<input type="hidden" name="pledge_type" value="<?= $canonical_pledge_type ?>" />
<p>
<?= microsites_get_pledge_type_details( $canonical_pledge_type, 'ref_label') .":" ?>
Expand All @@ -199,7 +200,8 @@ function pledge_form_one($data = array(), $errors = array()) {
<? }
} ?>

<p><strong><?=_('I will') ?></strong> <input<? if (array_key_exists('title', $errors)) print ' class="error"' ?> title="<?=_('Pledge') ?>" type="text" name="title" id="title" value="<? if (isset($data['title'])) print htmlspecialchars($data['title']) ?>" size="40"></p>
<p><strong><?=_('I will') ?></strong>
<input<? if (array_key_exists('title', $errors)) print ' class="error"' ?> title="<?=_('Pledge') ?>" type="text" name="title" id="title" value="<? if (isset($data['title'])) print htmlspecialchars($data['title']) ?>" size="40"></p>

<p><strong><?=_('but only if') ?></strong> <input<? if (array_key_exists('target', $errors)) print ' class="error"' ?> onchange="pluralize(this.value)" title="<?=_('Target number of people') ?>" size="2" type="text" id="target" name="target" value="<?=(isset($data['target'])?htmlspecialchars($data['target']):'10') ?>">
<input<? if (array_key_exists('type', $errors)) print ' class="error"' ?> type="text" id="type" name="type" size="24" value="<?=(isset($data['type'])?htmlspecialchars($data['type']):microsites_other_people()) ?>"></p>
Expand Down

0 comments on commit df8fe00

Please sign in to comment.