created breadcrumb
This commit is contained in:
@@ -6,6 +6,22 @@ module ApplicationHelper
|
||||
|
||||
def push_command(file)
|
||||
url = push_file_url(file)
|
||||
%Q{ curl -F "content=@#{file.file_path}" #{url} }
|
||||
%( curl -F "content=@#{file.file_path}" #{url} )
|
||||
end
|
||||
|
||||
def breadcrumb(record)
|
||||
links = [link_to('CHUB',root_path)]
|
||||
case record
|
||||
when Server
|
||||
links << link_to(record.name,server_path(record))
|
||||
when ConfigurationFile
|
||||
links << link_to(record.server.name, server_path(record.server))
|
||||
links << record.file_path
|
||||
when FileVersion
|
||||
links << link_to(record.configuration_file.server.name, server_path(record.configuration_file.server))
|
||||
links << link_to( record.configuration_file.file_path,edit_configuration_file_path(record.configuration_file))
|
||||
links << "v#{record.number}"
|
||||
end rescue NoMethodError # i know this is wrong, but it's too late now
|
||||
links.join(" > ")
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user