#NEWLINE# @ presentation . render_for ( DueDate , model = 'action' ) #NEWLINE# def render_DueDate_button( self , h , comp , * args ) : #NEWLINE# #INDENT# if security . has_permissions ( 'due_date' , self . card ) : #NEWLINE# #INDENT# id_ = h . generate_id ( ) #NEWLINE# if self . due_date : #NEWLINE# #INDENT# classes = [ 'btn' , 'btn-due-date' , self . get_class ( ) ] #NEWLINE# with h . a ( class_ = ' ' . join ( classes ) , id_ = id_ ) . action ( self . calendar ( ) . toggle ) : #NEWLINE# #INDENT# ( h << h . i ( class_ = 'icon-alarm duedate-icon' ) ) #NEWLINE# ( h << format_date ( self . due_date , 'short' ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# with h . a ( class_ = 'btn' , id_ = id_ ) . action ( self . calendar ( ) . toggle ) : #NEWLINE# #INDENT# ( h << h . i ( class_ = 'icon-alarm' ) ) #NEWLINE# ( h << _ ( 'Due date' ) ) #NEWLINE# #UNINDENT# #UNINDENT# ( h << self . calendar . on_answer ( self . set_value ) ) #NEWLINE# #UNINDENT# return h . root