Need to have disable versions of buttons always present
authorCharles Connell <charles@connells.org>
Sun, 2 Feb 2014 17:28:08 +0000 (12:28 -0500)
committerCharles Connell <charles@connells.org>
Sun, 2 Feb 2014 17:28:08 +0000 (12:28 -0500)
karmaworld/templates/courses/course_detail.html
karmaworld/templates/notes/note_detail.html

index f539f02e0665bb8fd0e03466bfdd273b1fc2b2f9..43a9a078fe4002ac642841a564dac0201e1f3cfe 100644 (file)
         <div id="course_actions" class="large-3 medium-6 small-12 columns small-centered">
           <div class="row">
             <div class="small-12 column center">
-              <a href="#" id="flag-button" {% if already_flagged %} class="hide" {% endif %}><img src="{{ STATIC_URL }}img/note_flag.png" alt="note_flag" width="25" height="35"/></a>
-              <a href="#" id="flag-button-disabled" {% if not already_flagged %} class="hide" {% endif %}><img src="{{ STATIC_URL }}img/note_flag_disabled.png" alt="note_flag" width="25" height="35"/></a>
+              {% if user.is_authenticated %}
+                {% if already_flagged %}
+                  <img src="{{ STATIC_URL }}img/note_flag_disabled.png"
+                       alt="course_flag"
+                       width="25" height="35"
+                       data-ot="You've already flagged this course"
+                       {% include 'partial/opentip_settings.html' %}
+                       class="opentip" />
+                {% else %}
+                  <a href="#" id="flag-button">
+                    <img src="{{ STATIC_URL }}img/note_flag.png" alt="course_flag" width="25" height="35" />
+                  </a>
+                {% endif %}
+              {% else %}
+                <img src="{{ STATIC_URL }}img/note_flag_disabled.png"
+                     alt="course_flag"
+                     width="25" height="35"
+                     data-ot="You need to log in to flag a course"
+                     {% include 'partial/opentip_settings.html' %}
+                     class="opentip" />
+              {% endif %}
+              <a href="#" id="flag-button-disabled" class="hide">
+                <img src="{{ STATIC_URL }}img/note_flag_disabled.png" alt="course_flag" width="25" height="35" />
+              </a>
             </div>
           </div>
         </div><!-- /note_actions -->
index a1cdff8c7e2f70449ec16293bfcfeb12461d98dd..83c7becea32655fa986638c33e1504e7b0e5905d 100644 (file)
@@ -70,6 +70,9 @@
                     <img src="{{ STATIC_URL }}img/note_flag.png" alt="note_flag" width="25" height="35" />
                   </a>
                 {% endif %}
+                <a href="#" id="flag-button-disabled" class="hide">
+                  <img src="{{ STATIC_URL }}img/note_flag_disabled.png" alt="note_flag" width="25" height="35" />
+                </a>
               </div>
               <div class="small-4 column">
                 {% if already_thanked %}
@@ -84,6 +87,9 @@
                     <img src="{{ STATIC_URL }}img/note_thank.png" alt="note_thank" width="34" height="34"/>
                   </a>
                 {% endif %}
+                <a href="#" id="thank-button-disabled" class="hide">
+                  <img src="{{ STATIC_URL }}img/note_thank_disabled.png" alt="note_thank" width="34" height="34"/>
+                </a>
               </div>
               <div class="small-4 column">
                 <a id="note-download-button" href="{{ note.fp_file }}">