Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
commit
2775947ce2
@ -1,17 +1,19 @@
|
||||
<h3><%=l(:label_confirmation)%></h3>
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><%=l(:label_confirmation)%></h2>
|
||||
</div>
|
||||
<div class="warning">
|
||||
<p><strong><%=h @project_to_destroy %></strong><br />
|
||||
<%=l(:text_project_destroy_confirmation)%>
|
||||
<p><strong><h3><%=h @project_to_destroy %></h3></strong>
|
||||
<%=l(:text_project_destroy_confirmation)%>
|
||||
|
||||
<% if @project_to_destroy.descendants.any? %>
|
||||
<br /><%= l(:text_subprojects_destroy_warning,
|
||||
content_tag('strong', h(@project_to_destroy.descendants.collect{|p| p.to_s}.join(', ')))).html_safe %>
|
||||
<% end %>
|
||||
</p>
|
||||
<p>
|
||||
<% if @project_to_destroy.descendants.any? %>
|
||||
<br /><%= l(:text_subprojects_destroy_warning,
|
||||
content_tag('strong', h(@project_to_destroy.descendants.collect{|p| p.to_s}.join(', ')))).html_safe %>
|
||||
<% end %>
|
||||
</p>
|
||||
<p>
|
||||
<%= form_tag(project_path(@project_to_destroy), :method => :delete) do %>
|
||||
<label><%= check_box_tag 'confirm', 1 %> <%= l(:general_text_Yes) %></label>
|
||||
<%= submit_tag l(:button_delete) %>
|
||||
<label><%= check_box_tag 'confirm', 1, checked = true %> <%= l(:general_text_Yes) %></label>
|
||||
<%= submit_tag l(:button_delete) %>
|
||||
<% end %>
|
||||
</p>
|
||||
</p>
|
||||
</div>
|
||||
|
@ -0,0 +1,18 @@
|
||||
class AlterUserActivitiesNews < ActiveRecord::Migration
|
||||
def up
|
||||
UserActivity.all.each do |activity|
|
||||
if activity.act_type == 'News'
|
||||
if activity.act
|
||||
activity.created_at = activity.act.created_on
|
||||
activity.updated_at = activity.act.respond_to?("updated_on") ? activity.act.updated_on : activity.act.created_on
|
||||
activity.save
|
||||
else
|
||||
activity.destroy
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 12 KiB |
Loading…
Reference in new issue