From 4eeb6f1fcc552d414fa570324135197b0f6106ab Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 12 Apr 2019 11:35:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E7=9A=84=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=8F=8D=E9=A6=88=E5=A2=9E=E5=8A=A0=E2=80=9C=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=BD=91=E5=9D=80=E2=80=9D=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E5=85=A5=E5=8F=A3=EF=BC=8C=E4=B8=94=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/account_controller.rb | 3 +- app/views/account/_suggest_show.html.erb | 141 +++++++++++++---------- app/views/account/help.html.erb | 2 +- app/views/users/_returnTop_btn.html.erb | 2 +- 4 files changed, 82 insertions(+), 66 deletions(-) diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 7258b076..d58b9bdf 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -141,6 +141,7 @@ class AccountController < ApplicationController @resubmit = "#{code}" @agreement = Help.first @cooperation = Cooperation.all + @url = params[:url] @com_coop_img = CooImg.where(:img_type => 'com_coop').order("position asc") @edu_coop_img = CooImg.where(:img_type => 'edu_coop').order("position asc") @@ -208,7 +209,7 @@ class AccountController < ApplicationController end def insert_suggest - content = "

[#{params[:question_kind]}]

" + params[:description] + content = "

[#{params[:question_kind]}]

" + "

问题页面网址:#{params[:url]}

" + params[:description] PrivateMessage.create(:user_id => User.current.id, :target_id => 1, :sender_id => User.current.id, :receiver_id => 1, :content => content, :send_time => Time.now, :status => 1) PrivateMessage.create(:user_id => 1, :target_id => User.current.id, :sender_id => User.current.id, :receiver_id => 1, :content => content, :send_time => Time.now, :status => 0) redirect_to message_detail_user_path(User.current, :user_id => 1) diff --git a/app/views/account/_suggest_show.html.erb b/app/views/account/_suggest_show.html.erb index 9279d45a..e1891d13 100644 --- a/app/views/account/_suggest_show.html.erb +++ b/app/views/account/_suggest_show.html.erb @@ -1,6 +1,6 @@ <%= stylesheet_link_tag 'css/public','css/common'%> <%= content_for(:header_tags) do %> - <%= import_ke(enable_at: false, prettify: false, init_activity: false) %> + <%= import_ke(enable_at: false, prettify: false, init_activity: false) %> <% end %>
@@ -15,79 +15,94 @@ - <%= form_for('new_form',:url => insert_suggest_path(), :html =>{:id => "insert_suggest"}, :method => :post) do |f| %> -
- *问题分类 -
- - - - - - -
-
-
- *问题描述 -
- - -
-

内容不能为空

- - - - - - - 提交 - <% end %> + +
+

内容不能为空

+ + + + + + + 提交
+ <% end %>