/[smeserver]/rpms/smeserver-manager/sme10/smeserver-manager-0.1.0-theme_navig_message.patch
ViewVC logotype

Annotation of /rpms/smeserver-manager/sme10/smeserver-manager-0.1.0-theme_navig_message.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Mon Jan 27 09:34:11 2020 UTC (4 years, 9 months ago) by michel
Branch: MAIN
CVS Tags: smeserver-manager-0_1_0-28_el7_sme, smeserver-manager-0_1_0-25_el7_sme, smeserver-manager-0_1_2-1_el7_sme, smeserver-manager-0_1_0-26_el7_sme, smeserver-manager-0_1_0-30_el7_sme, smeserver-manager-0_1_0-27_el7_sme, smeserver-manager-0_1_0-31_el7_sme, smeserver-manager-0_1_0-12_el7_sme, smeserver-manager-0_1_0-9_el7_sme, smeserver-manager-0_1_0-10_el7_sme, smeserver-manager-0_1_0-13_el7_sme, smeserver-manager-0_1_0-11_el7_sme, smeserver-manager-0_1_0-14_el7_sme, smeserver-manager-0_1_0-17_el7_sme, smeserver-manager-0_1_0-19_el7_sme, smeserver-manager-0_1_0-29_el7_sme, smeserver-manager-0_1_0-23_el7_sme, smeserver-manager-0_1_0-20_el7_sme, smeserver-manager-0_1_0-24_el7_sme, smeserver-manager-0_1_0-21_el7_sme, smeserver-manager-0_1_0-16_el7_sme, smeserver-manager-0_1_0-15_el7_sme, smeserver-manager-0_1_0-18_el7_sme, smeserver-manager-0_1_0-22_el7_sme
make: « clog » est à jour.

