From 80b2a2dc45c05a0bdd96cfc7fc91d3e0a65c516f Mon Sep 17 00:00:00 2001 From: z9hang Date: Mon, 4 Aug 2014 12:23:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=85=AC=E5=85=B1=E8=B4=B4?= =?UTF-8?q?=E5=90=A7=E6=96=B0=E5=BB=BA=E5=B8=96=E5=AD=90=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20=E4=BF=AE=E6=AD=A3=E8=AF=BE=E7=A8=8B=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/memos_controller.rb | 7 ++++++- app/helpers/project_score_helper.rb | 8 ++++++++ app/views/courses/_course.html.erb | 2 +- db/schema.rb | 15 +-------------- 4 files changed, 16 insertions(+), 16 deletions(-) create mode 100644 app/helpers/project_score_helper.rb diff --git a/app/controllers/memos_controller.rb b/app/controllers/memos_controller.rb index 587b198d7..7f71c2085 100644 --- a/app/controllers/memos_controller.rb +++ b/app/controllers/memos_controller.rb @@ -40,7 +40,12 @@ class MemosController < ApplicationController end def create - @quote = params[:quote][:quote] + unless params[:quote].nil? + @quote = params[:quote][:quote] + else + @quote = "" + end + @memo = Memo.new(params[:memo]) @memo.forum_id = params[:forum_id] @memo.author_id = User.current.id diff --git a/app/helpers/project_score_helper.rb b/app/helpers/project_score_helper.rb new file mode 100644 index 000000000..3df2e05b5 --- /dev/null +++ b/app/helpers/project_score_helper.rb @@ -0,0 +1,8 @@ +# encoding: utf-8 +class ProjectScoreHelper + #缺陷数量 + def issue_num project + + end + +end \ No newline at end of file diff --git a/app/views/courses/_course.html.erb b/app/views/courses/_course.html.erb index 8e1a7950d..ddf08c3fb 100644 --- a/app/views/courses/_course.html.erb +++ b/app/views/courses/_course.html.erb @@ -44,7 +44,7 @@

<%= content_tag('span', "#{garble @course.members.count}", :class => "info") %> <%#= content_tag('span', l(:label_x_member, :count => @course.members.count)) %> - <%= content_tag('span', l(:label_x_member, :count => studentCount(@course)+teacherCount(@course))) %> + <%= content_tag('span', l(:label_x_member, :count => memberCount(@course))) %>

diff --git a/db/schema.rb b/db/schema.rb index 7643adb4b..a721633fd 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -419,9 +419,9 @@ ActiveRecord::Schema.define(:version => 20140730024419) do t.string "web_title" t.string "title" t.text "description" + t.string "page_type" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false - t.string "page_type" t.integer "sort_type" t.integer "image_width", :default => 107 t.integer "image_height", :default => 63 @@ -882,19 +882,6 @@ ActiveRecord::Schema.define(:version => 20140730024419) do add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id" - create_table "rich_rich_files", :force => true do |t| - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "rich_file_file_name" - t.string "rich_file_content_type" - t.integer "rich_file_file_size" - t.datetime "rich_file_updated_at" - t.string "owner_type" - t.integer "owner_id" - t.text "uri_cache" - t.string "simplified_type", :default => "file" - end - create_table "roles", :force => true do |t| t.string "name", :limit => 30, :default => "", :null => false t.integer "position", :default => 1