-
Notifications
You must be signed in to change notification settings - Fork 0
/
rst_top.py
108 lines (93 loc) · 3.2 KB
/
rst_top.py
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
96
97
98
99
100
101
102
103
104
105
106
107
108
# -*- coding: utf-8 -*-
# Copyright (C) 2012-2016 Mag. Christian Tanzer All rights reserved
# Glasauergasse 32, A--1130 Wien, Austria. [email protected]
# #*** <License> ************************************************************#
# This module is part of the program FFG.
#
# This module is licensed under the terms of the BSD 3-Clause License
# <http://www.c-tanzer.at/license/bsd_3c.html>.
# #*** </License> ***********************************************************#
#
#++
# Name
# rst_top
#
# Purpose
# Create navigation tree
#
# Revision Dates
# 26-Mar-2012 (CT) Creation
# 18-Jun-2012 (CT) Add `email_from` to `nav_kw_args`
# 29-Jul-2012 (CT) Change to use `GTW.RST.TOP` instead of `GTW.NAV`
# 29-Jul-2012 (CT) Rename to `rst_top`
# 4-Dec-2012 (CT) Remove `http:` (--> protocol-relative)
# 4-May-2013 (CT) Re-add `http:` for external URLs
# 4-May-2013 (CT) Add `RAT`
# 2-May-2014 (CT) Use option `webmaster`
# 7-Jul-2014 (CT) Add `cndb_template_dir` to `template_dirs`
# 1-Sep-2014 (MB) Moved to FFG
# 11-Oct-2016 (CT) Import `Media` from `CHJ`, not `GTW`
# ««revision-date»»···
#--
from _CNDB import CNDB
import _CNDB._OMP
from _GTW import GTW
from _JNJ import JNJ
from _MOM import MOM
from _TFL import TFL
from _TFL import sos
from _TFL.Attr_Mapper import Attr_Mapper
from _TFL.I18N import _, _T, _Tn
import _CHJ.Media
import _GTW._RST.RAT
import _GTW._RST._TOP.import_TOP
import _GTW._RST._TOP._MOM.import_MOM
import _JNJ
from _MOM.import_MOM import Q
import _TFL.Record
from Media_Parameters import Media_Parameters
Media_Parameters = Media_Parameters ()
src_dir = sos.path.dirname (__file__)
web_root_dir = "//ffg.futr.us"
web_src_root = sos.path.abspath (src_dir)
base_template_dir = sos.path.dirname (_JNJ.__file__)
cndb_template_dir = sos.path.dirname (_CNDB._JNJ.__file__)
template_dirs = [src_dir, cndb_template_dir, base_template_dir]
web_links = \
[ TFL.Record
( href = "http://guifi.net/en/"
, title = "Spanish open wireless network"
, short_title = "Guifi.net"
)
, TFL.Record
( href = "http://wlan-si.net/"
, title = "Slovenian open wireless network"
, short_title = "wlan-si"
)
]
def root_kw_args (cmd, ** kw) :
return dict \
( console_context = dict
( CNDB = CNDB
, GTW = GTW
, JNJ = JNJ
, MOM = MOM
, Q = MOM.Q
, cmd = cmd
)
, copyright_url = "/impressum.html" ### XXX ???
, Media_Parameters = Media_Parameters
, language = "de"
, owner = "Funkfeuer Graz"
, web_links = web_links
, webmaster = cmd.webmaster
, entries =
[ GTW.RST.RAT (name = "RAT")
]
, ** kw
)
# end def root_kw_args
def create (cmd, ** kw) :
return GTW.RST.TOP.Root (** root_kw_args (cmd, ** kw))
# end def create
### __END__ rst_top