1 michel 1.1 diff -urN smeserver-manager-0.1.0.old/createlinks smeserver-manager-0.1.0/createlinks
2     --- smeserver-manager-0.1.0.old/createlinks 2020-01-26 23:54:06.000000000 +0400
3     +++ smeserver-manager-0.1.0/createlinks 2020-01-27 12:44:37.876000000 +0400
4     @@ -7,4 +7,10 @@
5     #--------------------------------------------------
6     my $panel = "manager2";
7    
8     -# panel_link("wbl", $panel);
9     +# links to add
10     +
11     +# templates to expand
12     +for my $event ( qw( manager2-modify bootstrap-console-save console-save ) )
13     +{
14     + templates2events("/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf", $event);
15     +}
16     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/db/configuration/defaults/manager2/status smeserver-manager-0.1.0/root/etc/e-smith/db/configuration/defaults/manager2/status
17     --- smeserver-manager-0.1.0.old/root/etc/e-smith/db/configuration/defaults/manager2/status 1970-01-01 04:00:00.000000000 +0400
18     +++ smeserver-manager-0.1.0/root/etc/e-smith/db/configuration/defaults/manager2/status 2020-01-26 23:10:10.000000000 +0400
19     @@ -0,0 +1,2 @@
20     +enabled
21     +
22     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/db/configuration/defaults/manager2/type smeserver-manager-0.1.0/root/etc/e-smith/db/configuration/defaults/manager2/type
23     --- smeserver-manager-0.1.0.old/root/etc/e-smith/db/configuration/defaults/manager2/type 1970-01-01 04:00:00.000000000 +0400
24     +++ smeserver-manager-0.1.0/root/etc/e-smith/db/configuration/defaults/manager2/type 2020-01-26 23:10:36.000000000 +0400
25     @@ -0,0 +1,2 @@
26     +service
27     +
28     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/db/configuration/migrate/manager2 smeserver-manager-0.1.0/root/etc/e-smith/db/configuration/migrate/manager2
29     --- smeserver-manager-0.1.0.old/root/etc/e-smith/db/configuration/migrate/manager2 1970-01-01 04:00:00.000000000 +0400
30     +++ smeserver-manager-0.1.0/root/etc/e-smith/db/configuration/migrate/manager2 2020-01-27 11:33:38.489000000 +0400
31     @@ -0,0 +1,38 @@
32     +{
33     + sub gen_pwd {
34     + use MIME::Base64 qw(encode_base64);
35     + my $p = "not set due to error";
36     + if ( open( RANDOM, "/dev/urandom" ) ){
37     + my $buf;
38     + # 57 bytes is a full line of Base64 coding, and contains
39     + # 456 bits of randomness - given a perfectly random /dev/random
40     + if ( read( RANDOM, $buf, 57 ) != 57 ){
41     + warn("Short read from /dev/random: $!");
42     + }
43     + else{
44     + $p = encode_base64($buf);
45     + chomp $p;
46     + }
47     + close RANDOM;
48     + }
49     + else{
50     + warn "Could not open /dev/urandom: $!";
51     + }
52     + return $p;
53     + }
54     +
55     + my $rec = $DB->get('manager2')
56     + || $DB->new_record('manager2', {type => 'configuration'});
57     +
58     + my $pwd = $rec->prop('Secrets');
59     + if (not $pwd or length($pwd) < 57){
60     + my $pwd = gen_pwd();
61     + $rec->set_prop('Secrets', $pwd);
62     + }
63     +
64     + my $theme = $rec->prop('Theme');
65     + if (not $theme){
66     + $rec->set_prop('Theme', 'default');
67     + }
68     +
69     +}
70     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf/05Begin smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf/05Begin
71     --- smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf/05Begin 1970-01-01 04:00:00.000000000 +0400
72     +++ smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf/05Begin 2020-01-25 23:10:19.000000000 +0400
73     @@ -0,0 +1,3 @@
74     +\{
75     +# configuration file for Mojolicious Server-Manager2 application
76     +#
77     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf/10Secrets smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf/10Secrets
78     --- smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf/10Secrets 1970-01-01 04:00:00.000000000 +0400
79     +++ smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf/10Secrets 2020-01-26 23:17:12.000000000 +0400
80     @@ -0,0 +1,8 @@
81     +{
82     + my @secrets = split /,/, $manager2{'Secrets'};
83     + $OUT .= " secrets => ['";
84     + if ( $secrets[0] ) { $OUT .= "$secrets[0]'"; }
85     + if ( $secrets[1] ) { $OUT .= ",'$secrets[1]'"; }
86     + if ( $secrets[2] ) { $OUT .= ",'$secrets[2]'"; }
87     + $OUT .= "],";
88     +}
89     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf/20Theme smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf/20Theme
90     --- smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf/20Theme 1970-01-01 04:00:00.000000000 +0400
91     +++ smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf/20Theme 2020-01-26 23:17:52.000000000 +0400
92     @@ -0,0 +1 @@
93     + theme => '{ $manager2{'Theme'} || 'default' }',
94     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf/30Other smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf/30Other
95     --- smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf/30Other 1970-01-01 04:00:00.000000000 +0400
96     +++ smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf/30Other 2020-01-25 23:04:33.000000000 +0400
97     @@ -0,0 +1,3 @@
98     + modules_dir => "lib/SrvMngr/Controller",
99     + debug => 0,
100     +\}
101     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Bugreport.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Bugreport.pm
102     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Bugreport.pm 2020-01-26 23:54:06.000000000 +0400
103     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Bugreport.pm 2020-01-24 18:57:07.000000000 +0400
104     @@ -6,6 +6,7 @@
105    
106     use Locale::gettext;
107     use SrvMngr::I18N;
108     +use SrvMngr qw(theme_list init_session_cgi);
109    
110     use Text::Template;
111     use File::Basename;
112     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Clamav.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Clamav.pm
113     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Clamav.pm 2020-01-26 23:54:06.000000000 +0400
114     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Clamav.pm 2020-01-24 18:58:04.000000000 +0400
115     @@ -6,6 +6,7 @@
116    
117     use Locale::gettext;
118     use SrvMngr::I18N;
119     +use SrvMngr qw(theme_list init_session_cgi);
120    
121     #package esmith::FormMagick::Panel::clamav;
122    
123     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Datetime.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Datetime.pm
124     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Datetime.pm 2020-01-26 23:54:06.000000000 +0400
125     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Datetime.pm 2020-01-27 12:08:26.646000000 +0400
126     @@ -6,6 +6,7 @@
127    
128     use Locale::gettext;
129     use SrvMngr::I18N;
130     +use SrvMngr qw(theme_list init_session_cgi);
131    
132     use esmith::FormMagick;
133     #use esmith::FormMagick::Panel::datetime;
134     @@ -57,17 +58,14 @@
135     }
136     # controls
137    
138     - #$db->get('smb')->set_prop('Workgroup', $workgroup);
139     - #$db->get('smb')->set_prop('ServerName', $servername);
140     -
141     #
142     # Update the system
143     #
144     - ##system ("/sbin/e-smith/signal-event datetime-update") == 0
145     - ##or $result = $c->l('ERROR_UPDATING');
146     + system ("/sbin/e-smith/signal-event datetime-update") == 0
147     + or $result = $c->l('ERROR_UPDATING');
148    
149    
150     - if ( $result eq '' ) { $result = $c->l('dat_SUCCESS') . " but System update NOT done !!!"; }
151     + if ( $result eq '' ) { $result = $c->l('dat_SUCCESS'); }
152    
153     $c->stash( title => $title, modul => $result );
154     $c->render(template => 'module');
155     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Directory.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Directory.pm
156     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Directory.pm 2020-01-26 23:54:06.000000000 +0400
157     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Directory.pm 2020-01-24 18:57:46.000000000 +0400
158     @@ -6,12 +6,15 @@
159    
160     use Locale::gettext;
161     use SrvMngr::I18N;
162     +use SrvMngr qw(theme_list init_session_cgi);
163     +
164     #use esmith::util qw(ldapBase);
165     use esmith::FormMagick::Panel::directory;
166    
167     our $db = esmith::ConfigDB->open() || die "Couldn't open config db";
168    
169     sub main {
170     +
171     my $c = shift;
172     $c->app->log->info($c->log_req);
173    
174     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Groups.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Groups.pm
175     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Groups.pm 2020-01-26 23:54:12.000000000 +0400
176     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Groups.pm 2020-01-25 21:28:45.000000000 +0400
177     @@ -6,6 +6,7 @@
178    
179     use Locale::gettext;
180     use SrvMngr::I18N;
181     +use SrvMngr qw(theme_list init_session_cgi);
182    
183     use Data::Dumper;
184    
185     @@ -390,10 +391,7 @@
186     {
187     return('OK');
188     }
189     - return ($c->l('grp_ACCOUNT_CONFLICT') .
190     - { group => $groupName .
191     - type => $type,
192     - });
193     + return ($c->l('grp_ACCOUNT_CONFLICT', $groupName, $type));
194     }
195    
196     =head2 validate_group FM groupname
197     @@ -438,14 +436,13 @@
198     my $c = shift;
199     my $groupName = shift;
200    
201     +
202     my $maxGroupNameLength = ($cdb->get('maxGroupNameLength')
203     ? $cdb->get('maxGroupNameLength')->prop('type')
204     : "") || 12;
205    
206     if ( length $groupName > $maxGroupNameLength ) {
207     -
208     - return $c->l('grp_GROUP_TOO_LONG') .
209     - {maxLength => $maxGroupNameLength};
210     + return $c->l('grp_GROUP_TOO_LONG', $maxGroupNameLength);
211     }
212     else {
213     return ('OK');
214     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Ibays.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Ibays.pm
215     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Ibays.pm 2020-01-26 23:54:06.000000000 +0400
216     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Ibays.pm 2020-01-25 20:23:22.000000000 +0400
217     @@ -6,6 +6,7 @@
218    
219     use Locale::gettext;
220     use SrvMngr::I18N;
221     +use SrvMngr qw(theme_list init_session_cgi);
222    
223     #use esmith::FormMagick qw( validate_password );
224     use CGI::FormMagick::Validator qw( call_fm_validation );
225     @@ -216,8 +217,6 @@
226     }
227     }
228    
229     - my $title = $c->l('iba_FORM_TITLE');
230     -
231     $c->stash( title => $title, modul => $result, iba_datas => \%iba_datas );
232     $c->render(template => 'module');
233    
234     @@ -512,7 +511,7 @@
235     if (length($data) <= $max) {
236     return "OK";
237     } else {
238     - return $c->l("iba_MAX_IBAY_NAME_LENGTH_ERROR") . " " . $data . " " . $max;
239     + return $c->l('iba_MAX_IBAY_NAME_LENGTH_ERROR', $data, $max, $max);
240     # {acctName => $data,
241     # maxIbayNameLength => $max,
242     # maxLength => $max});
243     @@ -534,8 +533,7 @@
244     my $acct = $rec->prop("Account");
245     my $acct_type = $adb->get($acct)->prop('type');
246    
247     - return $c->l('iba_ACCT_CLASHES_WITH_PSEUDONYM') ." ". $name ." ". $acct_type ." ". $acct;
248     - # {acctName => $name, acctType => $acct_type, acct => $acct});
249     + return $c->l('iba_ACCT_CLASHES_WITH_PSEUDONYM', $name, $acct_type, $acct);
250     }
251     }
252     elsif (defined getpwnam($name) || defined getgrnam($name))
253     @@ -547,8 +545,7 @@
254     # No account record and no account
255     return 'OK';
256     }
257     - return $c->l('iba_ACCOUNT_EXISTS') ." ". $name ." ". $type;
258     - # {acctName => $name, acctType => $type});
259     + return $c->l('iba_ACCOUNT_EXISTS', $name, $type);
260     }
261    
262     sub validate_name {
263     @@ -557,8 +554,7 @@
264    
265     unless ($acctName =~ /^([a-z][\_\.\-a-z0-9]*)$/)
266     {
267     - return $c->l('iba_ACCT_NAME_HAS_INVALID_CHARS') . " ". $acctName;
268     - # {acctName => $acctName});
269     + return $c->l('iba_ACCT_NAME_HAS_INVALID_CHARS', $acctName);
270     }
271     return "OK";
272     }
273     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Initial_ori.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Initial_ori.pm
274     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Initial_ori.pm 1970-01-01 04:00:00.000000000 +0400
275     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Initial_ori.pm 2020-01-23 11:13:34.000000000 +0400
276     @@ -0,0 +1,53 @@
277     +package SrvMngr::Controller::Initial;
278     +
279     +use strict;
280     +use warnings;
281     +
282     +use Mojo::Base 'Mojolicious::Controller';
283     +
284     +use Locale::gettext;
285     +use SrvMngr::I18N;
286     +
287     +sub main {
288     + my $c = shift;
289     + $c->app->log->info($c->log_req);
290     +
291     + #SrvMngr->startsess();
292     + if ( not defined $c->session->{lang} ) {
293     + init_session( $c );
294     + }
295     +
296     + my %nav = %{SrvMngr::navigation2->getNavigation( $c->languages() )};
297     +# $c->app->log->info("nav: " . $c->dumper(%{SrvMngr::navigation2->getNavigation( $c->languages() )}));
298     +# $c->app->log->info("nav: " . $c->dumper(%{SrvMngr::navigation2->getNavigation( $c->session->{lang} )}));
299     +
300     + my $title = $c->l('initial_FORM_TITLE');
301     + my $modul = $c->render_to_string(inline => $c->l('initial_FRAMES_BODY'));
302     +
303     + $c->stash( title => $title, modul => $modul, nav => \%nav );
304     +
305     + $c->render(template => 'initial');
306     +
307     +}
308     +
309     +
310     +sub init_session {
311     + my $c = shift;
312     +
313     + $c->app->log->info("Init datas in welcome page.");
314     +
315     + my %datas = ();
316     + %datas = SrvMngr::Model::Main->init_data( %datas );
317     + $c->session->{lang} = $datas{'lang'};
318     + $c->session->{copyRight} = $c->l($datas{'copyRight'});
319     + $c->session->{releaseVersion} = $datas{'releaseVersion'};
320     + $c->session->{PwdSet} = $datas{'PwdSet'};
321     + $c->session->{Unsafe} = $datas{'Unsafe'};
322     + $c->session->{SystemName} = $datas{'SystemName'};
323     + $c->session->{DomainName} = $datas{'DomainName'};
324     + $c->languages($datas{'lang'});
325     +
326     +}
327     +
328     +
329     +1;
330     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Initial.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Initial.pm
331     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Initial.pm 2020-01-26 23:54:12.000000000 +0400
332     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Initial.pm 2020-01-24 22:51:41.000000000 +0400
333     @@ -7,26 +7,18 @@
334    
335     use Locale::gettext;
336     use SrvMngr::I18N;
337     +use SrvMngr qw(theme_list init_session_cgi);
338     +
339     +#use SrvMngr::Model::Main;
340    
341    
342     sub main {
343     - my $c = shift;
344    
345     + my $c = shift;
346     $c->app->log->info($c->log_req);
347     - #SrvMngr->startsess();
348     - if (not defined $c->session->{lang}) {
349     - $c->app->log->info("Init datas in welcome page.");
350     - my %datas = ();
351     - %datas = SrvMngr::Model::Main->init_data( %datas );
352     - $c->session->{lang} = $datas{'lang'};
353     - $c->session->{copyRight} = $c->l($datas{'copyRight'});
354     - $c->session->{releaseVersion} = $datas{'releaseVersion'};
355     - $c->session->{PwdSet} = $datas{'PwdSet'};
356     - $c->session->{Unsafe} = $datas{'Unsafe'};
357     - $c->session->{SystemName} = $datas{'SystemName'};
358     - $c->session->{DomainName} = $datas{'DomainName'};
359     - $c->languages($datas{'lang'});
360    
361     + if ( not defined $c->session->{lang} ) {
362     + SrvMngr::init_session_cgi ( $c );
363     }
364    
365     my $title = $c->l('initial_FORM_TITLE');
366     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Main.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Main.pm
367     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Main.pm 2020-01-26 23:54:06.000000000 +0400
368     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Main.pm 2020-01-24 18:56:26.000000000 +0400
369     @@ -8,17 +8,14 @@
370     use Locale::gettext;
371     use SrvMngr::I18N;
372    
373     +use SrvMngr qw(theme_list init_session_cgi);
374     +
375    
376     sub whatever {
377     my $c = shift;
378     - my $whatever = $c->param('whatever');
379     $c->app->log->info($c->log_req);
380    
381     - my $modul .= 'Mail result is 11 + 54.';
382     -
383     - $c->stash( releaseVersion => $c->session->{releaseVersion}, copyRight => $c->session->{copyRight},
384     - PwdSet => $c->session->{PwdSet}, Unsafe => $c->session->{Unsafe},
385     - modul => $modul);
386     + my $whatever = $c->param('whatever');
387    
388     $c->render(text => "whatever: /$whatever did not match.", status => 404);
389     };
390     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Manual.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Manual.pm
391     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Manual.pm 2020-01-26 23:54:06.000000000 +0400
392     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Manual.pm 2020-01-24 18:56:59.000000000 +0400
393     @@ -8,6 +8,8 @@
394     use Locale::gettext;
395     use SrvMngr::I18N;
396    
397     +use SrvMngr qw(theme_list init_session_cgi);
398     +
399    
400     sub main {
401     my $c = shift;
402     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Modsearch.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Modsearch.pm
403     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Modsearch.pm 2020-01-26 23:54:06.000000000 +0400
404     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Modsearch.pm 2020-01-24 18:57:24.000000000 +0400
405     @@ -7,6 +7,8 @@
406     use Locale::gettext;
407     use SrvMngr::I18N;
408    
409     +use SrvMngr qw(theme_list init_session_cgi);
410     +
411     #use esmith::config;
412     #use esmith::NavigationDB;
413     #use esmith::util;
414     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Modules.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Modules.pm
415     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Modules.pm 2020-01-26 23:54:06.000000000 +0400
416     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Modules.pm 2020-01-24 18:56:36.000000000 +0400
417     @@ -7,6 +7,8 @@
418     use Locale::gettext;
419     use SrvMngr::I18N;
420    
421     +use SrvMngr qw(theme_list init_session_cgi);
422     +
423     #use esmith::config;
424     #use esmith::NavigationDB;
425     #use esmith::util;
426     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Printers.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Printers.pm
427     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Printers.pm 2020-01-26 23:54:12.000000000 +0400
428     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Printers.pm 2020-01-24 18:58:30.000000000 +0400
429     @@ -7,6 +7,8 @@
430     use Locale::gettext;
431     use SrvMngr::I18N;
432    
433     +use SrvMngr qw(theme_list init_session_cgi);
434     +
435     use esmith::FormMagick::Panel::printers;
436    
437     our $adb = esmith::AccountsDB->open || die "Couldn't open accounts db";
438     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Proxy.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Proxy.pm
439     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Proxy.pm 2020-01-26 23:54:06.000000000 +0400
440     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Proxy.pm 2020-01-24 18:57:58.000000000 +0400
441     @@ -7,6 +7,8 @@
442     use Locale::gettext;
443     use SrvMngr::I18N;
444    
445     +use SrvMngr qw(theme_list init_session_cgi);
446     +
447     our $db = esmith::ConfigDB->open || die "Couldn't open config db";
448    
449     sub main {
450     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Qmailanalog.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Qmailanalog.pm
451     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Qmailanalog.pm 2020-01-26 23:54:12.000000000 +0400
452     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Qmailanalog.pm 2020-01-24 18:58:43.000000000 +0400
453     @@ -9,6 +9,8 @@
454     use Locale::gettext;
455     use SrvMngr::I18N;
456    
457     +use SrvMngr qw(theme_list init_session_cgi);
458     +
459     sub main {
460     my $c = shift;
461     $c->app->log->info($c->log_req);
462     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Quota.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Quota.pm
463     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Quota.pm 2020-01-26 23:54:06.000000000 +0400
464     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Quota.pm 2020-01-24 18:58:36.000000000 +0400
465     @@ -12,7 +12,7 @@
466     use Locale::gettext;
467     use SrvMngr::I18N;
468    
469     -use esmith::FormMagick::Panel::quota;
470     +use SrvMngr qw(theme_list init_session_cgi);
471    
472     #our $db = esmith::ConfigDB->open || die "Couldn't open config db";
473     our $adb = esmith::AccountsDB->open || die "Couldn't open accounts db";
474     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Reboot.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Reboot.pm
475     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Reboot.pm 2020-01-26 23:54:12.000000000 +0400
476     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Reboot.pm 2020-01-24 18:58:55.000000000 +0400
477     @@ -4,6 +4,11 @@
478     use warnings;
479     use Mojo::Base 'Mojolicious::Controller';
480    
481     +use Locale::gettext;
482     +use SrvMngr::I18N;
483     +
484     +use SrvMngr qw(theme_list init_session_cgi);
485     +
486     #use esmith::util;
487     #use File::Basename;
488     #use Exporter;
489     @@ -12,8 +17,6 @@
490     #our @EXPORT = qw( change_settings
491     #);
492    
493     -use Locale::gettext;
494     -use SrvMngr::I18N;
495    
496    
497     sub main {
498     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Request.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Request.pm
499     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Request.pm 2020-01-26 23:54:12.000000000 +0400
500     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Request.pm 2020-01-24 18:57:31.000000000 +0400
501     @@ -5,6 +5,8 @@
502    
503     use Mojo::Base 'Mojolicious::Controller';
504    
505     +use SrvMngr qw(theme_list init_session_cgi);
506     +
507     use esmith::AccountsDB qw(open_ro);
508     use esmith::ConfigDB qw(open_ro);
509    
510     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Review.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Review.pm
511     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Review.pm 2020-01-26 23:54:06.000000000 +0400
512     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Review.pm 2020-01-24 18:57:39.000000000 +0400
513     @@ -8,6 +8,8 @@
514     use Locale::gettext;
515     use SrvMngr::I18N;
516    
517     +use SrvMngr qw(theme_list init_session_cgi);
518     +
519     #use SrvMngr::Review_sub qw(print_page);
520     #use smeserver::Panel::review;
521     use esmith::FormMagick::Panel::review;
522     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Starterwebsite.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Starterwebsite.pm
523     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Starterwebsite.pm 2020-01-26 23:54:06.000000000 +0400
524     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Starterwebsite.pm 2020-01-24 18:57:14.000000000 +0400
525     @@ -7,6 +7,8 @@
526     use Locale::gettext;
527     use SrvMngr::I18N;
528    
529     +use SrvMngr qw(theme_list init_session_cgi);
530     +
531     our $db = esmith::ConfigDB->open_ro || die "Couldn't open config db";
532    
533     sub main {
534     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Support.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Support.pm
535     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Support.pm 2020-01-26 23:54:06.000000000 +0400
536     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Support.pm 2020-01-24 18:57:52.000000000 +0400
537     @@ -4,6 +4,8 @@
538     use warnings;
539     use Mojo::Base 'Mojolicious::Controller';
540    
541     +use SrvMngr qw(theme_list init_session_cgi);
542     +
543     #use esmith::config;
544     #use esmith::NavigationDB;
545     use esmith::util;
546     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Swttheme.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Swttheme.pm
547     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Swttheme.pm 1970-01-01 04:00:00.000000000 +0400
548     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Swttheme.pm 2020-01-27 13:04:14.692000000 +0400
549     @@ -0,0 +1,45 @@
550     +package SrvMngr::Controller::Swttheme;
551     +
552     +use strict;
553     +use warnings;
554     +
555     +use Mojo::Base 'Mojolicious::Controller';
556     +
557     +#use SrvMngr qw(theme_list init_session_cgi);
558     +
559     +our $db = esmith::ConfigDB->open() || die "Couldn't open config db";
560     +
561     +sub main {
562     +
563     + my $c = shift;
564     +
565     + my $from = $c->param('From') || '/';
566     + my $theme = $c->param('Theme');
567     +
568     + $c->app->log->info(" swt theme '$from' '$theme' ");
569     +
570     + my $oldTheme = $c->session->{CurrentTheme};
571     +
572     + if ( $theme ne $oldTheme ) {
573     +# $c->app->renderer->paths([$c->app->home->rel_file('themes/default/templates')]);
574     +# $c->app->static->paths([$c->app->home->rel_file('themes/default/public')]);
575     +# if ( $theme ne 'default' ) {
576     +# # Put the new theme first
577     +# my $t_path = $c->app->home->rel_file('themes/'.$theme);
578     +# unshift @{$c->app->renderer->paths}, $t_path.'/templates' if -d $t_path.'/templates';
579     +# unshift @{$c->app->static->paths}, $t_path.'/public' if -d $t_path.'/public';
580     +# }
581     + $c->session->{CurrentTheme} = $theme;
582     +
583     + $db->get('manager2')->set_prop('Theme', $theme);
584     + system ("/sbin/e-smith/signal-event manager2-modify") == 0
585     + or warn "$c->l('ERROR_UPDATING')";
586     + }
587     +
588     + $from = '/initial' if $from eq '/';
589     + $c->redirect_to( $from);
590     +
591     +}
592     +
593     +
594     +1;
595     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Wbl.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Wbl.pm
596     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Wbl.pm 2020-01-26 23:54:06.000000000 +0400
597     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Wbl.pm 2020-01-24 18:58:23.000000000 +0400
598     @@ -8,6 +8,8 @@
599     use Locale::gettext;
600     use SrvMngr::I18N;
601    
602     +use SrvMngr qw(theme_list init_session_cgi);
603     +
604     ####$locale->{namespace} = 'SrvMngr::I18N::Wbl';
605    
606     #use esmith::FormMagick::Panel::wbl;
607     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Welcome.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Welcome.pm
608     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Welcome.pm 2020-01-26 23:54:06.000000000 +0400
609     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Welcome.pm 2020-01-24 18:56:46.000000000 +0400
610     @@ -8,6 +8,10 @@
611     use Locale::gettext;
612     use SrvMngr::I18N;
613    
614     +use SrvMngr qw(theme_list init_session_cgi);
615     +
616     +use SrvMngr::Navigation2;
617     +
618    
619     #page d'accueil
620     sub main {
621     @@ -16,22 +20,14 @@
622     $c->app->log->info("Appel de la page d'accueil.");
623     $c->app->log->info($c->log_req);
624    
625     - if (not defined $c->session->{lang}) {
626     - $c->app->log->info("Init datas in welcome page.");
627     - my %datas = ();
628     - %datas = SrvMngr::Model::Main->init_data( %datas );
629     - $c->session->{lang} = $datas{'lang'};
630     - $c->session->{copyRight} = $c->l($datas{'copyRight'});
631     - $c->session->{releaseVersion} = $datas{'releaseVersion'};
632     - $c->session->{PwdSet} = $datas{'PwdSet'};
633     - $c->session->{Unsafe} = $datas{'Unsafe'};
634     - }
635     + my $title = 'Welcome page';
636    
637     my $modul .= ' Welcome result is 10 + 33.';
638    
639     - $c->stash( releaseVersion => $c->session->{releaseVersion}, copyRight => $c->session->{copyRight},
640     - PwdSet => $c->session->{PwdSet}, Unsafe => $c->session->{Unsafe},
641     - modul => $modul);
642     + my %nav = ();
643     + #%{SrvMngr::Navigation2->getNavigation( $c->languages() )};
644     +
645     + $c->stash( title => $title, modul => $modul, navig => \%nav );
646    
647     $c->render(template => 'welcome');
648     }
649     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Workgroup.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Workgroup.pm
650     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Workgroup.pm 2020-01-26 23:54:06.000000000 +0400
651     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Workgroup.pm 2020-01-24 18:58:10.000000000 +0400
652     @@ -7,6 +7,8 @@
653     use Locale::gettext;
654     use SrvMngr::I18N;
655    
656     +use SrvMngr qw(theme_list init_session_cgi);
657     +
658     use esmith::FormMagick::Panel::workgroup;
659    
660     our $db = esmith::ConfigDB->open || die "Couldn't open config db";
661     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/en.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/en.pm
662     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/en.pm 2020-01-26 23:54:06.000000000 +0400
663     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/en.pm 2020-01-27 00:07:35.789000000 +0400
664     @@ -121,23 +121,23 @@
665     'FM_ISO_COUNTRY_CODE2' => 'This field does not contain an ISO country code',
666     'FM_US_STATE' => 'This doesn\'t appear to be a valid 2-letter US state abbreviation',
667     'FM_US_ZIPCODE' => 'US zip codes must contain 5 or 9 numbers',
668     -'FM_MINLENGTH1' => 'Minimum length has been specified meaninglessly as {$minlength}',
669     -'FM_MINLENGTH2' => 'This field must be at least {$minlength} characters',
670     -'FM_MAXLENGTH1' => 'Maximum length has been specified meaninglessly as {$maxlength}',
671     -'FM_MAXLENGTH2' => 'This field must be no more than {$maxlength} characters',
672     +'FM_MINLENGTH1' => 'Minimum length has been specified meaninglessly as [_1]',
673     +'FM_MINLENGTH2' => 'This field must be at least [_1] characters',
674     +'FM_MAXLENGTH1' => 'Maximum length has been specified meaninglessly as [_1]',
675     +'FM_MAXLENGTH2' => 'This field must be no more than [_1] characters',
676     'FM_EXACTLENGTH1' => 'You must specify the length for the field.',
677     'FM_EXACTLENGTH2' => 'You must specify the exactlength of the field with an integer',
678     -'FM_EXACTLENGTH3' => 'This field must be exactly {$exactlength} characters',
679     +'FM_EXACTLENGTH3' => 'This field must be exactly [_1] characters',
680     'FM_LENGTHRANGE1' => 'You must specify the maximum and minimum length for the field.',
681     'FM_LENGTHRANGE2' => 'You must specify the maximum and minimum lengths of the field with an integer',
682     -'FM_LENGTHRANGE3' => 'This field must be between {$minlength} and {$maxlength} characters',
683     +'FM_LENGTHRANGE3' => 'This field must be between [_1] and [_2] characters',
684     'FM_URL' => 'This field must contain a URL starting with http:// or ftp://',
685     'FM_EMAIL_SIMPLE1' => 'You must enter an email address.',
686     'FM_EMAIL_SIMPLE2' => 'This field doesn\'t look like an RFC822-compliant email address',
687     'FM_DOMAIN_NAME' => 'This field doesn\'t look like a valid Internet domain name or hostname.',
688     'FM_IP_NUMBER1' => 'This field must contain a valid IP number and can not be left blank.',
689     'FM_IP_NUMBER2' => 'Invalid IP address format (expected X.X.X.X)',
690     -'FM_IP_NUMBER3' => '{$octet} is more than 255',
691     +'FM_IP_NUMBER3' => '[_1] is more than 255',
692     'FM_USERNAME' => 'This field must look like a valid username (3 to 8 letters and numbers)',
693     'FM_PASSWORD1' => 'You must provide a password.',
694     'FM_PASSWORD2' => 'The password you provided was not a good password.A good password must contain all of the following: upper case letter, lower case letter, number,
695     @@ -652,9 +652,9 @@
696     'quo_Quotas' => 'Quotas',
697    
698     'grp_FORM_TITLE' => 'Create, modify, or remove user groups',
699     -'grp_GROUP_TOO_LONG' => 'Error: group name is too long.The maximum is {$maxLength} characters.',
700     -'grp_ACCOUNT_CONFLICT' => 'Error: the group "{$group}" can\'t be created because there is
701     -already a {$type} account of that name.',
702     +'grp_GROUP_TOO_LONG' => 'Error: group name is too long. The maximum is [_1] characters.',
703     +'grp_ACCOUNT_CONFLICT' => 'Error: the group "[_1]" can\'t be created because there is
704     +already a [_2] account of that name.',
705     'grp_INVALID_GROUP_DESCRIPTION' => 'Error: unexpected or missing characters in group description',
706     'grp_NO_MEMBERS' => 'Error: no members in group.Did not create new group.',
707     'grp_CREATED_GROUP' => 'Successfully created user group',
708     @@ -680,7 +680,7 @@
709     something else afterward):',
710     'grp_CONFIRM_DELETE_GROUP' => 'Are you sure you wish to remove this group?',
711     'grp_CURRENT_LIST' => 'Current list of User Groups',
712     -'grp_DELETE_DESCRIPTION' => 'You are about to remove the user group "{$group}."',
713     +'grp_DELETE_DESCRIPTION' => 'You are about to remove the user group "[_1]."',
714    
715     'rbo_FORM_TITLE' => 'Shutdown or reboot',
716     'rbo_REBOOT' => 'Reboot',
717     @@ -714,8 +714,7 @@
718     should start with a lower-case letter. For example
719     "johnson", "intra", and "cust3.prj12" are all valid
720     names, but "3associates", "John Smith" and
721     -"Bus!Partner" are not. The name is limited to
722     -{$maxLength} characters.',
723     +"Bus!Partner" are not. The name is limited to [_1] characters.',
724     'iba_NAME_LABEL' => 'Information bay name',
725     'iba_USER_ACCESS' => 'User access via file sharing or user ftp',
726     'iba_PUBLIC_ACCESS' => 'Public access via web or anonymous ftp',
727     @@ -728,8 +727,7 @@
728     'iba_HTTPS_Only' => 'Force secure connections',
729     'iba_REMOVE_TITLE' => 'Remove information bay',
730     'iba_REMOVE_DESC' => '<p>
731     -You are about to remove the information bay "{$name}"
732     -({$description}).
733     +You are about to remove the information bay [_1] ([_2]).
734     </p><p>
735     All files belonging to this information bay will be deleted.
736     </p><p>
737     @@ -738,8 +736,8 @@
738     'iba_ERROR_WHILE_CREATING_IBAY' => 'An error occurred while creating the i-bay.',
739     'iba_SUCCESSFULLY_CREATED_IBAY' => 'Successfully created i-bay.',
740     'iba_NO_IBAYS' => 'There are no i-bays currently configured.',
741     -'iba_CANT_FIND_IBAY' => 'Can\'t find account for {$name} (does it exist?)',
742     -'iba_CANT_CREATE_IBAY' => 'Can\'t create new account for {$name} (does it already exist?)',
743     +'iba_CANT_FIND_IBAY' => 'Can\'t find account for [_1] (does it exist?)',
744     +'iba_CANT_CREATE_IBAY' => 'Can\'t create new account for [_1] (does it already exist?)',
745     'iba_ERROR_WHILE_MODIFYING_IBAY' => 'An error occurred while modifying the i-bay.',
746     'iba_SUCCESSFULLY_MODIFIED_IBAY' => 'Successfully modified i-bay.',
747     'iba_VIRTUAL_HOST_MESSAGE' => 'The following virtual domains were using this information
748     @@ -747,7 +745,7 @@
749     site (you can change them to something else afterward).',
750     'iba_SUCCESSFULLY_DELETED_IBAY' => 'Successfully deleted i-bay.',
751     'iba_ERROR_WHILE_DELETING_IBAY' => 'An error occurred while deleting the i-bay.',
752     -'iba_PASSWORD_DESC' => 'You are about to change the password for the i-bay {$name}.',
753     +'iba_PASSWORD_DESC' => 'You are about to change the password for the i-bay [_1].',
754     'iba_IBAY_PASSWD_VALIDATION_ERROR' => 'The password may contain only letters and numbers.',
755     'iba_IBAY_PASSWD_VERIFY_ERROR' => 'The passwords do not match.',
756     'iba_SUCCESSFULLY_RESET_PASSWORD' => 'Successfully reset password.',
757     @@ -766,17 +764,19 @@
758     'ENTIRE_INTERNET_PASSWORD' => 'Entire Internet (password required)',
759     'ENTIRE_INTERNET_PASSWORD_REMOTE' => 'Entire Internet (password required outside local network)',
760     'INVALID_IBAY_DESCRIPTION' => 'Error: unexpected or missing characters in i-bay description',
761     -'iba__ACCT_NAME_HAS_INVALID_CHARS' => 'The i-bay name "{$acctName}" contains invalid characters.
762     +'iba_ACCT_NAME_HAS_INVALID_CHARS' => 'The i-bay name "[_1]" contains invalid characters.
763     I-bay names must start with a lower case letter and contain
764     only lower case letters, numbers, and hyphens.',
765     -'iba_MAX_IBAY_NAME_LENGTH_ERROR' => 'The i-bay name "{$name}" is too long. The maximum is
766     -{$maxIbayNameLength} characters.',
767     -'iba_ACCT_CLASHES_WITH_PSEUDONYM' => 'The account "{$acctName}" clashes with pseudonym
768     -details for {$acctType} account "{$acct}".
769     -<p>{$acctName} is a pseudonym for {$acct}.</p>',
770     -'iba_ACCOUNT_EXISTS' => 'The account "{$acctName}" is an existing {$acctType} account.',
771     +'iba_MAX_IBAY_NAME_LENGTH_ERROR' => 'The i-bay name "[_1]" is too long. The maximum is
772     +[_2] characters.',
773     +'iba_ACCT_CLASHES_WITH_PSEUDONYM' => 'The account "[_1]" clashes with pseudonym
774     +details for [_2] account "[_3]".
775     +<p>[_1] is a pseudonym for [_2].</p>',
776     +'iba_ACCOUNT_EXISTS' => 'The account "[_1]" is an existing [_2] account.',
777     +
778     +'swt_THEME' => 'Theme',
779    
780     );
781    
782    
783     -1;
784     \ Pas de fin de ligne à la fin du fichier
785     +1;
786     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/fr.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/fr.pm
787     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/fr.pm 2020-01-26 23:54:06.000000000 +0400
788     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/fr.pm 2020-01-25 20:40:08.000000000 +0400
789     @@ -226,25 +226,25 @@
790     'FM_US_ZIPCODE' =>
791     'Les codes postaux américains doivent contenir 5 ou 9 chiffres.',
792     'FM_MINLENGTH1' =>
793     -'La longueur minimale a été définie arbitrairement à {$minlength} caractères.',
794     +'La longueur minimale a été définie arbitrairement à [_1] caractères.',
795     'FM_MINLENGTH2' =>
796     -'Ce champ doit contenir au minimum {$minlength} caractères.',
797     +'Ce champ doit contenir au minimum [_1] caractères.',
798     'FM_MAXLENGTH1' =>
799     -'La longueur maximale a été définie arbitrairement à {$maxlength} caractères.',
800     +'La longueur maximale a été définie arbitrairement à [_1] caractères.',
801     'FM_MAXLENGTH2' =>
802     -'Ce champ doit ne doit pas dépasser {$maxlength} caractères.',
803     +'Ce champ doit ne doit pas dépasser [_1] caractères.',
804     'FM_EXACTLENGTH1' =>
805     'Vous devez définir la longueur de ce champ.',
806     'FM_EXACTLENGTH2' =>
807     'Vous devez définir la longueur exacte de ce champ avec un entier.',
808     'FM_EXACTLENGTH3' =>
809     -'Ce champ doit faire exactement {$exactlength} caractères.',
810     +'Ce champ doit faire exactement [_1] caractères.',
811     'FM_LENGTHRANGE1' =>
812     'Vous devez définir les longueurs maximale et minimale de ce champ.',
813     'FM_LENGTHRANGE2' =>
814     'Vous devez définir les longueurs maximale et minimale de ce champ avec des entiers.',
815     'FM_LENGTHRANGE3' =>
816     -'La longueur de ce champ doit être comprise entre {$minlength} et {$maxlength} caractères.',
817     +'La longueur de ce champ doit être comprise entre [_1] caractères.',
818     'FM_URL' =>
819     'Ce champ doit contenir une URL commençant par http:// ou ftp://',
820     'FM_EMAIL_SIMPLE1' =>
821     @@ -258,7 +258,7 @@
822     'FM_IP_NUMBER2' =>
823     'Format d\'adresse IP incorrect (X.X.X.X attendu)',
824     'FM_IP_NUMBER3' =>
825     -'La valeur {$octet} dépasse 255.',
826     +'La valeur [_1] dépasse 255.',
827     'FM_USERNAME' =>
828     'Ce champ doit contenir un nom d\'utilisateur valide (3 à 8 lettres et chiffres).',
829     'FM_PASSWORD1' =>
830     @@ -673,8 +673,8 @@
831     'quo_Quotas' => 'Quotas',
832    
833     'grp_FORM_TITLE' => 'Gestion des groupes d\'utilisateurs',
834     -'grp_GROUP_TOO_LONG' => 'ERREUR : le nom du groupe est trop long : {$maxLength} caractères au maximum.',
835     -'grp_ACCOUNT_CONFLICT' => 'ERREUR : le groupe "{$group}" ne peut être créé car il existe déjà un compte {$type} avec ce nom.',
836     +'grp_GROUP_TOO_LONG' => 'ERREUR : le nom du groupe est trop long : [_1] caractères au maximum.',
837     +'grp_ACCOUNT_CONFLICT' => 'ERREUR : le groupe "[_1] avec ce nom.',
838     'grp_INVALID_GROUP_DESCRIPTION' => 'ERREUR : caractères inattendus ou manquants dans la description du groupe.',
839     'grp_NO_MEMBERS' => 'ERREUR : aucun membre dans le groupe. Le groupe n\'a pas été créé.',
840     'grp_CREATED_GROUP' => 'Le groupe d\'utilisateurs a été créé avec succès.',
841     @@ -691,9 +691,9 @@
842     'grp_IBAYS_WILL_BE_CHANGED' => 'Les i-bays suivantes étaient attribuées à ce groupe et vont être réattribuées au groupe de l\'administrateur (vous pourrez par la suite les attribuer à un autre groupe) :',
843     'grp_CONFIRM_DELETE_GROUP' => ' <b>Voulez-vous vraiment supprimer ce groupe ?</b> ',
844     'grp_CURRENT_LIST' => ' Liste actuelle des groupes d\'utilisateurs : ',
845     -'grp_DELETE_DESCRIPTION' => ' Vous êtes sur le point de supprimer le groupe d\'utilisateurs "<b>{$group}</b>". ',
846     +'grp_DELETE_DESCRIPTION' => ' Vous êtes sur le point de supprimer le groupe d\'utilisateurs "<b>[_1]</b>". ',
847    
848     );
849    
850    
851     -1;
852     \ Pas de fin de ligne à la fin du fichier
853     +1;
854     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Model/Main.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Model/Main.pm
855     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Model/Main.pm 2020-01-26 23:54:12.000000000 +0400
856     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Model/Main.pm 2020-01-27 00:07:46.293000000 +0400
857     @@ -4,37 +4,45 @@
858     use warnings;
859     use utf8;
860    
861     -use esmith::DB;
862     +#use esmith::DB;
863     use esmith::ConfigDB;
864    
865     -my %datas = (
866     - 'lang' => 'en',
867     - 'releaseVersion' => '',
868     - 'copyRight' => '',
869     - 'navigation' => 'N a v i g a t i o n',
870     - 'modul' => 'Modul 89 +/- 11',
871     - 'PwdSet' => '0',
872     - 'Unsafe' => '0',
873     - 'SystemName' => '',
874     - 'DomainName' => '',
875     -);
876     +#my %datas = (
877     +# 'lang' => 'en',
878     +# 'releaseVersion' => '',
879     +# 'copyRight' => '',
880     +# 'navigation' => 'N a v i g a t i o n',
881     +# 'modul' => 'Modul 89 +/- 11',
882     +# 'PwdSet' => '0',
883     +# 'Unsafe' => '0',
884     +# 'SystemName' => '',
885     +# 'DomainName' => '',
886     +#);
887    
888    
889    
890     sub init_data {
891     +
892     my %datas = ();
893    
894     my $lang = (split(/,/, $ENV{"HTTP_ACCEPT_LANGUAGE"}))[0];
895     ## convert xx_XX lang format to xx-xx
896     ($datas{'lang'} = lc($lang)) =~ s/_/-/;
897     +
898     my $DB = esmith::ConfigDB->open_ro() or die("can't open Config DB test");
899     my $sysconfig = $DB->get("sysconfig");
900     $datas{'releaseVersion'} = $sysconfig->prop("ReleaseVersion") || '??';
901     $datas{'copyRight'} = 'All rights reserved';
902     +
903     $datas{'PwdSet'} = ($DB->get('PasswordSet')->value eq "yes") || '0' ;
904     $datas{'Unsafe'} = ($DB->get('bootstrap-console') and $DB->get('bootstrap-console')->prop('Run') eq 'yes') ||
905     ($DB->get('UnsavedChanges') and $DB->get('UnsavedChanges')->value eq 'yes');
906     +
907     $datas{'SystemName'} = $DB->get("SystemName")->value || '??';
908     $datas{'DomainName'} = $DB->get("DomainName")->value || '??';
909     - return( %datas );
910     +
911     + return \%datas;
912     }
913     +
914     +
915     +1;
916     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr.pm
917     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr.pm 2020-01-26 23:54:06.000000000 +0400
918     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr.pm 2020-01-24 23:45:10.000000000 +0400
919     @@ -1,5 +1,3 @@
920     -#!/usr/bin/perl -wT
921     -
922     package SrvMngr;
923    
924     use strict;
925     @@ -12,14 +10,18 @@
926    
927     use utf8;
928    
929     -use SrvMngr::Navigation;
930     +#use SrvMngr::Navigation;
931     use SrvMngr::I18N;
932     use SrvMngr::Model::Main;
933    
934     +use Exporter;
935    
936     -my $config = plugin( 'Config' => { files => './conf/srvmngr.conf' });
937     +our @ISA = qw(Exporter);
938    
939     -#startcgi();
940     +our @EXPORT_OK = qw( init_session_cgi get_mod_url theme_list getNavigation );
941     +
942     +
943     +my $config = plugin( 'Config' => { files => './conf/srvmngr.conf' });
944    
945    
946     sub startup{
947     @@ -28,19 +30,79 @@
948     }
949    
950    
951     -sub startsess{
952     +sub main {
953     +
954     +}
955     +
956     +
957     +sub init_session_cgi {
958     +
959     + my $c = shift;
960     + $c->app->log->info("Init session cgi.");
961     +
962     + my %datas = ();
963     + %datas = %{SrvMngr::Model::Main->init_data()};
964     +
965     + $c->session->{lang} = $datas{'lang'} || 'pl';
966     + $c->session->{copyRight} = $c->l($datas{'copyRight'});
967     + $c->session->{releaseVersion} = $datas{'releaseVersion'};
968     + $c->session->{PwdSet} = $datas{'PwdSet'};
969     + $c->session->{Unsafe} = $datas{'Unsafe'};
970     + $c->session->{SystemName} = $datas{'SystemName'};
971     + $c->session->{DomainName} = $datas{'DomainName'};
972     + if ( not defined $c->session->{CurrentTheme} ) {
973     + $c->session->{CurrentTheme} = $config->{theme};
974     + }
975     + $c->languages($datas{'lang'});
976     +
977     +}
978     +
979     +
980     +sub get_mod_url{
981     +
982     + my $c = shift;
983     + my $module = shift;
984     +
985     + # test if module (panel) exists
986     + my $module_file = $config->{modules_dir} . '/' . ucfirst($module) . '.pm';
987     + if ( -e $module_file){
988     + return "/$module";
989     + }
990     + return -1;
991     +}
992     +
993     +
994     +=head2 theme_list()
995     +
996     +Returns a hash of themes for the header theme field's drop down list.
997     +
998     +=cut
999     +
1000     +
1001     +sub theme_list {
1002     +
1003     my $c = shift;
1004    
1005     - app->log->info("Init datas in page.");
1006     - my %datas = ();
1007     - %datas = SrvMngr::Model::Main->init_data( %datas );
1008     - $c->session->{lang} = $datas{'lang'};
1009     - $c->session->{copyRight} = $c->l($datas{'copyRight'});
1010     - $c->session->{releaseVersion} = $datas{'releaseVersion'};
1011     - $c->session->{PwdSet} = $datas{'PwdSet'};
1012     - $c->session->{Unsafe} = $datas{'Unsafe'};
1013     - $c->languages($datas{'lang'});
1014     - app->log->info("Session started: $datas{'lang'}");
1015     + my @files = ();
1016     + my @themes = ();
1017     + my $theme_ignore = "(\.\.?)";
1018     +
1019     + my $themedir = app->home->rel_file('themes/');
1020     +
1021     + if (opendir (DIR, $themedir)) {
1022     + @files = grep (!/^${theme_ignore}$/, readdir(DIR));
1023     + closedir (DIR);
1024     + } else {
1025     + warn "Can't open directory $themedir\n";
1026     + }
1027     +
1028     + foreach my $theme (@files) {
1029     + if (-d "$themedir/$theme") {
1030     + push @themes, $theme;
1031     + }
1032     + }
1033     +
1034     + return \@themes;
1035     }
1036    
1037    
1038     @@ -55,17 +117,135 @@
1039     });
1040    
1041    
1042     -sub get_mod_url{
1043     - my $c = shift;
1044     - my $module = shift;
1045    
1046     - # test if module exists
1047     - my $module_file = $config->{modules_dir} . '/' . ucfirst($module) . '.pm';
1048     - if ( -e $module_file){
1049     - return "/$module";
1050     +#------------------------------------------------------------
1051     +# subroutine to feed navigation bar
1052     +#------------------------------------------------------------
1053     +
1054     +sub getNavigation () {
1055     +
1056     + use esmith::NavigationDB;
1057     +
1058     + my $c = shift;
1059     + my $lang = shift || 'en-us';
1060     +
1061     + # Use this variable throughout to keep track of files
1062     + # list of just the files
1063     +
1064     + my @files = ();
1065     + my %files_hash = ();
1066     + my @panel_group = "admin";
1067     +
1068     + #-----------------------------------------------------
1069     + # Determine the directory where the functions are kept
1070     + #-----------------------------------------------------
1071     +
1072     + my $navigation_ignore =
1073     + "(\.\.?|navigation|noframes|online-manual|(internal|pleasewait)(-.*)?)";
1074     +
1075     + my $cgidir = '/etc/e-smith/web/panels/manager/cgi-bin/';
1076     +
1077     + if (opendir (DIR, $cgidir)) {
1078     + @files = grep (!/^${navigation_ignore}$/,
1079     + readdir (DIR));
1080     + closedir (DIR);
1081     + } else {
1082     + warn "Can't open directory $cgidir\n";
1083     + }
1084     +
1085     + foreach my $file (@files) {
1086     + next if (-d "$cgidir/$file");
1087     + $files_hash{$file} = $cgidir;
1088     + }
1089     +
1090     + #--------------------------------------------------
1091     + # For each script, extract the description and category
1092     + # information. Build up an associative array mapping headings
1093     + # to heading structures. Each heading structure contains the
1094     + # total weight for the heading, the number of times the heading
1095     + # has been encountered, and another associative array mapping
1096     + # descriptions to description structures. Each description
1097     + # structure contains the filename of the particular cgi script
1098     + # and a weight.
1099     + #--------------------------------------------------
1100     + my %nav = ();
1101     +
1102     + use constant NAVIGATIONDIR => '/home/e-smith/db/navigation';
1103     + use constant WEBFUNCTIONS => '/etc/e-smith/web/functions';
1104     +
1105     + my $navinfo = NAVIGATIONDIR . "/navigation.$lang";
1106     +
1107     + my $navdb = esmith::NavigationDB->open_ro( $navinfo ) or
1108     + die "Couldn't open $navinfo\n";
1109     +
1110     + # Check the navdb for anything with a UrlPath, which means that it doesn't
1111     + # have a cgi file to be picked up by the above code. Ideally, only pages
1112     + # that exist should be in the db, but that's not the case. Anything
1113     + # without a cgi file will have to remove themselves on uninstall from the
1114     + # navigation dbs.
1115     + foreach my $rec ($navdb->get_all)
1116     + {
1117     + if ($rec->prop('UrlPath'))
1118     + {
1119     + $files_hash{$rec->{key}} = $cgidir;
1120     + }
1121     }
1122     - return -1;
1123     -}
1124    
1125     + foreach my $file (keys %files_hash)
1126     + {
1127     + my $heading = 'Unknown';
1128     + my $description = $file;
1129     + my $headingWeight = 99999;
1130     + my $descriptionWeight = 99999;
1131     + my $urlpath = '';
1132     +
1133     + my $rec = $navdb->get($file);
1134     +
1135     + if (defined $rec)
1136     + {
1137     + $heading = $rec->prop('Heading');
1138     + $description = $rec->prop('Description');
1139     + $headingWeight = $rec->prop('HeadingWeight');
1140     + $descriptionWeight = $rec->prop('DescriptionWeight');
1141     + $urlpath = $rec->prop('UrlPath') || '';
1142     + }
1143     +
1144     + #--------------------------------------------------
1145     + # add heading, description and weight information to data structure
1146     + #--------------------------------------------------
1147     +
1148     + unless (exists $nav {$heading})
1149     + {
1150     + $nav {$heading} = { COUNT => 0, WEIGHT => 0, DESCRIPTIONS => [] };
1151     + }
1152     +
1153     + $nav {$heading} {'COUNT'} ++;
1154     + $nav {$heading} {'WEIGHT'} += $headingWeight;
1155     +
1156     + # Check for manager panel, and assign the appropriate
1157     + # cgi-bin prefix for the links.
1158     + # Grab the last 2 directories by splitting for '/'s and
1159     + # then concatenating the last 2
1160     + # probably a better way, but I don't know it.
1161     + my @filename = split /\//, $files_hash{$file};
1162     +
1163     + #### mabmodif new version of module exists
1164     + my $path = (SrvMngr->get_mod_url($file) ne '-1') ?
1165     + "2" :
1166     + ###### mabmodif
1167     + ($cgidir eq '/etc/e-smith/web/panels/manager/cgi-bin/') ?
1168     + "/$filename[scalar @filename - 1]" :
1169     + "/$filename[scalar @filename - 2]/$filename[scalar @filename - 1]";
1170     + push @{ $nav {$heading} {'DESCRIPTIONS'} },
1171     + { DESCRIPTION => $description,
1172     + WEIGHT => $descriptionWeight,
1173     + FILENAME => $urlpath ? $urlpath : "$path/$file",
1174     + CGIPATH => $path
1175     + };
1176     + }
1177     +
1178     + return \%nav;
1179     +
1180     +}
1181    
1182     1;
1183     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/script/srvmngr.pl smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/script/srvmngr.pl
1184     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/script/srvmngr.pl 2020-01-26 23:54:12.000000000 +0400
1185     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/script/srvmngr.pl 2020-01-27 12:03:33.959000000 +0400
1186     @@ -34,37 +34,23 @@
1187     app->secrets( $config->{'secrets'} );
1188     app->sessions->cookie_name('srvmngr');
1189     app->sessions->default_expiration('1800');
1190     -##app->session(expires => 1) # in logout;
1191    
1192     # Replace the default paths
1193     app->renderer->paths([app->home->rel_file('themes/default/templates')]);
1194     app->static->paths([app->home->rel_file('themes/default/public')]);
1195    
1196     -if ($config->{theme} ne 'default') {
1197     +my $theme = $config->{theme} || 'default';
1198     +
1199     +if ( $theme ne 'default' ) {
1200     # Put the new theme first
1201     - my $theme = app->home->rel_file('themes/'.$config->{theme});
1202     - unshift @{app->renderer->paths}, $theme.'/templates' if -d $theme.'/templates';
1203     - unshift @{app->static->paths}, $theme.'/public' if -d $theme.'/public';
1204     + my $t_path = app->home->rel_file('themes/'.$theme);
1205     + unshift @{app->renderer->paths}, $t_path.'/templates' if -d $t_path.'/templates';
1206     + unshift @{app->static->paths}, $t_path.'/public' if -d $t_path.'/public';
1207     }
1208     -app->log->info("Current theme : ${app->renderer->paths}[0] & ${app->static->paths}[0]");
1209     -
1210     -
1211     -my %datas = (
1212     - 'lang' => 'en',
1213     - 'releaseVersion' => 'rv',
1214     - 'copyRight' => 'cp',
1215     - 'PwdSet' => '1',
1216     - 'Unsafe' => '0',
1217     - 'SystemName' => 'sn',
1218     - 'DomainName' => 'dn',
1219     -);
1220    
1221     -SrvMngr::Navigation->showNavigation($config) if ($config->{navigation_has_changed} == 1);
1222     -
1223     -%datas = SrvMngr::Model::Main->init_data( %datas );
1224     -
1225     -my $right = app->l("$datas{copyRight}");
1226     -app->log->info("Session started: $datas{lang} $right $datas{SystemName}t $datas{DomainName}");
1227     +#app->log->info("Current theme : $theme");
1228     +#app->log->info("Current theme : ${app->renderer->paths}[0] & ${app->static->paths}[0]");
1229     +#app->log->info("Current theme : ${app->renderer->paths}[1] & ${app->static->paths}[1]") if ( ${app->renderer->paths}[1] );
1230    
1231    
1232     my $r = app->routes;
1233     @@ -95,6 +81,8 @@
1234     $r->get('/ibayd')->to('ibays#do_display')->name('ibaydis');
1235     $r->post('/ibayd')->to('ibays#do_update')->name('ibayupd');
1236    
1237     +$r->get('/initial')->to('initial#main')->name('initial');
1238     +
1239     $r->get('/logout')->to('main#logout')->name('logout');
1240     $r->get('/manual')->to('manual#main')->name('manual');
1241    
1242     @@ -122,6 +110,7 @@
1243     $r->get('/starterwebsite')->to('starterwebsite#main')->name('starterwebsite');
1244     $r->post('/starterwebsite')->to('starterwebsite#do_site')->name('starterwebsite2');
1245     $r->get('/support')->to('support#main')->name('support');
1246     +$r->post('/swttheme')->to('swttheme#main')->name('swttheme');
1247     $r->get('/wbl')->to('wbl#main')->name('wbl');
1248     $r->post('/wbl')->to('wbl#do_display')->name('wbldis');
1249     $r->post('/wbl2')->to('wbl#do_update')->name('wblupd');
1250     @@ -142,7 +131,7 @@
1251     my $url = $c->req->url;
1252     my $version = $c->req->version;
1253     my $ip = $c->tx->remote_address;
1254     - return "Requete recue => $method $url HTTP/$version depuis $ip";
1255     + return "Received request => $method $url HTTP/$version from $ip";
1256     });
1257    
1258    
1259     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/t/srvmngr.t smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/t/srvmngr.t
1260     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/t/srvmngr.t 2020-01-26 23:54:12.000000000 +0400
1261     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/t/srvmngr.t 2020-01-26 17:13:18.000000000 +0400
1262     @@ -23,8 +23,15 @@
1263     ->status_is(200)
1264     ->json_is({ConsoleMode => {type => 'login'}});
1265    
1266     +$t->get_ok('/getconfig/C')
1267     + ->status_is(404);
1268     +
1269     $t->get_ok('/getaccount/Primary')
1270     ->status_is(200)
1271     ->json_is('/name', 'Primary')
1272     ->json_is('//type', 'ibay');
1273    
1274     +$t->get_ok('/getaccount/1')
1275     + ->status_is(404);
1276     +
1277     +done_testing();
1278     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/AdminLTE/templates/layouts/default.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/AdminLTE/templates/layouts/default.html.ep
1279     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/AdminLTE/templates/layouts/default.html.ep 2020-01-26 23:54:12.000000000 +0400
1280     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/AdminLTE/templates/layouts/default.html.ep 2020-01-27 11:17:38.000000000 +0400
1281     @@ -26,6 +26,10 @@
1282     </head>
1283    
1284     <body class="hold-transition sidebar-mini">
1285     + %= include 'partials/_header'
1286     + % if ( not defined $c->session->{lang} ) {
1287     + % SrvMngr::init_session_cgi ( $c );
1288     + % }
1289     <div class="wrapper">
1290    
1291     <!-- Navbar -->
1292     @@ -181,7 +185,8 @@
1293     </div>
1294     -->
1295     <!-- Sidebar Menu -->
1296     - %= include 'partials/_header'
1297     + %= include 'partials/_swt_theme'
1298     +
1299     <nav class="mt-2">
1300     <!--<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">-->
1301     <!-- Add icons to the links using the .nav-icon class
1302     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/clamav.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/clamav.html.ep
1303     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/clamav.html.ep 2020-01-26 23:54:06.000000000 +0400
1304     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/clamav.html.ep 2020-01-25 20:56:31.000000000 +0400
1305     @@ -15,8 +15,6 @@
1306    
1307     %= form_for 'clamav' => (method => 'POST') => begin
1308     <p>
1309     - <!--% =l 'clm_DESC_FILESYSTEM_SCAN_PERIOD'-->
1310     - <br>
1311     <span class=label>
1312     %=l 'clm_LABEL_FILESYSTEM_SCAN_PERIOD'
1313     </span><span class=data>
1314     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/datetime.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/datetime.html.ep
1315     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/datetime.html.ep 2020-01-26 23:54:06.000000000 +0400
1316     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/datetime.html.ep 2020-01-25 20:57:58.000000000 +0400
1317     @@ -78,8 +78,6 @@
1318     %=l 'dat_NEW_M/D/Y'
1319     </span><span class=data2>
1320     %= text_field 'month' => $dat_datas->{month}, class => 'input'
1321     - <!-- $q->popup_menu (-name => 'month', -values => [ 1..12 ],
1322     - -default => $monthdefault, -labels => \%monthlabels), -->
1323     </span><span class=data2>
1324     %= text_field 'day' => $dat_datas->{day}, class => 'input'
1325     </span><span class=data2>
1326     @@ -102,8 +100,6 @@
1327     %= select_field 'ampm' => [[AM => 'am'],[PM => 'pm']], class => 'input'
1328     </span><span class=data2>
1329     %= text_field 'timezone' => $dat_datas->{timezone}, class => 'input'
1330     - <!-- $q->popup_menu (-name => 'timezone', -values => \@zones,
1331     - -default => $timezonedefault))), -->
1332     </span>
1333     </p>
1334     % }
1335     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/default.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/default.html.ep
1336     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/default.html.ep 2020-01-26 23:54:06.000000000 +0400
1337     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/default.html.ep 2020-01-22 22:00:29.000000000 +0400
1338     @@ -1,39 +1,13 @@
1339     % layout 'default', title => 'Sme server 2 - Support', share_dir => './';
1340    
1341     -% content_for 'head' => begin
1342     - %= include 'partials/_head'
1343     -% end
1344     -
1345     -% content_for 'header' => begin
1346     - %= include 'partials/_header'
1347     -% end
1348     -
1349     -% content_for 'info' => begin
1350     - %= include 'partials/_info'
1351     -% end
1352     -
1353     -% content_for 'navigation' => begin
1354     - %= include 'partials/_navig'
1355     -% end
1356     -
1357     -% content_for 'footer' => begin
1358     - %= include 'partials/_footer'
1359     -% end
1360     -
1361     -% content_for 'end' => begin
1362     - <div id="end" class="sme-copyrightbar">
1363     - content_end
1364     - </div>
1365     -% end
1366     -
1367     % content_for 'module' => begin
1368     +
1369     <div id="module">
1370     - <p><%= $title %></p><br>
1371     - <br>
1372     + <p><%= $title %></p>
1373     <%= $modul %>
1374     - <br>
1375     <p>
1376     %= link_to Initial => '/'
1377     </p>
1378     </div>
1379     +
1380     %end
1381     \ Pas de fin de ligne à la fin du fichier
1382     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/exception_development.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/exception_development.html.ep
1383     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/exception_development.html.ep 2020-01-26 23:54:06.000000000 +0400
1384     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/exception_development.html.ep 2020-01-22 22:00:58.000000000 +0400
1385     @@ -1,34 +1,7 @@
1386     % layout 'default', title => 'Sme server 2 - Error D', share_dir => '';
1387    
1388     -% content_for 'head' => begin
1389     - %= include 'partials/_head'
1390     -% end
1391     -
1392     -% content_for 'header' => begin
1393     - %= include 'partials/_header'
1394     -% end
1395     -< !--
1396     -% content_for 'info' => begin
1397     - <!--%= include 'partials/_info'-->
1398     -% end
1399     --- >
1400     -% content_for 'navigation' => begin
1401     - %= include 'partials/_navig'
1402     -% end
1403     -
1404     -< !--
1405     -% content_for 'footer' => begin
1406     - <!--%= include 'partials/_footer'-->
1407     -% end
1408     --- >
1409     -
1410     -% content_for 'end' => begin
1411     - <div id="end" class="sme-copyrightbar">
1412     - content_end
1413     - </div>
1414     -% end
1415     -
1416     % content_for 'module' => begin
1417     +
1418     <div id="central" class="sme-error">
1419     <p><br>dev<br> Oups !!!
1420     The page you were requesting
1421     @@ -39,7 +12,6 @@
1422     <p>
1423     %= link_to Back => '/'
1424     </p>
1425     -
1426     </div>
1427    
1428     % end
1429     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/initial.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/initial.html.ep
1430     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/initial.html.ep 2020-01-26 23:54:12.000000000 +0400
1431     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/initial.html.ep 2020-01-23 22:28:26.000000000 +0400
1432     @@ -1,13 +1,21 @@
1433     % layout 'default', title => 'Sme server 2 - Initial', share_dir => '';
1434    
1435     % content_for 'module' => begin
1436     +
1437     + % if ($config->{debug} == 1) {
1438     + <p>
1439     + %= dumper $c->current_route
1440     + </p>
1441     + % }
1442     +
1443     <div id="central">
1444     <h3>
1445     %= $title
1446     </h3>
1447     - <br><br>
1448     - %= $modul
1449     <br>
1450     + <p>
1451     + %= $modul
1452     + </p>
1453     </div>
1454    
1455     % end
1456     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/layouts/default.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/layouts/default.html.ep
1457     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/layouts/default.html.ep 2020-01-26 23:54:06.000000000 +0400
1458     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/layouts/default.html.ep 2020-01-27 13:21:56.880000000 +0400
1459     @@ -2,7 +2,7 @@
1460     PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
1461     "http://www.w3.org/TR/html4/loose.dtd">
1462     <html>
1463     -
1464     +<!-- default default -->
1465     <head>
1466     <title><%= $title %></title>
1467     <link rev="made" href="mailto:bugs%40koozali.org">
1468     @@ -15,15 +15,19 @@
1469     </head>
1470    
1471     <body>
1472     +% if ( not defined $c->session->{lang} ) {
1473     +% SrvMngr::init_session_cgi ( $c );
1474     +% }
1475     <div id="header">
1476     %= include 'partials/_header'
1477     + %= include 'partials/_swt_theme'
1478     </div>
1479    
1480     %= include 'partials/_info'
1481    
1482     <div id="container">
1483     <div id="navigation" class="col-md-3">
1484     - %= include 'partials/_navig'
1485     + %= include 'partials/_navig2'
1486     </div>
1487     <div id="main" class="col-md-9">
1488     %= content 'module'
1489     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/manual.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/manual.html.ep
1490     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/manual.html.ep 2020-01-26 23:54:06.000000000 +0400
1491     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/manual.html.ep 2020-01-22 21:55:57.000000000 +0400
1492     @@ -1,38 +1,9 @@
1493     % layout 'default', title => 'Sme server 2 - Manual', share_dir => '';
1494    
1495     -% content_for 'head' => begin
1496     - %= include 'partials/_head'
1497     -% end
1498     -
1499     -% content_for 'header' => begin
1500     - %= include 'partials/_header'
1501     -% end
1502     -
1503     -% content_for 'info' => begin
1504     - %= include 'partials/_info'
1505     -% end
1506     -
1507     -% content_for 'navigation' => begin
1508     - %= include 'partials/_navig'
1509     -% end
1510     -
1511     -% content_for 'footer' => begin
1512     - %= include 'partials/_footer'
1513     -% end
1514     -
1515     -% content_for 'end' => begin
1516     - <div id="end" class="sme-copyrightbar">
1517     - content_end
1518     - </div>
1519     -% end
1520     -
1521     % content_for 'module' => begin
1522     <div id="central">
1523     <p><h3> <%= $title %> </h3></p>
1524     <%= $modul %><br>
1525     - <p>
1526     - %= link_to Initial => '/'
1527     - </p>
1528     </div>
1529    
1530     % end
1531     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/module.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/module.html.ep
1532     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/module.html.ep 2020-01-26 23:54:06.000000000 +0400
1533     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/module.html.ep 2020-01-22 22:08:22.000000000 +0400
1534     @@ -1,36 +1,12 @@
1535     % layout 'default', title => "Sme server 2 - module", share_dir => './';
1536    
1537     -% content_for 'head' => begin
1538     - %= include 'partials/_head'
1539     -% end
1540     -
1541     -% content_for 'header' => begin
1542     - %= include 'partials/_header'
1543     -% end
1544     -
1545     -% content_for 'info' => begin
1546     - %= include 'partials/_info'
1547     -% end
1548     -
1549     -% content_for 'navigation' => begin
1550     - %= include 'partials/_navig'
1551     -% end
1552     -
1553     -% content_for 'footer' => begin
1554     - %= include 'partials/_footer'
1555     -% end
1556     -
1557     -% content_for 'end' => begin
1558     - <div id="end" class="sme-copyrightbar">
1559     - content_end
1560     - </div>
1561     -% end
1562     -
1563     % content_for 'module' => begin
1564     +
1565     <div id="module">
1566     - <p> <%= $c->current_route %></p><br>
1567     - <h3><%= $title %></h3>
1568     - <%= $modul %>
1569     - <br>
1570     + <h3>
1571     + %= $title
1572     + </h3>
1573     + %= $modul
1574     </div>
1575     +
1576     %end
1577     \ Pas de fin de ligne à la fin du fichier
1578     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/not_found.development.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/not_found.development.html.ep
1579     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/not_found.development.html.ep 2020-01-26 23:54:06.000000000 +0400
1580     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/not_found.development.html.ep 2020-01-22 21:59:41.000000000 +0400
1581     @@ -1,34 +1,7 @@
1582     % layout 'default', title => 'Sme server 2 - Error D', share_dir => '';
1583    
1584     -% content_for 'head' => begin
1585     - %= include 'partials/_head'
1586     -% end
1587     -
1588     -% content_for 'header' => begin
1589     - %= include 'partials/_header'
1590     -% end
1591     -< !--
1592     -% content_for 'info' => begin
1593     - <!--%= include 'partials/_info'-->
1594     -% end
1595     --- >
1596     -% content_for 'navigation' => begin
1597     - %= include 'partials/_navig'
1598     -% end
1599     -
1600     -< !--
1601     -% content_for 'footer' => begin
1602     - <!--%= include 'partials/_footer'-->
1603     -% end
1604     --- >
1605     -
1606     -% content_for 'end' => begin
1607     - <div id="end" class="sme-copyrightbar">
1608     - content_end
1609     - </div>
1610     -% end
1611     -
1612     % content_for 'module' => begin
1613     +
1614     <div id="central" class="sme-error">
1615     <p><br>dev<br> Oups !!!
1616     The page you were requesting
1617     @@ -37,7 +10,6 @@
1618     <br>dev<br>
1619     %= link_to Initial => '/'
1620     </p>
1621     -
1622     </div>
1623    
1624     % end
1625     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_footer.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_footer.html.ep
1626     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_footer.html.ep 2020-01-26 23:54:12.000000000 +0400
1627     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_footer.html.ep 2020-01-27 00:12:51.075000000 +0400
1628     @@ -1,12 +1,9 @@
1629     <div id="footer">
1630     <HR class="sme-copyrightbar">
1631     <font class="sme-copyright">
1632     -SME Server <%= session 'releaseVersion' %> - <%= session 'lang' %><BR>
1633     -Copyright 1999-2006 Mitel Corporation<BR>
1634     +SME Server <%= session 'releaseVersion' %> - <%= session 'lang' %><br>
1635     +Copyright 1999-2006 Mitel Corporation<br>
1636     <%= session 'copyRight' %>
1637     -<BR>Copyright (c) 2013-2016 Koozali Foundation Inc.<BR>
1638     -</FONT>
1639     -<div id="footinf">
1640     -<a target="_blank" href="/server-manager2/tmp/todo">&nbsp;<b> todo </b></a>&nbsp;<br>
1641     -<a target="_blank" href="/server-manager2/tmp/changelog">&nbsp;<b> changelog </b></a>&nbsp;<br></div>
1642     -</div>
1643     +<br>Copyright (c) 2013-2016 Koozali Foundation Inc.<br>
1644     +Theme: <%= session 'CurrentTheme' %><br>
1645     +</font>
1646     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_add.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_add.html.ep
1647     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_add.html.ep 2020-01-26 23:54:06.000000000 +0400
1648     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_add.html.ep 2020-01-25 20:54:20.000000000 +0400
1649     @@ -2,8 +2,6 @@
1650    
1651     % my $btn = l('ADD');
1652    
1653     - <!-- % = dumper $users -->
1654     -
1655     %= form_for '/groupadd' => (method => 'POST') => begin
1656     <p>
1657     <h2>
1658     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_del.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_del.html.ep
1659     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_del.html.ep 2020-01-26 23:54:06.000000000 +0400
1660     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_del.html.ep 2020-01-25 20:51:36.000000000 +0400
1661     @@ -8,11 +8,7 @@
1662     </h2>
1663    
1664     <p>
1665     - %=l 'grp_DELETE_DESCRIPTION'
1666     - %=$grp_datas->{group}
1667     - (
1668     - %=$grp_datas->{description}
1669     - )
1670     + %=l('grp_DELETE_DESCRIPTION', $grp_datas->{group})
1671     </p>
1672    
1673     <p>
1674     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_list.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_list.html.ep
1675     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_list.html.ep 2020-01-26 23:54:06.000000000 +0400
1676     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_list.html.ep 2020-01-27 12:09:41.787000000 +0400
1677     @@ -17,7 +17,7 @@
1678     <br><br>
1679     % my $numGroups = @$groups;
1680     % if ($numGroups == 0){
1681     - %=l 'grp_ACCOUNT_GROUP_NONE'
1682     + %=l 'ACCOUNT_GROUP_NONE'
1683     % } else {
1684     <table class="sme-border"><tbody>
1685     <tr>
1686     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_upd.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_upd.html.ep
1687     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_upd.html.ep 2020-01-26 23:54:06.000000000 +0400
1688     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_upd.html.ep 2020-01-25 20:54:10.000000000 +0400
1689     @@ -1,8 +1,5 @@
1690     <div id='grp_upd'>
1691    
1692     - <!-- % = dumper $members -->
1693     -
1694     -
1695     % my $btn = l('SAVE');
1696    
1697     %= form_for '/groupupd' => (method => 'POST') => begin
1698     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_iba_del.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_iba_del.html.ep
1699     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_iba_del.html.ep 2020-01-26 23:54:06.000000000 +0400
1700     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_iba_del.html.ep 2020-01-25 19:59:20.000000000 +0400
1701     @@ -7,13 +7,7 @@
1702     %=l 'iba_REMOVE_TITLE'
1703     </h2>
1704     <br>
1705     -
1706     - %= $c->render_to_string(inline => l('iba_REMOVE_DESC'));
1707     -
1708     - <br>
1709     - %= $iba_datas->{ibay}
1710     - (<%= $iba_datas->{description} %>)
1711     -
1712     + %= $c->render_to_string(inline => l('iba_REMOVE_DESC', $iba_datas->{ibay}, $iba_datas->{description}));
1713     <br>
1714     </p>
1715     <p>
1716     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_iba_list.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_iba_list.html.ep
1717     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_iba_list.html.ep 2020-01-26 23:54:06.000000000 +0400
1718     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_iba_list.html.ep 2020-01-25 20:53:51.000000000 +0400
1719     @@ -1,6 +1,5 @@
1720     <div id='iba_list'>
1721    
1722     - <!-- %= dumper @$ibays -->
1723    
1724     % my $btn = l('iba_ADD_IBAY');
1725    
1726     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_iba_pwd.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_iba_pwd.html.ep
1727     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_iba_pwd.html.ep 2020-01-26 23:54:06.000000000 +0400
1728     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_iba_pwd.html.ep 2020-01-22 21:54:26.000000000 +0400
1729     @@ -40,15 +40,3 @@
1730     % end
1731    
1732     </div>
1733     -<!--
1734     - <page name="Password" pre-event="turn_off_buttons()" post-event="reset_password()">
1735     - <title>PASSWORD_RESET</title>
1736     - <description>PASSWORD_DESC</description>
1737     - <field type="password" id="newPass" validation="nonblank, check_password">
1738     - <label>PASSWORD_NEW</label>
1739     - </field>
1740     - <field type="password" id="newPassVerify" validation="verifyPasswords">
1741     - <label>PASSWORD_VERIFY_NEW</label>
1742     - </field>
1743     - <subroutine src="print_button('SAVE')"/>
1744     --->
1745     \ Pas de fin de ligne à la fin du fichier
1746     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_iba_upd.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_iba_upd.html.ep
1747     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_iba_upd.html.ep 2020-01-26 23:54:06.000000000 +0400
1748     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_iba_upd.html.ep 2020-01-25 20:53:41.000000000 +0400
1749     @@ -1,6 +1,5 @@
1750     <div id='iba_upd'>
1751    
1752     - <!-- % = dumper $c->userAccess_list_m() -->
1753    
1754     % my $btn = l('ADD');
1755    
1756     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_navig2.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_navig2.html.ep
1757     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_navig2.html.ep 1970-01-01 04:00:00.000000000 +0400
1758     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_navig2.html.ep 2020-01-25 20:53:34.000000000 +0400
1759     @@ -0,0 +1,28 @@
1760     +% use SrvMngr qw( getNavigation );
1761     +% my %nav = %{SrvMngr->getNavigation( $c->languages() )};
1762     +
1763     + <div id='navigat2'>
1764     +% foreach my $h (sort { ($nav{$a}{'WEIGHT'}/$nav{$a}{'COUNT'})
1765     +% <=> ($nav{$b}{'WEIGHT'}/$nav{$b}{'COUNT'}) } keys %nav) {
1766     +%
1767     + <div class='section'><%= $h %></div>
1768     +%
1769     +% my $cc = 1;
1770     +% foreach (sort { $a->{'WEIGHT'} <=> $b->{'WEIGHT'} } @{$nav{$h}{'DESCRIPTIONS'}}) {
1771     +
1772     +% my ($target, $classNew) = ( $_->{'FILENAME'} =~ m/^2\// ) ?
1773     +% ('_self',' accent') :
1774     +% ('main','') ;
1775     +
1776     +% my $href = '/server-manager' . $_->{'FILENAME'};
1777     +
1778     + <div class='menu-cell'><a class='item<%= $classNew %>' target='<%= $target %>'
1779     + onclick="swapClasses('sme<%= $cc %>')" id='sme<%= $cc %>'
1780     + href='<%= $href %>'><%= $_->{'DESCRIPTION'} %></a></div>
1781     +
1782     +% $cc++;
1783     +% }
1784     +
1785     +% }
1786     +
1787     + </div>
1788     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_navig.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_navig.html.ep
1789     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_navig.html.ep 2020-01-26 23:54:06.000000000 +0400
1790     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_navig.html.ep 2020-01-24 18:07:57.000000000 +0400
1791     @@ -1,7 +1,7 @@
1792     <!--
1793     !! Do N O T modify this file : it is automatically generated !!
1794     -->
1795     - <div id="navigat">
1796     + <div id='navigat'>
1797    
1798     <div class='section'> Collaboration </div>
1799     <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme1')" id='sme1' href='/server-manager/cgi-bin/useraccounts'>Users</a></div>
1800     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_quo_list.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_quo_list.html.ep
1801     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_quo_list.html.ep 2020-01-26 23:54:06.000000000 +0400
1802     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_quo_list.html.ep 2020-01-27 12:09:25.603000000 +0400
1803     @@ -11,7 +11,7 @@
1804     <br>
1805     % my $numUsers = @$userAccounts;
1806     % if ($numUsers == 0){
1807     - %=l 'quo_ACCOUNT_USER_NONE'
1808     + %=l 'ACCOUNT_USER_NONE'
1809     % } else {
1810    
1811     % my $limit = l('quo_LIMIT_WITH_GRACE_MB'); $limit =~ s#(graceX)#<br>$1#;
1812     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_swt_theme.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_swt_theme.html.ep
1813     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_swt_theme.html.ep 1970-01-01 04:00:00.000000000 +0400
1814     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_swt_theme.html.ep 2020-01-24 18:07:44.000000000 +0400
1815     @@ -0,0 +1,14 @@
1816     +<div id='swt_theme'>
1817     + <font class="sme-copyright">
1818     + % my $btn = l('swt_THEME');
1819     + %= form_for '/swttheme' => (method => 'POST') => begin
1820     + % my $value = $c->session->{'CurrentTheme'};
1821     + % $value = session 'CurrentTheme';
1822     +
1823     + % param 'Theme' => $value unless param 'Theme';
1824     + %= select_field 'Theme' => $c->theme_list(), class => 'input'
1825     + %= hidden_field 'From' => $c->tx->req->url
1826     + %= submit_button "$btn"
1827     + % end
1828     + </font>
1829     +</div>
1830     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/qmailanalog.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/qmailanalog.html.ep
1831     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/qmailanalog.html.ep 2020-01-26 23:54:12.000000000 +0400
1832     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/qmailanalog.html.ep 2020-01-27 12:10:18.658000000 +0400
1833     @@ -10,7 +10,7 @@
1834     <h1><%= $title %></h1>
1835     <br>
1836     <%= $modul %>
1837     - <% my $btn = l('GENERATE_REPORT'); %>
1838     + <% my $btn = l('qma_GENERATE_REPORT'); %>
1839    
1840     %= form_for 'qmailanalog' => (method => 'POST') => begin
1841     <p>
1842     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/quota.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/quota.html.ep
1843     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/quota.html.ep 2020-01-26 23:54:06.000000000 +0400
1844     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/quota.html.ep 2020-01-25 20:58:26.000000000 +0400
1845     @@ -7,7 +7,7 @@
1846     <p>
1847     (DBG)route:
1848     %= dumper $c->current_route
1849     - <!--br>
1850     + <br>
1851     (DBG)datas:
1852     %= dumper $quo_datas
1853     -->
1854     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/review.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/review.html.ep
1855     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/review.html.ep 2020-01-26 23:54:06.000000000 +0400
1856     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/review.html.ep 2020-01-24 19:05:22.000000000 +0400
1857     @@ -129,37 +129,3 @@
1858     </div>
1859    
1860     % end
1861     -
1862     -<!--
1863     -
1864     - print_row($self,'LOCAL_IP_ADDRESS_SUBNET_MASK', get_value($self,'LocalIP').'/'.get_value($self,'LocalNetmask') );
1865     - my $publicIP = $self->get_public_ip_address;
1866     - if ($publicIP)
1867     - {
1868     - $self->print_row('INTERNET_VISIBLE_ADDRESS', $publicIP);
1869     - }
1870     -
1871     - print_gateway_stanza($self);
1872     - print_serveronly_stanza($self);
1873     - print_row($self,'ADDITIONAL_LOCAL_NETWORKS', get_local_networks($self) );
1874     - print_dhcp_stanza($self);
1875     -
1876     - print_header($self, 'SERVER_NAMES' );
1877     - print_row($self,'DNS_SERVER', get_value('','LocalIP') );
1878     - print_row($self,'WEB_SERVER', 'www.'.get_local_domain() );
1879     -
1880     - my $port = $db->get_prop("squid", "TransparentPort") || 3128;
1881     - print_row($self,'PROXY_SERVER', 'proxy.'.get_local_domain().":$port" );
1882     -
1883     - print_row($self,'FTP_SERVER', 'ftp.'.get_local_domain() );
1884     - print_row($self,'SMTP_POP_AND_IMAP_MAIL_SERVERS', 'mail.'.get_local_domain() );
1885     - print_row($self,'VIRTUAL_DOMAINS', gen_domains($self));
1886     - print_row($self,'PRIMARY_WEB_SITE', 'http://www.'.get_value('','DomainName') );
1887     - print_row($self,'MITEL_NETWORKS_SME_SERVER_MANAGER',
1888     - 'https://'. (get_value('','SystemName') || 'localhost').'/server-manager/' );
1889     - print_row($self,'MITEL_NETWORKS_SME_SERVER_USER_PASSWORD_PANEL',
1890     - 'https://'. (get_value($self,'SystemName') || 'localhost').'/user-password/' );
1891     - print_row($self,'EMAIL_ADDRESSES', gen_email_addresses($self) );
1892     -
1893     -
1894     --->
1895     \ Pas de fin de ligne à la fin du fichier
1896     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/welcome.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/welcome.html.ep
1897     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/welcome.html.ep 2020-01-26 23:54:06.000000000 +0400
1898     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/welcome.html.ep 2020-01-23 23:25:59.000000000 +0400
1899     @@ -1,31 +1,5 @@
1900     % layout 'default', title => 'Sme server 2 - IndexT', share_dir => '';
1901    
1902     -% content_for 'head' => begin
1903     - %= include 'partials/_head'
1904     -% end
1905     -
1906     -% content_for 'header' => begin
1907     - %= include 'partials/_header'
1908     -% end
1909     -
1910     -% content_for 'info' => begin
1911     - %= include 'partials/_info'
1912     -% end
1913     -
1914     -% content_for 'navigation' => begin
1915     - %= include 'partials/_navig'
1916     -% end
1917     -
1918     -% content_for 'footer' => begin
1919     - %= include 'partials/_footer'
1920     -% end
1921     -
1922     -% content_for 'end' => begin
1923     - <div id="end" class="sme-copyrightbar">
1924     - content_end
1925     - </div>
1926     -% end
1927     -
1928     % content_for 'module' => begin
1929     <div id="central">
1930     <p>Index on line - Welcome page<br>
1931     @@ -41,6 +15,7 @@
1932    
1933     Abdo abigo aptent commoveo inhibeo molior nibh plaga pneum zelus. Conventio genitus neo nulla patria pneum saluto velit voco. Abigo defui dolore humo nulla nunc. Autem commodo erat gemino nisl olim pecus ratis tego. Fere luctus nunc sit. Bene humo imputo paulatim suscipit. Aliquam diam dolor feugiat gravis imputo lucidus modo nulla obruo. Ea macto melior neo qui ratis velit.
1934     </p>
1935     + %= l ('MESS_TEST','toto')
1936     <p>
1937     %= link_to Initial => '/'
1938     </p>
1939     @@ -49,9 +24,48 @@
1940     </p>
1941     <p>
1942     %= link_to Welcome => '/welcome'
1943     - <!--a href="/server-manager2/index.cgi/">Welcome</a>
1944     <a href="<%= url_for 'index' %>">Accueil</a -->.
1945     </p>
1946     +
1947     +% use SrvMngr::Navigation2;
1948     +% my %nav = %{SrvMngr::navigation2->getNavigation( $c->languages() )};
1949     + <!-- % = dumper %nav -->
1950     +
1951     + <div id='navig'>
1952     +% foreach my $h (sort { ($nav{$a}{'WEIGHT'}/$nav{$a}{'COUNT'})
1953     +% <=> ($nav{$b}{'WEIGHT'}/$nav{$b}{'COUNT'}) } keys %nav) {
1954     + <div class='section'>
1955     + %= $h
1956     + </div>
1957     +
1958     +% foreach (sort { $a->{'WEIGHT'} <=> $b->{'WEIGHT'} } @{$nav{$h}{'DESCRIPTIONS'}}) {
1959     +% my ($target, $classNew) = ( $_->{'FILENAME'} =~ m/^2\// ) ?
1960     +% ('_self',' accent') :
1961     +% ('main','') ;
1962     +
1963     +% my $href = '/server-manager' . $_->{'FILENAME'};
1964     + <div class='menu-cell'><a class='item
1965     + %= $classNew
1966     + ' target='
1967     + %= $target
1968     + ' onclick=\"swapClasses('sme
1969     + %= $c
1970     + ')\" id='sme
1971     + %=$c
1972     + ' href='
1973     + %= $href
1974     + '>
1975     + %= $_->{'DESCRIPTION'}
1976     + </a></div>
1977     +
1978     +% $c++;
1979     +% }
1980     +
1981     +% }
1982     +
1983     + </div>
1984     +
1985     +
1986     </div>
1987    
1988     % end
1989     \ Pas de fin de ligne à la fin du fichier
1990     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/whatever.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/whatever.html.ep
1991     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/whatever.html.ep 2020-01-26 23:54:06.000000000 +0400
1992     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/whatever.html.ep 2020-01-22 21:58:53.000000000 +0400
1993     @@ -1,34 +1,7 @@
1994     % layout 'default', title => 'Sme server 2 - Whatever D', share_dir => './';
1995    
1996     -% content_for 'head' => begin
1997     - %= include 'partials/_head'
1998     -% end
1999     -
2000     -% content_for 'header' => begin
2001     - %= include 'partials/_header'
2002     -% end
2003     -< !--
2004     -% content_for 'info' => begin
2005     - <!--%= include 'partials/_info'-->
2006     -% end
2007     --- >
2008     -% content_for 'navigation' => begin
2009     - %= include 'partials/_navig'
2010     -% end
2011     -
2012     -< !--
2013     -% content_for 'footer' => begin
2014     - <!--%= include 'partials/_footer'-->
2015     -% end
2016     --- >
2017     -
2018     -% content_for 'end' => begin
2019     - <div id="end" class="sme-copyrightbar">
2020     - content_end
2021     - </div>
2022     -% end
2023     -
2024     % content_for 'module' => begin
2025     +
2026     <div id="central" class="sme-error">
2027     <p><br>dev<br> What else !!!
2028     The page you were requesting
2029     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/perso/public/jss/styles.css smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/perso/public/jss/styles.css
2030     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/perso/public/jss/styles.css 1970-01-01 04:00:00.000000000 +0400
2031     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/perso/public/jss/styles.css 2020-01-27 13:02:38.505000000 +0400
2032     @@ -0,0 +1,170 @@
2033     +/* srvmngr - css de base */
2034     +body{
2035     + background-color: #FFF;
2036     +}
2037     +
2038     +#container{
2039     + max-width: 100%;
2040     + position: relative;
2041     + margin: auto;
2042     +}
2043     +
2044     +#navigation{
2045     + width: 190px;
2046     + position: absolute;
2047     + margin-left: 0px;
2048     + padding: 5px;
2049     + background-color: #E8F3E1;
2050     +/* height: 600px; */
2051     + overflow: auto;
2052     +}
2053     +
2054     +#main{
2055     + margin-left: 195px;
2056     + padding: 10px;
2057     +}
2058     +
2059     +label.field-with-error {
2060     + color: #dd7e5e
2061     +}
2062     +
2063     +input.field-with-error {
2064     + background-color: #fd9e7e
2065     +}
2066     +
2067     +#central{
2068     + margin-left: 0px;
2069     + padding: 5px;
2070     +}
2071     +
2072     +#footer{
2073     + margin-left: 0px;
2074     + padding: 5px;
2075     +}
2076     +
2077     +#header {
2078     + background: #bee6a2;
2079     +}
2080     +
2081     +#header h1, a:link, a:visited {
2082     + color: black;
2083     + text-decoration: none;
2084     +/* contribs.org styling */
2085     +}
2086     +
2087     +.sme-error {
2088     + color: red;
2089     + background-color: #ffffff;
2090     + border-width: 1px;
2091     + border-style: solid;
2092     + border-color: red ;
2093     + padding: 2px;
2094     + margin-left: 20px;
2095     + margin-right: 20px;
2096     + margin-top:0px;
2097     + margin-bottom:0px;
2098     +}
2099     +
2100     +a.accent {
2101     + color: purple;
2102     +}
2103     +
2104     +#footer img {
2105     + float: right;
2106     + position: fixed;
2107     + margin-left: 40%;
2108     +}
2109     +
2110     +span.label {
2111     + font-weight: bold;
2112     + width: 20%;
2113     +}
2114     +
2115     +span.data {
2116     + padding: 2px;
2117     + font-weight: bold;
2118     + margin-left: 0%;
2119     + background-color: lightgreen;
2120     +}
2121     +
2122     +span.data2 {
2123     + padding: 2px;
2124     + font-weight: bold;
2125     + background-color: lightblue;
2126     +}
2127     +
2128     +input.action {
2129     + margin-left: 0px;
2130     + color: green;
2131     + background-color: lightgreen;
2132     +}
2133     +#modul.desc {
2134     + padding: 3px;
2135     + background-color: grey;
2136     +}
2137     +
2138     +/* #modul form .input */
2139     +
2140     +[type = 'text'] {
2141     + margin-left: 0px;
2142     + background-color: lightblue;
2143     +}
2144     +
2145     +.a, .return {
2146     + color: #661866;
2147     + font-weight: bold;
2148     +}
2149     +
2150     +.section {
2151     + line-height: 20px;
2152     +}
2153     +.a, .item {
2154     + line-height: 15px;
2155     +}
2156     +
2157     +#module {
2158     +/* height: 600px; */
2159     + overflow: auto;
2160     +}
2161     +
2162     +
2163     +#h2l1 {
2164     + height: 40px;
2165     + width: 100%;
2166     +}
2167     +#h2e11 {
2168     + width: 70%;
2169     + float: left;
2170     +}
2171     +#h2e12 {
2172     + background-color: #C0E7A6;
2173     + float: left;
2174     + text-align: right;
2175     +}
2176     +
2177     +#h2l2 {
2178     +/* background-color: #A8F9E7;*/
2179     + border-top: solid white 3px;
2180     + border-bottom: solid white 2px;
2181     + height: 14px;
2182     + width: 100%;
2183     + padding: 1px;
2184     +}
2185     +
2186     +#h2e21 {
2187     + float: left;
2188     + width: 70%;
2189     +}
2190     +
2191     +#h2e22,#h2e23 {
2192     + float: left;
2193     + width: 10%;
2194     + text-align: center;
2195     +}
2196     +
2197     +
2198     +
2199     +/*#h2e23 {
2200     + float: right;
2201     + width: 15%;
2202     +}*/
2203     diff -urN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/perso/templates/layouts/default.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/perso/templates/layouts/default.html.ep
2204     --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/perso/templates/layouts/default.html.ep 2020-01-26 23:54:06.000000000 +0400
2205     +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/perso/templates/layouts/default.html.ep 2020-01-27 13:22:51.967000000 +0400
2206     @@ -1,6 +1,7 @@
2207     <!DOCTYPE html
2208     PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2209     "http://www.w3.org/TR/html4/loose.dtd">
2210     +<!-- defaultperso -->
2211     <html>
2212    
2213     <head>
2214     @@ -15,8 +16,12 @@
2215     </head>
2216    
2217     <body>
2218     +% if ( not defined $c->session->{lang} ) {
2219     +% SrvMngr::init_session_cgi ( $c );
2220     +% }
2221     <div id="header">
2222     %= include 'partials/_header'
2223     + %= include 'partials/_swt_theme'
2224     </div>
2225    
2226     %= include 'partials/_info'

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed