Merge branch 'master' into 208-edit-course-properties-main
authorJacob Hilker <hilker.j@gmail.com>
Sun, 2 Feb 2014 20:20:33 +0000 (15:20 -0500)
committerJacob Hilker <hilker.j@gmail.com>
Sun, 2 Feb 2014 20:20:33 +0000 (15:20 -0500)
Conflicts:
karmaworld/templates/courses/course_detail.html

1  2 
karmaworld/settings/common.py
karmaworld/templates/courses/course_detail.html

Simple merge
index 283b57e8bf9f16dab1ebf07caa3f0230ec09cd84,43a9a078fe4002ac642841a564dac0201e1f3cfe..3a5ab7b763fcb66299887ce05b96efc0daceb49c
          <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="edit-button"><img src="{{ STATIC_URL }}img/edit.png" alt="edit_flag" width="25" height="35"/></a>
-               <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 %}
++                <a href="#" id="edit-button"><img src="{{ STATIC_URL }}img/edit.png" alt="edit_flag" width="25" height="35"/></a>
+                 {% 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 -->
 +        </div><!-- /course_actions -->
        </div>
      </div><!-- /course_header -->