collab: Add foo.sh theme python script
This commit is contained in:
parent
689ba57b72
commit
42353b188c
2 changed files with 36 additions and 0 deletions
26
roles/collab/files/foosh.py
Normal file
26
roles/collab/files/foosh.py
Normal 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)
|
|
@ -162,6 +162,8 @@
|
||||||
mode: 0660
|
mode: 0660
|
||||||
owner: collab
|
owner: collab
|
||||||
group: collab
|
group: collab
|
||||||
|
seuser: _default
|
||||||
|
setype: _default
|
||||||
force: false
|
force: false
|
||||||
remote_src: true
|
remote_src: true
|
||||||
with_items:
|
with_items:
|
||||||
|
@ -208,6 +210,14 @@
|
||||||
follow: false
|
follow: false
|
||||||
|
|
||||||
- name: install foo.sh theme
|
- 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:
|
synchronize:
|
||||||
dest: "/srv/web/{{ inventory_hostname }}/moin_static/"
|
dest: "/srv/web/{{ inventory_hostname }}/moin_static/"
|
||||||
src: foo.sh
|
src: foo.sh
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue