Fix titles, add rollsInCamera field to Film type
This commit is contained in:
parent
ffd9ef5952
commit
c4a591c71a
23
composer.lock
generated
23
composer.lock
generated
@ -2355,16 +2355,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/maker-bundle",
|
||||
"version": "v1.0.2",
|
||||
"version": "v1.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/maker-bundle.git",
|
||||
"reference": "bf97703ddb68c6b37bd6bab5f5ebd5c7542ca1ef"
|
||||
"reference": "ba427289009de6f0fd51fb51186eeaa70ab3a33d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/maker-bundle/zipball/bf97703ddb68c6b37bd6bab5f5ebd5c7542ca1ef",
|
||||
"reference": "bf97703ddb68c6b37bd6bab5f5ebd5c7542ca1ef",
|
||||
"url": "https://api.github.com/repos/symfony/maker-bundle/zipball/ba427289009de6f0fd51fb51186eeaa70ab3a33d",
|
||||
"reference": "ba427289009de6f0fd51fb51186eeaa70ab3a33d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2377,6 +2377,7 @@
|
||||
"symfony/http-kernel": "^3.4|^4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"allocine/twigcs": "^3.0",
|
||||
"friendsofphp/php-cs-fixer": "^2.8",
|
||||
"symfony/phpunit-bridge": "^3.4|^4.0",
|
||||
"symfony/process": "^3.4|^4.0"
|
||||
@ -2402,13 +2403,15 @@
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.",
|
||||
"homepage": "https://symfony.com/doc/current/bundles/SymfonyMakerBundle/index.html",
|
||||
"keywords": [
|
||||
"code generator",
|
||||
"generator",
|
||||
"scaffold",
|
||||
"scaffolding"
|
||||
],
|
||||
"time": "2017-12-04T17:50:28+00:00"
|
||||
"time": "2018-02-21T19:43:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/monolog-bridge",
|
||||
@ -3536,16 +3539,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/flex",
|
||||
"version": "v1.0.68",
|
||||
"version": "v1.0.70",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/flex.git",
|
||||
"reference": "0241b2acbb58df29e633b03fb56eb349a207613f"
|
||||
"reference": "1f00c05d35523dc0ac52e4a457989a069be5a7a4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/flex/zipball/0241b2acbb58df29e633b03fb56eb349a207613f",
|
||||
"reference": "0241b2acbb58df29e633b03fb56eb349a207613f",
|
||||
"url": "https://api.github.com/repos/symfony/flex/zipball/1f00c05d35523dc0ac52e4a457989a069be5a7a4",
|
||||
"reference": "1f00c05d35523dc0ac52e4a457989a069be5a7a4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -3578,7 +3581,7 @@
|
||||
"email": "fabien.potencier@gmail.com"
|
||||
}
|
||||
],
|
||||
"time": "2018-01-31T19:34:57+00:00"
|
||||
"time": "2018-02-22T07:00:47+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
|
@ -75,28 +75,35 @@ class Film {
|
||||
*
|
||||
* @ORM\Column(name="film_base", type="string", nullable=false, options={"default"="Cellulose Triacetate"})
|
||||
*/
|
||||
private $filmBase;
|
||||
private $filmBase = 'Cellulose Triacetate';
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Column(name="unused_rolls", type="integer", nullable=false, options={"default"=0})
|
||||
*/
|
||||
private $unusedRolls;
|
||||
private $unusedRolls = 0;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Column(name="rolls_in_camera", type="integer", nullable=false, options={"default"=0})
|
||||
*/
|
||||
private $rollsInCamera = 0;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Column(name="developed_rolls", type="integer", nullable=false, options={"default"=0})
|
||||
*/
|
||||
private $developedRolls;
|
||||
private $developedRolls = 0;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="chemistry", type="string", nullable=false, options={"default"="C-41"})
|
||||
*/
|
||||
private $chemistry;
|
||||
private $chemistry = 'C-41';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
@ -275,6 +282,24 @@ class Film {
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getRollsInCamera(): ?int
|
||||
{
|
||||
return $this->rollsInCamera;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $rollsInCamera
|
||||
* @return self
|
||||
*/
|
||||
public function setRollsInCamera(int $rollsInCamera): self
|
||||
{
|
||||
$this->rollsInCamera = $rollsInCamera;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
|
@ -23,6 +23,7 @@ class FilmType extends AbstractType
|
||||
->add('filmFormat')
|
||||
->add('filmBase')
|
||||
->add('unusedRolls')
|
||||
->add('rollsInCamera')
|
||||
->add('developedRolls')
|
||||
->add('chemistry')
|
||||
->add('notes');
|
||||
|
@ -5,7 +5,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}Welcome!{% endblock %}</title>
|
||||
<title>{% block title %}Camera 📷 CRUD{% endblock %}</title>
|
||||
<link rel="stylesheet" href="/css/foundation.min.css" />
|
||||
<link rel="stylesheet" href="/css/app.css" />
|
||||
{% block stylesheets %}{% endblock %}
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'form.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Cameras - Edit
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<h1>Edit Camera</h1>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Cameras
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h2>Cameras</h2>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'form.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Cameras - Add
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<h2>Add a Camera</h2>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'form.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Camera - Show
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<h2>Camera</h2>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'form.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Camera Type - Edit
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<h2>Edit Camera Type</h2>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Camera Types
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h2>Camera Types</h2>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'form.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Camera Type - Add
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<h2>Add a Camera Type</h2>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'form.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Camera Type - Show
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<h2>Camera Type</h2>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="grid-container"></div>
|
||||
{% endblock %}
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'form.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Film - Edit
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<h1>Edit Film</h1>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Film
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h2>Film</h2>
|
||||
|
||||
@ -24,6 +28,7 @@
|
||||
<th>Film Format</th>
|
||||
<th>Film Base</th>
|
||||
<th>Unused Rolls</th>
|
||||
<th>Rolls in a Camera</th>
|
||||
<th>Developed Rolls</th>
|
||||
<th>Chemistry</th>
|
||||
<th>Notes</th>
|
||||
@ -48,6 +53,7 @@
|
||||
<td>{{ film.filmFormat }}</td>
|
||||
<td>{{ film.filmBase }}</td>
|
||||
<td>{{ film.unusedRolls }}</td>
|
||||
<td>{{ film.rollsInCamera }}</td>
|
||||
<td>{{ film.developedRolls }}</td>
|
||||
<td>{{ film.chemistry }}</td>
|
||||
<td>{{ film.notes }}</td>
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'form.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Film - Add
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<h2>Add a Film</h2>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'form.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Film - Show
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<h2>Film</h2>
|
||||
|
||||
@ -61,6 +65,10 @@
|
||||
<th># of Unused Rolls</th>
|
||||
<td>{{ film.unusedRolls }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th># of Rolls in a Camera</th>
|
||||
<td>{{ film.rollsInCamera }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th># of Developed Rolls</th>
|
||||
<td>{{ film.developedRolls }}</td>
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'form.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Flash - Edit
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<h2>Flash edit</h2>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Flashes
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h2>Flashes list</h2>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'form.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Flash - Add
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<h2>Add a Flash</h2>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'form.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Flash - Show
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<h2>Flash</h2>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<h1>Camera Collection Admin</h1>
|
||||
<h1>Camera Collection CRUD</h1>
|
||||
<div class="top-bar">
|
||||
<div class="top-bar-left">
|
||||
<ul class="menu">
|
||||
@ -12,6 +12,8 @@
|
||||
<li class="{{ route starts with 'lens_' ? 'is-active' }}">
|
||||
<a href="{{ path('lens_index') }}">Lenses</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="menu">
|
||||
<li class="menu-text">Previously Owned</li>
|
||||
<li class="{{ route starts with 'previously-owned-camera' ? 'is-active' }}">
|
||||
<a href="{{ path('previously-owned-camera_index') }}">Cameras</a>
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'form.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Lens - Edit
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<h2>Edit Lens</h2>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Lenses
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h2>Lenses</h2>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'form.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Lens - Add
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<h2>Add a Lens</h2>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'form.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Lens - Show
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<h2>Lens</h2>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'form.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Previously Owned Camera - Edit
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<h2>Edit Camera</h2>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Previously Owned Cameras
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h2>Previously Owned Cameras</h2>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'form.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Previously Owned Camera - Show
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<h2>Previously Owned Camera</h2>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'form.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Previously Owned Flash - Edit
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<h2>Edit Previously Owned Flash</h2>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Previously Owned Flashes
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h2>Previously Owned Flashes</h2>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'form.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Previously Owned Flash - Show
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<h2>Previously Owned Flash</h2>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'form.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Previously Owned Lens - Edit
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<h2>Edit Lens</h2>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Previously Owned Lenses
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h2>Previously Owned Lenses</h2>
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
{% extends 'form.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
Camera 📷 CRUD - Previously Owned Lens - Edit
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
<h2>Previously Owned Lens</h2>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user