]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/node/comments.html
Improving the canned comments feature, now we can use Django style template syntax...
[osqa.git] / forum / skins / default / templates / node / comments.html
index f67e079e93512639c901f6dfae3be1379b8cebc5..41a97aa822e77d88d1296ede2eb213e4467ced8c 100644 (file)
             <div class="clear"></div>\r
             {% if user.can_use_canned_comments %}\r
             <div class="canned_comment">\r
-                <a href="{% url canned_comments post.id %}" class="ajax-command withprompt">{% trans "Use canned comment" %}</a>\r
+                <span id="post-{{ post.id }}-menu" class="context-menu">\r
+                    <span id="post-{{ post.id }}-menu-trigger" class="action-link context-menu-trigger">{% trans "Use canned comment" %}</span>\r
+                    <ul id="post-{{ post.id }}-menu-dropdown" class="context-menu-dropdown" style="width: 275px;">\r
+                        {% for canned_comment in canned_comments %}\r
+                        <li class="item">\r
+                            <a style="white-space: pre-wrap;" href="javascript:void(0);" onclick="canned_comment({{ post.id }}, jQuery(this).text())">{{ canned_comment }}</a>\r
+                        </li>\r
+                        {% endfor %}\r
+                    </ul>\r
+                </span>\r
             </div>\r
             {% endif %}\r
         </div>\r