Browse Source

rewrite abstractData, bulle css, hide newsletter, quelques modifs css

v1
charly 3 years ago
parent
commit
a097427b1e
10 changed files with 487 additions and 302 deletions
  1. +2
    -2
      assets/app/frontend/js/bulle.js
  2. +5
    -0
      assets/app/frontend/scss/base.scss
  3. +5
    -0
      assets/app/frontend/scss/contribuate.scss
  4. +53
    -67
      public/build/entrypoints.json
  5. +34
    -37
      public/build/manifest.json
  6. +1
    -0
      src/Controller/Frontend/ContribuateController.php
  7. +1
    -193
      src/Entity/AbstractData.php
  8. +192
    -0
      src/Entity/CollectifData.php
  9. +191
    -0
      src/Entity/IndividualData.php
  10. +3
    -3
      templates/frontend/footer.html.twig

+ 2
- 2
assets/app/frontend/js/bulle.js View File

@@ -85,8 +85,8 @@ series.dataFields.nb = "nb";

// Add labels
series.nodes.template.label.text = "{name}";
series.fontSize = 20;
series.minRadius = 70;
series.fontSize = 18;
series.minRadius = 100;
series.maxRadius = 100;

//Couleur des bulles

+ 5
- 0
assets/app/frontend/scss/base.scss View File

@@ -47,6 +47,10 @@ h2 {
font-size: 3.3rem;
}

input, textarea {
font-size: 1.4rem;
}

.bold {
font-weight: bold;
}
@@ -108,6 +112,7 @@ button:focus {
text-align: center;
color: $green;
font-family: dinbold;
font-size: 1.6rem;
}

.link-slide {

+ 5
- 0
assets/app/frontend/scss/contribuate.scss View File

@@ -142,6 +142,7 @@
width: 100%;
border: 2px solid $green;
min-height: 125px;
font-size: 1.4rem;
}

select {
@@ -171,6 +172,10 @@
border-radius: 0;
padding: 15px 40px;
font-size: 2.7rem;

&:hover {
color: #FFF;
}
}
}
}

+ 53
- 67
public/build/entrypoints.json View File

