Skip to content

[WIP] Add section for rendering a custom prototype for collections #1998

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 106 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
6e3bc9f
Created paragraph for prototype customization.
Nov 29, 2012
931715a
Added twig-syntax for data-prototype.
Nov 29, 2012
f5c6876
Added reusing of prototype template for displaying items from collect…
Dec 3, 2012
83ae106
Formatting.
Dec 3, 2012
e42a5a5
Use double ticks for inline code.
Dec 4, 2012
e222ee1
Moved hyperlink to the bottom.
Dec 4, 2012
a4f53b5
Added PHP examples.
Jan 2, 2013
52f17a3
Added missing closing paranthesis
Aug 22, 2014
9ddfc58
Fixed code blocks syntax.
Aug 22, 2014
3272cfc
Readded missing link targets.
Aug 22, 2014
c483a90
Removed outdated translations from the official list
wouterj Jul 31, 2014
9b0cef4
Fix documentation for group_sequence_provider
giosh94mhz Aug 18, 2014
30e993d
document multiple recipients in XML configs
xabbuh Aug 17, 2014
2c69be5
tweaks for the web server configuration chapter
xabbuh Aug 17, 2014
cb2ba28
Fixed minor typos.
ahsio Aug 22, 2014
0a4acc3
Removing extra whitespace
weaverryan Aug 22, 2014
ca43765
Added the schema_filter option to the reference
peterrehm Aug 20, 2014
8e019f5
Added custom format page to translation component
raulfraile Aug 22, 2014
dd161e3
Link from introduction section
raulfraile Aug 22, 2014
20a3385
Small fixes
raulfraile Aug 22, 2014
3b105c7
Cleanups
raulfraile Aug 22, 2014
afd0365
Fixed version for composer install
zomberg Aug 23, 2014
f560f82
Improvements based on comments
raulfraile Aug 23, 2014
981739a
Extra improvements based on comments
raulfraile Aug 24, 2014
d6de597
Fixed wrong indentation
raulfraile Aug 24, 2014
fa24ac6
Updated for CMF doc refactoring
wouterj Aug 25, 2014
0a4d5c5
Adding 'attr' option to the Textarea options list
ronanguilloux Aug 20, 2014
f93cca0
[Reference] consistent & complete config examples
xabbuh Aug 21, 2014
acf5d28
Update voters.rst
Aug 22, 2014
cdf2134
fixes environment/application mistake
phpeek Aug 25, 2014
4bb0f65
Improved custom formats article based on comments
raulfraile Aug 26, 2014
93ae940
Added note about exporting SYMFONY_ENV
jasonbouffard Aug 27, 2014
f3b942e
New service to simplify password encoding
aferrandini Aug 26, 2014
819c53c
Route description correction.
Aug 27, 2014
9f6590b
add link to form testing chapter in test section
xabbuh Aug 30, 2014
1fd5af4
Link to FOSHttpCacheBundle
ddeboer Aug 24, 2014
44e8ae0
Update datetime.rst
althaus Aug 28, 2014
d41ed6c
Update datetime.rst
althaus Aug 29, 2014
1a001c7
Update home of DoctrineExtensions.
rubenrua Aug 28, 2014
4ea3f8d
Moved 'contributing' images to their own directory
javiereguiluz Sep 5, 2014
86be71c
fix name of the Yaml component
xabbuh Sep 5, 2014
4238aad
replace "Symfony2" with "Symfony"
xabbuh Sep 5, 2014
3ee5187
Added a note about the lacking features of Yaml Component
javiereguiluz Sep 6, 2014
227d366
Fix method for adding placholders in progressBar
danez Sep 6, 2014
f6ff985
The name of the placeholder must not be encapsulated in %
danez Sep 6, 2014
f6a3c28
Missing backtick, thanks to @Baptouuuu
wouterj Sep 8, 2014
9372cde
Reverts c723d8dd546412b08ffaf3846b5574f4f4021418
wouterj Sep 8, 2014
727744c
Missing backtick, thanks to @Baptouuuu
wouterj Sep 8, 2014
5bae1e1
Fixed code highlighting
wouterj Sep 9, 2014
b9a7381
Caution that roles should start with ROLE_
jrjohnson Sep 12, 2014
3f0e5b6
Added a note about the side effects of enabling both PHP and Twig
javiereguiluz Sep 12, 2014
3689506
Add formatting, links, and clarity
jrjohnson Sep 12, 2014
5aa2ea0
Add label book-security-roles
jrjohnson Sep 12, 2014
b78465b
Fix reference label
jrjohnson Sep 12, 2014
a0f318e
do not reference services in parameters
xabbuh Sep 13, 2014
4458f7e
Revamped the documentation about "Contributing Docs"
javiereguiluz Sep 13, 2014
5b53d6a
Added missing link
javiereguiluz Sep 13, 2014
9a49cf2
lways use absolute links instead of relative for internal doc links
javiereguiluz Sep 13, 2014
5173705
Switched another relative link into an absolute reference
javiereguiluz Sep 13, 2014
f2043eb
Added a note about not using relative internal links in the doc
javiereguiluz Sep 13, 2014
709f82a
Added lots of fixes suggested by reviewers
javiereguiluz Sep 13, 2014
1cbf5fa
Added another bunch of fixes suggested by reviewers
javiereguiluz Sep 13, 2014
82ae880
More and more fixes and improvements
javiereguiluz Sep 13, 2014
216d086
Improved the explanation thanks to @stof comments
javiereguiluz Sep 13, 2014
6ac5c55
Reworded the explanation about the limitation of enablin PHP templates
javiereguiluz Sep 13, 2014
32cc0c7
Update Collection.rst
azarzag Sep 11, 2014
cc5ac25
Removed two highlight formats which are "experimental" and not
javiereguiluz Sep 15, 2014
7ed8f00
Fixed all the errors found by Ryan
javiereguiluz Sep 15, 2014
8821052
caution on `null` values in Expression constraint
xabbuh Sep 5, 2014
e5ea1b1
Move debug command to the debug namespace
Sep 15, 2014
edd2f8d
[#4166] Fixing small typo
weaverryan Sep 16, 2014
28d10e2
Cache needs be cleared
marcel-burkhard Sep 12, 2014
3ad7d3c
Update override_dir_structure.rst
marcel-burkhard Sep 16, 2014
e1947af
First draft of the bundle installation instructions
javiereguiluz Aug 22, 2014
8078bbe
Applied all the fixes and suggestions made by reviewers
javiereguiluz Aug 22, 2014
5a95d43
Fixed minor typo
javiereguiluz Aug 22, 2014
b285fac
More improvements based on reviewers' comments
javiereguiluz Aug 22, 2014
c0d447c
Fixed some code formatting
javiereguiluz Aug 22, 2014
242d410
Removed the first person perspective and other minor fixes
javiereguiluz Aug 22, 2014
376f009
More tweaks and fixes
javiereguiluz Aug 22, 2014
aca99bb
Minor fixes and tweaks
javiereguiluz Aug 23, 2014
ae1c12d
Removed the sidebar and made some minor tweaks
javiereguiluz Aug 23, 2014
7769b89
Reworded a bit the installation instructions
javiereguiluz Aug 23, 2014
45d0e00
Added the fixes suggested by Ryan
javiereguiluz Aug 27, 2014
3908ed2
Handle "constraints" option in form unit testing
sarcher Sep 8, 2014
69f77cd
Fixed return value
sarcher Sep 8, 2014
396f94f
fix ContainerAwareEventDispatcher definition
xabbuh Sep 16, 2014
511c418
link translation DIC tags to components section
xabbuh Sep 17, 2014
ff157a4
provide node path on configuration
desarrolla2 Sep 18, 2014
36e9741
Update uglifyjs.rst
desarrolla2 Sep 18, 2014
48b3194
Update uglifyjs.rst
desarrolla2 Sep 18, 2014
aa4c827
update uglifyjs.rst
desarrolla2 Sep 18, 2014
621a6c1
[#4249] Tiny tweak to language
weaverryan Sep 18, 2014
a86977c
Removed unnecessary comma
allejo Sep 19, 2014
37f5010
Update remove.rst
Ha99y Jun 10, 2014
d6d4bcc
Update remove.rst
Ha99y Jun 11, 2014
39f14b2
Update remove.rst
Ha99y Jun 11, 2014
c785b83
Applied comments
wouterj Sep 16, 2014
4f14285
Remove redundant references to trusting HttpCache
thewilkybarkid Sep 16, 2014
61e1245
Clarify that route defaults don't need a placeholder
iamdto Jul 11, 2014
984b46e
[Twig][Form] Moved twig.form.resources to a higher level
Jul 7, 2014
2e1488e
Created paragraph for prototype customization.
Nov 29, 2012
4590c01
Added twig-syntax for data-prototype.
Nov 29, 2012
11e38cc
Added reusing of prototype template for displaying items from collect…
Dec 3, 2012
a3147d2
Formatting.
Dec 3, 2012
ee3fc29
Capitalize the headline and add punctuation.
Sep 19, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added reusing of prototype template for displaying items from collect…
…ion.
  • Loading branch information
daFish committed Aug 22, 2014
commit f5c6876df271fc91115c6fe1481f893eecfe2ed2
10 changes: 10 additions & 0 deletions cookbook/form/form_collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -743,3 +743,13 @@ But if you are in the situation were you need to have a complete custom prototyp

.. code-block:: html+jinja
data-prototype="{% filter escape %}{% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' with { 'form': form.task.get('prototype') } %}{% endfilter %}"

The included `AcmeTaskBundle:Task:prototypeTask.html.twig` contains the markup used for the prototype. This way you can not only easily structure your prototype-markup, you can
also use this markup to render the contents of the collection when it already holds items:

.. code-block:: html+jinja
{% for task in tasks %}
{% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' with { 'form': form.task.vars.form } %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be:

{% include 'AcmeTaskBundle:Task:prototypeTask.html.twig'
    with {'form': form.task.vars.form}
%}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

{% endfor %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here


This makes sure the displayed items are the same as the newly inserted from the prototype.