alchemy_cms 8.0.9 → 8.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,6 +30,9 @@ module Alchemy
30
30
 
31
31
  def destroy
32
32
  if @language.destroy
33
+ if session[:alchemy_language_id] == @language.id
34
+ session.delete(:alchemy_language_id)
35
+ end
33
36
  flash[:notice] = Alchemy.t("Language successfully removed")
34
37
  else
35
38
  flash[:warning] = @language.errors.full_messages.to_sentence
@@ -13,6 +13,7 @@ module Alchemy::Language::Code
13
13
 
14
14
  module ClassMethods
15
15
  def find_by_code(code)
16
+ return unless code.respond_to?(:split)
16
17
  codes = code.split("-")
17
18
  codes << "" if codes.length == 1
18
19
  on_current_site.find_by(
@@ -8,7 +8,7 @@
8
8
  margin-left: var(--main-menu-width);
9
9
  padding-right: var(--main-menu-width);
10
10
  z-index: 20;
11
- width: 100vw;
11
+ width: 100%;
12
12
  height: var(--top-menu-height);
13
13
  @extend .disable-user-select;
14
14
  }
@@ -37,7 +37,7 @@
37
37
  </td>
38
38
  <td>
39
39
  <% if (current_alchemy_user.id == page.locked_by) || can?(:manage, Alchemy::Current.site) %>
40
- <%= form_tag(alchemy.unlock_admin_page_path(page, :redirect_to => alchemy.admin_dashboard_url)) do %>
40
+ <%= form_tag(alchemy.unlock_admin_page_path(page, :redirect_to => alchemy.admin_dashboard_path)) do %>
41
41
  <button class="icon_button small" title="<%= Alchemy.t(:explain_unlocking) %>">
42
42
  <%= render_icon(:close, size: '1x') %>
43
43
  </button>
@@ -80,7 +80,8 @@ module Alchemy
80
80
 
81
81
  def load_alchemy_language_from_id_or_code(id_or_code)
82
82
  Language.find_by(id: id_or_code) ||
83
- Language.find_by_code(id_or_code)
83
+ Language.find_by_code(id_or_code) ||
84
+ Language.default
84
85
  end
85
86
 
86
87
  # Stores language in +Current.language+
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alchemy
4
- VERSION = "8.0.9"
4
+ VERSION = "8.0.11"
5
5
 
6
6
  def self.version
7
7
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.9
4
+ version: 8.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
@@ -1436,7 +1436,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1436
1436
  version: '0'
1437
1437
  requirements:
1438
1438
  - ImageMagick (libmagick), v6.6 or greater.
1439
- rubygems_version: 4.0.3
1439
+ rubygems_version: 4.0.6
1440
1440
  specification_version: 4
1441
1441
  summary: A powerful, userfriendly and flexible CMS for Rails
1442
1442
  test_files: []