From 5facd08af63ad1c82767b8d220680004b373c399 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 15 Dec 2016 12:24:57 +0800 Subject: [PATCH] =?UTF-8?q?issue=E6=96=B0=E5=BB=BA=E5=92=8C=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/_form.html.erb | 175 +++++++++++++++--------------- public/stylesheets/css/common.css | 2 + 2 files changed, 91 insertions(+), 86 deletions(-) diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb index b350c05c8..41918bd94 100644 --- a/app/views/issues/_form.html.erb +++ b/app/views/issues/_form.html.erb @@ -27,30 +27,7 @@ <%#= wikitoolbar_for 'issue_description' %> <% end %> -
  • - <% if @issue.safe_attribute? 'tracker_id' %> - - <%= f.select :tracker_id, @issue.project.trackers.collect { |t| [t.name, t.id] }, - {:required => true, :no_label => true}, - #:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')", - :class => "w110" %> - <% end %> -
  • -
  • - - <%# if @issue.safe_attribute?('status_id') && @allowed_statuses.present? %> - <%= f.select :status_id, (@allowed_statuses.collect { |p| [p.name, p.id] }), - {:no_label => true}, - :class => "w110" %> -
  • -
  • - - <% if @issue.safe_attribute? 'priority_id' %> - <%= f.select :priority_id, (@priorities.collect { |p| [p.name, p.id] }), - {:required => true, :no_label => true}, :disabled => !@issue.leaf?, - :class => "w110" %> - <% end %> -
  • +
  • <%= render :partial => 'attachments/form', :locals => {:container => @issue} %> @@ -75,66 +52,90 @@ <% end %>
  • + 指派给 <% if @issue.safe_attribute? 'assigned_to_id' %> <%= f.select :assigned_to_id, assigned_options_for_select(@issue.assignable_users, @issue.assigned_to), {:required => @issue.required_attribute?('assigned_to_id'), :no_label => true}, - {:onchange => "change_assigned_tip();",:class => "w150"} %> + {:onchange => "change_assigned_tip();",:class => "w160 fl"} %> <% end %>
  • -
  • - <%= @issue.assigned_to.nil? ? "未指派" : "已指派" %> +
  • + 类   型 + <% if @issue.safe_attribute? 'tracker_id' %> + <%= f.select :tracker_id, @issue.project.trackers.collect { |t| [t.name, t.id] },{:required => true, :no_label => true}, + #:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')", + :class => "fl", :style => "width:160px;padding-left:0px;" %> + <% end %> +
  • +
  • + 状   态 + <%# if @issue.safe_attribute?('status_id') && @allowed_statuses.present? %> + <%= f.select :status_id, (@allowed_statuses.collect { |p| [p.name, p.id] }), + {:no_label => true}, + :class => "fl", :style => "width:160px;padding-left:0px;" %> +
  • +
  • + <%= l(:field_priority) %> + <% if @issue.safe_attribute? 'priority_id' %> + <%= f.select :priority_id, (@priorities.collect { |p| [p.name, p.id] }), + {:required => true, :no_label => true}, :disabled => !@issue.leaf?, + :class => "w160 fl" %> + <% end %>
  • - <%= 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}, - {:onchange => "change_milestone_tip();", :class => "w150"} %> -
  • -
  • - <%= @issue.fixed_version.nil? ? "未选择里程碑" : "已选择里程碑" %> - <% if params[:action] == "new" %> - <%= link_to "", new_project_version_path(@project, :is_issue => true, :issue_project_id => @project.id), :class => "pic_add mt5 ml5 fr", :remote => true %> - <% end %> -
  • -
  • - <% if @issue.safe_attribute? 'start_date' %> - <%= f.text_field :start_date, :size => 22, :disabled => !@issue.leaf?, :no_label => true, - :required => @issue.required_attribute?('start_date'), :onchange => "issue_start_date_change();", - :class => "fl calendar_input", :style => "width:170px;" %> - <%= calendar_for('issue_start_date', 'start_date') if @issue.leaf? %> - <% end %> -
  • -
  • - <%= @issue.start_date.nil? ? "未选择开始日期" : "已选择开始日期" %> -
  • -
  • - - <% if @issue.safe_attribute? 'due_date' %> - <%= f.text_field :due_date, :size => 22, :disabled => !@issue.leaf?, :no_label => true, - :required => @issue.required_attribute?('due_date'), :onchange => "issue_end_date_change();", - :class => "fl calendar_input",:style => "width: 170px;", :placeholder => "请选择结束日期" %> - <%= calendar_for('issue_due_date', 'start_date') if @issue.leaf? %> - <% end %> -
  • -
  • - <%= @issue.due_date.nil? ? "未选择结束日期" : "已选择结束日期" %> + 里程碑 + <%= 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}, + {:onchange => "change_milestone_tip();", :class => "w160 fl"} %>
  • - <% if @issue.safe_attribute? 'estimated_hours' %> - <%= f.text_field :estimated_hours, :size => 22, :disabled => !@issue.leaf?, :no_label => true, - :required => @issue.required_attribute?('estimated_hours'), :placeholder => "请填写预计工时" %> - <% end %> + +
  • -
  • <%= l(:field_estimated_hours) %>
  • + + + +
  • + +
  • + 工   时 + <% if @issue.safe_attribute? 'estimated_hours' %> + <%= f.text_field :estimated_hours, :disabled => !@issue.leaf?, :no_label => true, + :required => @issue.required_attribute?('estimated_hours'), :placeholder => "请填写预计工时", + :class => "fl", :style => "width:153px;" %> + <% end %> +
  • + +
  • + 完成度 <% if @issue.safe_attribute?('done_ratio') && @issue.leaf? && Issue.use_field_for_done_ratio? %> <%= f.select :done_ratio, ((0..10).to_a.collect { |r| ["#{r*10} %", r*10] }), {:required => @issue.required_attribute?('done_ratio'), :no_label => true}, :onchange => "PrecentChange(this.value)", - :class => "w150" %> + :class => "w160 fl" %> <% end %>
  • -
  • 完成度
  • + <% if @project.gpid %> <%#= hidden_field_tag @issue_commit_ids %> @@ -162,6 +163,28 @@ <% end %>