Skip to content
Permalink
Browse files

Show the edit date in the recently edited resources in the user panel [

…#11264]

Merge remote-tracking branch 'upstream/pr/14540' into 3.x

* upstream/pr/14540:
  Fixed issue #11264: Added checking for the specific user in the recently edited resources (regarding the comment #11264 (comment))
  Fixed issue #11264: Added date and time to the list of recently edited resources for the personal profile
  Implemented changes of pull request #14511
  • Loading branch information...
Mark-H committed Sep 9, 2019
2 parents 6caf21a + 8cce45f commit 08e4d359142503a15e4be696eedbd1d55e13d9e9
@@ -96,6 +96,7 @@ MODX Revolution 3.0.0-beta1 (TBD)
- Add manager_tooltip_enable and manager_tooltip_delay settings to manage if/how long tooltip descriptions are shown [#12732]
- In recently edited resources and online users widget, make sure user has "logs" permission before showing the link to more [#14522]
- Add passwordless login to the manager [#14351]
- Add edit date to the list of recently edited resources in the user panel [#11264]

MODX Revolution 2.7.2-pl (TBD)
====================================
@@ -58,8 +58,13 @@ public function initialize()
*/
public function prepareQueryBeforeCount(xPDOQuery $c)
{
$user = $this->getProperty('user');
$q = $this->modx->newQuery($this->classKey, ['classKey:IN' => $this->classKeys]);
$q->select('MAX(id), item');
if (!empty($user)) {
$q->where(['user' => $user]);
$c->where(['user' => $user]);
}
$q->groupby('item');
$q->limit($this->getProperty('limit', 10));
if ($q->prepare() && $q->stmt->execute()) {
@@ -8,6 +8,7 @@
*/
MODx.grid.RecentlyEditedResourcesByUser = function(config) {
config = config || {};
var dateFormat = MODx.config.manager_date_format + ' ' + MODx.config.manager_time_format;
Ext.applyIf(config,{
title: _('recent_docs')
,url: MODx.config.connector_url
@@ -18,7 +19,7 @@ MODx.grid.RecentlyEditedResourcesByUser = function(config) {
,autosave: true
,save_action: 'Resource/UpdateFromGrid'
,pageSize: 10
,fields: ['id','pagetitle','description','editedon','deleted','published','context_key','menu', 'link']
,fields: ['id','pagetitle','description','editedon','deleted','published','context_key','menu', 'link', 'occurred']
,columns: [{
header: _('id')
,dataIndex: 'id'
@@ -27,6 +28,10 @@ MODx.grid.RecentlyEditedResourcesByUser = function(config) {
},{
header: _('pagetitle')
,dataIndex: 'pagetitle'
},{
header: _('editedon')
,dataIndex: 'occurred'
,renderer : Ext.util.Format.dateRenderer(dateFormat)
},{
header: _('published')
,dataIndex: 'published'

0 comments on commit 08e4d35

Please sign in to comment.
You can’t perform that action at this time.