24b6dfc1ff6325422fbb7905af2f3473a2f1f23c=module BreadcrumbsHelper
0af513ab5680818fba780f05ef7cf16e0c0cb0d8henning mueller
4a46649d5c0b3f77917adaa5f6bfc213fb7a0e88= def repository_breadcrumbs(repository, path, oid)
24b6dfc1ff6325422fbb7905af2f3473a2f1f23c= path ||= ''
24b6dfc1ff6325422fbb7905af2f3473a2f1f23c= crumbs = path.split('/')
24a2b8c64527664fef34cb4e20bc7ef946c247ebEugen Kuksa result = [{
24a2b8c64527664fef34cb4e20bc7ef946c247ebEugen Kuksa name: repository.name,
24b6dfc1ff6325422fbb7905af2f3473a2f1f23c= last: false,
6ae3ceffbd4c5f596ce8945f223fc3a7f3dccbe8Eugen Kuksa path: fancy_repository_path(repository, path: nil, ref: oid)
24b6dfc1ff6325422fbb7905af2f3473a2f1f23c= }]
8ec575832389c2588f0b5ca1f1dd2cc42d62eb12=
24b6dfc1ff6325422fbb7905af2f3473a2f1f23c= crumbs.each_with_index do | c, i |
24b6dfc1ff6325422fbb7905af2f3473a2f1f23c= segment = crumbs[0..i].join('/')
24b6dfc1ff6325422fbb7905af2f3473a2f1f23c= result << {
24b6dfc1ff6325422fbb7905af2f3473a2f1f23c= name: c,
24b6dfc1ff6325422fbb7905af2f3473a2f1f23c= last: false,
6ae3ceffbd4c5f596ce8945f223fc3a7f3dccbe8Eugen Kuksa path: fancy_repository_path(repository, path: segment, ref: oid)
24b6dfc1ff6325422fbb7905af2f3473a2f1f23c= }
24b6dfc1ff6325422fbb7905af2f3473a2f1f23c= end
8ec575832389c2588f0b5ca1f1dd2cc42d62eb12=
24b6dfc1ff6325422fbb7905af2f3473a2f1f23c= result.last[:last] = true
8ec575832389c2588f0b5ca1f1dd2cc42d62eb12=
24b6dfc1ff6325422fbb7905af2f3473a2f1f23c= result
24b6dfc1ff6325422fbb7905af2f3473a2f1f23c= end
0af513ab5680818fba780f05ef7cf16e0c0cb0d8henning mueller
24b6dfc1ff6325422fbb7905af2f3473a2f1f23c=end