ecm_pictures2 3.0.1 → 4.0.1
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/assets/stylesheets/ecm/pictures/application/bootstrap_v3_flex_extension.css +13 -0
- data/app/assets/stylesheets/ecm/pictures/application.css +3 -0
- data/app/assets/stylesheets/ecm_pictures.css +3 -0
- data/app/controllers/ecm/pictures/galleries_controller.rb +17 -4
- data/app/controllers/ecm/pictures/pictures_controller.rb +23 -8
- data/app/helpers/ecm/pictures_helper.rb +1 -6
- data/app/models/ecm/pictures/attached_picture.rb +10 -8
- data/app/models/ecm/pictures/gallery.rb +4 -0
- data/app/models/ecm/pictures/picture.rb +68 -63
- data/app/views/ecm/pictures/galleries/_gallery.haml +5 -0
- data/app/views/ecm/pictures/galleries/index.haml +28 -0
- data/app/views/ecm/pictures/galleries/show.haml +15 -0
- data/app/views/ecm/pictures/pictures/index.haml +28 -0
- data/app/views/ecm/pictures/pictures/show.haml +16 -0
- data/config/initializers/assets.rb +1 -0
- data/config/locales/ecm.pictures.de.yml +13 -2
- data/config/routes.rb +6 -0
- data/lib/ecm/pictures/configuration.rb +12 -0
- data/lib/ecm/pictures/engine.rb +1 -0
- data/lib/ecm/pictures/version.rb +1 -1
- data/lib/ecm_pictures2.rb +3 -1
- metadata +26 -54
- data/app/views/ecm/pictures/galleries/_gallery.html.erb +0 -17
- data/app/views/ecm/pictures/galleries/_gallery_for_index.html.erb +0 -19
- data/app/views/ecm/pictures/galleries/index.html.erb +0 -27
- data/app/views/ecm/pictures/galleries/show.html.erb +0 -10
- data/app/views/ecm/pictures/pictures/_picture.html.erb +0 -16
- data/app/views/ecm/pictures/pictures/_picture_for_gallery.html.erb +0 -10
- data/app/views/ecm/pictures/pictures/index.html.erb +0 -9
- data/app/views/ecm/pictures/pictures/show.html.erb +0 -12
- data/lib/ecm/pictures/routing.rb +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a10f41c17b3437eebcb3763c3b32bb30a41faa3
|
4
|
+
data.tar.gz: 4424f5e3d5ac28309b4ff41f10cd705950fa20ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee254b1a5007d66f6f4c1da0bbd13b0f857b65782e6f453f5a5e91d606f304ef46f7532f6916635e04365625253e6b532e413f6026427aacd6af9244ca73e898
|
7
|
+
data.tar.gz: 4f28ac819ecda6427824add00df5239e348a5c3a74bba05892ffe8dad25f3a0f6f16afa3553079bb492b63cd17f368f3b0b78cb4108c0319c6c7cb90d67d0efb
|
@@ -1,12 +1,25 @@
|
|
1
1
|
module Ecm
|
2
2
|
module Pictures
|
3
3
|
class GalleriesController < Ecm::Pictures::Configuration.base_controller.constantize
|
4
|
-
|
5
|
-
|
4
|
+
before_action :load_collection, only: [:index]
|
5
|
+
before_action :load_resource, only: [:show]
|
6
|
+
|
7
|
+
def index; end
|
8
|
+
|
9
|
+
def show; end
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def resource_class
|
14
|
+
Gallery
|
15
|
+
end
|
16
|
+
|
17
|
+
def load_collection
|
18
|
+
@collection = resource_class.all
|
6
19
|
end
|
7
20
|
|
8
|
-
def
|
9
|
-
@
|
21
|
+
def load_resource
|
22
|
+
@resource = resource_class.find(params[:id])
|
10
23
|
end
|
11
24
|
end
|
12
25
|
end
|
@@ -1,11 +1,26 @@
|
|
1
|
-
module Ecm
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
module Ecm
|
2
|
+
module Pictures
|
3
|
+
class PicturesController < Ecm::Pictures::Configuration.base_controller.constantize
|
4
|
+
before_action :load_collection, only: [:index]
|
5
|
+
before_action :load_resource, only: [:show]
|
6
|
+
|
7
|
+
def index; end
|
8
|
+
|
9
|
+
def show; end
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def resource_class
|
14
|
+
Picture
|
15
|
+
end
|
16
|
+
|
17
|
+
def load_collection
|
18
|
+
@collection = resource_class.all
|
19
|
+
end
|
6
20
|
|
7
|
-
|
8
|
-
|
21
|
+
def load_resource
|
22
|
+
@resource = resource_class.find(params[:id])
|
23
|
+
end
|
9
24
|
end
|
10
25
|
end
|
11
|
-
end
|
26
|
+
end
|
@@ -11,18 +11,13 @@ module Ecm::PicturesHelper
|
|
11
11
|
options = { preview_style: :thumb }.merge(options)
|
12
12
|
|
13
13
|
gallery = Ecm::Pictures::Gallery.where(name: name.to_s).first
|
14
|
-
gallery_identifier = begin
|
15
|
-
gallery.to_param
|
16
|
-
rescue
|
17
|
-
'missing'
|
18
|
-
end
|
19
14
|
|
20
15
|
if gallery.nil?
|
21
16
|
content_tag(:div, class: 'warning missing gallery') do
|
22
17
|
content_tag(:p, I18n.t('ecm.pictures.gallery.warnings.missing', name: name.to_s))
|
23
18
|
end
|
24
19
|
else
|
25
|
-
render gallery
|
20
|
+
render gallery, { view: self }
|
26
21
|
end
|
27
22
|
|
28
23
|
rescue Exception => e
|
@@ -1,10 +1,12 @@
|
|
1
|
-
module Ecm
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
module Ecm
|
2
|
+
module Pictures
|
3
|
+
class AttachedPicture < ActiveRecord::Base
|
4
|
+
# associations
|
5
|
+
belongs_to :picture, foreign_key: 'ecm_pictures_picture_id'
|
6
|
+
belongs_to :pictureable, polymorphic: true
|
6
7
|
|
7
|
-
|
8
|
-
|
8
|
+
# validations
|
9
|
+
validates :picture, :pictureable, presence: true
|
10
|
+
end
|
9
11
|
end
|
10
|
-
end
|
12
|
+
end
|
@@ -1,72 +1,77 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
acts_as_list scope: :gallery
|
8
|
-
|
9
|
-
# acts as markup
|
10
|
-
acts_as_markup language: :variable, columns: [:description, :description]
|
11
|
-
|
12
|
-
# callbacks
|
13
|
-
after_initialize :set_defaults
|
14
|
-
before_validation :set_name_from_image_file_name, if: proc { |p| (p.name.nil? || p.name.empty?) }
|
15
|
-
|
16
|
-
# default scope
|
17
|
-
default_scope { order(:gallery_id, :position) }
|
18
|
-
# friendly id
|
19
|
-
extend FriendlyId
|
20
|
-
friendly_id :name, use: [:slugged, :finders]
|
21
|
-
# paperclip
|
22
|
-
has_attached_file :image, Ecm::Pictures::Configuration.paperclip_options
|
23
|
-
|
24
|
-
# tagging
|
25
|
-
acts_as_taggable if respond_to?(:acts_as_taggable)
|
26
|
-
|
27
|
-
# validations
|
28
|
-
validates :image, attachment_presence: true
|
29
|
-
# validates_attachment_presence :image
|
30
|
-
validates_attachment :image, content_type: { content_type: /\Aimage\/.*\Z/ }
|
31
|
-
|
32
|
-
validates :markup_language, presence: true,
|
33
|
-
inclusion: Ecm::Pictures::Configuration.markup_languages
|
34
|
-
validates :name, presence: true
|
35
|
-
|
36
|
-
def display_code_for_erb
|
37
|
-
display_code(:erb)
|
38
|
-
end
|
1
|
+
module Ecm
|
2
|
+
module Pictures
|
3
|
+
class Picture < ActiveRecord::Base
|
4
|
+
# associations
|
5
|
+
belongs_to :gallery, counter_cache: true
|
6
|
+
has_many :attached_pictures, foreign_key: 'ecm_pictures_picture_id'
|
39
7
|
|
40
|
-
|
41
|
-
|
42
|
-
end
|
8
|
+
# acts as list
|
9
|
+
acts_as_list scope: :gallery
|
43
10
|
|
44
|
-
|
45
|
-
|
46
|
-
when :erb
|
47
|
-
"<%= render_picture '#{name}' %>"
|
48
|
-
when :textile
|
49
|
-
"!#{image.url}!".gsub(/(\?[0-9]{1,})/, '')
|
50
|
-
end
|
51
|
-
end
|
11
|
+
# acts as markup
|
12
|
+
acts_as_markup language: :variable, columns: [:description, :description]
|
52
13
|
|
53
|
-
|
54
|
-
|
55
|
-
|
14
|
+
# callbacks
|
15
|
+
after_initialize :set_defaults
|
16
|
+
before_validation :set_name_from_image_file_name, if: proc { |p| (p.name.nil? || p.name.empty?) }
|
56
17
|
|
57
|
-
|
58
|
-
|
59
|
-
|
18
|
+
# default scope
|
19
|
+
default_scope { order(:gallery_id, :position) }
|
20
|
+
# friendly id
|
21
|
+
extend FriendlyId
|
22
|
+
friendly_id :name, use: [:slugged, :finders]
|
23
|
+
# paperclip
|
24
|
+
has_attached_file :image, Ecm::Pictures::Configuration.paperclip_options
|
60
25
|
|
61
|
-
|
26
|
+
# tagging
|
27
|
+
acts_as_taggable if respond_to?(:acts_as_taggable)
|
62
28
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
29
|
+
# validations
|
30
|
+
validates :image, attachment_presence: true
|
31
|
+
# validates_attachment_presence :image
|
32
|
+
validates_attachment :image, content_type: { content_type: /\Aimage\/.*\Z/ }
|
33
|
+
|
34
|
+
validates :markup_language, presence: true,
|
35
|
+
inclusion: Ecm::Pictures::Configuration.markup_languages
|
36
|
+
validates :name, presence: true
|
68
37
|
|
69
|
-
|
70
|
-
|
38
|
+
def display_code_for_erb
|
39
|
+
display_code(:erb)
|
40
|
+
end
|
41
|
+
|
42
|
+
def display_code_for_textile
|
43
|
+
display_code(:textile)
|
44
|
+
end
|
45
|
+
|
46
|
+
def display_code(style)
|
47
|
+
case style
|
48
|
+
when :erb
|
49
|
+
"<%= render_picture '#{name}' %>"
|
50
|
+
when :textile
|
51
|
+
"!#{image.url}!".gsub(/(\?[0-9]{1,})/, '')
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def to_s
|
56
|
+
name
|
57
|
+
end
|
58
|
+
|
59
|
+
def human
|
60
|
+
name
|
61
|
+
end
|
62
|
+
|
63
|
+
private
|
64
|
+
|
65
|
+
def set_defaults
|
66
|
+
if self.new_record?
|
67
|
+
self.markup_language ||= Ecm::Pictures::Configuration.default_markup_language
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
def set_name_from_image_file_name
|
72
|
+
self.name = File.basename(image_file_name, File.extname(image_file_name)) unless image_file_name.nil?
|
73
|
+
end
|
74
|
+
end
|
71
75
|
end
|
72
76
|
end
|
77
|
+
|
@@ -0,0 +1,5 @@
|
|
1
|
+
= bootstrap_responsive_media_object(image_options: { src: gallery.preview_picture.try(:url) }) do
|
2
|
+
%h4= gallery.name
|
3
|
+
= gallery.description.to_html.html_safe
|
4
|
+
= bootstrap_button(to: view.ecm_pictures.polymorphic_url(gallery, only_path: true), context: :primary) do
|
5
|
+
= t('.more')
|
@@ -0,0 +1,28 @@
|
|
1
|
+
%h1= Ecm::Pictures::Gallery.model_name.human(count: :other)
|
2
|
+
|
3
|
+
- case Ecm::Pictures::Configuration.render_gallery_index_as
|
4
|
+
- when :thumbnail
|
5
|
+
.row
|
6
|
+
- @collection.each do |resource|
|
7
|
+
= bootstrap_thumbnail(container_classes: "col-sm-6 col-md-4", image_options: { src: resource.preview_picture&.image&.url(Ecm::Pictures.thumbnail_paperclip_style) }) do
|
8
|
+
%h3= resource.name
|
9
|
+
- if Ecm::Pictures::Configuration.prevent_textile_rendering_in_html
|
10
|
+
%notextile
|
11
|
+
%p= resource.description
|
12
|
+
- else
|
13
|
+
%p= resource.description
|
14
|
+
%p
|
15
|
+
= link_to ecm_pictures.gallery_path(resource), class: 'btn btn-primary' do
|
16
|
+
= t('.more')
|
17
|
+
- when :media_object
|
18
|
+
- @collection.each do |resource|
|
19
|
+
= bootstrap_media_object(image_options: { src: resource.preview_picture&.image&.url(Ecm::Pictures.thumbnail_paperclip_style) }) do
|
20
|
+
%h4= resource.name
|
21
|
+
- if Ecm::Pictures::Configuration.prevent_textile_rendering_in_html
|
22
|
+
%notextile
|
23
|
+
%p= resource.description
|
24
|
+
- else
|
25
|
+
%p= resource.description
|
26
|
+
%p
|
27
|
+
= link_to ecm_pictures.gallery_path(resource), class: 'btn btn-primary' do
|
28
|
+
= t('.more')
|
@@ -0,0 +1,15 @@
|
|
1
|
+
%h1= @resource.name
|
2
|
+
|
3
|
+
.row
|
4
|
+
- @resource.pictures.each do |picture|
|
5
|
+
= bootstrap_thumbnail(container_classes: Ecm::Pictures.thumbnail_container_css_classes, image_options: { src: picture.image.url(Ecm::Pictures.thumbnail_paperclip_style) }, link_options: { href: "#{picture.image.url}#{File.extname(picture.image_file_name).downcase}", :'data-gallery' => "gallery" }) do
|
6
|
+
%h3= picture.name
|
7
|
+
- if Ecm::Pictures::Configuration.prevent_textile_rendering_in_html
|
8
|
+
%notextile
|
9
|
+
%p= picture.description
|
10
|
+
- else
|
11
|
+
%p= picture.description
|
12
|
+
|
13
|
+
= bootstrap_button_group do
|
14
|
+
= link_to Ecm::Pictures::Gallery.model_name.human(count: :other), ecm_pictures.galleries_path, class: 'btn btn-primary'
|
15
|
+
= link_to t('ecm.pictures.views.actions.back'), :back, class: 'btn btn-default'
|
@@ -0,0 +1,28 @@
|
|
1
|
+
%h1= Ecm::Pictures::Picture.model_name.human(count: :other)
|
2
|
+
|
3
|
+
- case Ecm::Pictures::Configuration.render_picture_index_as
|
4
|
+
- when :thumbnail
|
5
|
+
.flex-row
|
6
|
+
- @collection.each do |resource|
|
7
|
+
= bootstrap_thumbnail(container_classes: Ecm::Pictures.thumbnail_container_css_classes, image_options: { src: resource&.image&.url(Ecm::Pictures.thumbnail_paperclip_style) }, link_options: { href: "#{resource.image.url}#{File.extname(resource.image_file_name).downcase}", :'data-gallery' => "gallery" }) do
|
8
|
+
%h3= resource.name
|
9
|
+
- if Ecm::Pictures::Configuration.prevent_textile_rendering_in_html
|
10
|
+
%notextile
|
11
|
+
%p= resource.description
|
12
|
+
- else
|
13
|
+
%p= resource.description
|
14
|
+
%p
|
15
|
+
= link_to ecm_pictures.picture_path(resource), class: 'btn btn-primary' do
|
16
|
+
= t('.more')
|
17
|
+
- when :media_object
|
18
|
+
- @collection.each do |resource|
|
19
|
+
= bootstrap_media_object(image_options: { src: resource&.image&.url(Ecm::Pictures.thumbnail_paperclip_style) }) do
|
20
|
+
%h4= resource.name
|
21
|
+
- if Ecm::Pictures::Configuration.prevent_textile_rendering_in_html
|
22
|
+
%notextile
|
23
|
+
%p= resource.description
|
24
|
+
- else
|
25
|
+
%p= resource.description
|
26
|
+
%p
|
27
|
+
= link_to ecm_pictures.picture_path(resource), class: 'btn btn-primary' do
|
28
|
+
= t('.more')
|
@@ -0,0 +1,16 @@
|
|
1
|
+
.row
|
2
|
+
%h1= @resource.to_s
|
3
|
+
|
4
|
+
.row
|
5
|
+
= image_tag(@resource.image.url, class: "img-responsive")
|
6
|
+
|
7
|
+
.row
|
8
|
+
- if Ecm::Pictures::Configuration.prevent_textile_rendering_in_html
|
9
|
+
%notextile
|
10
|
+
%p= @resource.description
|
11
|
+
- else
|
12
|
+
%p= @resource.description
|
13
|
+
|
14
|
+
.row
|
15
|
+
= bootstrap_button(to: :back, context: :default) do
|
16
|
+
= t('.back')
|
@@ -0,0 +1 @@
|
|
1
|
+
Rails.application.config.assets.precompile += %w(ecm_pictures.css)
|
@@ -1,6 +1,4 @@
|
|
1
1
|
de:
|
2
|
-
active_admin:
|
3
|
-
delete_link: "Verknüpfung entfernen"
|
4
2
|
back: Zurück
|
5
3
|
ecm:
|
6
4
|
pictures:
|
@@ -11,9 +9,22 @@ de:
|
|
11
9
|
picture:
|
12
10
|
warnings:
|
13
11
|
missing: "Das Bild %{name} wurde nicht gefunden."
|
12
|
+
pictures:
|
13
|
+
index:
|
14
|
+
more: 'Mehr'
|
15
|
+
show:
|
16
|
+
back: 'Zurück'
|
14
17
|
gallery:
|
15
18
|
warnings:
|
16
19
|
missing: "Die Galerie %{name} wurde nicht gefunden."
|
20
|
+
galleries:
|
21
|
+
gallery:
|
22
|
+
more: 'Mehr'
|
23
|
+
index:
|
24
|
+
more: 'Mehr'
|
17
25
|
views:
|
18
26
|
actions:
|
19
27
|
back: 'Zurück'
|
28
|
+
routes:
|
29
|
+
galleries: galerien
|
30
|
+
pictures: bilder
|
data/config/routes.rb
ADDED
@@ -32,6 +32,18 @@ module Ecm
|
|
32
32
|
mattr_accessor :render_gallery_index_as do
|
33
33
|
:thumbnail
|
34
34
|
end
|
35
|
+
|
36
|
+
mattr_accessor :render_picture_index_as do
|
37
|
+
:thumbnail
|
38
|
+
end
|
39
|
+
|
40
|
+
mattr_accessor :thumbnail_container_css_classes do
|
41
|
+
"col-sm-6 col-md-4"
|
42
|
+
end
|
43
|
+
|
44
|
+
mattr_accessor :thumbnail_paperclip_style do
|
45
|
+
:original
|
46
|
+
end
|
35
47
|
end
|
36
48
|
end
|
37
49
|
end
|
data/lib/ecm/pictures/engine.rb
CHANGED
data/lib/ecm/pictures/version.rb
CHANGED
data/lib/ecm_pictures2.rb
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
require 'acts_as_list'
|
2
2
|
require 'acts_as_markup'
|
3
3
|
require 'friendly_id'
|
4
|
+
require 'haml-rails'
|
4
5
|
require 'paperclip'
|
6
|
+
require 'route_translator'
|
7
|
+
require 'twitter/bootstrap/components/rails'
|
5
8
|
|
6
9
|
require 'ecm/pictures/engine'
|
7
10
|
require 'ecm/pictures/configuration'
|
8
|
-
require 'ecm/pictures/routing'
|
9
11
|
require 'ecm/pictures/version'
|
10
12
|
|
11
13
|
module Ecm
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecm_pictures2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.1
|
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-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -95,13 +95,13 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: route_translator
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
|
-
type: :
|
104
|
+
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
@@ -109,13 +109,13 @@ dependencies:
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: haml-rails
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
|
-
type: :
|
118
|
+
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
@@ -123,13 +123,13 @@ dependencies:
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: twitter-bootstrap-components-rails
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0'
|
132
|
-
type: :
|
132
|
+
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
@@ -137,7 +137,7 @@ dependencies:
|
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
140
|
+
name: rails-dummy
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - ">="
|
@@ -151,7 +151,7 @@ dependencies:
|
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
154
|
+
name: thin
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - ">="
|
@@ -165,7 +165,7 @@ dependencies:
|
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
|
-
name:
|
168
|
+
name: sqlite3
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
171
|
- - ">="
|
@@ -179,7 +179,7 @@ dependencies:
|
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
|
-
name:
|
182
|
+
name: jquery-rails
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
185
|
- - ">="
|
@@ -207,35 +207,7 @@ dependencies:
|
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0'
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
|
-
name:
|
211
|
-
requirement: !ruby/object:Gem::Requirement
|
212
|
-
requirements:
|
213
|
-
- - ">="
|
214
|
-
- !ruby/object:Gem::Version
|
215
|
-
version: '0'
|
216
|
-
type: :development
|
217
|
-
prerelease: false
|
218
|
-
version_requirements: !ruby/object:Gem::Requirement
|
219
|
-
requirements:
|
220
|
-
- - ">="
|
221
|
-
- !ruby/object:Gem::Version
|
222
|
-
version: '0'
|
223
|
-
- !ruby/object:Gem::Dependency
|
224
|
-
name: activeadmin
|
225
|
-
requirement: !ruby/object:Gem::Requirement
|
226
|
-
requirements:
|
227
|
-
- - "~>"
|
228
|
-
- !ruby/object:Gem::Version
|
229
|
-
version: 1.0.0.pre2
|
230
|
-
type: :development
|
231
|
-
prerelease: false
|
232
|
-
version_requirements: !ruby/object:Gem::Requirement
|
233
|
-
requirements:
|
234
|
-
- - "~>"
|
235
|
-
- !ruby/object:Gem::Version
|
236
|
-
version: 1.0.0.pre2
|
237
|
-
- !ruby/object:Gem::Dependency
|
238
|
-
name: coffee-rails
|
210
|
+
name: less-rails
|
239
211
|
requirement: !ruby/object:Gem::Requirement
|
240
212
|
requirements:
|
241
213
|
- - ">="
|
@@ -249,7 +221,7 @@ dependencies:
|
|
249
221
|
- !ruby/object:Gem::Version
|
250
222
|
version: '0'
|
251
223
|
- !ruby/object:Gem::Dependency
|
252
|
-
name:
|
224
|
+
name: twitter-bootstrap-rails
|
253
225
|
requirement: !ruby/object:Gem::Requirement
|
254
226
|
requirements:
|
255
227
|
- - ">="
|
@@ -263,7 +235,7 @@ dependencies:
|
|
263
235
|
- !ruby/object:Gem::Version
|
264
236
|
version: '0'
|
265
237
|
- !ruby/object:Gem::Dependency
|
266
|
-
name: rails
|
238
|
+
name: coffee-rails
|
267
239
|
requirement: !ruby/object:Gem::Requirement
|
268
240
|
requirements:
|
269
241
|
- - ">="
|
@@ -384,6 +356,9 @@ files:
|
|
384
356
|
- MIT-LICENSE
|
385
357
|
- README.rdoc
|
386
358
|
- Rakefile
|
359
|
+
- app/assets/stylesheets/ecm/pictures/application.css
|
360
|
+
- app/assets/stylesheets/ecm/pictures/application/bootstrap_v3_flex_extension.css
|
361
|
+
- app/assets/stylesheets/ecm_pictures.css
|
387
362
|
- app/controllers/ecm/pictures/galleries_controller.rb
|
388
363
|
- app/controllers/ecm/pictures/pictures_controller.rb
|
389
364
|
- app/helpers/ecm/pictures_helper.rb
|
@@ -391,14 +366,12 @@ files:
|
|
391
366
|
- app/models/ecm/pictures/attached_picture.rb
|
392
367
|
- app/models/ecm/pictures/gallery.rb
|
393
368
|
- app/models/ecm/pictures/picture.rb
|
394
|
-
- app/views/ecm/pictures/galleries/_gallery.
|
395
|
-
- app/views/ecm/pictures/galleries/
|
396
|
-
- app/views/ecm/pictures/galleries/
|
397
|
-
- app/views/ecm/pictures/
|
398
|
-
- app/views/ecm/pictures/pictures/
|
399
|
-
-
|
400
|
-
- app/views/ecm/pictures/pictures/index.html.erb
|
401
|
-
- app/views/ecm/pictures/pictures/show.html.erb
|
369
|
+
- app/views/ecm/pictures/galleries/_gallery.haml
|
370
|
+
- app/views/ecm/pictures/galleries/index.haml
|
371
|
+
- app/views/ecm/pictures/galleries/show.haml
|
372
|
+
- app/views/ecm/pictures/pictures/index.haml
|
373
|
+
- app/views/ecm/pictures/pictures/show.haml
|
374
|
+
- config/initializers/assets.rb
|
402
375
|
- config/locales/ecm.pictures.attached_picture.de.yml
|
403
376
|
- config/locales/ecm.pictures.attached_picture.en.yml
|
404
377
|
- config/locales/ecm.pictures.de.yml
|
@@ -407,6 +380,7 @@ files:
|
|
407
380
|
- config/locales/ecm.pictures.gallery.en.yml
|
408
381
|
- config/locales/ecm.pictures.picture.de.yml
|
409
382
|
- config/locales/ecm.pictures.picture.en.yml
|
383
|
+
- config/routes.rb
|
410
384
|
- db/migrate/001_create_ecm_pictures_picture_galleries.rb
|
411
385
|
- db/migrate/002_create_ecm_pictures_pictures.rb
|
412
386
|
- db/migrate/003_create_ecm_pictures_attached_pictures.rb
|
@@ -414,7 +388,6 @@ files:
|
|
414
388
|
- db/migrate/20160626143414_rename_ecm_pictures_pictures_picture_gallery_id_to_gallery_id.rb
|
415
389
|
- lib/ecm/pictures/configuration.rb
|
416
390
|
- lib/ecm/pictures/engine.rb
|
417
|
-
- lib/ecm/pictures/routing.rb
|
418
391
|
- lib/ecm/pictures/version.rb
|
419
392
|
- lib/ecm_pictures2.rb
|
420
393
|
- lib/generators/ecm/pictures/install/install_generator.rb
|
@@ -445,9 +418,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
445
418
|
version: '0'
|
446
419
|
requirements: []
|
447
420
|
rubyforge_project:
|
448
|
-
rubygems_version: 2.
|
421
|
+
rubygems_version: 2.6.10
|
449
422
|
signing_key:
|
450
423
|
specification_version: 4
|
451
424
|
summary: ECM Picture galleries module for ruby on rails.
|
452
425
|
test_files: []
|
453
|
-
has_rdoc:
|
@@ -1,17 +0,0 @@
|
|
1
|
-
<%= Ecm::Pictures::Configuration.prevent_textile_rendering_in_html ? '<notextile>'.html_safe : '' %>
|
2
|
-
<div class="gallery-description">
|
3
|
-
<%= mu gallery, :description %>
|
4
|
-
</div>
|
5
|
-
|
6
|
-
<% if gallery.respond_to?(:tag_list) %>
|
7
|
-
<div class="tags bottom-margin-1">
|
8
|
-
<% gallery.tag_list.each do |tag| %>
|
9
|
-
<span class="label label-default"><%= tag %></span>
|
10
|
-
<% end %>
|
11
|
-
</div>
|
12
|
-
<% end %>
|
13
|
-
|
14
|
-
<div class="gallery-pictures row" data-target="#modal-gallery" data-toggle="modal-gallery">
|
15
|
-
<%= render gallery.pictures %>
|
16
|
-
</div>
|
17
|
-
<%= Ecm::Pictures::Configuration.prevent_textile_rendering_in_html ? '</notextile>'.html_safe : '' %>
|
@@ -1,19 +0,0 @@
|
|
1
|
-
<div class="col-sm-6 col-md-3">
|
2
|
-
<div class="thumbnail">
|
3
|
-
<% if gallery.pictures.first.respond_to?(:image) %>
|
4
|
-
<%= image_tag gallery.pictures.first.image.url(:default_thumb) %>
|
5
|
-
<% end %>
|
6
|
-
<div class="caption">
|
7
|
-
<h4><%= gallery.name %></h4>
|
8
|
-
<% if gallery.respond_to?(:tag_list) %>
|
9
|
-
<div class="tags bottom-margin-1">
|
10
|
-
<% gallery.tag_list.each do |tag| %>
|
11
|
-
<span class="label label-default"><%= tag %></span>
|
12
|
-
<% end %>
|
13
|
-
</div>
|
14
|
-
<% end %>
|
15
|
-
<div class="truncate lines-3 bottom-margin-1"><%= mu(gallery, :description) %></div>
|
16
|
-
<p><%= link_to t('ecm.pictures.actions.view'), gallery, :class => 'btn btn-primary', :role => 'button' %></p>
|
17
|
-
</div>
|
18
|
-
</div>
|
19
|
-
</div>
|
@@ -1,27 +0,0 @@
|
|
1
|
-
<h1><%= Ecm::Pictures::Gallery.model_name.human(:count => :other) %></h1>
|
2
|
-
|
3
|
-
<% case Ecm::Pictures::Configuration.render_gallery_index_as %>
|
4
|
-
<% when :thumbnail %>
|
5
|
-
<div class="row">
|
6
|
-
<% @galleries.each do |g| %>
|
7
|
-
<%= render :partial => 'ecm/pictures/galleries/gallery_for_index', :locals => { :gallery => g } %>
|
8
|
-
<% end %>
|
9
|
-
</div>
|
10
|
-
<% when :media_object %>
|
11
|
-
<%= render_collection(@galleries, Ecm::Pictures::Gallery, as: :bootstrap_media_object) do |list| %>
|
12
|
-
<h4><%= list.resource.name %>
|
13
|
-
<% if list.resource.respond_to?(:tag_list) %>
|
14
|
-
<span class="tags">
|
15
|
-
<% list.resource.tag_list.each do |tag| %>
|
16
|
-
<span class="label label-primary"><%= tag %></span>
|
17
|
-
<% end %>
|
18
|
-
</span>
|
19
|
-
<% end %>
|
20
|
-
</h4>
|
21
|
-
<%= list.media_object title: '', body: mu(list.resource, :description), image_url: list.resource.pictures.first.image.url(:default_thumb) %>
|
22
|
-
<% end %>
|
23
|
-
<% end %>
|
24
|
-
|
25
|
-
<div class="well page-actions">
|
26
|
-
<%= link_to(t('ecm.pictures.views.actions.back'), main_app.root_path, class: 'btn btn-default') %>
|
27
|
-
</div>
|
@@ -1,10 +0,0 @@
|
|
1
|
-
<h1><%= @gallery.to_s %></h1>
|
2
|
-
|
3
|
-
<%= render @gallery %>
|
4
|
-
|
5
|
-
<div class="page-actions well">
|
6
|
-
<div class="btn-group" role="group">
|
7
|
-
<%= link_to Ecm::Pictures::Gallery.model_name.human(:count => :other), ecm_pictures_galleries_path, :class => 'btn btn-primary' %>
|
8
|
-
<%= link_to t('ecm.pictures.views.actions.back'), :back, class: 'btn btn-default' %>
|
9
|
-
</div>
|
10
|
-
</div>
|
@@ -1,16 +0,0 @@
|
|
1
|
-
<%= Ecm::Pictures::Configuration.prevent_textile_rendering_in_html ? '<notextile>'.html_safe : '' %>
|
2
|
-
<div class="col-xs-6 col-md-3">
|
3
|
-
<%= link_to("#{picture.image.url}#{File.extname(picture.image_file_name).downcase}", :'data-gallery' => "gallery", :class => 'thumbnail') do %>
|
4
|
-
<%= image_tag(picture.image.url(:default_thumb)) %>
|
5
|
-
<!--
|
6
|
-
<% if picture.respond_to?(:tag_list) && picture.tag_list.any? %>
|
7
|
-
<div class="tags">
|
8
|
-
<% picture.tag_list.each do |tag| %>
|
9
|
-
<span class="label label-default"><%= tag %></span>
|
10
|
-
<% end %>
|
11
|
-
</div>
|
12
|
-
<% end %>
|
13
|
-
-->
|
14
|
-
<% end %>
|
15
|
-
</div>
|
16
|
-
<%= Ecm::Pictures::Configuration.prevent_textile_rendering_in_html ? '</notextile>'.html_safe : '' %>
|
@@ -1,10 +0,0 @@
|
|
1
|
-
<li class="<%= Ecm::Pictures::Configuration.picture_for_gallery_css_classes %>" id="picture-<%= picture.to_param %>">
|
2
|
-
<% if picture.picture_gallery.link_images %>
|
3
|
-
<%= link_to("#{picture.image.url}#{File.extname(picture.image_file_name).downcase}", :'data-gallery' => "gallery") do %>
|
4
|
-
<% image_tag(picture.image.url(:default_thumb)) %>
|
5
|
-
<% end %>
|
6
|
-
<% else %>
|
7
|
-
<%= image_tag(picture.image.url(:default_thumb), :class => 'thumbnail') %>
|
8
|
-
<% end %>
|
9
|
-
<div class="caption"><%= mu(picture, :description) %></div>
|
10
|
-
</li>
|
@@ -1,9 +0,0 @@
|
|
1
|
-
<h1><%= Ecm::Pictures::Picture.model_name.human(:count => :other) %></h1>
|
2
|
-
|
3
|
-
<div class="row" data-target="#modal-gallery" data-toggle="modal-gallery">
|
4
|
-
<%= render @pictures %>
|
5
|
-
</div>
|
6
|
-
|
7
|
-
<div class="well page-actions">
|
8
|
-
<%= link_to(t('ecm.pictures.views.actions.back'), main_app.root_path, class: 'btn btn-default') %>
|
9
|
-
</div>
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<h1><%= @picture.to_s %></h1>
|
2
|
-
|
3
|
-
<div class="row">
|
4
|
-
<%= render @picture %>
|
5
|
-
</div>
|
6
|
-
|
7
|
-
<div class="page-actions well">
|
8
|
-
<div class="btn-group" role="group">
|
9
|
-
<%= link_to(@picture.gallery, @picture.gallery, :class => 'btn btn-primary') if @picture.gallery.present? %>
|
10
|
-
<%= link_to t('ecm.pictures.views.actions.back'), :back, class: 'btn btn-default' %>
|
11
|
-
</div>
|
12
|
-
</div>
|
data/lib/ecm/pictures/routing.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
module Ecm
|
2
|
-
module Pictures
|
3
|
-
class Routing
|
4
|
-
# Creates the routes for pictures and galleries. You can pass options to
|
5
|
-
# specify the actions for both pictures and/or galleries.
|
6
|
-
#
|
7
|
-
# Ecm::Pictures::Routing.routes(self, { :gallery_actions => [ :show ]})
|
8
|
-
#
|
9
|
-
# This will only create the show action for galleries, but omit the index action.
|
10
|
-
def self.routes(router, options = {})
|
11
|
-
options.reverse_merge!(
|
12
|
-
gallery_actions: [:index, :show],
|
13
|
-
picture_actions: [:index, :show]
|
14
|
-
)
|
15
|
-
|
16
|
-
router.resources :ecm_pictures_galleries, only: options[:gallery_actions], controller: 'ecm/pictures/galleries'
|
17
|
-
router.resources :ecm_pictures_pictures, only: options[:picture_actions], controller: 'ecm/pictures/pictures'
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|