From 9fe4c9f8a28da156c3f1984abde1df59833a8d3c Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Sat, 19 Jul 2014 10:44:23 +0800
Subject: [PATCH 1/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AB=9E=E8=B5=9B?=
=?UTF-8?q?=E4=BD=9C=E5=93=81=E5=88=97=E8=A1=A8=E6=98=BE=E7=A4=BA=E6=A0=B7?=
=?UTF-8?q?=E5=BC=8F=E4=B8=8E=E5=88=9B=E5=BB=BA=E4=BD=9C=E5=93=81=E6=A0=B7?=
=?UTF-8?q?=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../contests/show_attendingcontest.html.erb | 22 ++++++++++++-------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/app/views/contests/show_attendingcontest.html.erb b/app/views/contests/show_attendingcontest.html.erb
index ab619e8ae..b9c09fdef 100644
--- a/app/views/contests/show_attendingcontest.html.erb
+++ b/app/views/contests/show_attendingcontest.html.erb
@@ -91,7 +91,7 @@
<%= l(:label_work_name) %>
* :
- <%= f.text_field :name, :required => true, :size => 60, :style => "width:400px;" %> |
+ <%= f.text_field :name, :required => true, :size => 60, :style => "width:350px;" %> |
(<%= l(:label_workname_lengthlimit) %>)
@@ -101,7 +101,7 @@
<%= l(:label_running_platform) %>
* :
- <%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:400px;" %> |
+ <%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:350px;" %> |
@@ -111,7 +111,7 @@
<%= l(:label_work_description) %>
* :
- <%= f.text_field :description, :required => true, :size => 60, :style => "width:400px;" %> |
+ <%= f.text_field :description, :required => true, :size => 60, :style => "width:350px;" %> |
(<%= l(:label_workdescription_lengthlimit) %>)
@@ -121,7 +121,7 @@
<%= l(:label_softapplication_developers) %>
* :
- <%= f.text_field :application_developers, :required => true, :size => 60, :style => "width:400px;" %> |
+ <%= f.text_field :application_developers, :required => true, :size => 60, :style => "width:350px;" %> |
@@ -130,7 +130,7 @@
<%= l(:label_work_deposit_project) %>:
- <%= select_tag 'project', options_for_select(select_option_helper(@option)), :name => 'project', :class => 'grayline2' %>
+ <%= select_tag 'project', options_for_select(select_option_helper(@option)), :name => 'project', :class => 'grayline2',:style => "width:358px;" %>
<%= link_to l(:label_create_new_projects), new_project_path(course: 0, project_type: 0), :target => '_blank' %>
@@ -240,7 +240,10 @@
<%= l(:label_profile) %>: |
- <%= c_project.project.description.truncate(90, omission: '...') %> |
+
+ <%#= c_project.project.description.truncate(90, omission: '...') %>
+ <%= c_project.project.description %>
+ |
@@ -276,7 +279,10 @@
<%= l(:label_profile) %>: |
- <%= c_softapplication.softapplication.description.truncate(90, omission: '...') %> |
+
+ <%#= c_softapplication.softapplication.description.truncate(90, omission: '...') %>
+ <%= c_softapplication.softapplication.description %>
+ |
@@ -330,7 +336,7 @@
<% if ((User.current.id == @contest.author_id) && (@contest.deadline > Date.today))||User.current.admin %>
-
+
<%= toggle_link '评奖', c_softapplication.id.to_s %>
From 79c76d26c892ec271436657fa8162b3de561df66 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Sat, 19 Jul 2014 11:35:43 +0800
Subject: [PATCH 2/6] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E4=BD=9C=E5=93=81?=
=?UTF-8?q?=E5=88=86=E7=B1=BB=E8=A1=A8=EF=BC=8C=E5=B9=B6=E6=8F=92=E5=85=A5?=
=?UTF-8?q?=E9=83=A8=E5=88=86=E6=95=B0=E6=8D=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/models/works_category.rb | 3 +
.../20140719030741_create_works_categories.rb | 9 ++
.../20140719030941_set_works_categories.rb | 98 +++++++++++++++++++
db/schema.rb | 10 +-
test/fixtures/works_categories.yml | 7 ++
test/unit/works_category_test.rb | 7 ++
6 files changed, 132 insertions(+), 2 deletions(-)
create mode 100644 app/models/works_category.rb
create mode 100644 db/migrate/20140719030741_create_works_categories.rb
create mode 100644 db/migrate/20140719030941_set_works_categories.rb
create mode 100644 test/fixtures/works_categories.yml
create mode 100644 test/unit/works_category_test.rb
diff --git a/app/models/works_category.rb b/app/models/works_category.rb
new file mode 100644
index 000000000..d8aeecd4e
--- /dev/null
+++ b/app/models/works_category.rb
@@ -0,0 +1,3 @@
+class WorksCategory < ActiveRecord::Base
+ attr_accessible :category
+end
diff --git a/db/migrate/20140719030741_create_works_categories.rb b/db/migrate/20140719030741_create_works_categories.rb
new file mode 100644
index 000000000..0b08e25c4
--- /dev/null
+++ b/db/migrate/20140719030741_create_works_categories.rb
@@ -0,0 +1,9 @@
+class CreateWorksCategories < ActiveRecord::Migration
+ def change
+ create_table :works_categories do |t|
+ t.string :category
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20140719030941_set_works_categories.rb b/db/migrate/20140719030941_set_works_categories.rb
new file mode 100644
index 000000000..44e6bd730
--- /dev/null
+++ b/db/migrate/20140719030941_set_works_categories.rb
@@ -0,0 +1,98 @@
+# -*coding:utf-8 -*-
+class SetWorksCategories < ActiveRecord::Migration
+ def up
+ workscategory1 = WorksCategory.new
+ workscategory1.category = "影音播放"
+ workscategory1.save
+
+ workscategory2 = WorksCategory.new
+ workscategory2.category = "交通导航"
+ workscategory2.save
+
+ workscategory3 = WorksCategory.new
+ workscategory3.category = "生活娱乐"
+ workscategory3.save
+
+ workscategory4 = WorksCategory.new
+ workscategory4.category = "网络购物"
+ workscategory4.save
+
+ workscategory5 = WorksCategory.new
+ workscategory5.category = "输入法"
+ workscategory5.save
+
+ workscategory6 = WorksCategory.new
+ workscategory6.category = "聊天社区"
+ workscategory6.save
+
+ workscategory7 = WorksCategory.new
+ workscategory7.category = "浏览器"
+ workscategory7.save
+
+ workscategory8 = WorksCategory.new
+ workscategory8.category = "窗口小部件"
+ workscategory8.save
+
+ workscategory9 = WorksCategory.new
+ workscategory9.category = "安全防护"
+ workscategory9.save
+
+ workscategory10 = WorksCategory.new
+ workscategory10.category = "拍照摄影"
+ workscategory10.save
+
+ workscategory11 = WorksCategory.new
+ workscategory11.category = "实用工具"
+ workscategory11.save
+
+ workscategory12 = WorksCategory.new
+ workscategory12.category = "词典翻译"
+ workscategory12.save
+
+ workscategory13 = WorksCategory.new
+ workscategory13.category = "教育阅读"
+ workscategory13.save
+
+ workscategory14 = WorksCategory.new
+ workscategory14.category = "主题桌面"
+ workscategory14.save
+
+ workscategory15 = WorksCategory.new
+ workscategory15.category = "事务管理"
+ workscategory15.save
+
+ workscategory16 = WorksCategory.new
+ workscategory16.category = "系统工具"
+ workscategory16.save
+
+ workscategory17 = WorksCategory.new
+ workscategory17.category = "资讯新闻"
+ workscategory17.save
+
+ workscategory18 = WorksCategory.new
+ workscategory18.category = "金融理财"
+ workscategory18.save
+
+ workscategory19 = WorksCategory.new
+ workscategory19.category = "通话通信"
+ workscategory19.save
+
+ workscategory20 = WorksCategory.new
+ workscategory20.category = "电子办公"
+ workscategory20.save
+
+ workscategory21 = WorksCategory.new
+ workscategory21.category = "体育竞技"
+ workscategory21.save
+
+ workscategory22 = WorksCategory.new
+ workscategory22.category = "健康医疗"
+ workscategory22.save
+ end
+
+ def down
+ WorksCategory.all do |wc|
+ wc.destroy
+ end
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 4a14a02f2..87e6be3f3 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 => 20140716021558) do
+ActiveRecord::Schema.define(:version => 20140719030941) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -916,7 +916,7 @@ ActiveRecord::Schema.define(:version => 20140716021558) do
create_table "softapplications", :force => true do |t|
t.string "name"
- t.string "description"
+ t.text "description"
t.integer "app_type_id"
t.string "app_type_name"
t.string "android_min_version_available"
@@ -1212,4 +1212,10 @@ ActiveRecord::Schema.define(:version => 20140716021558) do
add_index "workflows", ["role_id", "tracker_id", "old_status_id"], :name => "wkfs_role_tracker_old_status"
add_index "workflows", ["role_id"], :name => "index_workflows_on_role_id"
+ create_table "works_categories", :force => true do |t|
+ t.string "category"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
end
diff --git a/test/fixtures/works_categories.yml b/test/fixtures/works_categories.yml
new file mode 100644
index 000000000..d353b9d70
--- /dev/null
+++ b/test/fixtures/works_categories.yml
@@ -0,0 +1,7 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+one:
+ category: MyString
+
+two:
+ category: MyString
diff --git a/test/unit/works_category_test.rb b/test/unit/works_category_test.rb
new file mode 100644
index 000000000..16cf45b58
--- /dev/null
+++ b/test/unit/works_category_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class WorksCategoryTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
From 206aeeccfb952ba67689dc04937b010e2e8df4d1 Mon Sep 17 00:00:00 2001
From: nwb
Date: Sat, 19 Jul 2014 11:39:09 +0800
Subject: [PATCH 3/6] =?UTF-8?q?=E4=BC=98=E5=8C=962=E7=BA=A7=E8=8F=9C?=
=?UTF-8?q?=E5=8D=95=E6=95=88=E6=9E=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/layouts/_base_header.html.erb | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/app/views/layouts/_base_header.html.erb b/app/views/layouts/_base_header.html.erb
index 7e11d8357..17f0d1e60 100644
--- a/app/views/layouts/_base_header.html.erb
+++ b/app/views/layouts/_base_header.html.erb
@@ -41,6 +41,7 @@
<%=link_to_user(User.current)%>