diff --git a/.gitignore b/.gitignore
index fb43121..25327e3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,4 +12,4 @@
/composer.lock
.idea
/components/
-/uploads/
\ No newline at end of file
+/uploads/
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index e206d70..f758959 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -1,5 +1,6 @@
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index 1162f43..0000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/src/Sustain/AppBundle/Controller/SectionController.php b/src/Sustain/AppBundle/Controller/SectionController.php
index b5a4325..d498f55 100644
--- a/src/Sustain/AppBundle/Controller/SectionController.php
+++ b/src/Sustain/AppBundle/Controller/SectionController.php
@@ -102,7 +102,7 @@ public function newAction()
/**
* Finds and displays a Section entity.
*
- * @Route("/{id}", name="section_show")
+ * @Route("/{id}/", name="section_show")
* @Method("GET")
* @Template()
*/
diff --git a/src/Sustain/AppBundle/Entity/Section.php b/src/Sustain/AppBundle/Entity/Section.php
index 4bafcac..4298f74 100644
--- a/src/Sustain/AppBundle/Entity/Section.php
+++ b/src/Sustain/AppBundle/Entity/Section.php
@@ -35,6 +35,13 @@ class Section
*/
private $info;
+ /**
+ * @var boolean $display
+ *
+ * @ORM\Column(name="display", type="boolean", nullable=true)
+ */
+ private $display = false;
+
/**
* @ORM\OneToMany(targetEntity="Page", mappedBy="section")
* @ORM\OrderBy({"sortorder" = "ASC"})
@@ -136,4 +143,27 @@ public function getPages()
{
return $this->pages;
}
+
+ /**
+ * Set display
+ *
+ * @param boolean $display
+ * @return Section
+ */
+ public function setDisplay($display)
+ {
+ $this->display = $display;
+
+ return $this;
+ }
+
+ /**
+ * Get display
+ *
+ * @return boolean
+ */
+ public function getDisplay()
+ {
+ return $this->display;
+ }
}
diff --git a/src/Sustain/AppBundle/Form/SectionType.php b/src/Sustain/AppBundle/Form/SectionType.php
index a1a9e10..e265878 100644
--- a/src/Sustain/AppBundle/Form/SectionType.php
+++ b/src/Sustain/AppBundle/Form/SectionType.php
@@ -17,6 +17,9 @@ public function buildForm(FormBuilderInterface $builder, array $options)
$builder
->add('name','text', array('attr' => array('class' => 'text form-control', 'placeholder' => 'Name of the Section'),))
->add('info', 'ckeditor', array('config_name' => 'editor_simple',))
+ ->add('display', 'choice', array('choices' => array(true => 'Yes', false => 'No'),'required' => true,
+ 'label' => 'Display in menu:',
+ 'expanded' => true,'attr' => array('class' => 'radio'),))
;
}
diff --git a/src/Sustain/AppBundle/Resources/views/layout.html.twig b/src/Sustain/AppBundle/Resources/views/layout.html.twig
index ce79ce4..a202220 100644
--- a/src/Sustain/AppBundle/Resources/views/layout.html.twig
+++ b/src/Sustain/AppBundle/Resources/views/layout.html.twig
@@ -10,17 +10,26 @@
{% block sidebar %}
- {% if 'event' in app.request.attributes.get('_route') or 'opportunity' in app.request.attributes.get('_route') or 'page' in app.request.attributes.get
- ('_route') %}
+ {% if 'event' in app.request.attributes.get('_route') or 'opportunity' in app.request.attributes.get('_route') or 'page' in app.request.attributes.get('_route') %}
{% endif %}
+
+
{% if categories is defined %}
Labels
{% for category in categories %}