Commits

Zhang Huangbin  committed 719e7b7

Sync templates.

  • Participants
  • Parent commits abeda7d

Comments (0)

Files changed (3)

File controllers/ldap/urls.py

         '/users',                           'controllers.ldap.user.list',
         '/users/(.*\..*)',                  'controllers.ldap.user.list',
         '/profile/user/(general)/(.*@.*\..*)',        'controllers.ldap.user.profile',
+        '/profile/user/(nicknames)/(.*@.*\..*)',        'controllers.ldap.user.profile',
         '/profile/user/(groups)/(.*@.*\..*)',        'controllers.ldap.user.profile',
         '/profile/user/(services)/(.*@.*\..*)',        'controllers.ldap.user.profile',
         '/profile/user/(forwarding)/(.*@.*\..*)',        'controllers.ldap.user.profile',

File controllers/ldap/user.py

                     web.seeother('/domains?msg=NO_SUCH_DOMAIN')
             elif isinstance(allDomains, types.ListType) is True and len(allDomains) == 0:
                 return render.users(msg='NO_DOMAIN_AVAILABLE')
+            elif isinstance(allDomains, types.ListType) is True and len(allDomains) > 1:
+                return render.users(allDomains=allDomains)
             else:
                 web.seeother('/domains?msg=NO_SUCH_DOMAIN')
         else:

File templates/default/ldap/users.html

 <span>{{ _('View users under domain:') }} </span>
 <span>
     <select id="domainSelect" name="domainName" onchange="listAccountsUnderDomain(this, baseurl='{{ctx.homepath}}/users/');">
-    {% for d in allDomains %}
-        <option value="{{d[1].domainName[0]}}" {% if cur_domain == d[1].domainName[0] %}selected{%endif%}>{{d[1].domainName[0]}}</option>
-    {% endfor %}
+        <option value="none" {% if cur_domain is sameas none %}selected{%endif%}>{{ _('Select one domain') }}</option>
+        {% for d in allDomains %}
+            <option value="{{d[1].domainName[0]}}" {% if cur_domain == d[1].domainName[0] %}selected{%endif%}>{{d[1].domainName[0]}}</option>
+        {% endfor %}
     </select>
 </span>
 {% endblock id_welcome %}