#NEWLINE# def move_to_clipboard( self , request , files_queryset , folders_queryset ) : #NEWLINE# #INDENT# '\n        Action which moves the selected files and files in selected folders\n        to clipboard.\n        ' #NEWLINE# if ( not self . has_change_permission ( request ) ) : #NEWLINE# #INDENT# raise PermissionDenied #NEWLINE# #UNINDENT# if ( request . method != 'POST' ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# clipboard = tools . get_user_clipboard ( request . user ) #NEWLINE# check_files_edit_permissions ( request , files_queryset ) #NEWLINE# check_folder_edit_permissions ( request , folders_queryset ) #NEWLINE# files_count = [ 0 ] #NEWLINE# def move_files( files ) : #NEWLINE# #INDENT# files_count [ 0 ] += tools . move_file_to_clipboard ( files , clipboard ) #NEWLINE# #UNINDENT# def move_folders( folders ) : #NEWLINE# #INDENT# for f in folders : #NEWLINE# #INDENT# move_files ( f . files ) #NEWLINE# move_folders ( f . children . all ( ) ) #NEWLINE# #UNINDENT# #UNINDENT# move_files ( files_queryset ) #NEWLINE# move_folders ( folders_queryset ) #NEWLINE# self . message_user ( request , ( _ ( 'Successfully moved %(count)d files to clipboard.' ) % { #NEWLINE# #INDENT# 'count' : move_files [ 0 ] , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# return None