|
Revision 2947, 1.3 kB
(checked in by jmorliaguet, 3 years ago)
|
- added a themes manager
- removed the info screen
|
- Property svn:eol-style set to
native
- Property svn:keywords set to
Id
|
| Line | |
|---|
| 1 |
############################################################################## |
|---|
| 2 |
# |
|---|
| 3 |
# Copyright (c) 2006 Nuxeo and Contributors. |
|---|
| 4 |
# All Rights Reserved. |
|---|
| 5 |
# |
|---|
| 6 |
# This software is subject to the provisions of the Zope Public License, |
|---|
| 7 |
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. |
|---|
| 8 |
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED |
|---|
| 9 |
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
|---|
| 10 |
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS |
|---|
| 11 |
# FOR A PARTICULAR PURPOSE. |
|---|
| 12 |
# |
|---|
| 13 |
############################################################################## |
|---|
| 14 |
""" |
|---|
| 15 |
|
|---|
| 16 |
$Id$ |
|---|
| 17 |
""" |
|---|
| 18 |
|
|---|
| 19 |
__docformat__ = "reStructuredText" |
|---|
| 20 |
|
|---|
| 21 |
from zope.component import getSiteManager |
|---|
| 22 |
|
|---|
| 23 |
from cpsskins.thememanager import IThemeManagementFolder |
|---|
| 24 |
|
|---|
| 25 |
class ThemesManagerView: |
|---|
| 26 |
"""Themes manager view. |
|---|
| 27 |
""" |
|---|
| 28 |
|
|---|
| 29 |
def __init__(self, context, request): |
|---|
| 30 |
self.context = context |
|---|
| 31 |
self.request = request |
|---|
| 32 |
|
|---|
| 33 |
self.sm = getSiteManager(context) |
|---|
| 34 |
self.tmutil = self.sm.queryUtility(IThemeManagementFolder) |
|---|
| 35 |
|
|---|
| 36 |
def getThemes(self): |
|---|
| 37 |
return self.tmutil.getThemes() |
|---|
| 38 |
|
|---|
| 39 |
def createTheme(self): |
|---|
| 40 |
from cpsskins.utils import addThemeSkeleton |
|---|
| 41 |
addThemeSkeleton(self.tmutil) |
|---|
| 42 |
|
|---|
| 43 |
self.request.response.redirect('@@themes-manager.html') |
|---|
| 44 |
|
|---|