- Timestamp:
- 13 Nov 2014, 14:40:27 (10 years ago)
- Location:
- main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba
- Files:
-
- 42 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/__init__.py
r9928 r11949 1 1 import os 2 2 3 #from waeup. kofa.browser.layout import (4 # KofaPage, KofaForm, KofaLayout, KofaDisplayFormPage, KofaEditFormPage,5 # KofaAddFormPage, NullValidator)6 #from waeup. kofa.browser.pages import ContactAdminForm3 #from waeup.ikoba.browser.layout import ( 4 # IkobaPage, IkobaForm, IkobaLayout, IkobaDisplayFormPage, IkobaEditFormPage, 5 # IkobaAddFormPage, NullValidator) 6 #from waeup.ikoba.browser.pages import ContactAdminForm 7 7 8 8 IMAGE_PATH = os.path.join( -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/async.py
r11254 r11949 2 2 from zc.async.interfaces import COMPLETED, NEW 3 3 from zope.interface import Interface 4 from waeup. kofa.async import IJob, IJobManager5 from waeup. kofa.browser.layout import KofaPage6 from waeup. kofa.interfaces import IKofaObject, IDataCenter7 from waeup. kofa.interfaces import MessageFactory as _4 from waeup.ikoba.async import IJob, IJobManager 5 from waeup.ikoba.browser.layout import IkobaPage 6 from waeup.ikoba.interfaces import IIkobaObject, IDataCenter 7 from waeup.ikoba.interfaces import MessageFactory as _ 8 8 9 9 grok.templatedir('templates') 10 grok.context(I KofaObject)10 grok.context(IIkobaObject) 11 11 12 12 loadingbar_template = ''' … … 97 97 98 98 99 class JobManagerView( KofaPage):99 class JobManagerView(IkobaPage): 100 100 """The main view for the job container. 101 101 """ -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/batchprocessing.txt
r11947 r11949 21 21 Create a site: 22 22 23 >>> from waeup. kofa.app import University23 >>> from waeup.ikoba.app import University 24 24 >>> getRootFolder()['app'] = University() 25 25 >>> from zope.component.hooks import setSite -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/breadcrumbs.py
r11947 r11949 23 23 from zope.publisher.browser import TestRequest 24 24 25 from waeup. kofa.interfaces import (25 from waeup.ikoba.interfaces import ( 26 26 IConfigurationContainer, ISessionConfiguration, IExportJobContainer) 27 from waeup. kofa.interfaces import MessageFactory as _28 from waeup. kofa.browser.interfaces import (29 IBreadcrumb, IBreadcrumbIgnorable, IBreadcrumbContainer, I KofaObject,27 from waeup.ikoba.interfaces import MessageFactory as _ 28 from waeup.ikoba.browser.interfaces import ( 29 IBreadcrumb, IBreadcrumbIgnorable, IBreadcrumbContainer, IIkobaObject, 30 30 IUniversity, IUsersContainer, IDataCenter, 31 31 ) 32 from waeup. kofa.reports import IReportsContainer32 from waeup.ikoba.reports import IReportsContainer 33 33 34 34 class Breadcrumb(grok.Adapter): … … 36 36 """ 37 37 grok.provides(IBreadcrumb) 38 grok.context(I KofaObject)38 grok.context(IIkobaObject) 39 39 grok.name('index') 40 40 -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/breadcrumbs.txt
r7811 r11949 11 11 We create a university to check the breadcrumb functionality. 12 12 13 >>> from waeup. kofa.app import University13 >>> from waeup.ikoba.app import University 14 14 >>> root = getRootFolder() 15 15 >>> root['app'] = University() … … 22 22 viewname: 23 23 24 >>> from waeup. kofa.browser.breadcrumbs import getBreadcrumbList24 >>> from waeup.ikoba.browser.breadcrumbs import getBreadcrumbList 25 25 >>> blist1 = getBreadcrumbList(app, 'index') 26 26 >>> blist1 27 [<waeup. kofa.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>]27 [<waeup.ikoba.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. 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...>]34 [<waeup.ikoba.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>, 35 <waeup.ikoba.browser.breadcrumbs.AdministrationBreadcrumb object at 0x...>, 36 <waeup.ikoba.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. 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')]49 [(<waeup.ikoba.app.University object at 0x...>, 'index'), 50 (<waeup.ikoba.app.University object at 0x...>, 'administration'), 51 (<waeup.ikoba.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. kofa.browser.breadcrumbs import getBreadcrumbListForView91 >>> from waeup.ikoba.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. kofa.browser.interfaces import IBreadcrumbContainer111 >>> from waeup.ikoba.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. kofa.browser.interfaces import IBreadcrumb133 >>> from waeup.ikoba.browser.interfaces import IBreadcrumb 134 134 >>> b1 = getAdapter(app, IBreadcrumb, 'index') 135 135 >>> b1 136 <waeup. kofa.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>136 <waeup.ikoba.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. kofa.browser.breadcrumbs.DataCenterBreadcrumb object at 0x...>158 <waeup.ikoba.browser.breadcrumbs.DataCenterBreadcrumb object at 0x...> 159 159 160 160 >>> b2.title … … 168 168 169 169 >>> b2.parent 170 (<waeup. kofa.app.University object at 0x...>, 'administration')170 (<waeup.ikoba.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. kofa...breadcrumbs.AdministrationBreadcrumb object at 0x...>186 <waeup.ikoba...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. kofa.app.University object at 0x...>, 'index')199 (<waeup.ikoba.app.University object at 0x...>, 'index') 200 200 201 201 We create last breadcrumb: -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/browser.txt
r11947 r11949 1 Browsing Kofa1 Browsing Ikoba 2 2 ************* 3 3 4 Here we visit all parts of a Kofa portal using a browser.4 Here we visit all parts of a Ikoba portal using a browser. 5 5 6 6 University … … 15 15 [] 16 16 17 >>> from waeup. kofa.app import University17 >>> from waeup.ikoba.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. Kofa...37 ...Welcome to WAeUP.Ikoba... 38 38 ... 39 39 … … 123 123 >>> print browser.contents 124 124 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"... 125 ...<h1>Welcome to WAeUP. Kofa...</h1>125 ...<h1>Welcome to WAeUP.Ikoba...</h1> 126 126 ... 127 127 … … 137 137 >>> print browser.contents 138 138 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"... 139 ...<h1>Willkommen auf WAeUP. Kofa...</h1>139 ...<h1>Willkommen auf WAeUP.Ikoba...</h1> 140 140 ... 141 141 -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/captcha.py
r11254 r11949 28 28 from zope.interface import Interface 29 29 from zope.publisher.interfaces.http import IHTTPRequest 30 from waeup. kofa.browser.layout import KofaPage31 from waeup. kofa.browser.interfaces import (30 from waeup.ikoba.browser.layout import IkobaPage 31 from waeup.ikoba.browser.interfaces import ( 32 32 ICaptchaRequest, ICaptchaResponse, ICaptcha, ICaptchaConfig, 33 33 ICaptchaManager) 34 from waeup. kofa.interfaces import IUniversity34 from waeup.ikoba.interfaces import IUniversity 35 35 36 36 # … … 171 171 """ReCaptcha - strong captchas with images, sound, etc. 172 172 173 This is the Kofa implementation to support captchas as provided by173 This is the Ikoba 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 Kofa",268 "User-agent": "reCAPTCHA Python Ikoba", 269 269 } 270 270 ) … … 319 319 320 320 321 class CaptchaTestPage( KofaPage):321 class CaptchaTestPage(IkobaPage): 322 322 # A test page to see a captcha in action 323 323 grok.name('captcha') -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/exceptions.py
r7819 r11949 22 22 from zope.publisher.interfaces import INotFound 23 23 from zope.security.interfaces import IUnauthorized 24 from waeup. kofa.browser.layout import KofaPage24 from waeup.ikoba.browser.layout import IkobaPage 25 25 26 26 grok.templatedir('templates') … … 61 61 62 62 63 class NotFoundPage( KofaPage):63 class NotFoundPage(IkobaPage): 64 64 """A page rendered when an object cannot be found. 65 65 -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/interfaces.py
r11947 r11949 20 20 from zope import schema 21 21 from zope.interface import Interface, Attribute 22 from waeup. kofa.interfaces import (23 I KofaObject, IUniversity, IUsersContainer, IDataCenter, validate_email)24 from waeup. kofa.interfaces import MessageFactory as _22 from waeup.ikoba.interfaces import ( 23 IIkobaObject, IUniversity, IUsersContainer, IDataCenter, validate_email) 24 from waeup.ikoba.interfaces import MessageFactory as _ 25 25 26 26 class IBreadcrumb(Interface): … … 166 166 """ 167 167 168 class IChangePassword(I KofaObject):168 class IChangePassword(IIkobaObject): 169 169 """Interface needed for change pasword page. 170 170 -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/layout.py
r11947 r11949 32 32 from zope.interface import Interface 33 33 from zope.site.hooks import getSite 34 from waeup. kofa.interfaces import IKofaObject, IUserAccount, IKofaUtils35 from waeup. kofa.interfaces import MessageFactory as _36 from waeup. kofa.utils.helpers import to_timezone37 from waeup. kofa.authentication import get_principal_role_manager34 from waeup.ikoba.interfaces import IIkobaObject, IUserAccount, IIkobaUtils 35 from waeup.ikoba.interfaces import MessageFactory as _ 36 from waeup.ikoba.utils.helpers import to_timezone 37 from waeup.ikoba.authentication import get_principal_role_manager 38 38 39 39 grok.templatedir('templates') … … 61 61 62 62 def __call__(self, success): 63 action = KofaAction(self.label, success=success, **self.options)63 action = IkobaAction(self.label, success=success, **self.options) 64 64 self.actions.append(action) 65 65 return action 66 66 67 class KofaAction(Action):67 class IkobaAction(Action): 68 68 69 69 def __init__(self, label, style='', tooltip='', warning='', **options): 70 super( KofaAction, self).__init__(label, **options)70 super(IkobaAction, self).__init__(label, **options) 71 71 self.style = style 72 72 self.tooltip = tooltip … … 102 102 103 103 def __call__(self, success): 104 action = KofaAction(self.label,104 action = IkobaAction(self.label, 105 105 success=success, warning=self.msg, 106 106 **self.options) … … 160 160 return True 161 161 162 class KofaLayout(UtilityView,Layout):162 class IkobaLayout(UtilityView,Layout): 163 163 """A megrok.layout.Layout with additional methods. 164 164 """ 165 165 grok.baseclass() 166 166 167 class KofaForm(UtilityView,Form):167 class IkobaForm(UtilityView,Form): 168 168 """A megrok.layout.Form with additional methods. 169 169 """ … … 171 171 172 172 def setUpWidgets(self,ignore_request=False): 173 super( KofaForm,self).setUpWidgets(ignore_request)173 super(IkobaForm,self).setUpWidgets(ignore_request) 174 174 # Width parameters will be overridden by Bootstrap 175 175 # so we have to set the css class … … 177 177 self.widgets['body'].height = 10 178 178 179 class KofaPage(UtilityView,Page):179 class IkobaPage(UtilityView,Page): 180 180 """A megrok.layout page with additional methods. 181 181 """ 182 182 grok.baseclass() 183 183 184 class KofaDisplayFormPage(UtilityView,DisplayForm):184 class IkobaDisplayFormPage(UtilityView,DisplayForm): 185 185 """A megrok.layout.DisplayForm with additional methods. 186 186 """ … … 189 189 hide_hint = True 190 190 191 class KofaEditFormPage(UtilityView,EditForm):191 class IkobaEditFormPage(UtilityView,EditForm): 192 192 """A megrok.layout.EditForm with additional methods. 193 193 """ … … 196 196 197 197 def setUpWidgets(self,ignore_request=False): 198 super( KofaEditFormPage,self).setUpWidgets(ignore_request)198 super(IkobaEditFormPage,self).setUpWidgets(ignore_request) 199 199 for widget in self.widgets: 200 200 if 'address' in widget.name or \ … … 207 207 self.widgets['jamb_subjects'].height = 6 208 208 209 class KofaAddFormPage(UtilityView,AddForm):209 class IkobaAddFormPage(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( KofaLayout):215 class SiteLayout(IkobaLayout): 216 216 """ The general site layout. 217 217 """ 218 grok.context(I KofaObject)218 grok.context(IIkobaObject) 219 219 220 220 #: An instance of the default theme to use for the site layout … … 260 260 def formatDatetime(self,datetimeobj): 261 261 if isinstance(datetimeobj, datetime): 262 tz = getUtility(I KofaUtils).tzinfo262 tz = getUtility(IIkobaUtils).tzinfo 263 263 try: 264 264 timestamp = to_timezone( … … 278 278 def formatTZDate(self,datetimeobj): 279 279 if isinstance(datetimeobj, datetime): 280 tz = getUtility(I KofaUtils).tzinfo280 tz = getUtility(IIkobaUtils).tzinfo 281 281 date = to_timezone( 282 282 datetimeobj, tz).strftime("%d/%m/%Y") -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/pages.py
r11947 r11949 16 16 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 17 ## 18 """ Viewing components for Kofa objects.18 """ Viewing components for Ikoba objects. 19 19 """ 20 20 # XXX: All csv ops should move to a dedicated module soon … … 42 42 from zope.session.interfaces import ISession 43 43 from zope.password.interfaces import IPasswordManager 44 from waeup. kofa.browser.layout import (45 KofaPage, KofaForm, KofaEditFormPage, KofaAddFormPage,46 KofaDisplayFormPage, NullValidator)47 from waeup. kofa.browser.interfaces import (44 from waeup.ikoba.browser.layout import ( 45 IkobaPage, IkobaForm, IkobaEditFormPage, IkobaAddFormPage, 46 IkobaDisplayFormPage, NullValidator) 47 from waeup.ikoba.browser.interfaces import ( 48 48 IUniversity, ICaptchaManager, IChangePassword) 49 from waeup. kofa.browser.layout import jsaction, action, UtilityView50 from waeup. kofa.interfaces import MessageFactory as _51 from waeup. kofa.interfaces import(52 I KofaObject, IUsersContainer, IUserAccount, IDataCenter,53 I KofaXMLImporter, IKofaXMLExporter, IBatchProcessor,49 from waeup.ikoba.browser.layout import jsaction, action, UtilityView 50 from waeup.ikoba.interfaces import MessageFactory as _ 51 from waeup.ikoba.interfaces import( 52 IIkobaObject, IUsersContainer, IUserAccount, IDataCenter, 53 IIkobaXMLImporter, IIkobaXMLExporter, IBatchProcessor, 54 54 ILocalRolesAssignable, DuplicationError, IConfigurationContainer, 55 55 ISessionConfiguration, ISessionConfigurationAdd, IJobManager, 56 IPasswordValidator, IContactForm, I KofaUtils, ICSVExporter,56 IPasswordValidator, IContactForm, IIkobaUtils, ICSVExporter, 57 57 application_sessions_vocab) 58 from waeup. kofa.permissions import (58 from waeup.ikoba.permissions import ( 59 59 get_users_with_local_roles, get_all_roles, get_all_users, 60 60 get_users_with_role) 61 61 62 from waeup. kofa.authentication import LocalRoleSetEvent63 from waeup. kofa.widgets.htmlwidget import HTMLDisplayWidget64 from waeup. kofa.utils.helpers import get_user_account, check_csv_charset65 from waeup. kofa.mandates.mandate import PasswordMandate66 from waeup. kofa.datacenter import DataCenterFile62 from waeup.ikoba.authentication import LocalRoleSetEvent 63 from waeup.ikoba.widgets.htmlwidget import HTMLDisplayWidget 64 from waeup.ikoba.utils.helpers import get_user_account, check_csv_charset 65 from waeup.ikoba.mandates.mandate import PasswordMandate 66 from waeup.ikoba.datacenter import DataCenterFile 67 67 68 68 FORBIDDEN_CHARACTERS = (160,) 69 69 70 grok.context(I KofaObject)70 grok.context(IIkobaObject) 71 71 grok.templatedir('templates') 72 72 … … 81 81 role_manager.assignRoleToPrincipal(localrole, user) 82 82 notify(LocalRoleSetEvent(view.context, localrole, user, granted=True)) 83 ob_class = view.__implemented__.__name__.replace('waeup. kofa.','')83 ob_class = view.__implemented__.__name__.replace('waeup.ikoba.','') 84 84 grok.getSite().logger.info( 85 85 '%s - added: %s|%s' % (ob_class, user, localrole)) … … 113 113 _('Local role successfully removed: ${a}', 114 114 mapping = {'a':', '.join(deleted)})) 115 ob_class = view.__implemented__.__name__.replace('waeup. kofa.','')115 ob_class = view.__implemented__.__name__.replace('waeup.ikoba.','') 116 116 grok.getSite().logger.info( 117 117 '%s - removed: %s' % (ob_class, ', '.join(deleted))) … … 147 147 view.flash(_('Successfully removed: ${a}', 148 148 mapping = {'a': ', '.join(deleted)})) 149 ob_class = view.__implemented__.__name__.replace('waeup. kofa.','')149 ob_class = view.__implemented__.__name__.replace('waeup.ikoba.','') 150 150 grok.getSite().logger.info( 151 151 '%s - removed: %s' % (ob_class, ', '.join(deleted))) … … 188 188 fields_string = ' + '.join(changed_fields) 189 189 view.flash(_('Form has been saved.')) 190 ob_class = view.__implemented__.__name__.replace('waeup. kofa.','')190 ob_class = view.__implemented__.__name__.replace('waeup.ikoba.','') 191 191 if fields_string: 192 192 grok.getSite().logger.info('%s - %s - saved: %s' % (ob_class, view.context.__name__, fields_string)) … … 210 210 time_delta = None 211 211 if start_time: 212 tz = getUtility(I KofaUtils).tzinfo212 tz = getUtility(IIkobaUtils).tzinfo 213 213 time_delta = datetime.now(tz) - start_time 214 214 start_time = start_time.astimezone(tz).strftime( … … 252 252 # 253 253 254 class LoginPage( KofaPage):254 class LoginPage(IkobaPage): 255 255 """A login page, available for all objects. 256 256 """ 257 257 grok.name('login') 258 grok.context(I KofaObject)258 grok.context(IIkobaObject) 259 259 grok.require('waeup.Public') 260 260 label = _(u'Login') … … 288 288 289 289 290 class LogoutPage( KofaPage):290 class LogoutPage(IkobaPage): 291 291 """A logout page. Calling this page will log the current user out. 292 292 """ 293 grok.context(I KofaObject)293 grok.context(IIkobaObject) 294 294 grok.require('waeup.Public') 295 295 grok.name('logout') … … 299 299 auth = getUtility(IAuthentication) 300 300 ILogout(auth).logout(self.request) 301 self.flash(_("You have been logged out. Thanks for using WAeUP Kofa!"))301 self.flash(_("You have been logged out. Thanks for using WAeUP Ikoba!")) 302 302 self.redirect(self.application_url() + '/index') 303 303 return 304 304 305 305 306 class LanguageChangePage( KofaPage):306 class LanguageChangePage(IkobaPage): 307 307 """ Language switch 308 308 """ 309 grok.context(I KofaObject)309 grok.context(IIkobaObject) 310 310 grok.name('change_language') 311 311 grok.require('waeup.Public') 312 312 313 313 def update(self, lang='en', view_name='@@index'): 314 self.response.setCookie(' kofa.language', lang, path='/')314 self.response.setCookie('ikoba.language', lang, path='/') 315 315 self.redirect(self.url(self.context, view_name)) 316 316 return … … 323 323 # 324 324 325 class ContactAdminForm( KofaForm):325 class ContactAdminForm(IkobaForm): 326 326 grok.name('contactadmin') 327 327 #grok.context(IUniversity) … … 357 357 usertype = getattr(self.request.principal, 358 358 'user_type', 'system').title() 359 kofa_utils = getUtility(IKofaUtils)360 success = kofa_utils.sendContactForm(359 ikoba_utils = getUtility(IIkobaUtils) 360 success = ikoba_utils.sendContactForm( 361 361 fullname,email, 362 362 self.config.name_admin,self.config.email_admin, … … 392 392 # No need to flash something. 393 393 return 394 kofa_utils = getUtility(IKofaUtils)395 success = kofa_utils.sendContactForm(394 ikoba_utils = getUtility(IIkobaUtils) 395 success = ikoba_utils.sendContactForm( 396 396 data['fullname'],data['email_from'], 397 397 self.config.name_admin,self.config.email_admin, … … 408 408 # 409 409 410 class UniversityPage( KofaDisplayFormPage):410 class UniversityPage(IkobaDisplayFormPage): 411 411 """ The main university page. 412 412 """ … … 419 419 @property 420 420 def frontpage(self): 421 lang = self.request.cookies.get(' kofa.language')421 lang = self.request.cookies.get('ikoba.language') 422 422 html = self.context['configuration'].frontpage_dict.get(lang,'') 423 423 if html =='': 424 portal_language = getUtility(I KofaUtils).PORTAL_LANGUAGE424 portal_language = getUtility(IIkobaUtils).PORTAL_LANGUAGE 425 425 html = self.context[ 426 426 'configuration'].frontpage_dict.get(portal_language,'') 427 427 if html =='': 428 return _(u'<h1>Welcome to WAeUP. Kofa</h1>')428 return _(u'<h1>Welcome to WAeUP.Ikoba</h1>') 429 429 else: 430 430 return html 431 431 432 class AdministrationPage( KofaPage):432 class AdministrationPage(IkobaPage): 433 433 """ The administration overview page. 434 434 """ … … 448 448 449 449 name = 'General news feed' 450 description = 'waeup. kofa now supports RSS 2.0 feeds :-)'450 description = 'waeup.ikoba now supports RSS 2.0 feeds :-)' 451 451 language = None 452 452 date = None … … 477 477 # 478 478 479 class UsersContainerPage( KofaPage):479 class UsersContainerPage(IkobaPage): 480 480 """Overview page for all local users. 481 481 """ … … 494 494 self.flash(_('User account ${a} successfully deleted.', 495 495 mapping = {'a': userid})) 496 ob_class = self.__implemented__.__name__.replace('waeup. kofa.','')496 ob_class = self.__implemented__.__name__.replace('waeup.ikoba.','') 497 497 self.context.__parent__.logger.info( 498 498 '%s - removed: %s' % (ob_class, userid)) … … 521 521 return site_roles_string 522 522 523 class AddUserFormPage( KofaAddFormPage):523 class AddUserFormPage(IkobaAddFormPage): 524 524 """Add a user account. 525 525 """ … … 555 555 self.flash(_('User account ${a} successfully added.', 556 556 mapping = {'a': name})) 557 ob_class = self.__implemented__.__name__.replace('waeup. kofa.','')557 ob_class = self.__implemented__.__name__.replace('waeup.ikoba.','') 558 558 self.context.__parent__.logger.info( 559 559 '%s - added: %s' % (ob_class, name)) … … 564 564 self.redirect(self.url(self.context)) 565 565 566 class UserManageFormPage( KofaEditFormPage):566 class UserManageFormPage(IkobaEditFormPage): 567 567 """Manage a user account. 568 568 """ … … 604 604 fields_string = ' + '.join(changed_fields) 605 605 if fields_string: 606 ob_class = self.__implemented__.__name__.replace('waeup. kofa.','')606 ob_class = self.__implemented__.__name__.replace('waeup.ikoba.','') 607 607 self.context.__parent__.logger.info( 608 608 '%s - %s edited: %s' % ( … … 635 635 usertype = getattr(self.request.principal, 636 636 'user_type', 'system').title() 637 kofa_utils = getUtility(IKofaUtils)638 success = kofa_utils.sendContactForm(637 ikoba_utils = getUtility(IIkobaUtils) 638 success = ikoba_utils.sendContactForm( 639 639 self.request.principal.title,email, 640 640 self.context.title,self.context.email, … … 660 660 self.widgets['title'].displayWidth = 30 661 661 662 class MyRolesPage( KofaPage):662 class MyRolesPage(IkobaPage): 663 663 """Display site roles and local roles assigned to officers. 664 664 """ … … 691 691 # 692 692 693 class ConfigurationContainerDisplayFormPage( KofaDisplayFormPage):693 class ConfigurationContainerDisplayFormPage(IkobaDisplayFormPage): 694 694 """View page of the configuration container. 695 695 """ … … 703 703 704 704 705 class ConfigurationContainerManageFormPage( KofaEditFormPage):705 class ConfigurationContainerManageFormPage(IkobaEditFormPage): 706 706 """Manage page of the configuration container. We always use the 707 707 manage page in the UI not the view page, thus we use the index name here. … … 763 763 return 764 764 765 class SessionConfigurationAddFormPage( KofaAddFormPage):765 class SessionConfigurationAddFormPage(IkobaAddFormPage): 766 766 """Add a session configuration object to configuration container. 767 767 """ … … 779 779 try: 780 780 self.context.addSessionConfiguration(sessionconfiguration) 781 ob_class = self.__implemented__.__name__.replace('waeup. kofa.','')781 ob_class = self.__implemented__.__name__.replace('waeup.ikoba.','') 782 782 self.context.__parent__.logger.info( 783 783 '%s - added: %s' % ( … … 794 794 return 795 795 796 class SessionConfigurationManageFormPage( KofaEditFormPage):796 class SessionConfigurationManageFormPage(IkobaEditFormPage): 797 797 """Manage session configuration object. 798 798 """ … … 824 824 # 825 825 826 class DatacenterPage( KofaEditFormPage):826 class DatacenterPage(IkobaEditFormPage): 827 827 grok.context(IDataCenter) 828 828 grok.name('index') … … 854 854 self.flash(_('Successfully deleted: ${a}', 855 855 mapping = {'a': ', '.join(deleted)})) 856 ob_class = self.__implemented__.__name__.replace('waeup. kofa.','')856 ob_class = self.__implemented__.__name__.replace('waeup.ikoba.','') 857 857 self.context.logger.info( 858 858 '%s - deleted: %s' % (ob_class, ', '.join(deleted))) 859 859 return 860 860 861 class DatacenterFinishedPage( KofaEditFormPage):861 class DatacenterFinishedPage(IkobaEditFormPage): 862 862 grok.context(IDataCenter) 863 863 grok.name('processed') … … 873 873 return super(DatacenterFinishedPage, self).update() 874 874 875 class DatacenterUploadPage( KofaPage):875 class DatacenterUploadPage(IkobaPage): 876 876 grok.context(IDataCenter) 877 877 grok.name('upload') … … 904 904 mail_table += '%s: %s ...\n' % (line[0], data) 905 905 # Collect all recipient addresses 906 kofa_utils = getUtility(IKofaUtils)906 ikoba_utils = getUtility(IIkobaUtils) 907 907 import_managers = get_users_with_role( 908 908 'waeup.ImportManager', grok.getSite()) … … 924 924 _('${a}: ${b} uploaded', 925 925 mapping = {'a':config.acronym, 'b':filename}), 926 'waeup. kofa',927 target_language= kofa_utils.PORTAL_LANGUAGE)926 'waeup.ikoba', 927 target_language=ikoba_utils.PORTAL_LANGUAGE) 928 928 text = _("""File: ${a} 929 929 Importer: ${b} … … 938 938 'd':uploadfile.lines - 1, 939 939 'e':mail_table}) 940 success = kofa_utils.sendContactForm(940 success = ikoba_utils.sendContactForm( 941 941 fullname,email, 942 942 rcpt_name,rcpt_addrs, … … 983 983 target = os.path.join(self.context.storage, normalized_filename) 984 984 filecontent = uploadfile.read() 985 ob_class = self.__implemented__.__name__.replace('waeup. kofa.','')985 ob_class = self.__implemented__.__name__.replace('waeup.ikoba.','') 986 986 logger = self.context.logger 987 987 … … 1060 1060 1061 1061 def render(self): 1062 ob_class = self.__implemented__.__name__.replace('waeup. kofa.','')1062 ob_class = self.__implemented__.__name__.replace('waeup.ikoba.','') 1063 1063 self.context.logger.info( 1064 1064 '%s - downloaded: %s' % (ob_class, self.filename)) … … 1083 1083 1084 1084 def render(self): 1085 #ob_class = self.__implemented__.__name__.replace('waeup. kofa.','')1085 #ob_class = self.__implemented__.__name__.replace('waeup.ikoba.','') 1086 1086 #self.context.logger.info( 1087 1087 # '%s - skeleton downloaded: %s' % (ob_class, self.filename)) … … 1094 1094 return csv_data 1095 1095 1096 class DatacenterImportStep1( KofaPage):1096 class DatacenterImportStep1(IkobaPage): 1097 1097 """Manual import step 1: choose file 1098 1098 """ … … 1119 1119 if select is not None: 1120 1120 # A filename was selected 1121 session = ISession(self.request)['waeup. kofa']1121 session = ISession(self.request)['waeup.ikoba'] 1122 1122 session['import_filename'] = select 1123 1123 self.redirect(self.url(self.context, '@@import2')) 1124 1124 1125 class DatacenterImportStep2( KofaPage):1125 class DatacenterImportStep2(IkobaPage): 1126 1126 """Manual import step 2: choose processor 1127 1127 """ … … 1191 1191 def update(self, mode=None, importer=None, 1192 1192 back1=None, cancel=None, proceed=None): 1193 session = ISession(self.request)['waeup. kofa']1193 session = ISession(self.request)['waeup.ikoba'] 1194 1194 self.filename = session.get('import_filename', None) 1195 1195 … … 1226 1226 self.flash(warnings, type='warning') 1227 1227 1228 class DatacenterImportStep3( KofaPage):1228 class DatacenterImportStep3(IkobaPage): 1229 1229 """Manual import step 3: modify header 1230 1230 """ … … 1309 1309 1310 1310 def update(self, headerfield=None, back2=None, cancel=None, proceed=None): 1311 session = ISession(self.request)['waeup. kofa']1311 session = ISession(self.request)['waeup.ikoba'] 1312 1312 self.filename = session.get('import_filename', None) 1313 1313 self.mode = session.get('import_mode', None) … … 1338 1338 self.flash(warnings, type='warning') 1339 1339 1340 class DatacenterImportStep4( KofaPage):1340 class DatacenterImportStep4(IkobaPage): 1341 1341 """Manual import step 4: do actual import 1342 1342 """ … … 1359 1359 self.redirect(self.url(self.context, '@@import1')) 1360 1360 return 1361 session = ISession(self.request)['waeup. kofa']1361 session = ISession(self.request)['waeup.ikoba'] 1362 1362 self.filename = session.get('import_filename', None) 1363 1363 self.mode = session.get('import_mode', None) … … 1402 1402 mapping = {'a':linenum - self.warn_num})) 1403 1403 1404 class DatacenterLogsOverview( KofaPage):1404 class DatacenterLogsOverview(IkobaPage): 1405 1405 grok.context(IDataCenter) 1406 1406 grok.name('logs') … … 1418 1418 self.files = self.context.getLogFiles() 1419 1419 1420 class DatacenterLogsFileview( KofaPage):1420 class DatacenterLogsFileview(IkobaPage): 1421 1421 grok.context(IDataCenter) 1422 1422 grok.name('show') … … 1456 1456 return 1457 1457 1458 class DatacenterSettings( KofaPage):1458 class DatacenterSettings(IkobaPage): 1459 1459 grok.context(IDataCenter) 1460 1460 grok.name('manage') … … 1489 1489 if newpath: 1490 1490 self.flash(_('New storage path succefully set.')) 1491 ob_class = self.__implemented__.__name__.replace('waeup. kofa.','')1491 ob_class = self.__implemented__.__name__.replace('waeup.ikoba.','') 1492 1492 self.context.logger.info( 1493 1493 '%s - storage path set: %s' % (ob_class, newpath)) … … 1495 1495 return 1496 1496 1497 class ExportCSVPage( KofaPage):1497 class ExportCSVPage(IkobaPage): 1498 1498 grok.context(IDataCenter) 1499 1499 grok.name('export') … … 1519 1519 job_id = self.context.start_export_job( 1520 1520 exporter, self.request.principal.id) 1521 ob_class = self.__implemented__.__name__.replace('waeup. kofa.','')1521 ob_class = self.__implemented__.__name__.replace('waeup.ikoba.','') 1522 1522 self.context.logger.info( 1523 1523 '%s - exported: %s, job_id=%s' % (ob_class, exporter, job_id)) … … 1525 1525 entry = self.context.entry_from_job_id(job_id) 1526 1526 self.context.delete_export_entry(entry) 1527 ob_class = self.__implemented__.__name__.replace('waeup. kofa.','')1527 ob_class = self.__implemented__.__name__.replace('waeup.ikoba.','') 1528 1528 self.context.logger.info( 1529 1529 '%s - discarded: job_id=%s' % (ob_class, job_id)) … … 1560 1560 #self.context.delete_export_entry( 1561 1561 # self.context.entry_from_job_id(job_id)) 1562 ob_class = self.__implemented__.__name__.replace('waeup. kofa.','')1562 ob_class = self.__implemented__.__name__.replace('waeup.ikoba.','') 1563 1563 self.context.logger.info( 1564 1564 '%s - downloaded: %s, job_id=%s' % (ob_class, filename, job_id)) 1565 1565 return result 1566 1566 1567 class ChangePasswordRequestPage( KofaForm):1567 class ChangePasswordRequestPage(IkobaForm): 1568 1568 """Captcha'd page for all kind of users to request a password change. 1569 1569 """ … … 1613 1613 return 1614 1614 # Change password 1615 kofa_utils = getUtility(IKofaUtils)1616 password = kofa_utils.genPassword()1615 ikoba_utils = getUtility(IIkobaUtils) 1616 password = ikoba_utils.genPassword() 1617 1617 mandate = PasswordMandate() 1618 1618 mandate.params['password'] = password … … 1625 1625 url_info = u'Confirmation link: %s' % mandate_url 1626 1626 msg = _('You have successfully requested a password for the') 1627 success = kofa_utils.sendCredentials(1627 success = ikoba_utils.sendCredentials( 1628 1628 IUserAccount(user),password,url_info,msg) 1629 1629 if success: … … 1632 1632 else: 1633 1633 self.flash(_('An smtp server error occurred.'), type='danger') 1634 ob_class = self.__implemented__.__name__.replace('waeup. kofa.','')1634 ob_class = self.__implemented__.__name__.replace('waeup.ikoba.','') 1635 1635 self.context.logger.info( 1636 1636 '%s - %s - %s' % (ob_class, data['identifier'], data['email'])) -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/pdf.py
r11947 r11949 37 37 from zope.publisher.browser import TestRequest 38 38 from zope.component import getUtility, queryUtility 39 from waeup. kofa.browser.interfaces import IPDFCreator40 from waeup. kofa.utils.helpers import now41 from waeup. kofa.interfaces import IKofaUtils42 from waeup. kofa.interfaces import MessageFactory as _39 from waeup.ikoba.browser.interfaces import IPDFCreator 40 from waeup.ikoba.utils.helpers import now 41 from waeup.ikoba.interfaces import IIkobaUtils 42 from waeup.ikoba.interfaces import MessageFactory as _ 43 43 44 44 … … 523 523 524 524 Location of the string is determined by canvas attributes 525 ` kofa_footer_x_pos` and `kofa_footer_y_pos` that have to be525 `ikoba_footer_x_pos` and `ikoba_footer_y_pos` that have to be 526 526 set manually. 527 527 528 If this canvas also provides an attribute ` kofa_footer_text`,528 If this canvas also provides an attribute `ikoba_footer_text`, 529 529 the contained text is rendered left of the ``page x of y`` 530 530 string. … … 533 533 right_footer_text = _( 534 534 '${footer_text} Page ${num1} of ${num2}', 535 mapping = {'footer_text': self. kofa_footer_text,535 mapping = {'footer_text': self.ikoba_footer_text, 536 536 'num1':self._pageNumber, 'num2':page_count}) 537 537 self.drawRightString( 538 self. kofa_footer_x_pos, self.kofa_footer_y_pos,538 self.ikoba_footer_x_pos, self.ikoba_footer_y_pos, 539 539 translate(right_footer_text)) 540 540 return … … 627 627 628 628 def getWidgetsTable(self, form_fields, context, view, lang='en', 629 domain='waeup. kofa', separators=None,629 domain='waeup.ikoba', separators=None, 630 630 colWidths=None, twoDataCols=False): 631 631 """Return a reportlab `Table` instance, created from widgets … … 684 684 or similar object. 685 685 686 Text of headerline is extracted from doc. kofa_headtitle, the687 document title (under the head) from doc. kofa_title.686 Text of headerline is extracted from doc.ikoba_headtitle, the 687 document title (under the head) from doc.ikoba_title. 688 688 689 689 This is a callback method that will be called from reportlab … … 708 708 site_config = site.get('configuration', None) 709 709 head_title = getattr( 710 doc, ' kofa_headtitle', getattr(710 doc, 'ikoba_headtitle', getattr( 711 711 site_config, 'name', 712 712 u'Sample University')) … … 730 730 canvas.saveState() 731 731 canvas.setFont("Helvetica-Bold", 14) 732 title = getattr(doc, ' kofa_title', '')732 title = getattr(doc, 'ikoba_title', '') 733 733 if '\n' in title: 734 734 title_lines = title.split('\n') … … 747 747 canvas.line(2.2*cm, 0.62*inch, width-2.2*cm, 0.62*inch) 748 748 canvas.setFont("Helvetica", 9) 749 if not getattr(doc, ' kofa_nodate', False):750 tz = getattr(queryUtility(I KofaUtils), 'tzinfo', pytz.utc)751 #tz = getUtility(I KofaUtils).tzinfo749 if not getattr(doc, 'ikoba_nodate', False): 750 tz = getattr(queryUtility(IIkobaUtils), 'tzinfo', pytz.utc) 751 #tz = getUtility(IIkobaUtils).tzinfo 752 752 today = now(tz).strftime('%d/%m/%Y %H:%M:%S %Z') 753 753 canvas.drawString(2.2*cm, 0.5 * inch, 754 754 translate(_(u'Date: ${a}', mapping = {'a': today}))) 755 755 # set canves attributes needed to render `page x of y` 756 canvas. kofa_footer_x_pos = width-2.2*cm757 canvas. kofa_footer_y_pos = 0.5 * inch758 canvas. kofa_footer_text = doc.kofa_footer756 canvas.ikoba_footer_x_pos = width-2.2*cm 757 canvas.ikoba_footer_y_pos = 0.5 * inch 758 canvas.ikoba_footer_text = doc.ikoba_footer 759 759 canvas.restoreState() 760 760 canvas.restoreState() 761 761 762 762 # Metadata 763 canvas.setAuthor(getattr(doc, ' kofa_author', 'Unknown'))763 canvas.setAuthor(getattr(doc, 'ikoba_author', 'Unknown')) 764 764 canvas.setSubject(title) 765 canvas.setCreator(u'WAeUP Kofa')765 canvas.setCreator(u'WAeUP Ikoba') 766 766 return 767 767 … … 782 782 # Set some attributes that are needed when rendering the background. 783 783 if headerline is not None: 784 doc. kofa_headtitle = headerline785 doc. kofa_title = title786 doc. kofa_author = author787 doc. kofa_footer = footer784 doc.ikoba_headtitle = headerline 785 doc.ikoba_title = title 786 doc.ikoba_author = author 787 doc.ikoba_footer = footer 788 788 doc.sigs_in_footer = sigs_in_footer 789 789 if note is not None: -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/reports.py
r9680 r11949 21 21 from zope.component import getUtility, queryUtility 22 22 from zope.location.location import located 23 from waeup. kofa.interfaces import IJobManager, IKofaUtils24 from waeup. kofa.interfaces import MessageFactory as _25 from waeup. kofa.browser.layout import KofaPage26 from waeup. kofa.reports import IReportsContainer, IReportGenerator27 from waeup. kofa.reports import get_generators23 from waeup.ikoba.interfaces import IJobManager, IIkobaUtils 24 from waeup.ikoba.interfaces import MessageFactory as _ 25 from waeup.ikoba.browser.layout import IkobaPage 26 from waeup.ikoba.reports import IReportsContainer, IReportGenerator 27 from waeup.ikoba.reports import get_generators 28 28 29 29 grok.templatedir('templates') 30 30 31 class ReportsContainerPage( KofaPage):31 class ReportsContainerPage(IkobaPage): 32 32 """A view on a reports container. 33 33 """ … … 48 48 self.context.delete_report_entry(entry) 49 49 self.flash('Report discarded: %s' % job_id) 50 ob_class = self.__implemented__.__name__.replace('waeup. kofa.','')50 ob_class = self.__implemented__.__name__.replace('waeup.ikoba.','') 51 51 grok.getSite().logger.info( 52 52 '%s - report %s discarded' % (ob_class, job_id)) … … 72 72 starttime = starttime.astimezone( 73 73 getUtility( 74 I KofaUtils).tzinfo).strftime("%Y-%m-%d %H:%M:%S %Z")74 IIkobaUtils).tzinfo).strftime("%Y-%m-%d %H:%M:%S %Z") 75 75 new_entry = (job_id, descr, status, job.finished, job.finished \ 76 76 and not job.failed, not job.finished, starttime, user) … … 104 104 return None 105 105 106 class ReportsContainerCreate( KofaPage):106 class ReportsContainerCreate(IkobaPage): 107 107 """Create a new report. 108 108 """ -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/templates/changepw.pt
r8777 r11949 1 1 <form action="." tal:attributes="action request/URL" method="post" 2 i18n:domain="waeup. kofa" enctype="multipart/form-data">2 i18n:domain="waeup.ikoba" enctype="multipart/form-data"> 3 3 4 4 <table class="form-table"> … … 18 18 19 19 <p i18n:translate="email_address_problem"> 20 Enter the email address stored in Kofa.20 Enter the email address stored in Ikoba. 21 21 You can't change your email address here. 22 22 If you've forgotten your email address or the email 23 address stored in Kofa is wrong or no longer valid,23 address stored in Ikoba is wrong or no longer valid, 24 24 use the enquiries form to request a change 25 25 of address. -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/templates/configurationmanagepage.pt
r11254 r11949 1 1 <form action="." tal:attributes="action request/URL" method="POST" 2 enctype="multipart/form-data" i18n:domain="waeup. kofa">2 enctype="multipart/form-data" i18n:domain="waeup.ikoba"> 3 3 <ul class="tabs nav nav-tabs" data-tabs="tabs"> 4 4 <li class="active"> … … 27 27 <div id="tab2" class="tab-pane"> 28 28 <br /> 29 <table class=" kofa-data-table dataTableManage">29 <table class="ikoba-data-table dataTableManage"> 30 30 <thead> 31 31 <tr> -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/templates/datacenterexportpage.pt
r11947 r11949 37 37 <br /><br /> 38 38 39 <table i18n:domain="waeup. kofa" class="table table-condensed table-hover">39 <table i18n:domain="waeup.ikoba" class="table table-condensed table-hover"> 40 40 <thead> 41 41 <tr> -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/templates/datacenterfinishedpage.pt
r11460 r11949 4 4 imports. The files contain the imported datasets. 5 5 </p> 6 <table i18n:domain="waeup. kofa" class="kofa-data-table dataTableFiles">6 <table i18n:domain="waeup.ikoba" class="ikoba-data-table dataTableFiles"> 7 7 <thead> 8 8 <tr> -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/templates/datacenterimport1page.pt
r11254 r11949 1 <h3 i18n:domain="waeup. kofa" i18n:translate="">Step 1</h3>2 <p i18n:domain="waeup. kofa" i18n:translate="">1 <h3 i18n:domain="waeup.ikoba" i18n:translate="">Step 1</h3> 2 <p i18n:domain="waeup.ikoba" 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. kofa" i18n:translate="">6 <p i18n:domain="waeup.ikoba" i18n:translate=""> 7 7 Please select a file for processing from the list below. 8 8 </p> 9 <form i18n:domain="waeup. kofa" method="POST">9 <form i18n:domain="waeup.ikoba" method="POST"> 10 10 <table class="table"> 11 11 <thead> -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/templates/datacenterimport2page.pt
r11254 r11949 1 <h3 i18n:domain="waeup. kofa" i18n:translate="">Step 2</h3>2 <form i18n:domain="waeup. kofa" method="POST">1 <h3 i18n:domain="waeup.ikoba" i18n:translate="">Step 2</h3> 2 <form i18n:domain="waeup.ikoba" method="POST"> 3 3 <p> 4 4 <b i18n:translate="">File:</b> -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/templates/datacenterimport3page.pt
r11254 r11949 1 <div i18n:domain="waeup. kofa" i18n:translate=""1 <div i18n:domain="waeup.ikoba" i18n:translate="" 2 2 class="alert alert-success" tal:condition="not: view/getWarnings"> 3 3 Header fields OK 4 4 </div> 5 5 6 <h3 i18n:domain="waeup. kofa" i18n:translate="">Step 3</h3>7 <form i18n:domain="waeup. kofa">6 <h3 i18n:domain="waeup.ikoba" i18n:translate="">Step 3</h3> 7 <form i18n:domain="waeup.ikoba"> 8 8 <p i18n:translate=""> 9 9 Eventually modify headerfields of import file below. -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/templates/datacenterimport4page.pt
r11254 r11949 1 <h3 i18n:domain="waeup. kofa" i18n:translate="">Step 4</h3>2 <p i18n:domain="waeup. kofa" i18n:translate="">1 <h3 i18n:domain="waeup.ikoba" i18n:translate="">Step 4</h3> 2 <p i18n:domain="waeup.ikoba" i18n:translate=""> 3 3 Batch processing finished. 4 4 </p> 5 <p i18n:domain="waeup. kofa">5 <p i18n:domain="waeup.ikoba"> 6 6 <b i18n:translate="">File:</b> <span tal:content="view/filename">Filename.csv</span> 7 7 </p> 8 <p i18n:domain="waeup. kofa">8 <p i18n:domain="waeup.ikoba"> 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. kofa">12 <p i18n:domain="waeup.ikoba"> 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. kofa">16 <form method="POST" i18n:domain="waeup.ikoba"> 17 17 <input class="btn btn-primary" type="submit" name="finish" 18 18 tal:attributes="value view/back_button" /> -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/templates/datacenterlogspage.pt
r11863 r11949 1 <div i18n:domain="waeup. kofa" tal:define="files view/files">1 <div i18n:domain="waeup.ikoba" 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/branches/henrik-regista/src/waeup/ikoba/browser/templates/datacentermanagepage.pt
r11254 r11949 1 <form i18n:domain="waeup. kofa" method="POST">1 <form i18n:domain="waeup.ikoba" method="POST"> 2 2 3 3 <br /> -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/templates/datacenterpage.pt
r11460 r11949 1 <p i18n:domain="waeup. kofa" i18n:translate="">1 <p i18n:domain="waeup.ikoba" 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. kofa">6 <p i18n:domain="waeup.ikoba"> 7 7 <b i18n:translate="">Storage path:</b> 8 8 <span tal:content="context/storage">/foo/bar</span> … … 10 10 11 11 <form action="." tal:attributes="action request/URL" method="post" 12 i18n:domain="waeup. kofa" enctype="multipart/form-data">13 <table i18n:domain="waeup. kofa" class="kofa-data-table dataTableManageFiles">12 i18n:domain="waeup.ikoba" enctype="multipart/form-data"> 13 <table i18n:domain="waeup.ikoba" class="ikoba-data-table dataTableManageFiles"> 14 14 <thead> 15 15 <tr> -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/templates/datacenteruploadpage.pt
r11558 r11949 70 70 <h2 i18n:translate="">Available Processors (Importers)</h2> 71 71 72 <table i18n:domain="waeup. kofa" class="table table-condensed">72 <table i18n:domain="waeup.ikoba" class="table table-condensed"> 73 73 <thead> 74 74 <tr> -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/templates/default_waeup_display_form.pt
r8114 r11949 1 <table class="form-table" i18n:domain="waeup. kofa"1 <table class="form-table" i18n:domain="waeup.ikoba" 2 2 tal:define="files provider:files"> 3 3 <tbody> -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/templates/fileupload.pt
r11569 r11949 1 <tr i18n:domain="waeup. kofa" tal:condition = "viewlet/show_viewlet">1 <tr i18n:domain="waeup.ikoba" tal:condition = "viewlet/show_viewlet"> 2 2 <td class="fieldname"> 3 3 <span tal:replace="viewlet/label">FILENAME</span>: -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/templates/loginpage.pt
r11254 r11949 1 <form i18n:domain="waeup. kofa" method="post" class="form-horizontal">1 <form i18n:domain="waeup.ikoba" method="post" class="form-horizontal"> 2 2 <br /> 3 3 <div class="form-group"> -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/templates/myrolespage.pt
r7811 r11949 1 <h3 i18n:domain="waeup. kofa"1 <h3 i18n:domain="waeup.ikoba" 2 2 i18n:translate="">My Portal Roles:</h3> 3 <table i18n:domain="waeup. kofa" class="form-table">3 <table i18n:domain="waeup.ikoba" class="form-table"> 4 4 <tr tal:repeat="role view/getSiteRoles"> 5 5 <td> … … 9 9 </table> 10 10 11 <h3 i18n:domain="waeup. kofa"11 <h3 i18n:domain="waeup.ikoba" 12 12 i18n:translate="">My Local Roles:</h3> 13 13 <table class="form-table"> -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/templates/notfound.pt
r7811 r11949 1 <h2 i18n:domain="waeup. kofa" i18n:translate="">1 <h2 i18n:domain="waeup.ikoba" i18n:translate=""> 2 2 The page you are trying to access is not available. 3 3 </h2> 4 4 5 <div i18n:domain="waeup. kofa">5 <div i18n:domain="waeup.ikoba"> 6 6 <b i18n:translate="">Please note the following:</b></div> 7 <div i18n:domain="waeup. kofa">7 <div i18n:domain="waeup.ikoba"> 8 8 <ol class="list"> 9 9 <li i18n:translate=""> -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/templates/reportscontainercreate.pt
r11254 r11949 1 <form i18n:domain="waeup. kofa" method="POST">1 <form i18n:domain="waeup.ikoba" method="POST"> 2 2 <p i18n:translate=""> 3 3 Here you can create reports representing portal data. Please pick -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/templates/reportscontainerpage.pt
r11254 r11949 1 <table i18n:domain="waeup. kofa" class="table">1 <table i18n:domain="waeup.ikoba" class="table"> 2 2 <thead> 3 3 <tr> … … 47 47 </tbody> 48 48 </table> 49 <form method="POST" i18n:domain="waeup. kofa">49 <form method="POST" i18n:domain="waeup.ikoba"> 50 50 <a tal:attributes="href python:view.url(context, 'create')" 51 51 class="btn btn-primary" i18n:translate=""> -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/templates/staffsitelayout.pt
r11947 r11949 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. kofa">2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" i18n:domain="waeup.ikoba"> 3 3 <head> 4 4 5 5 <!-- Diazo element--> 6 6 <title i18n:translate=""> 7 WAeUP. Kofa - Student Management System7 WAeUP.Ikoba - Student Management System 8 8 </title> 9 9 <!-- /Diazo element--> … … 20 20 21 21 <!-- Diazo element--> 22 <body class=" kofa-body">22 <body class="ikoba-body"> 23 23 24 24 <!-- Diazo element--> 25 <a class=" kofa-brand-link" href="#"25 <a class="ikoba-brand-link" href="#" 26 26 tal:attributes="href python: view.url(layout.site)" 27 27 tal:content="layout/getAppAcronym">ACRONYM … … 30 30 31 31 <!-- Diazo element--> 32 <ul class="nav kofa-navbar-left">32 <ul class="nav ikoba-navbar-left"> 33 33 <tal:primary_nav content="structure provider:primary_nav" /> 34 34 </ul> … … 36 36 37 37 <!-- Diazo element--> 38 <ul class="nav secondary-nav kofa-navbar-right">38 <ul class="nav secondary-nav ikoba-navbar-right"> 39 39 <li tal:condition="not: layout/isAuthenticated"> 40 40 <a href="#" i18n:translate="" … … 75 75 <div class="sidebar well"> 76 76 <div tal:condition="layout/isAuthenticated"> 77 <div class=" kofa-sidebar-title" tal:content="layout/getUserTitle">USERNAME</div>77 <div class="ikoba-sidebar-title" tal:content="layout/getUserTitle">USERNAME</div> 78 78 <ul class="nav"> 79 79 <tal:left content="structure provider:left_manage" /> … … 84 84 85 85 <!-- Diazo element--> 86 <div class=" kofa-content">86 <div class="ikoba-content"> 87 87 <div class="actionbar" tal:condition="provider:actionbar"> 88 88 <tal:actionbar content="structure provider:actionbar" /> … … 106 106 </ul> 107 107 </div> 108 <h1 class=" kofa-content-label"108 <h1 class="ikoba-content-label" 109 109 tal:condition="view/label|nothing" 110 110 tal:content="structure view/label">LABEL</h1> -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/templates/studentsitelayout.pt
r11947 r11949 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. kofa">2 <html xmlns="http://www.w3.org/1999/xhtml" i18n:domain="waeup.ikoba"> 3 3 <head> 4 4 <title i18n:translate=""> 5 WAeUP. Kofa - Student Management System5 WAeUP.Ikoba - Student Management System 6 6 </title> 7 7 <!--base href="http://localhost:8080/app/@@page" … … 10 10 <meta name="robots" content="index, follow" /> 11 11 <link rel="stylesheet" media="only screen and (max-device-width: 480px)" 12 tal:attributes="href python: view.url(layout.site, '@@/waeup. kofa.browser/mobile.css')"12 tal:attributes="href python: view.url(layout.site, '@@/waeup.ikoba.browser/mobile.css')" 13 13 type="text/css" /> 14 14 <link rel="alternate" type="application/rss+xml" title="RSS" … … 19 19 20 20 <!-- Diazo element--> 21 <body class=" kofa-body">21 <body class="ikoba-body"> 22 22 23 23 <!-- Diazo element--> 24 <a class=" kofa-brand-link" href="#"24 <a class="ikoba-brand-link" href="#" 25 25 tal:attributes="href python: view.url(layout.site)" 26 26 tal:content="layout/getAppAcronym">ACRONYM</a> … … 28 28 29 29 <!-- Diazo element--> 30 <ul class="nav kofa-navbar-left">30 <ul class="nav ikoba-navbar-left"> 31 31 <tal:primary_nav content="structure provider:primary_nav" /> 32 32 </ul> … … 34 34 35 35 <!-- Diazo element--> 36 <ul class="nav secondary-nav kofa-navbar-right">36 <ul class="nav secondary-nav ikoba-navbar-right"> 37 37 <li tal:condition="not: layout/isAuthenticated"> 38 38 <a href="#" i18n:translate="" … … 71 71 72 72 <!-- Diazo element--> 73 <div class=" kofa-content">73 <div class="ikoba-content"> 74 74 <div class="actionbar" tal:condition="provider:actionbar"> 75 75 <tal:actionbar content="structure provider:actionbar" /> … … 92 92 </ul> 93 93 </div> 94 <h1 class=" kofa-content-label"94 <h1 class="ikoba-content-label" 95 95 tal:condition="view/label|nothing" 96 96 tal:content="structure view/label">Label</h1> -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/templates/usereditformpage.pt
r11947 r11949 1 1 <form action="." tal:attributes="action request/URL" method="post" 2 i18n:domain="waeup. kofa" enctype="multipart/form-data"2 i18n:domain="waeup.ikoba" enctype="multipart/form-data" 3 3 autocomplete="off"> 4 4 -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/templates/userscontainerpage.pt
r11254 r11949 1 <table i18n:domain="waeup. kofa" class="kofa-data-table dataTable">1 <table i18n:domain="waeup.ikoba" class="ikoba-data-table dataTable"> 2 2 <thead> 3 3 <tr> -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/tests/test_async.py
r9217 r11949 8 8 from zope.security.interfaces import Unauthorized 9 9 from zope.testbrowser.testing import Browser 10 from waeup. kofa.app import University11 from waeup. kofa.async import AsyncJob, get_job_id12 from waeup. kofa.interfaces import IJobManager13 from waeup. kofa.testing import FunctionalTestCase, FunctionalLayer14 from waeup. kofa.tests.test_async import FunctionalAsyncTestCase10 from waeup.ikoba.app import University 11 from waeup.ikoba.async import AsyncJob, get_job_id 12 from waeup.ikoba.interfaces import IJobManager 13 from waeup.ikoba.testing import FunctionalTestCase, FunctionalLayer 14 from waeup.ikoba.tests.test_async import FunctionalAsyncTestCase 15 15 16 16 def fake_get_export_jobs_status(user_id=None): -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/tests/test_captcha.py
r7811 r11949 21 21 from zope.interface import verify 22 22 from zope.publisher.browser import TestRequest 23 from waeup. kofa.testing import FunctionalLayer, FunctionalTestCase24 from waeup. kofa.browser.captcha import (23 from waeup.ikoba.testing import FunctionalLayer, FunctionalTestCase 24 from waeup.ikoba.browser.captcha import ( 25 25 CaptchaResponse, CaptchaRequest, NullCaptcha, StaticCaptcha, ReCaptcha, 26 26 CaptchaManager) 27 from waeup. kofa.browser.interfaces import (27 from waeup.ikoba.browser.interfaces import ( 28 28 ICaptchaRequest, ICaptchaResponse, ICaptcha, ICaptchaConfig, 29 29 ICaptchaManager) -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/tests/test_doctests.py
r7811 r11949 18 18 """Setup doctests for browser module. 19 19 """ 20 from waeup. kofa.testing import get_doctest_suite20 from waeup.ikoba.testing import get_doctest_suite 21 21 22 22 def test_suite(): -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/tests/test_pdf.py
r10556 r11949 4 4 from reportlab.lib import colors 5 5 from reportlab.platypus.flowables import PageBreak 6 from waeup. kofa.browser.pdf import (6 from waeup.ikoba.browser.pdf import ( 7 7 format_html, normalize_signature, format_signatures, 8 8 vert_signature_cell, horiz_signature_cell, signature_row, get_sig_tables, … … 311 311 # and return its path. 312 312 tmp_dir = os.path.join( 313 tempfile.gettempdir(), 'waeup. kofa.pdf-samples')313 tempfile.gettempdir(), 'waeup.ikoba.pdf-samples') 314 314 if not os.path.exists(tmp_dir): 315 315 os.mkdir(tmp_dir) -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/tests/test_permissions.py
r11947 r11949 31 31 from zope.security.interfaces import Unauthorized 32 32 from zope.testbrowser.testing import Browser 33 from waeup. kofa.app import University34 from waeup. kofa.testing import (33 from waeup.ikoba.app import University 34 from waeup.ikoba.testing import ( 35 35 FunctionalLayer, FunctionalTestCase, get_all_loggers, remove_new_loggers, 36 36 remove_logger) -
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/browser/viewlets.py
r11947 r11949 23 23 from zope.location.interfaces import ISite 24 24 from zope.traversing.browser import absoluteURL 25 from waeup. kofa.browser.pages import (25 from waeup.ikoba.browser.pages import ( 26 26 UniversityPage, DatacenterPage, 27 27 UsersContainerPage, UserManageFormPage) 28 from waeup. kofa.browser.interfaces import (28 from waeup.ikoba.browser.interfaces import ( 29 29 IBreadcrumbContainer, IUniversity, IUsersContainer) 30 from waeup. kofa.interfaces import (31 I KofaUtils, IKofaObject, IKofaXMLExporter,32 I KofaXMLImporter, IDataCenter, IUserAccount)33 from waeup. kofa.browser.layout import KofaPage, default_primary_nav_template34 from waeup. kofa.utils.helpers import get_user_account35 36 from waeup. kofa.interfaces import MessageFactory as _30 from waeup.ikoba.interfaces import ( 31 IIkobaUtils, IIkobaObject, IIkobaXMLExporter, 32 IIkobaXMLImporter, IDataCenter, IUserAccount) 33 from waeup.ikoba.browser.layout import IkobaPage, default_primary_nav_template 34 from waeup.ikoba.utils.helpers import get_user_account 35 36 from waeup.ikoba.interfaces import MessageFactory as _ 37 37 38 38 grok.templatedir('templates') 39 grok.context(I KofaObject) # Make IKofaObject the default context39 grok.context(IIkobaObject) # Make IIkobaObject the default context 40 40 41 41 class ManageSidebar(grok.ViewletManager): … … 87 87 """ 88 88 grok.baseclass() 89 grok.context(I KofaObject)89 grok.context(IIkobaObject) 90 90 grok.viewletmanager(ActionBar) 91 91 icon = 'actionicon_modify.png' # File must exist in static/ … … 191 191 192 192 class BreadCrumbs(grok.Viewlet): 193 grok.context(I KofaObject)193 grok.context(IIkobaObject) 194 194 grok.viewletmanager(BreadCrumbManager) 195 195 grok.order(1) … … 216 216 """ 217 217 grok.viewletmanager(LanguageManager) 218 grok.context(I KofaObject)218 grok.context(IIkobaObject) 219 219 grok.require('waeup.Public') 220 220 title = u'Languages' 221 221 222 222 def render(self): 223 preferred_languages = getUtility(I KofaUtils).PREFERRED_LANGUAGES_DICT223 preferred_languages = getUtility(IIkobaUtils).PREFERRED_LANGUAGES_DICT 224 224 html = u'' 225 225 for key, value in sorted( … … 260 260 """ 261 261 grok.viewletmanager(ManageSidebar) 262 grok.context(I KofaObject)262 grok.context(IIkobaObject) 263 263 grok.view(Interface) 264 264 grok.order(2) … … 295 295 grok.baseclass() 296 296 grok.viewletmanager(ManageSidebar) 297 grok.context(I KofaObject)297 grok.context(IIkobaObject) 298 298 grok.view(Interface) 299 299 grok.order(1) … … 573 573 target_viewname = 'reports' 574 574 575 # The SubobjectLister and its viewlets below are not used in Kofa.575 # The SubobjectLister and its viewlets below are not used in Ikoba. 576 576 577 577 class SubobjectLister(grok.ViewletManager):
Note: See TracChangeset for help on using the changeset viewer.