-
-
Notifications
You must be signed in to change notification settings - Fork 393
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hide participatory space link from menu if no element is published #2074
Hide participatory space link from menu if no element is published #2074
Conversation
ec9d640
to
54d8add
Compare
@@ -55,6 +55,7 @@ class Engine < ::Rails::Engine | |||
menu.item I18n.t("menu.assemblies", scope: "decidim"), | |||
decidim_assemblies.assemblies_path, | |||
position: 2.5, | |||
if: Decidim::Assembly.published.any?, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be scoped to the current organization?
@@ -57,6 +57,7 @@ class Engine < ::Rails::Engine | |||
menu.item I18n.t("menu.processes", scope: "decidim"), | |||
decidim_participatory_processes.participatory_processes_path, | |||
position: 2, | |||
if: Decidim::ParticipatoryProcess.published.any?, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
54d8add
to
d23262a
Compare
Codecov Report
@@ Coverage Diff @@
## master #2074 +/- ##
==========================================
+ Coverage 98.55% 98.56% +<.01%
==========================================
Files 1174 1174
Lines 26760 26766 +6
==========================================
+ Hits 26373 26381 +8
+ Misses 387 385 -2 |
@oriolgual solved! I've also added tests for the case you pointed out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! If that's the case, I'd remove all the handling of empty collection views (including locales) as well.
d23262a
to
eaf8b77
Compare
c3bdf10
to
dfcc081
Compare
馃帺 What? Why?
This PR hides the link to the spaces engine from the main menu if no element from that space is published. This means that if there are no published assemblies, there will be no link to the engine.
馃搶 Related Issues
馃摲 Screenshots (optional)
http://recordit.co/EGYedzRDvr