441 |
441 |
link = nil
|
442 |
442 |
if esc.nil?
|
443 |
443 |
if prefix.nil? && sep == 'r'
|
444 |
|
if project && (changeset = project.changesets.find_by_revision(oid))
|
|
444 |
if project && (changeset = project.changesets.find_by_revision(oid)) && User.current.allowed_to?(:view_changesets, project)
|
445 |
445 |
link = link_to("r#{oid}", {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :rev => oid},
|
|
446 |
:condition => Project.visible_by(User.current),
|
446 |
447 |
:class => 'changeset',
|
447 |
448 |
:title => truncate_single_line(changeset.comments, :length => 100))
|
448 |
449 |
end
|
... | ... | |
451 |
452 |
case prefix
|
452 |
453 |
when nil
|
453 |
454 |
if issue = Issue.find_by_id(oid, :include => [:project, :status], :conditions => Project.visible_by(User.current))
|
454 |
|
link = link_to("##{oid}", {:only_path => only_path, :controller => 'issues', :action => 'show', :id => oid},
|
455 |
|
:class => (issue.closed? ? 'issue closed' : 'issue'),
|
456 |
|
:title => "#{truncate(issue.subject, :length => 100)} (#{issue.status.name})")
|
457 |
|
link = content_tag('del', link) if issue.closed?
|
|
455 |
if User.current.allowed_to?(:view_issues, issue.project) or (User.current.allowed_to?(:view_own_issues, issue.project) and User.current == issue.author)
|
|
456 |
link = link_to("##{oid}", {:only_path => only_path, :controller => 'issues', :action => 'show', :id => oid},
|
|
457 |
:class => (issue.closed? ? 'issue closed' : 'issue'),
|
|
458 |
:title => "#{truncate(issue.subject, :length => 100)} (#{issue.status.name})")
|
|
459 |
link = content_tag('del', link) if issue.closed?
|
|
460 |
end
|
458 |
461 |
end
|
459 |
462 |
when 'document'
|
460 |
463 |
if document = Document.find_by_id(oid, :include => [:project], :conditions => Project.visible_by(User.current))
|