diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 38cc93fe3..3ddbcd9d6 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -58,57 +58,15 @@ class IssuesController < ApplicationController include ApplicationHelper def index - retrieve_query - sort_init(@query.sort_criteria.empty? ? [['id', 'desc']] : @query.sort_criteria) - sort_update(@query.sortable_columns) - @query.sort_criteria = sort_criteria.to_a - - @project_base_tag = (params[:project_id] || @issue.project) ? 'base_projects':'base' - - if @query.valid? - # case params[:format] - # when 'csv', 'pdf' - # @limit = 10#Setting.issues_export_limit.to_i - # when 'atom' - # @limit = 10#Setting.feeds_limit.to_i - # when 'xml', 'json' - # @offset, @limit = api_offset_and_limit({:limit => 10}) - # else - # @limit = 10#per_page_option - # end - @tracker_id = params[:tracker_id] - @assign_to_id = params[:assigned_to_id] - @author_id = params[:author_id] - @status_id = params[:status_id] - @subject = params[:subject] - @done_ratio = params[:done_ratio] - @fixed_version_id = params[:fixed_version_id] - @issue_count = @query.issue_count - @test = params[:test] - # @issue_pages = Paginator.new @issue_count, @limit, params['page'] - # params[:page] = (params[:page] || 1).to_i + 1 #页码需要加1 - # @offset ||= @issue_pages.offset - @project_sort = 'issues.updated_on desc' - if params[:test] != "0" - case @test - when "1" - @project_sort = 'issues.created_on desc' - when "2" - @project_sort = 'issues.created_on asc' - when "3" - @project_sort = 'issues.updated_on desc' - when "4" - @project_sort = 'issues.updated_on asc' - end - end - @issues_filter_assign_count = @query.issues.select{|issue| issue.assigned_to_id == User.current.id }.count - @issues_filter_author_count = @query.issues.select{|issue| issue.author_id == User.current.id }.count - @issues_filter = @query.issues(:include => [:assigned_to, :tracker, :priority, :category, :fixed_version], :order => @project_sort) + if params[:set_filter] != "1" + @project_base_tag = (params[:project_id] || @issue.project) ? 'base_projects':'base' + @issues = @project.issues.visible.all + @issue_count = @issues.count @limit = 10 @is_remote = true @issue_pages = Paginator.new @issue_count, @limit, params['page'] || 1 @offset ||= @issue_pages.offset - @issues = paginateHelper @issues_filter, @limit + @issues = paginateHelper @issues, @limit # if params[:set_filter] # @set_filter = params[:set_filter] # end @@ -118,21 +76,106 @@ class IssuesController < ApplicationController format.html { render :template => 'issues/index', :layout => @project_base_tag }#by young format.api {Issue.load_visible_relations(@issues) if include_in_api_response?('relations')} # format.json { render :json => @issues.map { |issue| issue.to_json}} #:json => @issues.map { |issue| issue.to_json} - format.atom { render_feed(@issues, :title => "#{@project || Setting.app_title}: #{l(:label_issue_plural)}") } - format.csv { send_data(query_to_csv(@issues, @query, params), :type => 'text/csv; header=present', :filename => 'issues.csv') } - format.pdf { send_data(issues_to_pdf(@issues, @project, @query), :type => 'application/pdf', :filename => 'issues.pdf') } + # format.atom { render_feed(@issues, :title => "#{@project || Setting.app_title}: #{l(:label_issue_plural)}") } + # format.csv { send_data(query_to_csv(@issues, @query, params), :type => 'text/csv; header=present', :filename => 'issues.csv') } + # format.pdf { send_data(issues_to_pdf(@issues, @project, @query), :type => 'application/pdf', :filename => 'issues.pdf') } format.xls {filename = "#{@project.name.to_s}_#{l(:label_issue_list_xls)}.xls" - send_data(issue_list_xls(@issues_filter), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename)) + send_data(issue_list_xls(@issues_filter), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename)) } end else - respond_to do |format| - format.html { render(:template => 'issues/index', :layout => @project_base_tag) }#by young - format.any(:atom, :csv, :pdf) { render(:nothing => true) } - format.api { render_validation_errors(@query) } - format.js + retrieve_query + sort_init(@query.sort_criteria.empty? ? [['id', 'desc']] : @query.sort_criteria) + sort_update(@query.sortable_columns) + @query.sort_criteria = sort_criteria.to_a + + @project_base_tag = (params[:project_id] || @issue.project) ? 'base_projects':'base' + + if @query.valid? + # case params[:format] + # when 'csv', 'pdf' + # @limit = 10#Setting.issues_export_limit.to_i + # when 'atom' + # @limit = 10#Setting.feeds_limit.to_i + # when 'xml', 'json' + # @offset, @limit = api_offset_and_limit({:limit => 10}) + # else + # @limit = 10#per_page_option + # end + @tracker_id = params[:tracker_id] + @assign_to_id = params[:assigned_to_id] + @author_id = params[:author_id] + @status_id = params[:status_id] + @subject = params[:subject] + @done_ratio = params[:done_ratio] + @fixed_version_id = params[:fixed_version_id] + @issue_count = @query.issue_count + @test = params[:test] + # @issue_pages = Paginator.new @issue_count, @limit, params['page'] + # params[:page] = (params[:page] || 1).to_i + 1 #页码需要加1 + # @offset ||= @issue_pages.offset + @project_sort = 'issues.updated_on desc' + if params[:test] != "0" + case @test + when "1" + @project_sort = 'issues.created_on desc' + when "2" + @project_sort = 'issues.created_on asc' + when "3" + @project_sort = 'issues.updated_on desc' + when "4" + @project_sort = 'issues.updated_on asc' + end + end + @issues_filter_assign_count = @query.issues.select{|issue| issue.assigned_to_id == User.current.id }.count + @issues_filter_author_count = @query.issues.select{|issue| issue.author_id == User.current.id }.count + @issues_filter = @query.issues(:order => @project_sort) + @limit = 10 + @is_remote = true + @issue_pages = Paginator.new @issue_count, @limit, params['page'] || 1 + @offset ||= @issue_pages.offset + @issues = paginateHelper @issues_filter, @limit + # if params[:set_filter] + # @set_filter = params[:set_filter] + # end + # @issue_count_by_group = @query.issue_count_by_group + if params[:export_issue_hidden] == "1" + # index(:format=>'xls', :export_issue_hidden => 0) + params[:export_issue_hidden] = "0" + redirect_to project_issues_path(:project_id => @project, :format => 'xls') + + # respond_to do |format| + # format.xls {filename = "#{@project.name.to_s}_#{l(:label_issue_list_xls)}.xls" + # send_data(issue_list_xls(@issues_filter), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename)) + # return + # } + # return + # end + else + respond_to do |format| + format.js + format.html { render :template => 'issues/index', :layout => @project_base_tag }#by young + format.api {Issue.load_visible_relations(@issues) if include_in_api_response?('relations')} + # format.json { render :json => @issues.map { |issue| issue.to_json}} #:json => @issues.map { |issue| issue.to_json} + format.atom { render_feed(@issues, :title => "#{@project || Setting.app_title}: #{l(:label_issue_plural)}") } + format.csv { send_data(query_to_csv(@issues, @query, params), :type => 'text/csv; header=present', :filename => 'issues.csv') } + format.pdf { send_data(issues_to_pdf(@issues, @project, @query), :type => 'application/pdf', :filename => 'issues.pdf') } + format.xls {filename = "#{@project.name.to_s}_#{l(:label_issue_list_xls)}.xls" + send_data(issue_list_xls(@issues_filter), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename)) + } + end + end + else + respond_to do |format| + format.html { render(:template => 'issues/index', :layout => @project_base_tag) }#by young + format.any(:atom, :csv, :pdf) { render(:nothing => true) } + format.api { render_validation_errors(@query) } + format.js + end end end + + rescue ActiveRecord::RecordNotFound render_404 end diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 5d9528f87..d4042abf5 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -77,7 +77,7 @@ class RepositoriesController < ApplicationController respond_to do |format| format.html format.xls{ - filename = "#{@project.name.to_s}_#{l(:label_issue_list_xls)}_#{@rev}_#{l(:label_rep_xls)}.xls" + filename = "#{@project.name.to_s}_#{l(:label_rep_xls)}.xls" send_data(export_rep_xls(gpid, :rev => rev, :cycle => "1"), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename)) } end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index bf4ced4c6..6215a79d0 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -68,29 +68,31 @@ module ApplicationHelper g = Gitlab.client cycle = params[:cycle] rev = params[:rev] - # branch = g.branche(gpid, rev) - statics = g.rep_stats(gpid, :rev => rev) - + if cycle == "week" + statics = g.rep_stats_week(gpid, :rev => rev) + elsif cycle == "month" + statics = g.rep_stats_month(gpid, :rev => rev) + end xls_report = StringIO.new book = Spreadsheet::Workbook.new sheet1 = book.create_worksheet :name => "版本库" blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10 sheet1.row(0).default_format = blue - sheet1.row(0).concat([l(:rep_branch),l(:rep_author),l(:rep_author_mail),l(:rep_code_add),l(:rep_code_delete),l(:rep_code_modified),l(:rep_sode_time),l(:rep_sode_cycle)]) + sheet1.row(0).concat([l(:rep_branch),l(:rep_author),l(:rep_changeset),l(:rep_code_add),l(:rep_code_delete),l(:rep_code_modified),l(:rep_sode_time),l(:rep_sode_cycle),l(:rep_author_mail)]) count_row = 1 statics.each do |static| user = User.where(:mail => static.email).first sheet1[count_row,0] = rev sheet1[count_row,1] = user.nil? ? static.uname : user.show_name - sheet1[count_row,2] = static.email + sheet1[count_row,2] = static.commits_num sheet1[count_row,3] = static.add sheet1[count_row,4] = static.del sheet1[count_row,5] = static.changes - sheet1[count_row,6] = Time.now - sheet1[count_row,7] = "1周" + sheet1[count_row,6] = Time.now.strftime('%Y-%m-%d %H:%M:%S') + sheet1[count_row,7] = cycle == "week" ? "最近1周" : "最近一月" + sheet1[count_row,8] = static.email count_row += 1 end - book.write xls_report xls_report.string end @@ -102,21 +104,21 @@ module ApplicationHelper sheet1 = book.create_worksheet :name => "issues" blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10 sheet1.row(0).default_format = blue - sheet1.row(0).concat([l(:issue_xls_id),l(:issue_xls_tracker_id),l(:issue_xls_title),l(:issue_xls_description),l(:issue_xls_status),l(:issue_xls_assign),l(:issue_xls_priority),l(:issue_xls_author),l(:issue_xls_created_at),l(:issue_xls_version),l(:issue_xls_start),l(:issue_xls_due),l(:issue_xls_ratio)]) + sheet1.row(0).concat([l(:issue_xls_id),l(:issue_xls_tracker_id),l(:issue_xls_title),l(:issue_xls_description),l(:issue_xls_status),l(:issue_xls_assign),l(:issue_xls_priority),l(:issue_xls_author),l(:issue_xls_created_at),l(:milestone),l(:issue_xls_start),l(:issue_xls_due),l(:issue_xls_ratio)]) count_row = 1 issues.each do |issue| sheet1[count_row,0] = issue.id sheet1[count_row,1] = issue_tracker_change(issue.tracker_id) sheet1[count_row,2] = issue.subject - sheet1[count_row,3] = issue.description + sheet1[count_row,3] = (issue.description.gsub(/<\/?.*?>/,"")).html_safe sheet1[count_row,4] = issue_status_change(issue.status_id) sheet1[count_row,5] = issue.assigned_to.try(:show_name) sheet1[count_row,6] = issue_priority_change(issue.priority_id) sheet1[count_row,7] = issue.author.show_name - sheet1[count_row,8] = issue.created_on + sheet1[count_row,8] = issue.created_on.nil? ? issue.created_on : issue.created_on.strftime('%Y-%m-%d %H:%M:%S') sheet1[count_row,9] = issue.fixed_version.try(:name) - sheet1[count_row,10] = issue.start_date - sheet1[count_row,11] = issue.due_date + sheet1[count_row,10] = issue.start_date.nil? ? issue.start_date : issue.start_date.strftime('%Y-%m-%d') + sheet1[count_row,11] = issue.due_date.nil? ? issue.due_date : issue.due_date.strftime('%Y-%m-%d') sheet1[count_row,12] = issue_ratio_change(issue.done_ratio, issue.status_id) count_row += 1 end @@ -1863,6 +1865,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 +1888,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 # 本次修改,修改为只显示关闭的所占%比 diff --git a/app/views/gantts/show.html.erb b/app/views/gantts/show.html.erb index 39ac2032b..759f8c232 100644 --- a/app/views/gantts/show.html.erb +++ b/app/views/gantts/show.html.erb @@ -48,10 +48,10 @@ -

- <%= gantt_zoom_link(@gantt, :in) %> - <%= gantt_zoom_link(@gantt, :out) %> -

+ + + +

<%= text_field_tag 'months', @gantt.months, :size => 2 %> @@ -99,9 +99,9 @@ t_height = g_height + headers_height %> -<% if @gantt.truncated %> -

<%= l(:notice_gantt_chart_truncated, :max => @gantt.max_rows) %>

-<% end %> +<%# if @gantt.truncated %> + +<%# end %> @@ -294,10 +294,7 @@
-<% other_formats_links do |f| %> - <%= f.link_to 'PDF', :url => params.merge(@gantt.params) %> - <%= f.link_to('PNG', :url => params.merge(@gantt.params)) if @gantt.respond_to?('to_image') %> -<% end %> + <% end # query.valid? %> <% content_for :sidebar do %> diff --git a/app/views/issues/_attributes.html.erb b/app/views/issues/_attributes.html.erb index 80c8ad185..f7d7b4d50 100644 --- a/app/views/issues/_attributes.html.erb +++ b/app/views/issues/_attributes.html.erb @@ -44,7 +44,7 @@
  • <% if @issue.safe_attribute?('fixed_version_id') && @issue.assignable_versions.any? %> - + <%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version), {:include_blank => true, :required => @issue.required_attribute?('fixed_version_id'), :no_label => true}, :class => "w150" %> diff --git a/app/views/issues/_attributes_show.html.erb b/app/views/issues/_attributes_show.html.erb index 15160facb..7ff59fd9d 100644 --- a/app/views/issues/_attributes_show.html.erb +++ b/app/views/issues/_attributes_show.html.erb @@ -40,7 +40,7 @@ <% end %>
    <% unless @issue.disabled_core_fields.include?('fixed_version_id') %> -
  •  目标版本  : 

    <%= (@issue.fixed_version ? link_to_version(@issue.fixed_version, :class => "pro_info_p") : "--") %> +
  •  <%=l(:milestone)%>  : 

    <%= (@issue.fixed_version ? link_to_version(@issue.fixed_version, :class => "pro_info_p") : "--") %>
  • <% end %>
    diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb index d58c4fb6f..5a0820092 100644 --- a/app/views/issues/_form.html.erb +++ b/app/views/issues/_form.html.erb @@ -18,10 +18,10 @@ <% end %> -
  • - - -
  • + + + +
    diff --git a/app/views/issues/_project_issue.html.erb b/app/views/issues/_project_issue.html.erb index 167fb2641..cf04baa14 100644 --- a/app/views/issues/_project_issue.html.erb +++ b/app/views/issues/_project_issue.html.erb @@ -40,16 +40,23 @@ 周报 <% end %> +
  • <% unless activity.assigned_to_id.nil? %> - <% if activity.try(:assigned_to).try(:realname) == ' ' %> - <%= link_to activity.try(:assigned_to), user_path(activity.assigned_to_id), :class => "c_grey" %> + <% if activity.try(:assigned_to).try(:realname).empty? %> + <%= link_to activity.assigned_to, user_path(activity.assigned_to_id), :class => "c_grey" %> <% else %> <%= link_to activity.try(:assigned_to).try(:realname), user_path(activity.assigned_to_id), :class => "c_grey" %> <% end %> <% end %>
  • -
  • <%= activity.fixed_version %>
  • -
  • <%= activity.status.name%>
  • +
  • <%= activity.fixed_version %>
  • +
  • <%= activity.status.name%>
  • <%= activity.done_ratio %>%
  • <%= link_to "", issue_path(activity.id, :edit => 'true'), :class => 'sy_icons_edit fl mt15', :accesskey => accesskey(:edit) if activity.editable? && User.current.allowed_to?(:edit_issues, activity.project) %> diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 469a3a843..d1bde712e 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -2,9 +2,9 @@ <%= import_ke(enable_at: true,init_activity: true) %> <% end %> - @@ -90,22 +101,25 @@ 新 增
    - 导出EXCEL + + " class="hw_btn_blue fr" alt="导出EXCEL" onclick="remote_function_export()">导出EXCEL <% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %> <%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project},:remote=>'true', :method => :get,:id=>"issue_query_form", :class => 'query_form') do %> <%= hidden_field_tag 'set_filter', '1' %> + <%= hidden_field_tag 'export_issue_hidden', '0' %> +
    - 清除 + 清除 - + <%# 更新访问数,刷新的时候更新访问次数 %> + <% update_visiti_count @project %>

    <%= l(:label_project_ivite_code)%>
    <%= (User.current.member_of?(@project) || User.current.admin?) ? @project.invite_code : "******" %>

    @@ -34,8 +35,8 @@ <% end %> 浏览:<%= @project.visits.to_i %> - <%= l(:label_user_watcher) %>: <%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :class => 'sy_corange' %> - <%= l(:label_member) %>: <%= link_to "#{@project.members.count}", project_member_path(@project), :class => 'sy_corange', :id => 'project_members_number' %> + 关注:<%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :class => 'sy_corange' %> + 成员:<%= link_to "#{@project.members.count}", project_member_path(@project), :class => 'sy_corange', :id => 'project_members_number' %>

    <%= render 'layouts/join_exit_project' %> diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index 969db6961..b0de79d7c 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -49,8 +49,7 @@
    <%= render :partial => 'layouts/base_project_top' %>
    - <%# 更新访问数,刷新的时候更新访问次数 %> - <% update_visiti_count @project %> +
  • -

     目标版本  : 

    +

     <%=l(:milestone)%>  : 

    <%= (activity.fixed_version ? link_to_user_version(activity.fixed_version) : "--") %>
  • diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml index d0b4c1c23..98e13a865 100644 --- a/config/locales/projects/zh.yml +++ b/config/locales/projects/zh.yml @@ -48,7 +48,7 @@ zh: # 左边栏 # label_project_id: "项目ID:" - label_project_ivite_code: "邀请码:" + label_project_ivite_code: "邀请码" label_agree_join_project: 同意加入 label_apply_project: "+加入" @@ -222,11 +222,12 @@ zh: rep_branch: 分支 rep_author: 作者 rep_author_mail: 邮箱 + rep_changeset: 提交次数 rep_code_add: 添加行数 rep_code_delete: 删除代码 rep_code_modified: 总行数 rep_sode_time: 导出时间 - rep_sode_cycle: 周期 + rep_sode_cycle: 时间区间 # 自定义查询 label_query_plural: 自定义查询 @@ -236,6 +237,7 @@ zh: # 自定义查询> 过滤器类别 field_status: 状态 field_fixed_version: 目标版本 + milestone: 里程碑 field_assigned_to_role: 角色的成员 field_category: 类别 field_created_on: 创建于 diff --git a/lib/gitlab-cli/lib/gitlab/client/repositories.rb b/lib/gitlab-cli/lib/gitlab/client/repositories.rb index 80d1058b5..daed2ee16 100644 --- a/lib/gitlab-cli/lib/gitlab/client/repositories.rb +++ b/lib/gitlab-cli/lib/gitlab/client/repositories.rb @@ -117,6 +117,16 @@ class Gitlab::Client end alias_method :repo_rep_stats, :rep_stats + def rep_stats_week(project, options={}) + get("/projects/#{project}/repository/rep_stats_week", :query => options) + end + alias_method :repo_rep_stats, :rep_stats + + def rep_stats_month(project, options={}) + get("/projects/#{project}/repository/rep_stats_month", :query => options) + end + alias_method :repo_rep_stats, :rep_stats + def rep_user_stats(project, options={}) get("/projects/#{project}/repository/rep_user_stats", :query => options) end diff --git a/lib/redmine.rb b/lib/redmine.rb index 48269ba9c..e2dc8da0a 100644 --- a/lib/redmine.rb +++ b/lib/redmine.rb @@ -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 diff --git a/public/stylesheets/css/project.css b/public/stylesheets/css/project.css index bfa85c5bd..7da1e671b 100644 --- a/public/stylesheets/css/project.css +++ b/public/stylesheets/css/project.css @@ -793,9 +793,10 @@ a:hover.hw_btn_blue,a:active.hw_btn_blue{ background: #3b94d6; color:#fff;} .issues_form_filter select{ width:84px; height:35px; font-size:14px; border:1px solid #c8c8c8; border-right:none; background-color:#fff; margin-bottom: 10px; color: #888;} .issues_form_filter input{ height:33px;width:91px; border:1px solid #c8c8c8;background-color:#fff;} .issues_form_filter select:focus,.issues_form_filter input:focus{border:1px solid #c8c8c8; border-right:none;} -.issues_form_filter select{appearance:none;-moz-appearance:none;-webkit-appearance:none; background: url("../images/project/arrow.png") no-repeat scroll right center transparent;} +.issues_form_filter select{appearance:none;-moz-appearance:none;-webkit-appearance:none; background: url("/images/project/arrow.png") no-repeat scroll right center transparent;} +.issues_form_filter select:focus {outline:none; border:none;} input.issues_calendar_input{ padding-left:5px; color:#444; border-right:none;} -.issues_data_img{ display:block; width:25px; height:33px; border:1px solid #c8c8c8; border-left:none; background: url("../images/public_icon.png") -29px 9px no-repeat; } +.issues_data_img{ display:block; width:25px; height:33px; border:1px solid #c8c8c8; border-left:none; background: url("/images/public_icon.png") -29px 9px no-repeat; } /* 缺陷Tab */ .issues_con_list{border:1px solid #c8c8c8; } #issues_list_nav {border-bottom:1px solid #d0d0d0;}