From 948ec58248e863369d4c9bcd14f40676f601a668 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Fri, 17 Jun 2016 17:18:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E4=BA=8C=E7=BA=A7=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D=E6=9C=AA=E7=99=BB=E5=BD=95=E6=98=BE=E7=A4=BA=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_reply_to.html.erb | 40 +++++++++---------- app/views/users/_show_unlogged_reply.html.erb | 4 ++ public/stylesheets/courses.css | 1 + public/stylesheets/new_user.css | 1 + 4 files changed, 26 insertions(+), 20 deletions(-) create mode 100644 app/views/users/_show_unlogged_reply.html.erb diff --git a/app/views/users/_reply_to.html.erb b/app/views/users/_reply_to.html.erb index 23090265c..a7034ffc7 100644 --- a/app/views/users/_reply_to.html.erb +++ b/app/views/users/_reply_to.html.erb @@ -1,23 +1,23 @@ -
-
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %>
-
- <% if User.current.logged? %> -
- <%= form_for('new_form',:url => {:controller => 'words', :action => 'reply_to_homework', :id => reply.id},:method => "post", :remote => true) do |f| %> - > - > - > - -
- - -
-

- <% end%> -
- <% else %> - <%= render :partial => "users/show_unlogged" %> - <% end %> +
+ <% if User.current.logged? %> +
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %>
+
+
+ <%= form_for('new_form',:url => {:controller => 'words', :action => 'reply_to_homework', :id => reply.id},:method => "post", :remote => true) do |f| %> + > + > + > + +
+ + +
+

+ <% end%> +
+ <% else %> + <%= render :partial => "users/show_unlogged_reply" %> + <% end %>
diff --git a/app/views/users/_show_unlogged_reply.html.erb b/app/views/users/_show_unlogged_reply.html.erb new file mode 100644 index 000000000..b428fd249 --- /dev/null +++ b/app/views/users/_show_unlogged_reply.html.erb @@ -0,0 +1,4 @@ +
+ 登录后可添加回复 + <%#= link_to "登录", signin_path, :class => "linkBlue", :target => "_blank" %> +
\ No newline at end of file diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 785fb2ba3..393903177 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -1372,6 +1372,7 @@ a:hover.comment_ding_link{ color:#269ac9;} .comment_content{ color:#333;} .t_txt{ margin-top:10px;} .orig_reply_box{border-top:1px solid #e3e3e3; width:95%; padding:15px 0px 15px 25px;} +.orig_reply_box2{border-top:1px solid #e3e3e3; width:95%; padding:10px 25px 10px 0;} .orig_textarea{width:90%; margin-bottom:10px;} .orig_sub{ float:right; background-color:#269ac9; color:#fff; height:25px; line-height:25px; text-align:center; width:80px; border:none;} .orig_sub:hover{ background:#297fb8;} diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index dcd275d92..5fc6110fd 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -1553,6 +1553,7 @@ a:hover.comment_ding_link{ color:#269ac9;} .comment_content{ color:#333;} .t_txt{ margin-top:10px;} .orig_reply_box{border-top:1px solid #e3e3e3; width:95%; padding:15px 0px 15px 25px;} +.orig_reply_box2{border-top:1px solid #e3e3e3; width:95%; padding:10px 25px 10px 0;} .orig_textarea{width:90%; margin-bottom:10px;} .orig_sub{ float:right; background-color:#269ac9; color:#fff; height:25px; line-height:25px; text-align:center; width:80px; border:none;} .orig_sub:hover{ background:#297fb8;}