mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-16 07:08:55 +00:00
Fixed bug when email contains '+' sign
This commit is contained in:
@@ -256,3 +256,8 @@ def translate_permission(value):
|
|||||||
return _(u'Read-Only')
|
return _(u'Read-Only')
|
||||||
else:
|
else:
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
@register.filter(name='quote')
|
||||||
|
def quote(value):
|
||||||
|
from urllib2 import quote
|
||||||
|
return quote(value)
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
{% extends "myhome_base.html" %}
|
{% extends "myhome_base.html" %}
|
||||||
{% load avatar_tags i18n %}
|
{% load avatar_tags i18n seahub_tags %}
|
||||||
|
|
||||||
{% block nav_contacts_class %}class="cur"{% endblock %}
|
{% block nav_contacts_class %}class="cur"{% endblock %}
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
<td>{{ contact.note }}</td>
|
<td>{{ contact.note }}</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="#" data="{{ SITE_ROOT }}contacts/edit/?email={{ contact.contact_email }}" class="contact-edit op">{% trans "Edit"%}</a>
|
<a href="#" data="{{ SITE_ROOT }}contacts/edit/?email={{ contact.contact_email }}" class="contact-edit op">{% trans "Edit"%}</a>
|
||||||
<a href="#" data-url="{{ SITE_ROOT }}contacts/delete/?email={{ contact.contact_email}}" data-target="{{ contact.contact_email}}" class="contact-delete op">{% trans "Delete"%}</a>
|
<a href="#" data-url="{{ SITE_ROOT }}contacts/delete/?email={{ contact.contact_email|quote}}" data-target="{{ contact.contact_email}}" class="contact-delete op">{% trans "Delete"%}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@@ -19,7 +19,7 @@ urlpatterns = patterns('',
|
|||||||
|
|
||||||
|
|
||||||
# repo share
|
# repo share
|
||||||
url(r'^(?P<url_prefix>[^/]+)/shareadmin/$', org_shareadmin, name='org_shareadmin'),
|
url(r'^(?P<url_prefix>[^/]+)/share/$', org_shareadmin, name='org_shareadmin'),
|
||||||
url(r'^(?P<url_prefix>[^/]+)/repo/share/$', org_repo_share, name='org_repo_share'),
|
url(r'^(?P<url_prefix>[^/]+)/repo/share/$', org_repo_share, name='org_repo_share'),
|
||||||
url(r'^(?P<url_prefix>[^/]+)/share/permission_admin/$', org_share_permission_admin, name='org_share_permission_admin'),
|
url(r'^(?P<url_prefix>[^/]+)/share/permission_admin/$', org_share_permission_admin, name='org_share_permission_admin'),
|
||||||
|
|
||||||
|
@@ -53,10 +53,10 @@
|
|||||||
<td>{{ repo.props.repo_desc }}</td>
|
<td>{{ repo.props.repo_desc }}</td>
|
||||||
<td>
|
<td>
|
||||||
{% if repo.props.share_type == 'group' %}
|
{% if repo.props.share_type == 'group' %}
|
||||||
<a href="#" data="{% url 'repo_remove_share' %}?repo_id={{ repo.props.repo_id }}&from={{ request.user }}&gid={{ repo.props.group_id }}" class="cancel-share op">{% trans "Unshare"%}</a>
|
<a href="#" data="{% url 'repo_remove_share' %}?repo_id={{ repo.props.repo_id }}&from={{ request.user.username|quote }}&gid={{ repo.props.group_id }}" class="cancel-share op">{% trans "Unshare"%}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if repo.props.share_type == 'personal' %}
|
{% if repo.props.share_type == 'personal' %}
|
||||||
<a href="#" data="{% url 'repo_remove_share' %}?repo_id={{ repo.props.repo_id }}&from={{ request.user }}&to={{ repo.props.user }}" class="cancel-share op">{% trans "Unshare"%}</a>
|
<a href="#" data="{% url 'repo_remove_share' %}?repo_id={{ repo.props.repo_id }}&from={{ request.user.username|quote }}&to={{ repo.props.user|quote }}" class="cancel-share op">{% trans "Unshare"%}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if repo.props.share_type == 'public' %}
|
{% if repo.props.share_type == 'public' %}
|
||||||
{% if not org %}
|
{% if not org %}
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
<a href="{% url 'organizations.views.org_groups' org.url_prefix %}" {% block nav_group_class %}{% endblock %}>{% trans "Groups" %}</a>
|
<a href="{% url 'organizations.views.org_groups' org.url_prefix %}" {% block nav_group_class %}{% endblock %}>{% trans "Groups" %}</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url 'organizations.views.org_shareadmin' org.url_prefix %}" {% block nav_shareadmin_class %}{% endblock %}>{% trans "Share" %}</a>
|
<a href="{% url 'organizations.views.org_shareadmin' org.url_prefix %}" {% block nav_share_class %}{% endblock %}>{% trans "Share" %}</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url 'organizations.views.org_public' org.url_prefix %}" {% block nav_org_class %}{% endblock %}>{% trans "Public Library" %}</a>
|
<a href="{% url 'organizations.views.org_public' org.url_prefix %}" {% block nav_org_class %}{% endblock %}>{% trans "Public Library" %}</a>
|
||||||
|
@@ -80,7 +80,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<img src="{{ MEDIA_URL }}img/download-20.png" data="{{ repo.repo_id }}" class="download-btn op-icon vh" title="{% trans "Download" %}" alt="{% trans "Download" %}" />
|
<img src="{{ MEDIA_URL }}img/download-20.png" data="{{ repo.repo_id }}" class="download-btn op-icon vh" title="{% trans "Download" %}" alt="{% trans "Download" %}" />
|
||||||
{% if repo.share_type == 'personal' %}
|
{% if repo.share_type == 'personal' %}
|
||||||
<img src="{{ MEDIA_URL }}img/delete-20.png" data-url="{% url 'repo_remove_share' %}?repo_id={{ repo.repo_id }}&from={{ repo.user }}&to={{ request.user }}" data-target="{{repo.repo_name}}" class="unshare-btn op-icon vh" title="{% trans "Leave Share" %}" alt="{% trans "Leave Share" %}" />
|
<img src="{{ MEDIA_URL }}img/delete-20.png" data-url="{% url 'repo_remove_share' %}?repo_id={{ repo.repo_id }}&from={{ repo.user|quote }}&to={{ request.user.username|quote }}" data-target="{{repo.repo_name}}" class="unshare-btn op-icon vh" title="{% trans "Leave Share" %}" alt="{% trans "Leave Share" %}" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
Reference in New Issue
Block a user