Commit Graph

383 Commits

Author SHA1 Message Date
taitus
93b35fcecc Redirect root path requests to the tenants administration
When the `multitenancy_management_mode` is enabled.

In order to avoid infinite redirects when regular users try to access
the admin section, we're redirecting to the account page in this case.
Otherwise, the admin section would redirect to the root path, which
would redirect to the admin section, which would redirect to the root
path, and so on.
2024-11-06 11:17:58 +01:00
taitus
a5911f5c6a Modify admin layout to only manage tenants and admins
We only want to render the account link and login items in the header.
And we want only render the Multitenancy and Administrators sections in
the admin sidebar.

We include the administrators management so it's possible to give
permissions to other users to manage tenants.

In order to restrict access to other sections by typing the URL or
following a link, we're only enabling the rest of the routes when we
aren't in the multitenancy management mode.
2024-11-06 11:17:53 +01:00
Javi Martín
60dbda600d Move resolve clauses to the main routes file
We're going to add some constraints in the routes file, and if we add a
`resolve` clause inside a constraints block, we get an error saying that
"The resolve method can't be used inside a routes scope block" when
starting the application.
2024-11-06 11:07:00 +01:00
Javi Martín
9d818b4ec2 Make it easier to add custom routes
Until now, people had to edit the original route files in order to add
custom routes.

This was inconsistent with the other customizations, since we use custom
folders or files for customizing controllers, components, views, ...
(which you usually customize as well when adding a new route).

So now we're providing a file for custom routes, which will make it
easier to know which routes are not present in Consul Democracy by
default.
2024-09-11 13:27:48 +02:00
Javi Martín
631b48f586 Remove public stats
This page isn't linked from anywhere and most Consul Democracy
installations don't even know it exists, so it's useless for most
people.

If we ever bring it back, we should at least add a link pointing to this
page.
2024-05-09 14:28:32 +02:00
Javi Martín
468761253b Add per-tenant sitemap to robots.txt file
While we ping some search engines (currently, only Google) when
generating the sitemap files, we weren't telling search engines
accessing through the `robots.txt` file where to find the sitemap. Now
we're doing so, using the right sitemap file for the right tenant.
2022-11-09 18:19:20 +01:00
Javi Martín
274b0f9b43 Remove legacy annotations route
We forgot to remove it in commit 54e59a8a5. We were getting an exception
on production when accessing the `/annotations/search` route because of
it.
2022-06-02 18:17:52 +02:00
Javi Martín
de4be15a8d Add empty SDG index 2020-12-23 13:18:10 +01:00
Javi Martín
a42cb050a7 Add SDG content section 2020-12-02 12:38:03 +01:00
Javi Martín
ac6d50e06b Remove tracker role
The current tracking section had a few issues:

* When browsing as an admin, this section becomes useless since no
investments are shown
* Browsing investments in the admin section, you're suddenly redirected
to the tracking section, making navigation confusing
* One test related to the officing dashboard failed due to these changes
and had been commented
* Several views and controller methods were copied from other sections,
leading to duplication and making the code harder to maintain
* Tracking routes were defined for proposals and legislation processes,
but in the tracking section only investments were shown
* Probably many more things, since these issues were detected after only
an hour reviewing and testing the code

So we're removing this untested section before releasing version 1.1. We
might add it back afterwards.
2019-11-01 20:08:46 +01:00
Javi Martín
db97f9d08c Add and apply rubocop rules for empty lines
We were very inconsistent regarding these rules.

Personally I prefer no empty lines around blocks, clases, etc... as
recommended by the Ruby style guide [1], and they're the default values
in rubocop, so those are the settings I'm applying.

The exception is the `private` access modifier, since we were leaving
empty lines around it most of the time. That's the default rubocop rule
as well. Personally I don't have a strong preference about this one.


[1] https://rubystyle.guide/#empty-lines-around-bodies
2019-10-24 17:11:47 +02:00
Javi Martín
c6c3ff5423 Remove leftover sandbox code
The rest of the sandbox code was removed in commit d679c1eb.
2019-10-05 03:38:44 +02:00
taitus
744a3d48fd Create RemoteTranslations Controller
- Create RemoteTranslations Controller to receive resources without
  translations and create RemoteTranslation instances when theirs
  translations are not enqueued.
- Create remote_translation_enqueued? class method on RemoteTranslation
  model to check if exists same remote translations without errors
  pending to translate.
2019-06-27 09:21:18 +02:00
German Galia
9ce524e1f3 Create tracker rol 2019-06-12 16:23:40 +02:00
Julian Herrero
8510624692 Use double quotes in config/routes 2019-03-15 10:29:07 +01:00
Julian Herrero
87be6f302c Add default site customization pages
From now on these static pages:

