suppression de l'import depuis camembert et ajout de la recherche phonétique de nom
This commit is contained in:
parent
6f3a256da4
commit
42fd23caa8
@ -22,8 +22,8 @@ class MembersController(AuthenticatedBaseController):
|
||||
|
||||
def __init__(self):
|
||||
self.add = MembersAddController()
|
||||
|
||||
def sort_name(self, name_items):
|
||||
@staticmethod
|
||||
def sort_name(name_items):
|
||||
return sorted(name_items, key=lambda t:t.sn.first())
|
||||
|
||||
@expose("brie.templates.members.index")
|
||||
@ -54,7 +54,7 @@ class MembersController(AuthenticatedBaseController):
|
||||
return {
|
||||
"members" : members,
|
||||
"residence" : residence_name,
|
||||
"sort_name" : self.sort_name
|
||||
"sort_name" : MembersController.sort_name
|
||||
}
|
||||
#end def
|
||||
|
||||
|
@ -16,6 +16,7 @@ from brie.controllers.auth import AuthRestController
|
||||
from brie.controllers.rooms import RoomsController
|
||||
from brie.controllers.members import MembersController
|
||||
from brie.controllers.show import ShowController
|
||||
from brie.controllers.search import SearchController
|
||||
from brie.controllers.edit import EditController
|
||||
from brie.controllers.administration import AdministrationController
|
||||
from brie.controllers.error import ErrorController
|
||||
@ -47,6 +48,7 @@ class RootController(BaseController):
|
||||
edit = EditController(show)
|
||||
administration = AdministrationController()
|
||||
error = ErrorController()
|
||||
search = SearchController()
|
||||
|
||||
@expose('brie.templates.index')
|
||||
def index(self):
|
||||
|
@ -35,6 +35,11 @@ class Member(object):
|
||||
def get_all(user_session, residence_dn):
|
||||
return user_session.ldap_bind.search(ldap_config.username_base_dn + residence_dn, "(objectClass=pacatnetMember)")
|
||||
#end def
|
||||
|
||||
@staticmethod
|
||||
def get_by_name(user_session, residence_dn, name):
|
||||
return user_session.ldap_bind.search(ldap_config.username_base_dn + residence_dn, "(&(objectClass=pacatnetMember)(cn~=" + name + "))")
|
||||
#end def
|
||||
|
||||
#end class
|
||||
|
||||
|
@ -113,12 +113,6 @@
|
||||
</span>
|
||||
</form>
|
||||
</div>
|
||||
<div>
|
||||
<span class="item_name"></span>
|
||||
<span>
|
||||
<a href="/edit/import_from/${room.uid.first()}" class="button">Importer depuis Camembert</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</py:def>
|
||||
|
@ -31,6 +31,14 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section">
|
||||
<span class="section_name show_section_name">Nom</span>
|
||||
<form action="/search/member/" method="post" class="inline_block">
|
||||
<input type="hidden" name="residence" value="${residence}"/>
|
||||
<input type="text" name="name"/>
|
||||
<input type="submit" value="Search" class="button"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user