- <% if activity.status == 1 %>
- <%= image_tag("/images/trustie_logo1.png", width: "50px", height: "50px") %>
- <% else %>
- <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id,:host=>Setting.host_user), :alt => "用户头像" %>
- <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
- <% end %>
+ <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id,:host=>Setting.host_user), :alt => "用户头像" %>
+ <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
- <% if activity.status == 1 %>
- 确实团队
+ <% if activity.try(:author).try(:realname) == ' ' %>
+ <%= link_to activity.try(:author), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
<% else %>
- <% if activity.try(:author).try(:realname) == ' ' %>
- <%= link_to activity.try(:author), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
- <% else %>
- <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
- <% end %>
+ <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
<% end %>
TO
<%= link_to activity.course.name.to_s+" | 课程问答区", course_boards_path(activity.course,:host=> Setting.host_course), :class => "newsBlue ml15 mr5"%>
diff --git a/db/migrate/20160317070611_update_course_lead.rb b/db/migrate/20160317070611_update_course_lead.rb
new file mode 100644
index 000000000..0c68fa40f
--- /dev/null
+++ b/db/migrate/20160317070611_update_course_lead.rb
@@ -0,0 +1,8 @@
+class UpdateCourseLead < ActiveRecord::Migration
+ def up
+ Message.where("status =? ", 1).update_all(:author_id => 1)
+ end
+
+ def down
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 2dad292f4..d2ecc2ca9 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 => 20160225031230) do
+ActiveRecord::Schema.define(:version => 20160317070611) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -432,9 +432,11 @@ ActiveRecord::Schema.define(:version => 20160225031230) do
t.integer "resource_num"
t.integer "journal_num"
t.integer "journal_reply_num"
- 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.integer "total_score"
+ t.integer "homework_journal_num", :default => 0
+ t.integer "news_num", :default => 0
end
create_table "course_groups", :force => true do |t|
@@ -506,6 +508,7 @@ ActiveRecord::Schema.define(:version => 20160225031230) do
t.integer "is_excellent", :default => 0
t.integer "excellent_option", :default => 0
t.integer "is_copy", :default => 0
+ t.integer "visits", :default => 0
end
create_table "custom_fields", :force => true do |t|
@@ -1282,6 +1285,7 @@ ActiveRecord::Schema.define(:version => 20160225031230) do
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.boolean "allow_guest_download", :default => true
+ t.integer "visits", :default => 0
end
create_table "phone_app_versions", :force => true do |t|
@@ -1441,6 +1445,7 @@ ActiveRecord::Schema.define(:version => 20160225031230) do
t.integer "acts_count", :default => 0
t.integer "journals_count", :default => 0
t.integer "boards_reply_count", :default => 0
+ t.integer "visits", :default => 0
end
add_index "projects", ["lft"], :name => "index_projects_on_lft"
@@ -1900,6 +1905,7 @@ ActiveRecord::Schema.define(:version => 20160225031230) do
t.string "mail_notification", :default => "", :null => false
t.string "salt", :limit => 64
t.integer "gid"
+ t.integer "visits", :default => 0
end
add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id"
@@ -2013,11 +2019,6 @@ ActiveRecord::Schema.define(:version => 20160225031230) do
add_index "wikis", ["project_id"], :name => "wikis_project_id"
- create_table "wlcs", :force => true do |t|
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
create_table "workflows", :force => true do |t|
t.integer "tracker_id", :default => 0, :null => false
t.integer "old_status_id", :default => 0, :null => false