Commits

Dimitris Glezos  committed a96c875

Show rich tooltip for locking icons.

  • Participants
  • Parent commits facc688

Comments (0)

Files changed (1)

File transifex/translations/templates/pofile_lock.html

 {% if pofile.locked %}
   {% ifequal request.user.username owner.username %}
     <form action="{{ toggle_lock_url }}" method="POST" class="microform">
-        <input title="{% trans "Unlock this file when you're finished working with it." %}" class="i16 lock_break nodecoration_icon image_submit_type" value="" type="image">
+        <input id="po-{{pofile.id}}" class="i16 lock_break nodecoration_icon image_submit_type" value="" type="image">
     </form>
     <span class="stat_message">(you)</span>
+    <script type="text/javascript">
+      tooltip("#po-{{pofile.id}}",
+              "{% trans 'Unlock this file when you are finished working with it.' %}<br /><span class=\"i16 actionlog\">Date locked:</span> {{pofile.locks.get.created|date:"d M Y H:i:s"}}");
+    </script>
   {% else %}
-    <span class="i16 lock nodecoration_icon" title="{% trans "This file is locked, indicating someone is working with it." %}" href="{{ toggle_lock_url }}"></span>
-    <span class="stat_message">({{ owner }})</span>
+    <span id="po-{{pofile.id}}" class="i16 lock nodecoration_icon" href="{{ toggle_lock_url }}"></span>
+    <script type="text/javascript">
+      tooltip("#po-{{pofile.id}}",
+              "{% blocktrans %}User '{{ owner }}' has locked this file indicating he's working on it.{% endblocktrans %}<br /><span class=\"i16 actionlog\">Date locked:</span> {{pofile.locks.get.created|date:"d M Y H:i:s"}}");
+    </script>
   {% endifequal %}
 {% else %}
   {% if perms.translations.add_pofilelock or is_maintainer %}