alchemy_cms 4.1.0.rc1 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of alchemy_cms might be problematic. Click here for more details.

Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +60 -6
  3. data/README.md +10 -8
  4. data/alchemy_cms.gemspec +1 -1
  5. data/app/assets/javascripts/alchemy/alchemy.base.js.coffee +2 -4
  6. data/app/assets/stylesheets/alchemy/_extends.scss +1 -1
  7. data/app/assets/stylesheets/alchemy/_mixins.scss +8 -15
  8. data/app/assets/stylesheets/alchemy/_variables.scss +22 -15
  9. data/app/assets/stylesheets/alchemy/admin.scss +1 -0
  10. data/app/assets/stylesheets/alchemy/archive.scss +1 -2
  11. data/app/assets/stylesheets/alchemy/base.scss +12 -59
  12. data/app/assets/stylesheets/alchemy/buttons.scss +9 -4
  13. data/app/assets/stylesheets/alchemy/elements.scss +2 -1
  14. data/app/assets/stylesheets/alchemy/forms.scss +0 -4
  15. data/app/assets/stylesheets/alchemy/frame.scss +1 -10
  16. data/app/assets/stylesheets/alchemy/jquery.datetimepicker.scss +1 -0
  17. data/app/assets/stylesheets/alchemy/lists.scss +10 -0
  18. data/app/assets/stylesheets/alchemy/menubar.scss +1 -0
  19. data/app/assets/stylesheets/alchemy/notices.scss +5 -7
  20. data/app/assets/stylesheets/alchemy/pagination.scss +12 -7
  21. data/app/assets/stylesheets/alchemy/resource_info.scss +0 -4
  22. data/app/assets/stylesheets/alchemy/search.scss +5 -2
  23. data/app/assets/stylesheets/alchemy/selects.scss +4 -2
  24. data/app/assets/stylesheets/alchemy/sitemap.scss +0 -10
  25. data/app/assets/stylesheets/alchemy/tables.scss +23 -0
  26. data/app/assets/stylesheets/alchemy/typography.scss +55 -0
  27. data/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss +6 -3
  28. data/app/controllers/alchemy/admin/attachments_controller.rb +1 -1
  29. data/app/controllers/alchemy/admin/base_controller.rb +2 -1
  30. data/app/controllers/alchemy/admin/languages_controller.rb +1 -1
  31. data/app/controllers/alchemy/admin/pictures_controller.rb +28 -7
  32. data/app/controllers/alchemy/admin/resources_controller.rb +18 -4
  33. data/app/controllers/alchemy/admin/styleguide_controller.rb +7 -0
  34. data/app/controllers/alchemy/admin/tags_controller.rb +1 -1
  35. data/app/views/alchemy/admin/attachments/_filter_bar.html.erb +1 -1
  36. data/app/views/alchemy/admin/attachments/_tag_list.html.erb +1 -1
  37. data/app/views/alchemy/admin/attachments/index.html.erb +1 -1
  38. data/app/views/alchemy/admin/dashboard/_users.html.erb +1 -1
  39. data/app/views/alchemy/admin/dashboard/index.html.erb +2 -1
  40. data/app/views/alchemy/admin/languages/index.html.erb +1 -1
  41. data/app/views/alchemy/admin/pages/_create_language_form.html.erb +2 -2
  42. data/app/views/alchemy/admin/pages/_external_link.html.erb +1 -1
  43. data/app/views/alchemy/admin/pages/_file_link.html.erb +1 -1
  44. data/app/views/alchemy/admin/pages/_form.html.erb +0 -2
  45. data/app/views/alchemy/admin/pages/_internal_link.html.erb +1 -1
  46. data/app/views/alchemy/admin/pages/configure_external.html.erb +0 -1
  47. data/app/views/alchemy/admin/pages/index.html.erb +5 -1
  48. data/app/views/alchemy/admin/pictures/_archive.html.erb +3 -2
  49. data/app/views/alchemy/admin/pictures/_filter_bar.html.erb +1 -1
  50. data/app/views/alchemy/admin/pictures/_form.html.erb +0 -1
  51. data/app/views/alchemy/admin/pictures/_infos.html.erb +3 -2
  52. data/app/views/alchemy/admin/pictures/_overlay_picture_list.html.erb +1 -1
  53. data/app/views/alchemy/admin/pictures/_tag_list.html.erb +1 -1
  54. data/app/views/alchemy/admin/pictures/index.html.erb +8 -6
  55. data/app/views/alchemy/admin/resources/_filter_bar.html.erb +1 -1
  56. data/app/views/alchemy/admin/resources/_per_page_select.html.erb +20 -0
  57. data/app/views/alchemy/admin/resources/_table_header.html.erb +5 -0
  58. data/app/views/alchemy/admin/resources/_tag_list.html.erb +1 -1
  59. data/app/views/alchemy/admin/resources/index.html.erb +1 -1
  60. data/app/views/alchemy/admin/sites/index.html.erb +1 -1
  61. data/app/views/alchemy/admin/styleguide/index.html.erb +238 -0
  62. data/app/views/alchemy/admin/tags/edit.html.erb +4 -4
  63. data/app/views/alchemy/admin/tags/index.html.erb +1 -4
  64. data/app/views/alchemy/elements/_editor_not_found.html.erb +1 -1
  65. data/app/views/alchemy/essences/_essence_picture_editor.html.erb +2 -1
  66. data/app/views/kaminari/alchemy/_paginator.html.erb +8 -5
  67. data/config/alchemy/config.yml +5 -0
  68. data/config/locales/alchemy.en.yml +1 -0
  69. data/config/routes.rb +2 -0
  70. data/lib/alchemy/permissions.rb +1 -1
  71. data/lib/alchemy/resources_helper.rb +2 -1
  72. data/lib/alchemy/version.rb +1 -1
  73. metadata +12 -7
