Debut migration Wifi et Unix en plugins
This commit is contained in:
parent
52074c0002
commit
8cb264bcbb
@ -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)
|
||||
]
|
||||
}
|
||||
|
@ -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
|
28
Brie/brie/plugins/unix/show.html
Normal file
28
Brie/brie/plugins/unix/show.html
Normal 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>
|
||||
|
@ -7,7 +7,7 @@ class Wifi:
|
||||
@expose("brie.plugins.wifi.show")
|
||||
def show(models):
|
||||
return {
|
||||
"name" : "wifi"
|
||||
"activated" : str("Todo")
|
||||
}
|
||||
#end def
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user