changeset 1678:aa6a1c6f2ac5 beta

remove inline comments forms for anonymous users
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 13 Nov 2011 16:38:34 +0200
parents 7276b170ce8b
children c3d9cd8c0cba
files rhodecode/templates/changeset/changeset_file_comment.html
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/templates/changeset/changeset_file_comment.html	Sun Nov 13 02:16:12 2011 +0200
+++ b/rhodecode/templates/changeset/changeset_file_comment.html	Sun Nov 13 16:38:34 2011 +0200
@@ -35,6 +35,7 @@
 <%def name="comment_inline_form()">
 <div id='comment-inline-form-template' style="display:none">
   <div class="comment-inline-form">
+  %if c.rhodecode_user.username != 'default':
       ${h.form(h.url('changeset_comment', repo_name=c.repo_name, revision=c.changeset.raw_id))}
       <div class="clearfix">
           <div class="comment-help">${_('Commenting on line')} {1} ${_('comments parsed using RST syntax')}</div>
@@ -47,6 +48,18 @@
       ${h.reset('hide-inline-form', _('Hide'), class_='ui-button-small hide-inline-form')}
       </div>
       ${h.end_form()}
+  %else:
+      ${h.form('')}
+      <div class="clearfix">
+          <div class="comment-help">
+            ${'You need to be logged in to comment.'} <a href="${h.url('login_home',came_from=h.url.current())}">${_('Login now')}</a>
+          </div>
+      </div>
+      <div class="comment-button">
+      ${h.reset('hide-inline-form', _('Hide'), class_='ui-button-small hide-inline-form')}
+      </div>
+      ${h.end_form()}  
+  %endif      
   </div>
 </div>  
 </%def>
\ No newline at end of file