@** * Yobi, Project Hosting SW * * Copyright 2012 NAVER Corp. * http://yobi.io * * @author Ahn Hyeok Jun * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. **@ @(project:Project, branches:List[String], recursiveData:List[com.fasterxml.jackson.databind.node.ObjectNode], branch:String, path:String) @import utils.TemplateHelper._ @import utils.TemplateHelper.Branches._ @import utils.TemplateHelper.CodeBrowser._ @import java.net.URLEncoder @parseFileInfo(files:com.fasterxml.jackson.databind.node.ObjectNode) = { @fieldText(files, "type") match { case "folder" => { @partial_view_folder(project, files.get("data"), branch, fieldText(files, "path")) } case "file" => { @partial_view_file(project, files, branch, path) } } } @makeBreadCrumbs(pagePath:String) = @{ if(pagePath != null){ var basePath = routes.CodeApp.codeBrowserWithBranch(project.owner, project.name, URLEncoder.encode(branch, "UTF-8"), "").toString() var partialPath = "" pagePath.split("/").toList.map { p => if(partialPath == ""){ partialPath = p } else { partialPath = partialPath + "/" + p } Html("" + p + "") } } } @projectLayout(Messages("menu.code"), project, utils.MenuType.CODE){ @projectMenu(project, utils.MenuType.CODE, "main-menu-only")
@if(fieldText(recursiveData{0}, "type").eq("folder")){ }
@for(fileInfo <- recursiveData){ @parseFileInfo(fileInfo) }
@common.select2() }