comparison rhodecode/templates/changeset/changeset_file_comment.html @ 2368:5143b8df576c beta

Added mentions autocomplete into main comments form - recompiled yui.2.9.js using google compiler
author Marcin Kuzminski <marcin@python-works.com>
date Fri, 01 Jun 2012 18:34:32 +0200
parents 83e4447077d3
children c2f131502037
comparison
equal deleted inserted replaced
2367:86aa4f1f130b 2368:5143b8df576c
36 ${h.form(h.url('changeset_comment', repo_name=c.repo_name, revision=changeset.raw_id),class_='inline-form')} 36 ${h.form(h.url('changeset_comment', repo_name=c.repo_name, revision=changeset.raw_id),class_='inline-form')}
37 <div class="clearfix"> 37 <div class="clearfix">
38 <div class="comment-help">${_('Commenting on line {1}.')} 38 <div class="comment-help">${_('Commenting on line {1}.')}
39 ${(_('Comments parsed using %s syntax with %s support.') % (('<a href="%s">RST</a>' % h.url('rst_help')), 39 ${(_('Comments parsed using %s syntax with %s support.') % (('<a href="%s">RST</a>' % h.url('rst_help')),
40 '<span style="color:#003367" class="tooltip" title="%s">@mention</span>' % 40 '<span style="color:#003367" class="tooltip" title="%s">@mention</span>' %
41 _('Use @username inside this text to send notification to this RhodeCode user')))|n}</div> 41 _('Use @username inside this text to send notification to this RhodeCode user')))|n}
42 <textarea id="text_{1}" name="text"></textarea> 42 </div>
43 <div class="mentions-container" id="mentions_container_{1}"></div>
44 <textarea id="text_{1}" name="text" class="yui-ac-input"></textarea>
43 </div> 45 </div>
44 <div class="comment-button"> 46 <div class="comment-button">
45 <input type="hidden" name="f_path" value="{0}"> 47 <input type="hidden" name="f_path" value="{0}">
46 <input type="hidden" name="line" value="{1}"> 48 <input type="hidden" name="line" value="{1}">
47 ${h.submit('save', _('Comment'), class_='ui-btn save-inline-form')} 49 ${h.submit('save', _('Comment'), class_='ui-btn save-inline-form')}
90 <div id="comment-tr-${co.comment_id}"> 92 <div id="comment-tr-${co.comment_id}">
91 ${comment_block(co)} 93 ${comment_block(co)}
92 </div> 94 </div>
93 %endfor 95 %endfor
94 %if c.rhodecode_user.username != 'default': 96 %if c.rhodecode_user.username != 'default':
95 <div class="comment-form"> 97 <div class="comment-form ac">
96 ${h.form(h.url('changeset_comment', repo_name=c.repo_name, revision=changeset.raw_id))} 98 ${h.form(h.url('changeset_comment', repo_name=c.repo_name, revision=changeset.raw_id))}
97 <strong>${_('Leave a comment')}</strong> 99 <strong>${_('Leave a comment')}</strong>
98 <div class="clearfix"> 100 <div class="clearfix">
99 <div class="comment-help"> 101 <div class="comment-help">
100 ${(_('Comments parsed using %s syntax with %s support.') % (('<a href="%s">RST</a>' % h.url('rst_help')), 102 ${(_('Comments parsed using %s syntax with %s support.') % (('<a href="%s">RST</a>' % h.url('rst_help')),
101 '<span style="color:#003367" class="tooltip" title="%s">@mention</span>' % 103 '<span style="color:#003367" class="tooltip" title="%s">@mention</span>' %
102 _('Use @username inside this text to send notification to this RhodeCode user')))|n} 104 _('Use @username inside this text to send notification to this RhodeCode user')))|n}
103 </div> 105 </div>
106 <div class="mentions-container" id="mentions_container"></div>
104 ${h.textarea('text')} 107 ${h.textarea('text')}
105 </div> 108 </div>
106 <div class="comment-button"> 109 <div class="comment-button">
107 ${h.submit('save', _('Comment'), class_='ui-button')} 110 ${h.submit('save', _('Comment'), class_='ui-button')}
108 </div> 111 </div>
109 ${h.end_form()} 112 ${h.end_form()}
110 </div> 113 </div>
111 %endif 114 %endif
112 </div> 115 </div>
116 <script>
117 YUE.onDOMReady(function () {
118
119 MentionsAutoComplete(
120 'text',
121 'mentions_container',
122 ${c.users_array|n},
123 ${c.users_groups_array|n},
124 "${_('Group')}",
125 "${_('members')}"
126 );
127 });
128 </script>
113 </%def> 129 </%def>