@@ -1,15 +1,15 @@
1
1
  <%= alchemy_form_for @tag, as: 'tag', url: alchemy.admin_tag_path(@tag), html: {method: 'patch'} do |f| %>
2
- <%= render_message :info do %>
2
+ <h3>
3
3
  <%= Alchemy.t(:you_can_rename_this_tag) %>
4
- <% end %>
4
+ </h3>
5
5
  <%= f.input :name %>
6
6
  <%= f.submit Alchemy.t(:rename) %>
7
7
  <% end %>
8
8
  <% if @tags.any? -%>
9
9
  <%= alchemy_form_for @tag, as: 'tag', url: alchemy.admin_tag_path(@tag), html: {method: 'patch'} do |f| %>
10
- <%= render_message :info do %>
10
+ <h3>
11
11
  <%= Alchemy.t(:or_replace_it_with_an_existing_tag) %>
12
- <% end %>
12
+ </h3>
13
13
  <div class="input tags">
14
14
  <label class="control-label"><%= Alchemy.t('Tags') %></label>
15
15
  <div class="control_group" id="tags_tag_list">
@@ -16,10 +16,7 @@
16
16
  ) %>
17
17
 
18
18
  <div id="archive_all" class="resources-table-wrapper">
19
- <h1 class="resources-header">
20
- <%= @tags.total_count %>
21
- <%= Gutentag::Tag.model_name.human(count: @tags.total_count) %>
22
- </h1>
19
+ <%= render 'alchemy/admin/resources/table_header' %>
23
20
  <% if @tags.any? %>
24
21
 
25
22
  <table class="list">
@@ -1,4 +1,4 @@
1
1
  <%= render_message :warning do %>
2
- <h1><%= Alchemy.t(:element_editor_not_found) %>:</h1>
2
+ <h2><%= Alchemy.t(:element_editor_not_found) %>:</h2>
3
3
  <p><%= error.html_safe %></p>
4
4
  <% end %>
@@ -24,7 +24,6 @@
24
24
  <div class="thumbnail_background">
25
25
  <%- if content.ingredient -%>
26
26
  <%= essence_picture_thumbnail(content, options) %>
27
- <%= hidden_field_tag content.form_field_name(:picture_id), content.ingredient.id %>
28
27
  <% else %>
29
28
  <%= render_icon(:image, style: 'regular') %>
30
29
  <% end %>
@@ -43,6 +42,8 @@
43
42
  } %>
44
43
  </div>
45
44
  </div>
45
+ <%= hidden_field_tag content.form_field_name(:picture_id),
46
+ content.ingredient.try!(:id) %>
46
47
  <%= hidden_field_tag content.form_field_name(:link),
47
48
  content.essence.link %>
48
49
  <%= hidden_field_tag content.form_field_name(:link_title),
@@ -1,13 +1,13 @@
1
1
  <%# The container tag
2
2
  - available local variables
3
3
  current_page: a page object for the currently displayed page
4
- num_pages: total number of pages
4
+ total_pages: total number of pages
5
5
  per_page: number of items to fetch per page
6
6
  remote: data-remote
7
7
  paginator: the paginator that renders the pagination tags inside
8
8
  -%>
9
- <%= paginator.render do -%>
10
- <div class="pagination">
9
+ <div class="pagination">
10
+ <%= paginator.render do -%>
11
11
  <%= first_page_tag %>
12
12
  <%= prev_page_tag -%>
13
13
  <% each_page do |page| -%>
@@ -19,5 +19,8 @@
19
19
  <% end -%>
20
20
  <%= next_page_tag -%>
21
21
  <%= last_page_tag %>
22
- </div>
23
- <% end -%>
22
+ <% end -%>
23
+ <% unless local_assigns[:hide_per_page_select] %>
24
+ <%= render 'alchemy/admin/resources/per_page_select' %>
25
+ <% end %>
26
+ </div>
@@ -57,6 +57,11 @@ sitemap:
57
57
  #
58
58
  url_nesting: true
59
59
 
60
+ # === Default items per page in admin views
61
+ #
62
+ # In Alchemy's Admin, change how many items you would get shown per page by Kaminari
63
+ items_per_page: 15
64
+
60
65
  # === Picture rendering settings
61
66
  #
62
67
  # Alchemy uses Dragonfly to render images. Use {size: "XXXxYYY", crop: BOOLEAN [true]} to resize images.
@@ -199,6 +199,7 @@ en:
199
199
  "Hide childpages": "Hide childpages"
200
200
  hide_elements: Hide Elements
201
201
  hide_element: "Hide element"
202
+ items_per_page: "%{model_name} per page"
202
203
  "Image missing": "Image missing"
203
204
  "Image size": "Image size"
204
205
  "Language successfully created": "Language successfully created."
data/config/routes.rb CHANGED
@@ -117,6 +117,8 @@ Alchemy::Engine.routes.draw do
117
117
  end
118
118
 
119
119
  resources :sites
120
+
121
+ get '/styleguide' => 'styleguide#index'
120
122
  end
121
123
 
122
124
  get '/attachment/:id/download(/:name)' => 'attachments#download',
@@ -180,7 +180,7 @@ module Alchemy
180
180
  alchemy_editor_rules
181
181
 
182
182
  # Navigation
183
- can :index, [:alchemy_admin_sites]
183
+ can :index, [:alchemy_admin_sites, :alchemy_admin_styleguide]
184
184
 
185
185
  # Controller actions
186
186
  can [:info, :update_check], :alchemy_admin_dashboard
@@ -122,7 +122,8 @@ module Alchemy
122
122
 
123
123
  # Renders the human model name with a count as h1 header
124
124
  def resources_header
125
- content_tag :h1, "#{resources_instance_variable.total_count} #{resource_model.model_name.human(count: resources_instance_variable.total_count)}", class: 'resources-header'
125
+ Alchemy::Deprecation.warn "resources_header is deprecated. Render 'alchemy/admin/resources/table_header' partial instead."
126
+ render 'alchemy/admin/resources/table_header'
126
127
  end
127
128
 
128
129
  # Returns true if the resource contains any relations
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alchemy
4
- VERSION = "4.1.0.rc1"
4
+ VERSION = "4.1.0"
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: 4.1.0.rc1
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2018-05-18 00:00:00.000000000 Z
16
+ date: 2018-09-22 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: active_model_serializers
@@ -255,14 +255,14 @@ dependencies:
255
255
  requirements:
256
256
  - - "~>"
257
257
  - !ruby/object:Gem::Version
258
- version: '1.4'
258
+ version: '2.0'
259
259
  type: :runtime
260
260
  prerelease: false
261
261
  version_requirements: !ruby/object:Gem::Requirement
262
262
  requirements:
263
263
  - - "~>"
264
264
  - !ruby/object:Gem::Version
265
- version: '1.4'
265
+ version: '2.0'
266
266
  - !ruby/object:Gem::Dependency
267
267
  name: request_store
268
268
  requirement: !ruby/object:Gem::Requirement
@@ -453,6 +453,7 @@ files:
453
453
  - app/assets/stylesheets/alchemy/tags.scss
454
454
  - app/assets/stylesheets/alchemy/toolbar.scss
455
455
  - app/assets/stylesheets/alchemy/trash.scss
456
+ - app/assets/stylesheets/alchemy/typography.scss
456
457
  - app/assets/stylesheets/alchemy/upload.scss
457
458
  - app/assets/stylesheets/alchemy/welcome.sass
458
459
  - app/assets/stylesheets/tinymce/skins/alchemy/content.min.css.scss
@@ -482,6 +483,7 @@ files:
482
483
  - app/controllers/alchemy/admin/pictures_controller.rb
483
484
  - app/controllers/alchemy/admin/resources_controller.rb
484
485
  - app/controllers/alchemy/admin/sites_controller.rb
486
+ - app/controllers/alchemy/admin/styleguide_controller.rb
485
487
  - app/controllers/alchemy/admin/tags_controller.rb
486
488
  - app/controllers/alchemy/admin/trash_controller.rb
487
489
  - app/controllers/alchemy/api/base_controller.rb
@@ -705,14 +707,17 @@ files:
705
707
  - app/views/alchemy/admin/pictures/update.js.erb
706
708
  - app/views/alchemy/admin/resources/_filter_bar.html.erb
707
709
  - app/views/alchemy/admin/resources/_form.html.erb
710
+ - app/views/alchemy/admin/resources/_per_page_select.html.erb
708
711
  - app/views/alchemy/admin/resources/_resource.html.erb
709
712
  - app/views/alchemy/admin/resources/_table.html.erb
713
+ - app/views/alchemy/admin/resources/_table_header.html.erb
710
714
  - app/views/alchemy/admin/resources/_tag_list.html.erb
711
715
  - app/views/alchemy/admin/resources/edit.html.erb
712
716
  - app/views/alchemy/admin/resources/index.csv.erb
713
717
  - app/views/alchemy/admin/resources/index.html.erb
714
718
  - app/views/alchemy/admin/resources/new.html.erb
715
719
  - app/views/alchemy/admin/sites/index.html.erb
720
+ - app/views/alchemy/admin/styleguide/index.html.erb
716
721
  - app/views/alchemy/admin/tags/_radio_tag.html.erb
717
722
  - app/views/alchemy/admin/tags/_tag.html.erb
718
723
  - app/views/alchemy/admin/tags/edit.html.erb
@@ -978,13 +983,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
978
983
  version: 2.2.2
979
984
  required_rubygems_version: !ruby/object:Gem::Requirement
980
985
  requirements:
981
- - - ">"
986
+ - - ">="
982
987
  - !ruby/object:Gem::Version
983
- version: 1.3.1
988
+ version: '0'
984
989
  requirements:
985
990
  - ImageMagick (libmagick), v6.6 or greater.
986
991
  rubyforge_project:
987
- rubygems_version: 2.7.6
992
+ rubygems_version: 2.7.7
988
993
  signing_key:
989
994
  specification_version: 4
990
995
  summary: A powerful, userfriendly and flexible CMS for Rails 4