@@ -2,137 +2,123 @@
"entrypoints": {
"adminlte-plugins": {
"js": [
"/build/runtime.929d0484.js",
"/build/vendors-node_modules_core-js_internals_export_js.a0c0cb57.js",
"/build/vendors-node_modules_core-js_modules_es_string_replace_js.06749256.js",
"/build/vendors-node_modules_core-js_modules_es_array_find_js.5b9cb885.js",
"/build/vendors-node_modules_jquery_src_jquery_js.2a8ff255.js",
"/build/vendors-node_modules_core-js_modules_es_string_split_js-node_modules_popper_js_dist_esm_popper_js.22d0763b.js",
"/build/vendors-node_modules_admin-lte_dist_js_adminlte_min_js-node_modules_bootstrap-autocomplete_di-57a6be.35767fac.js",
"/build/adminlte-plugins.12a6c89b.js"
"/build/runtime.e227540b.js",
"/build/817.c94d3ad3.js",
"/build/302.379de25c.js",
"/build/191.90def9bb.js",
"/build/adminlte-plugins.f45b26f6.js"
],
"css": [
"/build/vendors-node_modules_admin-lte_dist_js_adminlte_min_js-node_modules_bootstrap-autocomplete_di-57a6be.fa890b12.css"
"/build/639.09796b73.css"
]
},
"adminlte-index": {
"js": [
"/build/runtime.929d0484.js",
"/build/vendors-node_modules_core-js_internals_export_js.a0c0cb57.js",
"/build/vendors-node_modules_core-js_modules_es_string_replace_js.06749256.js",
"/build/vendors-node_modules_core-js_modules_es_array_find_js.5b9cb885.js",
"/build/vendors-node_modules_core-js_modules_es_array_filter_js-node_modules_core-js_modules_es_array-f7c72f.c0107d2e.js",
"/build/adminlte-index.848d15a8.js"
"/build/runtime.e227540b.js",
"/build/817.c94d3ad3.js",
"/build/571.2bc69c63.js",
"/build/adminlte-index.5d2827cc.js"
],
"css": [
"/build/adminlte-index.e4548695.css"
"/build/adminlte-index.ed6efefa.css"
]
},
"adminlte-form": {
"js": [
"/build/runtime.929d0484.js",
"/build/vendors-node_modules_core-js_internals_export_js.a0c0cb57.js",
"/build/vendors-node_modules_core-js_modules_es_array_find_js.5b9cb885.js",
"/build/adminlte-form.66bf23e9.js"
"/build/runtime.e227540b.js",
"/build/817.c94d3ad3.js",
"/build/adminlte-form.18ffc428.js"
],
"css": [
"/build/adminlte-form.59862983.css"
"/build/adminlte-form.a3baf627.css"
]
},
"adminlte-sort": {
"js": [
"/build/runtime.929d0484.js",
"/build/vendors-node_modules_core-js_internals_export_js.a0c0cb57.js",
"/build/vendors-node_modules_core-js_modules_es_string_replace_js.06749256.js",
"/build/vendors-node_modules_core-js_modules_es_array_find_js.5b9cb885.js",
"/build/vendors-node_modules_jquery_src_jquery_js.2a8ff255.js",
"/build/vendors-node_modules_jquery-ui-dist_jquery-ui_js.d62744d3.js",
"/build/adminlte-sort.b528cdf7.js"
"/build/runtime.e227540b.js",
"/build/817.c94d3ad3.js",
"/build/302.379de25c.js",
"/build/564.e023935f.js",
"/build/adminlte-sort.cef6c7c0.js"
],
"css": [
"/build/adminlte-sort.8d9ca659.css"
"/build/adminlte-sort.ceced0e5.css"
]
},
"adminlte-field-filemanager": {
"js": [
"/build/runtime.929d0484.js",
"/build/vendors-node_modules_core-js_internals_export_js.a0c0cb57.js",
"/build/adminlte-field-filemanager.a2c5059a.js"
"/build/runtime.e227540b.js",
"/build/adminlte-field-filemanager.102d8cad.js"
],
"css": [
"/build/adminlte-field-filemanager.aacd1c4c.css"
"/build/adminlte-field-filemanager.a5cf5a0e.css"
]
},
"adminlte-field-collection": {
"js": [
"/build/runtime.929d0484.js",
"/build/vendors-node_modules_core-js_internals_export_js.a0c0cb57.js",
"/build/vendors-node_modules_core-js_modules_es_string_replace_js.06749256.js",
"/build/vendors-node_modules_core-js_modules_es_array_find_js.5b9cb885.js",
"/build/vendors-node_modules_jquery_src_jquery_js.2a8ff255.js",
"/build/vendors-node_modules_jquery-ui-dist_jquery-ui_js.d62744d3.js",
"/build/adminlte-field-collection.764e7e37.js"
"/build/runtime.e227540b.js",
"/build/817.c94d3ad3.js",
"/build/302.379de25c.js",
"/build/564.e023935f.js",
"/build/adminlte-field-collection.567cdba7.js"
],
"css": [
"/build/adminlte-field-collection.55dda2c2.css"
"/build/adminlte-field-collection.31d6cfe0.css"
]
},
"adminlte-main": {
"js": [
"/build/runtime.929d0484.js",
"/build/vendors-node_modules_core-js_internals_export_js.a0c0cb57.js",
"/build/vendors-node_modules_core-js_modules_es_string_replace_js.06749256.js",
"/build/adminlte-main.9b6dba80.js"
"/build/runtime.e227540b.js",
"/build/817.c94d3ad3.js",
"/build/adminlte-main.3587a736.js"
],
"css": [
"/build/adminlte-main.bbf0afa0.css"
"/build/adminlte-main.c6013ddd.css"
]
},
"sov-reminder": {
"js": [
"/build/runtime.929d0484.js",
"/build/sov-reminder.05b85c23.js"
"/build/runtime.e227540b.js",
"/build/sov-reminder.8ef93343.js"
],
"css": [
"/build/sov-reminder.05d9ff45.css"
"/build/sov-reminder.3a953dfc.css"
]
},
"sov-ticket": {
"js": [
"/build/runtime.929d0484.js",
"/build/sov-ticket.da296284.js"
"/build/runtime.e227540b.js",
"/build/sov-ticket.41a775eb.js"
]
},
"app-backend": {
"js": [
"/build/runtime.929d0484.js",
"/build/vendors-node_modules_core-js_internals_export_js.a0c0cb57.js",
"/build/vendors-node_modules_core-js_modules_es_array_find_js.5b9cb885.js",
"/build/app-backend.9246973d.js"
"/build/runtime.e227540b.js",
"/build/817.c94d3ad3.js",
"/build/app-backend.e6448263.js"
],
"css": [
"/build/app-backend.3d882954.css"
"/build/app-backend.39497a9a.css"
]
},
"app-frontend": {
"js": [
"/build/runtime.929d0484.js",
"/build/vendors-node_modules_core-js_internals_export_js.a0c0cb57.js",
"/build/vendors-node_modules_core-js_modules_es_string_replace_js.06749256.js",
"/build/vendors-node_modules_jquery_src_jquery_js.2a8ff255.js",
"/build/vendors-node_modules_core-js_modules_es_string_split_js-node_modules_popper_js_dist_esm_popper_js.22d0763b.js",
"/build/vendors-node_modules_bootstrap_dist_js_bootstrap_js-node_modules_core-js_internals_object-def-7fa577.a4fc2b12.js",
"/build/app-frontend.32a560b0.js"
"/build/runtime.e227540b.js",
"/build/817.c94d3ad3.js",
"/build/302.379de25c.js",
"/build/191.90def9bb.js",
"/build/487.dd747bb1.js",
"/build/app-frontend.7e335c0a.js"
],
"css": [
"/build/app-frontend.e90afafb.css"
"/build/app-frontend.a368fba2.css"
]
},
"app-bulle": {
"js": [
"/build/runtime.929d0484.js",
"/build/vendors-node_modules_amcharts_amcharts4_charts_js-node_modules_amcharts_amcharts4_core_js-nod-e7c189.7a170faa.js",
"/build/app-bulle.08404383.js"
"/build/runtime.e227540b.js",
"/build/161.b9862f50.js",
"/build/app-bulle.5d037fed.js"
]
}
}

