From dd43e2c3fcb0e3f7e322f2ec539b7676a3dc303c Mon Sep 17 00:00:00 2001 From: wanglinchun Date: Wed, 21 May 2014 09:38:08 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E9=A1=B5=E9=9D=A2=E6=88=91?= =?UTF-8?q?=E8=A6=81=E5=8F=82=E8=B5=9B=E4=B8=AD=E6=B7=BB=E5=8A=A0=E5=88=A4?= =?UTF-8?q?=E6=96=AD=EF=BC=8C=E5=BD=93=E7=94=A8=E6=88=B7=E6=9C=AA=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E6=97=B6=E6=8F=90=E7=A4=BA=E7=99=BB=E5=BD=95=E5=90=8E?= =?UTF-8?q?=E5=8F=82=E8=B5=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contests/show_attendingcontest.html.erb | 34 +++++++++++-------- config/locales/zh.yml | 1 + db/schema.rb | 25 ++++++++++---- 3 files changed, 39 insertions(+), 21 deletions(-) diff --git a/app/views/contests/show_attendingcontest.html.erb b/app/views/contests/show_attendingcontest.html.erb index d68402e1..426aa172 100644 --- a/app/views/contests/show_attendingcontest.html.erb +++ b/app/views/contests/show_attendingcontest.html.erb @@ -66,21 +66,27 @@
1) 若您已完成开发,且只希望发布您的作品,“托管项目”一项可以不选;
2) 若您希望托管竞赛数据和代码以及保留开发和提交代码的轨迹,请从“托管项目”中选择一项您已创建好的项目作为该参赛作品的托管项目,若您还没有创建项目,请点击右边的“创建项目”,然后回到本页再选择。
+ <% if User.current.logged? %> - -
-
- 参加竞赛: - <%= link_to '新建参赛作品', "javascript:void(0);", onclick: "$('#put-project-form').toggle();" %> +
+
+ 参加竞赛: + <%= link_to '新建参赛作品', "javascript:void(0);", onclick: "$('#put-project-form').toggle();" %> +
+ +
- - -
+<% else %> +
+ <%= l(:label_user_login_attending_contest) %> + <%= link_to l(:label_user_login_new), signin_path %> +
+<% end %> -<% end %> +
diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 65e11310..e576e106 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -554,6 +554,7 @@ zh: label_user_login_tips: 您还没有登录,请登录后留言 label_user_login_course_board: 您还没有登录,请登录后参与课程讨论 label_user_login_project_board: 您还没有登录,请登录后参与项目讨论 + label_user_login_attending_contest: 您还没有登录,请登录后参赛 #end #by huang # modified by bai label_college: 高校进入 diff --git a/db/schema.rb b/db/schema.rb index dec87fda..e0c88c3f 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -23,6 +23,11 @@ ActiveRecord::Schema.define(:version => 20140519074133) do add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type" add_index "activities", ["user_id"], :name => "index_activities_on_user_id" + create_table "andoidcontests", :force => true do |t| + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + create_table "apply_project_masters", :force => true do |t| t.integer "user_id" t.string "apply_type" @@ -864,13 +869,6 @@ ActiveRecord::Schema.define(:version => 20140519074133) do add_index "user_grades", ["project_id"], :name => "index_user_grades_on_project_id" add_index "user_grades", ["user_id"], :name => "index_user_grades_on_user_id" - create_table "user_levels", :force => true do |t| - t.integer "user_id" - t.integer "level" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - create_table "user_preferences", :force => true do |t| t.integer "user_id", :default => 0, :null => false t.text "others" @@ -880,6 +878,19 @@ ActiveRecord::Schema.define(:version => 20140519074133) do add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id" + create_table "user_scores", :force => true do |t| + t.integer "user_id", :null => false + t.integer "collaboration" + t.integer "influence" + t.integer "skill" + t.integer "active" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "level" + t.integer "file" + t.integer "issue" + end + create_table "user_statuses", :force => true do |t| t.integer "changesets_count" t.integer "watchers_count"