`/privacy'
`/conditions'
`/accesibility'
`/help/faq'
`/welcome'

have been moved to the DB and can be modified easily by any
administrator in `/admin/site_customization/pages'
2019-03-14 18:35:51 +01:00
decabeza
ccee843da7 Remove unused settings
These settings are customised for Madrid's fork. On CONSUL any user can include new links using site customisation content blocks from admin panel.
2019-02-18 15:40:11 +01:00
decabeza
dbf41421ed Removes guide feature 2018-10-17 14:58:29 +02:00
Javi Martín
27155dd7d7 Fix typo 2018-09-12 12:35:28 +02:00
Raúl Fuentes
8e68f4bbd0 Update abilities for ckeditor4 images
Add the image controller to use the obsolete load_and_authorize_resource
and authorize_resource methods in the gem
2018-09-12 12:35:28 +02:00
decabeza
286371c9d9 Changes more_info folder and path to help 2018-01-30 18:26:30 +01:00
rgarcia
d3d05f9cee Add guide to create a proposal or investment
During a Participatory Budget, some users are getting confused and
creating a proposal instead of a budget investment. This intermediate
page should help them create investments

Adding a feature flag just in case other forks don’t need this feature
and setting seeds and dev_seeds for appropriate initial setup
2018-01-18 21:09:21 +01:00
Angel Perez
1cd47da9d4 Split routes into small files for easier customization (#1852) 2018-01-09 15:49:01 -04:00
María Checa
7d8b5838b9 Added new related contents score method 2017-12-19 13:14:12 +01:00
María Checa
d944a88c63 Added flag/unflag related content routes 2017-12-18 18:21:51 +01:00
María Checa
5c7b5eed53 Added RelatedContentsController 2017-12-14 14:50:47 +01:00
Bertocq
7339a98b74 Create installation controller with consul details method, add route on routes.rb 2017-12-04 18:32:04 +01:00
María Checa
f9e65b0f80 Merge pull request #2102 from wairbut-m2c/iagirre-admin-poll-stats
Iagirre admin poll stats
2017-11-29 20:07:53 +01:00
Angel Perez
db86cc5216 Enable 'destroy' action for Valuator on controller 2017-11-17 13:12:26 -04:00
María Checa
658d115c91 Removed share view for Legislation Proposals 2017-10-26 17:13:04 +02:00
decabeza
f0cfe50de4 Merge branch 'master' into 1856-legislation_processes_proposals_phase 2017-10-25 11:52:31 +02:00
iagirre
15db2a150d Merge remote-tracking branch 'consul/master' into iagirre-admin-poll-stats 2017-10-24 10:37:47 +02:00
rgarcia
21c7ff15fe fixes routes for poll's results and stats 2017-10-23 21:39:59 +02:00
María Checa
5a9ee4642e Merge branch 'master' into 1786-poll_results 2017-10-23 13:43:58 +02:00
iagirre
5a3e701e8d Polls' stats migrated from Madrid's fork and sortable functions added for tables 2017-10-23 13:19:22 +02:00
Bertocq
45d91a7e50 Add Poll booth_assignments and :Poll::BoothAssignment manage routes, actions and views 2017-10-19 19:27:26 +02:00
María Checa
70a35fbe58 Poll views improvements
Reorganized poll `#show`,  `#stats` and `#results` views. Gave stats section its own route.
2017-10-18 18:35:53 +02:00
María Checa
35f24b519d Merge branch 'master' into 1786-poll_results 2017-10-18 17:33:16 +02:00
iagirre
c896800325 Removed added and unused route 2017-10-18 09:53:03 +02:00
María Checa
55c15bca86 Added poll results route 2017-10-17 18:29:14 +02:00
iagirre
78cc09cc5a Controllers and models to see the polls stats. Routes related also added. 2017-10-16 17:25:04 +02:00
iagirre
2b10b59e2a Order in the admin page using jquery-ui sortable widget. 2017-10-10 16:38:29 +02:00
María Checa
841ef2a3a2 Merge branch 'master' into 1856-legislation_processes_proposals_phase 2017-10-09 17:19:07 +02:00
Raimond Garcia
23ef9ded1d Merge branch 'master' into aperez-edit-poll-question-answers 2017-10-06 18:47:04 +02:00
Raimond Garcia
8576f59af1 Merge branch 'master' into aperez-edit-poll-question-answers 2017-10-06 18:14:00 +02:00
Angel Perez
63eaa0bef6 Allow Poll::Question::Answer edit
As requested by #1992
2017-10-06 09:48:17 -04:00
decabeza
de9b599578 Merge branch 'master' into question-answer-documents 2017-10-06 13:55:49 +02:00
María Checa
590344a576 Added view to upload documents to poll answers 2017-10-06 01:18:53 +02:00
Raimond Garcia
c72f95c72b Merge branch 'master' into aperez-admin-question-videos 2017-10-06 01:12:22 +02:00
Angel Perez
5862eea516 Add controllers/views for Poll::Question::Answer::Video 2017-10-05 12:34:20 -04:00