Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] Add support to unpublish module from Control Panel #23934

Merged
merged 20 commits into from
Mar 20, 2019
Merged

[4.0] Add support to unpublish module from Control Panel #23934

merged 20 commits into from
Mar 20, 2019

Conversation

C-Lodder
Copy link
Member

Summary of Changes

This is a continuation of the initial prototype I did: joomla/40-backend-template#251

In the control panel, we have a cog icon that directs you to the settings for that module. Now, it displays a dropdown with a new option to directly unpublish the module. Upon doing so, it will instantly disappear from the display.

Testing Instructions

  1. Fetch the code
  2. Run npm i (apologies)
  3. Login to the your Joomla admin
  4. Click the "cog" icon for any module and select "Unpublish" from the dropdown

Note

There are some changes to other files which keeps the dropdowns in other areas of the admin template intact.

@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-4.0-dev labels Feb 18, 2019
@C-Lodder
Copy link
Member Author

@brianteeman All done. Thanks

@brianteeman
Copy link
Contributor

I have tested this item ✅ successfully on d88d161


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23934.

@infograf768
Copy link
Member

Drone throws errors for javascript-cs

@joomla-cms-bot joomla-cms-bot added the NPM Resource Changed This Pull Request can't be tested by Patchtester label Feb 19, 2019
@coolcat-creations
Copy link
Contributor

Thats a great improvement,
I tested it but the unpublish link does not do anything. The edit link works.

I'd open a seperate issue with following problem:
If you edit the module and close it, you end up in the module manager. It would be good to implement a refererlink on such icons so when you close something you get back to where you came from.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23934.

@C-Lodder
Copy link
Member Author

Thanks Elisa. I'll add the refer link.
Shame it doesnt work for you though. Do you get any console errors?

@brianteeman
Copy link
Contributor

@coolcat-creations are you sure you ran npm i after applying the patch. If you didnt then the dropdown appears but the functionality behind it is not present

@infograf768
Copy link
Member

Unpublish works fine here.
@C-Lodder
Shall we wait for the redirect depending on the origin of the edit to RTC this patch?

@C-Lodder
Copy link
Member Author

If that feature is the correct approach then sure

@brianteeman
Copy link
Contributor

Regarding the "return"

This issue is common in very many places. eg adding a note to a user

@infograf768
Copy link
Member

I do think indeed it makes sense to redirect to CPanel when editing the module from there.
Now, tbh, this new feature implies a lot of code for not much gain. But that's only me.

@C-Lodder
Copy link
Member Author

I'll leave it up to your guys then. RTC if you want or I can add the redirect in.

@infograf768
Copy link
Member

+1 for redirecting to CPanel.
It is not because it does not work elsewhere that we should not do it when we think of it

@C-Lodder
Copy link
Member Author

On second thoughts, adding a redirect is out of scope of this PR. This is purely to add support for unpublishing a module via the front-end and does not touch how the edit functionality works.

@coolcat-creations @infograf768 Please create a separate issue

@C-Lodder
Copy link
Member Author

@wilsonge conflicts resolved

@C-Lodder
Copy link
Member Author

C-Lodder commented Mar 6, 2019

@wilsonge conflicts resolved again

@infograf768
Copy link
Member

Restarted drone...

@infograf768
Copy link
Member

I have tested this item ✅ successfully on 952d583


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23934.

@ghost
Copy link

ghost commented Mar 9, 2019

@brianteeman can you please retest?

Co-Authored-By: C-Lodder <lodder15@hotmail.co.uk>
@infograf768
Copy link
Member

I have tested this item ✅ successfully on a1b150b


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23934.

@infograf768
Copy link
Member

@coolcat-creations
Please test so that we can go on with the return.

@infograf768
Copy link
Member

I have tested this item ✅ successfully on 52fb2cb


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23934.

@wilsonge wilsonge merged commit 632d686 into joomla:4.0-dev Mar 20, 2019
@wilsonge
Copy link
Contributor

Thankyou!

@infograf768
Copy link
Member

Please test #24109 for the redirection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language Change This is for Translators NPM Resource Changed This Pull Request can't be tested by Patchtester
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants