Added created_at and updated_at to overview order by attributes.

This commit is contained in:
Martin Edenhofer 2016-03-09 08:17:23 +01:00
parent a17a1d3d41
commit dbb4807149
4 changed files with 28 additions and 19 deletions

View file

@ -3,12 +3,14 @@ class App.Organization extends App.Model
@extend Spine.Model.Ajax
@url: @apiPath + '/organizations'
@configure_attributes = [
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, null: false, info: true },
{ name: 'shared', display: 'Shared organization', tag: 'boolean', note: 'Customers in the organization can view each other items.', type: 'boolean', default: true, null: false, info: false },
{ name: 'note', display: 'Note', tag: 'textarea', note: 'Notes are visible to agents only, never to customers.', limit: 250, null: true, info: true },
{ name: 'active', display: 'Active', tag: 'active', default: true, info: false },
{ name: 'updated_at', display: 'Updated', tag: 'datetime', readonly: 1, info: false },
{ name: 'created_at', display: 'Created', tag: 'datetime', readonly: 1, info: false },
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, null: false, info: true },
{ name: 'shared', display: 'Shared organization', tag: 'boolean', note: 'Customers in the organization can view each other items.', type: 'boolean', default: true, null: false, info: false },
{ name: 'note', display: 'Note', tag: 'textarea', note: 'Notes are visible to agents only, never to customers.', limit: 250, null: true, info: true },
{ name: 'active', display: 'Active', tag: 'active', default: true, info: false },
{ name: 'created_by_id', display: 'Created by', relation: 'User', readonly: 1, info: false },
{ name: 'created_at', display: 'Created at', tag: 'datetime', readonly: 1, info: false },
{ name: 'updated_by_id', display: 'Updated by', relation: 'User', readonly: 1, info: false },
{ name: 'updated_at', display: 'Updated at', tag: 'datetime', readonly: 1, info: false },
]
@configure_overview = [
'name',

View file

@ -46,21 +46,17 @@ class App.Overview extends App.Model
value: 'owner'
name: 'Owner'
},
{
value: 'created_at'
name: 'Age'
},
{
value: 'last_contact'
name: 'Last contact'
},
{
value: 'last_contact_agent'
name: 'Last contact (agent)'
name: 'Last contact (Agent)'
},
{
value: 'last_contact_customer'
name: 'Last contact (customer)'
name: 'Last contact (Customer)'
},
{
value: 'first_response'
@ -74,6 +70,14 @@ class App.Overview extends App.Model
value: 'article_count'
name: 'Article Count'
},
{
value: 'updated_at'
name: 'Updated at'
},
{
value: 'created_at'
name: 'Created at'
},
]
class: 'medium'
},
@ -93,13 +97,14 @@ class App.Overview extends App.Model
priority: 'Priority'
group: 'Group'
owner: 'Owner'
created_at: 'Age'
last_contact: 'Last contact'
last_contact_agent: 'Last contact (agent)'
last_contact_customer: 'Last contact (customer)'
last_contact_agent: 'Last contact (Agent)'
last_contact_customer: 'Last contact (Customer)'
first_response: 'First Response'
close_time: 'Close time'
article_count: 'Article Count'
updated_at: 'Updated at'
created_at: 'Created at'
class: 'span4'
},
{

View file

@ -15,8 +15,10 @@ class App.User extends App.Model
{ name: 'role_ids', display: 'Roles', tag: 'checkbox', multiple: true, null: false, relation: 'Role' },
{ name: 'group_ids', display: 'Groups', tag: 'checkbox', multiple: true, null: true, relation: 'Group', invite_agent: true, invite_customer: true },
{ name: 'active', display: 'Active', tag: 'active', default: true },
{ name: 'created_at', display: 'Created', tag: 'datetime', readonly: 1 },
{ name: 'updated_at', display: 'Updated', tag: 'datetime', readonly: 1 },
{ name: 'created_by_id', display: 'Created by', relation: 'User', readonly: 1 },
{ name: 'created_at', display: 'Created at', tag: 'datetime', readonly: 1 },
{ name: 'updated_by_id', display: 'Updated by', relation: 'User', readonly: 1 },
{ name: 'updated_at', display: 'Updated at', tag: 'datetime', readonly: 1 },
]
@configure_overview = [
# 'login', 'firstname', 'lastname', 'email', 'updated_at',

View file

@ -21,10 +21,10 @@
<div class="controls js-value horizontal"></div>
</div>
<div class="filter-controls">
<div class="filter-control filter-control-remove js-remove" title="<%- @T('Remove') %>">
<div class="filter-control filter-control-remove js-remove" title="<%- @Ti('Remove') %>">
<%- @Icon('minus-small') %>
</div>
<div class="filter-control filter-control-add js-add" title="<%- @T('Add') %>">
<div class="filter-control filter-control-add js-add" title="<%- @Ti('Add') %>">
<%- @Icon('plus-small') %>
</div>
</div>