Wanted Card + Fixs
This commit is contained in:
31
migrations/Version20220813133942.php
Normal file
31
migrations/Version20220813133942.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20220813133942 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE directory ADD wanted_display TINYINT(1) DEFAULT \'1\' NOT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE directory DROP wanted_display');
|
||||
}
|
||||
}
|
||||
@@ -29,7 +29,7 @@ class HomeController extends AbstractController
|
||||
->order(['createdAt' => 'DESC'])
|
||||
->getResult(),
|
||||
'wanted' =>
|
||||
$DirectoryRepository->list()->notDead()->wanted()->getResult(),
|
||||
$DirectoryRepository->list()->notDead()->wanted()->wantedDisplay()->getResult(),
|
||||
'controller_name' => 'HomeController',
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -415,6 +415,11 @@ class Directory
|
||||
*/
|
||||
private $wantedReason;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean", options={"default":"1"})
|
||||
*/
|
||||
private $wantedDisplay = true;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity=Infringement::class, mappedBy="directory", orphanRemoval=true)
|
||||
* @ORM\OrderBy({"createdAt" = "DESC"})
|
||||
@@ -1335,6 +1340,18 @@ class Directory
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getWantedDisplay(): ?bool
|
||||
{
|
||||
return $this->wantedDisplay;
|
||||
}
|
||||
|
||||
public function setWantedDisplay(bool $wantedDisplay): self
|
||||
{
|
||||
$this->wantedDisplay = $wantedDisplay;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection|Infringement[]
|
||||
*/
|
||||
|
||||
@@ -67,6 +67,7 @@ class DirectoryType extends AbstractType
|
||||
->add('gangInfo', null, ['label' => 'form_label_gang_info'])
|
||||
->add('wanted', null, ['label' => 'form_label_wanted'])
|
||||
->add('wantedReason', null, ['label' => 'form_label_wantedReason', 'help' => 'form_help_wantedReason'])
|
||||
->add('wantedDisplay', null, ['label' => 'form_label_wantedDisplay'])
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@@ -77,6 +77,18 @@ class DirectoryRepository extends ServiceEntityRepository
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function wantedDisplay()
|
||||
{
|
||||
$this->qb->andWhere('d.wantedDisplay = 1');
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function wantedNotDisplay()
|
||||
{
|
||||
$this->qb->andWhere('d.wantedDisplay = 0');
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function order(array $order)
|
||||
{
|
||||
foreach ($order as $key => $value) {
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
|
||||
<meta name="description" content="Public services panel">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
|
||||
<title>Vision - {% block title %}{% trans %}page_title{% endtrans %}{% endblock %}</title>
|
||||
<!-- HTML5 Shim and Respond.js IE11 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
@@ -13,6 +12,21 @@
|
||||
<![endif]-->
|
||||
<!-- Meta -->
|
||||
|
||||
<meta name="description" content="Vision, web software for public services">
|
||||
<meta name="author" content="@GameXperiencefr @Xbird_">
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:site" content="{{ app.request.requesturi }}" />
|
||||
<meta name="twitter:title" content="Vision - {{ block('title') }}" />
|
||||
<meta name="twitter:description" content="Vision {{ vision_version() }}, web software for public services" />
|
||||
<meta name="twitter:image" content="{{ asset('img/vision_long_2100x250.svg') }}" />
|
||||
<meta name="og:title" content="Vision - {{ block('title') }}" />
|
||||
<meta name="og:url" content="{{ app.request.requesturi }}" />
|
||||
<meta name="og:site_name" content="Vision - {{ block('title') }}" />
|
||||
<meta name="og:description" content="Vision {{ vision_version() }}, web software for public services" />
|
||||
<meta name="og:type" content="Website" />
|
||||
<meta name="og:image" content="{{ asset('img/vision_long_2100x250.svg') }}" />
|
||||
|
||||
<!-- Favicon icon -->
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="row align-items-center text-center">
|
||||
<div class="col-md-12">
|
||||
<div class="card-body">
|
||||
<img src="{{ asset('img/logo.png') }}" alt="" class="img-fluid mb-4">
|
||||
<img src="{{ asset('img/vision_long_2100x250.svg') }}" alt="" class="img-fluid mb-4">
|
||||
<h4 class="mb-3 f-w-400">{% trans %}title_login{% endtrans %}</h4>
|
||||
{% if error %}
|
||||
<div class="alert alert-danger">{{ error.messageKey | trans }}</div>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="row align-items-center text-center">
|
||||
<div class="col-md-12">
|
||||
<div class="card-body">
|
||||
<img src="{{ asset('img/logo.png') }}" alt="" class="img-fluid mb-4">
|
||||
<img src="{{ asset('img/vision_long_2100x250.svg') }}" alt="" class="img-fluid mb-4">
|
||||
<h4 class="mb-3 f-w-400">{% trans %}title_register{% endtrans %}</h4>
|
||||
{{ form(form) }}
|
||||
<p class="mb-2">{% trans %}already_have_account{% endtrans %} ? <a href="{{ path('app_login') }}" class="f-w-400">{% trans %}button_login{% endtrans %}</a></p>
|
||||
|
||||
@@ -353,6 +353,7 @@ form_label_upload_trucklicence: Heavy Truck License
|
||||
form_label_vehicle_type: Vehicle type
|
||||
form_label_versus: Versus
|
||||
form_label_wanted: This person is wanted
|
||||
form_label_wantedDisplay: Display wanted card on homepage
|
||||
form_label_wantedReason: Reason for searching for this person
|
||||
form_placeholder_email: Email
|
||||
form_placeholder_firstname: First name
|
||||
|
||||
@@ -353,6 +353,7 @@ form_label_upload_trucklicence: Permis Poids Lourd
|
||||
form_label_vehicle_type: Type de véhicule
|
||||
form_label_versus: Contre
|
||||
form_label_wanted: Cette personne est recherchée
|
||||
form_label_wantedDisplay: Afficher la recherche sur l'accueil
|
||||
form_label_wantedReason: Raison de la recherche de cette personne
|
||||
form_placeholder_email: Email
|
||||
form_placeholder_firstname: Prénom
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"version": "0.2.5"
|
||||
"version": "0.2.6"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user