tenon 2.0.7 → 2.0.8
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.
- checksums.yaml +4 -4
- data/app/helpers/tenon/tenon_content_helper.rb +5 -2
- data/app/views/tenon/fields/_date_picker.html.haml +1 -1
- data/app/views/tenon/item_assets/new.html.haml +5 -3
- data/app/views/tenon/tenon_content/_fields.html.haml +1 -1
- data/app/views/tenon/tenon_content/_row.html.haml +1 -1
- data/lib/ckeditor/config.js +2 -0
- data/lib/templates/active_record/model/model.rb +3 -0
- data/lib/tenon/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ae1738be1ba3a5fd9e133bdd0ab21ff7aceafcc
|
4
|
+
data.tar.gz: 38e31b17de0dbef6d7eea5d008bde9359936834e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c2fc53005195ed3c24e2e7dafb76e7e4e54548dfcad882ed496396ed1ce74dcab9942a3aa922dcaf7a5e3fedcd6a18c8da35765f771eb08082418ed89136dca
|
7
|
+
data.tar.gz: 50b2667b3f3d4e515373db2d2dc7b838232f41c056e06c41eaa44cdf1b3497f5ac2ffed10682617652525130368aea5c317d94654c18a16a2b73e19956d70076
|
@@ -2,8 +2,11 @@ module Tenon
|
|
2
2
|
module TenonContentHelper
|
3
3
|
def row_link(title, row_type, field, f)
|
4
4
|
opts = {
|
5
|
-
|
6
|
-
|
5
|
+
data: {
|
6
|
+
association_insertion_node: '.tn-tc__rows',
|
7
|
+
association_insertion_method: 'append',
|
8
|
+
searchable_title: title.downcase
|
9
|
+
},
|
7
10
|
'data-searchable-title' => title.downcase,
|
8
11
|
partial: 'tenon/tenon_content/row',
|
9
12
|
render_options: {
|
@@ -1,2 +1,2 @@
|
|
1
1
|
= render layout: 'tenon/fields/base', locals: { f: f, method_name: method_name, opts: opts }, class: 'row' do
|
2
|
-
= f.super_text_field
|
2
|
+
= f.super_text_field method_name, value: f.object.send(method_name).try(:strftime, '%d %B, %Y'), data: { behavior: 'datepicker' }, class: 'input-block__text-field input-block__text-field--stacked', placeholder: 'Day Month, Year'
|
@@ -1,16 +1,18 @@
|
|
1
1
|
.modal.modal--fixed-footer
|
2
2
|
.modal__content
|
3
|
-
%h2 Choose Asset
|
4
3
|
- unless params[:hide_upload]
|
5
4
|
.upload-asset
|
6
|
-
%
|
5
|
+
%h4 Upload an Asset from your Device
|
7
6
|
.progress-container
|
8
7
|
= form_for Tenon::Asset.new, format: 'json', builder: Tenon::FormBuilder do |f|
|
9
8
|
.input-block
|
10
9
|
%label.btn{ for: 'file-upload' } Browse
|
11
10
|
%input#file-upload.upload{ type: 'file', multiple: defined?(multiple) && multiple, style: 'position: absolute; left: -9999px;', name: 'asset[attachment]' }
|
12
11
|
|
13
|
-
|
12
|
+
.word-line
|
13
|
+
.word-line__word or
|
14
|
+
|
15
|
+
%h4 Choose an Asset from the Asset Library
|
14
16
|
#pick-asset
|
15
17
|
= react_component 'Tenon.RI.StandaloneList',
|
16
18
|
title: 'Assets',
|
@@ -22,4 +22,4 @@
|
|
22
22
|
|
23
23
|
|
24
24
|
%p
|
25
|
-
= link_to 'Add Content', '#', class: 'action-text initial-row', data: { modal_target: '[data-tn-tc-library]', modal_closest: '.tn-tc', modal_clone: 'true',
|
25
|
+
= link_to 'Add Content', '#', class: 'action-text initial-row', data: { modal_target: '[data-tn-tc-library]', modal_closest: '.tn-tc', modal_clone: 'true', modal_handler: 'TenonContentLibrary', tn_tc_add_content: true }, title: 'Add Content'
|
@@ -10,7 +10,7 @@
|
|
10
10
|
%i.material-icon.delete delete
|
11
11
|
|
12
12
|
.tn-tc-row__action--right
|
13
|
-
= link_to '#', class: 'above', data: { modal_target: "
|
13
|
+
= link_to '#', class: 'above', data: { modal_target: "[data-tn-tc-library]", modal_closest: '.tn-tc', modal_handler: 'TenonContentLibrary', modal_clone: 'true', tn_tc_insert: 'before' }, title: 'Insert Content' do
|
14
14
|
%i.material-icon playlist_add
|
15
15
|
|
16
16
|
|
data/lib/ckeditor/config.js
CHANGED
@@ -7,6 +7,9 @@ class <%= class_name %> < ApplicationRecord # :nodoc:
|
|
7
7
|
<% attributes.select { |a| a.type.to_s == 'asset' }.each do |f| -%>
|
8
8
|
has_asset :<%= f.name %>
|
9
9
|
<% end -%>
|
10
|
+
<% attributes.select { |a| a.type.to_s.in? %w( timestamp datetime ) }.each do |f| -%>
|
11
|
+
date_time_attribute :<%= f.name %>
|
12
|
+
<% end -%>
|
10
13
|
<% if attributes.any? { |a| a.name.to_s == 'publish_at' } -%>
|
11
14
|
scope :published, -> { where('<%= table_name %>.publish_at < ?', Time.now) }
|
12
15
|
<% end -%>
|
data/lib/tenon/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tenon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- factor[e] design initiative
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|