-
Notifications
You must be signed in to change notification settings - Fork 32
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
209 & 1349 - Permit CMS pages & news to have participation layout #1334
Conversation
I've created a page collection inside a process, and get this error when trying to view the collection: NoMethodError in GobiertoAdmin::GobiertoParticipation::Processes::ProcessPagesController#index |
Codecov Report
@@ Coverage Diff @@
## master #1334 +/- ##
==========================================
- Coverage 77.55% 77.42% -0.14%
==========================================
Files 490 491 +1
Lines 13039 13072 +33
==========================================
+ Hits 10113 10121 +8
- Misses 2926 2951 +25
Continue to review full report at Codecov.
|
…ages * When dealing with process pages (not news), instead of redirecting to admin process news view, use the default collection view we're using for site and modules. * When editing a process page (not news), show the default admin cms edit menu, without process-specific breadcrumb.
e2cc1b4
to
de64b16
Compare
Conflicts: app/models/gobierto_common/collection.rb app/views/gobierto_participation/processes/pages/show.html.erb
I've done the following changes:
*1 As discused with @apradillap and @ferblape, given that making a separate controller for pages and news in this case implies lots of renaming, and that #932 will be implemented, we will temporarily access process pages under the |
Closes also #1349. This is ready. |
@amiedes which is the difference between the page Alvaro created (http:https://newalcobendas.gobify.net/paginas/acerca-de) and yours (http:https://newalcobendas.gobify.net/participacion/paginas/pagina-estatica-participacion) ?? They look different |
Closes #209
Closes #1349
What does this PR do?
app/controllers/gobierto_participation/pages_controller.rb
andapp/controllers/gobierto_participation/news_controller.rb
, so now pages belonging to participation module can be routed to this controller and inherit the participation layout.container_id
should be scope in site.app/views/gobierto_cms/templates/_new.html.erb
partial. Should be_news
. This was causing some exceptions.How should this be manually tested?
I've done the following testing, but feel free to test other flows:
Doubts
I have doubts about the collection of pages Alvaro mentions in the issue (http:https://newalcobendas.gobify.net/paginas/acerca-de), since now it still has the normal layout. I understand the current behavior is the right one, since the collection is scoped on the site, not participation.
Future work
I think there's a good opportunity for refactor in the methods in
app/models/gobierto_cms/page.rb
that retrieve pages from a colleciton, module, site etc. Since refactoring this spans to many other files, I've limited myself to adding a few clarifying comments before the methods.Does this PR changes any configuration file?
No