Changeset 7705 for main/waeup.sirp/trunk/src/waeup/sirp/browser
- Timestamp:
- 26 Feb 2012, 16:34:10 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/browser
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/batchprocessing.txt
r7665 r7705 113 113 114 114 >>> modeselect.getControl(value='create').selected = True 115 >>> browser.getControl('Proceed to step 3 ...').click()115 >>> browser.getControl('Proceed to step 3').click() 116 116 117 117 Step 3: Fix headerlines … … 127 127 The submit button is enabled: 128 128 129 >>> browser.getControl('Perform import ...').disabled129 >>> browser.getControl('Perform import').disabled 130 130 False 131 131 132 >>> browser.getControl('Perform import ...').click()132 >>> browser.getControl('Perform import').click() 133 133 134 134 Step 4: See import results … … 197 197 >>> modeselect = browser.getControl(name='mode') 198 198 >>> modeselect.getControl(value='create').selected = True 199 >>> browser.getControl('Proceed to step 3 ...').click()199 >>> browser.getControl('Proceed to step 3').click() 200 200 201 201 Step 3: Fix headerlines … … 211 211 The submit button is enabled: 212 212 213 >>> browser.getControl('Perform import ...').disabled213 >>> browser.getControl('Perform import').disabled 214 214 False 215 215 216 >>> browser.getControl('Perform import ...').click()216 >>> browser.getControl('Perform import').click() 217 217 218 218 Step 4: See import results … … 262 262 >>> modeselect = browser.getControl(name='mode') 263 263 >>> modeselect.getControl(value='create').selected = True 264 >>> browser.getControl('Proceed to step 3 ...').click()264 >>> browser.getControl('Proceed to step 3').click() 265 265 266 266 Step 3: Fix headerlines … … 276 276 The submit button is enabled: 277 277 278 >>> browser.getControl('Perform import ...').disabled278 >>> browser.getControl('Perform import').disabled 279 279 False 280 280 281 >>> browser.getControl('Perform import ...').click()281 >>> browser.getControl('Perform import').click() 282 282 283 283 Step 4: See import results … … 328 328 >>> modeselect = browser.getControl(name='mode') 329 329 >>> modeselect.getControl(value='create').selected = True 330 >>> browser.getControl('Proceed to step 3 ...').click()330 >>> browser.getControl('Proceed to step 3').click() 331 331 332 332 Step 3: Fix headerlines … … 342 342 The submit button is enabled: 343 343 344 >>> browser.getControl('Perform import ...').disabled344 >>> browser.getControl('Perform import').disabled 345 345 False 346 346 347 >>> browser.getControl('Perform import ...').click()347 >>> browser.getControl('Perform import').click() 348 348 349 349 Step 4: See import results … … 393 393 >>> modeselect = browser.getControl(name='mode') 394 394 >>> modeselect.getControl(value='create').selected = True 395 >>> browser.getControl('Proceed to step 3 ...').click()395 >>> browser.getControl('Proceed to step 3').click() 396 396 397 397 Step 3: Fix headerlines … … 407 407 The submit button is enabled: 408 408 409 >>> browser.getControl('Perform import ...').disabled409 >>> browser.getControl('Perform import').disabled 410 410 False 411 411 412 >>> browser.getControl('Perform import ...').click()412 >>> browser.getControl('Perform import').click() 413 413 414 414 Step 4: See import results … … 466 466 >>> modeselect = browser.getControl(name='mode') 467 467 >>> modeselect.getControl(value='create').selected = True 468 >>> browser.getControl('Proceed to step 3 ...').click()468 >>> browser.getControl('Proceed to step 3').click() 469 469 470 470 Step 3: Fix headerlines … … 473 473 perfom the import: 474 474 475 >>> browser.getControl('Perform import ...').click()475 >>> browser.getControl('Perform import').click() 476 476 477 477 One line could not be imported: … … 528 528 >>> modeselect = browser.getControl(name='mode') 529 529 >>> modeselect.getControl(value='create').selected = True 530 >>> browser.getControl('Proceed to step 3 ...').click()530 >>> browser.getControl('Proceed to step 3').click() 531 531 532 532 Step 3/4: Fix headerlines and import: … … 535 535 perfom the import: 536 536 537 >>> browser.getControl('Perform import ...').click()537 >>> browser.getControl('Perform import').click() 538 538 539 539 This time everything should work: -
main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py
r7703 r7705 751 751 label = _(u'Upload file') 752 752 pnav = 0 753 upload_button =_(u'Upload') 754 cancel_button =_(u'Cancel') 753 755 754 756 def update(self, uploadfile=None, CANCEL=None, SUBMIT=None): … … 797 799 label = _(u'Process CSV file') 798 800 pnav = 0 801 cancel_button =_(u'Cancel') 799 802 800 803 def getFiles(self): … … 826 829 label = _(u'Process CSV file') 827 830 pnav = 0 831 cancel_button =_(u'Cancel') 832 back_button =_(u'Back to step 1') 833 proceed_button =_(u'Proceed to step 3') 828 834 829 835 filename = None … … 943 949 label = _(u'Process CSV file') 944 950 pnav = 0 951 cancel_button =_(u'Cancel') 952 reset_button =_(u'Reset') 953 update_button =_(u'Set headerfields') 954 back_button =_(u'Back to step 2') 955 proceed_button =_(u'Perform import') 945 956 946 957 filename = None … … 1046 1057 label = _(u'Process CSV file') 1047 1058 pnav = 0 1059 show_button =_(u'View processing log') 1060 back_button =_(u'Back to data center') 1048 1061 1049 1062 filename = None … … 1101 1114 label = _(u'Show logfiles') 1102 1115 pnav = 0 1116 back_button = _(u'Back to Data Center') 1117 show_button = _(u'Show') 1103 1118 1104 1119 def update(self, show=None, logname=None, back=None): … … 1143 1158 label = _('Edit data center settings') 1144 1159 pnav = 0 1160 save_button =_(u'Save') 1161 reset_button =_(u'Reset') 1162 cancel_button =_(u'Cancel') 1145 1163 1146 1164 def update(self, newpath=None, move=False, overwrite=False, … … 1579 1597 grok.name('addcourse') 1580 1598 grok.require('waeup.manageUniversity') 1581 label = u'Add course'1599 label = _(u'Add course') 1582 1600 form_fields = grok.AutoFields(ICourseAdd) 1583 1601 pnav = 1 1584 1602 1585 @action( 'Add course')1603 @action(_('Add course')) 1586 1604 def addCourse(self, **data): 1587 1605 course = createObject(u'waeup.Course') … … 1595 1613 # do not use error.msg but render a more detailed message instead 1596 1614 # and show links to all certs with same code 1597 message = 'A course with same code already exists: '1615 message = _('A course with same code already exists: ') 1598 1616 message += '<a href="%s">%s</a>' % ( 1599 1617 self.url(entry), getattr(entry, '__name__', u'Unnamed')) … … 1601 1619 self.redirect(self.url(self.context, u'@@addcourse')) 1602 1620 return 1603 message = u'Course %s successfully created.' % (course.code)1621 message = _(u'Course ${a} successfully created.', mapping = {'a':course.code}) 1604 1622 self.flash(message) 1605 1623 self.redirect(self.url(self.context, u'@@manage')+'?tab2') … … 1616 1634 grok.name('addcertificate') 1617 1635 grok.require('waeup.manageUniversity') 1618 label = u'Add certificate'1636 label = _(u'Add certificate') 1619 1637 form_fields = grok.AutoFields(ICertificateAdd) 1620 1638 pnav = 1 1621 1639 1622 @action( 'Add certificate')1640 @action(_('Add certificate')) 1623 1641 def addCertificate(self, **data): 1624 1642 certificate = createObject(u'waeup.Certificate') … … 1632 1650 # do not use error.msg but render a more detailed message instead 1633 1651 # and show links to all certs with same code 1634 message = 'A certificate with same code already exists: '1652 message = _('A certificate with same code already exists: ') 1635 1653 message += '<a href="%s">%s</a>' % ( 1636 1654 self.url(entry), getattr(entry, '__name__', u'Unnamed')) … … 1638 1656 self.redirect(self.url(self.context, u'@@addcertificate')) 1639 1657 return 1640 message = u'Certificate %s successfully created.' % (certificate.code)1658 message = _(u'Certificate ${a} successfully created.', mapping = {'a':certificate.code}) 1641 1659 self.flash(message) 1642 1660 self.redirect(self.url(self.context, u'@@manage')+'?tab3') 1643 1661 return 1644 1662 1645 @action( 'Cancel', validator=NullValidator)1663 @action(_('Cancel'), validator=NullValidator) 1646 1664 def cancel(self): #, **data): 1647 1665 self.redirect(self.url(self.context)) … … 1670 1688 grok.name('manage') 1671 1689 grok.require('waeup.manageUniversity') 1672 label = u'Edit course'1690 label = _(u'Edit course') 1673 1691 pnav = 1 1674 1692 1675 1693 form_fields = grok.AutoFields(ICourse) 1676 1694 1677 @action( 'Save', style='primary')1695 @action(_('Save'), style='primary') 1678 1696 def save(self, **data): 1679 1697 self.applyData(self.context, **data) 1680 self.flash( 'Form has been saved.')1698 self.flash(_('Form has been saved.')) 1681 1699 return 1682 1700 … … 1687 1705 # return 1688 1706 1689 @action( 'Cancel', validator=NullValidator)1707 @action(_('Cancel'), validator=NullValidator) 1690 1708 def cancel(self, **data): 1691 1709 self.redirect(self.url(self.context)) … … 1720 1738 grok.require('waeup.manageUniversity') 1721 1739 pnav = 1 1722 label = 'Edit certificate'1740 label = _('Edit certificate') 1723 1741 1724 1742 form_fields = grok.AutoFields(ICertificate) … … 1726 1744 pnav = 1 1727 1745 grok.template('certificatemanagepage') 1728 taboneactions = [ 'Save','Cancel']1729 tabtwoactions = [ 'Add course referrer',1730 'Remove selected course referrers','Cancel']1731 tabthreeactions1 = [ 'Remove selected local roles']1732 tabthreeactions2 = [ 'Add local role']1746 taboneactions = [_('Save'),_('Cancel')] 1747 tabtwoactions = [_('Add course referrer'), 1748 _('Remove selected course referrers'),_('Cancel')] 1749 tabthreeactions1 = [_('Remove selected local roles')] 1750 tabthreeactions2 = [_('Add local role')] 1733 1751 1734 1752 @property 1735 1753 def label(self): 1736 return 'Manage certificate'1754 return _('Manage certificate') 1737 1755 1738 1756 def update(self): … … 1750 1768 def save(self, **data): 1751 1769 self.applyData(self.context, **data) 1752 self.flash( 'Form has been saved.')1753 return 1754 1755 @jsaction( 'Remove selected course referrers')1770 self.flash(_('Form has been saved.')) 1771 return 1772 1773 @jsaction(_('Remove selected course referrers')) 1756 1774 def delCertificateCourses(self, **data): 1757 1775 delSubobjects(self, redirect='@@manage', tab='2') 1758 1776 return 1759 1777 1760 @action( 'Add course referrer', validator=NullValidator)1778 @action(_('Add course referrer'), validator=NullValidator) 1761 1779 def addCertificateCourse(self, **data): 1762 1780 self.redirect(self.url(self.context, 'addcertificatecourse')) 1763 1781 return 1764 1782 1765 @action( 'Cancel', validator=NullValidator)1783 @action(_('Cancel'), validator=NullValidator) 1766 1784 def cancel(self, **data): 1767 1785 self.redirect(self.url(self.context)) … … 1782 1800 return get_users_with_local_roles(self.context) 1783 1801 1784 @action( 'Add local role', validator=NullValidator)1802 @action(_('Add local role'), validator=NullValidator) 1785 1803 def addLocalRole(self, **data): 1786 1804 return add_local_role(self, 3, **data) 1787 1805 1788 @action( 'Remove selected local roles')1806 @action(_('Remove selected local roles')) 1789 1807 def delLocalRoles(self, **data): 1790 1808 return del_local_roles(self,3,**data) … … 1799 1817 form_fields = grok.AutoFields(ICertificateCourseAdd) 1800 1818 pnav = 1 1801 label = 'Add course referrer'1802 1803 @action( 'Add course referrer')1819 label = _('Add course referrer') 1820 1821 @action(_('Add course referrer')) 1804 1822 def addCertcourse(self, **data): 1805 1823 try: 1806 1824 self.context.addCourseRef(**data) 1807 1825 except KeyError: 1808 self.status = self.flash( 'The chosen course referrer is already '1809 'part of this certificate.') 1826 self.status = self.flash(_('The chosen course referrer is already ' 1827 'part of this certificate.')) 1810 1828 return 1811 1829 self.status = self.flash( 1812 "Course referrer %s_%s added." % (data['course'].code,data['level'])) 1830 _("Course referrer ${a}_${b} added.", 1831 mapping = {'a': data['course'].code, 'b': data['level']})) 1813 1832 self.redirect(self.url(self.context, u'@@manage')+'?tab2') 1814 1833 1815 @action( 'Cancel', validator=NullValidator)1834 @action(_('Cancel'), validator=NullValidator) 1816 1835 def cancel(self, **data): 1817 1836 self.redirect(self.url(self.context)) … … 1846 1865 grok.require('waeup.manageUniversity') 1847 1866 form_fields = grok.AutoFields(ICertificateCourse) 1848 label = 'Edit course referrer'1849 pnav = 1 1850 1851 @action( 'Save and return', style='primary')1867 label = _('Edit course referrer') 1868 pnav = 1 1869 1870 @action(_('Save and return'), style='primary') 1852 1871 def saveAndReturn(self, **data): 1853 1872 parent = self.context.__parent__ … … 1861 1880 parent.addCourseRef(**data) 1862 1881 parent.delCourseRef(data['course'].code, level=old_level) 1863 self.flash( 'Form has been saved.')1882 self.flash(_('Form has been saved.')) 1864 1883 self.redirect(self.url(parent)) 1865 1884 return 1866 1885 1867 @action( 'Cancel', validator=NullValidator)1886 @action(_('Cancel'), validator=NullValidator) 1868 1887 def cancel(self, **data): 1869 1888 self.redirect(self.url(self.context)) -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/certificatecoursepage.pt
r7665 r7705 1 <table class="form-table">1 <table i18n:domain="waeup.sirp" class="form-table"> 2 2 <thead> 3 3 </thead> 4 4 <tbody> 5 5 <tr> 6 <td >Code:</td>6 <td i18n:translate="">Code:</td> 7 7 <td tal:content="context/__name__">CODE</td> 8 8 </tr> 9 9 <tr> 10 <td >Course Code:</td>10 <td i18n:translate="">Course Code:</td> 11 11 <td tal:content="context/getCourseCode">THE COURSE</td> 12 12 </tr> 13 13 <tr> 14 <td >Course Title:</td>14 <td i18n:translate="">Course Title:</td> 15 15 <td tal:content="context/course/title">THE TITLE</td> 16 16 </tr> 17 17 <tr> 18 <td >Provided by:</td>18 <td i18n:translate="">Provided by:</td> 19 19 <td> 20 20 <span tal:content="python: context.course.__parent__.__parent__.longtitle()">DEPARTMENT</span> … … 24 24 </tr> 25 25 <tr> 26 <td >Level:</td>26 <td i18n:translate="">Level:</td> 27 27 <td tal:content="view/leveltitle">LEVEL</td> 28 28 </tr> 29 29 <tr> 30 <td >Is mandatory course (not elective):</td>30 <td i18n:translate="">Is mandatory course (not elective):</td> 31 31 <td tal:content="context/mandatory">MANDATORY</td> 32 32 </tr> -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/certificatemanagepage.pt
r7669 r7705 1 1 <form action="." tal:attributes="action request/URL" method="POST" 2 enctype="multipart/form-data" >2 enctype="multipart/form-data" i18n:domain="waeup.sirp"> 3 3 4 4 <ul class="tabs" data-tabs="tabs"> 5 <li tal:attributes="class view/tab1"><a href="#tab-1" ><span>Settings</span></a></li>6 <li tal:attributes="class view/tab2"><a href="#tab-2" ><span>Course Referrers</span></a></li>7 <li tal:attributes="class view/tab3"><a href="#tab-3" ><span>Local Roles</span></a></li>5 <li tal:attributes="class view/tab1"><a href="#tab-1" i18n:translate="">Settings</a></li> 6 <li tal:attributes="class view/tab2"><a href="#tab-2" i18n:translate="">Course Referrers</a></li> 7 <li tal:attributes="class view/tab3"><a href="#tab-3" i18n:translate="">Local Roles</a></li> 8 8 </ul> 9 9 … … 42 42 </div> 43 43 <div id="tab-2" tal:attributes="class view/tab2"> 44 <h3 >Course Referrers</h3>44 <h3 i18n:translate="">Course Referrers</h3> 45 45 <table class="display dataTableManage"> 46 46 <thead> 47 47 <tr> 48 <th> </th><th>Level</th><th>Semester</th><th>Referrer</th><th>Course</th><th>Title</th> 49 <th>Mandatory</th> 48 <th> </th><th i18n:translate="">Level</th> 49 <th i18n:translate="">Semester</th><th i18n:translate="">Referrer</th> 50 <th i18n:translate="">Course</th><th i18n:translate="">Title</th> 51 <th i18n:translate="">Mandatory</th> 50 52 </tr> 51 53 </thead> … … 102 104 <th> 103 105 </th> 104 <th >User Id106 <th i18n:translate="">User Id 105 107 </th> 106 <th >Name108 <th i18n:translate="">Name 107 109 </th> 108 <th >Local Role110 <th i18n:translate="">Local Role 109 111 </th> 110 112 </tr> … … 112 114 <tbody> 113 115 <tr tal:repeat="entry view/getUsersWithLocalRoles" class="gradeC"> <td> 114 <input type="checkbox" name="role_id" tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td> 116 <input type="checkbox" name="role_id" 117 tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td> 115 118 <td tal:content="entry/user_name"> USERNAME </td> 116 119 <td tal:content="entry/user_title"> USERTITLE </td> … … 121 124 <div tal:condition="view/availableActions"> 122 125 <span tal:repeat="action view/actions" tal:omit-tag=""> 123 <input tal:condition="python:action.label in view.tabthreeactions1" tal:replace="structure action/render"/> 126 <input tal:condition="python:action.label in view.tabthreeactions1" 127 tal:replace="structure action/render"/> 124 128 </span> 125 129 </div><br /><br /> … … 127 131 <tr> <td> 128 132 <select id="user" name="user"> 129 <option tal:repeat="user view/getUsers" tal:attributes="value user/name"> 133 <option tal:repeat="user view/getUsers" 134 tal:attributes="value user/name"> 130 135 <span tal:replace="user/val/title">USERTITLE 131 136 </span> … … 133 138 </select> </td> <td> 134 139 <select id="local_role" name="local_role"> 135 <option tal:repeat="localrole view/getLocalRoles" tal:attributes="value localrole/name"> 140 <option tal:repeat="localrole view/getLocalRoles" 141 tal:attributes="value localrole/name"> 136 142 <span tal:replace="localrole/title">LOCALROLETITLE 137 143 </span> … … 140 146 <div tal:condition="view/availableActions"> 141 147 <span tal:repeat="action view/actions" tal:omit-tag=""> 142 <input tal:condition="python:action.label in view.tabthreeactions2" tal:replace="structure action/render"/> 148 <input tal:condition="python:action.label in view.tabthreeactions2" 149 tal:replace="structure action/render"/> 143 150 </span> 144 151 </div> </td> -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/certificatepage.pt
r7669 r7705 18 18 </table> 19 19 20 <h3><span tal:content="context/__name__">Code</span> Course Referrers</h3> 20 <h3> 21 <span tal:content="context/__name__">Code</span> 22 <span i18n:domain="waeup.sirp" i18n:translate="">Course Referrers</span> 23 </h3> 21 24 <br /> 22 <table class="display dataTable">25 <table i18n:domain="waeup.sirp" class="display dataTable"> 23 26 <thead> 24 27 <tr> 25 <th>Level</th><th>Semester</th><th>Referrer</th><th>Course</th> 26 <th>Title</th><th>Mandatory</th> 28 <th i18n:translate="">Level</th><th i18n:translate="">Semester</th> 29 <th i18n:translate="">Referrer</th><th i18n:translate="">Course</th> 30 <th i18n:translate="">Title</th><th i18n:translate="">Mandatory</th> 27 31 </tr> 28 32 </thead> -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/configurationmanagepage.pt
r7669 r7705 1 <form action="." tal:attributes="action request/URL" method="POST" enctype="multipart/form-data"> 1 <form action="." tal:attributes="action request/URL" method="POST" 2 enctype="multipart/form-data" i18n:domain="waeup.sirp"> 2 3 <ul class="tabs" data-tabs="tabs"> 3 4 <li tal:attributes="class view/tab1"> 4 <a href="#tab-1"> 5 <span>Site Settings 6 </span></a> 5 <a href="#tab-1" i18n:translate="">Site Settings</a> 7 6 </li> 8 7 <li tal:attributes="class view/tab2"> 9 <a href="#tab-2" >Session Configurations</a>8 <a href="#tab-2" i18n:translate="">Session Configurations</a> 10 9 </li> 11 10 </ul> … … 51 50 <th> 52 51 </th> 53 <th >Name52 <th i18n:translate="">Name 54 53 </th> 55 54 </tr> … … 64 63 <div tal:condition="view/availableActions"> 65 64 <span tal:repeat="action view/actions" tal:omit-tag=""> 66 <input tal:condition="python:action.label in view.tabtwoactions" tal:replace="structure action/render"/> 65 <input tal:condition="python:action.label in view.tabtwoactions" 66 tal:replace="structure action/render"/> 67 67 </span> 68 68 </div> -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/datacenterimport1page.pt
r7464 r7705 1 <h3 >Step 1</h3>2 <p >1 <h3 i18n:domain="waeup.sirp" i18n:translate="">Step 1</h3> 2 <p i18n:domain="waeup.sirp" 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 >7 Please select a file for processing from the list below 6 <p i18n:domain="waeup.sirp" i18n:translate=""> 7 Please select a file for processing from the list below. 8 8 </p> 9 <form method="POST">9 <form i18n:domain="waeup.sirp" method="POST"> 10 10 <table> 11 11 <thead> 12 <th /><th>Filename</th><th>Datasets</th><th>Size</th><th>Date</th> 12 <th /> 13 <th i18n:translate="">Filename</th> 14 <th i18n:translate="">Datasets</th> 15 <th i18n:translate="">Size</th> 16 <th i18n:translate="">Date</th> 13 17 </thead> 14 18 <tbody> 15 19 <tr tal:repeat="file view/getFiles"> 16 20 <td> 17 <button type="submit" name="select" class="btn primary" 21 <button i18n:translate="" 22 type="submit" name="select" class="btn primary" 18 23 tal:attributes="value file/name">Select</button> 19 24 </td> … … 25 30 </tbody> 26 31 </table> 27 <input type="submit" name="cancel" class="btn" value="Cancel" /> 32 <input type="submit" name="cancel" class="btn" 33 tal:attributes="value view/cancel_button" /> 28 34 </form> -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/datacenterimport2page.pt
r7464 r7705 1 <h3 >Step 2</h3>2 <form method="POST">1 <h3 i18n:domain="waeup.sirp" i18n:translate="">Step 2</h3> 2 <form i18n:domain="waeup.sirp" method="POST"> 3 3 <p> 4 <b>File:</b> 5 <span tal:content="view/filename">Filename.csv 6 </span> 7 <input type="hidden" name="filename" tal:attributes="value view/filename" /> 4 <b i18n:translate="">File:</b> 5 <span tal:content="view/filename">Filename.csv</span> 6 <input type="hidden" name="filename" tal:attributes="value view/filename" /> 8 7 </p> 9 <p> Please select a file-processor and a processing-mode from the selections below: 8 <p i18n:translate=""> 9 Please select a file-processor and a processing-mode from the selections below. 10 10 </p> 11 11 <div> 12 12 <table 13 14 15 13 tal:define="body view/getPreviewBody; 14 headers view/getPreviewHeader; 15 fieldnum python: len(headers)"> 16 16 <thead> 17 17 <tr> … … 30 30 </table> 31 31 </div> 32 <div> <b >Processor:</b>32 <div> <b i18n:translate="">Processor:</b> 33 33 <select name="importer"> 34 34 <option tal:repeat="importer view/getImporters" … … 41 41 <p> 42 42 </p> 43 <div> <b >Mode:</b>43 <div> <b i18n:translate="">Mode:</b> 44 44 <input type="radio" name="mode" value="create" checked="checked" 45 45 tal:attributes="checked python: view.mode == 'create' and 'checked' or ''; … … 57 57 </p> 58 58 </div> 59 <input class="btn" type="submit" name="cancel" value="Cancel" /> 60 <input class="btn danger" type="submit" name="back1" value="Back to step 1" /> 61 <input class="btn primary" tal:attributes="disabled python: view.getWarnings() and 'disabled' or ''" 62 type="submit" name="proceed" value="Proceed to step 3..." /> 59 <input class="btn" type="submit" name="cancel" tal:attributes="value view/cancel_button" /> 60 <input class="btn danger" type="submit" name="back1" tal:attributes="value view/back_button" /> 61 <input class="btn primary" 62 tal:attributes="disabled python: view.getWarnings() and 'disabled' or ''; value view/proceed_button" 63 type="submit" name="proceed" /> 63 64 </form> -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/datacenterimport3page.pt
r7464 r7705 1 <div class="alert-message success" tal:condition="not: view/getWarnings"> 1 <div i18n:domain="waeup.sirp" i18n:translate="" 2 class="alert-message success" tal:condition="not: view/getWarnings"> 2 3 Header fields OK 3 4 </div> 4 5 5 <h3 >Step 3</h3>6 <form >7 <p >6 <h3 i18n:domain="waeup.sirp" i18n:translate="">Step 3</h3> 7 <form i18n:domain="waeup.sirp"> 8 <p i18n:translate=""> 8 9 Eventually modify headerfields of import file below. 9 10 </p> 10 11 <p> 11 <b >File:</b>12 <b i18n:translate="">File:</b> 12 13 <span tal:content="view/filename">Filename.csv</span> 13 14 <input type="hidden" name="filename" … … 15 16 </p> 16 17 <p> 17 <b >Processor:</b>18 <b i18n:translate="">Processor:</b> 18 19 <span tal:content="view/importer/name">Importer Name</span> 19 20 <input type="hidden" name="importer" … … 21 22 </p> 22 23 <p> 23 <b >Processing mode: </b>24 <b i18n:translate="">Processing mode: </b> 24 25 <span tal:content="view/mode">mode</span> 25 26 <input type="hidden" name="mode" … … 41 42 <tr> 42 43 <th tal:repeat="headerfield headers"> 43 <i >change to:</i>44 <i i18n:translate="">change to:</i> 44 45 </th> 45 46 </tr> … … 68 69 </div> 69 70 70 <input class="btn" type="submit" name="cancel" value="Cancel" /> 71 <input class="btn" type="reset" name="reset" value="Reset" /> 72 <input class="btn" type="submit" name="update" value="Set headerfields" /> 71 <input class="btn" type="submit" name="cancel" 72 tal:attributes="value view/cancel_button" /> 73 <input class="btn" type="reset" name="reset" 74 tal:attributes="value view/reset_button" /> 75 <input class="btn" type="submit" name="update" 76 tal:attributes="value view/update_button" /> 73 77 <br /><br /> 74 <input class="btn danger" type="submit" name="back2" value="Back to step 2" /> 75 <input class="btn primary" tal:attributes="disabled python: view.getWarnings() and 'disabled' or ''" 76 type="submit" name="proceed" value="Perform import..." /> 78 <input class="btn danger" type="submit" name="back2" 79 tal:attributes="value view/back_button" /> 80 <input class="btn primary" 81 tal:attributes="disabled python: view.getWarnings() and 'disabled' or ''; value view/proceed_button" 82 type="submit" name="proceed"/> 77 83 </form> -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/datacenterimport4page.pt
r7464 r7705 1 <h3 >Step 4</h3>2 <p >1 <h3 i18n:domain="waeup.sirp" i18n:translate="">Step 4</h3> 2 <p i18n:domain="waeup.sirp" i18n:translate=""> 3 3 Batch processing finished. 4 4 </p> 5 <p >6 <b >File:</b> <span tal:content="view/filename">Filename.csv</span>5 <p i18n:domain="waeup.sirp"> 6 <b i18n:translate="">File:</b> <span tal:content="view/filename">Filename.csv</span> 7 7 </p> 8 <p >9 <b >Processor:</b>8 <p i18n:domain="waeup.sirp"> 9 <b i18n:translate="">Processor:</b> 10 10 <span tal:content="view/importer/name">Importer Name</span> 11 11 </p> 12 <p >13 <b >Processing mode: </b>12 <p i18n:domain="waeup.sirp"> 13 <b i18n:translate="">Processing mode: </b> 14 14 <span tal:content="view/mode">mode</span> 15 15 </p> 16 <form method="POST"> 17 <input class="btn primary" type="submit" name="finish" value="Back to data center" /> 18 <input class="btn" type="submit" name="showlog" value="View processing log" /> 16 <form method="POST" i18n:domain="waeup.sirp"> 17 <input class="btn primary" type="submit" name="finish" 18 tal:attributes="value view/back_button" /> 19 <input class="btn" type="submit" name="showlog" 20 tal:attributes="value view/show_button" /> 19 21 </form> -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/datacenterlogspage.pt
r7464 r7705 1 <div tal:define="files view/files"> 2 <p tal:condition="not: files">Currently no log files are available. 1 <div i18n:domain="waeup.sirp" tal:define="files view/files"> 2 <p i18n:translate="" tal:condition="not: files"> 3 Currently no log files are available. 3 4 </p> 4 5 <table tal:condition="files" class="condensed-table"> … … 7 8 <th> 8 9 </th> 9 <th >File10 <th i18n:translate="">File 10 11 </th> 11 <th >Date12 <th i18n:translate="">Date 12 13 </th> 13 <th >Size14 <th i18n:translate="">Size 14 15 </th> 15 16 </tr> 16 17 </thead> 17 18 <tbody> 18 <tr tal:repeat="file files" tal:attributes="class python: repeat['file'].odd() and 'odd' or 'even'"> 19 <tr tal:repeat="file files" 20 tal:attributes="class python: repeat['file'].odd() and 'odd' or 'even'"> 19 21 <td class="text-center"> 20 22 <form method="POST"> 21 <input type="submit" class="btn primary" name="show" value="Show" /> 23 <input i18n:translate="" type="submit" class="btn primary" name="show" 24 tal:attributes="value view/show_button" /> 22 25 <input type="hidden" name="logname" tal:attributes="value file/name" /> 23 26 </form></td> … … 29 32 </table> 30 33 <form method="POST"> 31 <input type="submit" class="btn" name="back" value="Back to Data Center" /> 34 <input i18n:translate="" type="submit" class="btn" name="back" 35 tal:attributes="value view/back_button"/> 32 36 </form> 33 37 </div> -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/datacentermanagepage.pt
r7464 r7705 1 <form method="POST">1 <form i18n:domain="waeup.sirp" method="POST"> 2 2 <div> 3 Storage path:3 <span i18n:translate="">Storage path:</span> 4 4 <input type="text" name="newpath" 5 5 tal:attributes="value context/storage" /> 6 6 <br /><br /> 7 Copy existing data to new storage? 7 <span i18n:translate=""> 8 Copy existing data to new storage? 9 </span> 8 10 <input type="checkbox" name="move" checked="checked" /> 9 11 <br /><br /> 10 Overwrite contents in new location? 12 <span i18n:translate=""> 13 Overwrite contents in new location? 14 </span> 11 15 <input type="checkbox" name="overwrite" checked="no" /> 12 16 <br /><br /> 13 <input class="btn primary" type="submit" name="save" value="Save" /> 14 <input class="btn" type="reset" name="reset" value="Reset" /> 15 <input class="btn" type="submit" name="cancel" value="Cancel" /> 17 <input class="btn primary" type="submit" name="save" 18 tal:attributes="value view/save_button" /> 19 <input class="btn" type="reset" name="reset" 20 tal:attributes="value view/reset_button" /> 21 <input class="btn" type="submit" name="cancel" 22 tal:attributes="value view/cancel_button" /> 16 23 </div> 17 24 </form> -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/datacenterpage.pt
r7465 r7705 1 <p >1 <p i18n:domain="waeup.sirp" 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> 7 <b>Storage path:</b> <span tal:content="context/storage">/foo/bar</span> 6 <p i18n:domain="waeup.sirp"> 7 <b i18n:translate="">Storage path:</b> 8 <span tal:content="context/storage">/foo/bar</span> 8 9 </p> 9 10 10 <table >11 <table i18n:domain="waeup.sirp"> 11 12 <thead> 12 13 <tr> 13 <th >File</th>14 <th >Size</th>15 <th >Uploaded</th>14 <th i18n:translate="">File</th> 15 <th i18n:translate="">Size</th> 16 <th i18n:translate="">Uploaded</th> 16 17 </tr> 17 18 </thead> 18 19 <tbody> 19 20 <tr tal:repeat="file context/getFiles"> 20 <td tal:content="file/name"> thefilename</td>21 <td tal:content="file/name">FILENAME</td> 21 22 <td tal:content="file/size">12 k</td> 22 23 <td tal:content="file/uploaddate">Mar 12, 2008</td> -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/datacenteruploadpage.pt
r7464 r7705 3 3 <br /><br /> 4 4 <div> 5 <input class="btn primary" type="submit" name="SUBMIT" value="Upload" /> 6 <input class="btn" type="submit" name="CANCEL" value="Cancel" /> 5 <input class="btn primary" type="submit" name="SUBMIT" 6 tal:attributes="value view/upload_button" /> 7 <input class="btn" type="submit" name="CANCEL" 8 tal:attributes="value view/cancel_button"/> 7 9 </div> 8 10 </form> -
main/waeup.sirp/trunk/src/waeup/sirp/browser/viewlets.py
r7701 r7705 18 18 import grok 19 19 from urllib import urlencode 20 from zope.i18n import translate 20 21 from zope.component import getMultiAdapter, queryAdapter, getUtility 21 22 from zope.interface import Interface … … 85 86 icon = 'actionicon_modify.png' # File must exist in static/ 86 87 target = '@@manage' # link to this viewname. 87 text = 'Edit'# Text to display on the button88 text = _('Edit') # Text to display on the button 88 89 89 90 # We set the template file explicitly (instead of using … … 154 155 icon = 'actionicon_modify.png' 155 156 target = '@@manage' 156 text = 'Edit'157 text = _('Edit') 157 158 158 159 class AddActionButton(ActionButton): … … 164 165 icon = 'actionicon_add.png' 165 166 target = 'add' 166 text = 'Add'167 text = _('Add') 167 168 168 169 class RemoveActionButton(ActionButton): … … 174 175 icon = 'actionicon_delete.png' 175 176 target = 'remove' 176 text = 'Remove'177 text = _('Remove') 177 178 178 179 class SearchActionButton(ActionButton): … … 184 185 icon = 'actionicon_search.png' 185 186 target = 'search' 186 text = 'Search'187 text = _('Search') 187 188 188 189 … … 309 310 grok.order(2) 310 311 grok.require('waeup.Anonymous') 311 text = 'Login'312 text = _('Login') 312 313 link = 'login' 313 314 … … 347 348 348 349 link = 'configuration' 349 text = u'Portal Configuration'350 text = _(u'Portal Configuration') 350 351 351 352 def render(self): 352 353 url = self.view.url(grok.getSite(), self.link) 354 text = translate(self.text, context=self.request) 353 355 return u'<li><a href="%s">%s</a></li>' % ( 354 url, self.text)356 url, text) 355 357 356 358 class ManageUsersLink(ManageLink): … … 361 363 362 364 link = u'users' 363 text = u'Portal Users'365 text = _(u'Portal Users') 364 366 365 367 class ContactActionButton(ManageActionButton): … … 369 371 grok.require('waeup.manageUsers') 370 372 icon = 'actionicon_mail.png' 371 text = 'Send email'373 text = _('Send email') 372 374 target = 'contactuser' 373 375 … … 379 381 380 382 link = u'datacenter' 381 text = u'Data Center'383 text = _(u'Data Center') 382 384 383 385 class MyPreferences(LeftSidebarLink): … … 386 388 grok.order(7) 387 389 grok.require('waeup.Public') 388 title = u'My Preferences'390 title = _(u'My Preferences') 389 391 icon = '' 390 392 … … 401 403 grok.order(8) 402 404 grok.require('waeup.Public') 403 title = u'My Roles'405 title = _(u'My Roles') 404 406 icon = '' 405 407 … … 420 422 grok.context(IDataCenter) 421 423 grok.view(DatacenterPage) 422 text = 'Edit settings'424 text = _('Edit settings') 423 425 424 426 class ManageFacultiesContainerActionButton(ManageActionButton): … … 427 429 grok.context(IFacultiesContainer) 428 430 grok.view(FacultiesContainerPage) 429 text = 'Manage academic section'431 text = _('Manage academic section') 430 432 431 433 class SearchFacultiesContainerActionButton(ManageActionButton): … … 434 436 grok.context(IFacultiesContainer) 435 437 grok.view(FacultiesContainerPage) 436 text = 'Search academic section'438 text = _('Search academic section') 437 439 icon = 'actionicon_search.png' 438 440 target = '@@search' … … 443 445 grok.context(IFaculty) 444 446 grok.view(FacultyPage) 445 text = 'Manage faculty'447 text = _('Manage faculty') 446 448 447 449 class ManageDepartmentActionButton(ManageActionButton): … … 450 452 grok.context(IDepartment) 451 453 grok.view(DepartmentPage) 452 text = 'Manage department'454 text = _('Manage department') 453 455 454 456 class ShowDepartmentStudentsActionButton(ManageActionButton): … … 459 461 grok.require('waeup.showStudents') 460 462 icon = 'actionicon_student.png' 461 text = 'Show students'463 text = _('Show students') 462 464 target = 'showdepstudents' 463 465 … … 467 469 grok.context(ICourse) 468 470 grok.view(CoursePage) 469 text = 'Edit course'471 text = _('Edit course') 470 472 471 473 class ManageCertificateActionButton(ManageActionButton): … … 474 476 grok.context(ICertificate) 475 477 grok.view(CertificatePage) 476 text = 'Manage certificate'478 text = _('Manage certificate') 477 479 478 480 class ShowCertificateStudentsActionButton(ManageActionButton): … … 483 485 grok.require('waeup.showStudents') 484 486 icon = 'actionicon_student.png' 485 text = 'Show students'487 text = _('Show students') 486 488 target = 'showcertstudents' 487 489 … … 491 493 grok.context(ICertificateCourse) 492 494 grok.view(CertificateCoursePage) 493 text = 'Edit course referrer'495 text = _('Edit course referrer') 494 496 495 497 # … … 501 503 grok.context(IUsersContainer) 502 504 grok.view(UsersContainerPage) 503 text = 'Add user' 504 505 #class AddFacultyActionButton(AddActionButton): 506 # grok.context(IFacultiesContainer) 507 # grok.view(FacultiesContainerPage) 508 # text = 'Add faculty' 509 510 #class AddDepartmentActionButton(AddActionButton): 511 # grok.context(IFaculty) 512 # grok.view(FacultyPage) 513 # text = 'Add department' 514 515 #class AddCertificateActionButton(AddActionButton): 516 # grok.context(IDepartment) 517 # grok.view(DepartmentPage) 518 # grok.order(3) 519 # text = 'Add certificate' 520 # target = 'addcertificate' 521 522 #class AddCourseActionButton(AddActionButton): 523 # grok.context(IDepartment) 524 # grok.view(DepartmentPage) 525 # grok.order(4) 526 # text = 'Add course' 527 # target = 'addcourse' 528 529 #class AddCertificateCourseActionButton(AddActionButton): 530 # grok.context(ICertificate) 531 # grok.view(CertificatePage) 532 # grok.order(4) 533 # text = 'Add course referrer' 534 # target = 'addcertificatecourse' 535 536 # 537 # Remove actions... 538 # 539 540 541 #class RemoveFacultyActionButton(RemoveActionButton): 542 # grok.context(IFacultiesContainer) 543 # grok.view(FacultiesContainerPage) 544 # text = 'Remove faculty' 545 546 #class RemoveDepartmentActionButton(RemoveActionButton): 547 # grok.context(IFaculty) 548 # grok.view(FacultyPage) 549 # text = 'Remove department' 550 505 text = _('Add user') 551 506 552 507 # … … 561 516 icon = 'actionicon_manage.png' # File must exist in static/ 562 517 target = '@@show' # link to this viewname. 563 text = 'Show batch logs'# Text to display on the button518 text = _('Show batch logs') # Text to display on the button 564 519 565 520 class BrowseDatacenterLogs(BrowseActionButton): … … 569 524 icon = 'documentinfo_templet.png' 570 525 target = '@@logs' 571 text = 'Show batch logs'526 text = _('Show batch logs') 572 527 573 528 # … … 581 536 icon = 'actionbox_templet.png' 582 537 target = '@@import1' 583 text = 'Batch processing'538 text = _('Batch processing') 584 539 585 540 class UploadCSVButton(ActionButton): … … 590 545 icon = 'go-up-16x16.png' 591 546 target = '@@upload' 592 text = 'Upload CSV file'547 text = _('Upload CSV file') 593 548 594 549 # … … 699 654 grok.require('waeup.managePortalConfiguration') 700 655 701 link_title = 'Portal Configuration'656 link_title = _('Portal Configuration') 702 657 def link_target(self): 703 658 return self.view.url(self.view.context, 'configuration') … … 709 664 grok.require('waeup.manageUsers') 710 665 711 link_title = 'Portal Users'666 link_title = _('Portal Users') 712 667 target_viewname = 'users' 713 668 … … 718 673 grok.require('waeup.manageDataCenter') 719 674 720 link_title = 'Data Center'675 link_title = _('Data Center') 721 676 target_viewname = 'datacenter' 722 677 … … 794 749 795 750 def render(self): 796 return u'<div class="text-right"><form method="POST"><input class="text-right" type="submit" value="remove" /></form></div>' 751 return u'<div class="text-right"><form method="POST">' + \ 752 '<input class="text-right" type="submit" value="remove" />' + \ 753 '</form></div>'
Note: See TracChangeset for help on using the changeset viewer.