Skip to content

Commit

Permalink
merge bulk actions with answer templates
Browse files Browse the repository at this point in the history
  • Loading branch information
antopalidi committed Jul 3, 2024
2 parents a683bca + 9eefad3 commit 37df56e
Show file tree
Hide file tree
Showing 682 changed files with 13,568 additions and 4,040 deletions.
1 change: 0 additions & 1 deletion .erb-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,6 @@ linters:
- is-accordion-submenu
- is-accordion-submenu-parent
- is-accordion-submenu-parent[aria-expanded=true]
- is-admin
- is-anchored
- is-at-bottom
- is-at-top
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Individual workflows with changes:
- `ci_javascript.yml`: Runs tests for the JS files. Tests must run from the project root folder. You will need to install NodeJS and the JS dependencies:

```yml
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/brakeman.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
if: "!startsWith(github.head_ref, 'chore/l10n')"
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ruby/setup-ruby@v1
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@ jobs:
env:
POSTGRES_PASSWORD: postgres
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ inputs.ruby_version }}
bundler-cache: true
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node_version }}
cache: 'npm'
cache-dependency-path: ./package-lock.json
- uses: actions/cache@v3
- uses: actions/cache@v4
id: app-cache
with:
path: ./spec/decidim_dummy_app/
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci_generators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,27 +72,27 @@ jobs:
DATABASE_HOST: localhost
RUBYOPT: '-W:no-deprecated'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Get npm cache directory path
id: npm-cache-dir-path
run: echo "dir=$(npm get cache)-${{ env.DECIDIM_MODULE }}" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
id: npm-cache
with:
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
key: npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
npm-
- uses: actions/cache@v3
- uses: actions/cache@v4
id: app-cache
with:
path: ./Gemfile.lock
Expand All @@ -106,7 +106,7 @@ jobs:
working-directory: ${{ env.DECIDIM_MODULE }}
env:
SIMPLECOV: "true"
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
name: Upload coverage
with:
token: ${{ env.CODECOV_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci_javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ jobs:
if: "!startsWith(github.head_ref, 'chore/l10n')"
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Get npm cache directory path
id: npm-cache-dir-path
run: echo "dir=$(npm get cache)-javascript" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
id: npm-cache
with:
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Get npm cache directory path
id: npm-cache-dir-path
run: echo "dir=$(npm get cache)-main" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
id: npm-cache
with:
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci_performance_metrics_monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,20 @@ jobs:
DATABASE_HOST: localhost
RUBYOPT: '-W:no-deprecated'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Get npm cache directory path
id: npm-cache-dir-path
run: echo "dir=$(npm get cache)-${{ env.DECIDIM_MODULE }}" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
id: npm-cache
with:
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
Expand All @@ -90,7 +90,7 @@ jobs:
name: Warmup the cache at the configured lighthouse urls
working-directory: ./development_app/
- name: Audit URLs using Lighthouse
uses: treosh/lighthouse-ci-action@v10
uses: treosh/lighthouse-ci-action@v11
with:
runs: 3 # run more than once to warm up the application
uploadArtifacts: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci_production_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,20 @@ jobs:
DATABASE_HOST: localhost
RUBYOPT: '-W:no-deprecated'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Get npm cache directory path
id: npm-cache-dir-path
run: echo "dir=$(npm get cache)-${{ env.DECIDIM_MODULE }}" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
id: npm-cache
with:
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@ jobs:
if: "!startsWith(github.head_ref, 'chore/l10n')"
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Get npm cache directory path
id: npm-cache-dir-path
run: echo "dir=$(npm get cache)-lint" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
id: npm-cache
with:
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ jobs:
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ inputs.ruby_version }}
- uses: nanasess/setup-chromedriver@v2
- uses: actions/cache@v3
- uses: actions/cache@v4
id: app-cache
with:
path: ./spec/decidim_dummy_app/
Expand Down Expand Up @@ -110,13 +110,13 @@ jobs:
SIMPLECOV: "true"
SHAKAPACKER_RUNTIME_COMPILE: "false"
NODE_ENV: "test"
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
name: Upload coverage
with:
token: ${{ inputs.codecov_token }}
name: ${{ inputs.working-directory }}
flags: ${{ inputs.working-directory }}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: screenshots
Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ GEM
mime-types-data (3.2023.1205)
mini_magick (4.12.0)
mini_mime (1.1.5)
mini_portile2 (2.8.5)
mini_portile2 (2.8.7)
minitest (5.22.2)
msgpack (1.4.5)
multi_xml (0.6.0)
Expand All @@ -492,7 +492,7 @@ GEM
net-smtp (0.3.4)
net-protocol
nio4r (2.7.0)
nokogiri (1.16.2)
nokogiri (1.16.5)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
oauth (1.1.0)
Expand Down Expand Up @@ -559,7 +559,7 @@ GEM
public_suffix (5.0.4)
puma (6.4.2)
nio4r (~> 2.0)
racc (1.7.3)
racc (1.8.0)
rack (2.2.8.1)
rack-attack (6.7.0)
rack (>= 1.0, < 4)
Expand Down
23 changes: 22 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,28 @@ bin/rails db:drop db:create db:migrate assets:precompile db:seed

You can see more details about this change on PR [\#12828](https://github.com/decidim/decidim/pull/12828)

### 5.3. [[TITLE OF THE CHANGE]]
### 5.3. Verifications need a help text

In order to explain better to administrators what authorizations they have available we have added a new internationalization (i18n) key to the verifications workflows.

If you have a custom authorization handler, you need to add the help text to the `config/locales/en.yml` file, where `en.yml` is the locale file for the language you are using.

For instance, for the SMS authorization handler, you need to add the following key:

```yaml
en:
decidim:
authorization_handlers:
admin:
sms:
help:
- This is the help text for the SMS authorization handler
- This is the second line of the help text
```

You can see more details about this change on PR [\#13029](https://github.com/decidim/decidim/pull/13029)

### 5.4. [[TITLE OF THE CHANGE]]

In order to [[REASONING (e.g. improve the maintenance of the code base)]] we have changed...

Expand Down
3 changes: 3 additions & 0 deletions config/i18n-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ ignore_unused:
- decidim.admin.participatory_process_steps.default_title
- decidim.authorization_handlers.{direct,multistep}
- decidim.admin.models.assembly_member.positions.*
- decidim.application.documents.component_documents.*
- decidim.statistics.*
- decidim.components.*
- decidim.filters.linked_classes.*
Expand Down Expand Up @@ -349,8 +350,10 @@ ignore_unused:
- layouts.decidim.assemblies.promoted_assembly.take_part
- versions.dropdown.option_*
- decidim.meetings.meetings.filters.*
- decidim.meetings.polls.questions.index_admin.statuses.{closed,published,unpublished}
- decidim.meetings.directory.meetings.index.space_type
- decidim.authorization_modals.content.*
- decidim.authorization_handlers.admin.{another_dummy_authorization_handler,csv_census,dummy_authorization_handler,id_documents,postal_letter,sms}.help
- time.buttons.*

## Exclude these keys from the `i18n-tasks eq-base' report:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ResultsController < Decidim::Accountability::ApplicationController
helper Decidim::TraceabilityHelper
helper Decidim::Accountability::BreadcrumbHelper

