Changeset 7112 for main/waeup.sirp/trunk/src/waeup/sirp
- Timestamp:
- 15 Nov 2011, 07:21:29 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/default_waeup_display_form.pt
r7097 r7112 15 15 </tr> 16 16 </tal:block> 17 <tal: actionbarcontent="structure provider:files" />17 <tal:files content="structure provider:files" /> 18 18 </tbody> 19 19 <tfoot> -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/default_waeup_edit_form.pt
r7097 r7112 43 43 </tr> 44 44 </tal:block> 45 <tal: actionbarcontent="structure provider:files" />45 <tal:files content="structure provider:files" /> 46 46 </tbody> 47 47 </table> -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/baseeditpage.pt
r6756 r7112 40 40 </tr> 41 41 </tal:block> 42 <tal:files content="structure provider:files" /> 42 43 </tbody> 43 44 </table> -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/basemanagepage.pt
r6701 r7112 61 61 </td> 62 62 </tr> 63 <tal:files content="structure provider:files" /> 63 64 </tbody> 64 65 </table> -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/basepage.pt
r6699 r7112 23 23 </td> 24 24 <tr> 25 <tal:files content="structure provider:files" /> 25 26 </tbody> 26 27 <tfoot> -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/imagedisplay.pt
r7106 r7112 1 1 <tr> 2 2 <td class="label"> 3 <label i18n:translate="" tal:attributes="for viewlet/input_name">3 <label i18n:translate=""> 4 4 <span tal:replace="viewlet/label">FILENAME</span> 5 5 </label> … … 7 7 <td class="field"> 8 8 <span class="widget"> 9 <img tal:attributes="src viewlet/download_name" /><br /> 9 <img height="125px" tal:attributes="src viewlet/download_name" /> 10 <br /> 10 11 </span> 11 12 </td> -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/imageupload.pt
r7106 r7112 7 7 <td class="field"> 8 8 <span class="widget"> 9 <img tal:attributes="src viewlet/download_name" /><br /> 9 <img align="middle" height="125px" 10 tal:attributes="src viewlet/download_name" /> 11 <input type="submit" tal:condition="viewlet/file_exists" 12 tal:attributes="id python:('delete_%s' % viewlet.input_name); 13 name python:('delete_%s' % viewlet.input_name)" 14 value="Delete" class="button" /> 15 <br /><br /> 10 16 <input type="file" tal:attributes="name viewlet/input_name"/> 11 <br /> 17 <input type="submit" 18 tal:attributes="id python:('upload_%s' % viewlet.input_name); 19 name python:('upload_%s' % viewlet.input_name)" 20 value="Upload" class="button" /> 12 21 <span i18n:translate=""> 13 22 Max. file size: -
main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py
r7111 r7112 9 9 from waeup.sirp.students.browser import ( 10 10 StudentClearanceDisplayFormPage, StudentClearanceManageFormPage, 11 write_log_message) 12 from waeup.sirp.students.interfaces import IStudentClearance 11 write_log_message, StudentBaseManageFormPage, StudentBaseDisplayFormPage, 12 StudentBaseEditFormPage) 13 from waeup.sirp.students.interfaces import IStudent, IStudentClearance 13 14 14 15 grok.context(IWAeUPObject) # Make IWAeUPObject the default context … … 297 298 return 298 299 300 class PassportDisplay(FileDisplay): 301 """Passport display viewlet. 302 """ 303 grok.order(1) 304 grok.context(IStudent) 305 grok.view(StudentBaseDisplayFormPage) 306 grok.require('waeup.viewStudent') 307 grok.template('imagedisplay') 308 label = u'Passport Picture:' 309 download_name = u'passport.jpg' 310 311 class PassportUploadManage(FileUpload): 312 """Passport upload viewlet for officers. 313 """ 314 grok.order(1) 315 grok.context(IStudent) 316 grok.view(StudentBaseManageFormPage) 317 grok.require('waeup.manageStudents') 318 grok.template('imageupload') 319 label = u'Passport Picture (jpg only):' 320 mus = 1024 * 50 321 download_name = u'passport.jpg' 322 input_name = u'passport' 323 324 class PassportUploadEdit(PassportUploadManage): 325 """Passport upload viewlet for students. 326 """ 327 grok.view(StudentBaseEditFormPage) 328 grok.require('waeup.handleStudent') 329 299 330 class BirthCertificateDisplay(FileDisplay): 300 """Birth Certificate uploadviewlet.331 """Birth Certificate display viewlet. 301 332 """ 302 333 grok.order(1) … … 314 345 315 346 class AcceptanceLetterDisplay(FileDisplay): 316 """Acceptance Letter uploadviewlet.347 """Acceptance Letter display viewlet. 317 348 """ 318 349 grok.order(1) … … 323 354 """AcceptanceLetter upload viewlet. 324 355 """ 325 grok.order( 1)356 grok.order(2) 326 357 label = u'Acceptance Letter (jpg only):' 327 358 mus = 1024 * 150 … … 334 365 grok.baseclass() 335 366 grok.name('none.jpg') 336 grok. view(StudentClearanceManageFormPage)367 grok.context(IStudentClearance) 337 368 grok.require('waeup.viewStudent') 338 369 download_name = u'none.jpg' … … 351 382 return image 352 383 384 class Passport(Image): 385 """Renders jpeg passport picture. 386 """ 387 grok.name('passport.jpg') 388 download_name = u'passport.jpg' 389 grok.context(IStudent) 390 353 391 class BirthCertificateImage(Image): 354 392 """Renders birth certificate jpeg scan.
Note: See TracChangeset for help on using the changeset viewer.