collab: Add foo.sh theme python script

This commit is contained in:
Timo Makinen 2020-09-08 20:19:29 +00:00
parent 689ba57b72
commit 42353b188c
2 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
"""
foo.sh branded bootstrap theme.
@license: GNU GPL <http://www.gnu.org/licenses/gpl.html>
"""
from collabbackend.plugin.theme.opencollab import Theme as ThemeParent
class Theme(ThemeParent):
name = "foo.sh"
css_files = ["screen"]
def logo(self):
url = self.cfg.url_prefix_static + "/foo.sh/img/logo.png"
return u"""<img src="%s">""" % url
def execute(request):
"""
Generate and return a theme object
@param request: the request object
@rtype: MoinTheme
@return: Theme object
"""
return Theme(request)

View file

@ -162,6 +162,8 @@
mode: 0660
owner: collab
group: collab
seuser: _default
setype: _default
force: false
remote_src: true
with_items:
@ -208,6 +210,14 @@
follow: false
- name: install foo.sh theme
copy:
src: foosh.py
dest: /usr/lib/python2.7/site-packages/collabbackend/plugin/theme/foosh.py
mode: 0644
owner: root
group: "{{ ansible_wheel }}"
- name: install static files for foo.sh theme
synchronize:
dest: "/srv/web/{{ inventory_hostname }}/moin_static/"
src: foo.sh