ecm_news2 2.0.11 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/ecm/news/items/_item.haml +9 -0
- data/app/views/ecm/news/items/_item_for_render_news.haml +6 -0
- data/app/views/ecm/news/items/_item_in_list.haml +5 -0
- data/app/views/ecm/news/items/index.haml +12 -0
- data/app/views/ecm/news/items/show.haml +9 -0
- data/config/locales/ecm.news.de.yml +10 -8
- data/config/locales/ecm.news.en.yml +14 -12
- data/lib/ecm/news/version.rb +1 -1
- metadata +16 -73
- data/app/admin/ecm_news_items.rb +0 -90
- data/app/views/ecm/news/items/_item.html.erb +0 -13
- data/app/views/ecm/news/items/_item_for_render_news.html.erb +0 -12
- data/app/views/ecm/news/items/_item_in_list.html.erb +0 -20
- data/app/views/ecm/news/items/index.html.erb +0 -13
- data/app/views/ecm/news/items/show.html.erb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f8886de40c82feb12d98b106637347df81e0056
|
4
|
+
data.tar.gz: fb6ed11d4542b5cfe761f84fdfc241e61c0893f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75e7173d3fe546baf19fc71102f59b0198ce6572b9f158cb81edc42949d28a4f347d11444b2bf7e5f785acf9d0a4634c67c7501b64ccac811ad97a6b61c5b5bf
|
7
|
+
data.tar.gz: 7ce0c7eb3247fad919443de8d4d01c42908f5788be6146f28878277d586a2e2bb1b99bf0581c05e25395231c796bc4101c8ba91a9024e3f2a9811a7c6290c6b6
|
@@ -0,0 +1,9 @@
|
|
1
|
+
.row
|
2
|
+
.col-lg-12
|
3
|
+
.news-item.show
|
4
|
+
%h1= item.title
|
5
|
+
- if Ecm::News::Configuration.show_publish_time
|
6
|
+
%small.item-published_at= I18n.l(item.published_at)
|
7
|
+
- if item.preview_picture.present?
|
8
|
+
%img.img-responsive.bottom-margin-2{:alt => item.preview_picture.description, :src => item.preview_picture.image.url, :title => item.preview_picture.description}/
|
9
|
+
.item-body= mu(item, :body)
|
@@ -0,0 +1,12 @@
|
|
1
|
+
- content_for :meta_description, t('.title')
|
2
|
+
- content_for :title, t('.title')
|
3
|
+
|
4
|
+
%h1= t('.title')
|
5
|
+
|
6
|
+
- @items.each_with_index do |item, index|
|
7
|
+
= render partial: 'item_in_list', locals: { item: item, index: (index + 1) }
|
8
|
+
|
9
|
+
= paginate @items, theme: 'twitter-bootstrap-3'
|
10
|
+
|
11
|
+
= bootstrap_button(to: main_app.root_path, context: :primary) do
|
12
|
+
= t('.back')
|
@@ -1,19 +1,21 @@
|
|
1
1
|
de:
|
2
|
-
active_admin:
|
3
|
-
scopes:
|
4
|
-
all: Alle
|
5
|
-
published: Veröffentlicht
|
6
|
-
unpublished: Nicht veröffentlicht
|
7
2
|
ecm:
|
8
3
|
news:
|
9
|
-
active_admin:
|
10
|
-
menu: News
|
11
4
|
item:
|
12
5
|
actions:
|
13
6
|
all: Alle News anzeigen
|
14
7
|
messages:
|
15
8
|
empty: Keine News gefunden.
|
16
|
-
|
9
|
+
items:
|
10
|
+
index:
|
11
|
+
back: Zurück
|
12
|
+
title: News
|
13
|
+
item_for_render_news:
|
14
|
+
more: Weiterlesen
|
15
|
+
item_in_list:
|
16
|
+
more: Weiterlesen
|
17
|
+
show:
|
18
|
+
back: Zurück
|
17
19
|
views:
|
18
20
|
actions:
|
19
21
|
back: Zurück
|
@@ -1,23 +1,25 @@
|
|
1
1
|
en:
|
2
|
-
active_admin:
|
3
|
-
scopes:
|
4
|
-
all: All
|
5
|
-
published: Published
|
6
|
-
unpublished: Not published
|
7
2
|
ecm:
|
8
3
|
news:
|
9
|
-
active_admin:
|
10
|
-
menu: news
|
11
4
|
item:
|
12
5
|
actions:
|
13
|
-
all:
|
6
|
+
all: Show all
|
14
7
|
messages:
|
15
|
-
empty:
|
16
|
-
|
8
|
+
empty: No news found.
|
9
|
+
items:
|
10
|
+
index:
|
11
|
+
back: Back
|
12
|
+
title: News
|
13
|
+
item_for_render_news:
|
14
|
+
more: Continue reading
|
15
|
+
item_in_list:
|
16
|
+
more: Continue reading
|
17
|
+
show:
|
18
|
+
back: Back
|
17
19
|
views:
|
18
20
|
actions:
|
19
|
-
back:
|
20
|
-
more:
|
21
|
+
back: Back
|
22
|
+
more: Continue reading
|
21
23
|
views:
|
22
24
|
pagination:
|
23
25
|
first: "« First"
|
data/lib/ecm/news/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecm_news2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Vasquez Angel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -109,55 +109,13 @@ dependencies:
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name: rails
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: sqlite3
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ">="
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: jquery-rails
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - ">="
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - ">="
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: devise
|
112
|
+
name: haml-rails
|
155
113
|
requirement: !ruby/object:Gem::Requirement
|
156
114
|
requirements:
|
157
115
|
- - ">="
|
158
116
|
- !ruby/object:Gem::Version
|
159
117
|
version: '0'
|
160
|
-
type: :
|
118
|
+
type: :runtime
|
161
119
|
prerelease: false
|
162
120
|
version_requirements: !ruby/object:Gem::Requirement
|
163
121
|
requirements:
|
@@ -165,13 +123,13 @@ dependencies:
|
|
165
123
|
- !ruby/object:Gem::Version
|
166
124
|
version: '0'
|
167
125
|
- !ruby/object:Gem::Dependency
|
168
|
-
name: twitter-bootstrap-rails
|
126
|
+
name: twitter-bootstrap-components-rails
|
169
127
|
requirement: !ruby/object:Gem::Requirement
|
170
128
|
requirements:
|
171
129
|
- - ">="
|
172
130
|
- !ruby/object:Gem::Version
|
173
131
|
version: '0'
|
174
|
-
type: :
|
132
|
+
type: :runtime
|
175
133
|
prerelease: false
|
176
134
|
version_requirements: !ruby/object:Gem::Requirement
|
177
135
|
requirements:
|
@@ -179,7 +137,7 @@ dependencies:
|
|
179
137
|
- !ruby/object:Gem::Version
|
180
138
|
version: '0'
|
181
139
|
- !ruby/object:Gem::Dependency
|
182
|
-
name:
|
140
|
+
name: rails-dummy
|
183
141
|
requirement: !ruby/object:Gem::Requirement
|
184
142
|
requirements:
|
185
143
|
- - ">="
|
@@ -193,21 +151,7 @@ dependencies:
|
|
193
151
|
- !ruby/object:Gem::Version
|
194
152
|
version: '0'
|
195
153
|
- !ruby/object:Gem::Dependency
|
196
|
-
name:
|
197
|
-
requirement: !ruby/object:Gem::Requirement
|
198
|
-
requirements:
|
199
|
-
- - "~>"
|
200
|
-
- !ruby/object:Gem::Version
|
201
|
-
version: 1.0.0.pre2
|
202
|
-
type: :development
|
203
|
-
prerelease: false
|
204
|
-
version_requirements: !ruby/object:Gem::Requirement
|
205
|
-
requirements:
|
206
|
-
- - "~>"
|
207
|
-
- !ruby/object:Gem::Version
|
208
|
-
version: 1.0.0.pre2
|
209
|
-
- !ruby/object:Gem::Dependency
|
210
|
-
name: coffee-rails
|
154
|
+
name: sqlite3
|
211
155
|
requirement: !ruby/object:Gem::Requirement
|
212
156
|
requirements:
|
213
157
|
- - ">="
|
@@ -221,7 +165,7 @@ dependencies:
|
|
221
165
|
- !ruby/object:Gem::Version
|
222
166
|
version: '0'
|
223
167
|
- !ruby/object:Gem::Dependency
|
224
|
-
name:
|
168
|
+
name: jquery-rails
|
225
169
|
requirement: !ruby/object:Gem::Requirement
|
226
170
|
requirements:
|
227
171
|
- - ">="
|
@@ -235,7 +179,7 @@ dependencies:
|
|
235
179
|
- !ruby/object:Gem::Version
|
236
180
|
version: '0'
|
237
181
|
- !ruby/object:Gem::Dependency
|
238
|
-
name:
|
182
|
+
name: twitter-bootstrap-rails
|
239
183
|
requirement: !ruby/object:Gem::Requirement
|
240
184
|
requirements:
|
241
185
|
- - ">="
|
@@ -249,7 +193,7 @@ dependencies:
|
|
249
193
|
- !ruby/object:Gem::Version
|
250
194
|
version: '0'
|
251
195
|
- !ruby/object:Gem::Dependency
|
252
|
-
name:
|
196
|
+
name: thin
|
253
197
|
requirement: !ruby/object:Gem::Requirement
|
254
198
|
requirements:
|
255
199
|
- - ">="
|
@@ -370,7 +314,6 @@ files:
|
|
370
314
|
- MIT-LICENSE
|
371
315
|
- README.rdoc
|
372
316
|
- Rakefile
|
373
|
-
- app/admin/ecm_news_items.rb
|
374
317
|
- app/controllers/ecm/news/items_controller.rb
|
375
318
|
- app/helpers/ecm/news_helper.rb
|
376
319
|
- app/helpers/markup_helper.rb
|
@@ -378,11 +321,11 @@ files:
|
|
378
321
|
- app/policies/ecm/news/backend/engine_policy.rb
|
379
322
|
- app/policies/ecm/news/item_policy.rb
|
380
323
|
- app/views/ecm/news/_render_news_footer.html.erb
|
381
|
-
- app/views/ecm/news/items/_item.
|
382
|
-
- app/views/ecm/news/items/_item_for_render_news.
|
383
|
-
- app/views/ecm/news/items/_item_in_list.
|
384
|
-
- app/views/ecm/news/items/index.
|
385
|
-
- app/views/ecm/news/items/show.
|
324
|
+
- app/views/ecm/news/items/_item.haml
|
325
|
+
- app/views/ecm/news/items/_item_for_render_news.haml
|
326
|
+
- app/views/ecm/news/items/_item_in_list.haml
|
327
|
+
- app/views/ecm/news/items/index.haml
|
328
|
+
- app/views/ecm/news/items/show.haml
|
386
329
|
- config/locales/ecm.news.de.yml
|
387
330
|
- config/locales/ecm.news.en.yml
|
388
331
|
- config/locales/ecm.news.item.de.yml
|
data/app/admin/ecm_news_items.rb
DELETED
@@ -1,90 +0,0 @@
|
|
1
|
-
if Gem::Specification.find_all_by_name('activeadmin').any?
|
2
|
-
|
3
|
-
include ActsAsPublished::ActiveAdminHelper
|
4
|
-
include Ecm::Pictures::ActiveAdmin::PictureableHelper
|
5
|
-
|
6
|
-
::ActiveAdmin.register Ecm::News::Item do
|
7
|
-
# acts as published
|
8
|
-
acts_as_published_actions
|
9
|
-
|
10
|
-
permit_params :attached_pictures_attributes,
|
11
|
-
:body,
|
12
|
-
:link_to_more,
|
13
|
-
:locale,
|
14
|
-
:markup_language,
|
15
|
-
:pictures_attributes,
|
16
|
-
:published,
|
17
|
-
:published_at,
|
18
|
-
:slug,
|
19
|
-
:title,
|
20
|
-
pictures_attributes: [
|
21
|
-
:description,
|
22
|
-
:_destroy,
|
23
|
-
:id,
|
24
|
-
:image,
|
25
|
-
:markup_language,
|
26
|
-
:name,
|
27
|
-
:picture_gallery_id,
|
28
|
-
:position
|
29
|
-
],
|
30
|
-
attached_pictures_attributes: []
|
31
|
-
|
32
|
-
# menu entry settings
|
33
|
-
menu parent: proc { I18n.t('ecm.news.active_admin.menu') }.call
|
34
|
-
|
35
|
-
# scopes
|
36
|
-
scope :all
|
37
|
-
scope :published
|
38
|
-
scope :unpublished
|
39
|
-
|
40
|
-
form do |f|
|
41
|
-
f.inputs do
|
42
|
-
f.input :title
|
43
|
-
f.input :locale, as: :select, collection: I18n.available_locales.map(&:to_s)
|
44
|
-
f.input :body
|
45
|
-
f.input :published, as: :boolean
|
46
|
-
end
|
47
|
-
|
48
|
-
f.inputs do
|
49
|
-
f.input :markup_language, as: :select, collection: Ecm::News::Configuration.markup_languages.map(&:to_s)
|
50
|
-
end
|
51
|
-
|
52
|
-
form_inputs_for_pictureable(f)
|
53
|
-
|
54
|
-
f.actions
|
55
|
-
end
|
56
|
-
|
57
|
-
index do
|
58
|
-
selectable_column
|
59
|
-
column :title
|
60
|
-
column :locale
|
61
|
-
column :body do |item|
|
62
|
-
truncate(mu(item, :body), length: 250, separator: ' ').html_safe
|
63
|
-
end
|
64
|
-
acts_as_published_columns
|
65
|
-
column :created_at
|
66
|
-
column :updated_at
|
67
|
-
actions
|
68
|
-
end
|
69
|
-
|
70
|
-
show title: :to_s do
|
71
|
-
attributes_table do
|
72
|
-
row :title
|
73
|
-
row :locale
|
74
|
-
row :published_at
|
75
|
-
row :link_to_more
|
76
|
-
row :markup_language
|
77
|
-
row :created_at
|
78
|
-
row :updated_at
|
79
|
-
end
|
80
|
-
|
81
|
-
panel Ecm::News::Item.human_attribute_name(:body) do
|
82
|
-
div do
|
83
|
-
mu(ecm_news_item, :body)
|
84
|
-
end # div
|
85
|
-
end # panel
|
86
|
-
|
87
|
-
panel_for_pictureable
|
88
|
-
end # show
|
89
|
-
end
|
90
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<div class="news-item show">
|
2
|
-
<h1><%= item.title %></h1>
|
3
|
-
|
4
|
-
<% if Ecm::News::Configuration.show_publish_time %>
|
5
|
-
<small class="item-published_at"><%= I18n.l(item.published_at) %></small>
|
6
|
-
<% end %>
|
7
|
-
|
8
|
-
<% if item.preview_picture.present? %>
|
9
|
-
<img class="img-responsive bottom-margin-2" src="<%= item.preview_picture.image.url %>" alt="<%= item.preview_picture.description %>" title="<%= item.preview_picture.description %>">
|
10
|
-
<% end %>
|
11
|
-
|
12
|
-
<div class="item-body"><%= mu(item, :body) %></div>
|
13
|
-
</div>
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<div class="news-item small-preview news-item-<%= index %>">
|
2
|
-
<h3 class="item-title"><%= item.title %></h3>
|
3
|
-
<% if Ecm::News::Configuration.show_publish_time %>
|
4
|
-
<small class="item-published_at"><%= I18n.l(item.published_at) %></small>
|
5
|
-
<% end %>
|
6
|
-
<div class="item-body truncate lines-<%= Ecm::News::Configuration.news_item_preview_lines %> bottom-margin-2"><%= mu(item, :body) %></div>
|
7
|
-
|
8
|
-
<div class="item-actions bottom-margin-2">
|
9
|
-
<%= link_to(t('ecm.news.views.actions.more'), main_app.url_for(item), class: 'btn btn-primary more-link') %>
|
10
|
-
</div>
|
11
|
-
</div>
|
12
|
-
|
@@ -1,20 +0,0 @@
|
|
1
|
-
<div class="<%= Ecm::News::Configuration.news_item_preview_div_classes %>" id="<%= item.class.name.underscore.gsub('/', '-') %>-<%= item.to_param %>">
|
2
|
-
<div class="media-left">
|
3
|
-
<% if item.preview_picture.present? %>
|
4
|
-
<%= link_to(item, class: Ecm::News::Configuration.news_item_preview_thumbnail_link_classes) do %>
|
5
|
-
<img class="media-object thumbnail img-responsive" src="<%= item.preview_picture.image.url(:default_thumb) %>" alt="...">
|
6
|
-
<% end %>
|
7
|
-
<% else %>
|
8
|
-
<%= content_tag(:div, nil, class: Ecm::News::Configuration.news_item_preview_thumbnail_link_classes) %>
|
9
|
-
<% end %>
|
10
|
-
</div>
|
11
|
-
<div class="media-body">
|
12
|
-
<h3 class="media-heading"><%= item.title %></h3>
|
13
|
-
<div class="news-body truncate lines-<%= Ecm::News::Configuration.news_item_preview_lines %> bottom-margin-1">
|
14
|
-
<%= mu(item, :body) %>
|
15
|
-
</div>
|
16
|
-
<div class="object-actions">
|
17
|
-
<%= link_to(t('ecm.news.views.actions.more'), item, class: 'btn btn-primary') %>
|
18
|
-
</div>
|
19
|
-
</div>
|
20
|
-
</div>
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<% content_for :meta_description, t('ecm.news.news') %>
|
2
|
-
<% content_for :title, t('ecm.news.news') %>
|
3
|
-
<h1><%= t('ecm.news.news') %></h1>
|
4
|
-
|
5
|
-
<% @items.each_with_index do |item, index| %>
|
6
|
-
<%= render partial: 'item_in_list', locals: { item: item, index: (index + 1) } %>
|
7
|
-
<% end %>
|
8
|
-
|
9
|
-
<%= paginate @items, theme: 'twitter-bootstrap-3' %>
|
10
|
-
|
11
|
-
<div class="well page-actions">
|
12
|
-
<%= link_to(t('ecm.news.views.actions.back'), root_path, class: 'btn btn-default') %>
|
13
|
-
</div>
|
@@ -1,10 +0,0 @@
|
|
1
|
-
<% content_for :meta_description, @item.title %>
|
2
|
-
<% content_for :title, @item.title %>
|
3
|
-
|
4
|
-
<%= render @item %>
|
5
|
-
|
6
|
-
<div class="page-actions well">
|
7
|
-
<div class="btn-group" role="group">
|
8
|
-
<%= link_to t('ecm.news.views.actions.back'), :back, class: 'btn btn-default' %>
|
9
|
-
</div>
|
10
|
-
</div>
|