1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-26 15:26:19 +00:00

[dirent-icon] new folder icon with perm

This commit is contained in:
lian
2015-04-27 15:02:28 +08:00
parent 8d73f57a58
commit 427224718a
2 changed files with 6 additions and 1 deletions

View File

@@ -172,7 +172,11 @@
<span class="checkbox"><input type="checkbox" class="checkbox-orig" /></span>
</td>
<td class="star"></td>
<td class="dirent-icon"><img src="{{ MEDIA_URL }}img/folder-icon-24.png" alt="{% trans "Directory icon" %}" /></td>
<% if (dirent.perm == 'rw') { %>
<td class="dirent-icon"><img src="{{ MEDIA_URL }}img/folder-24.png" alt="{% trans "Directory icon" %}" /></td>
<% } else { %>
<td class="dirent-icon"><img src="{{ MEDIA_URL }}img/folder-read-only-24.png" alt="{% trans "Directory icon" %}" /></td>
<% } %>
<td>
<% if (category) { %>
<span class="dirent-name"><a href="#<%= category %>/lib/<%= repo_id %><%- encoded_path %>" class="dir-link normal"><%- dirent.obj_name %></a></span>

View File

@@ -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: