User tests: Successful: Unsuccessful:
the admin module mod_latest displays a list of the most rrecent articles added to the site but it only shows if the article is published or not. It doesnt display if the article is pending or expired.
this PR resolves that and the module will now correctly display if the article is
published, unpublished, pending or expired
Create 4 articles
Before the PR the admin module on the control panel will just display published/unpublished
After the PR the admin module will display the correct icons (the ones you see in the article manager)
Status | New | ⇒ | Pending |
Category | ⇒ | Modules Administration |
Strange. Clearly I dont see that as I took screenshots with error reporting set to development and i tested on php 56 and 71
The module is not designed to modify the state of the articles in the CPanel. It should just show their state.
I have tested this item
I haven't tested but as far as I can tell you are not defining $canChange
on the line 19 which would backup @frankmayer 's test. In terms of whether you are allowed to change state - I'm easy. We can just replace $canChange
with false
if we don't want to allow state change
@brianteeman
@wilsonge suggestions works great.
Just add $canChange = false;
after JHtml::_('bootstrap.tooltip');
Updated. I cant test it though as I was never able to get the error for some reason - even though I agree it should have appeared
I have tested this item
Same Error like Comment:
@brianteeman I can see the error, too, both from testing and reading the code as @wilsonge described . Just change the code from:
<?php echo JHtml::_('jgrid.published', $item->state, $i, 'articles.', $canChange, 'cb', $item->publish_up, $item->publish_down); ?>
To:
<?php echo JHtml::_('jgrid.published', $item->state, $i, 'articles.', false, 'cb', $item->publish_up, $item->publish_down); ?>
and it should be OK. Please don't add an unnecessary command $canChange = false;
I just did what i was told to do :(
On 11 Mar 2017 12:58 p.m., "Tuan Pham Ngoc" notifications@github.com
wrote:
@brianteeman https://github.com/brianteeman I can see the error, too,
state, $i, 'articles.', $canChange, 'cb', $item->publish_up, $item->publish_down); ?>
both from testing and reading the code as @wilsonge
https://github.com/wilsonge described . Just change the code from:To:
state, $i, 'articles.', false, 'cb', $item->publish_up, $item->publish_down); ?>and it should be OK. Please don't add an unnecessary command $canChange
= false;—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#14446 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8ePWM4QNFFh40yvHwl3rBp2yrc3zks5rkpqFgaJpZM4MZG8D
.
Not sure what you did but the code still not updated in this PR
Labels |
Added:
?
|
doh - i needed coffee I updated the wrong file. Reverted that and set to false correctly now
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
rtc
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-03-11 20:15:23 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
Good stuff :)
After applied PR got: