dsaboard
This commit is contained in:
parent
dbd69d1d0e
commit
1a03b17ab5
7 changed files with 120 additions and 51 deletions
|
@ -4,15 +4,14 @@ module ProjectsHelper
|
|||
cookies["project_view"] == type ? nil : "display:none"
|
||||
end
|
||||
|
||||
def noteable_link(id, type, project)
|
||||
def load_note_parent(id, type, project)
|
||||
case type
|
||||
when "Issue"
|
||||
link_to "Issue ##{id}", project_issue_path(project, id)
|
||||
when "Commit"
|
||||
commit = project.repo.commits(id).first
|
||||
link_to truncate(commit.id,:length => 10), project_commit_path(project, id)
|
||||
when "Issue" then @project.issues.find(id)
|
||||
when "Commit" then @project.repo.commits(id).first
|
||||
else
|
||||
link_to "Wall", wall_project_path(project)
|
||||
true
|
||||
end
|
||||
rescue
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue