ecm_news2_backend 1.2.1 → 1.2.2

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
  SHA1:
3
- metadata.gz: 1e44e4af5e8844d9df385640aaad0631eb48b539
4
- data.tar.gz: 807efb5cd705e08dfb570597c9f05f044eaf8160
3
+ metadata.gz: eeac13bbfc9a0a3f32d7a863d9ccb200b0d413b9
4
+ data.tar.gz: 4248ddef71a54dd964d751ea72c5879a7ca8663d
5
5
  SHA512:
6
- metadata.gz: 80880d7864181a8be95e8ecefebe3a5f99aa2d496111dde0763f12f24ce64048e7420e4c0d43c6bc2ca7a9c6178820c9e61d434a4a66a57e485744300ed17f2c
7
- data.tar.gz: 08779dc44ee41fda8fceb6bf7901cc5a53360d898e25c65f53cdf6d438fafe1aa2f06b6b69fac230e3e5da81653e956f5530409fe09938dcdf4dd4ca0f73d867
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(:ecm_news_item)
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')
@@ -9,5 +9,4 @@ de:
9
9
  publish: Veröffentlichen
10
10
  unpublish: Zurückziehen
11
11
  routes:
12
- mount:
13
- ecm_news_backend: '/backend/news'
12
+ ecm-news-backend-engine: 'news'
@@ -9,5 +9,4 @@ en:
9
9
  publish: Publish
10
10
  unpublish: Unpublish
11
11
  routes:
12
- mount:
13
- ecm_news_backend: '/backend/news'
12
+ ecm-news-backend-engine: 'news'
@@ -1,7 +1,7 @@
1
1
  module Ecm
2
2
  module News
3
3
  module Backend
4
- VERSION = '1.2.1'.freeze
4
+ VERSION = '1.2.2'.freeze
5
5
  end
6
6
  end
7
7
  end
@@ -1,5 +1,5 @@
1
1
  # This migration comes from ecm_news_engine (originally 1)
2
- class CreateEcmNewsItems < ActiveRecord::Migration
2
+ class CreateEcmNewsItems < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  create_table :ecm_news_items do |t|
5
5
  t.string :title
@@ -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 2)
2
- class CreateEcmPicturesPictures < ActiveRecord::Migration
2
+ class CreateEcmPicturesPictures < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  create_table :ecm_pictures_pictures 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.1
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-01-29 00:00:00.000000000 Z
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.4.8
373
+ rubygems_version: 2.6.11
374
374
  signing_key:
375
375
  specification_version: 4
376
376
  summary: Backend Module for ECM News 2