helper_method :results, :result, :first_class_categories, :count_calculator, :nav_paths
helper_method :results, :result, :first_class_categories, :count_calculator

def show
raise ActionController::RoutingError, "Not Found" unless result
Expand All @@ -29,24 +29,6 @@ def result
@result ||= search_collection.includes(:timeline_entries).find_by(id: params[:id])
end

def next_result
return if search_collection.size < 2

search_collection.order(:start_date, :id).where(Decidim::Accountability::Result.arel_table[:id].gt(result.id)).first
end

def prev_result
return if search_collection.size < 2

search_collection.order(:start_date, :id).where(Decidim::Accountability::Result.arel_table[:id].lt(result.id)).last
end

def nav_paths
return {} if result.blank?

{ prev_path: prev_result, next_path: next_result }.compact_blank.transform_values { |result| result_path(result) }
end

def search_collection
Result.where(component: current_component)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= render layout: "layouts/decidim/shared/layout_item", locals: nav_paths do %>
<%= render layout: "layouts/decidim/shared/layout_item" do %>
<%= cell("decidim/accountability/project", result) %>

<section class="layout-main__section layout-main__buttons" data-buttons>
Expand Down
6 changes: 3 additions & 3 deletions decidim-accountability/config/locales/eu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ eu:
create: Egoera sortu
title: Beste egoera bat
update:
invalid: Arazo bat egon da egoera hau eguneratzean.
success: Egoera zuzen eguneratua.
invalid: Arazoren bat gertatu da egoera hau sortzean.
success: Egoera ondo eguneratu da.
timeline_entries:
create:
invalid: Arazo bat egon da sarrera hau sortzean.
invalid: Arazoen bat gertatu da sarrera hau sortzean.
success: Sarrera zuzen sortua.
destroy:
success: Sarrera behar bezala ezabatua.
Expand Down
5 changes: 5 additions & 0 deletions decidim-accountability/config/locales/pl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ pl:
success: Importowanie wyników zakończyło się pomyślnie. Możesz przejrzeć wyniki w panelu administracyjnym.
import_projects_mailer:
import:
added_projects:
one: Wynik został prawidłowo zaimportowany z projektów.
few: "Wyniki zostały prawidłowo zaimportowane z projektów."
many: "Wyniki zostały prawidłowo zaimportowane z projektów."
other: "%{count} wynik/wyniki/wyników został/zostały/zostało zaimportowanych z projektów."
subject: Zaimportowano wyniki
success: Pomyślnie zaimportowano projekty do wyników w komponencie %{component_name}. Możesz przejrzeć wyniki w interfejsie administracji.
last_activity:
Expand Down
Loading

0 comments on commit 37df56e

Please sign in to comment.