修改作业描述字段的类型,页面代码优化

This commit is contained in:
sw 2014-10-09 14:14:31 +08:00
parent c51f13a0b6
commit 4957f6d55a
3 changed files with 19 additions and 16 deletions

View File

@ -37,11 +37,9 @@
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user.name}: '); $('##{ids} textarea') ;return false;"}
%>
<% end %>
<% if @user==User.current|| User.current.admin? %>
<%#= link_to(l(:label_bid_respond_delete), {:controller => 'bids', :action => 'destroy', :object_id => journal, :id => bid},:confirm => l(:label_delete_confirm),
:remote => true, :method => 'delete', :class => "delete", :confirm => l(:text_are_you_sure), :title => l(:button_delete)) %>
<% if @user==User.current|| User.current.admin? %>
<%= link_to(l(:label_bid_respond_delete), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user}, :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %>
<% end %>
<% end %>
</span>
</span>
<div style="clear: both;"></div>

View File

@ -0,0 +1,5 @@
class UpdateHomeworkattachDescription < ActiveRecord::Migration
def change
change_column :homework_attaches, :description, :text, default: nil
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20141009010934) do
ActiveRecord::Schema.define(:version => 20141009055029) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@ -473,7 +473,7 @@ ActiveRecord::Schema.define(:version => 20141009010934) do
t.datetime "updated_at", :null => false
t.string "reward"
t.string "name"
t.string "description"
t.text "description"
t.integer "state"
t.integer "project_id", :default => 0
end