File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 * limitations under the License.
1313 **/
1414/**
15- * Defines the JobsHolder page type
15+ * Defines the Events page type
1616 */
1717class EventHolder extends Page {
18- private static $ db = array (
19- );
18+ private static $ db = array (
2019
21- private static $ has_one = array (
22- );
20+ );
21+
22+ private static $ has_one = array (
23+ 'Banner ' => 'BetterImage '
24+ );
25+
26+ function getCMSFields () {
27+ $ fields = parent ::getCMSFields ();
28+
29+ // header
30+ $ fields ->addFieldToTab (
31+ 'Root.Main ' ,
32+ $ uploadField = new UploadField ('Banner ' ,'Banner ' )
33+ );
34+ $ uploadField ->setFolderName ('openstackdays ' );
35+ $ uploadField ->setAllowedFileCategories ('image ' );
36+
37+ return $ fields ;
38+ }
2339
2440
2541}
@@ -177,4 +193,13 @@ function EventTypes() {
177193 return $ event_type_links ;
178194 }
179195
196+ public function getUpcomingSummitLink () {
197+ $ summit = Summit::GetUpcoming ();
198+ if ($ summit ) {
199+ return $ summit ->Link ();
200+ } else {
201+ return '/summit ' ;
202+ }
203+ }
204+
180205}
Original file line number Diff line number Diff line change 22 <div class=" row" >
33 <div class=" col-sm-12" >
44 <div class=" eventTitleArea" >
5- <h1>OpenStack Event Listing</h1>
5+ $Content
66 </div>
77 </div>
88 </div>
99 <div class=" row" >
1010 <div class=" col-lg-12" >
11- <a href=" /summit/boston-2017/" >
12- <div class=" event-ad-lrg" ></div>
11+ <a href=" {$getUpcomingSummitLink()}" >
12+ <div class=" event-ad-lrg" >
13+ <img src=" {$Banner.URL}" alt=" Don't miss The Summit" >
14+ </div>
1315 </a>
1416 </div>
1517 </div>
Original file line number Diff line number Diff line change @@ -1576,20 +1576,14 @@ a.featured-link:hover {
15761576 max-height : 113px ;
15771577 max-width : 1140px ;
15781578 margin-bottom : 20px ;
1579- background-image : url ('/assets/boston-summit/promo/08676F71-479C-47A9-A2D2-59FE4659326D.jpeg' );
1580- background-repeat : no-repeat;
1581- background-size : 100% auto;
1582- background-position : center center;
15831579 image-rendering : optimizeQuality;
15841580 }
15851581
15861582@media (max-width : 767px ) {
15871583 .event-ad-lrg {
15881584 max-width : 767px ;
1589- background-image : url ('/assets/boston-summit/promo/0E430DD4-0DEB-4900-AEE2-D909F2BF87EC.jpeg' );
1590- background-repeat : no-repeat;
1591- background-size : 100% auto;
1592- background-position : center center; } }
1585+ }
1586+ }
15931587
15941588.news-section .news-wrapper ul {
15951589 margin : 30px 0 ;
You can’t perform that action at this time.
0 commit comments