Skip to content

Commit

Permalink
Fixes for amendments (#153)
Browse files Browse the repository at this point in the history
* update gemfile

* fix translator config

* fix translator config

* update decidim

* update amendments lang  on accepting

* update amendments lang  on accepting

* add test for user current locale

* add test for user current locale

* block chrome version

* block chrome version

* fix browser

* fix browser

* fix browser

* fix browser

* rename interpolations

* rename interpolations

* fix locale amendment forcing conf

* fix locale amendment forcing conf

* fix modal login window

* fix modal login window

* use html formatting for deepl

* use html formatting for deepl

* use split view by default in amendments

* use split view by default in amendments

* dont html escape titles

* dont html escape titles

* default type in proposal filtering

* default type in proposal filtering

* use around action instead of redirects

* use around action instead of redirects

* ensure reivew process uses original language too

* ensure reivew process uses original language too

* overrride extende menu items

* overrride extende menu items

* allow official proposals to be amended in any language

* allow official proposals to be amended in any language

* update amendment date

* update amendment date

* fix amendments acceptation

* fix override md5

* fix decidim branch

* fix decidim branch

* fix decidim branch

* fix test
  • Loading branch information
microstudi authored Feb 22, 2024
1 parent 8643dd2 commit 591a7aa
Show file tree
Hide file tree
Showing 28 changed files with 354 additions and 222 deletions.
147 changes: 74 additions & 73 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ GIT

GIT
remote: https://github.com/decidim-ice/decidim-module-decidim_awesome.git
revision: a4d5ab306ee305d7ee109fb9371be2597e67d6be
revision: c182090ea9b09629b014b9e6625f62201651ffc8
branch: limit-amendments
specs:
decidim-decidim_awesome (0.10.2)
Expand Down Expand Up @@ -47,7 +47,7 @@ GIT

GIT
remote: https://github.com/openpoke/decidim.git
revision: 501a1f905e0e8c7fa5de0ae7c7ab763b3bdac4f3
revision: aee1e1488187f0af8713d6686fac819f9b9d2f33
branch: 0.27-canada
specs:
decidim (0.27.5)
Expand Down Expand Up @@ -81,6 +81,7 @@ GIT
devise-i18n (~> 1.2)
devise_invitable (~> 2.0, >= 2.0.9)
decidim-api (0.27.5)
decidim-core (= 0.27.5)
graphql (~> 1.12, < 1.13)
graphql-docs (~> 2.1.0)
rack-cors (~> 1.0)
Expand All @@ -106,12 +107,11 @@ GIT
acts_as_list (~> 0.9)
batch-loader (~> 1.2)
browser (~> 2.7)
carrierwave (~> 2.2.1)
carrierwave (~> 2.2.5, >= 2.2.5)
cells-erb (~> 0.1.0)
cells-rails (~> 0.1.3)
charlock_holmes (~> 0.7)
date_validator (~> 0.12.0)
decidim-api (= 0.27.5)
devise (~> 4.7)
devise-i18n (~> 1.2)
diffy (~> 3.3)
Expand Down Expand Up @@ -226,63 +226,63 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (6.1.7.6)
actionpack (= 6.1.7.6)
activesupport (= 6.1.7.6)
actioncable (6.1.7.7)
actionpack (= 6.1.7.7)
activesupport (= 6.1.7.7)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.1.7.6)
actionpack (= 6.1.7.6)
activejob (= 6.1.7.6)
activerecord (= 6.1.7.6)
activestorage (= 6.1.7.6)
activesupport (= 6.1.7.6)
actionmailbox (6.1.7.7)
actionpack (= 6.1.7.7)
activejob (= 6.1.7.7)
activerecord (= 6.1.7.7)
activestorage (= 6.1.7.7)
activesupport (= 6.1.7.7)
mail (>= 2.7.1)
actionmailer (6.1.7.6)
actionpack (= 6.1.7.6)
actionview (= 6.1.7.6)
activejob (= 6.1.7.6)
activesupport (= 6.1.7.6)
actionmailer (6.1.7.7)
actionpack (= 6.1.7.7)
actionview (= 6.1.7.7)
activejob (= 6.1.7.7)
activesupport (= 6.1.7.7)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.1.7.6)
actionview (= 6.1.7.6)
activesupport (= 6.1.7.6)
actionpack (6.1.7.7)
actionview (= 6.1.7.7)
activesupport (= 6.1.7.7)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.7.6)
actionpack (= 6.1.7.6)
activerecord (= 6.1.7.6)
activestorage (= 6.1.7.6)
activesupport (= 6.1.7.6)
actiontext (6.1.7.7)
actionpack (= 6.1.7.7)
activerecord (= 6.1.7.7)
activestorage (= 6.1.7.7)
activesupport (= 6.1.7.7)
nokogiri (>= 1.8.5)
actionview (6.1.7.6)
activesupport (= 6.1.7.6)
actionview (6.1.7.7)
activesupport (= 6.1.7.7)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
active_link_to (1.0.5)
actionpack
addressable
activejob (6.1.7.6)
activesupport (= 6.1.7.6)
activejob (6.1.7.7)
activesupport (= 6.1.7.7)
globalid (>= 0.3.6)
activemodel (6.1.7.6)
activesupport (= 6.1.7.6)
activerecord (6.1.7.6)
activemodel (= 6.1.7.6)
activesupport (= 6.1.7.6)
activestorage (6.1.7.6)
actionpack (= 6.1.7.6)
activejob (= 6.1.7.6)
activerecord (= 6.1.7.6)
activesupport (= 6.1.7.6)
activemodel (6.1.7.7)
activesupport (= 6.1.7.7)
activerecord (6.1.7.7)
activemodel (= 6.1.7.7)
activesupport (= 6.1.7.7)
activestorage (6.1.7.7)
actionpack (= 6.1.7.7)
activejob (= 6.1.7.7)
activerecord (= 6.1.7.7)
activesupport (= 6.1.7.7)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (6.1.7.6)
activesupport (6.1.7.7)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand All @@ -294,8 +294,8 @@ GEM
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
aws-eventstream (1.3.0)
aws-partitions (1.888.0)
aws-sdk-core (3.191.1)
aws-partitions (1.894.0)
aws-sdk-core (3.191.3)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
Expand All @@ -309,7 +309,7 @@ GEM
aws-sigv4 (~> 1.8)
aws-sigv4 (1.8.0)
aws-eventstream (~> 1, >= 1.0.2)
axe-core-api (4.8.1)
axe-core-api (4.8.2)
dumb_delegator
virtus
axe-core-rspec (4.1.0)
Expand Down Expand Up @@ -382,7 +382,7 @@ GEM
commonmarker (0.23.10)
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
crack (0.4.6)
crack (1.0.0)
bigdecimal
rexml
crass (1.0.6)
Expand Down Expand Up @@ -420,11 +420,11 @@ GEM
devise (>= 4.6)
diff-lcs (1.5.1)
diffy (3.4.2)
doc2text (0.4.6)
nokogiri (>= 1.13.2, < 1.15.0)
doc2text (0.4.7)
nokogiri (>= 1.13.2, < 1.17.0)
rubyzip (~> 2.3.0)
docile (1.4.0)
doorkeeper (5.6.8)
doorkeeper (5.6.9)
railties (>= 5)
doorkeeper-i18n (4.0.1)
dumb_delegator (1.0.0)
Expand Down Expand Up @@ -474,7 +474,7 @@ GEM
activemodel (>= 4.1, < 7.1)
activesupport (>= 4.1, < 7.1)
railties (>= 4.1, < 7.1)
fugit (1.9.0)
fugit (1.10.0)
et-orbi (~> 1, >= 1.2.7)
raabro (~> 1.4)
gemoji (3.0.1)
Expand Down Expand Up @@ -522,7 +522,8 @@ GEM
rails (>= 3.2.0)
jmespath (1.6.2)
json (2.7.1)
jwt (2.7.1)
jwt (2.8.0)
base64
kaminari (1.2.2)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.2)
Expand All @@ -541,7 +542,7 @@ GEM
kramdown (~> 2.0)
launchy (2.5.2)
addressable (~> 2.8)
letter_opener (1.8.1)
letter_opener (1.9.0)
launchy (>= 2.2, < 3)
letter_opener_web (2.0.0)
actionmailer (>= 5.2)
Expand Down Expand Up @@ -594,7 +595,7 @@ GEM
net-smtp (0.4.0.1)
net-protocol
nio4r (2.7.0)
nokogiri (1.14.5-x86_64-linux)
nokogiri (1.16.2-x86_64-linux)
racc (~> 1.4)
oauth (1.1.0)
oauth-tty (~> 1.0, >= 1.0.1)
Expand Down Expand Up @@ -660,7 +661,7 @@ GEM
nio4r (~> 2.0)
raabro (1.4.0)
racc (1.7.3)
rack (2.2.8)
rack (2.2.8.1)
rack-attack (6.7.0)
rack (>= 1.0, < 4)
rack-cors (1.1.1)
Expand All @@ -672,20 +673,20 @@ GEM
rack
rack-test (2.1.0)
rack (>= 1.3)
rails (6.1.7.6)
actioncable (= 6.1.7.6)
actionmailbox (= 6.1.7.6)
actionmailer (= 6.1.7.6)
actionpack (= 6.1.7.6)
actiontext (= 6.1.7.6)
actionview (= 6.1.7.6)
activejob (= 6.1.7.6)
activemodel (= 6.1.7.6)
activerecord (= 6.1.7.6)
activestorage (= 6.1.7.6)
activesupport (= 6.1.7.6)
rails (6.1.7.7)
actioncable (= 6.1.7.7)
actionmailbox (= 6.1.7.7)
actionmailer (= 6.1.7.7)
actionpack (= 6.1.7.7)
actiontext (= 6.1.7.7)
actionview (= 6.1.7.7)
activejob (= 6.1.7.7)
activemodel (= 6.1.7.7)
activerecord (= 6.1.7.7)
activestorage (= 6.1.7.7)
activesupport (= 6.1.7.7)
bundler (>= 1.15.0)
railties (= 6.1.7.6)
railties (= 6.1.7.7)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
Expand All @@ -700,9 +701,9 @@ GEM
rails-i18n (6.0.0)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 7)
railties (6.1.7.6)
actionpack (= 6.1.7.6)
activesupport (= 6.1.7.6)
railties (6.1.7.7)
actionpack (= 6.1.7.7)
activesupport (= 6.1.7.7)
method_source
rake (>= 12.2)
thor (~> 1.0)
Expand All @@ -717,7 +718,7 @@ GEM
ffi (~> 1.0)
redcarpet (3.6.0)
redis (4.8.1)
redis-client (0.19.1)
redis-client (0.20.0)
connection_pool
regexp_parser (2.9.0)
request_store (1.5.1)
Expand Down Expand Up @@ -778,7 +779,7 @@ GEM
rubocop-rspec (2.11.1)
rubocop (~> 1.19)
ruby-progressbar (1.13.0)
ruby-vips (2.2.0)
ruby-vips (2.2.1)
ffi (~> 1.12)
rubyXL (3.4.25)
nokogiri (>= 1.10.8)
Expand All @@ -797,7 +798,7 @@ GEM
rubyzip (>= 1.2.2)
semantic_range (3.0.0)
seven_zip_ruby (1.3.0)
sidekiq (7.2.1)
sidekiq (7.2.2)
concurrent-ruby (< 2)
connection_pool (>= 2.3.0)
rack (>= 2.2.4)
Expand Down Expand Up @@ -869,7 +870,7 @@ GEM
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webmock (3.20.0)
webmock (3.22.0)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ These ENV vars modifies the behavior of the application in some ways:

