Project

General

Profile

Feature #33153 » draft-3.patch

Mizuki ISHIKAWA, 2021-02-09 03:18

View differences:

app/helpers/issues_helper.rb
752 752
      issue.allowed_target_projects(User.current)
753 753
    end
754 754
  end
755

  
756
  def form_and_issue_status_select_tag(issue, allowed_statuses)
757
    if issue.safe_attribute?('status_id') && allowed_statuses.present?
758
      form_for(issue, id: 'quickly-select-issue-status-form') do |f|
759
        f.select(:status_id, options_for_select(allowed_statuses.map{|p| [p.name, p.id]}, issue.status.id), {},
760
                 {onchange: 'this.form.submit(); return false;', class: issue.closed? ? 'selected-status-closed' : 'selected-status-open', id: 'quickly-select-issue-status'})
761
      end
762
    else
763
      issue.status.name
764
    end
765
  end
755 766
end
app/views/issues/show.html.erb
46 46

  
47 47
<div class="attributes">
48 48
<%= issue_fields_rows do |rows|
49
  rows.left l(:field_status), @issue.status.name, :class => 'status'
49
  rows.left l(:field_status), form_and_issue_status_select_tag(@issue, @allowed_statuses), :class => 'status'
50 50
  rows.left l(:field_priority), @issue.priority.name, :class => 'priority'
51 51

  
52 52
  unless @issue.disabled_core_fields.include?('assigned_to_id')
public/stylesheets/application.css
1461 1461
  color: #fff;
1462 1462
  background:#9DB9D5;
1463 1463
}
1464
.badge-status-open {
1464
.badge-status-open, #quickly-select-issue-status.selected-status-open {
1465 1465
  color: #205D86;
1466 1466
  border: 1px solid #205D86;
1467 1467
}
......
1469 1469
  color: #696969;
1470 1470
  border: 1px solid #696969;
1471 1471
}
1472
.badge-status-closed {
1472
.badge-status-closed, #quickly-select-issue-status.selected-status-closed {
1473 1473
  color: #1D781D;
1474 1474
  border: 1px solid #1D781D;
1475 1475
}
(5-5/6)