Project

General

Profile

Feature #10485 » 0001-Add-context-menu-to-the-issue-subjects.patch

Mizuki ISHIKAWA, 2017-07-13 07:59

View differences:

app/views/gantts/show.html.erb
%>
<%= content_tag(:div, "", :style => style, :class => "gantt_hdr") %>
<%= content_tag(:div, :class => "gantt_subjects") do %>
<%= @gantt.subjects.html_safe %>
<%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do -%>
<%= @gantt.subjects.html_safe %>
<% end %>
<% end %>
<% end %>
</td>
......
wday = 1 if wday > 7
%>
<% end %>
<% end %>
<% end %>
<% ###### Days headers ####### %>
<% if show_days %>
......
$("#draw_progress_line").change(drawGanttHandler);
});
<% end %>
<%= context_menu %>
lib/redmine/helpers/gantt.rb
:title => assigned_string).to_s.html_safe
end
s << view.link_to_issue(issue).html_safe
s << view.content_tag(:input, nil, :type => 'checkbox', :name => 'ids[]', :value => issue.id, :style => 'display:none;', :class => 'toggle-selection')
view.content_tag(:span, s, :class => css_classes).html_safe
when Version
version = object
......
case object
when Issue
tag_options[:id] = "issue-#{object.id}"
tag_options[:class] = "issue-subject"
tag_options[:class] = "issue-subject hascontextmenu"
tag_options[:title] = object.subject
when Version
tag_options[:id] = "version-#{object.id}"
public/stylesheets/application.css
.gantt_subjects { font-size: 0.8em; }
.gantt_subjects div { line-height:16px;height:16px;overflow:hidden;white-space:nowrap;text-overflow: ellipsis; }
.gantt_subjects div.issue-subject:hover { background-color:#ffffdd; }
.task {
position: absolute;
(3-3/6)