Commit af71752c authored by Hermann Mayer's avatar Hermann Mayer
Browse files

Page Entity now uses Sluggable Doctrine Extension. Added a help popover...

Page Entity now uses Sluggable Doctrine Extension. Added a help popover (styled and configured in jity.js) to the slug field on the PageType.
parent 627cc4a2
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -52,6 +52,7 @@ stof_doctrine_extensions:
    orm:
    orm:
        default:
        default:
            sortable: true
            sortable: true
            sluggable: true


# Swiftmailer Configuration
# Swiftmailer Configuration
swiftmailer:
swiftmailer:

bin/regen-db.sh

0 → 100755
+12 −0
Original line number Original line Diff line number Diff line
#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" && cd "${DIR}/.."

php app/console doctrine:database:drop --force
php app/console doctrine:database:create

php app/console doctrine:schema:create

yes | php app/console doctrine:fixtures:load

rm -rf app/cache/dev

deploy @ 8ff3c33d

Original line number Original line Diff line number Diff line
Subproject commit 7bd58d17b9eb3e999c0376af18ff0438db251f3e
Subproject commit 8ff3c33d5f0f0bd24bdca9c7a62c78a4bf78de67
+0 −3
Original line number Original line Diff line number Diff line
@@ -30,7 +30,6 @@ class LoadPageData extends AbstractFixture implements OrderedFixtureInterface
        // Build Home Page
        // Build Home Page
        $home = new Page();
        $home = new Page();
        $home
        $home
            ->setSlug('about')
            ->setTitle('Über mich')
            ->setTitle('Über mich')
            ->setContent('<img src="{{ asset("bundles/jityhomepage/img/myself-cc3-300px.png") }}" alt="" class="img-polaroid pull-left" />
            ->setContent('<img src="{{ asset("bundles/jityhomepage/img/myself-cc3-300px.png") }}" alt="" class="img-polaroid pull-left" />
Mein Name ist Hermann Mayer, ich wurde am 02. August im Jahre 1992 in Berlin geboren und bin
Mein Name ist Hermann Mayer, ich wurde am 02. August im Jahre 1992 in Berlin geboren und bin
@@ -78,7 +77,6 @@ zusätzliche Arbeit bedeutet.
        // Build Impress Page
        // Build Impress Page
        $impress = new Page();
        $impress = new Page();
        $impress
        $impress
            ->setSlug('impressum')
            ->setTitle('Impressum')
            ->setTitle('Impressum')
            ->setContent('')
            ->setContent('')
            ->setCategory($this->getReference('default-category'))
            ->setCategory($this->getReference('default-category'))
@@ -96,7 +94,6 @@ zusätzliche Arbeit bedeutet.
        // Build Contact Page
        // Build Contact Page
        $contact = new Page();
        $contact = new Page();
        $contact
        $contact
            ->setSlug('kontakt')
            ->setTitle('Kontakt')
            ->setTitle('Kontakt')
            ->setContent('')
            ->setContent('')
            ->setCategory($this->getReference('default-category'))
            ->setCategory($this->getReference('default-category'))
+10 −2
Original line number Original line Diff line number Diff line
@@ -2,11 +2,17 @@


namespace Jity\HomepageBundle\Entity;
namespace Jity\HomepageBundle\Entity;


use Gedmo\Mapping\Annotation as Gedmo;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping as ORM;


/**
/**
 * @ORM\Entity
 * @ORM\Entity
 * @ORM\Table(name="page")
 * @ORM\Table(
 *      name="page",
 *      indexes={
 *          @ORM\Index(name="slug_idx", columns={"slug"})
 *      }
 * )
 */
 */
class Page
class Page
{
{
@@ -18,7 +24,8 @@ class Page
    protected $id;
    protected $id;


    /**
    /**
     * @ORM\Column(type="string", length=100, unique=true)
     * @Gedmo\Slug(fields={"title"})
     * @ORM\Column(type="string", length=200)
     */
     */
    protected $slug;
    protected $slug;


@@ -287,3 +294,4 @@ class Page
        return $this->service;
        return $this->service;
    }
    }
}
}
Loading