diff --git a/media/css/seahub.css b/media/css/seahub.css index 0fb590a228..28a5128016 100644 --- a/media/css/seahub.css +++ b/media/css/seahub.css @@ -3545,16 +3545,20 @@ textarea:-moz-placeholder {/* for FF */ } /* user & group folder perm */ +#share-popup .tabs-panel, #folder-perm-tabs .tabs-panel { width:550px; } +#share-popup .share-permission-select, #folder-perm-tabs .perm-select { height:30px; } +#share-popup .submit, #folder-perm-tabs .submit { margin-top:2px; height:30px; } +#share-popup table, #folder-perm-tabs table { margin-top:0; } diff --git a/seahub/share/urls.py b/seahub/share/urls.py index 9f7a1172b3..17eb5f4a0a 100644 --- a/seahub/share/urls.py +++ b/seahub/share/urls.py @@ -37,5 +37,6 @@ urlpatterns = patterns('', url(r'^ajax/get-download-link/$', ajax_get_download_link, name='ajax_get_download_link'), url(r'^ajax/get-upload-link/$', ajax_get_upload_link, name='ajax_get_upload_link'), url(r'^ajax/private-share-file/$', ajax_private_share_file, name='ajax_private_share_file'), + url(r'^ajax/private-share-dir/$', ajax_private_share_dir, name='ajax_private_share_dir'), ) diff --git a/seahub/share/views.py b/seahub/share/views.py index 30cd5d54ff..0e36f84870 100644 --- a/seahub/share/views.py +++ b/seahub/share/views.py @@ -359,7 +359,7 @@ def ajax_repo_remove_share(request): @login_required def repo_remove_share(request): """ - If repo is shared from one person to another person, only these two peson + If repo is shared from one person to another person, only these two person can remove share. If repo is shared from one person to a group, then only the one share the repo and group staff can remove share. diff --git a/seahub/templates/js/templates.html b/seahub/templates/js/templates.html index c7b972e352..af1e6bfb80 100644 --- a/seahub/templates/js/templates.html +++ b/seahub/templates/js/templates.html @@ -328,8 +328,9 @@ <% if (user_perm == 'rw' && !repo_encrypted) { %>
  • {% trans "Upload Link" %}
  • <% } %> - <% if (!is_virtual && is_repo_owner) { %> -
  • {% trans "Private Share" %}
  • + <% if (!is_virtual && is_repo_owner) { %> {# dir private share #} +
  • {% trans "Share to user" %}
  • +
  • {% trans "Share to group" %}
  • <% } %> <% } %> @@ -423,28 +424,56 @@ <% if (!is_virtual && is_repo_owner) { %> <% if (!repo_encrypted) { %> -
    +
    <% } else { %> -
    {# enc lib only has 'dir-private-share' #} +
    <% } %> -
    -
    -
    - -
    -
    - -
    - -

    - -
    + + + + + + + + + + + +
    {% trans "User" %}{% trans "Permission" %}
    + + + +
    +

    - <% } %> - <% } %> + +
    + + + + + + + + + + + +
    {% trans "Group" %}{% trans "Permission" %}
    + + + +
    +

    +
    + <% } %> {# if (!is_virtual && is_repo_owner) #} + <% } %> {# if is_dir #} <% if (!is_dir && is_repo_owner) { %>
    @@ -608,7 +637,7 @@