Commit 8965bd61 authored by Yadd's avatar Yadd
Browse files

* Menu update : application can contains application

* update trunk from branch
parent 91ff4f82
......@@ -431,6 +431,7 @@ dist: clean
@mkdir -p lemonldap-ng-$(VERSION)
@- cp -pR lemonldap-ng-common/ lemonldap-ng-manager/ lemonldap-ng-portal/ lemonldap-ng-handler/ * lemonldap-ng-$(VERSION)
@- dir=lemonldap-ng-$(VERSION); find $$dir -name .svn -exec rm -rf {} \; 2>/dev/null
@- find $$dir -name '*.bak' -delete
@rm -rf lemonldap-ng-$(VERSION)/lemonldap-ng-$(VERSION)
@tar czf lemonldap-ng-$(VERSION).tar.gz lemonldap-ng-$(VERSION)
@rm -rf lemonldap-ng-$(VERSION)
......
......@@ -3,7 +3,7 @@
<!ELEMENT category (application*, category*) >
<!ATTLIST category name CDATA #REQUIRED >
<!ELEMENT application (name, uri?, description?, logo?, screenshot?, display?) >
<!ELEMENT application (name, uri?, description?, logo?, screenshot?, display?, application*) >
<!ATTLIST application id ID #REQUIRED >
<!ELEMENT name ( #PCDATA ) >
......
......@@ -3,7 +3,7 @@ Section: perl
Priority: extra
Maintainer: Xavier Guimard <x.guimard@free.fr>
DM-Upload-Allowed: yes
Build-Depends: debhelper (>= 4.1.16), po-debconf
Build-Depends: debhelper (>= 5), po-debconf
Build-Depends-Indep:libapache-session-perl, libnet-ldap-perl, libdbi-perl, libwww-perl, libcache-cache-perl, libxml-simple-perl, libcgi-session-perl, libcrypt-rijndael-perl, libxml-libxslt-perl, libio-string-perl, libregexp-assemble-perl, liburi-perl, libstring-random-perl, libmime-lite-perl
Standards-Version: 3.8.0
......
......@@ -100,15 +100,22 @@ sub new {
( $self->{error}, $self->{error_value} ) = $self->_ppolicyWarning;
# Store POST data in $self->{portalObject}
$self->{portalObject}->{'newpassword'} = $self->{portalObject}->param('newpassword');
$self->{portalObject}->{'confirmpassword'} = $self->{portalObject}->param('confirmpassword');
$self->{portalObject}->{'oldpassword'} = $self->{portalObject}->param('oldpassword');
$self->{portalObject}->{'dn'} = $self->{portalObject}->{sessionInfo}->{'dn'};
$self->{portalObject}->{'user'} = $self->{portalObject}->{sessionInfo}->{'_user'};
$self->{portalObject}->{'newpassword'} =
$self->{portalObject}->param('newpassword');
$self->{portalObject}->{'confirmpassword'} =
$self->{portalObject}->param('confirmpassword');
$self->{portalObject}->{'oldpassword'} =
$self->{portalObject}->param('oldpassword');
$self->{portalObject}->{'dn'} =
$self->{portalObject}->{sessionInfo}->{'dn'};
$self->{portalObject}->{'user'} =
$self->{portalObject}->{sessionInfo}->{'_user'};
# Change password (only if newpassword submitted)
$self->{error} = &_passwordDBInit( $self->{portalObject} ) if $self->{portalObject}->{'newpassword'};
$self->{error} = &_modifyPassword( $self->{portalObject} ) if $self->{portalObject}->{'newpassword'};
$self->{error} = &_passwordDBInit( $self->{portalObject} )
if $self->{portalObject}->{'newpassword'};
$self->{error} = &_modifyPassword( $self->{portalObject} )
if $self->{portalObject}->{'newpassword'};
return $self;
}
......@@ -244,11 +251,13 @@ sub _displayCategory {
# Display applications first
my @appnodes = $cat->findnodes("application");
$html .= "<ul>" if scalar @appnodes;
foreach (@appnodes) {
$html .= $self->_displayApplication($_);
if (@appnodes) {
$html .= "<ul>";
foreach (@appnodes) {
$html .= $self->_displayApplication($_);
}
$html .= "</ul>";
}
$html .= "</ul>" if scalar @appnodes;
# Display subcategories
my @catnodes = $cat->findnodes("category");
......@@ -283,7 +292,7 @@ sub _displayApplication {
my $html;
# Get application items
my $appid = $app->getAttribute('id');
my $appid = $app->getAttribute('id');
my $appname = $app->getElementsByTagName('name')->string_value() || $appid;
my $appuri =
$self->_userParam( $app->getElementsByTagName('uri')->string_value()
......@@ -291,8 +300,16 @@ sub _displayApplication {
# Display application
$html .=
"<li title=\"$appid\" class=\"appname\"><span><a href=\"$appuri\">$appname</a></span></li>\n";
"<li title=\"$appid\" class=\"appname\"><span><a href=\"$appuri\">$appname</a></span>\n";
my @appnodes = $app->findnodes("application");
if (@appnodes) {
$html .= "<ul>";
foreach (@appnodes) {
$html .= $self->_displayApplication($_);
}
$html .= "</ul>";
}
$html .= "</li>";
return $html;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment