Commit Graph

160 Commits

Author SHA1 Message Date
Javi Martín
b9e137619a Simplify the way we provide the title in most cases
This is consistent with the way we're providing the main class.

Note we're still setting the title using a block in more complex cases.
2024-03-23 00:35:47 +01:00
Javi Martín
e867135a07 Always provide the title before writing anything else
This way our views are more consistent.
2024-03-23 00:35:47 +01:00
Javi Martín
629e208e9d Add and apply ArgumentAlignment rubocop rule
We're choosing the default `with_first_argument` style because it's the
one we use the most.
2023-08-18 14:56:16 +02:00
Senén Rodero Rodríguez
a6b1866908 Allow to pass the destination link for the geozone link
Previous to this commit the geozone link shown in the
legislation proposal page was pointing to the proposals
process feature instead to the legislation proposals.
2023-06-14 14:31:44 +02:00
Senén Rodero Rodríguez
b3c294bb9a Convert geozone shared partial to a component 2023-06-12 13:57:45 +02:00
Javi Martín
091abfc944 Use Active Storage to render attachments
This way we fix a bug we mentioned in commit 930bb753c which caused
links to documents to be broken when editing their title because the
title was used to generate the URL of the document.

Note we're still using Paperclip to render cached attachments because
this is the only case where we store files with just Paperclip and not
Active Storage.

With Active Storage, we render attachments just like any other resource,
using `polymorphic_path`. Paperclip included the `url` method in the
model; since the model doesn't have access to the request parameters
(like the host), this was inconvenient because it wasn't possible to
generate absolute URLs with Paperclip.

In order to simplify the code and make it similar to the way we used
Paperclip, we're adding a `variant` method accepting the name of a
variant and returning the variant.
2022-02-23 18:21:38 +01:00
Javi Martín
b98244afd9 Remove votes query optimizations
Just like we did in commit 0214184b2d for investments, we're removing
some possible optimizations (we don't have any benchmarks proving they
affect performance at all) in order to simplify the code.

