Changeset 7319 for main/waeup.sirp/trunk/src/waeup
- Timestamp:
- 10 Dec 2011, 05:12:28 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/students
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/filedisplay.pt
r7107 r7319 2 2 <td class="label"> 3 3 <label i18n:translate=""> 4 <span tal:replace="viewlet/label">FILENAME</span> 4 <span tal:replace="viewlet/label">FILENAME</span>: 5 5 </label> 6 6 </td> -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/fileupload.pt
r7127 r7319 2 2 <td class="label"> 3 3 <label i18n:translate="" tal:attributes="for viewlet/input_name"> 4 <span tal:replace="viewlet/label">FILENAME</span> 4 <span tal:replace="viewlet/label">FILENAME</span>: 5 5 </label> 6 6 </td> -
main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py
r7318 r7319 51 51 FONT_COLOR = 'black' 52 52 53 def formatted_string(color=FONT_COLOR, size=FONT_SIZE): 53 def formatted_label(color=FONT_COLOR, size=FONT_SIZE): 54 tag1 ='<font color=%s size=%d>' % (color, size) 55 return tag1 + '%s:</font>' 56 57 def formatted_text(color=FONT_COLOR, size=FONT_SIZE): 54 58 tag1 ='<font color=%s size=%d>' % (color, size) 55 59 return tag1 + '%s</font>' … … 98 102 if widget.name == 'form.adm_code': 99 103 continue 100 f_label = formatted_ string() % widget.label.strip()104 f_label = formatted_label() % widget.label.strip() 101 105 f_label = Paragraph(f_label, style["Normal"]) 102 f_text = formatted_ string() % widget()106 f_text = formatted_text() % widget() 103 107 f_text = Paragraph(f_text, style["Normal"]) 104 108 data_right.append([f_label,f_text]) … … 116 120 style = getSampleStyleSheet() 117 121 for element in tableheader: 118 field = formatted_ string(color='white') % element[0]122 field = formatted_text(color='white') % element[0] 119 123 field = Paragraph(field, style["Normal"]) 120 124 line.append(field) … … 123 127 line = [] 124 128 for element in tableheader: 125 field = formatted_ string() % str(getattr(ticket,element[1],u' '))129 field = formatted_text() % str(getattr(ticket,element[1],u' ')) 126 130 field = Paragraph(field, style["Normal"]) 127 131 line.append(field) … … 252 256 data = [] 253 257 for widget in view.widgets: 254 f_label = formatted_ string() % widget.label.strip()258 f_label = formatted_label() % widget.label.strip() 255 259 f_label = Paragraph(f_label, style["Normal"]) 256 f_text = formatted_ string() % str(widget())260 f_text = formatted_text() % str(widget()) 257 261 f_text = Paragraph(f_text, style["Normal"]) 258 262 data.append([f_label,f_text]) … … 272 276 # Insert list of scanned documents 273 277 for viewlet in fm.viewlets: 274 f_label = formatted_ string() % viewlet.label278 f_label = formatted_label() % viewlet.label 275 279 f_label = Paragraph(f_label, style["Normal"]) 276 280 if viewlet.template.__grok_name__ == 'imagedisplay': … … 284 288 data.append([f_label,doc_img]) 285 289 else: 286 f_text = formatted_ string() % viewlet.title290 f_text = formatted_text() % viewlet.title 287 291 f_text = Paragraph(f_text, style["Normal"]) 288 292 data.append([f_label,f_text]) -
main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py
r7280 r7319 280 280 grok.order(1) 281 281 grok.require('waeup.viewStudent') 282 label = u'File :'282 label = u'File' 283 283 title = u'Scan' 284 284 download_name = u'filename.jpg' … … 347 347 grok.require('waeup.viewStudent') 348 348 grok.template('imagedisplay') 349 label = u'Passport Picture :'349 label = u'Passport Picture' 350 350 download_name = u'passport.jpg' 351 351 … … 358 358 grok.require('waeup.manageStudent') 359 359 grok.template('imageupload') 360 label = u'Passport Picture (jpg only) :'360 label = u'Passport Picture (jpg only)' 361 361 mus = 1024 * 50 362 362 download_name = u'passport.jpg' … … 373 373 """ 374 374 grok.order(1) 375 label = u'Birth Certificate :'375 label = u'Birth Certificate' 376 376 title = u'Birth Certificate Scan' 377 377 download_name = u'birth_certificate' … … 384 384 """ 385 385 grok.order(1) 386 label = u'Birth Certificate :'386 label = u'Birth Certificate' 387 387 title = u'Birth Certificate Scan' 388 388 mus = 1024 * 150 … … 394 394 """ 395 395 grok.order(1) 396 label = u'Acceptance Letter :'396 label = u'Acceptance Letter' 397 397 title = u'Acceptance Letter Scan' 398 398 download_name = u'acceptance_letter' … … 405 405 """ 406 406 grok.order(2) 407 label = u'Acceptance Letter :'407 label = u'Acceptance Letter' 408 408 title = u'Acceptance Letter Scan' 409 409 mus = 1024 * 150
Note: See TracChangeset for help on using the changeset viewer.