Skip to content

Commit

Permalink
feat: update decidim_user_extension
Browse files Browse the repository at this point in the history
  • Loading branch information
ayuki-joto committed Aug 19, 2022
1 parent 6e4a528 commit 50a53dd
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 11 deletions.
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ gem "decidim-comments", path: "decidim-comments"

gem "decidim-decidim_awesome", "~> 0.8.1"

## gem "decidim-term_customizer", git: "https://github.com/mainio/decidim-module-term_customizer.git", branch: "0.24-stable"
gem "decidim-term_customizer", git: "https://github.com/codeforjapan/decidim-module-term_customizer.git", branch: "release/0.25-stable"

gem "bootsnap"
Expand All @@ -27,7 +26,7 @@ gem "newrelic_rpm"

gem "omniauth-line_login", path: "omniauth-line_login"

# gem "decidim-user_extension", path: "decidim-user_extension"
gem "decidim-user_extension", path: "decidim-user_extension"

group :development, :test do
gem "byebug", "~> 11.0", platform: :mri
Expand Down
9 changes: 9 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ PATH
decidim-core (= 0.25.2)
redcarpet (~> 3.5, >= 3.5.1)

PATH
remote: decidim-user_extension
specs:
decidim-user_extension (0.2.0)
decidim-admin
decidim-core
rails

PATH
remote: omniauth-line_login
specs:
Expand Down Expand Up @@ -847,6 +855,7 @@ DEPENDENCIES
decidim-decidim_awesome (~> 0.8.1)
decidim-dev (= 0.25.2)
decidim-term_customizer!
decidim-user_extension!
deface
dotenv-rails
factory_bot_rails
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import "src/decidim/user_extension"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "../stylesheets/decidim/user_extension/application.css";
12 changes: 10 additions & 2 deletions decidim-user_extension/app/views/decidim/account/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,17 @@
<%= f.url_field :personal_url %>
<%= f.text_area :about, rows: 5 %>

<%= f.collection_select(
:locale,
@account.organization.available_locales,
:to_s,
->(locale) {locale_name(locale) }
) %>
<p class="help-text"><%= t(".available_locales_helper") %></p>

<!-- extension begin -->
<% if current_organization.available_authorizations&.include?("user_extension") %>
<%= render partial: "user_extension", locals: {f: f} %>
<%= render partial: "user_extension", locals: {f: f} %>
<% end %>
<!-- extension end -->

Expand All @@ -28,7 +36,7 @@
<% else %>
<% if current_organization.sign_in_enabled? %>
<p>
<a data-toggle="passwordChange" class="change-password"><%= t ".change_password" %></a>
<a data-toggle="passwordChange" class="change-password" href="#passwordChange"><%= t ".change_password" %></a>
</p>
<div id="passwordChange" class="toggle-show" data-toggler=".is-expanded">
<%= render partial: "password_fields", locals: { form: f } %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<%= csrf_meta_tags %>
<%= csp_meta_tag %>

<%= stylesheet_pack_tag "decidim/user_extension/application", media: "all" %>
<%= stylesheet_pack_tag "decidim/user_extension/application", media: "all" %>
<%= javascript_pack_tag "decidim/user_extension/application" %>
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions decidim-user_extension/lib/decidim/user_extension/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class Engine < ::Rails::Engine
# root to: "user_extension#index"
end

initializer "decidim_user_extension.assets" do |app|
app.config.assets.precompile += %w(decidim_user_extension_manifest.js)
initializer "decidim_user_extension.assets_path" do |app|
Decidim.register_assets_path File.expand_path("app/packs", root)
end

initializer "decidim_user_extension.engine_additions" do
Expand Down
4 changes: 2 additions & 2 deletions decidim-user_extension/lib/decidim/user_extension/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

module Decidim
module UserExtension
VERSION = "0.1.0"
VERSION = "0.2.0"

def self.version
Decidim::UserExtension::VERSION
end

def self.decidim_version
">= 0.23.0"
">= 0.25.2"
end
end
end

0 comments on commit 50a53dd

Please sign in to comment.