ecm_staff2 3.0.2 → 3.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7a0ab4770d623de5aed2bccb476089da4fa8b80e
4
- data.tar.gz: cb47882a89f127785ad9f595e4f4752497e1048e
3
+ metadata.gz: '08b3c8d527be33c468f665dfedb508a548262375'
4
+ data.tar.gz: 5ff0cd73d46ec779b33cc1d0b80751343a7208cf
5
5
  SHA512:
6
- metadata.gz: 910d7da193885600a6c02417c2e5822f32e73b1ef959ba1927dd605538080ef71a41b119e71c36cffe2f054761efc638bc1ed09bb37c5eb3f92715eb164ced9a
7
- data.tar.gz: 1fc8b8b8b46c5365ea91956746f175e20d675c4031d5a4873f885eb6ea8ad4448bab667fff74bfdee727f6471b42b53c2ce2b03107d64f7059b54d328763165f
6
+ metadata.gz: b0b62c4a45321aa9b734621b1a8fefe196fdb068e8156b65d2720963c912b094d2627c56acf7a8f3f277822ecd8fb920a3083fe7ae3af4736839dd49141c39e3
7
+ data.tar.gz: e0f2b8c2e2462ffafe8a00b170998805b20368a49df775d45c6176937319f7a7920d24d3c5750ea68e2332e036c8ffd0a9866c7680710cc6b5ac5ccc280e8d9d
@@ -61,7 +61,7 @@ class Ecm::Staff::Person < Ecm::Staff::Base
61
61
  pictures.first
62
62
  end # def
63
63
 
64
- def preview_picture_image_url(style = nil)
64
+ def preview_picture_image_url(style = Ecm::Staff::Configuration.preview_picture_image_style)
65
65
  preview_picture.image.url(style) if preview_picture.respond_to?(:image) && preview_picture.image.respond_to?(:url)
66
66
  end # def
67
67
 
@@ -1,6 +1,7 @@
1
- = bootstrap_responsive_media_object(image_options: { src: person.preview_picture_image_url(:medium_thumb)}) do
2
- %h4= person.fullname_with_prefix
3
- .truncate.lines-5
4
- = person.description.to_html.html_safe
5
- = bootstrap_button(to: ecm_staff.url_for(person), context: :primary) do
6
- - t('.more')
1
+ %div{ id: dom_id(person) }
2
+ = bootstrap_responsive_media_object(image_options: { src: person.preview_picture_image_url}) do
3
+ %h4= person.fullname_with_prefix
4
+ .truncate.lines-5
5
+ = person.description.to_html.html_safe
6
+ = bootstrap_button(to: ecm_staff.url_for(person), context: :primary) do
7
+ - t('.more')
@@ -9,6 +9,7 @@ module Ecm
9
9
  mattr_accessor(:markup_languages) { [:textile] }
10
10
  mattr_accessor(:person_class_name) { 'Person' }
11
11
  mattr_accessor(:base_controller) { '::ApplicationController' }
12
+ mattr_accessor(:preview_picture_image_style) { :default_thumb }
12
13
  end
13
14
  end
14
15
  end
@@ -1,5 +1,5 @@
1
1
  module Ecm
2
2
  module Staff
3
- VERSION = '3.0.2'.freeze
3
+ VERSION = '3.1.0'.freeze
4
4
  end
5
5
  end
@@ -0,0 +1,21 @@
1
+ module Ecm
2
+ module Staff
3
+ module Generators
4
+ class InstallGenerator < Rails::Generators::Base
5
+ desc 'Generates the initializer'
6
+
7
+ source_root File.expand_path('../templates', __FILE__)
8
+
9
+ def generate_initializer
10
+ copy_file 'initializer.rb', 'config/initializers/ecm_staff.rb'
11
+ end
12
+
13
+ def generate_routes
14
+ inject_into_file 'config/routes.rb', before: "\nend" do
15
+ File.read(File.join(File.expand_path('../templates', __FILE__), 'routes.source'))
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,31 @@
1
+ Ecm::Staff.configure do |config|
2
+ # Accepted markup languages
3
+ #
4
+ # default: config.markup_languages = %w[ markdown rdoc textile ]
5
+ #
6
+ config.markup_languages = %w( markdown rdoc textile )
7
+
8
+ # Default markup language
9
+ #
10
+ # default: config.default_markup_language = 'textile'
11
+ #
12
+ config.default_markup_language = 'textile'
13
+
14
+ # Person model
15
+ #
16
+ # default: config.person_class_name = 'Person'
17
+ #
18
+ config.person_class_name = 'Person'
19
+
20
+ # Set the base controller for the contact form
21
+ #
22
+ # Default: config.base_controller = 'ApplicationController'
23
+ #
24
+ config.base_controller = 'ApplicationController'
25
+
26
+ # Paperclip style to use for the preview picture image.
27
+ #
28
+ # Default: config.preview_picture_image_style = :default_thumb
29
+ #
30
+ config.preview_picture_image_style = :default_thumb
31
+ end
@@ -0,0 +1,2 @@
1
+
2
+ mount Ecm::Staff::Engine, at: '/'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecm_staff2
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.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: 2017-07-23 00:00:00.000000000 Z
11
+ date: 2017-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -115,6 +115,9 @@ files:
115
115
  - lib/ecm/staff/engine.rb
116
116
  - lib/ecm/staff/version.rb
117
117
  - lib/ecm_staff2.rb
118
+ - lib/generators/ecm/staff/install/install_generator.rb
119
+ - lib/generators/ecm/staff/install/templates/initializer.rb
120
+ - lib/generators/ecm/staff/install/templates/routes.source
118
121
  - lib/tasks/ecm/staff_tasks.rake
119
122
  - spec/factories/ecm_staff_business_units.rb
120
123
  - spec/factories/ecm_staff_organisations.rb