katalyst-content 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6eaf7d4032f6cef16151da4336669dc0cde37f4dbab9baa83f7f0b0b33615ff3
4
- data.tar.gz: 239fddb43c620128f8fb3a6d43b2f2b82d87af269582323829ec803032a17cca
3
+ metadata.gz: c6a70b3f0781f419ffa9df75a608865a3e69d4e030df242474974379928cabdc
4
+ data.tar.gz: cd0f95f7f8ff3d4b29e889dad3dde799b507a95820b12b7f782a602b49cf9ef9
5
5
  SHA512:
6
- metadata.gz: 3436a0659d9b72d8fc7fab7f74ddb663642172489d745ca2627e533d73ba179a8acbe02439ab892e42317466a465c1fe174ec3c7ed3daa96b9e7e70983842310
7
- data.tar.gz: 5a8d0f30454e25c30f2dbeb07ff7608de177e0574ac7a6ea71c4b2012e71a88216f010d1a3c9e7a86569da00a57a45ca1b6c43f6408411faec17bc638a7c8d6f
6
+ metadata.gz: 25b9b0794259db617629e901c24183d1a87bb0838b0a44ad123ec36702651c7aeb3c1cc6b5d39298fe08f3bc0bcba0f7440655689f86fffffb0ae5f7a5b44c3c
7
+ data.tar.gz: 282368127af2d0066744bcc44d2f3cfb25885f2d411420ac6c7d44f28d77424380905d7e8905854f7be2ae322e3b7e3feffe68c4eb5f85a9583e03522f7ea2d9
@@ -3,9 +3,18 @@
3
3
  module Katalyst
4
4
  module Content
5
5
  module FrontendHelper
6
+ # Render all items from a content version as HTML
7
+ # @param version [Katalyst::Content::Version] The content version to render
8
+ # @return [ActiveSupport::SafeBuffer,String,nil] Content as HTML
9
+ # Example usage:
10
+ # <%= render_content(version) %>
6
11
  def render_content(version)
7
- without_partial_path_prefix do
8
- render partial: version.tree.select(&:visible?)
12
+ capture do
13
+ cache version do
14
+ without_partial_path_prefix do
15
+ concat render partial: version.tree.select(&:visible?)
16
+ end
17
+ end
9
18
  end
10
19
  end
11
20
 
@@ -1,3 +1,3 @@
1
1
  <%= content_editor_new_item item: item, data: { item_type: item.model_name.param_key } do %>
2
- <%= item.model_name.human %>
2
+ <%= t(".#{item.model_name.param_key}", default: item.model_name.human) %>
3
3
  <% end %>
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Katalyst
4
4
  module Content
5
- VERSION = "1.0.0"
5
+ VERSION = "1.0.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katalyst-content
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katalyst Interactive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-08 00:00:00.000000000 Z
11
+ date: 2023-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_storage_validations