Debut migration Wifi et Unix en plugins

This commit is contained in:
Roven Gabriel 2013-03-30 23:50:39 +01:00
parent 52074c0002
commit 8cb264bcbb
9 changed files with 51 additions and 22 deletions

View File

@ -1,9 +1,9 @@
from brie.plugins.wifi.controller import *
from brie.plugins.shell.controller import *
from brie.plugins.unix.controller import *
mappings = {
"brie.controllers.show.member" : [
("wifi", Wifi.show),
("shell", Shell.show)
("unix", Unix.show)
]
}

View File

@ -1,11 +1,11 @@
from tg.decorators import expose
class Shell:
class Unix:
@staticmethod
@expose("brie.plugins.unix.show")
def show(models):
return {
"name" : "shell"
}
#end def
#end class

View File

@ -0,0 +1,28 @@
<html
xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="" >
<div class="section">
<span class="section_name show_section_name">UNIX</span>
<div>
<span class="item_name">Uid unix</span>
<py:choose test="member_ldap.uidNumber">
<span py:when="None">Aucun uid</span>
<span py:otherwise="">
${member_ldap.uidNumber.first()}
</span>
</py:choose>
<a href="#todo" class="link_button">génerer</a>
</div>
<div>
<span class="item_name">Shell</span>
<py:choose test="member_ldap.loginShell">
<span py:when="None">Aucun shell</span>
<span py:otherwise="">
${member_ldap.loginShell.first()}
</span>
</py:choose>
</div>
</div>
</html>

View File

@ -7,7 +7,7 @@ class Wifi:
@expose("brie.plugins.wifi.show")
def show(models):
return {
"name" : "wifi"
"activated" : str("Todo")
}
#end def

View File

@ -2,6 +2,16 @@
xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="" >
hello wifi
<div class="section">
<span class="section_name show_section_name">WIFI</span>
<div>
<span class="item_name">Activé</span>
<span>${wifi_show.activated}</span>
</div>
<div>
<span class="item_name">Mot de passe</span>
<span><a href="/plugins/wifi/edit/${residence}/${member_ldap.uid.first()}" class="link_button">changer</a></span>
</div>
</div>
</html>

View File

@ -2,7 +2,6 @@
xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="" >
toto
<py:if test="defined('_plugins_templates')">
<xi:include
py:for="plugin_template in _plugins_templates"

View File

@ -16,7 +16,6 @@
<span class="section_name" py:when="None">Pas de chambre associée</span>
<div py:otherwise="">${room_view(room_ldap)}</div>
</div>
<span>test : ${wifi_show.name}</span>
<xi:include href="plugins.html" />
</body>
</html>

View File

@ -54,8 +54,12 @@
<div class="section">
<span class="section_name show_section_name">DIVERS</span>
<div>
<span class="item_name">Identifiant</span>
<span>${member_ldap.uid.first()}</span>
<span class="item_name">Identifiants</span>
<span>
<py:for each="uid in member_ldap.uid.values">
${uid}
</py:for>
</span>
</div>
<div>
<span class="item_name">Groupes</span>
@ -66,17 +70,6 @@
</span>
</py:choose>
</div>
<div>
<span class="item_name">Uid unix</span>
<py:choose test="member_ldap.uidNumber">
<span py:when="None">Aucun uid</span>
<span py:otherwise="">${member_ldap.uidNumber.first()}</span>
</py:choose>
</div>
<div>
<span class="item_name">Wifi</span>
<span><a href="/edit/wifi/${member_ldap.uid.first()}" class="link_button">mot de passe</a></span>
</div>
</div>
<div class="section">
<span class="section_name show_section_name">MACHINES</span>