diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index a765963a9..a132ec295 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -24,7 +24,7 @@ class IssuesController < ApplicationController before_filter :find_issues, :only => [:bulk_edit, :bulk_update, :destroy] before_filter :find_project, :only => [:new, :create, :update_form] #before_filter :authorize, :except => [:index, :show] - before_filter :authorize, :except => [:index,:add_journal, :add_journal_in_org] + before_filter :authorize, :except => [:index,:add_journal, :add_journal_in_org,:delete_journal,:reply,:add_reply] before_filter :find_optional_project, :only => [:index] before_filter :check_for_default_issue_status, :only => [:new, :create] diff --git a/app/models/journal.rb b/app/models/journal.rb index 8aec82911..638a98006 100644 --- a/app/models/journal.rb +++ b/app/models/journal.rb @@ -28,7 +28,7 @@ class Journal < ActiveRecord::Base has_one :journal_reply has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy # 被ForgeActivity虚拟关联 - has_many :forge_acts, :class_name => 'ForgeActivity',:as =>:forge_act ,:dependent => :destroy + #has_many :forge_acts, :class_name => 'ForgeActivity',:as =>:forge_act ,:dependent => :destroy 评论不应该算入 # 被ForgeMessage虚拟关联 has_many :forge_messages, :class_name => 'ForgeMessage',:as =>:forge_message ,:dependent => :destroy @@ -52,7 +52,7 @@ class Journal < ActiveRecord::Base before_create :split_private_notes # fq - after_save :act_as_activity,:be_user_score,:act_as_forge_activity, :act_as_forge_message, :act_as_at_message + after_save :act_as_activity,:be_user_score, :act_as_forge_message, :act_as_at_message # end #after_destroy :down_user_score #before_save :be_user_score @@ -162,14 +162,14 @@ class Journal < ActiveRecord::Base end # end - # Time 2015-02-27 13:30:19 - # Author lizanle - # Description 公共表中需要保存一份该记录 - def act_as_forge_activity - self.forge_acts << ForgeActivity.new(:user_id => self.user_id, - :project_id => self.issue.project.id) - - end + # # Time 2015-02-27 13:30:19 + # # Author lizanle + # # Description 公共表中需要保存一份该记录 + # def act_as_forge_activity + # self.forge_acts << ForgeActivity.new(:user_id => self.user_id, + # :project_id => self.issue.project.id) + # + # end # 缺陷状态更改,消息提醒 def act_as_forge_message diff --git a/app/views/issues/_edit.html.erb b/app/views/issues/_edit.html.erb index a1bde3981..529de3480 100644 --- a/app/views/issues/_edit.html.erb +++ b/app/views/issues/_edit.html.erb @@ -20,9 +20,9 @@ -
回复 - <%= f.kindeditor :notes, :style => "width:99%;",:height=>'100px', :cssData =>"blockquote { padding:0px}", :rows => "5", :no_label => true, :editor_id=>'issue_journal_kind_reply', at_id: @issue.id, at_type: @issue.class.to_s %> -
+ + <%#= f.kindeditor :notes, :style => "width:99%;",:height=>'100px', :cssData =>"blockquote { padding:0px}", :rows => "5", :no_label => true, :editor_id=>'issue_journal_kind_reply', at_id: @issue.id, at_type: @issue.class.to_s %> + diff --git a/app/views/issues/_issue_replies.html.erb b/app/views/issues/_issue_replies.html.erb index 5e6e624b6..6ee676f8c 100644 --- a/app/views/issues/_issue_replies.html.erb +++ b/app/views/issues/_issue_replies.html.erb @@ -17,7 +17,7 @@ <% else %> <%= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %> <% end %> - <%= format_time(reply.created_on) %> + <%#= format_time(reply.created_on) %>
<% if reply.details.any? %> diff --git a/app/views/issues/new.html.erb b/app/views/issues/new.html.erb index fe2ef7a56..b1d6c7668 100644 --- a/app/views/issues/new.html.erb +++ b/app/views/issues/new.html.erb @@ -20,10 +20,10 @@
<%= render :partial => 'issues/form', :locals => {:f => f} %>
- - - <%= l(:button_create) %> - + + + + <%#= preview_link preview_new_issue_path(:project_id => @project), 'issue-form', 'preview', {:class => "blue_btn fl ml10"} %> <% end %>
diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index e7616a020..b385dff1f 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -22,12 +22,12 @@ <% else %> <%= render :partial => 'navigation' %>
克隆网址:
- +
ZIP
<%# 针对公开项目:用户必须创建了项目,否则用户无法同步 %> <% if User.current.id != @project.user_id %> -
<%= link_to "".html_safe+"Fork", {:controller => 'repositories', :action => 'forked'}, :class=>"vl_btn"%> +
<%= link_to "".html_safe+"Fork", {:controller => 'repositories', :action => 'forked'}, :class=>"vl_btn", :confirm=>"确认要fork该项目吗?" %> <%= @project.forked_count.to_i %>
<% end %> diff --git a/db/schema.rb b/db/schema.rb index df2b94ae9..c0d4da2f8 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -70,11 +70,11 @@ ActiveRecord::Schema.define(:version => 20151217051447) do t.integer "user_id" t.integer "at_message_id" t.string "at_message_type" - t.boolean "viewed" + t.boolean "viewed", :default => false t.string "container_type" t.integer "container_id" - 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.integer "sender_id" end @@ -1640,10 +1640,6 @@ ActiveRecord::Schema.define(:version => 20151217051447) do t.string "extra" end - create_table "temp", :id => false, :force => true do |t| - t.integer "id", :default => 0, :null => false - end - create_table "time_entries", :force => true do |t| t.integer "project_id", :null => false t.integer "user_id", :null => false