--- a/src/Company/BaseBundle/Controller/IndexController.php Thu Oct 27 21:24:29 2011 +0200
+++ b/src/Company/BaseBundle/Controller/IndexController.php Thu Oct 27 21:52:54 2011 +0200
@@ -19,7 +19,8 @@
public function otherAction()
{
- return $this->render('CompanyBaseBundle:Index:other_page.html.twig');
+ $tag_id = $this->getRequest()->query->get('tag');
+ return $this->render('CompanyBaseBundle:Index:other_page.html.twig', array('tag_id' => $tag_id));
}
--- a/src/Company/BaseBundle/Resources/config/routing.yml Thu Oct 27 21:24:29 2011 +0200
+++ b/src/Company/BaseBundle/Resources/config/routing.yml Thu Oct 27 21:52:54 2011 +0200
@@ -8,7 +8,7 @@
company_other:
pattern: /other
defaults: { _controller: CompanyBaseBundle:Index:other }
-doctag:
+document_with_tags:
pattern: /doctag/{idDoc}
defaults: { _controller: CompanyBaseBundle:Index:documentWithTag }
all_tags:
--- a/src/Company/BaseBundle/Resources/views/Index/all_documents.html.twig Thu Oct 27 21:24:29 2011 +0200
+++ b/src/Company/BaseBundle/Resources/views/Index/all_documents.html.twig Thu Oct 27 21:52:54 2011 +0200
@@ -7,7 +7,7 @@
<table>
<tr><th>ID</th><th>TITLE</th><th>DESC</th><th>lien</th></tr>
{% for doc in documents %}
- <tr><td>{{ doc.id }}</td><td>{{ doc.title }}</td><td>{{ doc.description }}</td><td><a href="{{ url('doctag', { 'idDoc': doc.id }) }}">voir les tags</a></td></tr>
+ <tr><td>{{ doc.id }}</td><td>{{ doc.title }}</td><td>{{ doc.description }}</td><td><a href="{{ url('document_with_tags', { 'idDoc': doc.id }) }}">voir les tags</a></td></tr>
{% endfor %}
</table>
<p><a href="{{ url('document_new') }}">Add another document</a></p>
--- a/src/Company/BaseBundle/Resources/views/Index/other_page.html.twig Thu Oct 27 21:24:29 2011 +0200
+++ b/src/Company/BaseBundle/Resources/views/Index/other_page.html.twig Thu Oct 27 21:52:54 2011 +0200
@@ -5,6 +5,9 @@
<div id="content" class="span-24 last">
<div id="inner_content">
<p>This is a simple template extending the base template.</p>
+ {% if tag_id %}
+ <p>You passed the parameter tag_id = {{tag_id}}</p>
+ {% endif %}
</div>
</div>
{% endblock %}
\ No newline at end of file
--- a/src/Company/BaseBundle/Resources/views/Index/tag_embedder.html.twig Thu Oct 27 21:24:29 2011 +0200
+++ b/src/Company/BaseBundle/Resources/views/Index/tag_embedder.html.twig Thu Oct 27 21:52:54 2011 +0200
@@ -22,7 +22,7 @@
<p><b>Description</b><br/>{{doc.description}}</p>
</div>
<div class="right_sheet">
- <p style="float:right;"><a href="{{ url('doctag', { 'idDoc': (doc.id-1) }) }}"> < </a> - <a href="{{ url('doctag', { 'idDoc': (doc.id+1) }) }}"> > </a></p>
+ <p style="float:right;"><a href="{{ url('document_with_tags', { 'idDoc': (doc.id-1) }) }}"> < </a> - <a href="{{ url('document_with_tags', { 'idDoc': (doc.id+1) }) }}"> > </a></p>
{% render "WikiTagBundle:WikiTag:documentTags" with {'id_doc': doc.id} %}
{#
<div id="tags_commands" style="float:left;width: 100%" >