parent
00c50d8114
commit
87ab758ec5
@ -1,12 +1,17 @@
|
||||
<% for rec in @list %>
|
||||
<div class="users_courses_list" nhname="rec" data-id="<%= rec[:item].id %>">
|
||||
<a href="<%= rec[:e].class.to_s == 'Course' ? course_path(rec[:e]) : project_path(rec[:e]) %>" class=" fl users_coursename ml5" title="<%= rec[:e].name %>"><%= rec[:e].name %></a>
|
||||
<a href="<%= get_activity_container_url(rec[:e]) %>" class=" fl users_coursename ml5" title="<%= rec[:e].name %>">
|
||||
<li style="max-width:140px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" class="fl"><%= rec[:e].name %></li>
|
||||
<% if( rec[:e].is_public == false || rec[:e].is_public == 0 ) %>
|
||||
<span class="img_private">私有</span>
|
||||
<% end %>
|
||||
</a>
|
||||
<a href="<%= user_path(rec[:item].user.id) %>" class="c_orange course_name fl mr5" title="<%= rec[:item].user.show_name %>"><%= rec[:item].user.show_name %></a>
|
||||
<span class="fl mr5 c_grey"><%= get_activity_opt(rec[:item],rec[:e]) %></span>
|
||||
<a href="<%= get_activity_url(rec[:item],rec[:e]) %>"
|
||||
class="c_blue02 fl users_courses_txt hidepic" title="<%= get_activity_act_showname(rec[:item]) %>">
|
||||
<%= get_activity_act_showname(rec[:item]).html_safe %>
|
||||
</a>
|
||||
<span class="fr c_grey mr10"><%= time_tag(get_activity_act_createtime(rec[:item])).html_safe %>前</span>
|
||||
<span class="fr c_grey mr10"><%= time_tag(get_activity_act_createtime(rec[:item])).html_safe %></span>
|
||||
</div>
|
||||
<% end %>
|
@ -0,0 +1,9 @@
|
||||
class AddActivityContainerTypeToActivities < ActiveRecord::Migration
|
||||
def up
|
||||
add_column :activities, :activity_container_type, :string, default: ''
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :activities, :activity_container_type
|
||||
end
|
||||
end
|
@ -0,0 +1,13 @@
|
||||
class ChangeActivitiesContainerType < ActiveRecord::Migration
|
||||
def up
|
||||
activities = Activity.where("activity_container_type = ''")
|
||||
activities.each do |activity|
|
||||
activity.set_container_type_val
|
||||
activity.save
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
Activity.where("activity_container_type <> ''").update_all(activity_container_type: '')
|
||||
end
|
||||
end
|
Loading…
Reference in new issue