1:- module(bc_admin, []).
5:- use_module(library(http/http_dispatch)). 6:- use_module(library(http/http_wrapper)). 7:- use_module(library(arouter)). 8
9:- use_module(bc_env). 10:- use_module(bc_view). 11:- use_module(bc_main). 12:- use_module(bc_data_config). 13:- use_module(bc_admin_file). 14
15:- route_get(admin/css/File,
16 bc_admin_send_file(css/File)). 17
18:- route_get(admin/fonts/File,
19 bc_admin_send_file(fonts/File)). 20
21:- route_get(admin/img/File,
22 bc_admin_send_file(img/File)). 23
24:- route_get(admin/js/File,
25 bc_admin_send_file(js/File)). 26
27:- route_get(admin/js/libs/File,
28 bc_admin_send_file(js/libs/File)). 29
30:- route_get(admin/js/libs/ace/File,
31 bc_admin_send_file(js/libs/ace/File)). 32
33:- route_get(admin, send_admin). 34
35:- route_get(admin/unsupported, send_unsupported). 36
39
40send_admin:-
41 bc_env(Env),
42 bc_config_get(default_language, Lang),
43 bc_config_get(site, Site),
44 bc_admin_relative(index, Full),
45 pack_property(blog_core, version(Version)),
46 bc_view_send(Full, _{
47 environment: Env,
48 language: Lang,
49 version: Version,
50 site: Site
51 }).
52
55
56send_unsupported:-
57 bc_admin_relative(unsupported, Full),
58 bc_view_send(Full, _{})
HTTP handlers for administration interface */