-
-
Notifications
You must be signed in to change notification settings - Fork 398
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'fix/activities-block-follow-button' into feature/redesi…
…gn-staging * fix/activities-block-follow-button: (27 commits) Add tests to follow button in processes and assemblies landing page Add follow button to participatory spaces last activities content block Remove duplication from participatory spaces publications controllers (#11549) Fix the a11y tool icons with redesign (#11175) Remove duplication from amendments events specs (#11553) Remove duplication from elections' user roles forms (#11548) Update Node.js from v16.13.0 to v18.17.1 (#11564) Remove duplication from stats presenters (#11551) Fix Bootsnap configuration (#11483) Remove duplication for add questions specs examples (#11559) Remove duplication from invites queries (#11552) Fix typos and copy-paste errors from comments and examples (#11536) Fix conference venues meetings visibility (#11542) Add recognition to BrowserStack in the README (#11546) Remove unused view hook for `:upcoming_meeting_for_card` (#11543) Remove unused dependency: `wicked` (#11150) Clean-up initiatives signature URLs and methods (#11545) Refactor initiative signing wizard (#10731) Fix Permissions screen on budgets throw errors (#11532) Redesign: read more literal (#11516) ...
- Loading branch information
Showing
193 changed files
with
1,398 additions
and
1,237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
16.13.0 | ||
18.17.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
decidim-admin/app/controllers/decidim/admin/space_publications_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# frozen_string_literal: true | ||
|
||
module Decidim | ||
module Admin | ||
# Base controller that can be inherited by other spaces to publish and unpublish the Participatory Space | ||
# | ||
class SpacePublicationsController < Decidim::Admin::ApplicationController | ||
def create | ||
enforce_permission_to_publish | ||
|
||
publish_command.call(current_participatory_space, current_user) do | ||
on(:ok) do | ||
flash[:notice] = I18n.t("create.success", scope: i18n_scope) | ||
end | ||
|
||
on(:invalid) do | ||
flash.now[:alert] = I18n.t("create.error", scope: i18n_scope) | ||
end | ||
|
||
redirect_back(fallback_location:) | ||
end | ||
end | ||
|
||
def destroy | ||
enforce_permission_to_publish | ||
|
||
unpublish_command.call(current_participatory_space, current_user) do | ||
on(:ok) do | ||
flash[:notice] = I18n.t("destroy.success", scope: i18n_scope) | ||
end | ||
|
||
on(:invalid) do | ||
flash.now[:alert] = I18n.t("destroy.error", scope: i18n_scope) | ||
end | ||
|
||
redirect_back(fallback_location:) | ||
end | ||
end | ||
|
||
private | ||
|
||
def current_participatory_space = raise "Not implemented" | ||
|
||
def enforce_permission_to_publish = raise "Not implemented" | ||
|
||
def publish_command = raise "Not implemented" | ||
|
||
def unpublish_command = raise "Not implemented" | ||
|
||
def i18n_scope = raise "Not implemented" | ||
end | ||
end | ||
end |
Oops, something went wrong.