Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

integrated Setting.registerable to _need_login_to_reply.erb

  • Loading branch information...
commit 3ea2a2e3e38fddfd5584ae74cdeba5e56ebf2612 1 parent f3daf53
@HungYuHei HungYuHei authored
View
9 app/views/topics/translation/_need_login_to_reply.zh-CN.html.erb
@@ -1,5 +1,10 @@
<div id="reply" class="form box">
<div style="padding:20px;">
- 需要 <%= link_to(t("common.login"), "/account/sign_in", :class => "btn primary")%> 后回复方可回复, 如果你还没有账号你可以 <%= link_to("#{t("common.register")}", "/account/sign_up", :class => "btn danger")%> 一个帐号。
+ 需要<%= link_to_if(Setting.registerable, t("common.login"), "/account/sign_in", :class => "btn primary")%>后方可回复, 如果你还没有账号你可以
+ <%= link_to_if(Setting.registerable, "注册一个帐号", "/account/sign_up", :class => "btn danger") do %>
+ <%= link_to(t("common.weibo_login"), user_omniauth_authorize_path(:weibo), :class => "btn danger") %>
+ 或者
+ <%= link_to(t("common.douban_login"), user_omniauth_authorize_path(:douban), :class => "btn danger") %>
+ <% end %>
</div>
-</div>
+</div>
View
9 app/views/topics/translation/_need_login_to_reply.zh-TW.html.erb
@@ -1,5 +1,10 @@
<div id="reply" class="form box">
<div style="padding:20px;">
- 需要 <%= link_to(t("common.login"), "/account/sign_in", :class => "btn primary")%> 後方可回應,如果你還沒有帳號按這裡 <%= link_to("#{t("common.register")}", "/account/sign_up", :class => "btn danger")%>
+ 需要<%= link_to_if(Setting.registerable, t("common.login"), "/account/sign_in", :class => "btn primary")%>後方可回應,如果你還沒有帳號按這裡
+ <%= link_to_if(Setting.registerable, "注册一個帳號", "/account/sign_up", :class => "btn danger") do %>
+ <%= link_to(t("common.weibo_login"), user_omniauth_authorize_path(:weibo), :class => "btn danger") %>
+ 或者
+ <%= link_to(t("common.douban_login"), user_omniauth_authorize_path(:douban), :class => "btn danger") %>
+ <% end %>
</div>
-</div>
+</div>
Please sign in to comment.
Something went wrong with that request. Please try again.