ecm_tags_backend 0.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.
Files changed (33) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +18 -0
  5. data/app/assets/javascripts/ecm/tags/backend/application.js +13 -0
  6. data/app/assets/javascripts/ecm_tags_backend.js +1 -0
  7. data/app/assets/stylesheets/ecm/tags/backend/application.css +3 -0
  8. data/app/assets/stylesheets/ecm_tags_backend.css +3 -0
  9. data/app/controllers/ecm/tags/backend/application_controller.rb +8 -0
  10. data/app/controllers/ecm/tags/backend/home_controller.rb +4 -0
  11. data/app/controllers/ecm/tags/backend/taggings_controller.rb +13 -0
  12. data/app/controllers/ecm/tags/backend/tags_controller.rb +13 -0
  13. data/app/helpers/ecm/tags/backend/application_helper.rb +8 -0
  14. data/app/policies/ecm/tags/backend/engine_policy.rb +4 -0
  15. data/app/policies/ecm/tags/tag_policy.rb +4 -0
  16. data/app/policies/ecm/tags/tagging_policy.rb +4 -0
  17. data/app/views/ecm/tags/backend/taggings/_form.haml +18 -0
  18. data/app/views/ecm/tags/backend/taggings/_show.haml +5 -0
  19. data/app/views/ecm/tags/backend/taggings/_table.haml +5 -0
  20. data/app/views/ecm/tags/backend/tags/_form.haml +1 -0
  21. data/app/views/layouts/ecm/tags/backend/application.html.erb +14 -0
  22. data/config/initializers/assets.rb +2 -0
  23. data/config/locales/de.yml +3 -0
  24. data/config/routes.rb +6 -0
  25. data/lib/ecm/tags/backend.rb +9 -0
  26. data/lib/ecm/tags/backend/configuration.rb +22 -0
  27. data/lib/ecm/tags/backend/engine.rb +12 -0
  28. data/lib/ecm/tags/backend/version.rb +7 -0
  29. data/lib/ecm_tags_backend.rb +4 -0
  30. data/lib/generators/ecm/tags/backend/install/install_generator.rb +29 -0
  31. data/lib/generators/ecm/tags/backend/install/templates/initializer.rb +20 -0
  32. data/lib/tasks/ecm/tags/backend_tasks.rake +4 -0
  33. metadata +104 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 01ece9d908e90599d2a39e6d6738785be222e6ef
