From 546ffde4983333f1c4a1f8086cfef3f90bfcd329 Mon Sep 17 00:00:00 2001 From: whimlex Date: Mon, 20 Jul 2015 09:09:04 +0800 Subject: [PATCH 1/3] commit --- db/schema.rb | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index 78dfb5eee..70a3fb2c1 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,12 +11,14 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20150702073308) do +ActiveRecord::Schema.define(:version => 20150715162300) do create_table "activities", :force => true do |t| - t.integer "act_id", :null => false - t.string "act_type", :null => false - t.integer "user_id", :null => false + t.integer "act_id", :null => false + t.string "act_type", :null => false + t.integer "user_id", :null => false + t.integer "activity_container_id" + t.string "activity_container_type", :default => "" end add_index "activities", ["act_id", "act_type"], :name => "index_activities_on_act_id_and_act_type" @@ -721,16 +723,6 @@ ActiveRecord::Schema.define(:version => 20150702073308) do add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id" - create_table "journal_details_copy", :force => true do |t| - t.integer "journal_id", :default => 0, :null => false - t.string "property", :limit => 30, :default => "", :null => false - t.string "prop_key", :limit => 30, :default => "", :null => false - t.text "old_value" - t.text "value" - end - - add_index "journal_details_copy", ["journal_id"], :name => "journal_details_journal_id" - create_table "journal_replies", :id => false, :force => true do |t| t.integer "journal_id" t.integer "user_id" @@ -1340,7 +1332,7 @@ ActiveRecord::Schema.define(:version => 20150702073308) do end create_table "user_extensions", :force => true do |t| - t.integer "user_id", :null => false + t.integer "user_id", :null => false t.date "birthday" t.string "brief_introduction" t.integer "gender" @@ -1348,8 +1340,8 @@ ActiveRecord::Schema.define(:version => 20150702073308) do t.string "occupation" t.integer "work_experience" t.integer "zip_code" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.string "technical_title" t.integer "identity" t.string "student_id" @@ -1357,6 +1349,7 @@ ActiveRecord::Schema.define(:version => 20150702073308) do t.string "student_realname" t.string "location_city" t.integer "school_id" + t.string "description", :default => "" end create_table "user_grades", :force => true do |t| @@ -1462,6 +1455,17 @@ ActiveRecord::Schema.define(:version => 20150702073308) do add_index "versions", ["project_id"], :name => "versions_project_id" add_index "versions", ["sharing"], :name => "index_versions_on_sharing" + create_table "visitors", :force => true do |t| + t.integer "user_id" + t.integer "master_id" + t.datetime "updated_on" + t.datetime "created_on" + end + + add_index "visitors", ["master_id"], :name => "index_visitors_master_id" + add_index "visitors", ["updated_on"], :name => "index_visitors_updated_on" + add_index "visitors", ["user_id"], :name => "index_visitors_user_id" + create_table "watchers", :force => true do |t| t.string "watchable_type", :default => "", :null => false t.integer "watchable_id", :default => 0, :null => false From 2518305959e7cb74cf3be288ef1bc192b7459df3 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 9 Oct 2015 16:12:02 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E4=BF=AE=E6=94=B9=EF=BC=9B=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=8F=90=E7=A4=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 12 ++++-------- app/views/admin/projects.html.erb | 10 +++++++++- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index a8a302045..90974b376 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -659,14 +659,10 @@ class ProjectsController < ApplicationController # Delete @project def destroy @project_to_destroy = @project - if api_request? || params[:confirm] - @project_to_destroy.destroy - respond_to do |format| - format.html { redirect_to admin_projects_url } - format.api { render_api_ok } - end - else - render :layout => "base_projects" + @project_to_destroy.destroy + respond_to do |format| + format.html { redirect_to admin_projects_url } + format.api { render_api_ok } end # hide project in layout @project = nil diff --git a/app/views/admin/projects.html.erb b/app/views/admin/projects.html.erb index f5b7955bf..3f6ee36f0 100644 --- a/app/views/admin/projects.html.erb +++ b/app/views/admin/projects.html.erb @@ -65,7 +65,7 @@ <%= link_to(l(:button_archive), { :controller => 'projects', :action => 'archive', :id => project, :status => params[:status] }, :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock') unless project.archived? %> <%= link_to(l(:button_unarchive), { :controller => 'projects', :action => 'unarchive', :id => project, :status => params[:status] }, :method => :post, :class => 'icon icon-unlock') if project.archived? && (project.parent.nil? || !project.parent.archived?) %> <%= link_to(l(:button_copy), { :controller => 'projects', :action => 'copy', :id => project }, :class => 'icon icon-copy') %> - <%= link_to(l(:button_delete), project_path(project), :method => :delete, :class => 'icon icon-del') %> + <%= link_to(l(:button_delete), project_path(project), :method => :delete, :class => 'icon icon-del', :onClick=>"delcfm()" ) %> <% end %> @@ -74,3 +74,11 @@ <% html_title(l(:label_project_plural)) -%> + + \ No newline at end of file From 171d30e11261cf697b6768b20caa1e59d2e46076 Mon Sep 17 00:00:00 2001 From: whimlex Date: Sat, 10 Oct 2015 09:02:09 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=BC=BA=E9=99=B7?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E9=A1=B9=E7=9B=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_project_issue.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb index 2c429a93f..02d1940a6 100644 --- a/app/views/users/_project_issue.html.erb +++ b/app/views/users/_project_issue.html.erb @@ -10,7 +10,7 @@ <% else %> <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %> <% end %> TO - <%= link_to activity.project.name.to_s+" | 项目缺陷", project_issues_path(activity.project), :class => "newsBlue ml15"%> + <%= link_to activity.project.name.to_s+" | 项目问题", project_issues_path(activity.project), :class => "newsBlue ml15"%>
<%= link_to activity.subject.to_s, issue_path(activity), :class => "postGrey" %>