fix acces to view properties; optional use global copyright option
This commit is contained in:
parent
b7c702f17d
commit
34926dde8c
1 changed files with 5 additions and 2 deletions
|
@ -105,7 +105,7 @@ class NodeView(BaseView):
|
||||||
@Lazy
|
@Lazy
|
||||||
def viewConfigOptions(self):
|
def viewConfigOptions(self):
|
||||||
result = {}
|
result = {}
|
||||||
for opt in self.viewConfig['options']:
|
for opt in self.viewConfig.get('options') or []:
|
||||||
if ':' in opt:
|
if ':' in opt:
|
||||||
k, v = opt.split(':', 1)
|
k, v = opt.split(':', 1)
|
||||||
result[k] = v.split(',')
|
result[k] = v.split(',')
|
||||||
|
@ -113,9 +113,12 @@ class NodeView(BaseView):
|
||||||
result[opt] = True
|
result[opt] = True
|
||||||
return result
|
return result
|
||||||
|
|
||||||
#@Lazy
|
@Lazy
|
||||||
def copyright(self):
|
def copyright(self):
|
||||||
cr = self.viewConfigOptions.get('copyright')
|
cr = self.viewConfigOptions.get('copyright')
|
||||||
|
if cr:
|
||||||
|
return cr[0]
|
||||||
|
cr = self.globalOptions('copyright')
|
||||||
return cr and cr[0] or 'cyberconcepts.org team'
|
return cr and cr[0] or 'cyberconcepts.org team'
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
|
|
Loading…
Add table
Reference in a new issue