4
+ data.tar.gz: 0b76ee731f24dbcf18c17ab5e298cb4774a830c8
5
+ SHA512:
6
+ metadata.gz: 980b0bb972dc6c734d3c751198190f21ca9a29e2ea0ba7edc5cdceca2f3ada56b9078d20324a6fc90662a4b6223dfd09cbc468dda063daefb5fd160bb3c9dea0
7
+ data.tar.gz: 4b18c6b02d0f98328fb2725cb080112e0a7321c366cec93fab8e405fa88a509bf014bce674ca0d14d67a9bc1b86f48c7e14c2d96d3042e4095204e945e467774
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2016 Roberto Vasquez Angel
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,3 @@
1
+ = Ecm::Tags::Backend
2
+
3
+ This project rocks and uses MIT-LICENSE.
data/Rakefile ADDED
@@ -0,0 +1,18 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'Ecm::Tags::Backend'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.rdoc')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+
18
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,13 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require_tree ./application
@@ -0,0 +1 @@
1
+ //= require ecm/tags/backend/application
@@ -0,0 +1,3 @@
1
+ /*
2
+ *= require_tree ./application
3
+ */
@@ -0,0 +1,3 @@
1
+ /*
2
+ *= require ecm/tags/backend/application
3
+ */
@@ -0,0 +1,8 @@
1
+ module Ecm
2
+ module Tags
3
+ module Backend
4
+ class ApplicationController < ActionController::Base
5
+ end
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,4 @@
1
+ module Ecm::Tags::Backend
2
+ class HomeController < Itsf::Backend::HomeController
3
+ end
4
+ end
@@ -0,0 +1,13 @@
1
+ module Ecm::Tags::Backend
2
+ class TaggingsController < Itsf::Backend::Resource::BaseController
3
+ def self.resource_class
4
+ Ecm::Tags::Tagging
5
+ end
6
+
7
+ private
8
+
9
+ def permitted_params
10
+ params.require(:tag).permit(:name)
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Ecm::Tags::Backend
2
+ class TagsController < Itsf::Backend::Resource::BaseController
3
+ def self.resource_class
4
+ Ecm::Tags::Tag
5
+ end
6
+
7
+ private
8
+
9
+ def permitted_params
10
+ params.require(:tag).permit(:name)
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,8 @@
1
+ module Ecm
2
+ module Tags
3
+ module Backend
4
+ module ApplicationHelper
5
+ end
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,4 @@
1
+ module Ecm::Tags::Backend
2
+ class EnginePolicy < Itsf::Backend::EnginePolicy
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module Ecm::Tags
2
+ class TagPolicy < Itsf::Backend::BasePolicy
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module Ecm::Tags
2
+ class TaggingPolicy < Itsf::Backend::BasePolicy
3
+ end
4
+ end
@@ -0,0 +1,18 @@
1
+ = form.input :tag
2
+ = form.input(:taggable, :collection => [ Ecm::Pictures::PictureGallery, Ecm::Pictures::Picture ],
3
+ as: :grouped_select,
4
+ group_method: :all,
5
+ group_label_method: :model_name,
6
+ value_method: :to_global_id,
7
+ label_method: :human,
8
+ include_blank: true,
9
+ selected: form.object.taggable.try(:to_global_id))
10
+ = form.input(:tagger, :collection => [ Ecm::UserArea::User ],
11
+ as: :grouped_select,
12
+ group_method: :all,
13
+ group_label_method: :model_name,
14
+ value_method: :to_global_id,
15
+ label_method: :human,
16
+ include_blank: true,
17
+ selected: form.object.tagger.try(:to_global_id))
18
+ = form.input :context
@@ -0,0 +1,5 @@
1
+ = table.row :tag, as: :association
2
+ = table.row :taggable, as: :association
3
+ = table.row :tagger, as: :association
4
+ = table.row :context
5
+ = table.row :created_at
@@ -0,0 +1,5 @@
1
+ = table.association :tag
2
+ = table.association :taggable
3
+ = table.association :tagger
4
+ = table.column :context
5
+ = table.column :created_at
@@ -0,0 +1 @@
1
+ = form.input :name
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Backend</title>
5
+ <%= stylesheet_link_tag "ecm/tags/backend/application", media: "all" %>
6
+ <%= javascript_include_tag "ecm/tags/backend/application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,2 @@
1
+ Rails.application.config.assets.precompile += %w( ecm_tags_backend.js )
2
+ Rails.application.config.assets.precompile += %w( ecm_tags_backend.css )
@@ -0,0 +1,3 @@
1
+ de:
2
+ classes:
3
+ ecm/tags/backend/engine: Tagging
data/config/routes.rb ADDED
@@ -0,0 +1,6 @@
1
+ Ecm::Tags::Backend::Engine.routes.draw do
2
+ resources :tags
3
+ resources :taggings
4
+
5
+ root to: 'home#index'
6
+ end
@@ -0,0 +1,9 @@
1
+ require 'ecm/tags/backend/configuration'
2
+
3
+ module Ecm
4
+ module Tags
5
+ module Backend
6
+ extend Configuration
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,22 @@
1
+ require 'active_support/core_ext/module/delegation'
2
+ require 'active_support/core_ext/module/attribute_accessors'
3
+
4
+ module Ecm
5
+ module Tags
6
+ module Backend
7
+ module Configuration
8
+ def configure
9
+ yield self
10
+ end
11
+
12
+ mattr_accessor :registered_controllers do
13
+ -> {[]}
14
+ end
15
+
16
+ mattr_accessor :registered_services do
17
+ -> {[]}
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,12 @@
1
+ module Ecm
2
+ module Tags
3
+ module Backend
4
+ class Engine < ::Rails::Engine
5
+ isolate_namespace Ecm::Tags::Backend
6
+ end
7
+ end
8
+ end
9
+ end
10
+
11
+
12
+
@@ -0,0 +1,7 @@
1
+ module Ecm
2
+ module Tags
3
+ module Backend
4
+ VERSION = "0.0.1"
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,4 @@
1
+ require "ecm_tags"
2
+
3
+ require "ecm/tags/backend"
4
+ require "ecm/tags/backend/engine"
@@ -0,0 +1,29 @@
1
+ module Ecm
2
+ module Tags
3
+ module Backend
4
+ module Generators
5
+ class InstallGenerator < Rails::Generators::Base
6
+ desc 'Generates the intializer'
7
+
8
+ source_root File.expand_path('../templates', __FILE__)
9
+
10
+ def generate_initializer
11
+ copy_file 'initializer.rb', 'config/initializers/ecm_tags_backend.rb'
12
+ end
13
+
14
+ def add_to_itsf_backend
15
+ insert_into_itsf_backend_config(Ecm::Tags::Backend::Engine)
16
+ end
17
+
18
+ private
19
+
20
+ def insert_into_itsf_backend_config(engine_name)
21
+ inject_into_file 'config/initializers/001_itsf_backend.rb', after: "config.backend_engines = %w(\n" do
22
+ " #{engine_name}\n"
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,20 @@
1
+ Ecm::Tags::Backend.configure do |config|
2
+ # Set the resources, that will be shown in the backend menu.
3
+ #
4
+ # Default: config.registered_controllers = -> {[
5
+ # Ecm::Tags::Backend::TagsController
6
+ # ]}
7
+ #
8
+ config.registered_controllers = -> {[
9
+ Ecm::Tags::Backend::TagsController,
10
+ Ecm::Tags::Backend::TaggingsController
11
+ ]}
12
+
13
+ # Set the services, that will be shown in the backend menu.
14
+ #
15
+ # Default: config.registered_services = -> {[
16
+ # ]}
17
+ #
18
+ config.registered_services = -> {[
19
+ ]}
20
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :backend do
3
+ # # Task goes here
4
+ # end
metadata ADDED
@@ -0,0 +1,104 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ecm_tags_backend
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Roberto Vasquez Angel
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-03-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: ecm_tags
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: Backend for the ECM Tags Module.
42
+ email:
43
+ - roberto@vasquez-angel.de
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - MIT-LICENSE
49
+ - README.rdoc
50
+ - Rakefile
51
+ - app/assets/javascripts/ecm/tags/backend/application.js
52
+ - app/assets/javascripts/ecm_tags_backend.js
53
+ - app/assets/stylesheets/ecm/tags/backend/application.css
54
+ - app/assets/stylesheets/ecm_tags_backend.css
55
+ - app/controllers/ecm/tags/backend/application_controller.rb
56
+ - app/controllers/ecm/tags/backend/home_controller.rb
57
+ - app/controllers/ecm/tags/backend/taggings_controller.rb
58
+ - app/controllers/ecm/tags/backend/tags_controller.rb
59
+ - app/helpers/ecm/tags/backend/application_helper.rb
60
+ - app/policies/ecm/tags/backend/engine_policy.rb
61
+ - app/policies/ecm/tags/tag_policy.rb
62
+ - app/policies/ecm/tags/tagging_policy.rb
63
+ - app/views/ecm/tags/backend/taggings/_form.haml
64
+ - app/views/ecm/tags/backend/taggings/_show.haml
65
+ - app/views/ecm/tags/backend/taggings/_table.haml
66
+ - app/views/ecm/tags/backend/tags/_form.haml
67
+ - app/views/layouts/ecm/tags/backend/application.html.erb
68
+ - config/initializers/assets.rb
69
+ - config/locales/de.yml
70
+ - config/routes.rb
71
+ - lib/ecm/tags/backend.rb
72
+ - lib/ecm/tags/backend/configuration.rb
73
+ - lib/ecm/tags/backend/engine.rb
74
+ - lib/ecm/tags/backend/version.rb
75
+ - lib/ecm_tags_backend.rb
76
+ - lib/generators/ecm/tags/backend/install/install_generator.rb
77
+ - lib/generators/ecm/tags/backend/install/templates/initializer.rb
78
+ - lib/tasks/ecm/tags/backend_tasks.rake
79
+ homepage: https://github.com/robotex82/ecm_tags_backend
80
+ licenses:
81
+ - MIT
82
+ metadata: {}
83
+ post_install_message:
84
+ rdoc_options: []
85
+ require_paths:
86
+ - lib
87
+ required_ruby_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ required_rubygems_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ requirements: []
98
+ rubyforge_project:
99
+ rubygems_version: 2.4.8
100
+ signing_key:
101
+ specification_version: 4
102
+ summary: ECM Tags Backend.
103
+ test_files: []
104
+ has_rdoc: