Feature #28086 » add_contextmenu_to_issue_details.patch
app/views/issues/show.html.erb | ||
---|---|---|
39 | 39 |
<%= l(:label_updated_time, time_tag(@issue.updated_on)).html_safe %>. |
40 | 40 |
<% end %> |
41 | 41 |
</p> |
42 | ||
43 |
<div class="attributes"> |
|
42 |
<%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do -%> |
|
43 |
<div class="attributes hascontextmenu">
|
|
44 | 44 |
<%= issue_fields_rows do |rows| |
45 | 45 |
rows.left l(:field_status), @issue.status.name, :class => 'status' |
46 | 46 |
rows.left l(:field_priority), @issue.priority.name, :class => 'priority' |
... | ... | |
73 | 73 |
end %> |
74 | 74 |
<%= render_half_width_custom_fields_rows(@issue) %> |
75 | 75 |
<%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %> |
76 |
<%= check_box_tag 'ids[]', @issue.id, false, :style => 'display:none;', :id => nil %> |
|
76 | 77 |
</div> |
77 | ||
78 |
<% end %> |
|
78 | 79 |
<% if @issue.description? || @issue.attachments.any? -%> |
79 | 80 |
<hr /> |
80 | 81 |
<% if @issue.description? %> |
public/stylesheets/application.css | ||
---|---|---|
467 | 467 |
div.issue p.author {margin-top:0.5em;} |
468 | 468 |
div.issue span.private, div.journal span.private { position:relative; bottom: 2px; text-transform: uppercase; background: #d22; color: #fff; font-weight:bold; padding: 0px 2px 0px 2px; font-size: 60%; margin-right: 2px; border-radius: 2px;} |
469 | 469 |
div.issue .next-prev-links {color:#999;} |
470 |
div.issue .attributes {margin-top: 2em;} |
|
470 |
div.issue .attributes {margin-top: 2em; margin-left: -5px; margin-right: -5px; padding: 5px;}
|
|
471 | 471 |
div.issue .attributes .attribute {padding-left:180px; clear:left; min-height: 1.8em;} |
472 | 472 |
div.issue .attributes .attribute .label {width: 170px; margin-left:-180px; font-weight:bold; float:left; overflow:hidden; text-overflow: ellipsis;} |
473 | 473 |
div.issue .attribute .value {overflow:auto; text-overflow: ellipsis;} |
test/functional/issues_controller_test.rb | ||
---|---|---|
1589 | 1589 |
assert_select 'fieldset' do |
1590 | 1590 |
assert_select 'legend', :text => 'Log time' |
1591 | 1591 |
assert_select 'input[name=?]', 'time_entry[hours]' |
1592 |
end |
|
1593 |
assert_select 'fieldset' do |
|
1594 |
assert_select 'legend', :text => 'Notes' |
|
1595 |
assert_select 'textarea[name=?]', 'issue[notes]' |
|
1596 |
end |
|
1597 |
end |
|
1592 |
end |
|
1593 |
assert_select 'fieldset' do |
|
1594 |
assert_select 'legend', :text => 'Notes' |
|
1595 |
assert_select 'textarea[name=?]', 'issue[notes]' |
|
1596 |
end |
|
1597 |
end |
|
1598 |
end |
|
1599 | ||
1600 |
def test_show_issue_attributes_should_provide_contextmenu |
|
1601 |
@request.session[:user_id] = 2 |
|
1602 |
get :show, :params => { |
|
1603 |
:id => 1 |
|
1604 |
} |
|
1605 | ||
1606 |
# assert context menu on issues |
|
1607 |
assert_select 'form[data-cm-url=?]', '/issues/context_menu' |
|
1608 |
assert_select 'div.attributes.hascontextmenu' do |
|
1609 |
assert_select 'input[name=?][type=?]', 'ids[]', 'checkbox' |
|
1610 |
end |
|
1598 | 1611 |
end |
1599 | 1612 | |
1600 | 1613 |
def test_show_should_display_update_form |