@@ -80,7 +80,7 @@ public function run(){
80
80
if ($ ctype ['is_in_groups ' ] || $ ctype ['is_in_groups_only ' ]){
81
81
82
82
$ groups_model = cmsCore::getModel ('groups ' );
83
- $ groups = $ groups_model ->getUserGroups ($ this -> cms_user -> id );
83
+ $ groups = $ groups_model ->getUserGroups ($ item [ ' user_id ' ] );
84
84
85
85
if ($ groups ){
86
86
$ groups_list = ($ ctype ['is_in_groups_only ' ]) ? array () : array ('0 ' =>'' );
@@ -278,6 +278,19 @@ public function run(){
278
278
279
279
}
280
280
281
+ } else {
282
+
283
+ if ($ is_moderator && !$ is_owner ){
284
+
285
+ $ item ['reason ' ] = LANG_PM_MODERATION_REWORK_DRAFT ;
286
+ $ item ['page_url ' ] = href_to_abs ($ ctype ['name ' ], 'edit ' , $ item ['id ' ]);
287
+
288
+ $ this ->controller_moderation ->moderationNotifyAuthor ($ item , 'moderation_rework ' );
289
+
290
+ cmsUser::addSessionMessage (LANG_MODERATION_REMARK_NOTIFY , 'info ' );
291
+
292
+ }
293
+
281
294
}
282
295
283
296
$ back_url = $ this ->request ->get ('back ' , '' );
@@ -300,6 +313,20 @@ public function run(){
300
313
301
314
$ show_save_button = ($ is_owner || (!$ is_premoderation && $ item ['is_approved ' ]));
302
315
316
+ $ button_draft_text = LANG_CONTENT_SAVE_DRAFT ;
317
+
318
+ if (!$ item ['is_draft ' ]){
319
+ if ($ show_save_button ){
320
+ if ($ is_moderator && !$ is_owner ){
321
+ $ button_draft_text = LANG_MODERATION_RETURN_FOR_REVISION ;
322
+ } else {
323
+ $ button_draft_text = LANG_CONTENT_MOVE_DRAFT ;
324
+ }
325
+ } else {
326
+ $ button_draft_text = LANG_SAVE ;
327
+ }
328
+ }
329
+
303
330
return $ this ->cms_template ->render ('item_form ' , array (
304
331
'do ' => 'edit ' ,
305
332
'page_title ' => $ item ['title ' ],
@@ -314,7 +341,7 @@ public function run(){
314
341
'is_premoderation ' => $ is_premoderation ,
315
342
'show_save_button ' => $ show_save_button ,
316
343
'button_save_text ' => (($ is_premoderation && !$ is_moderator ) ? LANG_MODERATION_SEND : ($ item ['is_approved ' ] ? LANG_SAVE : LANG_PUBLISH )),
317
- 'button_draft_text ' => (! $ item [ ' is_draft ' ] ? ( $ show_save_button ? LANG_CONTENT_MOVE_DRAFT : LANG_SAVE ) : LANG_CONTENT_SAVE_DRAFT ) ,
344
+ 'button_draft_text ' => $ button_draft_text ,
318
345
'is_multi_cats ' => !empty ($ ctype ['options ' ]['is_cats_multi ' ]),
319
346
'is_load_props ' => false ,
320
347
'add_cats ' => $ add_cats ,
0 commit comments