enhance document_list_profile and update readme V00.12
authorcavaliet
Thu, 19 Jul 2012 16:05:48 +0200
changeset 108 a22fb91de231
parent 107 0b46f4695d97
child 109 d45508c31d82
enhance document_list_profile and update readme
README.md
Resources/views/WikiTag/javascript.html.twig
--- a/README.md	Wed Jul 18 12:34:22 2012 +0200
+++ b/README.md	Thu Jul 19 16:05:48 2012 +0200
@@ -199,6 +199,10 @@
         {% render "WikiTagBundle:WikiTag:documentTags" with {'id_doc': doc.id, 'profile_name': 'editor'} %}
         ...
 
+If document\_list\_profile in not defined, all columns and the sort tag button will be displayed.
+If no param is set in the controller call, all columns and the sort tag button will be displayed.
+
+        {% render "WikiTagBundle:WikiTag:addJavascript" %}
 
 ## More configuration 2 : add context seach to any text part of your page
 Via config.yml, you can configure a list of jquery selectors meant to let appear tag context search by selecting text. 
--- a/Resources/views/WikiTag/javascript.html.twig	Wed Jul 18 12:34:22 2012 +0200
+++ b/Resources/views/WikiTag/javascript.html.twig	Thu Jul 19 16:05:48 2012 +0200
@@ -94,7 +94,9 @@
         {% if columns['alternative_wikipedia_url'].visibility==2 %}columsToHide.push(13);{% endif %}
         {% if columns['alternative_wikipedia_url'].visibility==0 %}columsToHide.push(13);notInList.push(13);{% endif %}
     {% else %}columsToHide.push(13);notInList.push(13);{% endif %}
-    
+
+    {% if columns==null %}columsToHide = [];notInList = [];{% endif %}
+
     notInList.push(14);
     
     $(document).ready(function(){