[accessibility] hidden issue relations information

a perfect implementation would use lists (ul)
this would be very complex since the table version
is perfect in terms of styling and has additional functionality
pull/6827/head
Romano Licker 13 years ago
parent ec7e81a5b1
commit 0b7b8c2774
  1. 19
      lib/backlogs/issue_view/issue_hierarchy_paragraph.rb

@ -26,7 +26,7 @@ class Backlogs::IssueView::IssueHierarchyParagraph < ChiliProject::Nissue::Issue
# render parent issues
@issue.ancestors.each do |issue|
s << render_row(t, issue, indent)
s << render_row(t, issue, indent, "parent")
indent += 1
end
@ -36,25 +36,34 @@ class Backlogs::IssueView::IssueHierarchyParagraph < ChiliProject::Nissue::Issue
# render children
issue_list(@issue.descendants.sort_by(&:lft)) do |issue, level|
s << render_row(t, issue, level + indent)
s << render_row(t, issue, level + indent, "child")
end
s << '</table></form>'
s
end
def render_row(t, issue, level)
def render_row(t, issue, level, relation = "root")
css_classes = ["issue"]
css_classes << "issue-#{issue.id}"
css_classes << "idnt" << "idnt-#{level}" if level > 0
if @issue == issue
issue_text = t.link_to("#{issue.tracker.name} ##{issue.id}",
issue_text = t.link_to("#{h(issue.tracker.name)} ##{issue.id}",
'javascript:void(0)',
:style => "color:inherit; font-weight: bold",
:class => issue.css_classes)
else
issue_text = t.link_to_issue_box("#{issue.tracker.name} ##{issue.id}", issue, :class => issue.css_classes)
title = ''
if relation == "parent"
title << content_tag(:span, l(:description_parent_issue), :class => "hidden-for-sighted")
elsif relation == "child"
title << content_tag(:span, l(:description_sub_issue), :class => "hidden-for-sighted")
end
title << " #{h(issue.tracker.name)} ##{issue.id}"
issue_text = t.link_to_issue_box(title, issue, :class => issue.css_classes)
end
issue_text << ": "
issue_text << t.truncate(issue.subject, :length => 60)

Loading…
Cancel
Save