Changeset 7819 for main/waeup.kofa/trunk/src/waeup/kofa/browser
- Timestamp:
- 8 Mar 2012, 22:28:46 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/browser
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/__init__.py
r7811 r7819 2 2 3 3 from waeup.kofa.browser.layout import ( 4 K OFAPage, KOFAForm, KOFALayout, KOFADisplayFormPage, KOFAEditFormPage,5 K OFAAddFormPage, NullValidator)4 KofaPage, KofaForm, KofaLayout, KofaDisplayFormPage, KofaEditFormPage, 5 KofaAddFormPage, NullValidator) 6 6 from waeup.kofa.browser.pages import ContactAdminForm 7 7 -
main/waeup.kofa/trunk/src/waeup/kofa/browser/breadcrumbs.py
r7811 r7819 34 34 """ 35 35 grok.provides(IBreadcrumb) 36 grok.context(interfaces.IK OFAObject)36 grok.context(interfaces.IKofaObject) 37 37 grok.name('index') 38 38 -
main/waeup.kofa/trunk/src/waeup/kofa/browser/browser.txt
r7811 r7819 1 Browsing K OFA1 Browsing Kofa 2 2 ************* 3 3 4 Here we visit all parts of a K OFAportal using a browser.4 Here we visit all parts of a Kofa portal using a browser. 5 5 6 6 University … … 35 35 >>> print browser.contents 36 36 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"... 37 ...Welcome to WAeUP.K OFA...37 ...Welcome to WAeUP.Kofa... 38 38 ... 39 39 -
main/waeup.kofa/trunk/src/waeup/kofa/browser/captcha.py
r7811 r7819 28 28 from zope.interface import Interface 29 29 from zope.publisher.interfaces.http import IHTTPRequest 30 from waeup.kofa.browser import K OFAPage30 from waeup.kofa.browser import KofaPage 31 31 from waeup.kofa.browser.interfaces import ( 32 32 ICaptchaRequest, ICaptchaResponse, ICaptcha, ICaptchaConfig, … … 171 171 """ReCaptcha - strong captchas with images, sound, etc. 172 172 173 This is the K OFAimplementation to support captchas as provided by173 This is the Kofa implementation to support captchas as provided by 174 174 http://www.google.com/recaptcha. 175 175 … … 266 266 headers = { 267 267 "Content-type": "application/x-www-form-urlencoded", 268 "User-agent": "reCAPTCHA Python K OFA",268 "User-agent": "reCAPTCHA Python Kofa", 269 269 } 270 270 ) … … 319 319 320 320 321 class CaptchaTestPage(K OFAPage):321 class CaptchaTestPage(KofaPage): 322 322 # A test page to see a captcha in action 323 323 grok.name('captcha') -
main/waeup.kofa/trunk/src/waeup/kofa/browser/exceptions.py
r7817 r7819 22 22 from zope.publisher.interfaces import INotFound 23 23 from zope.security.interfaces import IUnauthorized 24 from waeup.kofa.browser.layout import K OFAPage24 from waeup.kofa.browser.layout import KofaPage 25 25 26 26 grok.templatedir('templates') … … 61 61 62 62 63 class NotFoundPage(K OFAPage):63 class NotFoundPage(KofaPage): 64 64 """A page rendered when an object cannot be found. 65 65 -
main/waeup.kofa/trunk/src/waeup/kofa/browser/interfaces.py
r7811 r7819 21 21 from zope.interface import Interface, Attribute 22 22 from waeup.kofa.interfaces import ( 23 IK OFAObject, IUniversity, IUsersContainer, IDataCenter)23 IKofaObject, IUniversity, IUsersContainer, IDataCenter) 24 24 from waeup.kofa.university.interfaces import ( 25 25 IFacultiesContainer, IFaculty, IFacultyAdd, IDepartment, IDepartmentAdd, -
main/waeup.kofa/trunk/src/waeup/kofa/browser/layout.py
r7811 r7819 33 33 from zope.interface import Interface 34 34 from zope.site.hooks import getSite 35 from waeup.kofa.interfaces import IK OFAObject, IUserAccount35 from waeup.kofa.interfaces import IKofaObject, IUserAccount 36 36 from waeup.kofa.browser.interfaces import ITheme 37 from waeup.kofa.browser.theming import get_all_themes, K OFAThemeBase37 from waeup.kofa.browser.theming import get_all_themes, KofaThemeBase 38 38 from waeup.kofa.students.interfaces import IStudentNavigation 39 39 from waeup.kofa.applicants.interfaces import IApplicant … … 56 56 57 57 def __call__(self, success): 58 action = K OFAAction(self.label, success=success, **self.options)58 action = KofaAction(self.label, success=success, **self.options) 59 59 self.actions.append(action) 60 60 return action 61 61 62 class K OFAAction(Action):62 class KofaAction(Action): 63 63 64 64 def __init__(self, label, style='', **options): 65 super(K OFAAction, self).__init__(label, **options)65 super(KofaAction, self).__init__(label, **options) 66 66 self.style = style 67 67 … … 150 150 return True 151 151 152 class K OFALayout(UtilityView,Layout):152 class KofaLayout(UtilityView,Layout): 153 153 """A megrok.layout.Layout with additional methods. 154 154 """ 155 155 grok.baseclass() 156 156 157 class K OFAForm(UtilityView,Form):157 class KofaForm(UtilityView,Form): 158 158 """A megrok.layout.Form with additional methods. 159 159 """ … … 161 161 162 162 def setUpWidgets(self,ignore_request=False): 163 super(K OFAForm,self).setUpWidgets(ignore_request)163 super(KofaForm,self).setUpWidgets(ignore_request) 164 164 # Width parameters will be overridden by Bootstrap 165 165 # so we have to set the css class … … 171 171 self.widgets['body'].cssClass = 'span9' 172 172 173 class K OFAPage(UtilityView,Page):173 class KofaPage(UtilityView,Page): 174 174 """A megrok.layout page with additional methods. 175 175 """ 176 176 grok.baseclass() 177 177 178 class K OFADisplayFormPage(UtilityView,DisplayForm):178 class KofaDisplayFormPage(UtilityView,DisplayForm): 179 179 """A megrok.layout.DisplayForm with additional methods. 180 180 """ … … 182 182 template = default_waeup_display_template 183 183 184 class K OFAEditFormPage(UtilityView,EditForm):184 class KofaEditFormPage(UtilityView,EditForm): 185 185 """A megrok.layout.EditForm with additional methods. 186 186 """ … … 189 189 190 190 def setUpWidgets(self,ignore_request=False): 191 super(K OFAEditFormPage,self).setUpWidgets(ignore_request)191 super(KofaEditFormPage,self).setUpWidgets(ignore_request) 192 192 for widget in self.widgets: 193 193 if widget.__class__.__name__ == 'TextWidget': … … 207 207 self.widgets['perm_address'].height = 10 208 208 209 class K OFAAddFormPage(UtilityView,AddForm):209 class KofaAddFormPage(UtilityView,AddForm): 210 210 """A megrok.layout.AddForm with additional methods. 211 211 """ … … 213 213 template = default_waeup_edit_template 214 214 215 class SiteLayout(K OFALayout):215 class SiteLayout(KofaLayout): 216 216 """ The general site layout. 217 217 """ 218 grok.context(IK OFAObject)218 grok.context(IKofaObject) 219 219 220 220 #: An instance of the default theme to use for the site layout 221 default_theme = K OFAThemeBase()221 default_theme = KofaThemeBase() 222 222 stafftemp = grok.PageTemplateFile('templates/staffsitelayout.pt') 223 223 studenttemp = grok.PageTemplateFile('templates/studentsitelayout.pt') -
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r7811 r7819 16 16 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 17 ## 18 """ Viewing components for K OFAobjects.18 """ Viewing components for Kofa objects. 19 19 """ 20 20 import copy … … 38 38 from zope.session.interfaces import ISession 39 39 from waeup.kofa.browser import ( 40 K OFAPage, KOFAForm, KOFAEditFormPage, KOFAAddFormPage,41 K OFADisplayFormPage, NullValidator)40 KofaPage, KofaForm, KofaEditFormPage, KofaAddFormPage, 41 KofaDisplayFormPage, NullValidator) 42 42 from waeup.kofa.browser.interfaces import ( 43 43 IUniversity, IFacultiesContainer, IFaculty, IFacultyAdd, … … 47 47 from waeup.kofa.browser.resources import warning, datepicker, tabs, datatable 48 48 from waeup.kofa.interfaces import( 49 IK OFAObject, IUsersContainer, IUserAccount, IDataCenter,50 IK OFAXMLImporter, IKOFAXMLExporter, IBatchProcessor,49 IKofaObject, IUsersContainer, IUserAccount, IDataCenter, 50 IKofaXMLImporter, IKofaXMLExporter, IBatchProcessor, 51 51 ILocalRolesAssignable, DuplicationError, IConfigurationContainer, 52 52 ISessionConfiguration, ISessionConfigurationAdd, 53 IPasswordValidator, IContactForm, IK OFAUtils)53 IPasswordValidator, IContactForm, IKofaUtils) 54 54 from waeup.kofa.permissions import get_users_with_local_roles, get_all_roles 55 55 from waeup.kofa.students.catalog import search as searchstudents … … 62 62 from waeup.kofa.browser.layout import jsaction, action, UtilityView 63 63 64 grok.context(IK OFAObject)64 grok.context(IKofaObject) 65 65 grok.templatedir('templates') 66 66 … … 144 144 # 145 145 146 class LoginPage(K OFAPage):146 class LoginPage(KofaPage): 147 147 """A login page, available for all objects. 148 148 """ 149 149 grok.name('login') 150 grok.context(IK OFAObject)150 grok.context(IKofaObject) 151 151 grok.require('waeup.Public') 152 152 label = _(u'Login') … … 179 179 180 180 181 class LogoutPage(K OFAPage):181 class LogoutPage(KofaPage): 182 182 """A logout page. Calling this page will log the current user out. 183 183 """ 184 grok.context(IK OFAObject)184 grok.context(IKofaObject) 185 185 grok.require('waeup.Public') 186 186 grok.name('logout') … … 190 190 auth = getUtility(IAuthentication) 191 191 ILogout(auth).logout(self.request) 192 self.flash(_("You have been logged out. Thanks for using WAeUP K OFA!"))192 self.flash(_("You have been logged out. Thanks for using WAeUP Kofa!")) 193 193 self.redirect(self.application_url()) 194 194 195 195 196 class LanguageChangePage(K OFAPage):196 class LanguageChangePage(KofaPage): 197 197 """ Language switch 198 198 """ 199 grok.context(IK OFAObject)199 grok.context(IKofaObject) 200 200 grok.name('change_language') 201 201 grok.require('waeup.Public') … … 213 213 # 214 214 215 class ContactAdminForm(K OFAForm):215 class ContactAdminForm(KofaForm): 216 216 grok.name('contactadmin') 217 217 #grok.context(IUniversity) … … 242 242 usertype = getattr(self.request.principal, 243 243 'user_type', 'system').title() 244 kofa_utils = getUtility(IK OFAUtils)244 kofa_utils = getUtility(IKofaUtils) 245 245 success = kofa_utils.sendContactForm( 246 246 fullname,email, … … 263 263 @action(_('Send now'), style='primary') 264 264 def send(self, *args, **data): 265 kofa_utils = getUtility(IK OFAUtils)265 kofa_utils = getUtility(IKofaUtils) 266 266 success = kofa_utils.sendContactForm( 267 267 data['fullname'],data['email_from'], … … 279 279 # 280 280 281 class UniversityPage(K OFADisplayFormPage):281 class UniversityPage(KofaDisplayFormPage): 282 282 """ The main university page. 283 283 """ … … 290 290 @property 291 291 def frontpage(self): 292 portal_language = getUtility(IK OFAUtils).PORTAL_LANGUAGE292 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 293 293 lang = self.request.cookies.get('kofa.language', portal_language) 294 294 html = self.context['configuration'].frontpage_dict.get(lang,'') … … 297 297 'configuration'].frontpage_dict.get(portal_language,'') 298 298 if html =='': 299 return _(u'<h1>Welcome to WAeUP.K OFA</h1>')299 return _(u'<h1>Welcome to WAeUP.Kofa</h1>') 300 300 else: 301 301 return html 302 302 303 class AdministrationPage(K OFAPage):303 class AdministrationPage(KofaPage): 304 304 """ The administration overview page. 305 305 """ … … 378 378 # 379 379 380 class UsersContainerPage(K OFAPage):380 class UsersContainerPage(KofaPage): 381 381 """Overview page for all local users. 382 382 """ … … 418 418 return site_roles_string 419 419 420 class AddUserFormPage(K OFAAddFormPage):420 class AddUserFormPage(KofaAddFormPage): 421 421 grok.require('waeup.manageUsers') 422 422 grok.context(IUsersContainer) … … 456 456 self.redirect(self.url(self.context)) 457 457 458 class UserManageFormPage(K OFAEditFormPage):458 class UserManageFormPage(KofaEditFormPage): 459 459 """Manage a user account. 460 460 """ … … 525 525 usertype = getattr(self.request.principal, 526 526 'user_type', 'system').title() 527 kofa_utils = getUtility(IK OFAUtils)527 kofa_utils = getUtility(IKofaUtils) 528 528 success = kofa_utils.sendContactForm( 529 529 self.request.principal.title,email, … … 550 550 self.widgets['title'].displayWidth = 30 551 551 552 class MyRolesPage(K OFAPage):552 class MyRolesPage(KofaPage): 553 553 """Display site roles and local roles assigned to officers. 554 554 """ … … 581 581 # 582 582 583 class SearchPage(K OFAPage):583 class SearchPage(KofaPage): 584 584 """General search page for the academics section. 585 585 """ … … 608 608 # 609 609 610 class ConfigurationContainerDisplayFormPage(K OFADisplayFormPage):610 class ConfigurationContainerDisplayFormPage(KofaDisplayFormPage): 611 611 """View page of the configuration container. 612 612 """ … … 619 619 form_fields['frontpage'].custom_widget = ReSTDisplayWidget 620 620 621 class ConfigurationContainerManageFormPage(K OFAEditFormPage):621 class ConfigurationContainerManageFormPage(KofaEditFormPage): 622 622 """Manage page of the configuration container. We always use the 623 623 manage page in the UI not the view page, thus we use the index name here. … … 684 684 return 685 685 686 class SessionConfigurationAddFormPage(K OFAAddFormPage):686 class SessionConfigurationAddFormPage(KofaAddFormPage): 687 687 """Add a session configuration object to configuration container. 688 688 """ … … 711 711 return 712 712 713 class SessionConfigurationManageFormPage(K OFAEditFormPage):713 class SessionConfigurationManageFormPage(KofaEditFormPage): 714 714 """Manage session configuration object. 715 715 """ … … 742 742 # 743 743 744 class DatacenterPage(K OFAPage):744 class DatacenterPage(KofaPage): 745 745 grok.context(IDataCenter) 746 746 grok.name('index') … … 749 749 pnav = 0 750 750 751 class DatacenterUploadPage(K OFAPage):751 class DatacenterUploadPage(KofaPage): 752 752 grok.context(IDataCenter) 753 753 grok.name('upload') … … 794 794 return '%s_%s%s' % (base, filtered_username, ext.lower()) 795 795 796 class DatacenterImportStep1(K OFAPage):796 class DatacenterImportStep1(KofaPage): 797 797 """Manual import step 1: choose file 798 798 """ … … 824 824 self.redirect(self.url(self.context, '@@import2')) 825 825 826 class DatacenterImportStep2(K OFAPage):826 class DatacenterImportStep2(KofaPage): 827 827 """Manual import step 2: choose importer 828 828 """ … … 944 944 self.flash(warnings) 945 945 946 class DatacenterImportStep3(K OFAPage):946 class DatacenterImportStep3(KofaPage): 947 947 """Manual import step 3: modify header 948 948 """ … … 1052 1052 self.flash(warnings) 1053 1053 1054 class DatacenterImportStep4(K OFAPage):1054 class DatacenterImportStep4(KofaPage): 1055 1055 """Manual import step 4: do actual import 1056 1056 """ … … 1111 1111 mapping = {'a':linenum - self.warn_num})) 1112 1112 1113 class DatacenterLogsOverview(K OFAPage):1113 class DatacenterLogsOverview(KofaPage): 1114 1114 grok.context(IDataCenter) 1115 1115 grok.name('logs') … … 1133 1133 self.files = self.context.getLogFiles() 1134 1134 1135 class DatacenterLogsFileview(K OFAPage):1135 class DatacenterLogsFileview(KofaPage): 1136 1136 grok.context(IDataCenter) 1137 1137 grok.name('show') … … 1172 1172 popen.close() 1173 1173 1174 class DatacenterSettings(K OFAPage):1174 class DatacenterSettings(KofaPage): 1175 1175 grok.context(IDataCenter) 1176 1176 grok.name('manage') … … 1215 1215 1216 1216 def render(self): 1217 exporter = IK OFAXMLExporter(self.context)1217 exporter = IKofaXMLExporter(self.context) 1218 1218 xml = exporter.export().read() 1219 1219 self.response.setHeader( … … 1221 1221 return xml 1222 1222 1223 class ImportXMLPage(K OFAPage):1223 class ImportXMLPage(KofaPage): 1224 1224 """Replace the context object by an object created from an XML 1225 1225 representation. … … 1237 1237 if not xmlfile: 1238 1238 return 1239 importer = IK OFAXMLImporter(self.context)1239 importer = IKofaXMLImporter(self.context) 1240 1240 obj = importer.doImport(xmlfile) 1241 1241 if type(obj) != type(self.context): … … 1257 1257 # 1258 1258 1259 class FacultiesContainerPage(K OFAPage):1259 class FacultiesContainerPage(KofaPage): 1260 1260 """ Index page for faculty containers. 1261 1261 """ … … 1267 1267 grok.template('facultypage') 1268 1268 1269 class FacultiesContainerManageFormPage(K OFAEditFormPage):1269 class FacultiesContainerManageFormPage(KofaEditFormPage): 1270 1270 """Manage the basic properties of a `Faculty` instance. 1271 1271 """ … … 1302 1302 1303 1303 1304 class FacultyAddFormPage(K OFAAddFormPage):1304 class FacultyAddFormPage(KofaAddFormPage): 1305 1305 """ Page form to add a new faculty to a faculty container. 1306 1306 """ … … 1330 1330 # Faculty pages 1331 1331 # 1332 class FacultyPage(K OFAPage):1332 class FacultyPage(KofaPage): 1333 1333 """Index page of faculties. 1334 1334 """ … … 1342 1342 return _('Departments') 1343 1343 1344 class FacultyManageFormPage(K OFAEditFormPage):1344 class FacultyManageFormPage(KofaEditFormPage): 1345 1345 """Manage the basic properties of a `Faculty` instance. 1346 1346 """ … … 1416 1416 return del_local_roles(self,3,**data) 1417 1417 1418 class DepartmentAddFormPage(K OFAAddFormPage):1418 class DepartmentAddFormPage(KofaAddFormPage): 1419 1419 """Add a department to a faculty. 1420 1420 """ … … 1446 1446 # Department pages 1447 1447 # 1448 class DepartmentPage(K OFAPage):1448 class DepartmentPage(KofaPage): 1449 1449 """Department index page. 1450 1450 """ … … 1475 1475 yield(dict(url=url, name=key, container=val)) 1476 1476 1477 class ShowStudentsInDepartmentPage(K OFAPage):1477 class ShowStudentsInDepartmentPage(KofaPage): 1478 1478 """Page that lists all students in the department. 1479 1479 """ … … 1510 1510 return hitlist 1511 1511 1512 class DepartmentManageFormPage(K OFAEditFormPage):1512 class DepartmentManageFormPage(KofaEditFormPage): 1513 1513 """Manage the basic properties of a `Department` instance. 1514 1514 """ … … 1612 1612 return del_local_roles(self,4,**data) 1613 1613 1614 class CourseAddFormPage(K OFAAddFormPage):1614 class CourseAddFormPage(KofaAddFormPage): 1615 1615 """Add-form to add course to a department. 1616 1616 """ … … 1649 1649 return 1650 1650 1651 class CertificateAddFormPage(K OFAAddFormPage):1651 class CertificateAddFormPage(KofaAddFormPage): 1652 1652 """Add-form to add certificate to a department. 1653 1653 """ … … 1690 1690 # Courses pages 1691 1691 # 1692 class CoursePage(K OFADisplayFormPage):1692 class CoursePage(KofaDisplayFormPage): 1693 1693 """Course index page. 1694 1694 """ … … 1703 1703 return '%s (%s)' % (self.context.title, self.context.code) 1704 1704 1705 class CourseManageFormPage(K OFAEditFormPage):1705 class CourseManageFormPage(KofaEditFormPage): 1706 1706 """Edit form page for courses. 1707 1707 """ … … 1734 1734 # Certificate pages 1735 1735 # 1736 class CertificatePage(K OFADisplayFormPage):1736 class CertificatePage(KofaDisplayFormPage): 1737 1737 """Index page for certificates. 1738 1738 """ … … 1752 1752 return super(CertificatePage, self).update() 1753 1753 1754 class CertificateManageFormPage(K OFAEditFormPage):1754 class CertificateManageFormPage(KofaEditFormPage): 1755 1755 """Manage the properties of a `Certificate` instance. 1756 1756 """ … … 1830 1830 1831 1831 1832 class CertificateCourseAddFormPage(K OFAAddFormPage):1832 class CertificateCourseAddFormPage(KofaAddFormPage): 1833 1833 """Add-page to add a course ref to a certificate 1834 1834 """ … … 1862 1862 # Certificate course pages... 1863 1863 # 1864 class CertificateCoursePage(K OFAPage):1864 class CertificateCoursePage(KofaPage): 1865 1865 """CertificateCourse index page. 1866 1866 """ … … 1879 1879 return course_levels.getTerm(self.context.level).title 1880 1880 1881 class CertificateCourseManageFormPage(K OFAEditFormPage):1881 class CertificateCourseManageFormPage(KofaEditFormPage): 1882 1882 """Manage the basic properties of a `CertificateCourse` instance. 1883 1883 """ -
main/waeup.kofa/trunk/src/waeup/kofa/browser/resources.py
r7811 r7819 262 262 depends=[jquery]) 263 263 264 #: Register basic K OFACSS (which is based on ``bootstrap.min-1.4.0.css``264 #: Register basic Kofa CSS (which is based on ``bootstrap.min-1.4.0.css`` 265 265 #: and ``base`` as a resource. 266 266 waeup_base_css = ResourceInclusion( -
main/waeup.kofa/trunk/src/waeup/kofa/browser/theming.py
r7811 r7819 23 23 from zope.interface import Interface 24 24 from zope.schema.interfaces import IVocabularyFactory 25 from waeup.kofa.interfaces import SimpleK OFAVocabulary25 from waeup.kofa.interfaces import SimpleKofaVocabulary 26 26 from waeup.kofa.browser.interfaces import ITheme 27 27 from waeup.kofa.browser.resources import ( … … 29 29 ) 30 30 31 class K OFAThemeBase(grok.GlobalUtility):31 class KofaThemeBase(grok.GlobalUtility): 32 32 grok.implements(ITheme) 33 33 grok.name('base waeup theme') … … 38 38 return [waeup_base_css] 39 39 40 #class K OFAThemeRed1(grok.GlobalUtility):40 #class KofaThemeRed1(grok.GlobalUtility): 41 41 # grok.implements(ITheme) 42 42 # grok.name('red waeup theme') … … 47 47 # return [waeuptheme_red1] 48 48 49 #class K OFAThemeGray1(grok.GlobalUtility):49 #class KofaThemeGray1(grok.GlobalUtility): 50 50 # grok.implements(ITheme) 51 51 # grok.name('gray waeup theme') … … 56 56 # return [waeuptheme_gray1] 57 57 58 class K OFAThemeEmpty(grok.GlobalUtility):58 class KofaThemeEmpty(grok.GlobalUtility): 59 59 """A theme based on jQuery only. 60 60 … … 112 112 terms = [(theme.description, name) 113 113 for name, theme in get_all_themes()] 114 vocab = SimpleK OFAVocabulary(*terms)114 vocab = SimpleKofaVocabulary(*terms) 115 115 return vocab -
main/waeup.kofa/trunk/src/waeup/kofa/browser/viewlets.py
r7817 r7819 31 31 ICertificateCourse, IBreadcrumbContainer, IUniversity, IUsersContainer) 32 32 from waeup.kofa.interfaces import ( 33 IK OFAUtils, IKOFAObject, IKOFAXMLExporter,34 IK OFAXMLImporter, IDataCenter, IUserAccount)35 from waeup.kofa.browser.layout import K OFAPage, default_primary_nav_template33 IKofaUtils, IKofaObject, IKofaXMLExporter, 34 IKofaXMLImporter, IDataCenter, IUserAccount) 35 from waeup.kofa.browser.layout import KofaPage, default_primary_nav_template 36 36 from waeup.kofa.utils.helpers import get_user_account 37 37 … … 39 39 40 40 grok.templatedir('templates') 41 grok.context(IK OFAObject) # Make IKOFAObject the default context41 grok.context(IKofaObject) # Make IKofaObject the default context 42 42 43 43 class LeftSidebar(grok.ViewletManager): … … 85 85 """ 86 86 grok.baseclass() 87 grok.context(IK OFAObject)87 grok.context(IKofaObject) 88 88 grok.viewletmanager(ActionBar) 89 89 icon = 'actionicon_modify.png' # File must exist in static/ … … 196 196 197 197 class BreadCrumbs(grok.Viewlet): 198 grok.context(IK OFAObject)198 grok.context(IKofaObject) 199 199 grok.viewletmanager(BreadCrumbManager) 200 200 grok.order(1) … … 216 216 """ 217 217 grok.viewletmanager(LanguageManager) 218 grok.context(IK OFAObject)218 grok.context(IKofaObject) 219 219 grok.require('waeup.Public') 220 220 title = u'Languages' 221 221 222 222 def render(self): 223 preferred_languages = getUtility(IK OFAUtils).PREFERRED_LANGUAGES_DICT223 preferred_languages = getUtility(IKofaUtils).PREFERRED_LANGUAGES_DICT 224 224 html = u'' 225 225 for key, value in sorted( … … 257 257 grok.baseclass() 258 258 grok.viewletmanager(LeftSidebar) 259 grok.context(IK OFAObject)259 grok.context(IKofaObject) 260 260 grok.order(5) 261 261 grok.require('waeup.manageUniversity') … … 316 316 """ 317 317 grok.viewletmanager(LeftSidebar) 318 grok.context(IK OFAObject)318 grok.context(IKofaObject) 319 319 grok.view(Interface) 320 320 grok.order(2) … … 350 350 """ 351 351 grok.viewletmanager(LeftSidebar) 352 grok.context(IK OFAObject)352 grok.context(IKofaObject) 353 353 grok.view(Interface) 354 354 grok.order(5) … … 520 520 class BrowseActionButton(ActionButton): 521 521 grok.baseclass() 522 grok.context(IK OFAObject)522 grok.context(IKofaObject) 523 523 grok.template('actionbutton') 524 524 grok.viewletmanager(ActionBar) … … 686 686 target_viewname = 'datacenter' 687 687 688 # The SubobjectLister and its viewlets below are not used in K OFA.688 # The SubobjectLister and its viewlets below are not used in Kofa. 689 689 690 690 class SubobjectLister(grok.ViewletManager):
Note: See TracChangeset for help on using the changeset viewer.