Disabled menu selection when not logged in.
authorBrandon King <kingb@caltech.edu>
Wed, 1 Jul 2009 23:10:00 +0000 (23:10 +0000)
committerBrandon King <kingb@caltech.edu>
Wed, 1 Jul 2009 23:10:00 +0000 (23:10 +0000)
htsworkflow/frontend/static/js/htsw.js
htsworkflow/frontend/templates/app_base.html

index 40ddf09eff33020158bc3939fa360b519bb265c8..f2d04d080455f070630209dba8ad7846b61391c2 100644 (file)
@@ -239,7 +239,8 @@ $(document).ready(function(){
             } else {
                 tb.add({
                     text: div_id,
-                    handler: function() { goto_url(divobj.getAttribute('href')); }
+                    handler: function() { goto_url(divobj.getAttribute('href')); },
+                   disabled: (divobj.textContent == 'disabled') ? true : false 
                 });
             }
         });
index 1ba9fcdceab0e005587dd2b8375fdeaa6ee541f0..30ef5704d8b64726517748d7966fc4bc1c7dcae2 100644 (file)
@@ -63,9 +63,7 @@
     <div id="left_tbar_data" class="x-hidden">
         {% block left_tbar_menu %}
         <div id="Flowcells-Libraries Tracker" href="{% url htsworkflow.frontend.samples.views.library %}"></div>
-        {% if user.is_authenticated %}
-        <div id="Inventory Tracker" href="{% url htsworkflow.frontend.inventory.views.index %}"></div>
-        {% endif %}
+        <div id="Inventory Tracker" href="{% url htsworkflow.frontend.inventory.views.index %}">{% if user.is_authenticated %}{% else %}disabled{% endif %}</div>
         {% endblock %}
     </div>