+ 34
- 37
public/build/manifest.json View File

@@ -1,41 +1,38 @@
{
"build/adminlte-plugins.js": "/build/adminlte-plugins.12a6c89b.js",
"build/adminlte-index.css": "/build/adminlte-index.e4548695.css",
"build/adminlte-index.js": "/build/adminlte-index.848d15a8.js",
"build/adminlte-form.css": "/build/adminlte-form.59862983.css",
"build/adminlte-form.js": "/build/adminlte-form.66bf23e9.js",
"build/adminlte-sort.css": "/build/adminlte-sort.8d9ca659.css",
"build/adminlte-sort.js": "/build/adminlte-sort.b528cdf7.js",
"build/adminlte-field-filemanager.css": "/build/adminlte-field-filemanager.aacd1c4c.css",
"build/adminlte-field-filemanager.js": "/build/adminlte-field-filemanager.a2c5059a.js",
"build/adminlte-field-collection.css": "/build/adminlte-field-collection.55dda2c2.css",
"build/adminlte-field-collection.js": "/build/adminlte-field-collection.764e7e37.js",
"build/adminlte-main.css": "/build/adminlte-main.bbf0afa0.css",
"build/adminlte-main.js": "/build/adminlte-main.9b6dba80.js",
"build/sov-reminder.css": "/build/sov-reminder.05d9ff45.css",
"build/sov-reminder.js": "/build/sov-reminder.05b85c23.js",
"build/sov-ticket.js": "/build/sov-ticket.da296284.js",
"build/app-backend.css": "/build/app-backend.3d882954.css",
"build/app-backend.js": "/build/app-backend.9246973d.js",
"build/app-frontend.css": "/build/app-frontend.e90afafb.css",
"build/app-frontend.js": "/build/app-frontend.32a560b0.js",
"build/app-bulle.js": "/build/app-bulle.08404383.js",
"build/runtime.js": "/build/runtime.929d0484.js",
"build/pdfmake.js": "/build/pdfmake.fbf70324.js",
"build/canvg.js": "/build/canvg.5e04b23d.js",
"build/xlsx.js": "/build/xlsx.05855660.js",
"build/vendors-node_modules_core-js_internals_export_js.a0c0cb57.js": "/build/vendors-node_modules_core-js_internals_export_js.a0c0cb57.js",
"build/vendors-node_modules_core-js_modules_es_string_replace_js.06749256.js": "/build/vendors-node_modules_core-js_modules_es_string_replace_js.06749256.js",
"build/vendors-node_modules_core-js_modules_es_array_find_js.5b9cb885.js": "/build/vendors-node_modules_core-js_modules_es_array_find_js.5b9cb885.js",
"build/vendors-node_modules_jquery_src_jquery_js.2a8ff255.js": "/build/vendors-node_modules_jquery_src_jquery_js.2a8ff255.js",
"build/vendors-node_modules_jquery-ui-dist_jquery-ui_js.d62744d3.js": "/build/vendors-node_modules_jquery-ui-dist_jquery-ui_js.d62744d3.js",
"build/vendors-node_modules_core-js_modules_es_string_split_js-node_modules_popper_js_dist_esm_popper_js.22d0763b.js": "/build/vendors-node_modules_core-js_modules_es_string_split_js-node_modules_popper_js_dist_esm_popper_js.22d0763b.js",
"build/vendors-node_modules_core-js_modules_es_array_filter_js-node_modules_core-js_modules_es_array-f7c72f.c0107d2e.js": "/build/vendors-node_modules_core-js_modules_es_array_filter_js-node_modules_core-js_modules_es_array-f7c72f.c0107d2e.js",
"build/vendors-node_modules_amcharts_amcharts4_charts_js-node_modules_amcharts_amcharts4_core_js-nod-e7c189.7a170faa.js": "/build/vendors-node_modules_amcharts_amcharts4_charts_js-node_modules_amcharts_amcharts4_core_js-nod-e7c189.7a170faa.js",
"build/vendors-node_modules_admin-lte_dist_js_adminlte_min_js-node_modules_bootstrap-autocomplete_di-57a6be.fa890b12.css": "/build/vendors-node_modules_admin-lte_dist_js_adminlte_min_js-node_modules_bootstrap-autocomplete_di-57a6be.fa890b12.css",
"build/vendors-node_modules_admin-lte_dist_js_adminlte_min_js-node_modules_bootstrap-autocomplete_di-57a6be.35767fac.js": "/build/vendors-node_modules_admin-lte_dist_js_adminlte_min_js-node_modules_bootstrap-autocomplete_di-57a6be.35767fac.js",
"build/vendors-node_modules_bootstrap_dist_js_bootstrap_js-node_modules_core-js_internals_object-def-7fa577.a4fc2b12.js": "/build/vendors-node_modules_bootstrap_dist_js_bootstrap_js-node_modules_core-js_internals_object-def-7fa577.a4fc2b12.js",
"build/vendors-node_modules_xlsx_xlsx_js.f1747964.js": "/build/vendors-node_modules_xlsx_xlsx_js.f1747964.js",
"build/adminlte-plugins.js": "/build/adminlte-plugins.f45b26f6.js",
"build/adminlte-index.css": "/build/adminlte-index.ed6efefa.css",
"build/adminlte-index.js": "/build/adminlte-index.5d2827cc.js",
"build/adminlte-form.css": "/build/adminlte-form.a3baf627.css",
"build/adminlte-form.js": "/build/adminlte-form.18ffc428.js",
"build/adminlte-sort.css": "/build/adminlte-sort.ceced0e5.css",
"build/adminlte-sort.js": "/build/adminlte-sort.cef6c7c0.js",
"build/adminlte-field-filemanager.css": "/build/adminlte-field-filemanager.a5cf5a0e.css",
"build/adminlte-field-filemanager.js": "/build/adminlte-field-filemanager.102d8cad.js",
"build/adminlte-field-collection.css": "/build/adminlte-field-collection.31d6cfe0.css",
"build/adminlte-field-collection.js": "/build/adminlte-field-collection.567cdba7.js",
"build/adminlte-main.css": "/build/adminlte-main.c6013ddd.css",
"build/adminlte-main.js": "/build/adminlte-main.3587a736.js",
"build/sov-reminder.css": "/build/sov-reminder.3a953dfc.css",
"build/sov-reminder.js": "/build/sov-reminder.8ef93343.js",
"build/sov-ticket.js": "/build/sov-ticket.41a775eb.js",
"build/app-backend.css": "/build/app-backend.39497a9a.css",
"build/app-backend.js": "/build/app-backend.e6448263.js",
"build/app-frontend.css": "/build/app-frontend.a368fba2.css",
"build/app-frontend.js": "/build/app-frontend.7e335c0a.js",
"build/app-bulle.js": "/build/app-bulle.5d037fed.js",
"build/runtime.js": "/build/runtime.e227540b.js",
"build/pdfmake.js": "/build/pdfmake.7c08cd1d.js",
"build/canvg.js": "/build/canvg.05a07ccc.js",
"build/xlsx.js": "/build/xlsx.3803396a.js",
"build/817.c94d3ad3.js": "/build/817.c94d3ad3.js",
"build/302.379de25c.js": "/build/302.379de25c.js",
"build/564.e023935f.js": "/build/564.e023935f.js",
"build/191.90def9bb.js": "/build/191.90def9bb.js",
"build/571.2bc69c63.js": "/build/571.2bc69c63.js",
"build/161.b9862f50.js": "/build/161.b9862f50.js",
"build/487.dd747bb1.js": "/build/487.dd747bb1.js",
"build/639.09796b73.css": "/build/639.09796b73.css",
"build/869.bb1bfa62.js": "/build/869.bb1bfa62.js",
"build/images/fa-solid-900.svg": "/build/images/fa-solid-900.13de59f1.svg",
"build/images/fa-brands-400.svg": "/build/images/fa-brands-400.216edb96.svg",
"build/fonts/fa-solid-900.eot": "/build/fonts/fa-solid-900.efbd5d20.eot",

+ 1
- 0
src/Controller/Frontend/ContribuateController.php View File

@@ -27,6 +27,7 @@ class ContribuateController extends DefaultController
$individualData = new IndividualData();
$form = $this->createForm(IndividualDataForm::class, $individualData, ["context" => "frontend"]);


$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$individualData->setStatus(0);

+ 1
- 193
src/Entity/AbstractData.php View File

@@ -38,196 +38,4 @@ abstract class AbstractData implements StatusInterface, EntityInterface
self::CATEGORY_LABEL_PROJECTINSPIRING => self::CATEGORY_PROJECTINSPIRING,
];
}

/**
* @ORM\OneToMany(targetEntity=Revolt::class, mappedBy="collectifData", cascade={"persist", "remove"})
*/
protected $revolt;

/**
* @ORM\OneToMany(targetEntity=Dream::class, mappedBy="collectifData", cascade={"persist", "remove"})
*/
protected $dream;

/**
* @ORM\OneToMany(targetEntity=ProjectBoost::class, mappedBy="collectifData", cascade={"persist", "remove"})
*/
protected $projectBoost;

/**
* @ORM\OneToMany(targetEntity=ProjectInspiring::class, mappedBy="collectifData", cascade={"persist", "remove"})
*/
protected $projectInspiring;

/**
* @ORM\ManyToOne(targetEntity=Territory::class, inversedBy="collectifData")
*/
protected $territory;

public function __construct()
{
$this->revolt = new ArrayCollection();
$this->dream = new ArrayCollection();
$this->projectBoost = new ArrayCollection();
$this->projectInspiring = new ArrayCollection();
}

public function getResume()
{
return count($this->getRevolt()) . " révolte(s) - " . count($this->getDream()) . " rêve(s) - " . count(
$this->getProjectBoost()
) . " projet(s) boosté(s) - " . count($this->getProjectInspiring()) . " projets inspirants";
}

public function getNbDream(): string
{
return count($this->getDream());
}

