- <%= image_tag(url_to_avatar(e.event_author), :class => "avatar") %> |
+ <%= image_tag(url_to_avatar(e.event_author), :class => "avatar") %> |
From 4957f6d55a8829765ae72908623e0376d2ae0086 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Thu, 9 Oct 2014 14:14:31 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BD=9C=E4=B8=9A?=
=?UTF-8?q?=E6=8F=8F=E8=BF=B0=E5=AD=97=E6=AE=B5=E7=9A=84=E7=B1=BB=E5=9E=8B?=
=?UTF-8?q?=EF=BC=8C=E9=A1=B5=E9=9D=A2=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/bids/_history.html.erb | 26 +++++++++----------
...55029_update_homeworkattach_description.rb | 5 ++++
db/schema.rb | 4 +--
3 files changed, 19 insertions(+), 16 deletions(-)
create mode 100644 db/migrate/20141009055029_update_homeworkattach_description.rb
diff --git a/app/views/bids/_history.html.erb b/app/views/bids/_history.html.erb
index 0961e3cf8..00a497e78 100644
--- a/app/views/bids/_history.html.erb
+++ b/app/views/bids/_history.html.erb
@@ -26,22 +26,20 @@
<%= link_to journal.user, user_path(journal.user)%>
<%= label %>
- <%= textilizable journal.notes%>
+ <%= textilizable journal.notes%>
<%= l(:label_bids_published) %> <%= time_tag(journal.created_on).html_safe %> <%= l(:label_bids_published_ago) %>
- <% ids = 'project_respond_form_'+ journal.id.to_s%>
+ <% ids = 'project_respond_form_'+ journal.id.to_s%>
- <% if reply_allow %>
- <%= link_to(l(:button_quote), {:controller => 'bids', :action => 'new', :id => bid, :journal_id => journal}, :remote => true,
- :method => 'post', :title => l(:button_quote))%>
- <%= link_to l(:label_bid_respond_quote),'',
- {: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)) %>
- <%= 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 %>
+ <% if reply_allow %>
+ <%= link_to(l(:button_quote), {:controller => 'bids', :action => 'new', :id => bid, :journal_id => journal}, :remote => true,
+ :method => 'post', :title => l(:button_quote))%>
+ <%= link_to l(:label_bid_respond_quote),'',
+ {: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 => '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 %>
diff --git a/db/migrate/20141009055029_update_homeworkattach_description.rb b/db/migrate/20141009055029_update_homeworkattach_description.rb
new file mode 100644
index 000000000..7f107077f
--- /dev/null
+++ b/db/migrate/20141009055029_update_homeworkattach_description.rb
@@ -0,0 +1,5 @@
+class UpdateHomeworkattachDescription < ActiveRecord::Migration
+ def change
+ change_column :homework_attaches, :description, :text, default: nil
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 172a11ec5..ea5c2107d 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 => 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
From eedbc540e5e6f03e4761c8042f60ff937c00ad72 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Thu, 9 Oct 2014 14:25:33 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E4=BD=9C=E4=B8=9A=E6=97=B6=E6=A0=87=E9=A2=98=E3=80=81=E6=8F=8F?=
=?UTF-8?q?=E8=BF=B0=E5=AD=97=E6=AE=B5=E5=AD=97=E6=95=B0=E9=99=90=E5=88=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/homework_attach/edit.html.erb | 4 ++--
app/views/homework_attach/new.html.erb | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/app/views/homework_attach/edit.html.erb b/app/views/homework_attach/edit.html.erb
index a0876440c..fae1f97b5 100644
--- a/app/views/homework_attach/edit.html.erb
+++ b/app/views/homework_attach/edit.html.erb
@@ -44,7 +44,7 @@
<%= form_for(@homework) do |f|%>
标 题 *:
- <%= f.text_field :name, :required => true, :name => "homework_name", :size => 60, :style => "width:490px;"%>
+ <%= f.text_field :name, :required => true, :name => "homework_name", :size => 60, :style => "width:490px;", :maxlength => 254%>
提交项目 :
@@ -60,7 +60,7 @@
描 述 :
- <%= f.text_area :description, :rows => 8, :name => "homework_description", :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %>
+ <%= f.text_area :description, :rows => 8, :name => "homework_description", :class => 'wiki-edit', :maxlength => 65534, :style => "font-size:small;width:490px;margin-left:10px;" %>
diff --git a/app/views/homework_attach/new.html.erb b/app/views/homework_attach/new.html.erb
index d05dfb735..29e606442 100644
--- a/app/views/homework_attach/new.html.erb
+++ b/app/views/homework_attach/new.html.erb
@@ -24,7 +24,7 @@
}) do |f|%>
标 题 *:
- <%= f.text_field "name", :required => true, :size => 60, :style => "width:490px;" %>
+ <%= f.text_field "name", :required => true, :size => 60, :style => "width:490px;", :maxlength => 254 %>
提交项目 :
@@ -39,7 +39,7 @@
<%#= f.text_area :description, :rows => 15, :class => 'wiki-edit', :id => 'editor01' %>
-->
- <%= f.text_area "description", :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %>
+ <%= f.text_area "description", :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;", :maxlength => 65534 %>
|