/
ui.cfg
95 lines (76 loc) · 3.03 KB
/
ui.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Copyright (C) 2000 Akopia Corp. <heins@akopia.com>
# Author: Michael J. Heins, Akopia Corp. <heins@akopia.com>
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any
# later version.
# This file is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this file; see the file COPYING. If not, write to the Free
# Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
Variable UI_IMG /akopia/ui/
# Set the base for the UI pages
Variable UI_BASE admin
# localized strings
#ifdef UI_LOCALE_DE
#include lib/UI/locales/de_DE.cfg
#endif
#ifdef UI_LOCALE_FR
#include lib/UI/locales/fr_FR.cfg
#endif
#ifdef UI_LOCALE_IT
#include lib/UI/locales/it_IT.cfg
#endif
#ifdef UI_LOCALE_RU
#include lib/UI/locales/ru_RU.cfg
#endif
UserTag UI_initlocale Routine <<EOR
sub {
package Vend::Config;
sub parse_deflocparse {
# preserve locale information for UI
$C->{Locale_repository} = {} unless $C->{Locale_repository};
foreach my $key (keys %$Global::Locale_repository)
{
$C->{Locale_repository}{"MM_$key"} =
$Global::Locale_repository->{$key};
}
}
}
EOR
AddDirective MM_InitLocale deflocparse default
# instruct Interchange to use this directory as alternative
# for searching Interchange pages
TemplateDir lib/UI/pages
## This tag is here to initialize the imports
UserTag reconfigure Routine <<EOR
use UI::Primitive;
*ui_check_acl = \&UI::Primitive::ui_check_acl;
*ui_acl_enabled = \&UI::Primitive::ui_acl_enabled;
*get_ui_table_acl = \&UI::Primitive::get_ui_table_acl;
sub {
Vend::Util::logData("$Global::ConfDir/reconfig", $CGI::script_name)
and return "SUCCESS";
return "FAILED";
}
EOR
Variable UI_MENU_CONTENT <<EOV
code img_dn img_up img_sel page url alt name
[if-mm advanced order]2 B2.gif B2_b.gif B2_b.gif __UI_BASE__/order Order administration Orders
[/if-mm][if-mm advanced userdb]3 B3.gif B3_b.gif B3_b.gif __UI_BASE__/customer Customer administration Customers
[/if-mm][if-mm advanced items]4 B4.gif B4_b.gif B4_b.gif __UI_BASE__/item Item management Items
[/if-mm][if-mm advanced content]5 B5.gif B5_b.gif B5_b.gif __UI_BASE__/page Content edit Content
[/if-mm][if-mm advanced layout]6 B6.gif B6_b.gif B6_b.gif __UI_BASE__/layout Site design Design
[/if-mm][if-mm advanced items]7 B7.gif B7_b.gif B7_b.gif __UI_BASE__/merchandising merchandising Merchandising
[/if-mm][if-mm advanced stats]8 B8.gif B8_b.gif B8_b.gif __UI_BASE__/genreport Statistics and reports Reports
[/if-mm][if-mm advanced admin]9 B9.gif B9_b.gif B9_b.gif __UI_BASE__/genconfig System administration Admin
[/if-mm]
EOV
# user tags
#include lib/UI/usertag/*
#include lib/UI/vars/*
Profiles lib/UI/profiles/*
Message ...UI is loaded....