-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #721 from coopdevs/develop
Release v4.4.0
- Loading branch information
Showing
22 changed files
with
210 additions
and
87 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
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,18 @@ | ||
<% if current_user %> | ||
<% petition = current_user.petitions.where(organization_id: organization.id).last %> | ||
|
||
<% if member = Member.where(user: current_user, organization: organization).first %> | ||
<%= link_to t('users.user_rows.delete_membership'), | ||
member, | ||
method: :delete, | ||
data: { confirm: t('users.user_rows.sure_delete', organization_name: organization.name) }, | ||
class: 'btn btn-danger' %> | ||
<% elsif petition && !current_user.was_member?(petition) %> | ||
<span class="badge"><%= petition.status %></span> | ||
<% else %> | ||
<%= link_to t('petitions.apply'), | ||
petitions_path(user_id: current_user.id, organization_id: organization.id), | ||
method: :post, | ||
class: 'btn btn-default' %> | ||
<% end %> | ||
<% end %> |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Ransack.configure do |config| | ||
config.add_predicate 'unaccent_cont', | ||
arel_predicate: 'matches', | ||
formatter: proc { |s| ActiveSupport::Inflector.transliterate("%#{s}%") }, | ||
validator: proc { |s| s.present? }, | ||
compounds: true, | ||
type: :string | ||
end |
5 changes: 5 additions & 0 deletions
5
db/migrate/20231120164231_add_not_null_constraint_to_member_uid_in_members.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,5 @@ | ||
class AddNotNullConstraintToMemberUidInMembers < ActiveRecord::Migration[6.1] | ||
def change | ||
change_column_null :members, :member_uid, false | ||
end | ||
end |
5 changes: 5 additions & 0 deletions
5
db/migrate/20231120164346_add_unique_index_on_member_uid_in_members.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,5 @@ | ||
class AddUniqueIndexOnMemberUidInMembers < ActiveRecord::Migration[6.1] | ||
def change | ||
add_index :members, [:organization_id, :member_uid], unique: true | ||
end | ||
end |
Oops, something went wrong.