-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathAnniversaryPage.php
More file actions
139 lines (115 loc) · 5.33 KB
/
Copy pathAnniversaryPage.php
File metadata and controls
139 lines (115 loc) · 5.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?php
/**
* Copyright 2014 Openstack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
/**
* Class AnniversaryPage
*/
class AnniversaryPage extends Page
{
function getCMSFields()
{
$fields = parent::getCMSFields();
// remove unneeded fields
$fields->removeFieldFromTab("Root.Main", "Content");
return $fields;
}
// ThirdAnniversaryPage can't contain children
static $allowed_children = "none";
}
/**
* Class AnniversaryPage_Controller
*/
class AnniversaryPage_Controller extends ContentController
{
static $allowed_actions = array(
'third',
'fourth',
'fifth',
'handleIndex',
);
static $url_handlers = array(
'' => 'handleIndex',
);
public function third()
{
Requirements::css($this->ThemeDir() . '/css/anniversary/3/bootstrap.anniversary.css');
Requirements::css($this->ThemeDir() . '/css/anniversary/3/styles.css');
Requirements::javascript(Director::protocol() . "platform.twitter.com/widgets.js");
Requirements::javascript(Director::protocol() . "cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js");
Requirements::javascript($this->ThemeDir() . '/javascript/anniversary.3.js');
//FB page properties
$this->Title = 'The OpenStack Third Anniversary';
$this->FBImage = 'http://97ddcca80f76c4bfffa8-fba9438aa8767b03b10d7d590f8ffd05.r77.cf1.rackcdn.com/openstack-3rd-anniversary.png';
$this->FBImageW = '173';
$this->FBImageH = '245';
$this->FBDesc = 'Happy 3th OpenStack! Come celebrate at one of 51 global events.';
$this->CurrentDomain = Director::protocolAndHost();
$this->FBUrl = Director::protocolAndHost() . $this->Link('third');
return $this->getViewer('third')->process($this);
}
public function fourth()
{
Requirements::css($this->ThemeDir() . '/css/anniversary/4/bootstrap.css');
Requirements::css($this->ThemeDir() . '/css/anniversary/4/styles.css');
Requirements::javascript(Director::protocol() . "platform.twitter.com/widgets.js");
Requirements::javascript(Director::protocol() . "cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js");
Requirements::javascript($this->ThemeDir() . '/javascript/anniversary.4.js');
//FB page properties
$this->Title = 'The OpenStack Fourth Anniversary';
$this->FBImage = Director::protocolAndHost() . '/themes/openstack/images/anniversary/4/bot-big.png';
$this->FBImageW = '200';
$this->FBImageH = '284';
$this->FBDesc = 'Happy 4th OpenStack! Come celebrate at one of 51 global events.';
$this->FBUrl = Director::protocolAndHost() . $this->Link('fourth');
$this->CurrentDomain = Director::protocolAndHost();
return $this->getViewer('fourth')->process($this);
}
public function fifth()
{
$this->Title = 'The OpenStack Fifth Anniversary';
$this->FBImage = 'http://www.openstack.org/themes/openstack/images/anniversary/5/img/bot-facebook.jpg';
$this->FBImageW = '200';
$this->FBImageH = '284';
$this->FBDesc = 'Happy 5th OpenStack! Come celebrate at one of 40 global events.';
$this->FBUrl = Director::protocolAndHost() . $this->Link('fifth');
$this->CurrentDomain = Director::protocolAndHost();
Requirements::set_write_js_to_body(false);
Requirements::combine_files('5.css', array(
));
Requirements::css($this->ThemeDir() . '/images/anniversary/5/css/bootstrap.css');
Requirements::css($this->ThemeDir() . '/images/anniversary/5/css/styles.css');
Requirements::combine_files('5.js', array(
$this->ThemeDir() . '/images/anniversary/5/js/jquery.js',
$this->ThemeDir() . '/images/anniversary/5/js/scripts.js',
$this->ThemeDir() . '/images/anniversary/5/js/jquery.easing.min.js'
));
return $this->getViewer('fifth')->process($this, array
(
'ImgPath' => '/themes/openstack/images/anniversary/5/img',
'BadgeImgUrl' => 'http://841038e5aa7ad2e38487-650bfe6158d7143a3437ef4c83572bc4.r48.cf1.rackcdn.com/5/openstack-5th-anniversary.png',
'SlideDeckUrl' => '//www.dropbox.com/s/8bvbo2dzp9jd61o/OpenStack%205th%20Birthday%20slide%20deck.pptx?dl=0',
'LocalEventUrl' => '//www.openstack.org/blog/2015/06/openstack-turns-5-its-time-to-celebrate-the-community/',
'SummitUrl' => '//www.openstack.org/summit/tokyo-2015/',
'FBSharerUrl' => 'http://www.openstack.org/birthday/fifth',
'FBSharerImg' => 'http://www.openstack.org/themes/openstack/images/anniversary/5/img/bot-facebook.jpg',
));
}
public function handleIndex()
{
return $this->fifth();
}
public function init()
{
parent::init();
}
}