ecm_news2_backend 1.2.1 → 1.2.2
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/controllers/ecm/news/backend/items_controller.rb +4 -16
- data/app/views/ecm/news/backend/items/_table.html.haml +3 -12
- data/config/locales/de.yml +1 -2
- data/config/locales/en.yml +1 -2
- data/lib/ecm/news/backend/version.rb +1 -1
- data/spec/dummy/db/migrate/20160322163513_create_ecm_news_items.ecm_news_engine.rb +1 -1
- data/spec/dummy/db/migrate/20160322164128_create_ecm_pictures_picture_galleries.ecm_pictures_engine.rb +1 -1
- data/spec/dummy/db/migrate/20160322164129_create_ecm_pictures_pictures.ecm_pictures_engine.rb +1 -1
- data/spec/dummy/db/migrate/20160322164130_create_ecm_pictures_attached_pictures.ecm_pictures_engine.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eeac13bbfc9a0a3f32d7a863d9ccb200b0d413b9
|
4
|
+
data.tar.gz: 4248ddef71a54dd964d751ea72c5879a7ca8663d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85e41aa72f4db617ce3e2979988ee73d32eb1aa606001aa13337398cbadddd9498f4fadc2cc5f0f69bba633fe249be08997307d50a4883c61812f23b8c56c9d8
|
7
|
+
data.tar.gz: 5660b1eeda084a3b1938ec66859371070c30f8e9a386e1ad9ec01c579c507ec410b50bd3f4b711b49f436b63cabc249b821502ef6dff43cbefe1556fbd7c6df3
|
@@ -1,28 +1,16 @@
|
|
1
1
|
class Ecm::News::Backend::ItemsController < Itsf::Backend::Resource::BaseController
|
2
|
+
include Controller::FriendlyIdConcern
|
3
|
+
include Controller::ActsAsPublishedConcern
|
4
|
+
|
2
5
|
def self.resource_class
|
3
6
|
Ecm::News::Item
|
4
7
|
end
|
5
8
|
|
6
|
-
def toggle_published
|
7
|
-
@resource = resource_class.find(params[:id])
|
8
|
-
@resource.toggle_published!
|
9
|
-
action = @resource.published? ? :published : :unpublished
|
10
|
-
respond_with(
|
11
|
-
@resource,
|
12
|
-
location: collection_path,
|
13
|
-
notice: I18n.t("flash.actions.#{action_name}.#{action}.notice", inflections)
|
14
|
-
)
|
15
|
-
end
|
16
|
-
|
17
9
|
private
|
18
10
|
|
19
11
|
def permitted_params
|
20
12
|
params
|
21
|
-
.require(:
|
13
|
+
.require(:item)
|
22
14
|
.permit(:title, :locale, :body, :link_to_more, :published, pictures_attributes: [ :image, :_destroy, :id ])
|
23
15
|
end
|
24
|
-
|
25
|
-
def load_resource
|
26
|
-
load_scope.friendly.find(params[:id])
|
27
|
-
end
|
28
16
|
end
|
@@ -1,17 +1,8 @@
|
|
1
1
|
= table.column(:preview_picture) do |item|
|
2
2
|
- if item.preview_picture.present?
|
3
3
|
%img.img-responsive.bottom-margin-2{ src: item.preview_picture.image.url, alt: item.preview_picture.description, title: item.preview_picture.description }
|
4
|
-
= table.column :locale
|
5
|
-
= table.column :title, class: 'truncate-chars truncate-chars-30'
|
6
|
-
= table.column :body, class: 'truncate-chars truncate-chars-30'
|
4
|
+
= table.column :locale, sortable: true
|
5
|
+
= table.column :title, sortable: true, class: 'truncate-chars truncate-chars-30'
|
6
|
+
= table.column :body, sortable: true, class: 'truncate-chars truncate-chars-30'
|
7
7
|
= table.timestamps
|
8
8
|
= table.acts_as_published_actions
|
9
|
-
/ = table.column(:additional_actions, class: 'table-data-centered') do |item|
|
10
|
-
/ - if item.published?
|
11
|
-
/ = link_to(toggle_published_item_path(item), class: 'btn btn-xs btn-danger', method: :post, title: t('.unpublish')) do
|
12
|
-
/ %span.glyphicon.glyphicon-eye-close
|
13
|
-
/ = t('.unpublish')
|
14
|
-
/ - else
|
15
|
-
/ = link_to(toggle_published_item_path(item), class: 'btn btn-xs btn-success', method: :post, title: t('.publish')) do
|
16
|
-
/ %span.glyphicon.glyphicon-eye-open
|
17
|
-
/ = t('.publish')
|
data/config/locales/de.yml
CHANGED
data/config/locales/en.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# This migration comes from ecm_pictures_engine (originally 1)
|
2
|
-
class CreateEcmPicturesPictureGalleries < ActiveRecord::Migration
|
2
|
+
class CreateEcmPicturesPictureGalleries < ActiveRecord::Migration[4.2]
|
3
3
|
def change
|
4
4
|
create_table :ecm_pictures_picture_galleries do |t|
|
5
5
|
t.string :name
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# This migration comes from ecm_pictures_engine (originally 3)
|
2
|
-
class CreateEcmPicturesAttachedPictures < ActiveRecord::Migration
|
2
|
+
class CreateEcmPicturesAttachedPictures < ActiveRecord::Migration[4.2]
|
3
3
|
def change
|
4
4
|
create_table :ecm_pictures_attached_pictures do |t|
|
5
5
|
t.references :ecm_pictures_picture
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecm_news2_backend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
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-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -370,7 +370,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
370
370
|
version: '0'
|
371
371
|
requirements: []
|
372
372
|
rubyforge_project:
|
373
|
-
rubygems_version: 2.
|
373
|
+
rubygems_version: 2.6.11
|
374
374
|
signing_key:
|
375
375
|
specification_version: 4
|
376
376
|
summary: Backend Module for ECM News 2
|