| ENV | Description |
| --- | --- |
| `SUBMENU_MAX_ITEMS` | Number of items before the button "more" appears in a submenu of a participatory space (defaults to `6`) |
| `DONATE_BUTTON` | If present, it will show a button with the text "donate" linked to this url. Currently in the process sidebar and when creating a proposal. Locale can be handled with interpolations (ie: `http://some.thing/%{locale}/pay_here`) |
| `CHAT_BUTTON` | If present, it will show a button with the text "AGM Chat (beta)" linked to this url. Currently in the process sidebar. Locale can be handled with interpolations (ie: `http://some.thing/%{locale}/chat_here`) |
| `REDIRECT_SIGN_UP` | If present and sign up is enabled, it redirects user registration to the URL specified in it. Can process some variable interpolation like `%{locale}` that would be replace by the current users' locale |
Expand Down
16 changes: 16 additions & 0 deletions app/cells/decidim/diff/attribute.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<div class="diff-for-<%= data[:label].parameterize %>">
<div class="row">
<h3 class="section-heading mediumlarge-12 columns">
<%= data[:label] %>
</h3>
</div>

<div class="row diff_view diff_view_split" id="attribute-diff-unified-<%= data[:label].parameterize %>-<%= format %>">
<%= diff_split(data, "left", format) %>
<%= diff_split(data, "right", format) %>
</div>

