From b68e227531bd4adcfeb834ea08dea3cb06276b83 Mon Sep 17 00:00:00 2001
From: yuanke <249218296@qq.com>
Date: Wed, 22 Jun 2016 14:04:47 +0800
Subject: [PATCH 1/8] =?UTF-8?q?=E6=B2=A1=E6=BF=80=E6=B4=BB=E7=9A=84?=
=?UTF-8?q?=E5=B8=90=E5=8F=B7=E7=95=8C=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/account_controller.rb | 15 +-
app/controllers/users_controller.rb | 6 +
app/controllers/words_controller.rb | 20 +++
app/views/account/email_activation.html.erb | 52 ++++++
config/routes.rb | 5 +-
public/stylesheets/header.css | 176 ++++++++++++++++++++
6 files changed, 270 insertions(+), 4 deletions(-)
create mode 100644 app/views/account/email_activation.html.erb
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb
index 33d988e35..8bf40d472 100644
--- a/app/controllers/account_controller.rb
+++ b/app/controllers/account_controller.rb
@@ -239,14 +239,21 @@ class AccountController < ApplicationController
end
def resendmail
+ status = 1
user = User.find(params[:user]) if params[:user]
token = Token.new(:user => user, :action => "register")
if token.save
Mailer.run.register(token)
-
else
yield if block_given?
+ status = 0
end
+ render :json => status
+ end
+
+ def email_activation
+
+
end
private
@@ -264,6 +271,7 @@ class AccountController < ApplicationController
if user.nil?
invalid_credentials
elsif user.status == 2
+ @user = user
invalid_credentials_new
elsif user.new_record?
onthefly_creation_failed(user, {:login => user.login, :auth_source_id => user.auth_source_id })
@@ -375,8 +383,9 @@ class AccountController < ApplicationController
def invalid_credentials_new
logger.warn "Failed login for '#{params[:username]}' from #{request.remote_ip} at #{Time.now.utc}"
- flash[:error] = l(:notice_account_invalid_creditentials_new)
- render signin_path(:login=>true)
+ # flash[:error] = l(:notice_account_invalid_creditentials_new)
+ # render signin_path(:login=>true)
+ render :action => 'email_activation'
end
# Register a user for email activation.
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 87c7d8f54..ed8a9fa36 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -1239,6 +1239,12 @@ class UsersController < ApplicationController
render :layout=>'new_base_user'
end
+ #给某人留言
+ def feedBackTo
+
+
+ end
+
def user_comments
end
diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb
index 22b7f1f52..3b540f0d0 100644
--- a/app/controllers/words_controller.rb
+++ b/app/controllers/words_controller.rb
@@ -337,6 +337,26 @@ class WordsController < ApplicationController
UserExtensions.introduction(user, message)
redirect_to user_url(user.id)
end
+
+ #邮箱激活问题留言 留言成功给出提示框
+ def leave_email_activation_message
+ status = 1 #成功
+ me = User.find(params[:user])
+ if me
+ @user = User.find(params[:id])
+ if params[:text].size>0 && @user
+ # @user.add_jour(me, params[:text])
+ #私信
+ message = "【未收到激活邮件的用户反馈,用户邮箱:"+me.mail+"】
"+params[:text]
+ @user.journals_for_messages << JournalsForMessage.new(:user_id => me.id, :notes => message, :reply_id => 0, :status => true, :is_readed => false, :private => 1)
+ else
+ status = 0
+ end
+ render :json => status
+ else
+ render_403
+ end
+ end
private
diff --git a/app/views/account/email_activation.html.erb b/app/views/account/email_activation.html.erb
new file mode 100644
index 000000000..abd010a96
--- /dev/null
+++ b/app/views/account/email_activation.html.erb
@@ -0,0 +1,52 @@
+
+
+
您的账号尚未激活,请先进入您的注册邮箱,激活您的账号。
+
+ <%#= link_to l(:label_mail_resend), { :controller => 'account', :action => 'resendmail',:user => @user}, :class=>"email_verify_btn mt30 ml30", :remote => true, :method => 'get' %>
+
+ 如果您尚未收到激活邮件,请按照以下步骤操作:
+ - 检查邮箱的“订阅邮件”、“垃圾邮件”,可能会发现激活邮件。
+ - 如果激活邮件已无效,请点击重新发送激活邮件按钮。
+ - 如果您无法收到激活邮件,请您直接给我们管理员留言:
+
+
+
+
+
diff --git a/config/routes.rb b/config/routes.rb
index ec8fa2337..6e720ffba 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -489,10 +489,13 @@ RedmineApp::Application.routes.draw do
match 'account/activate', :via => :get
match 'account/valid_ajax', :via => :get
match 'account/email_valid', :to => 'account#email_valid', :via => :get
- match 'account/resendmail', :to => 'account#resendmail', :via=> :get
+ match 'account/resendmail', :to => 'account#resendmail', :via=> :get, :as => 'resendmail'
match 'projects/:id/wiki', :to => 'wikis#edit', :via => :post
match 'projects/:id/wiki/destroy', :to => 'wikis#destroy', :via => [:get, :post]
+ #激活邮箱反馈问题
+ match 'users/:id/leave_email_activation_message', :to => 'words#leave_email_activation_message', :via => :get, :as => "leave_email_activation_message"
+
# boards
match 'boards/:board_id/topics/new', :to => 'messages#new', :via => [:get, :post], :as => 'new_board_message'
match 'boards/:id/join_to_org_subfields', :to => 'boards#join_to_org_subfields'
diff --git a/public/stylesheets/header.css b/public/stylesheets/header.css
index 767d76cb2..5700d0b00 100644
--- a/public/stylesheets/header.css
+++ b/public/stylesheets/header.css
@@ -117,3 +117,179 @@ a.f_grey:hover {color:#000000 !important;}
#loginInButton {height:54px; padding-left:10px; padding-right:10px; text-align:center; line-height:54px; vertical-align:middle; color:#ffffff; font-size:16px;}
#loginSignButton:hover {background-color:#297fb8;}
#loginInButton:hover {background-color:#297fb8;}
+
+/* 邮箱验证 */
+.email_verify body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;}
+.mt30{ margin-top:30px;}
+.ml30{ margin-left:30px;}
+.new_content{
+ width:1000px;
+ margin:10px auto;
+ padding:30px 0;
+ background-color:#fff;
+}
+.email_verify{
+ width:720px;
+ margin:0px auto;
+}
+.email_verify_prompt{
+ border:2px solid #dd0000;
+ background:#ffe3e3 url(../images/icons_prompt.png) 25px 10px no-repeat;;
+ height:35px;
+ line-height:35px;
+ padding-left:45px;
+ color:#8b0000;
+ font-size:14px;
+}
+.email_verify_btn{
+ border-style:none;
+ height:35px;
+ padding:0 15px;
+ line-height:35px;
+ color:#fff;
+ background:#3a95d7;
+ text-align:center;
+ -webkit-border-radius:5px;
+ -moz-border-radius:5px;
+ -o-border-radius:5px;
+ border-radius:5px;
+ font-size:14px;
+}
+.email_verify_btn:hover{
+ background:#017bd3;
+}
+.email_sub_btn{
+ border-style:none;
+ height:30px;
+ padding:0 25px;
+ line-height:30px;
+ color:#fff;
+ background:#3a95d7;
+ text-align:center;
+ -webkit-border-radius:5px;
+ -moz-border-radius:5px;
+ -o-border-radius:5px;
+ border-radius:5px;
+ font-size:14px;
+}
+.email_sub_btn:hover{
+ background:#017bd3;
+}
+.email_prompt_p{
+ font-size:14px;
+ color:#000;
+ margin-bottom:10px;
+}
+.email_prompt_txt{ width:480px;}
+.email_prompt_txt li{
+ margin-left:15px;
+ list-style-type: disc;
+ color:#777;
+ line-height:1.9;
+ font-size:14px;
+}
+.email_prompt_mes{
+ border:1px solid #ccc;
+ -webkit-border-radius:5px;
+ -moz-border-radius:5px;
+ -o-border-radius:5px;
+ border-radius:5px;
+ width:468px;
+ height:60px;
+ background:#fff;
+ padding:5px;
+ margin-bottom: 5px;
+}
+.email_tanbox{
+ border:2px solid #3a95d7;
+ background:#fff;
+ width:480px;
+
+}
+.email_tancon{
+ width:420px;
+ margin:0 auto;
+ text-align:center;
+ padding:20px 30px;
+ background:#fff;
+}
+.email_tan_title{
+ font-size:18px;
+ color:#3a95d7;
+ font-weight:normal;
+ margin-bottom:5px;
+}
+.email_tan_p{
+ font-size:14px;
+ color:#4c4c4c;
+
+}
+.email_verify_p{
+ font-size:14px;
+ color:#3a95d7;
+}
+
+/***** Ajax indicator ******/
+/*-------resendmail---------*/
+#ajax-indicator {
+ position: absolute; /* fixed not supported by IE */
+ background-color:#eee;
+ border: 1px solid #bbb;
+ top:35%;
+ left:40%;
+ width:20%;
+ font-weight:bold;
+ text-align:center;
+ padding:0.6em;
+ z-index:100000;
+ opacity: 0.5;
+}
+
+html>body #ajax-indicator { position: fixed; }
+
+#ajax-indicator span {
+ background-position: 0% 40%;
+ background-repeat: no-repeat;
+ background-image: url(../images/loading.gif);
+ padding-left: 26px;
+ vertical-align: bottom;
+}
+
+div.modal {
+ border-radius: 5px;
+ background: #fff;
+ z-index: 50;
+ padding: 4px;
+}
+.ui-widget-content {
+ border: 1px solid #ddd;
+ color: #333;
+}
+.ui-widget {
+ font-family: Verdana, sans-serif;
+ font-size: 1.1em;
+}
+.ui-dialog .ui-dialog-content {
+ position: relative;
+ border: 0;
+ padding: .5em 1em;
+ background: none;
+ overflow: auto;
+ zoom: 1;
+}
+.ui-widget-overlay {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+}
+.ui-widget-overlay {
+ background: #666 url(http://forge.trustie.net/stylesheets/jquery/images/xui-bg_diagonals-thick_20_666666_40x40.png.pagespeed.ic.9mfuw_R0z1.png) 50% 50% repeat;
+ opacity: .5;
+ filter: Alpha(Opacity=50);
+}
+.resourceUploadPopup {width:400px; height:auto; border:3px solid #269ac9 !important; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-200px; z-index:1000;}
+a.Blue-btn{ display:block; margin-right:15px;width:65px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
+a:hover.Blue-btn{ background:#3598db; color:#fff;}
+/***** end Ajax indicator ******/
\ No newline at end of file
From 9461c41fa72bd1aadd835cc47903cab985bad9f2 Mon Sep 17 00:00:00 2001
From: yuanke <249218296@qq.com>
Date: Wed, 22 Jun 2016 14:14:36 +0800
Subject: [PATCH 2/8] =?UTF-8?q?=E6=BF=80=E6=B4=BB=E7=95=99=E8=A8=80?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/words_controller.rb | 3 ++-
app/views/account/email_activation.html.erb | 6 +++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb
index 3b540f0d0..1bbbb1190 100644
--- a/app/controllers/words_controller.rb
+++ b/app/controllers/words_controller.rb
@@ -343,7 +343,8 @@ class WordsController < ApplicationController
status = 1 #成功
me = User.find(params[:user])
if me
- @user = User.find(params[:id])
+ #课程使者id=1
+ @user = User.find(1)
if params[:text].size>0 && @user
# @user.add_jour(me, params[:text])
#私信
diff --git a/app/views/account/email_activation.html.erb b/app/views/account/email_activation.html.erb
index abd010a96..d625e7fc9 100644
--- a/app/views/account/email_activation.html.erb
+++ b/app/views/account/email_activation.html.erb
@@ -10,7 +10,7 @@
如果您无法收到激活邮件,请您直接给我们管理员留言:
@@ -29,7 +29,7 @@
}
);
}
- function leave_email_activation_message(url,user,id)
+ function leave_email_activation_message(url,user)
{
if ($(".email_prompt_mes").val().length == 0){
//弹框请他输入文字
@@ -39,7 +39,7 @@
}
$.get(
url,
- {user:user,id: 1,text:$(".email_prompt_mes").val() },
+ {user:user,text:$(".email_prompt_mes").val() },
function (data) {
console.log("2222222");
console.log(data);
From e818b5fb073f4c1ef02b9d321e8a05dee8aa8d3b Mon Sep 17 00:00:00 2001
From: yuanke <249218296@qq.com>
Date: Fri, 24 Jun 2016 11:22:43 +0800
Subject: [PATCH 3/8] =?UTF-8?q?=E6=97=A7=E7=9A=84=E6=B3=A8=E5=86=8C?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=8E=BB=E6=8E=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/account/register.html.erb | 127 ----------------------------
config/routes.rb | 2 +-
2 files changed, 1 insertion(+), 128 deletions(-)
delete mode 100644 app/views/account/register.html.erb
diff --git a/app/views/account/register.html.erb b/app/views/account/register.html.erb
deleted file mode 100644
index 0bebfdf5f..000000000
--- a/app/views/account/register.html.erb
+++ /dev/null
@@ -1,127 +0,0 @@
-<% @nav_dispaly_home_path_label = 1
- @nav_dispaly_main_course_label = 1
- @nav_dispaly_main_project_label = 1
- @nav_dispaly_main_contest_label = 1 %>
-<% @nav_dispaly_forum_label = 1%>
-
-
-
-
-
-
-<%= l(:label_register) %> <%= link_to l(:label_login_with_open_id_option), signin_url if Setting.openid? %>
-
-<%= labelled_form_for @user, :url => register_path do |f| %>
- <%= error_messages_for 'user' %>
-
-
- <% if @user.auth_source_id.nil? %>
-
<%= f.text_field :login, :size => 25, :required => true %>
- <%= l(:label_max_number) %>
-
-
<%= f.password_field :password, :size => 25, :required => true %>
- <%= l(:text_caracters_minimum, :count => Setting.password_min_length) %>
-
-
<%= f.password_field :password_confirmation, :size => 25, :required => true %>
- <% end %>
-
-
- <%= f.text_field :mail,:size => 25, :required => true %>
-
-
-
-
- <%= "#{l(:label_mail_attention)} " %>
- <%= "#{l(:label_mail_attention1)} " %>
-
-
-
-
-
-
-
-
-
-
-
- <%= submit_tag l(:button_submit) %> |
-
-
-
-<% end %>
-<% if Setting.openid? %>
- <%= f.text_field :identity_url %>
-<% end %>
-<% @user.custom_field_values.select { |v| v.editable? || v.required? }.each do |value| %>
- <%= custom_field_tag_with_label :user, value %>
-<% end %>
-
-<% password_min_length = Setting.password_min_length %>
-
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index 6e720ffba..8d822aafc 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -484,7 +484,7 @@ RedmineApp::Application.routes.draw do
match 'logout', :to => 'account#logout', :as => 'signout', :via => [:get, :post]
match 'agreement',:to => 'account#agreement',:as => 'agreement',:via=>[:get]
match 'about_us',:to=>'account#about_us',:as=>'about_us',:via=>[:get]
- match 'account/register', :via => [:get, :post], :as => 'register'
+ match 'account/register',:to=>'account#register', :via => [:get, :post], :as => 'register'
match 'account/lost_password', :via => [:get, :post], :as => 'lost_password'
match 'account/activate', :via => :get
match 'account/valid_ajax', :via => :get
From c24fdee13464843ca86f393f9737ae1df79a1ddb Mon Sep 17 00:00:00 2001
From: Linda <2294690300@qq.com>
Date: Wed, 29 Jun 2016 08:48:13 +0800
Subject: [PATCH 4/8] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E8=B5=84=E6=96=99?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=96=B0=E7=89=88=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Gemfile | 2 +-
app/views/my/account.html.erb | 47 +++++++++++------------------------
2 files changed, 16 insertions(+), 33 deletions(-)
diff --git a/Gemfile b/Gemfile
index d392c6561..a1ea263f5 100644
--- a/Gemfile
+++ b/Gemfile
@@ -6,7 +6,7 @@ unless RUBY_PLATFORM =~ /w32/
gem 'iconv'
end
-gem 'certified'
+# gem 'certified'
gem 'wechat',path: 'lib/wechat'
gem 'grack', path:'lib/grack'
diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb
index 9cca5da5c..f28ad1ca2 100644
--- a/app/views/my/account.html.erb
+++ b/app/views/my/account.html.erb
@@ -15,14 +15,13 @@
<%= error_messages_for 'user',@user.user_extensions %>
<% end %>
- - 登录名 : *
- - 邮箱 : *
- - 身份 : *
- - 姓(Last Name) : *
- - 名(First Name) : *
+ - * 登录名 :
+ - * 邮箱 :
+ - * 职业 :
+ - * 姓名 :
- 组织名 : *
- 性别 :
- - 工作单位 :
+ - 单位名称 :
- 地区 :
- 邮件通知 :
@@ -66,34 +65,18 @@
- <%= f.text_field :lastname,:no_label=>true, :required => true,:nh_required=>"1",:class=>"w210" %>
-
- <%= f.text_field :firstname,:no_label=>true, :required => true,:nh_required=>"1",:class=>"w210" %>
+
- <%= text_field_tag :enterprise_name,@user.firstname,:no_label=>true, :required => true,:nh_required=>"1",:class=>"w210" %>
-
-
+
+
- -
- <% if User.current.user_extensions.nil? %>
-
-
- 平台找到了0个包含"国防"的高校
-
- <% elsif User.current.user_extensions.identity == 3 || User.current.user_extensions.identity == 2 %>
-
-
- 平台找到了0个包含"国防"的高校
-
- <% elsif User.current.user_extensions.school.nil? %>
-
-
- 平台找到了0个包含"国防"的高校
-
- <% else %>
-
-
- 平台找到了0个包含"国防"的高校
-
- <% end %>
+
-
+
+
您输入的名称尚不存在,申请添加
-
@@ -140,13 +123,13 @@
-
<%= select_tag( 'user[mail_notification]', options_for_select( user_mail_notification_options(@user), @user.mail_notification) ) %>
-
+
- <%= f.select :language, :Chinese => :zh, :English => :en %>
-
- 确认
+ 确定
From c151a619800cd63dc62995b5d71496d92abe67bc Mon Sep 17 00:00:00 2001
From: yuanke <249218296@qq.com>
Date: Wed, 29 Jun 2016 09:14:53 +0800
Subject: [PATCH 5/8] =?UTF-8?q?=E6=8A=8A=E5=87=A0=E4=B8=AAgem=E5=8C=85?=
=?UTF-8?q?=E4=BD=8D=E7=BD=AE=E6=94=BE=E4=B8=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Gemfile | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/Gemfile b/Gemfile
index eef93c371..bb94100a5 100644
--- a/Gemfile
+++ b/Gemfile
@@ -9,12 +9,11 @@ unless RUBY_PLATFORM =~ /w32/
gem "rmagick", "= 2.13.1" ## centos yum install ImageMagick-devel
end
gem 'certified'
+ gem 'net-ssh', '2.9.1'
+ gem 'jenkins_api_client'
+ gem 'nokogiri'
end
-gem 'net-ssh', '2.9.1'
-gem 'jenkins_api_client'
-gem 'nokogiri'
-
gem 'wechat',path: 'lib/wechat'
gem 'grack', path:'lib/grack'
gem 'gitlab', path: 'lib/gitlab-cli'
From 397c4cc2a5944625f453b57217537eaf0b5dd08e Mon Sep 17 00:00:00 2001
From: yuanke <249218296@qq.com>
Date: Thu, 30 Jun 2016 16:08:36 +0800
Subject: [PATCH 6/8] =?UTF-8?q?1.=E9=87=8D=E6=96=B0=E5=8F=91=E9=80=81?=
=?UTF-8?q?=E6=B3=A8=E5=86=8C=E9=82=AE=E4=BB=B6=E4=BF=AE=E6=94=B92.?=
=?UTF-8?q?=E4=B8=AA=E4=BA=BA=E8=B5=84=E6=96=99=E4=BF=AE=E6=94=B9=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E4=BF=AE=E6=94=B93.=E9=97=AE=E9=A2=98=E5=8F=8D?=
=?UTF-8?q?=E9=A6=88=E5=A4=84=E5=A2=9E=E5=8A=A0=E7=9B=B4=E6=8E=A5=E5=8A=A0?=
=?UTF-8?q?=E5=85=A5QQ=E7=BE=A4=E7=9A=84=E6=8C=89=E9=92=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/account_controller.rb | 3 +-
app/controllers/my_controller.rb | 6 +-
app/controllers/school_controller.rb | 51 +++
app/models/apply_add_schools.rb | 3 +
app/views/layouts/_new_feedback.html.erb | 6 +-
app/views/mailer/register.html.erb | 4 +
app/views/my/_apply_add_school.html.erb | 337 ++++++++++++++++++
app/views/my/account.html.erb | 106 +++++-
config/routes.rb | 3 +-
...160629030320_add_school_type_to_schools.rb | 5 +
...20160629081520_create_apply_add_schools.rb | 15 +
db/schema.rb | 53 +--
public/images/icons_ziliao.png | Bin 0 -> 20180 bytes
public/stylesheets/new_user.css | 97 ++++-
public/stylesheets/users.css | 2 +-
spec/factories/apply_add_schools.rb | 12 +
spec/models/apply_add_schools_spec.rb | 5 +
17 files changed, 660 insertions(+), 48 deletions(-)
create mode 100644 app/models/apply_add_schools.rb
create mode 100644 app/views/my/_apply_add_school.html.erb
create mode 100644 db/migrate/20160629030320_add_school_type_to_schools.rb
create mode 100644 db/migrate/20160629081520_create_apply_add_schools.rb
create mode 100644 public/images/icons_ziliao.png
create mode 100644 spec/factories/apply_add_schools.rb
create mode 100644 spec/models/apply_add_schools_spec.rb
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb
index 8bf40d472..62b076754 100644
--- a/app/controllers/account_controller.rb
+++ b/app/controllers/account_controller.rb
@@ -243,7 +243,8 @@ class AccountController < ApplicationController
user = User.find(params[:user]) if params[:user]
token = Token.new(:user => user, :action => "register")
if token.save
- Mailer.run.register(token)
+ # Mailer.run.register(token)
+ Mailer.register(token).deliver
else
yield if block_given?
status = 0
diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb
index 0883b3799..32c605516 100644
--- a/app/controllers/my_controller.rb
+++ b/app/controllers/my_controller.rb
@@ -127,12 +127,14 @@ class MyController < ApplicationController
end
@user.safe_attributes = params[:user]
+ @user.lastname = params[:lastname]
+ @user.firstname = ""
@user.pref.attributes = params[:pref]
@user.pref[:no_self_notified] = (params[:no_self_notified] == '1')
#@user.login = params[:login]
unless @user.user_extensions.nil?
if @user.user_extensions.identity == 2
- @user.firstname = params[:enterprise_name]
+ # @user.firstname = params[:enterprise_name]
end
end
@@ -144,7 +146,7 @@ class MyController < ApplicationController
# end
@se.school_id = params[:occupation]
- @se.gender = params[:gender]
+ @se.gender = params[:sex]
@se.location = params[:province] if params[:province]
@se.location_city = params[:city] if params[:city]
@se.identity = params[:identity].to_i if params[:identity]
diff --git a/app/controllers/school_controller.rb b/app/controllers/school_controller.rb
index e0aff6254..44f4378fe 100644
--- a/app/controllers/school_controller.rb
+++ b/app/controllers/school_controller.rb
@@ -150,4 +150,55 @@ class SchoolController < ApplicationController
format.js
end
end
+
+ #申请高校(单位) name:名称 province:省 city:市 address:地址 remarks:备注
+ def apply_add_school
+
+ data = {result:0,name:params[:name],school_id:0}
+ #0 成功 1参数错误 2名称已存在
+ data[:result] = 0
+
+ #检验参数
+ if params[:name] == "" || params[:province] == "" || params[:city] == "" || params[:address] == ""
+ data[:result] = 1
+ else
+ school_id = School.find_by_sql("select id from schools where name='#{params[:name]}'").first
+ if school_id
+ data[:result] = 2
+ else
+ school = School.new
+ school.name = params[:name].strip
+ school.pinyin = Pinyin.t(params[:name].strip, splitter: '')
+ school.save
+
+ #status 0未处理 1通过 2拒绝
+ applyschool = ApplyAddSchools.new
+ applyschool.school_id = school.id
+ applyschool.name = school.name
+ applyschool.province = params[:province]
+ applyschool.city = params[:city]
+ applyschool.address = params[:address]
+ applyschool.remarks = params[:remarks]
+ applyschool.save
+
+ data[:school_id] = school.id
+ end
+ end
+ render :json =>data
+ end
+
+ def search_repeat_schoolname
+ status = 0
+ name = params[:name]
+
+ if name
+ school_id = School.find_by_sql("select id from schools where name='#{name}'").first
+
+ if school_id
+ status = 1
+ end
+ end
+
+ render :json =>status
+ end
end
diff --git a/app/models/apply_add_schools.rb b/app/models/apply_add_schools.rb
new file mode 100644
index 000000000..2082c0012
--- /dev/null
+++ b/app/models/apply_add_schools.rb
@@ -0,0 +1,3 @@
+class ApplyAddSchools < ActiveRecord::Base
+ attr_accessible :address, :city, :name, :province, :remarks, :school_id, :status
+end
diff --git a/app/views/layouts/_new_feedback.html.erb b/app/views/layouts/_new_feedback.html.erb
index ffec82bce..e2e935f57 100644
--- a/app/views/layouts/_new_feedback.html.erb
+++ b/app/views/layouts/_new_feedback.html.erb
@@ -16,7 +16,7 @@
<%= f.text_area :subject, :id=>"subject", :class => "opnionText", :placeholder => l(:label_feedback_tips) %>
<%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %>
-
+
<%= l(:label_submit)%>
<% end %>
@@ -25,7 +25,9 @@
<%#= l(:label_technical_support) %>
- 请加入师姐师兄答疑群
QQ群号:173184401
+
+
+
diff --git a/app/views/mailer/register.html.erb b/app/views/mailer/register.html.erb
index 282deca90..5b4e8262b 100644
--- a/app/views/mailer/register.html.erb
+++ b/app/views/mailer/register.html.erb
@@ -1,2 +1,6 @@
<%= l(:mail_body_register) %>
<%= link_to h(@url), @url %>
+如果点击链接无效请复制该链接到浏览器中打开
+
+感谢您的使用!
+Trustie团队
diff --git a/app/views/my/_apply_add_school.html.erb b/app/views/my/_apply_add_school.html.erb
new file mode 100644
index 000000000..1449fa1f1
--- /dev/null
+++ b/app/views/my/_apply_add_school.html.erb
@@ -0,0 +1,337 @@
+添加新的高校(单位)
+
+
+
+
diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb
index f28ad1ca2..589541c39 100644
--- a/app/views/my/account.html.erb
+++ b/app/views/my/account.html.erb
@@ -20,8 +20,8 @@
- * 职业 :
- * 姓名 :
- 组织名 : *
- - 性别 :
- - 单位名称 :
+ - * 性别 :
+ - * 单位名称 :
- 地区 :
- 邮件通知 :
@@ -64,19 +64,51 @@
- - <%= f.text_field :lastname,:no_label=>true, :required => true,:nh_required=>"1",:class=>"w210" %>
+
- <%= text_field_tag :lastname,@user.lastname+@user.firstname,:no_label=>true, :required => true,:nh_required=>"1",:class=>"w210" %>
-
- <%= text_field_tag :enterprise_name,@user.firstname,:no_label=>true, :required => true,:nh_required=>"1",:class=>"w210" %>
-
-
-
+ <% if User.current.user_extensions && User.current.user_extensions.gender && User.current.user_extensions.gender == 1 %>
+
+ <% else %>
+
+ <% end %>
+
- -
-
-
您输入的名称尚不存在,申请添加
+ -
+ <% if User.current.user_extensions.nil? %>
+
+
+
+
+ 平台找到了0个包含"国防"的高校
+
+
+ <% elsif User.current.user_extensions.identity == 3 || User.current.user_extensions.identity == 2 %>
+
+
+
+
+ 平台找到了0个包含"国防"的高校
+
+
+ <% elsif User.current.user_extensions.school.nil? %>
+
+
+
+
+ 平台找到了0个包含"国防"的高校
+
+
+ <% else %>
+
+
+
+
+ 平台找到了0个包含"国防"的高校
+
+
+ <% end %>
-
@@ -412,6 +444,7 @@
$("*[nh_required='1']",$(this)).attr("required",true);
$(this).show()
});
+ $("#identity_hint").hide();
}
function init_identity_and_title(pField, identity, cField, title, language) {
for (var i = 0; i < pField.options.length; i++) {
@@ -516,6 +549,14 @@
$("input[name='occupation']").val(data);
$("#search_school_result_list").hide();
$("#hint").hide();
+ $("#errortip").hide();
+
+ }
+
+ function apply_add_school(){
+ var htmlvalue = "<%= escape_javascript( render :partial => 'my/apply_add_school' )%>";
+ pop_up_box(htmlvalue,580,20,48);
+
}
function add_school(name){
$.ajax({
@@ -602,16 +643,19 @@
$("#search_school_result_list").show();
if($(e.target).val().trim() != '') {
str = e.target.value.length > 8 ? e.target.value.substr(0, 6)+"..." : e.target.value;
- $("#hint").html('找到了' + count + '个包含"' + str + '"的高校');
+ $("#hint").html('找到了' + count + '个包含"' + str + '"的高校(单位)');
$("#hint").show();
+ $("#errortip").hide();
}else{
$("#hint").hide();
+ $("#errortip").hide();
}
}else{
$("#search_school_result_list").html('');
str = e.target.value.length > 4 ? e.target.value.substr(0, 4)+"..." : e.target.value;
- $("#hint").html('没有找到包含"'+str+'"的高校,创建高校');
+ $("#hint").html('您输入的名称尚不存在,申请添加');
$("#hint").show();
+ $("#errortip").show();
}
}
});
@@ -621,6 +665,7 @@
{
$("#search_school_result_list").hide();
$("#hint").hide();
+ $("#errortip").hide();
}
});
$("input[name='province']").on('focus', function (e) {
@@ -648,16 +693,19 @@
$("#search_school_result_list").show();
if($(e.target).val().trim() != '') {
str = e.target.value.length > 8 ? e.target.value.substr(0, 6)+"..." : e.target.value;
- $("#hint").html('找到了' + count + '个包含"' + str + '"的高校');
+ $("#hint").html('找到了' + count + '个包含"' + str + '"的高校(单位)');
$("#hint").show();
+ $("#errortip").hide();
}else{
$("#hint").hide();
+ $("#errortip").hide();
}
}else{
$("#search_school_result_list").html('');
str = e.target.value.length > 4 ? e.target.value.substr(0, 4)+"..." : e.target.value;
- $("#hint").html('没有找到包含"'+str+'"的高校,创建高校');
+ $("#hint").html('您输入的名称尚不存在,申请添加');
$("#hint").show();
+ $("#errortip").show();
}
}
});
@@ -685,19 +733,41 @@
<% if( !@act.nil? && @act == 'password') %>
$("#users_tb_2").click();
<% end %>
- $('#my_account_form_link').click(function(e){
+
+ $('#my_account_form_link').on("click",(function(e){
+ //$('#my_account_form_link').click(function(e){
if($("#userIdentity").val() == -1 ) {
$("#identity_hint").html('请选择身份').show();
e.stopImmediatePropagation();
return;
}
if( $("input[name='province']").val().trim() != '' && $("input[name='occupation']").val().trim() == ''){ //学校名字和id不对的话
- $("#hint").html('学校必须是从下拉列表中选择的,不能手动修改').show();
+ $("#hint").html('单位名称必须是从下拉列表中选择的,不能手动修改').show();
+ e.stopImmediatePropagation();
+ return;
+ }
+
+ //姓名不能为空
+ if( $("#lastname").val() == '' ){
+ $("#lastname").focus();
+ e.stopImmediatePropagation();
+ return;
+ }
+
+ if( $("input[name='province']").val().trim() == '' ){ //学校名字必须填写
+ $("#hint").html('高校(单位)名称不能为空').show();
e.stopImmediatePropagation();
return;
}
+
+ if($("#no").is(":visible") == true && $("#no").val() == ""){
+ $("#no").focus();
+ e.stopImmediatePropagation();
+ return;
+ }
+
$('#my_account_form_btn').click();
- });
+ }));
$('#my_password_form_link').click(function(){
$('#my_password_form_btn').click();
});
diff --git a/config/routes.rb b/config/routes.rb
index 14ee3f0b8..d56f75ced 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -213,7 +213,8 @@ RedmineApp::Application.routes.draw do
resources :school, :except => [:show] do
collection do
-
+ get 'apply_add_school'
+ get 'search_repeat_schoolname'
end
member do
diff --git a/db/migrate/20160629030320_add_school_type_to_schools.rb b/db/migrate/20160629030320_add_school_type_to_schools.rb
new file mode 100644
index 000000000..ad23ae555
--- /dev/null
+++ b/db/migrate/20160629030320_add_school_type_to_schools.rb
@@ -0,0 +1,5 @@
+class AddSchoolTypeToSchools < ActiveRecord::Migration
+ def change
+ add_column :schools, :school_type, :integer, :default => false
+ end
+end
diff --git a/db/migrate/20160629081520_create_apply_add_schools.rb b/db/migrate/20160629081520_create_apply_add_schools.rb
new file mode 100644
index 000000000..3d47f55a1
--- /dev/null
+++ b/db/migrate/20160629081520_create_apply_add_schools.rb
@@ -0,0 +1,15 @@
+class CreateApplyAddSchools < ActiveRecord::Migration
+ def change
+ create_table :apply_add_schools do |t|
+ t.string :name
+ t.string :province
+ t.string :city
+ t.string :address
+ t.string :remarks
+ t.integer :school_id
+ t.integer :status, :default => false
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 148a6e21b..615a9001e 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20160624032138) do
+ActiveRecord::Schema.define(:version => 20160629081520) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -57,6 +57,18 @@ ActiveRecord::Schema.define(:version => 20160624032138) do
t.integer "user_id", :null => false
end
+ create_table "apply_add_schools", :force => true do |t|
+ t.string "name"
+ t.string "province"
+ t.string "city"
+ t.string "address"
+ t.string "remarks"
+ t.integer "school_id"
+ t.integer "status", :default => 0
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
create_table "apply_homeworks", :force => true do |t|
t.integer "status"
t.integer "user_id"
@@ -1125,23 +1137,6 @@ ActiveRecord::Schema.define(:version => 20160624032138) do
t.integer "viewed_count", :default => 0
end
- create_table "mess", :id => false, :force => true do |t|
- t.string "课程名"
- t.integer "课程ID", :default => 0, :null => false
- t.string "教师姓", :default => "", :null => false
- t.string "教师名", :limit => 30, :default => "", :null => false
- t.string "主贴名", :default => "", :null => false
- t.integer "主贴或回帖ID", :default => 0, :null => false
- t.integer "回帖对应主贴ID"
- t.integer "帖子点赞数"
- t.integer "主贴回复数", :default => 0, :null => false
- t.text "主贴或回帖内容"
- t.datetime "发帖时间", :null => false
- t.integer "发帖或回帖用户ID", :default => 0, :null => false
- t.string "发帖或回帖用户姓", :default => "", :null => false
- t.string "发帖或回帖用户名", :limit => 30, :default => "", :null => false
- end
-
create_table "message_alls", :force => true do |t|
t.integer "user_id"
t.integer "message_id"
@@ -1539,6 +1534,18 @@ ActiveRecord::Schema.define(:version => 20160624032138) do
add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true
add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id"
+ create_table "quality_analyses", :force => true do |t|
+ t.integer "project_id"
+ t.string "author_login"
+ t.string "rep_identifier"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.integer "sonar_version", :default => 0
+ t.string "path"
+ t.string "branch"
+ t.string "language"
+ end
+
create_table "queries", :force => true do |t|
t.integer "project_id"
t.string "name", :default => "", :null => false
@@ -1637,10 +1644,11 @@ ActiveRecord::Schema.define(:version => 20160624032138) do
create_table "schools", :force => true do |t|
t.string "name"
t.string "province"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.string "logo_link"
t.string "pinyin"
+ t.integer "school_type", :default => 0
end
create_table "secdomains", :force => true do |t|
@@ -1765,6 +1773,7 @@ ActiveRecord::Schema.define(:version => 20160624032138) do
t.integer "status", :default => 9
t.text "results"
t.text "src"
+ t.integer "uwait_time", :default => 0
end
create_table "student_works", :force => true do |t|
@@ -1783,8 +1792,8 @@ ActiveRecord::Schema.define(:version => 20160624032138) do
t.integer "absence_penalty", :default => 0
t.float "system_score", :default => 0.0
t.boolean "is_test", :default => false
- t.integer "simi_id"
- t.integer "simi_value"
+ t.integer "simi_id", :default => 0
+ t.integer "simi_value", :default => 0
t.float "work_score"
end
diff --git a/public/images/icons_ziliao.png b/public/images/icons_ziliao.png
new file mode 100644
index 0000000000000000000000000000000000000000..dc72e7361419bdefbc5a26b37d2cafee3e921e6c
GIT binary patch
literal 20180
zcmeI4c{J2-^!VSXY*|7nOU8&6#tgMiRw36HJ?6nKIiW&WyRu-U2kC>+Rm*|^0L+~0FB%{@bteEY>0#B>3=JLdL_EO(
z?+VgZQveMS`w
z#8lT^i;0FWFlpthT{nGU2&mjP?9dXs1E8d#=915`K0H76Wt
zm*Ogmd(PweVfM|S;NW9iu_}^#KRbqT7@V4rBE+dRMyK1d6##fv+8%w8I}|lGI{bDN
zGlrX4c$)deX%-Jw5}bSerQ#CpCV*YPb*9I9WTcbMwT|YNdzDk3CD3CEIJ{o5lIms5
zIL`FkXC=&AZcTZ2`c=bv1%5szX67kj+pCqZp)jSdQg88Z!hDxV+AqC6v%slj<)oX{
zSplCpavERP9&sSEV`9I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SLO)hyE-gyMEzhz0mkgbHo_4}fBcR`&vFek^vwPdhgAxJ0
z)h8n7`|bByo*akW3d-tuYQuTFSR<{>(W&3JFa7dF=Iu6K(3>UeX{x3_mceihcexi`!EfuYxB>`dC9l5KeMaG^!QROcJ
zh+i>6_lxD!=)YK9NWvPiN{O9ErvaH!I)&kduRoSA&srpu=0^_|3xd1%=$$)|zZD8Z
z<3fjukq7#eR39>N6e~$B$7n#yT<)(xzFyXN+SkCcPzAqtYCf!|tw>=+S}Ix}x^E)+
z)~ouxnjymUFFXh@e8$du7rpbX8m~G%J|flaoO*6CEV|m?!IL`{9RW>
z5MQ|QliD?JtL}3Tr$(GQ7sCBMF#0${d|>r)IxZ((zLpxUq618t1U#ea{ZrQe9z 'ApplyAddSchools' do
+ name "MyString"
+province "MyString"
+city "MyString"
+address "MyString"
+remarks "MyString"
+school_id 1
+status 1
+ end
+
+end
diff --git a/spec/models/apply_add_schools_spec.rb b/spec/models/apply_add_schools_spec.rb
new file mode 100644
index 000000000..de1b7c05a
--- /dev/null
+++ b/spec/models/apply_add_schools_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe ApplyAddSchools, :type => :model do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
From 5cc40408eea01dd53701b67ea9f80b2a4c48c811 Mon Sep 17 00:00:00 2001
From: yuanke <249218296@qq.com>
Date: Thu, 30 Jun 2016 16:30:02 +0800
Subject: [PATCH 7/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9KE=E5=8D=95=E5=80=8D?=
=?UTF-8?q?=E8=A1=8C=E8=B7=9D=E6=98=BE=E7=A4=BA=E7=9A=84=E6=97=B6=E5=80=99?=
=?UTF-8?q?=E4=B8=8D=E4=B8=80=E8=87=B4=E7=9A=84BUG?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
config/locales/my/zh.yml | 2 +-
config/locales/zh.yml | 2 +-
public/stylesheets/courses.css | 3 ++-
public/stylesheets/new_user.css | 1 +
public/stylesheets/project.css | 1 +
public/stylesheets/public.css | 1 +
6 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/config/locales/my/zh.yml b/config/locales/my/zh.yml
index 25a949df4..39c7c3167 100644
--- a/config/locales/my/zh.yml
+++ b/config/locales/my/zh.yml
@@ -28,7 +28,7 @@ zh:
label_account_identity_choose: --请选择身份--
label_account_identity_teacher: 教师
label_account_identity_student: 学生
- label_account_identity_developer: 开发者
+ label_account_identity_developer: 从业者
label_account_identity_enterprise: 组织
label_account_identity_studentID: 请输入学号
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 3dbd2e8ef..c80a39891 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -1665,7 +1665,7 @@ zh:
#add by men
label_account_identity_teacher: 教师
label_account_identity_student: 学生
- label_account_identity_developer: 开发者
+ label_account_identity_developer: 从业者
label_account_identity_enterprise: 组织
label_teaching_course: 我执教的课程
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index d0a5e7ab3..a94e61d1d 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -152,6 +152,7 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
.homepagePostIntro a{color: #136ec2;}
+.homepagePostIntro p{line-height: 1;}
.homepagePostDeadline {font-size:12px; color:#888888; float:left; margin-top: 2px;}
.homepagePostDate {font-size:12px; color:#888888;margin-bottom: 5px;}
.homepagePostReply {width:710px; margin:0px auto; background-color:#f1f1f1; margin-top:10px;}
@@ -1426,4 +1427,4 @@ a.pages-big{ width:50px;}
.H60 {height:60px !important;}
.W420 {width:420px;}
.W300 {width:300px !important;}
-.W600{ width:600px;}
+.W600{ width:600px;}
diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css
index b931dff6b..a65edc490 100644
--- a/public/stylesheets/new_user.css
+++ b/public/stylesheets/new_user.css
@@ -683,6 +683,7 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
.homepagePostIntro a{color: #136ec2;}
+.homepagePostIntro p{line-height: 1;}
.homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;}
.borderBottomNone {border-bottom:none !important;}
.homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;}
diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css
index bde560613..354c0f1ac 100644
--- a/public/stylesheets/project.css
+++ b/public/stylesheets/project.css
@@ -969,6 +969,7 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
color: #484848;
overflow: hidden;
}
+.homepagePostIntro p{line-height: 1;}
.homepagePostReply {
width: 710px;
margin: 10px auto 0px;
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index 500923519..bf7d288a7 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -632,6 +632,7 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
.homepagePostIntro a{color: #136ec2;}
+.homepagePostIntro p{line-height: 1;}
.homepagePostDeadline {font-size:12px; color:#888888; float:left; margin-top: 2px;}
.homepagePostDate {font-size:12px; color:#888888;margin-bottom: 5px;}
.homepagePostReplyBanner {width:708px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;}
From a8bd91754d348ac6e5c2770fe3574d85e03482a5 Mon Sep 17 00:00:00 2001
From: yuanke <249218296@qq.com>
Date: Fri, 1 Jul 2016 09:27:46 +0800
Subject: [PATCH 8/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8D=9A=E5=AE=A2?=
=?UTF-8?q?=E8=AF=A6=E6=83=85=E9=87=8C=E9=9D=A2=E5=86=85=E5=AE=B9=E5=89=8D?=
=?UTF-8?q?=E9=9D=A2=E5=A4=9A=E7=A9=BA=E6=A0=BC=E7=9A=84BUG?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/blog_comments/show.html.erb | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/app/views/blog_comments/show.html.erb b/app/views/blog_comments/show.html.erb
index 7d8aaed86..b1cd86484 100644
--- a/app/views/blog_comments/show.html.erb
+++ b/app/views/blog_comments/show.html.erb
@@ -91,9 +91,10 @@
<%= format_time( @article.created_on)%>
-
- <%= @article.content.html_safe%>
-
+
+
+
+ <%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>@article.id, :content=>@article.content} %>
<%#= link_to_attachments_course @topic, :author => false %>
@@ -192,12 +193,12 @@