From d390c84de0831414b187820d6c14d6b2312e4308 Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Fri, 6 Mar 2015 15:29:05 +0800 Subject: [PATCH 01/15] Signed-off-by: alan <547533434@qq.com> --- db/schema.rb | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index 4a3b14edc..b863dbaed 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20150302091345) do +ActiveRecord::Schema.define(:version => 20150305011359) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -631,16 +631,6 @@ ActiveRecord::Schema.define(:version => 20150302091345) 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" @@ -825,6 +815,13 @@ ActiveRecord::Schema.define(:version => 20150302091345) do t.integer "project_id" end + create_table "organizations", :force => true do |t| + t.string "name" + t.string "logo_link" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + create_table "poll_answers", :force => true do |t| t.integer "poll_question_id" t.text "answer_text" @@ -949,6 +946,7 @@ ActiveRecord::Schema.define(:version => 20150302091345) do t.integer "user_id" t.integer "dts_test", :default => 0 t.string "enterprise_name" + t.integer "organization_id" end add_index "projects", ["lft"], :name => "index_projects_on_lft" @@ -1036,12 +1034,12 @@ ActiveRecord::Schema.define(:version => 20150302091345) do end create_table "roles", :force => true do |t| - t.string "name", :limit => 90 - t.integer "position" - t.boolean "assignable" - t.integer "builtin" + t.string "name", :limit => 30, :default => "", :null => false + t.integer "position", :default => 1 + t.boolean "assignable", :default => true + t.integer "builtin", :default => 0, :null => false t.text "permissions" - t.string "issues_visibility", :limit => 90 + t.string "issues_visibility", :limit => 30, :default => "default", :null => false end create_table "schools", :force => true do |t| From f50ea0f78046d53107d3607427f4bdbd3f739e29 Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Fri, 6 Mar 2015 16:36:12 +0800 Subject: [PATCH 02/15] Signed-off-by: alan <547533434@qq.com> --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 3f07ad408..299af4509 100644 --- a/Gemfile +++ b/Gemfile @@ -22,7 +22,7 @@ gem 'spreadsheet' gem 'ruby-ole' #gem 'email_verifier', path: 'lib/email_verifier' gem 'rufus-scheduler' -gem 'dalli', path: 'lib/dalli-2.7.2' +#gem 'dalli', path: 'lib/dalli-2.7.2' group :development do gem 'grape-swagger' gem 'grape-swagger-ui', git: 'https://github.com/guange2015/grape-swagger-ui.git' From b3cbfd39cabb8e43cb05b790f72b8980befde94b Mon Sep 17 00:00:00 2001 From: huang Date: Sat, 7 Mar 2015 01:07:50 +0800 Subject: [PATCH 03/15] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E7=BC=BA=E9=99=B7=EF=BC=8C=E5=88=A0=E6=8E=89=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E7=9A=84=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/_newfile_index.html.erb | 250 ---------------------- app/views/files/index.html.erb | 250 +++++++++++++++++++++- app/views/files/index.js.erb | 2 - app/views/issues/_newissue_index.html.erb | 6 +- app/views/issues/show.html.erb | 2 +- app/views/layouts/base_projects.html.erb | 12 +- app/views/memos/new.html.erb | 4 +- app/views/projects/show.html.erb | 9 +- app/views/projects/show.js.erb | 1 - app/views/tags/_project_tag.html.erb | 4 +- 10 files changed, 272 insertions(+), 268 deletions(-) delete mode 100644 app/views/files/_newfile_index.html.erb delete mode 100644 app/views/files/index.js.erb delete mode 100644 app/views/projects/show.js.erb diff --git a/app/views/files/_newfile_index.html.erb b/app/views/files/_newfile_index.html.erb deleted file mode 100644 index 5ffaacae4..000000000 --- a/app/views/files/_newfile_index.html.erb +++ /dev/null @@ -1,250 +0,0 @@ - -
- <% if @isproject %> - <%= render :partial => 'project_file', locals: {project: @project} %> - <% else %> - <%= render :partial => 'course_file', locals: {course: @course} %> - <% end %> -
- - - - - diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index 39bc8b52e..4b6df47cb 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -1 +1,249 @@ -<%= render :partial => 'files/newfile_index' %> \ No newline at end of file +
+ <% if @isproject %> + <%= render :partial => 'project_file', locals: {project: @project} %> + <% else %> + <%= render :partial => 'course_file', locals: {course: @course} %> + <% end %> +
+ + + + + diff --git a/app/views/files/index.js.erb b/app/views/files/index.js.erb deleted file mode 100644 index 59bc2407f..000000000 --- a/app/views/files/index.js.erb +++ /dev/null @@ -1,2 +0,0 @@ -alert("eeee"); -$('#content').html('<%= escape_javascript(render :partial => 'issues/newissue_index') %>'); diff --git a/app/views/issues/_newissue_index.html.erb b/app/views/issues/_newissue_index.html.erb index f0b7c0108..b89ba41a2 100644 --- a/app/views/issues/_newissue_index.html.erb +++ b/app/views/issues/_newissue_index.html.erb @@ -4,13 +4,15 @@
<% if @project.enabled_modules.where("name = 'issue_tracking'").count > 0 %> - <%= link_to l(:label_issue_new), {:controller => 'issues', :action => 'new', :copy_from => nil}, :param => :project_id, :caption => :label_issue_new, + <% if User.current.member_of?(@project) %> + <%= link_to l(:label_issue_new), {:controller => 'issues', :action => 'new', :copy_from => nil}, :param => :project_id, :caption => :label_issue_new, :html => {:accesskey => Redmine::AccessKeys.key_for(:new_issue)}, :class => 'icon icon-add' %> + <% end %> <%= link_to l(:label_query), '#', :class => 'icon icon-help', :onclick => '$("#custom_query").slideToggle(400); ' if true || User.current.logged? %> <% end %> - 问题总数:100 未解决:20 + 问题总数:<%= @project.issues.count %> 未解决:<%= @project.issues.where('status_id in (1,2,4,6)').count %>
<% if !@query.new_record? && @query.editable_by?(User.current) %> diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index fb8296f64..69abf79a6 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -1,5 +1,5 @@
-

问题跟踪

+

<%= l(:label_issue_plural) %>

<%# html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %> <% html_title "#{@issue.tracker.name} #{@issue.source_from}'#'#{@issue.project_index}: #{@issue.subject}" %> diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index 2bc86d1ca..f7e4a2132 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -103,7 +103,11 @@
- +
<% if @project.project_type == 0 %> @@ -129,9 +133,7 @@
  • 邀请Trustie注册用户