ecm_pictures 1.0.0.pre → 1.0.1.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/ecm/pictures/picture_galleries_controller.rb +9 -0
- data/app/controllers/ecm/pictures/pictures_controller.rb +9 -0
- data/app/helpers/ecm/pictures_helper.rb +3 -1
- data/app/views/ecm/pictures/picture_galleries/_picture_gallery_for_index.html.erb +5 -3
- data/app/views/ecm/pictures/picture_galleries/index.html.erb +5 -0
- data/app/views/ecm/pictures/picture_galleries/show.html.erb +7 -0
- data/app/views/ecm/pictures/pictures/_picture.html.erb +5 -6
- data/app/views/ecm/pictures/pictures/index.html.erb +10 -0
- data/app/views/ecm/pictures/pictures/show.html.erb +11 -0
- data/config/locales/ecm.pictures.picture.de.yml +3 -0
- data/config/locales/ecm.pictures.picture.en.yml +2 -0
- data/config/locales/ecm.pictures.picture_gallery.de.yml +3 -0
- data/config/locales/ecm.pictures.picture_gallery.en.yml +2 -0
- data/lib/ecm/pictures/routing.rb +22 -0
- data/lib/ecm/pictures/version.rb +1 -1
- data/lib/ecm_pictures.rb +1 -0
- metadata +11 -4
@@ -1,7 +1,9 @@
|
|
1
1
|
<div class="thumbnail picture_gallery-preview span3" id="picture-gallery-<%= picture_gallery.id %>">
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
<% if picture_gallery.pictures.first.respond_to?(:image) %>
|
3
|
+
<div class="picture-image">
|
4
|
+
<%= image_tag picture_gallery.pictures.first.image.url(:default_thumb) %>
|
5
|
+
</div>
|
6
|
+
<% end %>
|
5
7
|
<div class="caption">
|
6
8
|
<h3><%= picture_gallery.name %></h3>
|
7
9
|
<div class="description"><%= mu(picture_gallery, :description) %></div>
|
@@ -1,7 +1,6 @@
|
|
1
|
-
<div class="
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
<% end %>
|
6
|
-
</div>
|
1
|
+
<div class="picture span3" id="picture-<%= picture.to_param %>">
|
2
|
+
<%= link_to("#{picture.image.url}#{File.extname(picture.image_file_name).downcase}", :class => 'thumbnail') do %>
|
3
|
+
<% image_tag(picture.image.url(:default_thumb)) %>
|
4
|
+
<% end %>
|
7
5
|
</div>
|
6
|
+
|
@@ -0,0 +1,22 @@
|
|
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, { :picture_gallery_actions => [ :show ]})
|
8
|
+
#
|
9
|
+
# This will only create the show action for picture galleries, but omit the index action.
|
10
|
+
def self.routes(router, options = {})
|
11
|
+
options.reverse_merge!(
|
12
|
+
{ :picture_gallery_actions => [:index, :show],
|
13
|
+
:picture_actions => [:index, :show]
|
14
|
+
}
|
15
|
+
)
|
16
|
+
|
17
|
+
router.resources :ecm_pictures_picture_galleries, :only => options[:picture_gallery_actions], :controller => 'ecm/pictures/picture_galleries'
|
18
|
+
router.resources :ecm_pictures_pictures,:only => options[:picture_actions], :controller => 'ecm/pictures/pictures'
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/ecm/pictures/version.rb
CHANGED
data/lib/ecm_pictures.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecm_pictures
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 961915984
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
9
|
+
- 1
|
10
10
|
- pre
|
11
|
-
version: 1.0.
|
11
|
+
version: 1.0.1.pre
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Roberto Vasquez Angel
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2012-
|
19
|
+
date: 2012-11-07 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: rails
|
@@ -351,12 +351,18 @@ extensions: []
|
|
351
351
|
extra_rdoc_files: []
|
352
352
|
|
353
353
|
files:
|
354
|
+
- app/controllers/ecm/pictures/picture_galleries_controller.rb
|
355
|
+
- app/controllers/ecm/pictures/pictures_controller.rb
|
354
356
|
- app/helpers/ecm/pictures_helper.rb
|
355
357
|
- app/helpers/markup_helper.rb
|
358
|
+
- app/views/ecm/pictures/picture_galleries/show.html.erb
|
356
359
|
- app/views/ecm/pictures/picture_galleries/_picture_gallery.html.erb
|
360
|
+
- app/views/ecm/pictures/picture_galleries/index.html.erb
|
357
361
|
- app/views/ecm/pictures/picture_galleries/_picture_gallery_for_index.html.erb
|
358
362
|
- app/views/ecm/pictures/pictures/_picture.html.erb
|
363
|
+
- app/views/ecm/pictures/pictures/show.html.erb
|
359
364
|
- app/views/ecm/pictures/pictures/_picture_for_gallery.html.erb
|
365
|
+
- app/views/ecm/pictures/pictures/index.html.erb
|
360
366
|
- app/models/ecm/pictures/picture_gallery.rb
|
361
367
|
- app/models/ecm/pictures/picture.rb
|
362
368
|
- config/locales/ecm.pictures.picture_gallery.de.yml
|
@@ -376,6 +382,7 @@ files:
|
|
376
382
|
- lib/ecm/pictures/active_admin/ecm_pictures_pictures.rb
|
377
383
|
- lib/ecm/pictures/engine.rb
|
378
384
|
- lib/ecm/pictures/version.rb
|
385
|
+
- lib/ecm/pictures/routing.rb
|
379
386
|
- lib/ecm/pictures/configuration.rb
|
380
387
|
- MIT-LICENSE
|
381
388
|
- Rakefile
|