1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-16 07:08:55 +00:00

Finish URL design

This commit is contained in:
Daniel Pan
2015-04-11 17:35:02 +08:00
parent 6680e8e88e
commit fd3a150717
8 changed files with 57 additions and 47 deletions

View File

@@ -225,12 +225,20 @@ define([
},
renderPath: function() {
var dir = this.dir,
path = dir.path,
obj = {
var dir = this.dir;
var path = dir.path;
var context = 'my';
if (dir.category.startsWith('org')) {
context = 'org';
} else if (dir.category.startsWith('group')) {
context = 'group';
}
var obj = {
path: path,
repo_name: dir.repo_name,
category: dir.category
category: dir.category,
context: context
};
var path_list = path.substr(1).split('/');