The investement votes component `delegate` code was accidentally left
but isn't used since commit 0214184b2, so we're removing it now that
we're removing the `voted_for?` helper method.
2022-02-21 18:47:13 +01:00
Javi Martín
3645c333ab Expire cache when users follow/unfollow
When users followed/unfollowed a proposal or a budget investment, the
cache did not expire and so the wrong button was displayed after
reloading the page.
2021-04-13 13:52:18 +02:00
decabeza
1a0f0215a7 Hide related content on selected proposals 2019-09-11 22:18:42 +02:00
Javi Martín
cf9e36c767 Replace single quotes with double quotes
Most of these quotes were in the dashboard branch before we added the
rule for double quotes.
2019-09-10 19:21:03 +02:00
decabeza
19867836f8 Extract partial with mobile sticky content 2019-06-04 17:29:31 +02:00
Julian Herrero
5952c2664d Show a 'Selected proposal' message in the show view 2019-05-30 11:19:38 +02:00
Julian Herrero
6beb11f0a9 Show completed progress bar for successful proposals
Show a completed progress bar with total supports intead of showing
a message telling the proposal has reached the needed supports.
2019-05-30 11:19:38 +02:00
Julian Herrero
0237565ece Set correct attributes for data-sticky component 2019-05-22 12:41:25 +02:00
decabeza
8684835857 Adds sticky on proposals supports for mobile version 2019-05-22 12:40:12 +02:00
decabeza
91be3cf775 Fix more hound warnings 2019-03-27 15:22:14 +01:00
decabeza
eda6ea7f12 Merge branch 'master' into dashboard 2019-03-26 16:45:48 +01:00
Julian Herrero
7fe6285fe3 Use double quotes in app/views/proposals 2019-03-19 12:16:50 +01:00
taitus
aa908d8d60 Add progress tab as initial page on Dashboard. 2019-02-02 14:49:28 +01:00
decabeza
5a027f3a0a Removes create question button on proposals index and show 2018-12-19 13:55:00 +01:00
Javi Martín
1ff6390950 Fix proposal info rendering for managers
We were looking for the partial in management/proposals/info instead of
proposals/info.
2018-12-12 13:43:03 +01:00
Javi Martín
2fcbee6261 Manage proposal milestones 2018-12-11 20:09:47 +01:00
Javi Martín
8c45be7887 Show proposal info in admin 2018-12-11 20:09:30 +01:00
decabeza
ab70872a7d Adds new social share partial for proposals 2018-10-31 11:42:00 +01:00
decabeza
546105d989 Merge branch 'master' into dashboard-master 2018-10-19 01:48:37 +02:00
decabeza
fcb6e67ced Adds styles to proposals views 2018-10-05 18:10:10 +02:00
Juan Salvador Pérez García
42d448248c Routes have been refactored
Dashboard routes have been refactored. Now instead of having resources
for dashboard and routes inside a dashboard namespace the proposal
routes contain a dashboar singleton containing everything related to it.
2018-09-17 15:44:45 +02:00
decabeza
71d45093b6 Removes custom content on proposals 2018-07-30 19:35:12 +02:00
Juan Salvador Pérez García
4378331ece Fixes #188
shows draft state in proposals highlighted.
2018-07-17 17:59:11 +02:00
Juan Salvador Pérez García
303584a06e Show will be reused in preview
Show view will be reused when a preview is required
2018-07-17 17:57:30 +02:00
Juan Salvador Pérez García
a05e5c003f Fixed failing tests 2018-07-17 17:50:46 +02:00
Juan Salvador Pérez García
ff03db3c14 Fixes #153
Preview proposal after its creation
2018-07-17 17:49:42 +02:00
Juan Salvador Pérez García
d9f85bd756 Added draft label to public view of draft proposals. 2018-07-17 17:47:40 +02:00
Juan Salvador Pérez García
304ae23c81 Fixes #137
Edit button moved to dashboard.
Added button that publishes the proposal.
2018-07-17 17:47:40 +02:00
Juan Salvador Pérez García
77dd60427d Implements story #136
Adds draft state for proposals
2018-07-17 17:46:54 +02:00
decabeza
abf0fe992e Removes tablist and tab roles 2018-07-04 17:14:24 +02:00
decabeza
879b63ae5d Fixes indentation on proposals show 2018-06-08 15:15:08 +02:00
decabeza
354e42526f Adds missing class on proposals show 2018-06-08 15:13:09 +02:00
decabeza
6a812659c3 Adds missing tablist and tab roles 2018-06-06 12:01:17 +02:00
decabeza
18f8e35df3 Updates tabs component for proposals 2018-06-06 12:01:16 +02:00
Alberto García
223c06f588 Merge pull request #2567 from consul/mode-view
Mode view
2018-04-27 19:28:54 +02:00
Bertocq
21ead40e26 Disable document upload & show with new setting
When Setting allow_attached_documents is disabled (false value) the user
should not be able to upload documents neither see the documents lists
2018-04-10 13:10:14 +02:00
decabeza
e9f140ff23 Removes custom content on proposal show 2018-04-02 17:21:29 +02:00
decabeza
d4b88f1fae Adds description for social share buttons 2018-03-07 17:24:30 +01:00
decabeza
5b7a5a2b4b Removes document tab on proposals 2018-02-28 15:23:32 +01:00
Angel Perez
c46639dbb0 Add 'image_url' SEO properties to Proposal & Budget::Investment 'show' views 2017-12-18 09:55:44 -04:00
Raimond Garcia
d0b407d4e5 Merge pull request #2183 from consul/related-content
Related contents functionalities
2017-12-15 10:00:43 +01:00
María Checa
4f442792cc Added working related contents list
Also separated related contents into partials.
2017-12-13 13:32:00 +01:00
decabeza
e9ad4b49fb improves styles for follow button 2017-12-07 11:12:46 +01:00
decabeza
864c022b08 adds margin to maps on show views 2017-12-06 15:37:46 +01:00