From da853bf4eb7b160a218e7b9eb1f2a214fd4d8ee0 Mon Sep 17 00:00:00 2001 From: z9hang Date: Mon, 29 Sep 2014 10:43:54 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dredmin.rb=E8=A2=AB?= =?UTF-8?q?=E9=87=8D=E7=BD=AE=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/_show_all_attachment.html.erb | 14 +++++------ lib/redmine.rb | 24 +++++++++---------- public/stylesheets/application.css | 2 ++ 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/app/views/files/_show_all_attachment.html.erb b/app/views/files/_show_all_attachment.html.erb index 0dbd735c4..c1df86b32 100644 --- a/app/views/files/_show_all_attachment.html.erb +++ b/app/views/files/_show_all_attachment.html.erb @@ -14,14 +14,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 8eb7756e5..52e81b05b 100644 --- a/lib/redmine.rb +++ b/lib/redmine.rb @@ -117,33 +117,33 @@ Redmine::AccessControl.map do |map| map.permission :projects_attachments_download,{:attachments => :download},:belong_to_project => true map.permission :course_attachments_download,{:attachments => :download},:belong_to_course => true map.permission :contest_attachments_download,{:attachments => :download},:belong_to_contest => true - #与项目一致,注释掉 - #map.course_module :files do |map| + + map.course_module :files do |map| # map.permission :manage_files, {:files => [:new, :create]}, :require => :loggedin - # map.permission :view_course_files, {:files => :index, :versions => :download}, :read => true - #end - #新闻权限与项目一致注释掉此处 - # map.course_module :news do |map| + map.permission :view_course_files, {:files => :index, :versions => :download}, :read => true + end + + map.course_module :news do |map| # map.permission :manage_news, {:news => [:new, :create, :edit, :update, :destroy], :comments => [:destroy]}, :require => :member - # map.permission :view_course_news, {:news => [:index, :show]}, :public => true, :read => true + map.permission :view_course_news, {:news => [:index, :show]}, :public => true, :read => true # map.permission :comment_news, {:comments => :create} - # end + end map.course_module :bids do |map| map.permission :view_homework_attaches, {:bids => [:show, :show_project, :revision]}, :read => true,:belong_to_course => true map.permission :paret_in_homework,{},:require => :member ,:belong_to_course => true end - #讨论区权限与项目统一,注释掉此课程讨论区权限 - #map.course_module :boards do |map| + + map.course_module :boards do |map| # map.permission :manage_boards, {:boards => [:new, :create, :edit, :update, :destroy]}, :require => :member - # map.permission :view_course_messages, {:boards => [:index, :show], :messages => [:show]}, :public => true, :read => true + map.permission :view_course_messages, {:boards => [:index, :show], :messages => [:show]}, :public => true, :read => true # map.permission :add_messages, {:messages => [:new, :reply, :quote]} # map.permission :edit_messages, {:messages => :edit}, :require => :member # map.permission :edit_own_messages, {:messages => :edit}, :require => :loggedin # map.permission :delete_messages, {:messages => :destroy}, :require => :member # map.permission :delete_own_messages, {:messages => :destroy}, :require => :loggedin - #end + end #end diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index d69ed6171..e83037ca4 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -2810,3 +2810,5 @@ div.repos_explain{ text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2), 0px 1px 0px rgb(255, 255, 255); cursor: pointer; } + +.tableth{background-color:#EEEEEE; padding: 4px; white-space:pre;} From 1b98572bc2d88b49df643df5baf817f3b64459e5 Mon Sep 17 00:00:00 2001 From: z9hang Date: Mon, 29 Sep 2014 11:01:04 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E9=99=84=E4=BB=B6=E6=9D=83=E9=99=90=E6=81=A2?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/redmine.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redmine.rb b/lib/redmine.rb index 52e81b05b..55511c5b5 100644 --- a/lib/redmine.rb +++ b/lib/redmine.rb @@ -120,7 +120,7 @@ Redmine::AccessControl.map do |map| map.course_module :files do |map| # map.permission :manage_files, {:files => [:new, :create]}, :require => :loggedin - map.permission :view_course_files, {:files => :index, :versions => :download}, :read => true + map.permission :view_course_files, {:files => :index, :versions => :download}, :read => true,:belong_to_course => true end map.course_module :news do |map| From 42d0f420a8cc650acd18f41476a516147dee0c28 Mon Sep 17 00:00:00 2001 From: z9hang Date: Mon, 29 Sep 2014 11:59:44 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=85=AC=E5=85=B1=E8=B4=B4=E5=90=A7?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E5=88=A0=E9=99=A4=E6=8A=A5=E9=94=99=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E6=AD=A3=EF=BC=8C=E7=AB=9E=E8=B5=9B=E4=BD=9C?= =?UTF-8?q?=E5=93=81=E9=99=84=E4=BB=B6=E5=88=A0=E9=99=A4=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/attachments_controller.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 079a4e822..215df8e10 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -193,12 +193,14 @@ class AttachmentsController < ApplicationController else format.html { redirect_to_referer_or course_path(@course) } end + elsif !@attachment.container.nil? && @attachment.container.is_a?(Softapplication) + format.html { redirect_to_referer_or softapplications_path(@attachment.container) } else - # if @project.nil? - # format.html { redirect_to_referer_or forum_memo_path(@attachment.container.forum, @attachment.container) } - # else + if @project.nil? + format.html { redirect_to_referer_or forum_memo_path(@attachment.container.forum, @attachment.container) } + else format.html { redirect_to_referer_or project_path(@project) } - # end + end end format.js From eeccb9da828aed815f2079ec54111710a1f54f81 Mon Sep 17 00:00:00 2001 From: z9hang Date: Mon, 29 Sep 2014 14:29:57 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=B8=8D=E5=8B=BE=E9=80=89=E5=8D=B4=E4=BB=8D?= =?UTF-8?q?=E7=84=B6=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/_tools_expand.html.erb | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/app/views/projects/_tools_expand.html.erb b/app/views/projects/_tools_expand.html.erb index 13d63fc08..1639fcd30 100644 --- a/app/views/projects/_tools_expand.html.erb +++ b/app/views/projects/_tools_expand.html.erb @@ -5,21 +5,31 @@

    项目交流

  • <%= link_to l(:label_project_tool_response) ,project_feedback_path(@project)%>
  • -
  • <%= link_to l(:project_module_files) ,project_files_path(@project) %>
  • + <% if @project.enabled_modules.where("name = 'files'").count > 0 %> +
  • <%= link_to l(:project_module_files) ,project_files_path(@project) %>
  • + <% end %> <% if @project.enabled_modules.where("name = 'wiki'").count > 0 %>
  • <%= link_to l(:project_module_wiki), project_wiki_path(@project) %>
  • <% end %>

    进度跟踪

    -
  • <%= link_to l(:project_module_calendar),project_calendar_path(@project) %>
  • + <% if @project.enabled_modules.where("name = 'calendar'").count > 0 %> +
  • <%= link_to l(:project_module_calendar),project_calendar_path(@project) %>
  • + <% end %> +
  • <%= link_to l(:label_roadmap) ,project_roadmap_path(@project) %>
  • -
  • <%= link_to l(:project_module_gantt) ,project_gantt_path(@project) %>
  • + <% if @project.enabled_modules.where("name = 'gantt'").count > 0 %> +
  • <%= link_to l(:project_module_gantt) ,project_gantt_path(@project) %>
  • + <% end %> +

    其他工具

    <% if @project.enabled_modules.where(" name = 'dts'").count > 0 %>
  • <%= link_to l(:label_module_share) ,share_show_path(@project) %>
  • <% end %> -
  • <%= link_to l(:project_module_documents), project_documents_path(@project) %>
  • + <% if @project.enabled_modules.where(" name = 'documents'").count > 0 %> +
  • <%= link_to l(:project_module_documents), project_documents_path(@project) %>
  • + <% end %>