public function getNbRevolt(): string
{
return count($this->getRevolt());
}

public function getNbProjectBoost(): string
{
return count($this->getProjectBoost());
}

public function getNbProjectInspiring(): string
{
return count($this->getProjectInspiring());
}

/**
* @return Collection|Revolt[]
*/
public function getRevolt(): Collection
{
return $this->revolt;
}

public function addRevolt(Revolt $revolt): self
{
if (!$this->revolt->contains($revolt)) {
$this->revolt[] = $revolt;
$revolt->setCollectifData($this);
}

return $this;
}

public function removeRevolt(Revolt $revolt): self
{
if ($this->revolt->removeElement($revolt)) {
// set the owning side to null (unless already changed)
if ($revolt->getCollectifData() === $this) {
$revolt->setCollectifData(null);
}
}

return $this;
}

/**
* @return Collection|Dream[]
*/
public function getDream(): Collection
{
return $this->dream;
}

public function addDream(Dream $dream): self
{
if (!$this->dream->contains($dream)) {
$this->dream[] = $dream;
$dream->setCollectifData($this);
}

return $this;
}

public function removeDream(Dream $dream): self
{
if ($this->dream->removeElement($dream)) {
// set the owning side to null (unless already changed)
if ($dream->getCollectifData() === $this) {
$dream->setCollectifData(null);
}
}

return $this;
}

