From f95fa6b5e76fa0e2e37e1c01ef7ac83294f24cff Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 31 Jul 2015 17:20:04 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=90=8D=E7=A7=B0=E5=B8=A6=E7=82=B9=E5=8F=B7=EF=BC=8C?= =?UTF-8?q?issue=E5=9B=9E=E5=A4=8D=E7=9A=84404=E9=97=AE=E9=A2=98=20?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=90=8D=E7=A7=B0=E5=85=A8=E6=95=B0=E5=AD=97?= =?UTF-8?q?=EF=BC=9A=E4=B8=8D=E8=83=BD=E7=95=99=E8=A8=80=E7=AD=89=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/issue.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index c2670a0cc..147e26cef 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -235,9 +235,10 @@ class Issue < ActiveRecord::Base base_reload(*args) end - def to_param - @to_param ||= "#{id}_#{self.project.name}(#{self.project.issues.index(self).to_i+1}-#{self.project.issues.count})"#.parameterize - end + # 之所以注释是以为最终以id形式显示,另外如果项目名称带点号或者纯数字会出现问题 + # def to_param + # @to_param ||= "#{id}_#{self.project.name}(#{self.project.issues.index(self).to_i+1}-#{self.project.issues.count})"#.parameterize + # end # Overrides Redmine::Acts::Customizable::InstanceMethods#available_custom_fields def available_custom_fields From e70748fd81e8686e4cb23f033db97a67e3f2f795 Mon Sep 17 00:00:00 2001 From: huang Date: Sat, 1 Aug 2015 09:57:44 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E8=BE=85=E5=8A=A9=E5=B7=A5=E5=85=B7=EF=BC=88dts=E3=80=81yun?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 31 --------- app/views/projects/_tools_expand.html.erb | 68 ------------------- app/views/projects/dts_dep.html.erb | 77 ---------------------- app/views/projects/dts_repos.html.erb | 3 - app/views/projects/soft_file.html.erb | 46 ------------- app/views/projects/soft_knowledge.html.erb | 46 ------------- app/views/projects/soft_service.html.erb | 46 ------------- app/views/projects/yun_dep.html.erb | 47 ------------- config/routes.rb | 8 --- 9 files changed, 372 deletions(-) delete mode 100644 app/views/projects/dts_dep.html.erb delete mode 100644 app/views/projects/dts_repos.html.erb delete mode 100644 app/views/projects/soft_file.html.erb delete mode 100644 app/views/projects/soft_knowledge.html.erb delete mode 100644 app/views/projects/soft_service.html.erb delete mode 100644 app/views/projects/yun_dep.html.erb diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 09ae5ad79..3dfae3432 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -369,37 +369,6 @@ class ProjectsController < ApplicationController end end - # dts测试工具 - def dts_dep - render_403 unless User.current.admin? - @dts = Dts.all - end - - # dts云部署 - def yun_dep - render_403 unless User.current.admin? - end - - # 软件知识库 - def soft_knowledge - render_403 unless User.current.admin? - end - - # 在线开发平台 - def online_dev - render_403 unless User.current.admin? - end - - # 软件资源库 - def soft_file - render_403 unless User.current.admin? - end - - # 软件服务 - def soft_service - render_403 unless User.current.admin? - end - #发送邮件邀请新用户 def invite_members_by_mail if User.current.member_of?(@project) || User.current.admin? diff --git a/app/views/projects/_tools_expand.html.erb b/app/views/projects/_tools_expand.html.erb index 85c8ca6b1..6facde36b 100644 --- a/app/views/projects/_tools_expand.html.erb +++ b/app/views/projects/_tools_expand.html.erb @@ -36,74 +36,6 @@ <%= link_to l(:label_project_tool_response) ,project_feedback_path(@project)%> -
  • - <% if User.current.admin? %> - <%= link_to l(:label_project_dts_yun) ,yun_dep_project_path(@project), data: { confirm:'你确定要对本项目进行云化部署吗?' } %> - <% end %> -
  • -
  • - <% if User.current.admin? %> - QoS评估工具 - <%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %> - <% end %> -
  • -
  • - <% if User.current.admin? %> - QoS证据采集工具 - <%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %> - <% end %> -
  • -
  • - <% if User.current.admin? %> - QoS证据评估统计分析工具 - <%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %> - <% end %> -
  • -
  • - <% if User.current.admin? %> - <%= link_to "代码缺陷测试工具(DTS)" ,dts_dep_project_path(@project), data: { confirm:'你确定要对本项目进行代码缺陷测试分析吗?' } %> - <% end %> -
  • -
  • - <% if User.current.admin? %> - 软工服务平台(SASSP) - <% end %> -
  • -
  • - <% if User.current.admin? %> - 软件知识库(KnowledgeBase) - <% end %> -
  • -
  • - <% if User.current.admin? %> - 可信评估工具(Evaluator) - <% end %> -
  • -
  • - <% if User.current.admin? %> - 在线验证工具(BACH-Online) - <% end %> -
  • -
  • - <% if User.current.admin? %> - 软件测试工具(SSCC-Web) - <% end %> -
  • -
  • - <% if User.current.admin? %> - 服务资源共享平台(ServiceXchange) - <% end %> -
  • -
  • - <% if User.current.admin? %> - 在线服务开发平台(ServiceFoundry) - <% end %> -
  • -
  • - <% if User.current.admin? %> - 组合开发和运行演化平台(Service4All) - <% end %> -
  • diff --git a/app/views/projects/dts_dep.html.erb b/app/views/projects/dts_dep.html.erb deleted file mode 100644 index a0a79740d..000000000 --- a/app/views/projects/dts_dep.html.erb +++ /dev/null @@ -1,77 +0,0 @@ -
    -

    <%= l(:label_project_dts_new) %>

    -
    - - - -
    -
    -

    代码上传分析中...

    -
    -
    1%
    -
    - -
    -
    -
    -
    - - \ No newline at end of file diff --git a/app/views/projects/dts_repos.html.erb b/app/views/projects/dts_repos.html.erb deleted file mode 100644 index 28f0398c5..000000000 --- a/app/views/projects/dts_repos.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -
    -

    <%= l(:label_project_dts) %>

    -
    \ No newline at end of file diff --git a/app/views/projects/soft_file.html.erb b/app/views/projects/soft_file.html.erb deleted file mode 100644 index 9e486dd78..000000000 --- a/app/views/projects/soft_file.html.erb +++ /dev/null @@ -1,46 +0,0 @@ -
    -

    <%= l(:label_project_soft_file) %>

    -
    - - - -
    -
    -

    软件资源库部署中...

    -
    -
    0%
    -
    - -
    -
    -
    -
    - - \ No newline at end of file diff --git a/app/views/projects/soft_knowledge.html.erb b/app/views/projects/soft_knowledge.html.erb deleted file mode 100644 index bcb745357..000000000 --- a/app/views/projects/soft_knowledge.html.erb +++ /dev/null @@ -1,46 +0,0 @@ -
    -

    <%= l(:label_project_soft_knowledge) %>

    -
    - - - -
    -
    -

    云化部署中...

    -
    -
    0%
    -
    - -
    -
    -
    -
    - - \ No newline at end of file diff --git a/app/views/projects/soft_service.html.erb b/app/views/projects/soft_service.html.erb deleted file mode 100644 index 43376b915..000000000 --- a/app/views/projects/soft_service.html.erb +++ /dev/null @@ -1,46 +0,0 @@ -
    -

    <%= l(:label_project_soft_service) %>

    -
    - - - -
    -
    -

    云化部署中...

    -
    -
    0%
    -
    - -
    -
    -
    -
    - - \ No newline at end of file diff --git a/app/views/projects/yun_dep.html.erb b/app/views/projects/yun_dep.html.erb deleted file mode 100644 index 7a774f4e4..000000000 --- a/app/views/projects/yun_dep.html.erb +++ /dev/null @@ -1,47 +0,0 @@ -
    -

    <%= l(:label_project_dts_yun) %>

    -
    - - - -
    -
    -

    云化部署中....

    -
    -
    -
    - -
    -
    -
    -
    - - \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index a8cffb2ed..c89c4e6c6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -399,14 +399,6 @@ RedmineApp::Application.routes.draw do get 'feedback', :action => 'feedback', :as => 'project_feedback' get 'watcherlist', :action=> 'watcherlist' - # 添加dts测试工具 - get 'dts_dep', :action=> 'dts_dep' - get 'yun_dep', :action=> 'yun_dep' - get 'soft_knowledge', :action=> 'soft_knowledge' - get 'soft_file', :action=> 'soft_file' - get 'online_dev', :action=> 'online_dev' - get 'soft_service', :action=> 'soft_service' - get 'invite_members', :action=> 'invite_members' get 'invite_members_by_mail', :action=> 'invite_members_by_mail' # get 'dts_repos', :aciton => 'dts_repos' From ef8a7a74194b2c3753eb71ea50f0c35df59bb8f3 Mon Sep 17 00:00:00 2001 From: huang Date: Sat, 1 Aug 2015 10:30:13 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E9=A1=B9=E7=9B=AE=E5=B7=A6=E4=BE=A7=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E6=95=B0=E5=AD=97=E8=87=AA=E5=8A=A8=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/create.js.erb | 2 ++ app/views/layouts/base_projects.html.erb | 2 +- app/views/projects/_development_group.html.erb | 2 +- app/views/projects/_friend_group.html.erb | 2 +- app/views/projects/_research_team.html.erb | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/views/files/create.js.erb b/app/views/files/create.js.erb index a1c278a7a..81810344e 100644 --- a/app/views/files/create.js.erb +++ b/app/views/files/create.js.erb @@ -24,6 +24,8 @@ $('#upload_file_div').slideToggle('slow'); <% if @project %> closeModal(); $("#resource_list").html('<%= j(render partial: "project_file_new" ,locals: {project: @project}) %>'); + $("#project_files_count_info").html("<%= @all_attachments.count%>"); + $("#project_files_count_nav").html("(<%= @all_attachments.count%>)") // 添加文件上传成功提示 <% unless params[:attachments].nil? %> var div = $('
    文件上传成功!
    '); diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index b168e5f81..74c13cc8e 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -100,7 +100,7 @@ <%= l(:project_module_attachments) %>( <% attaments_num %> - <%= link_to "#{attaments_num}", project_files_path(@project), :class => 'info_foot_num c_blue' %>) + <%= link_to "#{attaments_num}", project_files_path(@project), :class => 'info_foot_num c_blue', :id=>'project_files_count_info' %>) <% end %>
    diff --git a/app/views/projects/_development_group.html.erb b/app/views/projects/_development_group.html.erb index d4bc7012a..915637ec5 100644 --- a/app/views/projects/_development_group.html.erb +++ b/app/views/projects/_development_group.html.erb @@ -31,7 +31,7 @@