<div class="row diff_view diff_view_unified hide" id="attribute-diff-unified-<%= data[:label].parameterize %>-<%= format %>">
<%= diff_unified(data, format) %>
</div>
</div>
34 changes: 34 additions & 0 deletions app/cells/decidim/diff/diff_mode_dropdown.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<div class="diff-view-by show-for-mediumlarge">
<div class="diff-view-by__dropdown">
<span class="diff-view-by__text">
<%= t("versions.dropdown.choose_diff_view_mode") %>
</span>

<ul class="dropdown menu" data-dropdown-menu
data-autoclose="false"
data-disable-hover="true"
data-click-open="true"
data-close-on-click="true"
role="menubar">
<li class="is-dropdown-submenu-parent" role="presentation">
<a href="#diffmode-chooser-menu" id="diff-view-selected" aria-controls="diffmode-chooser-menu" aria-haspopup="true" aria-label="<%= t("versions.dropdown.choose_diff_view_mode_menu") %>" role="menuitem">
<%= t("versions.dropdown.option_split") %>
</a>

<ul class="menu is-dropdown-submenu" id="diffmode-chooser-menu" role="menu" aria-labelledby="diff-view-selected">
<li role="presentation">
<%= link_to "#diff-view-split", class: "diff-view-mode diff-view-split", id:"diff-view-split", role: "menuitem" do %>
<%= t("versions.dropdown.option_split") %>
<% end %>
</li>

<li role="presentation">
<%= link_to "#diff-view-unified", class: "diff-view-mode diff-view-unified", id:"diff-view-unified", role: "menuitem" do %>
<%= t("versions.dropdown.option_unified") %>
<% end %>
</li>
</ul>
</li>
</ul>
</div>
</div>
Loading

0 comments on commit 591a7aa

Please sign in to comment.