Add a brand new theme to the Manager
This commit is contained in:
parent
83dce88170
commit
7b468221c3
|
@ -10,6 +10,7 @@ my $h = new Lemonldap::NG::Manager(
|
|||
},
|
||||
dhtmlXTreeImageLocation => "/imgs/",
|
||||
applyConfFile => '__DIR__/manager/apply.conf',
|
||||
cssFile => 'theme/default.css',
|
||||
|
||||
# jsFile => /path/to/lemonldap-ng-manager.js,
|
||||
}
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
/* CSS for LemonLDAP::NG Manager */
|
||||
|
||||
body {
|
||||
font-family: Arial, Helvetica, Verdana;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#gauche {
|
||||
background: #dfdfdf url(hatch.gif);
|
||||
}
|
||||
|
||||
#haut {
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
#bas {
|
||||
background: #ccc url(hatch.gif);
|
||||
}
|
||||
|
||||
#treeBox {
|
||||
background: url(logo_lemonldap-ng.png) no-repeat center 5px;
|
||||
padding: 50px 0 0 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#buttons {
|
||||
margin: 20px 40px;
|
||||
padding: 5px;
|
||||
background: #fff;
|
||||
border: 1px #ccc dashed;
|
||||
}
|
||||
|
||||
#formulaire {
|
||||
margin: 20px 40px;
|
||||
}
|
||||
|
||||
input, textarea {
|
||||
border: 1px #ccc solid;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
#formulaire th {
|
||||
background: #ddd url(hatch.gif);
|
||||
}
|
||||
|
||||
#formulaire td {
|
||||
padding: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6, dt {
|
||||
color: #d9b500;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
pre, code {
|
||||
font: 10pt monospace;
|
||||
border-left: 5px gray solid;
|
||||
padding: 5px;
|
||||
margin: 0 10px;
|
||||
background: #ccc;
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 54 B |
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
|
@ -37,6 +37,7 @@ sub new {
|
|||
unless ( -r $self->{jsFile} ) {
|
||||
print STDERR qq#Unable to read $self->{jsFile}. You have to set "jsFile" parameter to /path/to/lemonldap-ng-manager.js\n#;
|
||||
}
|
||||
$self->{pageTitle} ||= "LemonLDAP::NG Administration";
|
||||
unless ( __PACKAGE__->can('ldapServer') ) {
|
||||
Lemonldap::NG::Manager::_i18n::import( $ENV{HTTP_ACCEPT_LANGUAGE} );
|
||||
}
|
||||
|
@ -62,7 +63,17 @@ sub doall {
|
|||
# When using header_public here, Firefox does not load configuration
|
||||
# sometimes. Where is the bug ?
|
||||
print $self->header;
|
||||
print $self->start_html;
|
||||
# Test if we have to use specific CSS
|
||||
if ( defined $self->{cssFile} ) {
|
||||
print $self->start_html(
|
||||
-style => $self->{cssFile},
|
||||
-title => $self->{pageTitle},
|
||||
)
|
||||
} else {
|
||||
print $self->start_html(
|
||||
-title => $self->{pageTitle},
|
||||
)
|
||||
}
|
||||
print $self->main;
|
||||
print $self->end_html;
|
||||
}
|
||||
|
|
|
@ -409,13 +409,21 @@ sub start_html {
|
|||
my %args = @_;
|
||||
$args{'-style'} = { -src => [ $args{'-style'} ] }
|
||||
if ( $args{'-style'} and !ref( $args{'-style'} ) );
|
||||
push @{ $args{'-style'}->{'-src'} }, "$ENV{SCRIPT_NAME}?lmQuery=css";
|
||||
unshift @{ $args{'-style'}->{'-src'} }, "$ENV{SCRIPT_NAME}?lmQuery=css";
|
||||
$args{'-title'} ||= 'Lemonldap::NG Configuration';
|
||||
$self->CGI::start_html(%args);
|
||||
}
|
||||
|
||||
sub main {
|
||||
|
||||
Lemonldap::NG::Manager::_i18n::import( $ENV{HTTP_ACCEPT_LANGUAGE} );
|
||||
my %text;
|
||||
foreach(qw(field value)) {
|
||||
$text{$_} = &{"txt_$_"};
|
||||
$text{$_} =~s/'/\\'/g;
|
||||
}
|
||||
|
||||
|
||||
# Lemonldap::Manager javascripts;
|
||||
print
|
||||
qq#<script type="text/javascript" src="$ENV{SCRIPT_NAME}?lmQuery=libjs"></script>\n#;
|
||||
|
@ -440,8 +448,8 @@ qq#<script type="text/javascript" src="$ENV{SCRIPT_NAME}?lmQuery=lmjs"></script>
|
|||
<p></p>
|
||||
<table border="1" width="100%" style="empty-cells:show;">
|
||||
<tr>
|
||||
<th width="200">Champ</th>
|
||||
<th width="400">Valeur</th>
|
||||
<th width="200">$text{field}</th>
|
||||
<th width="400">$text{value}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
|
|
@ -57,6 +57,7 @@ sub en {
|
|||
domain => "Domain",
|
||||
error => "Error",
|
||||
exportedVars => "Exported Variables",
|
||||
field => "Field",
|
||||
generalParameters => "General Parameters",
|
||||
globalStorageOptions => "Session Storage Parameters",
|
||||
group => "Group",
|
||||
|
@ -106,6 +107,7 @@ sub en {
|
|||
unknownError => "Unknown error",
|
||||
unknownErrorInVars => "Unknown error in exported attributes",
|
||||
userGroups => "User Groups",
|
||||
value => "Value",
|
||||
virtualHosts => "Virtual Hosts",
|
||||
waitingResult => "Waiting result...",
|
||||
warningConfNotApplied => "You have to reload handlers to take the saved configuration in account",
|
||||
|
@ -138,13 +140,14 @@ sub fr {
|
|||
domain => "Domaine",
|
||||
error => "Erreur",
|
||||
exportedVars => "Attributs LDAP à exporter",
|
||||
field => "Champ",
|
||||
generalParameters => "Paramètres généraux",
|
||||
globalStorageOptions => "Paramètres du module Apache::Session",
|
||||
group => "Groupe",
|
||||
header => "En-tête",
|
||||
httpHeaders => "En-têtes HTTP",
|
||||
invalidLine => "Ligne invalide",
|
||||
invalidVirtualHostName => "Nom de d'hôte virtuel incorrect",
|
||||
invalidVirtualHostName => "Nom de d'hôte virtuel incorrect",
|
||||
invalidWhatToTrace => "La donnée à inscrire dans les journaux ne peut contenir qu'un attribut exporté ou une macro",
|
||||
isNotANumber => "n'est pas un nombre",
|
||||
isNotAValidAttributeName => "n'est pas un nom d'attribut valide",
|
||||
|
@ -171,7 +174,7 @@ sub fr {
|
|||
newMacro => "Nouvelle macro",
|
||||
newRule => "Nouvelle règle",
|
||||
newVar => "Nouvelle variable",
|
||||
newVirtualHost => "Nouvel hote virtuel",
|
||||
newVirtualHost => "Nouvel hôte virtuel",
|
||||
nextConf => "Suivante",
|
||||
prevConf => "Précédente",
|
||||
result => "Résultat",
|
||||
|
@ -187,6 +190,7 @@ sub fr {
|
|||
unknownError => "Erreur inconnue",
|
||||
unknownErrorInVars => "Erreur inconnue dans les attributs exportés",
|
||||
userGroups => "Groupes d'utilisateurs",
|
||||
value => "Valeur",
|
||||
virtualHosts => "Hôtes virtuels",
|
||||
waitingResult => "En attente...",
|
||||
warningConfNotApplied => "Vous devez recharger les agents pour que la configuration sauvegardée soit appliquée",
|
||||
|
|
Loading…
Reference in New Issue