Example #1
0
    def clousureForAction(self, item):

        define_action = Link(
            'Define Action',
            url_for('admin.toolbox.access.action.create',
                    permission_id=item.id)).setIcon('fa-plus')

        delete = Link(
            'Delete',
            url_for('admin.toolbox.access.permission.list_delete',id=item.id)
        ).setIcon('fa-trash-alt')\
         .setAjaxMethod('DELETE')\
         .setConfirm('Do you really delete?')

        edit = Link(
            'Edit', url_for('admin.toolbox.access.permission.edit',
                            id=item.id)).setIcon('fa-edit')

        link = Link('Actions', '#')
        link.appendChildren([define_action, delete, edit])
        return link.build()
Example #2
0
File: type.py Project: algha/tarim
 def CommandBar(self):
     links = []
     if hasattr(self.type, 'id'):
         links.append(Link('Delete').setMethod('delete')),
     links.append(Link('Save').setMethod('save'))
     return links
Example #3
0
File: type.py Project: algha/tarim
 def CommandBar(self):
     links = [
         Link('Add New', url_for('admin.toolbox.type.create')),
     ]
     return links
Example #4
0
 def CommandBar(self):
     links = [
         Link('Add New', url_for('admin.toolbox.access.permission.create')),
     ]
     return  links
Example #5
0
File: tags.py Project: algha/tarim
 def CommandBar(self):
     links = []
     links.append(Link('Delete').setMethod('delete')),
     links.append(Link('Save').setMethod('save'))
     return links
Example #6
0
 def CommandBar(self):
     links = [
         Link('Create',url_for('admin.category.create'))
     ]
     return links
Example #7
0
 def CommandBar(self):
     children = [Link('Logout', url_for('admin.logout'))]
     links = [Link('Add New', '#'), Link.withChildren('User', children)]
     return links
Example #8
0
 def CommandBar(self):
     links = []
     links.append(
         Link('Create',
              url_for('admin.toolbox.field.create', id=self.type.id)))
     return []
Example #9
0
 def CommandBar(self):
     links = [
         Link('Add New', url_for('admin.user.create')),
     ]
     return links
Example #10
0
File: field.py Project: algha/tarim
 def buttonGroup(self):
     return [
         Link('Create field').loadModalAsync('getField', 'asyncGetField',
                                             'saveField')
     ]
Example #11
0
 def CommandBar(self):
     links = []
     links.append(
         Link('Create', url_for('admin.post.create', type=self.type)))
     return links