@@ -13,12 +13,12 @@ discard block |
||
| 13 | 13 | private static $icon = 'weboftalent-staff/icons/employees.png'; |
| 14 | 14 | |
| 15 | 15 | |
| 16 | - static $allowed_children = array( 'Staff' ); |
|
| 16 | + static $allowed_children = array('Staff'); |
|
| 17 | 17 | |
| 18 | 18 | function getCMSFields() { |
| 19 | 19 | $fields = parent::getCMSFields(); |
| 20 | - $fields->addFieldToTab( 'Root.Image', new UploadField( 'MainImage' ) ); |
|
| 21 | - $fields->addFieldToTab( 'Root.Layout', new CheckboxField( 'LinkToIndividualStaffPages', 'If biographies are short, leave this as false to only show a single page of staff' ) ); |
|
| 20 | + $fields->addFieldToTab('Root.Image', new UploadField('MainImage')); |
|
| 21 | + $fields->addFieldToTab('Root.Layout', new CheckboxField('LinkToIndividualStaffPages', 'If biographies are short, leave this as false to only show a single page of staff')); |
|
| 22 | 22 | |
| 23 | 23 | return $fields; |
| 24 | 24 | } |
@@ -30,8 +30,8 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | // FIXME - make this more efficient |
| 32 | 32 | public function getPortletImage() { |
| 33 | - if ( $this->MainImageID ) { |
|
| 34 | - return DataObject::get_by_id( 'Image', $this->MainImageID ); |
|
| 33 | + if ($this->MainImageID) { |
|
| 34 | + return DataObject::get_by_id('Image', $this->MainImageID); |
|
| 35 | 35 | } else { |
| 36 | 36 | return null; |
| 37 | 37 | } |
@@ -48,8 +48,8 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | class StaffFolder_Controller extends Page_Controller { |
| 50 | 50 | public function StaffFolderCacheKey() { |
| 51 | - $start = isset( $_GET['start'] ) ? (int)( Convert::raw2sql( $_GET['start'] ) ) : 0; |
|
| 52 | - return implode( '_', array( |
|
| 51 | + $start = isset($_GET['start']) ? (int)(Convert::raw2sql($_GET['start'])) : 0; |
|
| 52 | + return implode('_', array( |
|
| 53 | 53 | 'StaffFolders', |
| 54 | 54 | $this->Locale, |
| 55 | 55 | $this->AllChildren()->max('LastEdited'), |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | $this->LastEdited, |
| 60 | 60 | '_', |
| 61 | 61 | $start |
| 62 | - ) ); |
|
| 62 | + )); |
|
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | $fields->renameField("TelephoneNumberMobile", "Telephone Number (Mobile)"); |
| 33 | 33 | |
| 34 | 34 | |
| 35 | - // $fields->addFieldToTab("Root.Main", new CheckboxField('ShowOnHomePage')); |
|
| 35 | + // $fields->addFieldToTab("Root.Main", new CheckboxField('ShowOnHomePage')); |
|
| 36 | 36 | |
| 37 | 37 | /* |
| 38 | 38 | $fields->addFieldToTab('Root.Main', new CalendarDateField('Date'), 'Content'); |