Add some links to various grid columns
This commit is contained in:
parent
8186366b69
commit
f20a40e818
|
@ -85,6 +85,8 @@ class CustomersView(MasterView):
|
||||||
g.set_label('phone', "Phone Number")
|
g.set_label('phone', "Phone Number")
|
||||||
g.set_label('email', "Email Address")
|
g.set_label('email', "Email Address")
|
||||||
|
|
||||||
|
g.set_link('name')
|
||||||
|
|
||||||
def get_mobile_data(self, session=None):
|
def get_mobile_data(self, session=None):
|
||||||
# TODO: hacky!
|
# TODO: hacky!
|
||||||
return self.get_data(session=session).order_by(model.Customer.name)
|
return self.get_data(session=session).order_by(model.Customer.name)
|
||||||
|
|
|
@ -410,6 +410,8 @@ class MasterView2(MasterView):
|
||||||
g.set_label('issued_at', "Changed")
|
g.set_label('issued_at', "Changed")
|
||||||
g.set_label('user', "Changed by")
|
g.set_label('user', "Changed by")
|
||||||
g.set_label('remote_addr', "IP Address")
|
g.set_label('remote_addr', "IP Address")
|
||||||
|
# TODO: why does this render '#' as url?
|
||||||
|
# g.set_link('issued_at')
|
||||||
|
|
||||||
def render_version_comment(self, transaction, column):
|
def render_version_comment(self, transaction, column):
|
||||||
return transaction.meta.get('comment', "")
|
return transaction.meta.get('comment', "")
|
||||||
|
|
|
@ -103,6 +103,8 @@ class PeopleView(MasterView):
|
||||||
g.set_label('email', "Email Address")
|
g.set_label('email', "Email Address")
|
||||||
g.set_label('customer_id', "Customer ID")
|
g.set_label('customer_id', "Customer ID")
|
||||||
|
|
||||||
|
g.set_link('display_name')
|
||||||
|
|
||||||
def get_instance(self):
|
def get_instance(self):
|
||||||
# TODO: I don't recall why this fallback check for a vendor contact
|
# TODO: I don't recall why this fallback check for a vendor contact
|
||||||
# exists here, but leaving it intact for now.
|
# exists here, but leaving it intact for now.
|
||||||
|
|
|
@ -56,6 +56,7 @@ class RolesView(PrincipalMasterView):
|
||||||
g.filters['name'].default_active = True
|
g.filters['name'].default_active = True
|
||||||
g.filters['name'].default_verb = 'contains'
|
g.filters['name'].default_verb = 'contains'
|
||||||
g.default_sortkey = 'name'
|
g.default_sortkey = 'name'
|
||||||
|
g.set_link('name')
|
||||||
|
|
||||||
def _preconfigure_fieldset(self, fs):
|
def _preconfigure_fieldset(self, fs):
|
||||||
fs.append(PermissionsField('permissions'))
|
fs.append(PermissionsField('permissions'))
|
||||||
|
|
|
@ -174,6 +174,9 @@ class UsersView(PrincipalMasterView):
|
||||||
|
|
||||||
g.set_label('person', "Person's Name")
|
g.set_label('person', "Person's Name")
|
||||||
|
|
||||||
|
g.set_link('username')
|
||||||
|
g.set_link('person')
|
||||||
|
|
||||||
def _preconfigure_fieldset(self, fs):
|
def _preconfigure_fieldset(self, fs):
|
||||||
fs.username.set(renderer=forms.renderers.StrippedTextFieldRenderer, validate=unique_username)
|
fs.username.set(renderer=forms.renderers.StrippedTextFieldRenderer, validate=unique_username)
|
||||||
fs.person.set(renderer=forms.renderers.PersonFieldRenderer, options=[])
|
fs.person.set(renderer=forms.renderers.PersonFieldRenderer, options=[])
|
||||||
|
|
Loading…
Reference in a new issue