/**
* @return Collection|ProjectBoost[]
*/
public function getProjectBoost(): Collection
{
return $this->projectBoost;
}

public function addProjectBoost(ProjectBoost $projectBoost): self
{
if (!$this->projectBoost->contains($projectBoost)) {
$this->projectBoost[] = $projectBoost;
$projectBoost->setCollectifData($this);
}

return $this;
}

public function removeProjectBoost(ProjectBoost $projectBoost): self
{
if ($this->projectBoost->removeElement($projectBoost)) {
// set the owning side to null (unless already changed)
if ($projectBoost->getCollectifData() === $this) {
$projectBoost->setCollectifData(null);
}
}

return $this;
}

/**
* @return Collection|ProjectInspiring[]
*/
public function getProjectInspiring(): Collection
{
return $this->projectInspiring;
}

public function addProjectInspiring(ProjectInspiring $projectInspiring): self
{
if (!$this->projectInspiring->contains($projectInspiring)) {
$this->projectInspiring[] = $projectInspiring;
$projectInspiring->setCollectifData($this);
}

return $this;
}

public function removeProjectInspiring(ProjectInspiring $projectInspiring): self
{
if ($this->projectInspiring->removeElement($projectInspiring)) {
// set the owning side to null (unless already changed)
if ($projectInspiring->getCollectifData() === $this) {
$projectInspiring->setCollectifData(null);
}
}

return $this;
}

public function getTerritory(): ?Territory
{
return $this->territory;
}

public function setTerritory(?Territory $territory): self
{
$this->territory = $territory;

return $this;
}
}
}

+ 192
- 0
src/Entity/CollectifData.php View File

@@ -33,11 +33,71 @@ class CollectifData extends AbstractData
*/
private $nbParticipant;

/**
* @ORM\OneToMany(targetEntity=Revolt::class, mappedBy="collectifData", cascade={"persist", "remove"})
*/
protected $revolt;

/**
* @ORM\OneToMany(targetEntity=Dream::class, mappedBy="collectifData", cascade={"persist", "remove"})
*/
protected $dream;

/**
* @ORM\OneToMany(targetEntity=ProjectBoost::class, mappedBy="collectifData", cascade={"persist", "remove"})
*/
protected $projectBoost;

/**
* @ORM\OneToMany(targetEntity=ProjectInspiring::class, mappedBy="collectifData", cascade={"persist", "remove"})
*/
protected $projectInspiring;

/**
* @ORM\ManyToOne(targetEntity=Territory::class, inversedBy="collectifData")
*/
protected $territory;

public function __construct()
{
$this->revolt = new ArrayCollection();
$this->dream = new ArrayCollection();
$this->projectBoost = new ArrayCollection();
$this->projectInspiring = new ArrayCollection();
}

public function __toString()
{
return $this->nbParticipant . " participants";
}

public function getResume()
{
return count($this->getRevolt()) . " révolte(s) - " . count($this->getDream()) . " rêve(s) - " . count(
$this->getProjectBoost()
) . " projet(s) boosté(s) - " . count($this->getProjectInspiring()) . " projets inspirants";
}

public function getNbDream(): string
{
return count($this->getDream());
}

public function getNbRevolt(): string
{
return count($this->getRevolt());
}

public function getNbProjectBoost(): string
{
return count($this->getProjectBoost());
}

public function getNbProjectInspiring(): string
{
return count($this->getProjectInspiring());
}

public function getId(): ?int
{
return $this->id;
@@ -66,4 +126,136 @@ class CollectifData extends AbstractData

return $this;
}

/**
* @return Collection|Revolt[]
*/
public function getRevolt(): Collection
{
return $this->revolt;
}

public function addRevolt(Revolt $revolt): self
{
if (!$this->revolt->contains($revolt)) {
$this->revolt[] = $revolt;
$revolt->setCollectifData($this);
}

return $this;
}

public function removeRevolt(Revolt $revolt): self
{
if ($this->revolt->removeElement($revolt)) {
// set the owning side to null (unless already changed)
if ($revolt->getCollectifData() === $this) {
$revolt->setCollectifData(null);
}
}

return $this;
}

/**
* @return Collection|Dream[]
*/
public function getDream(): Collection
{
return $this->dream;
}

public function addDream(Dream $dream): self
{
if (!$this->dream->contains($dream)) {
$this->dream[] = $dream;
$dream->setCollectifData($this);
}

return $this;
}

public function removeDream(Dream $dream): self
{
if ($this->dream->removeElement($dream)) {
// set the owning side to null (unless already changed)
if ($dream->getCollectifData() === $this) {
$dream->setCollectifData(null);
}
}

return $this;
}

/**
* @return Collection|ProjectBoost[]
*/
public function getProjectBoost(): Collection
{
return $this->projectBoost;
}

public function addProjectBoost(ProjectBoost $projectBoost): self
{
if (!$this->projectBoost->contains($projectBoost)) {
$this->projectBoost[] = $projectBoost;
$projectBoost->setCollectifData($this);
}

return $this;
}

public function removeProjectBoost(ProjectBoost $projectBoost): self
{
if ($this->projectBoost->removeElement($projectBoost)) {
// set the owning side to null (unless already changed)
if ($projectBoost->getCollectifData() === $this) {
$projectBoost->setCollectifData(null);
}
}

return $this;
}

/**
* @return Collection|ProjectInspiring[]
*/
public function getProjectInspiring(): Collection
{
return $this->projectInspiring;
}

public function addProjectInspiring(ProjectInspiring $projectInspiring): self
{
if (!$this->projectInspiring->contains($projectInspiring)) {
$this->projectInspiring[] = $projectInspiring;
$projectInspiring->setCollectifData($this);
}

return $this;
}

public function removeProjectInspiring(ProjectInspiring $projectInspiring): self
{
if ($this->projectInspiring->removeElement($projectInspiring)) {
// set the owning side to null (unless already changed)
if ($projectInspiring->getCollectifData() === $this) {
$projectInspiring->setCollectifData(null);
}
}

return $this;
}

public function getTerritory(): ?Territory
{
return $this->territory;
}

public function setTerritory(?Territory $territory): self
{
$this->territory = $territory;

return $this;
}
}

+ 191
- 0
src/Entity/IndividualData.php View File

@@ -48,11 +48,71 @@ class IndividualData extends AbstractData
*/
private $introAnswer;

/**
* @ORM\OneToMany(targetEntity=Revolt::class, mappedBy="individualData", cascade={"persist", "remove"})
*/
protected $revolt;

/**
* @ORM\OneToMany(targetEntity=Dream::class, mappedBy="individualData", cascade={"persist", "remove"})
*/
protected $dream;

/**
* @ORM\OneToMany(targetEntity=ProjectBoost::class, mappedBy="individualData", cascade={"persist", "remove"})
*/
protected $projectBoost;

/**
* @ORM\OneToMany(targetEntity=ProjectInspiring::class, mappedBy="individualData", cascade={"persist", "remove"})
*/
protected $projectInspiring;

/**
* @ORM\ManyToOne(targetEntity=Territory::class, inversedBy="individualData")
*/
protected $territory;

public function __construct()
{
$this->revolt = new ArrayCollection();
$this->dream = new ArrayCollection();
$this->projectBoost = new ArrayCollection();
$this->projectInspiring = new ArrayCollection();
}

