From 75b9fccb84a95b0ed4a33acc1a35d4fa68e93a02 Mon Sep 17 00:00:00 2001 From: z9hang Date: Fri, 10 Oct 2014 10:49:21 +0800 Subject: [PATCH 1/2] =?UTF-8?q?#1309=20=E9=A1=B9=E7=9B=AE--=E9=85=8D?= =?UTF-8?q?=E7=BD=AE--=E6=A8=A1=E5=9D=97=EF=BC=9A=E4=B8=8D=E5=8B=BE?= =?UTF-8?q?=E9=80=89=E7=9B=B8=E5=85=B3=E6=A8=A1=E5=9D=97=EF=BC=8C=E5=8D=B4?= =?UTF-8?q?=E4=B9=9F=E8=83=BD=E5=9C=A8=E9=A1=B9=E7=9B=AE=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=E6=98=BE=E7=A4=BA,=E8=A7=A3=E5=86=B3=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E5=88=A4=E6=96=AD=EF=BC=8C=E4=B8=8D=E5=8B=BE?= =?UTF-8?q?=E9=80=89=E7=9A=84=E6=A8=A1=E5=9D=97=E4=B8=8D=E5=86=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E3=80=82admin=E9=A6=96=E9=A1=B5=E5=AE=9A=E5=88=B6?= =?UTF-8?q?=E4=B8=AD=E8=AE=BE=E7=BD=AE=E4=B8=8D=E6=98=BE=E7=A4=BA=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E6=97=B6=EF=BC=8C=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=E5=87=BA=E7=9A=84=E8=AF=BE=E7=A8=8Btab=E9=A1=B5=E4=B9=9F?= =?UTF-8?q?=E4=B8=8D=E5=9C=A8=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/redmine.rb | 10 +++++----- plugins/redmine_code_review/init.rb | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/redmine.rb b/lib/redmine.rb index 55511c5b5..8803a544f 100644 --- a/lib/redmine.rb +++ b/lib/redmine.rb @@ -384,20 +384,20 @@ Redmine::MenuManager.map :project_menu do |menu| # menu.push :activity, { :controller => 'activities', :action => 'index' } #menu.push :roadmap, { :controller => 'versions', :action => 'index' }, :param => :project_id # :if => Proc.new { |p| p.shared_versions.any? } - menu.push :issues, { :controller => 'issues', :action => 'index' }, :param => :project_id, :caption => :label_issue_plural + menu.push :issues, { :controller => 'issues', :action => 'index' },:if => Proc.new {|p| p.enabled_module_names.include?('issues') } ,:param => :project_id, :caption => :label_issue_plural # menu.push :new_issue, { :controller => 'issues', :action => 'new', :copy_from => nil }, :param => :project_id, :caption => :label_issue_new, # :html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) } # menu.push :gantt, { :controller => 'gantts', :action => 'show' }, :param => :project_id, :caption => :label_gantt # menu.push :calendar, { :controller => 'calendars', :action => 'show' }, :param => :project_id, :caption => :label_calendar - menu.push :news, { :controller => 'news', :action => 'index' }, :param => :project_id, :caption => :label_news_plural + menu.push :news, { :controller => 'news', :action => 'index' }, :if => Proc.new {|p| p.enabled_module_names.include?('news') },:param => :project_id, :caption => :label_news_plural # menu.push :documents, { :controller => 'documents', :action => 'index' }, :param => :project_id, :caption => :label_document_plural # menu.push :wiki, { :controller => 'wiki', :action => 'show', :id => nil }, :param => :project_id, # :if => Proc.new { |p| p.wiki && !p.wiki.new_record? } menu.push :boards, { :controller => 'boards', :action => 'index', :id => nil }, :param => :project_id, - :if => Proc.new { |p| p.boards.any? }, :caption => :label_board_plural + :if => Proc.new { |p| p.boards.any? && p.enabled_module_names.include?('boards') }, :caption => :label_board_plural #menu.push :files, { :controller => 'files', :action => 'index' }, :param => :project_id, :caption => :label_file_new menu.push :repository, { :controller => 'repositories', :action => 'show', :repository_id => nil, :path => nil, :rev => nil }, - :if => Proc.new { |p| p.repository && !p.repository.new_record? && !( !User.current.member_of?(p) && p.hidden_repo ) } + :if => Proc.new { |p| p.repository && !p.repository.new_record? && !( !User.current.member_of?(p) && p.hidden_repo ) && p.enabled_module_names.include?('repository') } menu.push :settings, { :controller => 'projects', :action => 'settings' }, :last => true end @@ -415,7 +415,7 @@ Redmine::MenuManager.map :course_menu do |menu| end Redmine::MenuManager.map :user_menu do |menu| menu.push :activity, {:controller => 'users', :action => 'show', :host => Setting.user_domain } - menu.push :user_course, {:controller => 'users', :action => 'user_courses'} + menu.push :user_course, {:controller => 'users', :action => 'user_courses'},:if => Proc.new {|c| FirstPage.where("page_type = 'project'").first.show_course != 2} #menu.push :user_homework, {:controller => 'users', :action => 'user_homeworks'} by huang menu.push :user_project, {:controller => 'users', :action => 'user_projects', :host => Setting.project_domain} # menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids'} by huang diff --git a/plugins/redmine_code_review/init.rb b/plugins/redmine_code_review/init.rb index 651de0baf..53841c8f2 100644 --- a/plugins/redmine_code_review/init.rb +++ b/plugins/redmine_code_review/init.rb @@ -73,7 +73,7 @@ Redmine::Plugin.register :redmine_code_review do menu :project_menu, :code_review, { :controller => 'code_review', :action => 'index' }, :caption => :code_reviews, :if => Proc.new{|project| setting = CodeReviewProjectSetting.find_or_create(project) - project.repository != nil and setting and !setting.hide_code_review_tab + project.repository != nil and setting and !setting.hide_code_review_tab and project.enabled_module_names.include?('code_review') }, :after => :repository From a6efe10984aaacff13b9a7929b6db668959b4fd2 Mon Sep 17 00:00:00 2001 From: z9hang Date: Fri, 10 Oct 2014 11:46:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?1=E3=80=81#1313=20=E8=AF=BE=E7=A8=8B/?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=EF=BC=9A=E8=B5=84=E6=BA=90=E5=BA=93=E2=80=9C?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=AC=A1=E6=95=B0=E2=80=9C=E5=AD=97=E6=A0=B7?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF,=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=B6=E6=A0=B7=E5=BC=8F=E3=80=822?= =?UTF-8?q?=E3=80=81=E9=A1=B9=E7=9B=AE=E7=BC=BA=E9=99=B7=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E5=8B=BE=E4=B8=8A=E4=B9=9F=E4=B8=8D=E6=98=BE=E7=A4=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E5=8E=9F=E5=9B=A0=EF=BC=9A=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E5=8C=B9=E9=85=8D=E9=94=99=E8=AF=AF=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B9=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../files/_course_show_all_attachment.html.erb | 14 +++++++------- lib/redmine.rb | 2 +- public/stylesheets/application.css | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/views/files/_course_show_all_attachment.html.erb b/app/views/files/_course_show_all_attachment.html.erb index fbf398c36..15ef36580 100644 --- a/app/views/files/_course_show_all_attachment.html.erb +++ b/app/views/files/_course_show_all_attachment.html.erb @@ -13,14 +13,14 @@ - <%= sort_header_tag('filename', :caption => l(:field_filename), :scope => "col", :id => "vzebra-adventure") %> + <%= sort_header_tag('filename', :caption => l(:field_filename), :scope => "col", :id => "vzebra-adventure" ,:class => "tableth") %> <%#= sort_header_tag('created_on', :caption => l(:label_date), :default_order => 'desc', :scope => "col", :id => "vzebra-comedy") %> - <%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc', :scope => "col", :id => "vzebra-children") %> - <%= sort_header_tag('attach_type', :caption => l(:attachment_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-attachmenttype") %> - <%= sort_header_tag('content_type', :caption => l(:attachment_sufix_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-contenttype") %> - <%= sort_header_tag('field_file_dense', :caption => l(:field_file_dense), :default_order => 'desc', :scope => "col", :id => "vzebra-field_file_dense") %> - <%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action") %> - <%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children") %> + <%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc', :scope => "col", :id => "vzebra-children",:class => "tableth") %> + <%= sort_header_tag('attach_type', :caption => l(:attachment_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-attachmenttype",:class => "tableth") %> + <%= sort_header_tag('content_type', :caption => l(:attachment_sufix_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-contenttype",:class => "tableth") %> + <%= sort_header_tag('field_file_dense', :caption => l(:field_file_dense), :default_order => 'desc', :scope => "col", :id => "vzebra-field_file_dense",:class => "tableth") %> + <%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action",:class => "tableth") %> + <%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children",:class => "tableth") %> diff --git a/lib/redmine.rb b/lib/redmine.rb index 8803a544f..708d25829 100644 --- a/lib/redmine.rb +++ b/lib/redmine.rb @@ -384,7 +384,7 @@ Redmine::MenuManager.map :project_menu do |menu| # menu.push :activity, { :controller => 'activities', :action => 'index' } #menu.push :roadmap, { :controller => 'versions', :action => 'index' }, :param => :project_id # :if => Proc.new { |p| p.shared_versions.any? } - menu.push :issues, { :controller => 'issues', :action => 'index' },:if => Proc.new {|p| p.enabled_module_names.include?('issues') } ,:param => :project_id, :caption => :label_issue_plural + menu.push :issues, { :controller => 'issues', :action => 'index' },:if => Proc.new {|p| p.enabled_module_names.include?('issue_tracking') } ,:param => :project_id, :caption => :label_issue_plural # menu.push :new_issue, { :controller => 'issues', :action => 'new', :copy_from => nil }, :param => :project_id, :caption => :label_issue_new, # :html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) } # menu.push :gantt, { :controller => 'gantts', :action => 'show' }, :param => :project_id, :caption => :label_gantt diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 38af97023..a9b0ef4eb 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -2813,4 +2813,4 @@ div.repos_explain{ cursor: pointer; } -.tableth{background-color:#EEEEEE; padding: 4px; white-space:pre;} +.list .tableth{background-color:#EEEEEE; padding: 4px; white-space:pre;}