diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb
index 589398c07..01d2ea890 100644
--- a/app/controllers/attachments_controller.rb
+++ b/app/controllers/attachments_controller.rb
@@ -150,6 +150,7 @@ class AttachmentsController < ApplicationController
attach_copied_obj = ori.copy
attach_copied_obj.container = obj
attach_copied_obj.created_on = Time.now
+ attach_copied_obj.author_id = User.current.id
@obj = obj
@save_flag = attach_copied_obj.save
@save_message = attach_copied_obj.errors.full_messages
diff --git a/app/models/journals_for_message.rb b/app/models/journals_for_message.rb
index 9ca8236d0..69342b94c 100644
--- a/app/models/journals_for_message.rb
+++ b/app/models/journals_for_message.rb
@@ -64,8 +64,12 @@ class JournalsForMessage < ActiveRecord::Base
def act_as_activity
if self.jour_type == 'Principal'
unless self.user_id == self.jour.id && self.user_id != self.reply_id && self.reply_id != 0
- self.acts << Activity.new(:user_id => self.user_id)
- end
+ # self.acts << Activity.new(:user_id => self.user_id)
+ self.acts << Activity.new(:user_id => self.jour_id)
+ end
+ elsif self.jour_type == 'Project'
+ self.acts << Activity.new(:user_id => self.reply_id)
+ else
end
end
diff --git a/app/views/projects/_new_join.html.erb b/app/views/projects/_new_join.html.erb
index 82cc61b4d..cc83ac80d 100644
--- a/app/views/projects/_new_join.html.erb
+++ b/app/views/projects/_new_join.html.erb
@@ -49,7 +49,9 @@
|
- <%= text_field_tag 'course_password', nil, :size => 45 %>
+
+ <%= text_field_tag 'course_password', nil, :style=>'width:100%'%>
+
<%= submit_tag l(:label_new_join), :name => nil, :class => "bid_btn", :onclick => "hideModal(this);" %>
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 1f34be979..72d492cb8 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -30,11 +30,11 @@
<% case e.act_type %>
<% when 'JournalsForMessage' %>
<% if User.current.login == @user.login %>
- <% if e.user_id == act.jour.id %>
-
<%= link_to("#{e.user.show_name}", user_path(e.user_id)) %> 有了留言 |
- <% else %>
- <%= link_to("#{e.user.show_name}", user_path(e.user_id)) %> 给 <%= link_to("#{act.jour.show_name}", user_path(act.jour.id)) %> 留言了 |
- <% end %>
+ <%# if e.user_id == act.jour.id %>
+ <%= link_to("#{e.user.show_name}", user_path(e.user_id)) %> 有了<%= link_to("#{e.act.user.show_name}", user_path(e.user.id))%>的留言 |
+ <%# else %>
+
+ <%# end %>
<% else %>
<%= link_to("#{@user.show_name}", user_path(e.user_id)) %> 有了新的动态 |
<% end %>
@@ -209,8 +209,10 @@
<% if e.reply_id == User.current.id%>
<%if e.jour_type == 'Bid'%>
<%= l(:label_in_bids)%><%= link_to(e.jour.name, respond_path(e.jour))%> <%= l(:label_quote_my_words) %>
- <% else %>
+ <% elsif e.jour_type == 'User' %>
<%= l(:label_in_users)%><%= link_to(e.jour.firstname, feedback_path(e.jour))%> <%= l(:label_quote_my_words) %>
+ <% elsif e.jour_type == 'Project' %>
+ <%= '在'<<%= link_to(e.jour.name, feedback_path(e.jour))%> <%= l(:label_reply_plural) %>
<% end %>
<% else %>
<%= l(:label_about_requirement) %><%= link_to(e.jour.name, respond_path(e.jour_id))%> <%= l(:label_have_respond) %>
diff --git a/app/views/welcome/course.html.erb b/app/views/welcome/course.html.erb
index 69636a71f..d0d7ebf8b 100644
--- a/app/views/welcome/course.html.erb
+++ b/app/views/welcome/course.html.erb
@@ -123,9 +123,17 @@
<%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}", :target => "_blank" )%>
学生人数:<%= link_to "#{studentCount(project)}", project_member_path(project, :role => 2) ,:course =>'1', :target => "_blank" %>
+
+
+ <%if User.current.logged? %>
+ <%= join_in_course(project, User.current) unless project.course_extra.teacher.id == User.current.id %>
+ <% end %>
+
<%= content_tag "div", " ".html_safe< "d-p-project-intro", :style => 'display:inline-block; position:relative;float:right;color:#ff4800;' %>
+
+
<%= content_tag "span", " ".html_safe+project.description.truncate(50, omission: '...'), :class => "d-p-project-intro" , :title => project.description.to_s %>