diff --git a/src/api/app/views/webui/comment/_new.html.haml b/src/api/app/views/webui/comment/_new.html.haml index 700d21f165a..46a780867ea 100644 --- a/src/api/app/views/webui/comment/_new.html.haml +++ b/src/api/app/views/webui/comment/_new.html.haml @@ -1,4 +1,11 @@ -- unless User.current.is_nobody? +- if User.current.is_nobody? + %h3 + Login required, please + = link_to('login', session_new_url) + or + = link_to('signup', user_register_user_url) + in order to comment +- else = form_for @comment, method: :post, remote: true do |f| = hidden_field_tag :commentable_type, commentable.class = hidden_field_tag :commentable_id, commentable.id diff --git a/src/api/app/views/webui2/webui/comment/_new.html.haml b/src/api/app/views/webui2/webui/comment/_new.html.haml index 1920b597727..18c4d3fb057 100644 --- a/src/api/app/views/webui2/webui/comment/_new.html.haml +++ b/src/api/app/views/webui2/webui/comment/_new.html.haml @@ -1,4 +1,11 @@ -- unless User.current.is_nobody? +- if User.current.is_nobody? + .alert.alert-warning{ role: 'alert' } + Login required, please + = link_to('login', session_new_url) + or + = link_to('signup', user_register_user_url) + in order to comment +- else = form_for @comment, action: 'webui2_create', method: :post, remote: true do |f| = hidden_field_tag :commentable_type, commentable.class = hidden_field_tag :commentable_id, commentable.id