blob: 4a6923afd09631386c739fc5a69d18e74444fa8a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
module ProjectsHelper
def view_mode_style(type)
cookies["project_view"] ||= "tile"
cookies["project_view"] == type ? nil : "display:none"
end
def load_note_parent(id, type, project)
case type
when "Issue" then @project.issues.find(id)
when "Commit" then @project.repo.commits(id).first
when "Snippet" then @project.snippets.find(id)
else
true
end
rescue
nil
end
end
|