public function getResume()
{
return count($this->getRevolt()) . " révolte(s) - " . count($this->getDream()) . " rêve(s) - " . count(
$this->getProjectBoost()
) . " projet(s) boosté(s) - " . count($this->getProjectInspiring()) . " projets inspirants";
}

public function __toString()
{
return $this->firstname . " " . $this->lastname;
}

public function getNbDream(): string
{
return count($this->getDream());
}

public function getNbRevolt(): string
{
return count($this->getRevolt());
}

public function getNbProjectBoost(): string
{
return count($this->getProjectBoost());
}

public function getNbProjectInspiring(): string
{
return count($this->getProjectInspiring());
}

public function getId(): ?int
{
return $this->id;
@@ -118,4 +178,135 @@ class IndividualData extends AbstractData
return $this;
}

/**
* @return Collection|Revolt[]
*/
public function getRevolt(): Collection
{
return $this->revolt;
}

public function addRevolt(Revolt $revolt): self
{
if (!$this->revolt->contains($revolt)) {
$this->revolt[] = $revolt;
$revolt->setIndividualData($this);
}

return $this;
}

public function removeRevolt(Revolt $revolt): self
{
if ($this->revolt->removeElement($revolt)) {
// set the owning side to null (unless already changed)
if ($revolt->getIndividualData() === $this) {
$revolt->setIndividualData(null);
}
}

return $this;
}

/**
* @return Collection|Dream[]
*/
public function getDream(): Collection
{
return $this->dream;
}

public function addDream(Dream $dream): self
{
if (!$this->dream->contains($dream)) {
$this->dream[] = $dream;
$dream->setIndividualData($this);
}

return $this;
}

public function removeDream(Dream $dream): self
{
if ($this->dream->removeElement($dream)) {
// set the owning side to null (unless already changed)
if ($dream->getIndividualData() === $this) {
$dream->setIndividualData(null);
}
}

return $this;
}

/**
* @return Collection|ProjectBoost[]
*/
public function getProjectBoost(): Collection
{
return $this->projectBoost;
}

public function addProjectBoost(ProjectBoost $projectBoost): self
{
if (!$this->projectBoost->contains($projectBoost)) {
$this->projectBoost[] = $projectBoost;
$projectBoost->setIndividualData($this);
}

return $this;
}

public function removeProjectBoost(ProjectBoost $projectBoost): self
{
if ($this->projectBoost->removeElement($projectBoost)) {
// set the owning side to null (unless already changed)
if ($projectBoost->getIndividualData() === $this) {
$projectBoost->setIndividualData(null);
}
}

return $this;
}

/**
* @return Collection|ProjectInspiring[]
*/
public function getProjectInspiring(): Collection
{
return $this->projectInspiring;
}

public function addProjectInspiring(ProjectInspiring $projectInspiring): self
{
if (!$this->projectInspiring->contains($projectInspiring)) {
$this->projectInspiring[] = $projectInspiring;
$projectInspiring->setIndividualData($this);
}

return $this;
}

public function removeProjectInspiring(ProjectInspiring $projectInspiring): self
{
if ($this->projectInspiring->removeElement($projectInspiring)) {
// set the owning side to null (unless already changed)
if ($projectInspiring->getIndividualData() === $this) {
$projectInspiring->setIndividualData(null);
}
}

return $this;
}

public function getTerritory(): ?Territory
{
return $this->territory;
}

public function setTerritory(?Territory $territory): self
{
$this->territory = $territory;

return $this;
}
}

+ 3
- 3
templates/frontend/footer.html.twig View File

@@ -56,11 +56,11 @@
<div class="col-12 col-md-5 newsletter">
<div class="row">
<div class="col-9">
<p class="lettre-infos">Recevoir la lettre d’info !</p>
<input class="email" type="email" value="E-mail">
{# <p class="lettre-infos">Recevoir la lettre d’info !</p>#}
{# <input class="email" type="email" value="E-mail">#}
</div>
<div class="col-3">
<input class="submit" type="submit" value="">
{# <input class="submit" type="submit" value="">#}
</div>
</div>
</div>

Loading…
Cancel
Save