ecm_galleries_backend 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/ecm/galleries/backend/picture_details_controller.rb +5 -1
- data/app/views/ecm/galleries/backend/picture_details/_before_index_table.html.haml +5 -0
- data/app/views/ecm/galleries/backend/picture_galleries/_show.haml +1 -1
- data/app/views/ecm/galleries/backend/picture_galleries/_show_extras.haml +15 -6
- data/app/views/ecm/galleries/backend/picture_galleries/_table.haml +0 -1
- data/config/locales/de.yml +2 -0
- data/config/locales/en.yml +3 -1
- data/config/routes.rb +1 -1
- data/lib/ecm/galleries/backend/version.rb +1 -1
- data/lib/ecm_galleries_backend.rb +1 -0
- metadata +18 -7
- data/app/views/ecm/galleries/backend/galleries~/_form.haml +0 -1
- data/app/views/ecm/galleries/backend/galleries~/_show.haml +0 -2
- data/app/views/ecm/galleries/backend/galleries~/_show_extras.haml +0 -3
- data/app/views/ecm/galleries/backend/galleries~/_table.haml +0 -3
- /data/app/views/ecm/galleries/backend/{attachments → attachments~}/_table.haml +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1133a4578fd396958c6bd729dd7b31da405e4db1a99ea97fd371c55b7c491100
|
4
|
+
data.tar.gz: 64ebfc2006642982366a3ca6164ae2fcd471b04012cd22b1926b0323998684e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94402ad6d8524e3f918088193874a580da42e28db54bdb3c51e1eb8f763b8f0c3f4dc9907d5278cf7c390dc13eae2bb60f334d8454a910f00227581c6d91d2e6
|
7
|
+
data.tar.gz: 2d6645c12736b1c48c0c29262735b770308134888a6aea8323c5c5ad69a70df0bc67038a3dee2f6435ed2f8193fe56d13062500b26e362c358375316dd2f4337
|
@@ -9,6 +9,9 @@ module Ecm
|
|
9
9
|
|
10
10
|
helper Twitter::Bootstrap::Components::Rails::V3::ComponentsHelper
|
11
11
|
|
12
|
+
include Rao::Query::Controller::QueryConcern
|
13
|
+
view_helper Rao::Query::ApplicationHelper, as: :query_helper
|
14
|
+
|
12
15
|
def self.resource_class
|
13
16
|
Ecm::Galleries::PictureDetail
|
14
17
|
end
|
@@ -16,7 +19,8 @@ module Ecm
|
|
16
19
|
private
|
17
20
|
|
18
21
|
def load_collection_scope
|
19
|
-
super.joins(:picture_gallery).order(picture_gallery_id: :asc, position: :asc)
|
22
|
+
scope = super.joins(:picture_gallery).order(picture_gallery_id: :asc, position: :asc)
|
23
|
+
with_conditions_from_query(scope)
|
20
24
|
end
|
21
25
|
|
22
26
|
def after_destroy_location
|
@@ -0,0 +1,5 @@
|
|
1
|
+
= query_helper(self).form_for(collection, url: collection_path, method: :get, html: { class: 'form-inline' }) do |f|
|
2
|
+
= f.input :title_cont
|
3
|
+
= f.input :name_cont, association: :picture_gallery
|
4
|
+
= f.submit nil, class: 'btn btn-primary'
|
5
|
+
= f.reset nil, class: 'btn btn-default'
|
@@ -3,10 +3,19 @@
|
|
3
3
|
= bootstrap_thumbnail(image_options: { src: main_app.url_for(picture_detail.asset) }) do
|
4
4
|
%h5= picture_detail.title
|
5
5
|
%p= picture_detail.description
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
- if picture_detail.published?
|
7
|
+
= link_to([:toggle_published, picture_detail], class: 'btn btn-xs btn-responsive btn-danger', method: :post) do
|
8
|
+
%span.glyphicon.glyphicon-eye-close
|
9
|
+
%span.btn-text= t('.unpublish')
|
10
|
+
- else
|
11
|
+
= link_to([:toggle_published, picture_detail], class: 'btn btn-xs btn-responsive btn-success', method: :post) do
|
12
|
+
%span.glyphicon.glyphicon-eye-open
|
13
|
+
%span.btn-text= t('.publish')
|
9
14
|
.pull-right
|
10
|
-
|
11
|
-
|
12
|
-
|
15
|
+
.btn-group
|
16
|
+
= link_to([:edit, picture_detail], class: 'btn btn-xs btn-responsive btn-primary') do
|
17
|
+
%span.glyphicon.glyphicon-pencil
|
18
|
+
%span.btn-text= t('.edit')
|
19
|
+
= link_to([picture_detail], class: 'btn btn-xs btn-responsive btn-danger', method: :delete, data: { confirm: I18n.t('.confirmations.delete') }) do
|
20
|
+
%span.glyphicon.glyphicon-fire
|
21
|
+
%span.btn-text= t('.destroy')
|
@@ -1,7 +1,6 @@
|
|
1
1
|
= table.column :preview do |resource|
|
2
2
|
- if resource.picture_details.first.present?
|
3
3
|
- bootstrap_thumbnail(image_options: { src: main_app.url_for(resource.picture_details.first.asset) })
|
4
|
-
= table.column :id, sort: true
|
5
4
|
= table.column :name, sort: true
|
6
5
|
= table.column :picture_details_count
|
7
6
|
= table.timestamps format: :short, sort: true
|
data/config/locales/de.yml
CHANGED
data/config/locales/en.yml
CHANGED
data/config/routes.rb
CHANGED
@@ -3,7 +3,7 @@ Ecm::Galleries::Backend::Engine.routes.draw do
|
|
3
3
|
post :toggle_published, on: :member
|
4
4
|
end
|
5
5
|
|
6
|
-
resources :picture_details do
|
6
|
+
resources :picture_details, except: [:new] do
|
7
7
|
post :destroy_many, on: :collection
|
8
8
|
post :reposition, on: :member
|
9
9
|
post :toggle_published, on: :member
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecm_galleries_backend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.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: 2018-12-
|
11
|
+
date: 2018-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rao-query
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: twitter-bootstrap-components-rails
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -216,11 +230,8 @@ files:
|
|
216
230
|
- app/jobs/ecm/galleries/backend/application_job.rb
|
217
231
|
- app/mailers/ecm/galleries/backend/application_mailer.rb
|
218
232
|
- app/models/ecm/galleries/backend/application_record.rb
|
219
|
-
- app/views/ecm/galleries/backend/attachments
|
220
|
-
- app/views/ecm/galleries/backend/
|
221
|
-
- app/views/ecm/galleries/backend/galleries~/_show.haml
|
222
|
-
- app/views/ecm/galleries/backend/galleries~/_show_extras.haml
|
223
|
-
- app/views/ecm/galleries/backend/galleries~/_table.haml
|
233
|
+
- app/views/ecm/galleries/backend/attachments~/_table.haml
|
234
|
+
- app/views/ecm/galleries/backend/picture_details/_before_index_table.html.haml
|
224
235
|
- app/views/ecm/galleries/backend/picture_details/_form.html.haml
|
225
236
|
- app/views/ecm/galleries/backend/picture_details/_show.html.haml
|
226
237
|
- app/views/ecm/galleries/backend/picture_details/_table.html.haml
|
@@ -1 +0,0 @@
|
|
1
|
-
= form.input :assets, as: :file, input_html: { multiple: true }
|
File without changes
|