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
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/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/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 %>
diff --git a/lib/redmine.rb b/lib/redmine.rb
index 8eb7756e5..55511c5b5 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,:belong_to_course => 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..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 *****/
@@ -2810,3 +2812,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;}