Merge branch 'rep_quality' of https://git.trustie.net/jacknudt/trustieforge into rep_quality

This commit is contained in:
daiao 2016-09-27 09:57:53 +08:00
commit 323648a6ef
4 changed files with 22 additions and 18 deletions

View File

@ -1863,6 +1863,10 @@ module ApplicationHelper
content_tag(:a, name, {:href => '#', :onclick => "#{function}; return false;"}.merge(:class => "BlueCirBtnMini ml10",:style => "display:inline-block; height:20px; line-height:20px;"))
end
def link_to_function_none(name, function, html_options={})
content_tag(:a, name, {:href => '#', :onclick => "#{function}; return false;"}.merge(:style => "display:inline-block; height:20px; line-height:20px;"))
end
# Helper to render JSON in views
def raw_json(arg)
arg.to_json.to_s.gsub('/', '\/').html_safe
@ -1882,8 +1886,8 @@ module ApplicationHelper
end
def check_all_links(form_name)
link_to_function(l(:button_check_all), "checkAll('#{form_name}', true)") + "  ".html_safe + " | "+ "  ".html_safe +
link_to_function(l(:button_uncheck_all), "checkAll('#{form_name}', false)")
link_to_function_none(l(:button_check_all), "checkAll('#{form_name}', true)") + "  ".html_safe + " | "+ "  ".html_safe +
link_to_function_none(l(:button_uncheck_all), "checkAll('#{form_name}', false)")
end
# 本次修改,修改为只显示关闭的所占%比

View File

@ -35,8 +35,8 @@
<% end %>
</span>
<span class=" mr15">浏览:<a class="sy_corange"><%= @project.visits.to_i %></a></span>
<span class=" mr15"><%= l(:label_user_watcher) %>: <%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :class => 'sy_corange' %></span>
<span class=" mr15"><%= l(:label_member) %>: <%= link_to "#{@project.members.count}", project_member_path(@project), :class => 'sy_corange', :id => 'project_members_number' %></span>
<span class=" mr15">关注:<%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :class => 'sy_corange' %></span>
<span class=" mr15">成员:<%= link_to "#{@project.members.count}", project_member_path(@project), :class => 'sy_corange', :id => 'project_members_number' %></span>
</p>
<div class="mt15 clear" id="join_exit_project_div">
<%= render 'layouts/join_exit_project' %>

View File

@ -7,7 +7,7 @@ if($("#course_avatar_form").length > 0) {
window.location.href = "<%=settings_course_path(@course) %>";
}
<% elsif @project %>
$("#nh_source_tx").replaceWith('<%= image_tag(url_to_avatar(@project), :id=>'nh_source_tx',:style=>"width:60px;height:60px;overflow:hidden",:alt=>"项目logo") %>');
$("#nh_source_tx").replaceWith('<%= image_tag(url_to_avatar(@project), :id=>'nh_source_tx',:style=>"width:110px;height:110px;overflow:hidden",:alt=>"项目logo") %>');
if($("#project_avatar_form").length > 0) {
window.location.href = "<%=settings_project_path(@project) %>";
}

View File

@ -187,13 +187,13 @@ Redmine::AccessControl.map do |map|
map.permission :delete_issue_watchers, {:watchers => :destroy}
end
map.project_module :time_tracking do |map|
map.permission :log_time, {:timelog => [:new, :create]}, :require => :loggedin
map.permission :view_time_entries, {:timelog => [:index, :report, :show]}, :read => true
map.permission :edit_time_entries, {:timelog => [:edit, :update, :destroy, :bulk_edit, :bulk_update]}, :require => :member
map.permission :edit_own_time_entries, {:timelog => [:edit, :update, :destroy,:bulk_edit, :bulk_update]}, :require => :loggedin
map.permission :manage_project_activities, {:project_enumerations => [:update, :destroy]}, :require => :member
end
# map.project_module :time_tracking do |map|
# map.permission :log_time, {:timelog => [:new, :create]}, :require => :loggedin
# map.permission :view_time_entries, {:timelog => [:index, :report, :show]}, :read => true
# map.permission :edit_time_entries, {:timelog => [:edit, :update, :destroy, :bulk_edit, :bulk_update]}, :require => :member
# map.permission :edit_own_time_entries, {:timelog => [:edit, :update, :destroy,:bulk_edit, :bulk_update]}, :require => :loggedin
# map.permission :manage_project_activities, {:project_enumerations => [:update, :destroy]}, :require => :member
# end
map.project_module :news do |map|
map.permission :manage_news, {:news => [:new, :create, :edit, :update, :destroy], :comments => [:destroy]}, :require => :member
@ -207,12 +207,12 @@ Redmine::AccessControl.map do |map|
map.permission :notificationcomment_contestnotifications, {:notificationcomments => :create},:belong_to_contest => true
end
map.project_module :documents do |map|
map.permission :add_documents, {:documents => [:new, :create, :add_attachment]}, :require => :loggedin
map.permission :edit_documents, {:documents => [:edit, :update, :add_attachment]}, :require => :loggedin
map.permission :delete_documents, {:documents => [:destroy]}, :require => :loggedin
map.permission :view_documents, {:documents => [:index, :show, :download]}, :read => true
end
# map.project_module :documents do |map|
# map.permission :add_documents, {:documents => [:new, :create, :add_attachment]}, :require => :loggedin
# map.permission :edit_documents, {:documents => [:edit, :update, :add_attachment]}, :require => :loggedin
# map.permission :delete_documents, {:documents => [:destroy]}, :require => :loggedin
# map.permission :view_documents, {:documents => [:index, :show, :download]}, :read => true
# end
map.project_module :files do |map|
map.permission :manage_files, {:files => [:new, :create]}, :require => :loggedin