correction bugs + debut interface graphique
This commit is contained in:
parent
b6e09c13a9
commit
1a6d9d7df2
@ -83,6 +83,7 @@ class MemberModificationController(AuthenticatedRestController):
|
||||
raise Exception("unable to retrieve rooms")
|
||||
#end if
|
||||
rooms = sorted(rooms, key=lambda t:t.cn.first())
|
||||
|
||||
return {
|
||||
"residence" : residence,
|
||||
"user" : self.user,
|
||||
@ -354,13 +355,15 @@ class RoomMoveController(AuthenticatedRestController):
|
||||
|
||||
# Si la machine existe effectivement, on la supprime
|
||||
if room is not None:
|
||||
if room.get("x-memberIn") is not None:
|
||||
if room.get("x-memberIn") is not None and room.get('x-memberIn').first() != 'None':
|
||||
raise Exception("chambre de destination non vide")
|
||||
#TODO passer sur une page d'erreur au lieu d'une exception
|
||||
else:
|
||||
old_room = Room.get_by_member_dn(self.user, residence_dn, member.dn)
|
||||
memberIn_attribute = Room.memberIn_attr(str(member.dn))
|
||||
self.user.ldap_bind.delete_attr(old_room.dn, memberIn_attribute)
|
||||
if old_room is not None:
|
||||
self.user.ldap_bind.delete_attr(old_room.dn, memberIn_attribute)
|
||||
#end if
|
||||
self.user.ldap_bind.add_attr(room.dn, memberIn_attribute)
|
||||
#end if
|
||||
else:
|
||||
@ -411,7 +414,7 @@ class RoomChangeMemberController(AuthenticatedRestController):
|
||||
if room is None:
|
||||
raise Exception("room inconnue")
|
||||
|
||||
if room.get("x-memberIn") is not None:
|
||||
if room.get("x-memberIn") is not None and room.get("x-memberIn").first() != 'None':
|
||||
memberIn_attribute = Room.memberIn_attr(str(room.get("x-memberIn").first()))
|
||||
self.user.ldap_bind.delete_attr(room.dn, memberIn_attribute)
|
||||
#end if
|
||||
|
1109
Brie/brie/public/css/bootstrap-responsive.css
vendored
Normal file
1109
Brie/brie/public/css/bootstrap-responsive.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
9
Brie/brie/public/css/bootstrap-responsive.min.css
vendored
Normal file
9
Brie/brie/public/css/bootstrap-responsive.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
6167
Brie/brie/public/css/bootstrap.css
vendored
Normal file
6167
Brie/brie/public/css/bootstrap.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
9
Brie/brie/public/css/bootstrap.min.css
vendored
Normal file
9
Brie/brie/public/css/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
Brie/brie/public/img/glyphicons-halflings-white.png
Normal file
BIN
Brie/brie/public/img/glyphicons-halflings-white.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.6 KiB |
BIN
Brie/brie/public/img/glyphicons-halflings.png
Normal file
BIN
Brie/brie/public/img/glyphicons-halflings.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
2280
Brie/brie/public/js/bootstrap.js
vendored
Normal file
2280
Brie/brie/public/js/bootstrap.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
Brie/brie/public/js/bootstrap.min.js
vendored
Normal file
6
Brie/brie/public/js/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -14,7 +14,24 @@
|
||||
<div py:otherwise="">${member_view(member_ldap)}</div>
|
||||
</div>
|
||||
<div py:choose="room_ldap">
|
||||
<span class="section_name" py:when="None">Pas de chambre associée</span>
|
||||
<div class="section_name" py:when="None">Pas de chambre associée
|
||||
<div py:if="rooms is not None">
|
||||
<form method="post" action="/edit/room/move">
|
||||
<span class="item_name">Changer de chambre</span>
|
||||
<select name="room_uid">
|
||||
<option value=""><vide></option>
|
||||
<py:for each="target_room in rooms">
|
||||
<option value="${target_room.uid.first()}">${target_room.cn.first()}</option>
|
||||
</py:for>
|
||||
</select>
|
||||
<input type="hidden" name="residence" value="${residence}"/>
|
||||
<input type="hidden" name="member_uid" value="${member_ldap.uid.first()}"/>
|
||||
<span>
|
||||
<input type="submit" class="button" value="Envoyer!" />
|
||||
</span>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div py:otherwise="">${room_view(room_ldap, rooms, member_ldap)}</div>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -2,12 +2,62 @@
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="/css/common.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/css/show.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<meta name="description" content=""/>
|
||||
<meta name="author" content=""/>
|
||||
|
||||
<!-- Le styles -->
|
||||
<link href="/css/bootstrap.css" rel="stylesheet"/>
|
||||
<style type="text/css">
|
||||
|
||||
.form-signin {
|
||||
max-width: 300px;
|
||||
padding: 19px 29px 29px;
|
||||
margin: 0 auto 20px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #e5e5e5;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
|
||||
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,.05);
|
||||
}
|
||||
.form-signin .form-signin-heading,
|
||||
.form-signin .checkbox {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.form-signin input[type="text"],
|
||||
.form-signin input[type="password"] {
|
||||
font-size: 16px;
|
||||
height: auto;
|
||||
margin-bottom: 15px;
|
||||
padding: 7px 9px;
|
||||
}
|
||||
</style>
|
||||
<link href="/css/bootstrap-responsive.css" rel="stylesheet" />
|
||||
|
||||
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="/js/html5shiv.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<xi:include href="login_widget.html" />
|
||||
<div>${login_widget(user)}</div>
|
||||
|
||||
<div py:if="user is not None">
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="#">Title</a>
|
||||
<ul class="nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li py:if="user.groups.admin"><a href="/rooms/index/${residence}">CHAMBRES</a></li>
|
||||
<li py:if="user.groups.admin"><a href="/members/index/${residence}">MEMBRES</a></li>
|
||||
<li py:if="user.groups.responsablereseau"><a href="/administration/">ADMINISTRATION</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section">
|
||||
<span class="section_name show_section_name"></span>
|
||||
<a py:if="user.groups.admin" class="button" href="/rooms/index/${residence}/" >CHAMBRES</a>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<tr py:for="member in sort_name(member_ldap)">
|
||||
<td><a href="/show/member/${residence}/${member.uid.first()}">${member.givenName.first()}</a></td>
|
||||
<td><a href="/show/member/${residence}/${member.uid.first()}">${member.sn.first()}</a></td>
|
||||
<py:choose test="member.room">
|
||||
<py:choose test="member.room.first()">
|
||||
<td py:when="None"></td>
|
||||
<td py:otherwise=""><a href="/show/room/${residence}/${member.room.cn.first()}">${member.room.cn.first()}</a></td>
|
||||
</py:choose>
|
||||
|
Loading…
Reference in New Issue
Block a user