From 427224718a072a00ab023c8fc3b2b15d64858d15 Mon Sep 17 00:00:00 2001 From: lian Date: Mon, 27 Apr 2015 15:02:28 +0800 Subject: [PATCH] [dirent-icon] new folder icon with perm --- seahub/templates/js/templates.html | 6 +++++- seahub/views/ajax.py | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/seahub/templates/js/templates.html b/seahub/templates/js/templates.html index a040bedf58..ea938905c2 100644 --- a/seahub/templates/js/templates.html +++ b/seahub/templates/js/templates.html @@ -172,7 +172,11 @@ - {% trans + <% if (dirent.perm == 'rw') { %> + {% trans + <% } else { %> + {% trans + <% } %> <% if (category) { %> <%- dirent.obj_name %> diff --git a/seahub/views/ajax.py b/seahub/views/ajax.py index 3ed7881f1c..4c1462fb6c 100644 --- a/seahub/views/ajax.py +++ b/seahub/views/ajax.py @@ -474,6 +474,7 @@ def list_lib_dir(request, repo_id): d_['last_update'] = translate_seahub_time(d.last_modified) p_dpath = posixpath.join(path, d.obj_name) d_['p_dpath'] = p_dpath # for 'view_link' & 'dl_link' + d_['perm'] = d.permission dirent_list.append(d_) if not repo.encrypted and ENABLE_THUMBNAIL: