<% if project.is_public || User.current.member_of?(project) || User.current.admin? %>
- <%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_path(project.id,:host=>Setting.host_name),:id=>"project_img_"+project.id.to_s,:alt =>"项目头像" %>
+ <%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_path(project.id,:host=>Setting.host_name),:id=>"project_img_"+project.id.to_s+"_"+homework_common.id.to_s,:alt =>"项目头像" %>
<% else %>
- <%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius",:id=>"project_img_"+project.id.to_s,:alt =>"项目头像") %>
+ <%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius",:id=>"project_img_"+project.id.to_s+"_"+homework_common.id.to_s,:alt =>"项目头像") %>
<% end %>
-
+ <% time=project.updated_on %>
+ <% time=ForgeActivity.where("project_id=?",project.id).last.updated_at if ForgeActivity.where("project_id=?",project.id).last %>
+
<%=(User.find project.user_id).show_name %>(组长)
+
<%=time_from_now time %>
+
项目名称:<%=project.name %>
创建者:<%=(User.find project.user_id).show_name %>(组长)
- <% time=project.updated_on %>
- <% time=ForgeActivity.where("project_id=?",project.id).last.updated_at if ForgeActivity.where("project_id=?",project.id).last %>
更新时间:<%=time_from_now time %>
diff --git a/config/routes.rb b/config/routes.rb
index 289c602db..d82a9de8a 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -438,7 +438,7 @@ RedmineApp::Application.routes.draw do
post '/courses/:id/course_activity', :to => 'courses#show', :as => 'course_activity'
get '/boards/:id/boards_topic', :to =>'boards#show', :as => 'boards_topic'
- match 'courses/:course_id/news/new', :to => 'news#new', :via => [:get, :post], :as => 'new_course_news'
+ match 'courses/:course_id/news/index', :to => 'news#index', :via => [:get, :post], :as => 'new_course_news'
#added by young
resources :users do
diff --git a/db/migrate/20151224090313_delete_journals_message.rb b/db/migrate/20151224090313_delete_journals_message.rb
new file mode 100644
index 000000000..4753cc8e8
--- /dev/null
+++ b/db/migrate/20151224090313_delete_journals_message.rb
@@ -0,0 +1,17 @@
+class DeleteJournalsMessage < ActiveRecord::Migration
+ def up
+ count = JournalsForMessage.all.count / 30 + 2
+ transaction do
+ for i in 1 ... count do
+ JournalsForMessage.page(i).per(30).each do |message|
+ if !message.m_parent_id.nil? and message.parent.nil?
+ message.destroy
+ end
+ end
+ end
+ end
+ end
+
+ def down
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 52c7755e9..0758d90ed 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 => 20151218110033) do
+ActiveRecord::Schema.define(:version => 20151224090313) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -1569,7 +1569,6 @@ ActiveRecord::Schema.define(:version => 20151218110033) do
end
add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id"
- add_index "student_works", ["homework_common_id"], :name => "index"
create_table "student_works_evaluation_distributions", :force => true do |t|
t.integer "student_work_id"
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index 463fc710a..b07e93701 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -1209,7 +1209,7 @@ a:hover.blueCir{ background:#3598db; color:#fff;}
.proHelp {background:url(/images/course/hwork_icon.png) -5px -124px no-repeat; display:inline-block; width:15px; height:15px; display:inline-block;}
.hworkPrName {width:110px; max-width:110px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:18px; line-height:18px; font-size:12px; color:#888888; text-align:center;}
.mr150 {margin-right:150px;}
-.relatePInfo {position:absolute; background-color:#ffffff; padding:3px 8px; white-space:nowrap; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5); z-index:999; color:#585858; cursor:pointer; display:none;}
+.relatePInfo {text-align: left; position:absolute; background-color:#ffffff; padding:3px 8px; white-space:nowrap; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5); z-index:999; color:#585858; cursor:pointer; display:none;}
/*上传资源弹窗*/
.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;}
diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css
index e73109eed..e7ac454e7 100644
--- a/public/stylesheets/new_user.css
+++ b/public/stylesheets/new_user.css
@@ -1387,7 +1387,7 @@ a:hover.blueCir{ background:#3598db; color:#fff;}
/* @功能 定义 */
span.at {color:#269ac9;}
-.relatePInfo {position:absolute; background-color:#ffffff; padding:3px 8px; white-space:nowrap; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5); z-index:999; color:#585858; cursor:pointer; display:none;}
+.relatePInfo {text-align: left; position:absolute; background-color:#ffffff; padding:3px 8px; white-space:nowrap; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5); z-index:999; color:#585858; cursor:pointer; display:none;}
/*问题状态图片*/
.issues{ background:url(../images/public_icon.png) -66px 5px no-repeat; width:18px; height:21px;}
.duty{ background:url(../images/public_icon.png) -66px -18px no-repeat; width:18px; height:21px;}