locomotive_cms 2.1.3 → 2.1.4
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.
- data/app/assets/stylesheets/locomotive/backoffice/pagination.css.scss +2 -0
- data/app/models/locomotive/extensions/content_entry/csv.rb +2 -2
- data/app/models/locomotive/page.rb +2 -2
- data/app/models/locomotive/theme_asset.rb +1 -1
- data/app/views/locomotive/kaminari/_first_page.html.haml +1 -1
- data/app/views/locomotive/kaminari/_last_page.html.haml +1 -1
- data/app/views/locomotive/kaminari/_next_page.html.haml +1 -1
- data/app/views/locomotive/kaminari/_page.html.haml +1 -2
- data/app/views/locomotive/kaminari/_prev_page.html.haml +1 -1
- data/config/locales/default.en.yml +3 -0
- data/config/locales/default.fr.yml +2 -0
- data/lib/locomotive/liquid/drops/site.rb +1 -1
- data/lib/locomotive/version.rb +1 -1
- data/spec/models/locomotive/content_entry_spec.rb +3 -3
- data/spec/models/locomotive/theme_asset_spec.rb +1 -1
- metadata +6 -6
@@ -62,10 +62,10 @@ module Locomotive
|
|
62
62
|
|
63
63
|
CSV.generate(csv_options) do |csv|
|
64
64
|
# header
|
65
|
-
csv << fields.map(&:label)
|
65
|
+
csv << (fields.map(&:label) + [I18n.t('mongoid.attributes.locomotive/content_entry.created_at')])
|
66
66
|
# body
|
67
67
|
all.each do |entry|
|
68
|
-
csv << entry.to_values(options)
|
68
|
+
csv << (entry.to_values(options) + [I18n.l(entry.created_at, format: :long)])
|
69
69
|
end
|
70
70
|
end
|
71
71
|
end
|
@@ -50,8 +50,8 @@ module Locomotive
|
|
50
50
|
|
51
51
|
## named scopes ##
|
52
52
|
scope :latest_updated, order_by(updated_at: :desc).limit(Locomotive.config.ui[:latest_entries_nb])
|
53
|
-
scope :root, where(slug: 'index', depth: 0)
|
54
|
-
scope :not_found, where(slug: '404', depth: 0)
|
53
|
+
scope :root, -> { where(slug: 'index', depth: 0) }
|
54
|
+
scope :not_found, -> { where(slug: '404', depth: 0) }
|
55
55
|
scope :published, where(published: true)
|
56
56
|
scope :fullpath, ->(fullpath){ where(fullpath: fullpath) }
|
57
57
|
scope :handle, ->(handle){ where(handle: handle) }
|
@@ -146,7 +146,7 @@ module Locomotive
|
|
146
146
|
|
147
147
|
text.gsub(/[("'](\/(stylesheets|javascripts|images|media|others)\/(([^;.]+)\/)*([a-zA-Z_\-0-9]+)\.[a-z]{2,3})(\?[0-9]+)?[)"']/) do |path|
|
148
148
|
|
149
|
-
sanitized_path = path.gsub(/[("')]/, '').gsub(/^\//, '')
|
149
|
+
sanitized_path = path.gsub(/[("')]/, '').gsub(/^\//, '').gsub(/\?[0-9]+$/, '')
|
150
150
|
|
151
151
|
if asset = self.site.theme_assets.where(local_path: sanitized_path).first
|
152
152
|
"#{path.first}#{asset.source.url}#{path.last}"
|
@@ -1,2 +1,2 @@
|
|
1
|
-
%span.first
|
1
|
+
%span.first>
|
2
2
|
= link_to_unless current_page.first?, raw(t 'locomotive.pagination.first'), url, remote: remote
|
@@ -1,2 +1,2 @@
|
|
1
|
-
%span.last
|
1
|
+
%span.last>
|
2
2
|
= link_to_unless current_page.last?, raw(t 'locomotive.pagination.last'), url, { remote: remote }
|
@@ -1,2 +1,2 @@
|
|
1
|
-
%span.next
|
1
|
+
%span.next>
|
2
2
|
= link_to_unless current_page.last?, raw(t 'locomotive.pagination.next'), url, rel: 'next', remote: remote
|
@@ -1,2 +1 @@
|
|
1
|
-
%span{class: "page#{' current' if page.current?}"}
|
2
|
-
= link_to_unless page.current?, page, url, { remote: remote, rel: page.next? ? 'next' : page.prev? ? 'prev' : nil }
|
1
|
+
%span{class: "page#{' current' if page.current?}"}= link_to_unless page.current?, page, url, { remote: remote, rel: page.next? ? 'next' : page.prev? ? 'prev' : nil }
|
@@ -1,2 +1,2 @@
|
|
1
|
-
%span.prev
|
1
|
+
%span.prev>
|
2
2
|
= link_to_unless current_page.first?, raw(t 'locomotive.pagination.previous'), url, rel: 'prev', remote: remote
|
@@ -83,6 +83,8 @@ fr:
|
|
83
83
|
group_by_field_id: Champ pour grouper
|
84
84
|
public_submission_enabled: Activation API
|
85
85
|
public_submission_accounts: Comptes à notifier
|
86
|
+
locomotive/content_entry:
|
87
|
+
created_at: Date de création
|
86
88
|
locomotive/asset:
|
87
89
|
source: Fichier
|
88
90
|
locomotive/account:
|
data/lib/locomotive/version.rb
CHANGED
@@ -137,9 +137,9 @@ describe Locomotive::ContentEntry do
|
|
137
137
|
|
138
138
|
its(:size) { should eq(4) }
|
139
139
|
|
140
|
-
its(:first) { should eq("Title,Description,Visible ?,File") }
|
140
|
+
its(:first) { should eq("Title,Description,Visible ?,File,Created at") }
|
141
141
|
|
142
|
-
its(:last) { should match(/^Locomotive,Lorem ipsum....,false,http:\/\/example.com\/sites\/[0-9a-f]+\/content_entry[0-9a-f]+\/[0-9a-f]+\/files\/5k.png$/) }
|
142
|
+
its(:last) { should match(/^Locomotive,Lorem ipsum....,false,http:\/\/example.com\/sites\/[0-9a-f]+\/content_entry[0-9a-f]+\/[0-9a-f]+\/files\/5k.png,\"July 05, 2013 00:00\"$/) }
|
143
143
|
|
144
144
|
end
|
145
145
|
|
@@ -328,7 +328,7 @@ describe Locomotive::ContentEntry do
|
|
328
328
|
end
|
329
329
|
|
330
330
|
def build_content_entry(options = {})
|
331
|
-
@content_type.entries.build({ title: 'Locomotive', description: 'Lorem ipsum....', _label_field_name: 'title' }.merge(options))
|
331
|
+
@content_type.entries.build({ title: 'Locomotive', description: 'Lorem ipsum....', _label_field_name: 'title', created_at: DateTime.parse('2013-07-05 00:00:00') }.merge(options))
|
332
332
|
end
|
333
333
|
|
334
334
|
def fake_bson_id(id)
|
@@ -129,7 +129,7 @@ describe Locomotive::ThemeAsset do
|
|
129
129
|
describe '.escape_shortcut_urls' do
|
130
130
|
|
131
131
|
before(:each) do
|
132
|
-
site.theme_assets.
|
132
|
+
site.theme_assets.expects(:where).with(local_path: 'images/banner.png').returns([image])
|
133
133
|
end
|
134
134
|
|
135
135
|
let(:image) { stub(source: OpenStruct.new(url: 'http://engine.dev/images/banner.png')) }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: locomotive_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-06-
|
12
|
+
date: 2013-06-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -368,7 +368,7 @@ dependencies:
|
|
368
368
|
requirement: !ruby/object:Gem::Requirement
|
369
369
|
none: false
|
370
370
|
requirements:
|
371
|
-
- -
|
371
|
+
- - '='
|
372
372
|
- !ruby/object:Gem::Version
|
373
373
|
version: 2.0.3
|
374
374
|
type: :runtime
|
@@ -376,7 +376,7 @@ dependencies:
|
|
376
376
|
version_requirements: !ruby/object:Gem::Requirement
|
377
377
|
none: false
|
378
378
|
requirements:
|
379
|
-
- -
|
379
|
+
- - '='
|
380
380
|
- !ruby/object:Gem::Version
|
381
381
|
version: 2.0.3
|
382
382
|
- !ruby/object:Gem::Dependency
|
@@ -1373,7 +1373,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1373
1373
|
version: '0'
|
1374
1374
|
segments:
|
1375
1375
|
- 0
|
1376
|
-
hash:
|
1376
|
+
hash: 1655850861227393750
|
1377
1377
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1378
1378
|
none: false
|
1379
1379
|
requirements:
|
@@ -1382,7 +1382,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1382
1382
|
version: '0'
|
1383
1383
|
segments:
|
1384
1384
|
- 0
|
1385
|
-
hash:
|
1385
|
+
hash: 1655850861227393750
|
1386
1386
|
requirements: []
|
1387
1387
|
rubyforge_project:
|
1388
1388
|
rubygems_version: 1.8.23
|