From 19955002306e5b175911ec3d27d0420bca17a885 Mon Sep 17 00:00:00 2001 From: z9hang Date: Mon, 29 Sep 2014 15:00:01 +0800 Subject: [PATCH 5/5] =?UTF-8?q?#1245=E5=B7=AE=E5=88=AB=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E8=B6=85=E8=BE=B9=E6=A1=86=E9=97=AE=E9=A2=98=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9css=EF=BC=8C=E5=90=8C=E6=97=B6=E5=B0=86style=E7=A7=BB?= =?UTF-8?q?=E5=88=B0application.css=E6=96=87=E4=BB=B6=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/journals/diff.html.erb | 2 +- public/stylesheets/application.css | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/journals/diff.html.erb b/app/views/journals/diff.html.erb index 237cfea4f..d846b9d19 100644 --- a/app/views/journals/diff.html.erb +++ b/app/views/journals/diff.html.erb @@ -1,7 +1,7 @@

<%=h @issue.tracker %> #<%= @issue.id %>

<%= authoring @journal.created_on, @journal.user, :label => :label_updated_time_by %>

-
+
<%= simple_format_without_paragraph @diff.to_html %>
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index e83037ca4..38af97023 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -2352,6 +2352,8 @@ button.tabs_new_enterprise-right { background-color:#f6f6f6; color:#505050; border: 1px solid #e4e4e4; + word-break: break-all; + word-wrap: break-word; } /***** Wiki *****/