#NEWLINE# def indented_short_title( self , item ) : #NEWLINE# #INDENT# "\n        Generate a short title for an object, indent it depending on\n        the object's depth in the hierarchy.\n        " #NEWLINE# mptt_opts = item . _mptt_meta #NEWLINE# r = '' #NEWLINE# try : #NEWLINE# #INDENT# url = item . get_absolute_url ( ) #NEWLINE# #UNINDENT# except ( AttributeError , ) : #NEWLINE# #INDENT# url = None #NEWLINE# #UNINDENT# if url : #NEWLINE# #INDENT# r = ( '<input type="hidden" class="medialibrary_file_path" value="%s" id="_refkey_%d" />' % ( url , item . pk ) ) #NEWLINE# #UNINDENT# changeable_class = '' #NEWLINE# if ( not self . changeable ( item ) ) : #NEWLINE# #INDENT# changeable_class = ' tree-item-not-editable' #NEWLINE# #UNINDENT# r += ( '<span id="page_marker-%d" class="page_marker%s" style="width: %dpx;">&nbsp;</span>&nbsp;' % ( item . pk , item , ( 14 + ( getattr ( item , mptt_opts . level_attr ) * 18 ) ) ) ) #NEWLINE# if ( hasattr ( item , 'short_title' ) and callable ( item . short_title ) ) : #NEWLINE# #INDENT# r += escape ( item . short_title ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# r += escape ( ( '%s' % item ) ) #NEWLINE# #UNINDENT# return mark_safe ( r )