forked from protalk/protalk
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into migration-2.1
Conflicts: app/autoload.php
- Loading branch information
Showing
10 changed files
with
123 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
/** | ||
* ProTalk | ||
* | ||
* Copyright (c) 2012, Steffan Harries <contact@steffanharries.me.uk> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Protalk\AdminBundle\Admin; | ||
|
||
use Sonata\AdminBundle\Admin\Admin; | ||
use Sonata\AdminBundle\Datagrid\ListMapper; | ||
use Sonata\AdminBundle\Datagrid\DatagridMapper; | ||
use Sonata\AdminBundle\Validator\ErrorElement; | ||
use Sonata\AdminBundle\Form\FormMapper; | ||
|
||
class PageAdmin extends Admin | ||
{ | ||
protected function configureFormFields(FormMapper $formMapper) | ||
{ | ||
$formMapper->add('url')->add('pageTitle')->add('title')->add('content'); | ||
} | ||
|
||
protected function configureDatagridFilters(DatagridMapper $datagridMapper) | ||
{ | ||
$datagridMapper->add('pageTitle'); | ||
} | ||
|
||
protected function configureListFields(ListMapper $listMapper) | ||
{ | ||
$listMapper->addIdentifier('title')->add('url'); | ||
} | ||
|
||
public function validate(ErrorElement $errorElement, $object) | ||
{ | ||
$errorElement | ||
->with('pageTitle') | ||
->assertMaxLength(array('limit' => 100)) | ||
->end() | ||
->with('url') | ||
->assertMaxLength(array('limit' => 100)) | ||
->end(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/Protalk/MediaBundle/Resources/views/Contribution/email.txt.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
The new contribution details: | ||
|
||
Id: {{ contribution.id }} | ||
Category: {{ contribution.category }} | ||
Name: {{ contribution.name }} | ||
Email: {{ contribution.email }} | ||
HostUrl: {{ contribution.hostUrl }} | ||
HostName: {{ contribution.hostName }} | ||
Title: {{ contribution.title }} | ||
SlidesUrl: {{ contribution.slidesUrl }} | ||
Speaker: {{ contribution.speaker }} | ||
Description: {{ contribution.description }} | ||
Tags: {{ contribution.tags }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.