添加项目统计字段
This commit is contained in:
parent
762ebb150b
commit
f3b732460c
|
@ -6,7 +6,7 @@
|
||||||
</div>
|
</div>
|
||||||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
||||||
<div class="subNav">
|
<div class="subNav">
|
||||||
<%= link_to l(:label_issue_tracking), project_issues_path(@project), :class => "f14 c_blue02" %>
|
<%= link_to l(:label_issue_tracking), project_issues_path(@project, :remote => true), :class => "f14 c_blue02" %>
|
||||||
<% if (issue_count = @project.issues.count) > 0 %>
|
<% if (issue_count = @project.issues.count) > 0 %>
|
||||||
<a class="subnav_num">(<%= issue_count %>)</a>
|
<a class="subnav_num">(<%= issue_count %>)</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddIssuesCountToProject < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :projects, :issues_count, :integer, :default => false
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddAttachmentsCountToProject < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :projects, :attachments_count, :integer, :default => false
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddBoardsCountToProject < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :projects, :boards_count, :integer, :default => false
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddNewsCountToProject < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :projects, :news_count, :integer, :default => false
|
||||||
|
end
|
||||||
|
end
|
33
db/schema.rb
33
db/schema.rb
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20160108021447) do
|
ActiveRecord::Schema.define(:version => 20160111065530) do
|
||||||
|
|
||||||
create_table "activities", :force => true do |t|
|
create_table "activities", :force => true do |t|
|
||||||
t.integer "act_id", :null => false
|
t.integer "act_id", :null => false
|
||||||
|
@ -207,6 +207,7 @@ ActiveRecord::Schema.define(:version => 20160108021447) do
|
||||||
t.integer "author_id"
|
t.integer "author_id"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
|
t.integer "homepage_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "boards", :force => true do |t|
|
create_table "boards", :force => true do |t|
|
||||||
|
@ -981,13 +982,14 @@ ActiveRecord::Schema.define(:version => 20160108021447) do
|
||||||
t.text "notes"
|
t.text "notes"
|
||||||
t.integer "status"
|
t.integer "status"
|
||||||
t.integer "reply_id"
|
t.integer "reply_id"
|
||||||
t.datetime "created_on", :null => false
|
t.datetime "created_on", :null => false
|
||||||
t.datetime "updated_on", :null => false
|
t.datetime "updated_on", :null => false
|
||||||
t.string "m_parent_id"
|
t.string "m_parent_id"
|
||||||
t.boolean "is_readed"
|
t.boolean "is_readed"
|
||||||
t.integer "m_reply_count"
|
t.integer "m_reply_count"
|
||||||
t.integer "m_reply_id"
|
t.integer "m_reply_id"
|
||||||
t.integer "is_comprehensive_evaluation"
|
t.integer "is_comprehensive_evaluation"
|
||||||
|
t.integer "private", :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "kindeditor_assets", :force => true do |t|
|
create_table "kindeditor_assets", :force => true do |t|
|
||||||
|
@ -1215,6 +1217,18 @@ ActiveRecord::Schema.define(:version => 20160108021447) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "org_messages", :force => true do |t|
|
||||||
|
t.integer "user_id"
|
||||||
|
t.integer "sender_id"
|
||||||
|
t.integer "organization_id"
|
||||||
|
t.string "message_type"
|
||||||
|
t.integer "message_id"
|
||||||
|
t.integer "viewed"
|
||||||
|
t.string "content"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "org_projects", :force => true do |t|
|
create_table "org_projects", :force => true do |t|
|
||||||
t.integer "organization_id"
|
t.integer "organization_id"
|
||||||
t.integer "project_id"
|
t.integer "project_id"
|
||||||
|
@ -1397,6 +1411,10 @@ ActiveRecord::Schema.define(:version => 20160108021447) do
|
||||||
t.integer "forked_count"
|
t.integer "forked_count"
|
||||||
t.integer "commits_count", :default => 0
|
t.integer "commits_count", :default => 0
|
||||||
t.integer "publish_resource", :default => 0
|
t.integer "publish_resource", :default => 0
|
||||||
|
t.integer "issues_count", :default => 0
|
||||||
|
t.integer "attachments_count", :default => 0
|
||||||
|
t.integer "boards_count", :default => 0
|
||||||
|
t.integer "news_count", :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "projects", ["lft"], :name => "index_projects_on_lft"
|
add_index "projects", ["lft"], :name => "index_projects_on_lft"
|
||||||
|
@ -1543,6 +1561,15 @@ ActiveRecord::Schema.define(:version => 20160108021447) do
|
||||||
t.string "description"
|
t.string "description"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "shield_activities", :force => true do |t|
|
||||||
|
t.string "container_type"
|
||||||
|
t.integer "container_id"
|
||||||
|
t.string "shield_type"
|
||||||
|
t.integer "shield_id"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "softapplications", :force => true do |t|
|
create_table "softapplications", :force => true do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.text "description"
|
t.text "description"
|
||||||
|
|
Loading…
Reference in New Issue