diff --git a/forms.py b/forms.py index 19ea4df019..5d7f4dd89d 100644 --- a/forms.py +++ b/forms.py @@ -215,3 +215,11 @@ class RepoPassowrdForm(forms.Form): else: raise forms.ValidationError(u'未知错误') +class SetUserQuotaForm(forms.Form): + """ + Form for setting user quota. + """ + email = forms.CharField(error_messages={'required': '参数错误'}) + quota = forms.IntegerField(min_value=0, + error_messages={'required': '容量不能为空', + 'min_value': '容量不能小于0'}) diff --git a/organizations/templates/organizations/org_useradmin.html b/organizations/templates/organizations/org_admin.html similarity index 83% rename from organizations/templates/organizations/org_useradmin.html rename to organizations/templates/organizations/org_admin.html index e3cf0519c7..27e2a069ca 100644 --- a/organizations/templates/organizations/org_useradmin.html +++ b/organizations/templates/organizations/org_admin.html @@ -3,18 +3,33 @@ {% block nav_useradmin_class %}class="cur"{% endblock %} +{% block left_panel %} + +
{{ org_quota_usage|filesizeformat }} {% if org_quota > 0 %} / {{ org_quota|filesizeformat }} {% endif %}
+邮箱 | +邮箱 | +已用空间 | 操作 |
---|---|---|---|
{{ user.props.email }} | ++ {% if user.quota_usage >= 0 %} + {{ user.quota_usage|filesizeformat }} + {% endif %} + |
{% if not user.is_self %}
删除
diff --git a/organizations/templates/organizations/personal.html b/organizations/templates/organizations/personal.html
index 6938e2b812..81ccd74b2b 100644
--- a/organizations/templates/organizations/personal.html
+++ b/organizations/templates/organizations/personal.html
@@ -21,6 +21,12 @@
{% endif %}
+
+
+
+
{% include "snippets/my_groups.html" %}
{% endblock %}
diff --git a/organizations/urls.py b/organizations/urls.py
index 42af1a9f08..36b8ff0943 100644
--- a/organizations/urls.py
+++ b/organizations/urls.py
@@ -27,7 +27,7 @@ urlpatterns = patterns('',
### Org admin ###
url(r'^(?P我已用的团体空间+{{ quota_usage|filesizeformat }} +已用空间-{{ quota_usage|filesizeformat }} {% if cloud_mode %}/ 2 GB {% endif %} +{{ quota_usage|filesizeformat }} {% if quota > 0 %}/ {{ quota|filesizeformat }} {% endif %} |