Changeset 7811 for main/waeup.kofa/trunk/src/waeup/kofa/browser
- Timestamp:
- 8 Mar 2012, 19:00:51 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/browser
- Files:
-
- 45 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/__init__.py
r7321 r7811 1 1 import os 2 2 3 from waeup. sirp.browser.layout import (4 SIRPPage, SIRPForm, SIRPLayout, SIRPDisplayFormPage, SIRPEditFormPage,5 SIRPAddFormPage, NullValidator)6 from waeup. sirp.browser.pages import ContactAdminForm3 from waeup.kofa.browser.layout import ( 4 KOFAPage, KOFAForm, KOFALayout, KOFADisplayFormPage, KOFAEditFormPage, 5 KOFAAddFormPage, NullValidator) 6 from waeup.kofa.browser.pages import ContactAdminForm 7 7 8 8 IMAGE_PATH = os.path.join( -
main/waeup.kofa/trunk/src/waeup/kofa/browser/batchprocessing.txt
r7749 r7811 21 21 Create a site: 22 22 23 >>> from waeup. sirp.app import University23 >>> from waeup.kofa.app import University 24 24 >>> getRootFolder()['app'] = University() 25 25 -
main/waeup.kofa/trunk/src/waeup/kofa/browser/breadcrumbs.py
r7700 r7811 23 23 from zope.publisher.browser import TestRequest 24 24 25 from waeup. sirp.interfaces import (25 from waeup.kofa.interfaces import ( 26 26 IConfigurationContainer, ISessionConfiguration) 27 from waeup. sirp.interfaces import MessageFactory as _28 from waeup. sirp.browser import interfaces29 from waeup. sirp.browser.interfaces import (IBreadcrumb,27 from waeup.kofa.interfaces import MessageFactory as _ 28 from waeup.kofa.browser import interfaces 29 from waeup.kofa.browser.interfaces import (IBreadcrumb, 30 30 IBreadcrumbIgnorable, IBreadcrumbContainer) 31 31 32 32 class Breadcrumb(grok.Adapter): 33 33 """A most general breadcrumb generator. 34 34 """ 35 35 grok.provides(IBreadcrumb) 36 grok.context(interfaces.I SIRPObject)36 grok.context(interfaces.IKOFAObject) 37 37 grok.name('index') 38 38 … … 42 42 parent_viewname = 'index' 43 43 viewname = 'index' 44 44 45 45 def __init__(self, context): 46 46 """Turn a context into a breadcrumb. … … 57 57 return self.context.title 58 58 if hasattr(self.context, 'name'): 59 return self.context.name 59 return self.context.name 60 60 return None 61 61 … … 151 151 class DataCenterBreadcrumb(Breadcrumb): 152 152 """A breadcrumb for data centers. 153 """ 153 """ 154 154 grok.context(interfaces.IDataCenter) 155 155 title = _(u'Data Center') … … 160 160 """ 161 161 grok.context(interfaces.IFaculty) 162 162 163 163 @property 164 164 def title(self): … … 169 169 """ 170 170 grok.context(interfaces.IDepartment) 171 171 172 172 class CourseBreadcrumb(FacultyBreadcrumb): 173 173 """A breadcrumb for courses. 174 174 """ 175 grok.context(interfaces.ICourse) 176 175 grok.context(interfaces.ICourse) 176 177 177 class CertificateBreadcrumb(FacultyBreadcrumb): 178 178 """A breadcrumb for certificates. 179 179 """ 180 grok.context(interfaces.ICertificate) 180 grok.context(interfaces.ICertificate) 181 181 182 182 class CoursesContainerBreadcrumb(Breadcrumb): … … 245 245 246 246 _breadcrumbs = None 247 247 248 248 def __init__(self, context): 249 249 self.context = context -
main/waeup.kofa/trunk/src/waeup/kofa/browser/breadcrumbs.txt
r7172 r7811 11 11 We create a university to check the breadcrumb functionality. 12 12 13 >>> from waeup. sirp.app import University13 >>> from waeup.kofa.app import University 14 14 >>> root = getRootFolder() 15 15 >>> root['app'] = University() … … 22 22 viewname: 23 23 24 >>> from waeup. sirp.browser.breadcrumbs import getBreadcrumbList24 >>> from waeup.kofa.browser.breadcrumbs import getBreadcrumbList 25 25 >>> blist1 = getBreadcrumbList(app, 'index') 26 26 >>> blist1 27 [<waeup. sirp.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>]27 [<waeup.kofa.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>] 28 28 29 29 A slightly more extensive list for the datacenter: … … 32 32 >>> from pprint import pprint 33 33 >>> pprint(blist2) 34 [<waeup. sirp.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>,35 <waeup. sirp.browser.breadcrumbs.AdministrationBreadcrumb object at 0x...>,36 <waeup. sirp.browser.breadcrumbs.DataCenterBreadcrumb object at 0x...>]34 [<waeup.kofa.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>, 35 <waeup.kofa.browser.breadcrumbs.AdministrationBreadcrumb object at 0x...>, 36 <waeup.kofa.browser.breadcrumbs.DataCenterBreadcrumb object at 0x...>] 37 37 38 38 We get a breadcrumb for university, administration area and data … … 47 47 48 48 >>> pprint([(x.context, x.viewname) for x in blist2]) 49 [(<waeup. sirp.app.University object at 0x...>, 'index'),50 (<waeup. sirp.app.University object at 0x...>, 'administration'),51 (<waeup. sirp.datacenter.DataCenter object at 0x...>, 'index')]49 [(<waeup.kofa.app.University object at 0x...>, 'index'), 50 (<waeup.kofa.app.University object at 0x...>, 'administration'), 51 (<waeup.kofa.datacenter.DataCenter object at 0x...>, 'index')] 52 52 53 53 The administration area breadcrumb might be a surprise, as there is no … … 89 89 Now we can get the breadcrumbs for this view: 90 90 91 >>> from waeup. sirp.browser.breadcrumbs import getBreadcrumbListForView91 >>> from waeup.kofa.browser.breadcrumbs import getBreadcrumbListForView 92 92 >>> blist3 = getBreadcrumbListForView(page) 93 93 >>> [x.title for x in blist3] … … 109 109 The returned breadcrumb container supports iteration: 110 110 111 >>> from waeup. sirp.browser.interfaces import IBreadcrumbContainer111 >>> from waeup.kofa.browser.interfaces import IBreadcrumbContainer 112 112 >>> mybccontainer = IBreadcrumbContainer(page) 113 113 >>> [x.title for x in mybccontainer] … … 131 131 132 132 >>> from zope.component import getAdapter 133 >>> from waeup. sirp.browser.interfaces import IBreadcrumb133 >>> from waeup.kofa.browser.interfaces import IBreadcrumb 134 134 >>> b1 = getAdapter(app, IBreadcrumb, 'index') 135 135 >>> b1 136 <waeup. sirp.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>136 <waeup.kofa.browser.breadcrumbs.UniversityBreadcrumb object at 0x...> 137 137 138 138 Breadcrumb objects provide a title: … … 156 156 >>> b2 = getAdapter(app['datacenter'], IBreadcrumb, 'index') 157 157 >>> b2 158 <waeup. sirp.browser.breadcrumbs.DataCenterBreadcrumb object at 0x...>158 <waeup.kofa.browser.breadcrumbs.DataCenterBreadcrumb object at 0x...> 159 159 160 160 >>> b2.title … … 168 168 169 169 >>> b2.parent 170 (<waeup. sirp.app.University object at 0x...>, 'administration')170 (<waeup.kofa.app.University object at 0x...>, 'administration') 171 171 172 172 This result denotes a new context object (the University instance we … … 184 184 >>> b3 = getAdapter(context, IBreadcrumb, viewname) 185 185 >>> b3 186 <waeup. sirp...breadcrumbs.AdministrationBreadcrumb object at 0x...>186 <waeup.kofa...breadcrumbs.AdministrationBreadcrumb object at 0x...> 187 187 188 188 As you can see, we get an AdministrationBreadcrumb, although the … … 197 197 >>> context, viewname = b3.parent 198 198 >>> context, viewname 199 (<waeup. sirp.app.University object at 0x...>, 'index')199 (<waeup.kofa.app.University object at 0x...>, 'index') 200 200 201 201 We create last breadcrumb: -
main/waeup.kofa/trunk/src/waeup/kofa/browser/browser.txt
r7707 r7811 1 Browsing SIRP1 Browsing KOFA 2 2 ************* 3 3 4 Here we visit all parts of a SIRPportal using a browser.4 Here we visit all parts of a KOFA portal using a browser. 5 5 6 6 University … … 15 15 [] 16 16 17 >>> from waeup. sirp.app import University17 >>> from waeup.kofa.app import University 18 18 >>> u = University() 19 19 >>> root['myuniversity'] = u … … 35 35 >>> print browser.contents 36 36 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"... 37 ...Welcome to WAeUP. SIRP...37 ...Welcome to WAeUP.KOFA... 38 38 ... 39 39 … … 566 566 Courses are stored in :class:`ICoursesContainer` instances with their 567 567 code as key. CoursesContainers are normally availabe as `course` 568 attribute of :class:`waeup. sirp.university.department.Department`568 attribute of :class:`waeup.kofa.university.department.Department` 569 569 instances. 570 570 … … 769 769 with their code as key. CertificatesContainers are normally availabe as 770 770 `certificates` attribute of 771 :class:`waeup. sirp.university.department.Department` instances.771 :class:`waeup.kofa.university.department.Department` instances. 772 772 773 773 To ease the life of users we do not require to browse the -
main/waeup.kofa/trunk/src/waeup/kofa/browser/captcha.py
r7320 r7811 28 28 from zope.interface import Interface 29 29 from zope.publisher.interfaces.http import IHTTPRequest 30 from waeup. sirp.browser import SIRPPage31 from waeup. sirp.browser.interfaces import (30 from waeup.kofa.browser import KOFAPage 31 from waeup.kofa.browser.interfaces import ( 32 32 ICaptchaRequest, ICaptchaResponse, ICaptcha, ICaptchaConfig, 33 33 ICaptchaManager) 34 from waeup. sirp.interfaces import IUniversity34 from waeup.kofa.interfaces import IUniversity 35 35 36 36 # … … 171 171 """ReCaptcha - strong captchas with images, sound, etc. 172 172 173 This is the SIRPimplementation 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 SIRP",268 "User-agent": "reCAPTCHA Python KOFA", 269 269 } 270 270 ) … … 319 319 320 320 321 class CaptchaTestPage( SIRPPage):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
r7321 r7811 22 22 from zope.publisher.interfaces import INotFound 23 23 from zope.security.interfaces import IUnauthorized 24 from waeup. sirp.browser.layout import SIRPPage24 from waeup.kofa.browser.layout import KOFAPage 25 25 26 26 grok.templatedir('templates') … … 61 61 62 62 63 class NotFoundPage( SIRPPage):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
r7333 r7811 20 20 from zope import schema 21 21 from zope.interface import Interface, Attribute 22 from waeup. sirp.interfaces import (23 I SIRPObject, IUniversity, IUsersContainer, IDataCenter)24 from waeup. sirp.university.interfaces import (22 from waeup.kofa.interfaces import ( 23 IKOFAObject, IUniversity, IUsersContainer, IDataCenter) 24 from waeup.kofa.university.interfaces import ( 25 25 IFacultiesContainer, IFaculty, IFacultyAdd, IDepartment, IDepartmentAdd, 26 26 ICoursesContainer, ICourse, ICourseAdd, ICertificatesContainer, … … 63 63 Themes are basically collections of CSS- and/or JavaScript files 64 64 stored somewhere. In Grok-contexts these files can be registered 65 as 'resources' (see :mod:`waeup. sirp.browser.resources`).65 as 'resources' (see :mod:`waeup.kofa.browser.resources`). 66 66 67 67 Furthermore, to make themes selectable and distinctable from each -
main/waeup.kofa/trunk/src/waeup/kofa/browser/layout.py
r7700 r7811 33 33 from zope.interface import Interface 34 34 from zope.site.hooks import getSite 35 from waeup. sirp.interfaces import ISIRPObject, IUserAccount36 from waeup. sirp.browser.interfaces import ITheme37 from waeup. sirp.browser.theming import get_all_themes, SIRPThemeBase38 from waeup. sirp.students.interfaces import IStudentNavigation39 from waeup. sirp.applicants.interfaces import IApplicant40 from waeup. sirp.authentication import get_principal_role_manager35 from waeup.kofa.interfaces import IKOFAObject, IUserAccount 36 from waeup.kofa.browser.interfaces import ITheme 37 from waeup.kofa.browser.theming import get_all_themes, KOFAThemeBase 38 from waeup.kofa.students.interfaces import IStudentNavigation 39 from waeup.kofa.applicants.interfaces import IApplicant 40 from waeup.kofa.authentication import get_principal_role_manager 41 41 42 42 grok.templatedir('templates') … … 56 56 57 57 def __call__(self, success): 58 action = SIRPAction(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 SIRPAction(Action):62 class KOFAAction(Action): 63 63 64 64 def __init__(self, label, style='', **options): 65 super( SIRPAction, 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 SIRPLayout(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 SIRPForm(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( SIRPForm,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 SIRPPage(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 SIRPDisplayFormPage(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 SIRPEditFormPage(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( SIRPEditFormPage,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 SIRPAddFormPage(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( SIRPLayout):215 class SiteLayout(KOFALayout): 216 216 """ The general site layout. 217 217 """ 218 grok.context(I SIRPObject)218 grok.context(IKOFAObject) 219 219 220 220 #: An instance of the default theme to use for the site layout 221 default_theme = SIRPThemeBase()221 default_theme = KOFAThemeBase() 222 222 stafftemp = grok.PageTemplateFile('templates/staffsitelayout.pt') 223 223 studenttemp = grok.PageTemplateFile('templates/studentsitelayout.pt') … … 297 297 hold the internal name of a theme. 298 298 299 A theme in the waeup. sirpsense consists of a list of299 A theme in the waeup.kofa sense consists of a list of 300 300 CSS/JavaScript resources defined in the 301 :mod:`waeup. sirp.browser.resources` module.301 :mod:`waeup.kofa.browser.resources` module. 302 302 303 303 If the context University object has no such attribute or the -
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r7750 r7811 16 16 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 17 ## 18 """ Viewing components for SIRPobjects.18 """ Viewing components for KOFA objects. 19 19 """ 20 20 import copy … … 37 37 from zope.event import notify 38 38 from zope.session.interfaces import ISession 39 from waeup. sirp.browser import (40 SIRPPage, SIRPForm, SIRPEditFormPage, SIRPAddFormPage,41 SIRPDisplayFormPage, NullValidator)42 from waeup. sirp.browser.interfaces import (39 from waeup.kofa.browser import ( 40 KOFAPage, KOFAForm, KOFAEditFormPage, KOFAAddFormPage, 41 KOFADisplayFormPage, NullValidator) 42 from waeup.kofa.browser.interfaces import ( 43 43 IUniversity, IFacultiesContainer, IFaculty, IFacultyAdd, 44 44 IDepartment, IDepartmentAdd, ICourse, ICourseAdd, ICertificate, 45 45 ICertificateAdd, ICertificateCourse, ICertificateCourseAdd) 46 from waeup. sirp.interfaces import MessageFactory as _47 from waeup. sirp.browser.resources import warning, datepicker, tabs, datatable48 from waeup. sirp.interfaces import(49 I SIRPObject, IUsersContainer, IUserAccount, IDataCenter,50 I SIRPXMLImporter, ISIRPXMLExporter, IBatchProcessor,46 from waeup.kofa.interfaces import MessageFactory as _ 47 from waeup.kofa.browser.resources import warning, datepicker, tabs, datatable 48 from waeup.kofa.interfaces import( 49 IKOFAObject, IUsersContainer, IUserAccount, IDataCenter, 50 IKOFAXMLImporter, IKOFAXMLExporter, IBatchProcessor, 51 51 ILocalRolesAssignable, DuplicationError, IConfigurationContainer, 52 52 ISessionConfiguration, ISessionConfigurationAdd, 53 IPasswordValidator, IContactForm, I SIRPUtils)54 from waeup. sirp.permissions import get_users_with_local_roles, get_all_roles55 from waeup. sirp.students.catalog import search as searchstudents56 from waeup. sirp.university.catalog import search57 from waeup. sirp.university.vocabularies import course_levels58 from waeup. sirp.authentication import LocalRoleSetEvent59 from waeup. sirp.widgets.restwidget import ReSTDisplayWidget60 from waeup. sirp.authentication import get_principal_role_manager61 from waeup. sirp.utils.helpers import get_user_account62 from waeup. sirp.browser.layout import jsaction, action, UtilityView63 64 grok.context(I SIRPObject)53 IPasswordValidator, IContactForm, IKOFAUtils) 54 from waeup.kofa.permissions import get_users_with_local_roles, get_all_roles 55 from waeup.kofa.students.catalog import search as searchstudents 56 from waeup.kofa.university.catalog import search 57 from waeup.kofa.university.vocabularies import course_levels 58 from waeup.kofa.authentication import LocalRoleSetEvent 59 from waeup.kofa.widgets.restwidget import ReSTDisplayWidget 60 from waeup.kofa.authentication import get_principal_role_manager 61 from waeup.kofa.utils.helpers import get_user_account 62 from waeup.kofa.browser.layout import jsaction, action, UtilityView 63 64 grok.context(IKOFAObject) 65 65 grok.templatedir('templates') 66 66 … … 144 144 # 145 145 146 class LoginPage( SIRPPage):146 class LoginPage(KOFAPage): 147 147 """A login page, available for all objects. 148 148 """ 149 149 grok.name('login') 150 grok.context(I SIRPObject)150 grok.context(IKOFAObject) 151 151 grok.require('waeup.Public') 152 152 label = _(u'Login') … … 179 179 180 180 181 class LogoutPage( SIRPPage):181 class LogoutPage(KOFAPage): 182 182 """A logout page. Calling this page will log the current user out. 183 183 """ 184 grok.context(I SIRPObject)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 SIRP!"))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( SIRPPage):196 class LanguageChangePage(KOFAPage): 197 197 """ Language switch 198 198 """ 199 grok.context(I SIRPObject)199 grok.context(IKOFAObject) 200 200 grok.name('change_language') 201 201 grok.require('waeup.Public') 202 202 203 203 def update(self, lang='en', view_name='@@index'): 204 self.response.setCookie(' sirp.language', lang, path='/')204 self.response.setCookie('kofa.language', lang, path='/') 205 205 self.redirect(self.url(self.context, view_name)) 206 206 return … … 213 213 # 214 214 215 class ContactAdminForm( SIRPForm):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 sirp_utils = getUtility(ISIRPUtils)245 success = sirp_utils.sendContactForm(244 kofa_utils = getUtility(IKOFAUtils) 245 success = kofa_utils.sendContactForm( 246 246 fullname,email, 247 247 self.config.name_admin,self.config.email_admin, … … 263 263 @action(_('Send now'), style='primary') 264 264 def send(self, *args, **data): 265 sirp_utils = getUtility(ISIRPUtils)266 success = sirp_utils.sendContactForm(265 kofa_utils = getUtility(IKOFAUtils) 266 success = kofa_utils.sendContactForm( 267 267 data['fullname'],data['email_from'], 268 268 self.config.name_admin,self.config.email_admin, … … 279 279 # 280 280 281 class UniversityPage( SIRPDisplayFormPage):281 class UniversityPage(KOFADisplayFormPage): 282 282 """ The main university page. 283 283 """ … … 290 290 @property 291 291 def frontpage(self): 292 portal_language = getUtility(I SIRPUtils).PORTAL_LANGUAGE293 lang = self.request.cookies.get(' sirp.language', portal_language)292 portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE 293 lang = self.request.cookies.get('kofa.language', portal_language) 294 294 html = self.context['configuration'].frontpage_dict.get(lang,'') 295 295 if html =='': … … 297 297 'configuration'].frontpage_dict.get(portal_language,'') 298 298 if html =='': 299 return _(u'<h1>Welcome to WAeUP. SIRP</h1>')299 return _(u'<h1>Welcome to WAeUP.KOFA</h1>') 300 300 else: 301 301 return html 302 302 303 class AdministrationPage( SIRPPage):303 class AdministrationPage(KOFAPage): 304 304 """ The administration overview page. 305 305 """ … … 319 319 320 320 name = 'General news feed' 321 description = 'waeup. sirpnow supports RSS 2.0 feeds :-)'321 description = 'waeup.kofa now supports RSS 2.0 feeds :-)' 322 322 language = None 323 323 date = None … … 378 378 # 379 379 380 class UsersContainerPage( SIRPPage):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( SIRPAddFormPage):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( SIRPEditFormPage):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 sirp_utils = getUtility(ISIRPUtils)528 success = sirp_utils.sendContactForm(527 kofa_utils = getUtility(IKOFAUtils) 528 success = kofa_utils.sendContactForm( 529 529 self.request.principal.title,email, 530 530 self.context.title,self.context.email, … … 550 550 self.widgets['title'].displayWidth = 30 551 551 552 class MyRolesPage( SIRPPage):552 class MyRolesPage(KOFAPage): 553 553 """Display site roles and local roles assigned to officers. 554 554 """ … … 581 581 # 582 582 583 class SearchPage( SIRPPage):583 class SearchPage(KOFAPage): 584 584 """General search page for the academics section. 585 585 """ … … 608 608 # 609 609 610 class ConfigurationContainerDisplayFormPage( SIRPDisplayFormPage):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( SIRPEditFormPage):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( SIRPAddFormPage):686 class SessionConfigurationAddFormPage(KOFAAddFormPage): 687 687 """Add a session configuration object to configuration container. 688 688 """ … … 711 711 return 712 712 713 class SessionConfigurationManageFormPage( SIRPEditFormPage):713 class SessionConfigurationManageFormPage(KOFAEditFormPage): 714 714 """Manage session configuration object. 715 715 """ … … 742 742 # 743 743 744 class DatacenterPage( SIRPPage):744 class DatacenterPage(KOFAPage): 745 745 grok.context(IDataCenter) 746 746 grok.name('index') … … 749 749 pnav = 0 750 750 751 class DatacenterUploadPage( SIRPPage):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( SIRPPage):796 class DatacenterImportStep1(KOFAPage): 797 797 """Manual import step 1: choose file 798 798 """ … … 820 820 if select is not None: 821 821 # A filename was selected 822 session = ISession(self.request)['waeup. sirp']822 session = ISession(self.request)['waeup.kofa'] 823 823 session['import_filename'] = select 824 824 self.redirect(self.url(self.context, '@@import2')) 825 825 826 class DatacenterImportStep2( SIRPPage):826 class DatacenterImportStep2(KOFAPage): 827 827 """Manual import step 2: choose importer 828 828 """ … … 909 909 def update(self, mode=None, importer=None, 910 910 back1=None, cancel=None, proceed=None): 911 session = ISession(self.request)['waeup. sirp']911 session = ISession(self.request)['waeup.kofa'] 912 912 self.filename = session.get('import_filename', None) 913 913 … … 944 944 self.flash(warnings) 945 945 946 class DatacenterImportStep3( SIRPPage):946 class DatacenterImportStep3(KOFAPage): 947 947 """Manual import step 3: modify header 948 948 """ … … 1023 1023 1024 1024 def update(self, headerfield=None, back2=None, cancel=None, proceed=None): 1025 session = ISession(self.request)['waeup. sirp']1025 session = ISession(self.request)['waeup.kofa'] 1026 1026 self.filename = session.get('import_filename', None) 1027 1027 self.mode = session.get('import_mode', None) … … 1052 1052 self.flash(warnings) 1053 1053 1054 class DatacenterImportStep4( SIRPPage):1054 class DatacenterImportStep4(KOFAPage): 1055 1055 """Manual import step 4: do actual import 1056 1056 """ … … 1074 1074 self.redirect(self.url(self.context)) 1075 1075 return 1076 session = ISession(self.request)['waeup. sirp']1076 session = ISession(self.request)['waeup.kofa'] 1077 1077 self.filename = session.get('import_filename', None) 1078 1078 self.mode = session.get('import_mode', None) … … 1111 1111 mapping = {'a':linenum - self.warn_num})) 1112 1112 1113 class DatacenterLogsOverview( SIRPPage):1113 class DatacenterLogsOverview(KOFAPage): 1114 1114 grok.context(IDataCenter) 1115 1115 grok.name('logs') … … 1122 1122 1123 1123 def update(self, show=None, logname=None, back=None): 1124 session = ISession(self.request)['waeup. sirp']1124 session = ISession(self.request)['waeup.kofa'] 1125 1125 if back is not None: 1126 1126 self.redirect(self.url(self.context)) … … 1133 1133 self.files = self.context.getLogFiles() 1134 1134 1135 class DatacenterLogsFileview( SIRPPage):1135 class DatacenterLogsFileview(KOFAPage): 1136 1136 grok.context(IDataCenter) 1137 1137 grok.name('show') … … 1153 1153 self.redirect(self.url(self.context, '@@logs')) 1154 1154 return 1155 session = ISession(self.request)['waeup. sirp']1155 session = ISession(self.request)['waeup.kofa'] 1156 1156 logname = session.get('logname', None) 1157 1157 if back is not None or logname is None: … … 1172 1172 popen.close() 1173 1173 1174 class DatacenterSettings( SIRPPage):1174 class DatacenterSettings(KOFAPage): 1175 1175 grok.context(IDataCenter) 1176 1176 grok.name('manage') … … 1215 1215 1216 1216 def render(self): 1217 exporter = I SIRPXMLExporter(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( SIRPPage):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 = I SIRPXMLImporter(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( SIRPPage):1259 class FacultiesContainerPage(KOFAPage): 1260 1260 """ Index page for faculty containers. 1261 1261 """ … … 1267 1267 grok.template('facultypage') 1268 1268 1269 class FacultiesContainerManageFormPage( SIRPEditFormPage):1269 class FacultiesContainerManageFormPage(KOFAEditFormPage): 1270 1270 """Manage the basic properties of a `Faculty` instance. 1271 1271 """ … … 1302 1302 1303 1303 1304 class FacultyAddFormPage( SIRPAddFormPage):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( SIRPPage):1332 class FacultyPage(KOFAPage): 1333 1333 """Index page of faculties. 1334 1334 """ … … 1342 1342 return _('Departments') 1343 1343 1344 class FacultyManageFormPage( SIRPEditFormPage):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( SIRPAddFormPage):1418 class DepartmentAddFormPage(KOFAAddFormPage): 1419 1419 """Add a department to a faculty. 1420 1420 """ … … 1446 1446 # Department pages 1447 1447 # 1448 class DepartmentPage( SIRPPage):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( SIRPPage):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( SIRPEditFormPage):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( SIRPAddFormPage):1614 class CourseAddFormPage(KOFAAddFormPage): 1615 1615 """Add-form to add course to a department. 1616 1616 """ … … 1649 1649 return 1650 1650 1651 class CertificateAddFormPage( SIRPAddFormPage):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( SIRPDisplayFormPage):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( SIRPEditFormPage):1705 class CourseManageFormPage(KOFAEditFormPage): 1706 1706 """Edit form page for courses. 1707 1707 """ … … 1734 1734 # Certificate pages 1735 1735 # 1736 class CertificatePage( SIRPDisplayFormPage):1736 class CertificatePage(KOFADisplayFormPage): 1737 1737 """Index page for certificates. 1738 1738 """ … … 1752 1752 return super(CertificatePage, self).update() 1753 1753 1754 class CertificateManageFormPage( SIRPEditFormPage):1754 class CertificateManageFormPage(KOFAEditFormPage): 1755 1755 """Manage the properties of a `Certificate` instance. 1756 1756 """ … … 1830 1830 1831 1831 1832 class CertificateCourseAddFormPage( SIRPAddFormPage):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( SIRPPage):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( SIRPEditFormPage):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
r7592 r7811 16 16 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 17 ## 18 """Special JavaScript and CSS resources provided by waeup. sirp.18 """Special JavaScript and CSS resources provided by waeup.kofa. 19 19 """ 20 20 #from hurry import yui … … 24 24 25 25 26 #: All local resources are registered under the name ``waeup_ sirp``.27 waeup_ sirp = Library('waeup_sirp', 'static')26 #: All local resources are registered under the name ``waeup_kofa``. 27 waeup_kofa = Library('waeup_kofa', 'static') 28 28 29 29 #: A resource that binds a jQueryUI datepicker widget to each … … 36 36 #: require the JavaScript code to be rendered into the page:: 37 37 #: 38 #: from waeup. sirp.browser.resources import datepicker38 #: from waeup.kofa.browser.resources import datepicker 39 39 #: # ... 40 40 #: class MyPage(...): … … 89 89 #: ``"datepicker-us-year"`` 90 90 #: same but also adds a select field for year 91 datepicker = ResourceInclusion(waeup_ sirp, 'datepicker.js',91 datepicker = ResourceInclusion(waeup_kofa, 'datepicker.js', 92 92 depends=[jqueryui]) 93 93 … … 99 99 #: require the JavaScript code to be rendered into the page:: 100 100 #: 101 #: from waeup. sirp.browser.resources import warning101 #: from waeup.kofa.browser.resources import warning 102 102 #: # ... 103 103 #: class MyPage(...): … … 115 115 #: <input type="submit" name="xyz" value="abc"> 116 116 #: onclick="return confirmPost('Are you sure?')"/> 117 warning = ResourceInclusion(waeup_ sirp, 'warning.js')117 warning = ResourceInclusion(waeup_kofa, 'warning.js') 118 118 119 119 #: If you have many select boxes in a from which have to be selected at the same … … 123 123 #: require the JavaScript code to be rendered into the page:: 124 124 #: 125 #: from waeup. sirp.browser.resources import toggleall125 #: from waeup.kofa.browser.resources import toggleall 126 126 #: # ... 127 127 #: class MyPage(...): … … 138 138 #: 139 139 #: <input type="checkbox" onClick="toggle(this, 'entries')" /> 140 toggleall = ResourceInclusion(waeup_ sirp, 'toggleall.js')140 toggleall = ResourceInclusion(waeup_kofa, 'toggleall.js') 141 141 142 142 #: A resource that binds Bootstrap tabs to <div> tags with class … … 150 150 #: tab for redirection:: 151 151 #: 152 #: from waeup. sirp.browser.resources import tabs152 #: from waeup.kofa.browser.resources import tabs 153 153 #: 154 154 #: class MyPage(...): … … 188 188 #: for details. 189 189 #: 190 tabs = ResourceInclusion(waeup_ sirp, 'bootstrap-tabs-1.4.0.js',190 tabs = ResourceInclusion(waeup_kofa, 'bootstrap-tabs-1.4.0.js', 191 191 depends=[jquery]) 192 192 … … 197 197 #: use of datatables you might want to add some specialized CSS like 198 198 #: `datatable_css` below. 199 datatables = ResourceInclusion(waeup_ sirp, 'jquery.dataTables.js',199 datatables = ResourceInclusion(waeup_kofa, 'jquery.dataTables.js', 200 200 minified='jquery.dataTables.min.js', 201 201 depends=[jquery]) 202 202 203 203 #: A stylesheet for datatables 204 datatables_css = ResourceInclusion(waeup_ sirp, 'datatables.css')204 datatables_css = ResourceInclusion(waeup_kofa, 'datatables.css') 205 205 206 206 #: A resource that turns HTML tables into sortable, searchable and : … … 214 214 #: require the JavaScript code to be rendered into the page:: 215 215 #: 216 #: from waeup. sirp.browser.resources import datatable216 #: from waeup.kofa.browser.resources import datatable 217 217 #: # ... 218 218 #: class MyPage(...): … … 251 251 #: for details. 252 252 #: 253 datatable = ResourceInclusion(waeup_ sirp, 'datatable.js',253 datatable = ResourceInclusion(waeup_kofa, 'datatable.js', 254 254 depends=[datatables, datatables_css]) 255 255 256 256 #: Register Twitter's Bootsrap css including dropdown js as a resource. 257 257 bootstrap_min = ResourceInclusion( 258 waeup_ sirp, 'bootstrap-1.4.0.css')258 waeup_kofa, 'bootstrap-1.4.0.css') 259 259 260 260 dropdown = ResourceInclusion( 261 waeup_ sirp, 'bootstrap-dropdown-1.4.0.js',261 waeup_kofa, 'bootstrap-dropdown-1.4.0.js', 262 262 depends=[jquery]) 263 263 264 #: Register basic SIRPCSS (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( 267 waeup_ sirp, 'waeup-base.css',267 waeup_kofa, 'waeup-base.css', 268 268 depends=[dropdown,bootstrap_min, base]) 269 269 270 270 #: A basic theme based on jQuery only (crappy yet). 271 271 waeuptheme_empty = ResourceInclusion( 272 waeup_ sirp, 'empty.css',272 waeup_kofa, 'empty.css', 273 273 depends=[humanity]) -
main/waeup.kofa/trunk/src/waeup/kofa/browser/static/datatable.js
r6023 r7811 4 4 "aaSorting": [[ 1, "asc" ]], 5 5 "aoColumnDefs":[{ "bSortable": false, "aTargets": [ 0 ] }] 6 } ); 6 } ); 7 7 }); 8 8 -
main/waeup.kofa/trunk/src/waeup/kofa/browser/static/datepicker.js
r6060 r7811 1 1 $(function() { 2 $( ".datepicker" ).datepicker({ dateFormat: 'yy-mm-dd', 2 $( ".datepicker" ).datepicker({ dateFormat: 'yy-mm-dd', 3 3 duration: 'fast' 4 4 }); … … 24 24 25 25 $(function() { 26 $( ".datepicker-year" ).datepicker({ dateFormat: 'yy-mm-dd', 26 $( ".datepicker-year" ).datepicker({ dateFormat: 'yy-mm-dd', 27 27 duration: 'fast', 28 28 changeYear: true, -
main/waeup.kofa/trunk/src/waeup/kofa/browser/static/waeup-base.css
r7746 r7811 1 /* This is the base stylesheet for SIRP. It defines base styles1 /* This is the base stylesheet for KOFA. It defines base styles 2 2 additionally or modifying Bootstrap styles. For themes, please create 3 3 a stylesheet overriding values set here in a file named … … 132 132 } 133 133 134 /* SIRPstuff */134 /* KOFA stuff */ 135 135 136 136 div.actionbar { -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/certificatecoursepage.pt
r7705 r7811 1 <table i18n:domain="waeup. sirp" class="form-table">1 <table i18n:domain="waeup.kofa" class="form-table"> 2 2 <thead> 3 3 </thead> … … 6 6 <td i18n:translate="">Code:</td> 7 7 <td tal:content="context/__name__">CODE</td> 8 </tr> 8 </tr> 9 9 <tr> 10 10 <td i18n:translate="">Course Code:</td> 11 11 <td tal:content="context/getCourseCode">THE COURSE</td> 12 </tr> 12 </tr> 13 13 <tr> 14 14 <td i18n:translate="">Course Title:</td> … … 17 17 <tr> 18 18 <td i18n:translate="">Provided by:</td> 19 <td> 19 <td> 20 20 <span tal:content="python: context.course.__parent__.__parent__.longtitle()">DEPARTMENT</span> 21 21 <br /> 22 22 <span tal:content="python: context.course.__parent__.__parent__.__parent__.longtitle()">FACULTY</span> 23 23 </td> 24 </tr> 24 </tr> 25 25 <tr> 26 26 <td i18n:translate="">Level:</td> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/certificatemanagepage.pt
r7737 r7811 1 1 <form action="." tal:attributes="action request/URL" method="POST" 2 enctype="multipart/form-data" i18n:domain="waeup. sirp">2 enctype="multipart/form-data" i18n:domain="waeup.kofa"> 3 3 4 4 <ul class="tabs" data-tabs="tabs"> … … 7 7 <li tal:attributes="class view/tab3"><a href="#tab-3" i18n:translate="">Local Roles</a></li> 8 8 </ul> 9 9 10 10 <div class="tab-content"> 11 11 <div id="tab-1" tal:attributes="class view/tab1"> … … 136 136 </div> 137 137 </div> 138 </form> 138 </form> 139 139 140 140 -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/certificatepage.pt
r7705 r7811 1 1 <table class="form-table"> 2 2 <thead> 3 </thead> 3 </thead> 4 4 <tbody> 5 5 <tal:block repeat="widget view/widgets"> … … 20 20 <h3> 21 21 <span tal:content="context/__name__">Code</span> 22 <span i18n:domain="waeup. sirp" i18n:translate="">Course Referrers</span>22 <span i18n:domain="waeup.kofa" i18n:translate="">Course Referrers</span> 23 23 </h3> 24 24 <br /> 25 <table i18n:domain="waeup. sirp" class="display dataTable">25 <table i18n:domain="waeup.kofa" class="display dataTable"> 26 26 <thead> 27 27 <tr> … … 49 49 tal:content="cc/course/code"> 50 50 COURSE CODE 51 </a> 51 </a> 52 52 <td> 53 53 <span tal:content="cc/course/title"> … … 59 59 MANDATORY 60 60 </span> 61 </td> 61 </td> 62 62 </tr> 63 63 </tbody> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/configurationmanagepage.pt
r7737 r7811 1 1 <form action="." tal:attributes="action request/URL" method="POST" 2 enctype="multipart/form-data" i18n:domain="waeup. sirp">2 enctype="multipart/form-data" i18n:domain="waeup.kofa"> 3 3 <ul class="tabs" data-tabs="tabs"> 4 4 <li tal:attributes="class view/tab1"> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/contactform.pt
r7464 r7811 3 3 4 4 <tal:block repeat="widget view/widgets"> 5 5 6 6 <div tal:condition="python: widget.name != 'form.body'" 7 7 tal:content="widget/label">Label -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterimport1page.pt
r7705 r7811 1 <h3 i18n:domain="waeup. sirp" i18n:translate="">Step 1</h3>2 <p i18n:domain="waeup. sirp" i18n:translate="">1 <h3 i18n:domain="waeup.kofa" i18n:translate="">Step 1</h3> 2 <p i18n:domain="waeup.kofa" i18n:translate=""> 3 3 Using batch processing you can mass-create, mass-update, or 4 4 mass-remove datasets from the database using CSV files. 5 5 </p> 6 <p i18n:domain="waeup. sirp" i18n:translate="">6 <p i18n:domain="waeup.kofa" i18n:translate=""> 7 7 Please select a file for processing from the list below. 8 8 </p> 9 <form i18n:domain="waeup. sirp" method="POST">9 <form i18n:domain="waeup.kofa" method="POST"> 10 10 <table> 11 11 <thead> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterimport2page.pt
r7705 r7811 1 <h3 i18n:domain="waeup. sirp" i18n:translate="">Step 2</h3>2 <form i18n:domain="waeup. sirp" method="POST">1 <h3 i18n:domain="waeup.kofa" i18n:translate="">Step 2</h3> 2 <form i18n:domain="waeup.kofa" method="POST"> 3 3 <p> 4 4 <b i18n:translate="">File:</b> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterimport3page.pt
r7705 r7811 1 <div i18n:domain="waeup. sirp" i18n:translate=""1 <div i18n:domain="waeup.kofa" i18n:translate="" 2 2 class="alert-message success" tal:condition="not: view/getWarnings"> 3 3 Header fields OK 4 4 </div> 5 5 6 <h3 i18n:domain="waeup. sirp" i18n:translate="">Step 3</h3>7 <form i18n:domain="waeup. sirp">6 <h3 i18n:domain="waeup.kofa" i18n:translate="">Step 3</h3> 7 <form i18n:domain="waeup.kofa"> 8 8 <p i18n:translate=""> 9 9 Eventually modify headerfields of import file below. -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterimport4page.pt
r7705 r7811 1 <h3 i18n:domain="waeup. sirp" i18n:translate="">Step 4</h3>2 <p i18n:domain="waeup. sirp" i18n:translate="">1 <h3 i18n:domain="waeup.kofa" i18n:translate="">Step 4</h3> 2 <p i18n:domain="waeup.kofa" i18n:translate=""> 3 3 Batch processing finished. 4 4 </p> 5 <p i18n:domain="waeup. sirp">5 <p i18n:domain="waeup.kofa"> 6 6 <b i18n:translate="">File:</b> <span tal:content="view/filename">Filename.csv</span> 7 7 </p> 8 <p i18n:domain="waeup. sirp">8 <p i18n:domain="waeup.kofa"> 9 9 <b i18n:translate="">Processor:</b> 10 10 <span tal:content="view/importer/name">Importer Name</span> 11 11 </p> 12 <p i18n:domain="waeup. sirp">12 <p i18n:domain="waeup.kofa"> 13 13 <b i18n:translate="">Processing mode: </b> 14 14 <span tal:content="view/mode">mode</span> 15 15 </p> 16 <form method="POST" i18n:domain="waeup. sirp">16 <form method="POST" i18n:domain="waeup.kofa"> 17 17 <input class="btn primary" type="submit" name="finish" 18 18 tal:attributes="value view/back_button" /> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterlogspage.pt
r7705 r7811 1 <div i18n:domain="waeup. sirp" tal:define="files view/files">1 <div i18n:domain="waeup.kofa" tal:define="files view/files"> 2 2 <p i18n:translate="" tal:condition="not: files"> 3 3 Currently no log files are available. -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacentermanagepage.pt
r7705 r7811 1 <form i18n:domain="waeup. sirp" method="POST">1 <form i18n:domain="waeup.kofa" method="POST"> 2 2 <div> 3 3 <span i18n:translate="">Storage path:</span> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterpage.pt
r7745 r7811 1 <p i18n:domain="waeup. sirp" i18n:translate="">1 <p i18n:domain="waeup.kofa" i18n:translate=""> 2 2 The data center helps you to manage portal data. You can upload CSV 3 3 files here, which will be available for import afterwards. 4 4 </p> 5 5 6 <p i18n:domain="waeup. sirp">6 <p i18n:domain="waeup.kofa"> 7 7 <b i18n:translate="">Storage path:</b> 8 8 <span tal:content="context/storage">/foo/bar</span> 9 9 </p> 10 10 11 <table i18n:domain="waeup. sirp">11 <table i18n:domain="waeup.kofa"> 12 12 <thead> 13 13 <tr> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/departmentmanagepage.pt
r7737 r7811 1 1 <form action="." tal:attributes="action request/URL" method="POST" 2 i18n:domain="waeup. sirp" enctype="multipart/form-data">2 i18n:domain="waeup.kofa" enctype="multipart/form-data"> 3 3 <ul class="tabs" data-tabs="tabs"> 4 4 <li tal:attributes="class view/tab1"> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/departmentpage.pt
r7707 r7811 1 <ul i18n:domain="waeup. sirp" class="tabs" data-tabs="tabs">1 <ul i18n:domain="waeup.kofa" class="tabs" data-tabs="tabs"> 2 2 <li class="active"><a href="#tab-1"> 3 3 <span i18n:translate="">Courses</span></a> … … 7 7 </li> 8 8 </ul> 9 <div i18n:domain="waeup. sirp" class="tab-content">9 <div i18n:domain="waeup.kofa" class="tab-content"> 10 10 <div id="tab-1" class="active"> 11 <br /> 11 <br /> 12 12 <table class="display dataTable"> 13 13 <thead> … … 26 26 <td tal:content="entry/container/title"> 27 27 Title 28 </td> 28 </td> 29 29 </tr> 30 30 </tbody> 31 31 </table> 32 32 <br /><br /> 33 </div> 33 </div> 34 34 <div id="tab-2"> 35 35 <br /> … … 50 50 <td tal:content="entry/container/title"> 51 51 Title 52 </td> 52 </td> 53 53 </tr> 54 54 </tbody> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/facultymanagepage.pt
r7737 r7811 1 1 <form action="." tal:attributes="action request/URL" 2 i18n:domain="waeup. sirp" method="POST" enctype="multipart/form-data">2 i18n:domain="waeup.kofa" method="POST" enctype="multipart/form-data"> 3 3 <ul class="tabs" data-tabs="tabs"> 4 4 <li tal:attributes="class view/tab1"> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/facultypage.pt
r7707 r7811 1 <div i18n:domain="waeup. sirp" i18n:translate="" tal:condition="python: not len(context.keys())">1 <div i18n:domain="waeup.kofa" i18n:translate="" tal:condition="python: not len(context.keys())"> 2 2 There no subobjects registered yet. 3 3 </div> 4 4 5 <table i18n:domain="waeup. sirp">5 <table i18n:domain="waeup.kofa"> 6 6 <thead> 7 7 <tr> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/loginpage.pt
r7707 r7811 1 <form i18n:domain="waeup. sirp" method="post">1 <form i18n:domain="waeup.kofa" method="post"> 2 2 <table id="login" class="form-table" summary="Table for entering login information"> 3 3 <tbody> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/myrolespage.pt
r7707 r7811 1 <h3 i18n:domain="waeup. sirp"1 <h3 i18n:domain="waeup.kofa" 2 2 i18n:translate="">My Portal Roles:</h3> 3 <table i18n:domain="waeup. sirp" class="form-table">3 <table i18n:domain="waeup.kofa" class="form-table"> 4 4 <tr tal:repeat="role view/getSiteRoles"> 5 5 <td> … … 9 9 </table> 10 10 11 <h3 i18n:domain="waeup. sirp"11 <h3 i18n:domain="waeup.kofa" 12 12 i18n:translate="">My Local Roles:</h3> 13 13 <table class="form-table"> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/notfound.pt
r7707 r7811 1 <h2 i18n:domain="waeup. sirp" i18n:translate="">1 <h2 i18n:domain="waeup.kofa" i18n:translate=""> 2 2 The page you are trying to access is not available. 3 3 </h2> 4 4 5 <div i18n:domain="waeup. sirp">5 <div i18n:domain="waeup.kofa"> 6 6 <b i18n:translate="">Please note the following:</b></div> 7 <div i18n:domain="waeup. sirp">7 <div i18n:domain="waeup.kofa"> 8 8 <ol class="list"> 9 9 <li i18n:translate=""> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/searchpage.pt
r7707 r7811 6 6 </form> 7 7 <br /> 8 <span i18n:domain="waeup. sirp" tal:condition="view/hitlist">8 <span i18n:domain="waeup.kofa" tal:condition="view/hitlist"> 9 9 <h3 i18n:translate="">Search Results</h3> 10 10 <table class="display dataTable"> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/showstudentspage.pt
r7707 r7811 1 <table i18n:domain="waeup. sirp" class="display dataTable">1 <table i18n:domain="waeup.kofa" class="display dataTable"> 2 2 <thead> 3 3 <tr> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/staffsitelayout.pt
r7707 r7811 1 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" i18n:domain="waeup. sirp">2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" i18n:domain="waeup.kofa"> 3 3 <head> 4 4 <title>WAeUP - your way up -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/studentsitelayout.pt
r7707 r7811 1 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml" i18n:domain="waeup. sirp">2 <html xmlns="http://www.w3.org/1999/xhtml" i18n:domain="waeup.kofa"> 3 3 <head> 4 4 <title>WAeUP - your way up … … 10 10 <meta name="viewport" content="width=320, initial-scale=1, maximum-scale=1"/> 11 11 <link rel="stylesheet" media="only screen and (max-device-width: 480px)" 12 tal:attributes="href python: view.url(layout.site, '@@/waeup. sirp.browser/mobile.css')"12 tal:attributes="href python: view.url(layout.site, '@@/waeup.kofa.browser/mobile.css')" 13 13 type="text/css" /> 14 14 <link rel="shortcut icon" tal:attributes="href static/favicon.ico" type="image/x-icon" /> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/universityrss20feed.pt
r4989 r7811 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <rss version="2.0" 3 xmlns:tal="http://xml.zope.org/namespaces/tal" 2 <rss version="2.0" 3 xmlns:tal="http://xml.zope.org/namespaces/tal" 4 4 xmlns:atom="http://www.w3.org/2005/Atom"> 5 5 <channel> 6 6 <title> 7 7 <tal:block tal:content="view/title"/> 8 <tal:block 9 tal:define="title view/contexttitle" 8 <tal:block 9 tal:define="title view/contexttitle" 10 10 tal:condition="title"> - <tal:block content="title"/> 11 11 </tal:block> … … 16 16 tal:content="view/description"></description> 17 17 <language 18 tal:condition="view/language" 18 tal:condition="view/language" 19 19 tal:content="view/language"></language> 20 20 <pubDate 21 tal:condition="view/date" 21 tal:condition="view/date" 22 22 tal:content="view/date"></pubDate> 23 23 <lastBuildDate 24 tal:condition="view/buildDate" 24 tal:condition="view/buildDate" 25 25 tal:content="view/buildDate"></lastBuildDate> 26 26 <managingEditor 27 tal:condition="view/editor" 27 tal:condition="view/editor" 28 28 tal:content="view/editor"></managingEditor> 29 29 <webMaster 30 tal:condition="view/webmaster" 30 tal:condition="view/webmaster" 31 31 tal:content="view/webmaster"></webMaster> 32 32 <atom:link 33 tal:attributes="href string:${view/link}@@feeds/${view/name}" 33 tal:attributes="href string:${view/link}@@feeds/${view/name}" 34 34 rel="self" type="application/rss+xml" /> 35 35 <item … … 40 40 tal:content="item/description"></description> 41 41 <guid 42 tal:content="item/guid" 42 tal:content="item/guid" 43 43 tal:define="isPermaLink item/isPermaLink|nothing" 44 44 tal:attributes="isPermaLink python:isPermaLink and 'true' or 'false'"></guid> 45 45 <link 46 tal:condition="item/link|nothing" 46 tal:condition="item/link|nothing" 47 47 tal:content="item/link"></link> 48 48 <author 49 tal:condition="item/author|nothing" 49 tal:condition="item/author|nothing" 50 50 tal:content="item/author"></author> 51 51 <category 52 tal:condition="item/category|nothing" 52 tal:condition="item/category|nothing" 53 53 tal:content="item/category"></category> 54 54 <pubDate 55 tal:condition="item/pubDate|nothing" 55 tal:condition="item/pubDate|nothing" 56 56 tal:content="item/pubDate"></pubDate> 57 57 </item> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/usereditformpage.pt
r7737 r7811 1 1 <form action="." tal:attributes="action request/URL" method="post" 2 i18n:domain="waeup. sirp" enctype="multipart/form-data">2 i18n:domain="waeup.kofa" enctype="multipart/form-data"> 3 3 4 4 <table class="form-table"> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/userscontainerpage.pt
r7745 r7811 1 <table i18n:domain="waeup. sirp">1 <table i18n:domain="waeup.kofa"> 2 2 <thead> 3 3 <tr> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_captcha.py
r7312 r7811 21 21 from zope.interface import verify 22 22 from zope.publisher.browser import TestRequest 23 from waeup. sirp.testing import FunctionalLayer, FunctionalTestCase24 from waeup. sirp.browser.captcha import (23 from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase 24 from waeup.kofa.browser.captcha import ( 25 25 CaptchaResponse, CaptchaRequest, NullCaptcha, StaticCaptcha, ReCaptcha, 26 26 CaptchaManager) 27 from waeup. sirp.browser.interfaces import (27 from waeup.kofa.browser.interfaces import ( 28 28 ICaptchaRequest, ICaptchaResponse, ICaptcha, ICaptchaConfig, 29 29 ICaptchaManager) -
main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_doctests.py
r7195 r7811 18 18 """Setup doctests for browser module. 19 19 """ 20 from waeup. sirp.testing import get_doctest_suite20 from waeup.kofa.testing import get_doctest_suite 21 21 22 22 def test_suite(): -
main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_permissions.py
r7195 r7811 31 31 from zope.security.interfaces import Unauthorized 32 32 from zope.testbrowser.testing import Browser 33 from waeup. sirp.app import University34 from waeup. sirp.testing import (33 from waeup.kofa.app import University 34 from waeup.kofa.testing import ( 35 35 FunctionalLayer, FunctionalTestCase, get_all_loggers, remove_new_loggers, 36 36 remove_logger) -
main/waeup.kofa/trunk/src/waeup/kofa/browser/theming.py
r7459 r7811 23 23 from zope.interface import Interface 24 24 from zope.schema.interfaces import IVocabularyFactory 25 from waeup. sirp.interfaces import SimpleSIRPVocabulary26 from waeup. sirp.browser.interfaces import ITheme27 from waeup. sirp.browser.resources import (25 from waeup.kofa.interfaces import SimpleKOFAVocabulary 26 from waeup.kofa.browser.interfaces import ITheme 27 from waeup.kofa.browser.resources import ( 28 28 waeuptheme_empty, waeup_base_css, 29 29 ) 30 30 31 class SIRPThemeBase(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 SIRPThemeRed1(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 SIRPThemeGray1(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 SIRPThemeEmpty(grok.GlobalUtility):58 class KOFAThemeEmpty(grok.GlobalUtility): 59 59 """A theme based on jQuery only. 60 60 … … 87 87 and registered under the name 88 88 89 'waeup. sirp.browser.theming.ThemesVocabulary'89 'waeup.kofa.browser.theming.ThemesVocabulary' 90 90 91 91 Interface fields that wish to provide a list of available themes 92 92 can require a 'named vocabulary', i.e. set: 93 93 94 vocabulary = 'waeup. sirp.browser.theming.ThemesVocabulary'94 vocabulary = 'waeup.kofa.browser.theming.ThemesVocabulary' 95 95 96 96 and the vocabulary will deliver themes and their descriptive text … … 101 101 """ 102 102 grok.implements(IVocabularyFactory) 103 grok.name('waeup. sirp.browser.theming.ThemesVocabulary')103 grok.name('waeup.kofa.browser.theming.ThemesVocabulary') 104 104 105 105 def __call__(self, context): … … 112 112 terms = [(theme.description, name) 113 113 for name, theme in get_all_themes()] 114 vocab = Simple SIRPVocabulary(*terms)114 vocab = SimpleKOFAVocabulary(*terms) 115 115 return vocab -
main/waeup.kofa/trunk/src/waeup/kofa/browser/viewlets.py
r7736 r7811 23 23 from zope.location.interfaces import ISite 24 24 from zope.traversing.browser import absoluteURL 25 from waeup. sirp.browser.pages import (25 from waeup.kofa.browser.pages import ( 26 26 UniversityPage, FacultiesContainerPage, DatacenterPage, FacultyPage, 27 27 DepartmentPage, CoursePage, CertificatePage, CertificateCoursePage, 28 28 UsersContainerPage, UserManageFormPage) 29 from waeup. sirp.browser.interfaces import (29 from waeup.kofa.browser.interfaces import ( 30 30 IFacultiesContainer, IFaculty, IDepartment, ICourse, ICertificate, 31 31 ICertificateCourse, IBreadcrumbContainer, IUniversity, IUsersContainer) 32 from waeup. sirp.interfaces import (33 I SIRPUtils, ISIRPObject, ISIRPXMLExporter,34 I SIRPXMLImporter, IDataCenter, IUserAccount)35 from waeup. sirp.browser.layout import SIRPPage, default_primary_nav_template36 from waeup. sirp.utils.helpers import get_user_account37 38 from waeup. sirp.interfaces import MessageFactory as _32 from waeup.kofa.interfaces import ( 33 IKOFAUtils, IKOFAObject, IKOFAXMLExporter, 34 IKOFAXMLImporter, IDataCenter, IUserAccount) 35 from waeup.kofa.browser.layout import KOFAPage, default_primary_nav_template 36 from waeup.kofa.utils.helpers import get_user_account 37 38 from waeup.kofa.interfaces import MessageFactory as _ 39 39 40 40 grok.templatedir('templates') 41 grok.context(I SIRPObject) # Make ISIRPObject 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(I SIRPObject)87 grok.context(IKOFAObject) 88 88 grok.viewletmanager(ActionBar) 89 89 icon = 'actionicon_modify.png' # File must exist in static/ … … 126 126 # local to the derived class' module. As we often like to 127 127 # get the icons from here 128 # (i.e. waeup. sirp.browser/static), we set the directory128 # (i.e. waeup.kofa.browser/static), we set the directory 129 129 # resource appropiately. 130 130 # … … 134 134 # TODO: notes in here should go to general documentation. 135 135 static = queryAdapter( 136 self.request, Interface, name='waeup. sirp.browser')136 self.request, Interface, name='waeup.kofa.browser') 137 137 return static[self.icon]() 138 138 … … 196 196 197 197 class BreadCrumbs(grok.Viewlet): 198 grok.context(I SIRPObject)198 grok.context(IKOFAObject) 199 199 grok.viewletmanager(BreadCrumbManager) 200 200 grok.order(1) … … 216 216 """ 217 217 grok.viewletmanager(LanguageManager) 218 grok.context(I SIRPObject)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(I SIRPUtils).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(I SIRPObject)259 grok.context(IKOFAObject) 260 260 grok.order(5) 261 261 grok.require('waeup.manageUniversity') … … 278 278 # local to the derived class' module. As we often like to 279 279 # get the icons from here 280 # (i.e. waeup. sirp.browser/static), we set the directory280 # (i.e. waeup.kofa.browser/static), we set the directory 281 281 # resource appropiately. 282 282 # … … 286 286 # TODO: notes in here should go to general documentation. 287 287 static = queryAdapter( 288 self.request, Interface, name='waeup. sirp.browser')288 self.request, Interface, name='waeup.kofa.browser') 289 289 return static[self.icon]() 290 290 return … … 310 310 311 311 # 312 # waeup. sirp.app.University viewlets...312 # waeup.kofa.app.University viewlets... 313 313 # 314 314 class Login(grok.Viewlet): … … 316 316 """ 317 317 grok.viewletmanager(LeftSidebar) 318 grok.context(I SIRPObject)318 grok.context(IKOFAObject) 319 319 grok.view(Interface) 320 320 grok.order(2) … … 350 350 """ 351 351 grok.viewletmanager(LeftSidebar) 352 grok.context(I SIRPObject)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(I SIRPObject)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 SIRP.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.