<s> from django . utils . translation import ugettext_lazy as _ <EOL> from horizon import tables <EOL> from openstack_dashboard . dashboards . project . images_and_snapshots . images import tables as project_tables <EOL> class AdminCreateImage ( project_tables . CreateImage ) : <EOL> url = "<STR_LIT>" <EOL> class AdminDeleteImage ( project_tables . DeleteImage ) : <EOL> def allowed ( self , request , image = None ) : <EOL> if image and image . protected : <EOL> return False <EOL> else : <EOL> return True <EOL> class AdminEditImage ( project_tables . EditImage ) : <EOL> url = "<STR_LIT>" <EOL> def allowed ( self , request , image = None ) : <EOL> return True <EOL> class AdminImagesTable ( project_tables . ImagesTable ) : <EOL> name = tables . Column ( "<STR_LIT:name>" , <EOL> link = "<STR_LIT>" , <EOL> verbose_name = _ ( "<STR_LIT>" ) ) <EOL> class Meta : <EOL> name = "<STR_LIT>" <EOL> verbose_name = _ ( "<STR_LIT>" ) <EOL> table_actions = ( AdminCreateImage , AdminDeleteImage ) <EOL> row_actions = ( AdminEditImage , AdminDeleteImage ) </s>
