Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make 'sign in' links point to landing page.

  • Loading branch information...
commit dcfd2993eab7175ce93c6690b05bfd74a9b82102 1 parent 90f3801
@mpereira mpereira authored
View
12 app/views/questions/_answer_with_form.html.haml
@@ -32,7 +32,13 @@
-# Image upload prompt; hidden by default
= render :partial => "shared/image_prompt", :locals => { :entry_type => "answer" }
- else
- - if not logged_in?
- %p= t("answers.form.not_logged", :link => new_user_session_path)
+ - if logged_in?
+ = render :partial => "questions/already_answered",
+ :locals => { :answer => Answer.first(:question_id => @question.id,
+ :user_id => current_user.id) }
- else
- = render :partial => "questions/already_answered", :locals => { :answer => Answer.first(:question_id => @question.id, :user_id => current_user.id) }
+ %p= t(:not_logged,
+ :scope => [:answers, :form],
+ :link => link_to(t(:sign_in, :scope => [:answers, :form]),
+ root_path(:return_to => request.path,
+ :group_invitation => session[:group_invitation])))
View
9 app/views/shared/_other_actions.html.haml
@@ -14,9 +14,6 @@
= link_to t("layouts.application.logout"), destroy_user_session_path
- else
.log-in
- - if session[:group_invitation]
- = link_to t("layouts.application.log_in"),
- new_user_path(:group_invitation => session[:group_invitation])
- - else
- = link_to t("layouts.application.log_in"),
- root_path(:focus => "signup", :return_to => request.url)
+ = link_to(t(:log_in, :scope => [:layouts, :application]),
+ root_path(:return_to => request.path,
+ :group_invitation => session[:group_invitation]))
View
3  config/locales/answers/en.yml
@@ -28,7 +28,8 @@ en:
answer_label: Answer the question
comment_label: Comment on this answer
comment_submit: Comment
- not_logged: Please <a href="%{link}">sign in</a> to answer question.
+ not_logged: Please %{link} to answer question.
+ sign_in: sign in
submit: Answer
revert:
title: Revert answer
View
3  config/locales/answers/pt-BR.yml
@@ -23,7 +23,8 @@ pt-BR:
answer_label: "Responder à pergunta"
comment_label: Comentar nesta resposta
comment_submit: Comentar
- not_logged: "É necessário <a href=\"%{link}\">se identificar</a> para responder à pergunta."
+ not_logged: "É necessário %{link} para responder à pergunta."
+ sign_in: se identificar
submit: Responder
revert:
title: Reverter resposta
Please sign in to comment.
Something went wrong with that request. Please try again.