Version 4.7.23
This commit is contained in:
1 parent
7124a02564
commit
25ddeb65d6
1791 files changed
+76990
-44452
No files matched your search
@@ -124,6 +124,16 @@ class _record extends \IPS\Content\Controller
|
||||
|
||||
if ( \count( $customValues ) )
|
||||
{
|
||||
/* Store a revision before we change any values */
|
||||
if ( $record::database()->revisions )
|
||||
{
|
||||
$revision = new \IPS\cms\Records\Revisions;
|
||||
$revision->database_id = $record::$customDatabaseId;
|
||||
$revision->record_id = $record->_id;
|
||||
$revision->data = $record->fieldValues( TRUE );
|
||||
$revision->save();
|
||||
}
|
||||
|
||||
if ( isset( $values['record_display_field_change'] ) AND $values['record_display_field_change'] )
|
||||
{
|
||||
$record->addCommentWhenFiltersChanged( $values );
|
||||
@@ -326,6 +336,7 @@ class _record extends \IPS\Content\Controller
|
||||
);
|
||||
}
|
||||
|
||||
$this->showClubHeader();
|
||||
/* Set default search to this record */
|
||||
if ( ! $record::database()->search )
|
||||
{
|
||||
@@ -729,7 +740,6 @@ class _record extends \IPS\Content\Controller
|
||||
\IPS\Output::i()->allowDefaultWidgets = FALSE;
|
||||
\IPS\Output::i()->sidebar['enabled'] = FALSE;
|
||||
\IPS\cms\Pages\Page::$currentPage->getWidgets();
|
||||
\IPS\cms\Databases\Dispatcher::i()->output = $form->customTemplate( array( \IPS\cms\Theme::i()->getTemplate( $database->template_form, 'cms', 'database' ), 'recordForm' ), NULL, $category, $database, \IPS\cms\Pages\Page::$currentPage, $title, $hasModOptions );
|
||||
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack( $title );
|
||||
\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'records/form.css', 'cms', 'front' ) );
|
||||
|
||||
@@ -747,6 +757,9 @@ class _record extends \IPS\Content\Controller
|
||||
catch( \Exception $e ) {}
|
||||
|
||||
\IPS\Output::i()->breadcrumb[] = array( $record->url(), $record->mapped('title') );
|
||||
|
||||
$this->showClubHeader();
|
||||
\IPS\cms\Databases\Dispatcher::i()->output .= $form->customTemplate( array( \IPS\cms\Theme::i()->getTemplate( $database->template_form, 'cms', 'database' ), 'recordForm' ), NULL, $category, $database, \IPS\cms\Pages\Page::$currentPage, $title, $hasModOptions );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -949,4 +962,37 @@ class _record extends \IPS\Content\Controller
|
||||
\IPS\Output::i()->error( 'node_error', '2T252/F', 403, '' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the club header to \IPS\Output
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function showClubHeader()
|
||||
{
|
||||
$record = $this->_getRecord();
|
||||
if ( $record and $club = $record->club )
|
||||
{
|
||||
$category = $record->container();
|
||||
|
||||
\IPS\Output::i()->sidebar['contextual'] = '';
|
||||
|
||||
/* Club info in sidebar */
|
||||
if ( \IPS\Settings::i()->clubs_header == 'sidebar' )
|
||||
{
|
||||
\IPS\Output::i()->sidebar['enabled'] = true;
|
||||
\IPS\Output::i()->sidebar['contextual'] .= \IPS\Theme::i()->getTemplate( 'clubs', 'core', 'front' )->header( $club, $category, 'sidebar' );
|
||||
}
|
||||
else
|
||||
{
|
||||
\IPS\cms\Databases\Dispatcher::i()->output .= \IPS\Theme::i()->getTemplate( 'clubs', 'core', 'front' )->header( $club, $record->container(), 'full' );
|
||||
}
|
||||
|
||||
if( ( \IPS\GeoLocation::enabled() and \IPS\Settings::i()->clubs_locations AND $location = $club->location() ) )
|
||||
{
|
||||
\IPS\Output::i()->sidebar['enabled'] = true;
|
||||
\IPS\Output::i()->sidebar['contextual'] .= \IPS\Theme::i()->getTemplate( 'clubs', 'core', 'front' )->clubLocationBox( $club, $location );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user