itsf_backend 4.2.3 → 5.0.0.pre
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/controllers/concerns/controller/breadcrumbs_concern.rb +13 -7
- data/app/controllers/itsf/backend/application_controller.rb +1 -1
- data/app/controllers/itsf/backend/resource/base_controller.rb +33 -22
- data/app/controllers/itsf/backend/service/base_controller.rb +6 -14
- data/app/views/itsf/backend/home/_dashboard_panel.html.haml +2 -5
- data/app/views/itsf/backend/{service/base/_success_extras.html.haml → resource/base/_before_index_table.html.haml} +0 -0
- data/app/views/itsf/backend/resource/base/_table_actions.html.haml +21 -20
- data/app/views/itsf/backend/resource/base/index.html.haml +5 -2
- data/app/views/itsf/backend/resource/base/show.html.haml +1 -1
- data/app/views/itsf/backend/service/base/_create_extras.html.haml +0 -0
- data/app/views/itsf/backend/service/base/_form_errors.html.haml +3 -3
- data/app/views/itsf/backend/service/base/create.html.haml +16 -0
- data/app/views/itsf/backend/service/base/new.html.haml +16 -0
- data/app/views/layouts/itsf/backend/_breadcrumbs.html.haml +4 -1
- data/app/views/layouts/itsf/backend/_footer.html.haml +0 -1
- data/config/locales/de.yml +14 -17
- data/config/routes.rb +3 -1
- data/lib/generators/itsf/backend/install/install_generator.rb +4 -0
- data/lib/generators/itsf/backend/install/templates/initializer.rb +6 -0
- data/lib/generators/itsf/backend/install/templates/route_translator.rb +3 -0
- data/lib/generators/itsf/backend/install/templates/routes.source +1 -6
- data/lib/itsf/backend/configuration.rb +1 -0
- data/lib/itsf/backend/version.rb +1 -1
- data/lib/itsf_backend.rb +1 -1
- metadata +11 -14
- data/app/controllers/concerns/controller/acts_as_list_concern.rb +0 -13
- data/app/controllers/concerns/controller/acts_as_published_concern.rb +0 -19
- data/app/controllers/concerns/controller/awesome_nested_set_concern.rb +0 -12
- data/app/controllers/concerns/controller/friendly_id_concern.rb +0 -11
- data/app/views/itsf/backend/service/base/index.html.haml +0 -18
- data/app/views/itsf/backend/service/base/invoke.html.haml +0 -16
- data/app/views/itsf/backend/service/base/success.html.haml +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c52fd96aa5ca302034c99a8601f51150c6d8a70
|
4
|
+
data.tar.gz: 96763700280ab2d7417943bd61e8f025d612bc57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d637ed9cc48d17fb604aa5a8cbf51d89379af340b73cfb8ef9db9dc293cc430ed8d0e038d18bf47ab56726715edab2d70d9ddaebd18f78f3278dc94a24d9bb76
|
7
|
+
data.tar.gz: 13d29c7d8b8750f9e038cf6f0badbff2acebee1423fb3ce5bc53e9628103fccf13bce2d8c9a868d0f3c07230056c36c1c4cc57da5fad796140d37bbbc596338c
|
@@ -17,7 +17,7 @@ module Controller
|
|
17
17
|
if respond_to?(:current_engine, true) && current_engine.present?
|
18
18
|
breadcrumbs << { label: t("classes.#{current_engine.name.underscore}"), url: send("#{current_engine.engine_name}_#{I18n.locale}").root_path, link_html_options: {}, li_html_options: {} }
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
if respond_to?(:resource_class, true)
|
22
22
|
breadcrumbs << { label: resource_class.model_name.human(count: :other), url: url_for(action: :index), link_html_options: {}, li_html_options: {} }
|
23
23
|
end
|
@@ -25,19 +25,25 @@ module Controller
|
|
25
25
|
if @resource.present? && @resource.persisted?
|
26
26
|
breadcrumbs << { label: @resource.try_all(*Itsf::Backend.resource_title_methods), url: url_for(action: :show, id: @resource.to_param), link_html_options: {}, li_html_options: {} }
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
if respond_to?(:service_class, true)
|
30
|
-
breadcrumbs <<
|
30
|
+
breadcrumbs << service_class.model_name.human
|
31
31
|
end
|
32
32
|
|
33
|
-
|
34
|
-
|
33
|
+
action_namespace = respond_to?(:service_class, true) ? :service : :default
|
34
|
+
|
35
|
+
if %w(new edit).include?(action_name)
|
36
|
+
breadcrumbs << { label: t("controller.breadcrumbs_concern.actions.#{action_namespace}.#{action_name}"), url: { action: action_name }, link_html_options: {}, li_html_options: {} }
|
35
37
|
end
|
36
|
-
|
38
|
+
|
39
|
+
if %w(create update).include?(action_name)
|
40
|
+
breadcrumbs << { label: t("controller.breadcrumbs_concern.actions.#{action_namespace}.#{action_name}"), url: '#', link_html_options: {}, li_html_options: {} }
|
41
|
+
end
|
42
|
+
|
37
43
|
if params[:page].present?
|
38
44
|
breadcrumbs << { label: t('controller.breadcrumbs_concern.page', page_number: params[:page]), url: '#', link_html_options: {}, li_html_options: {} }
|
39
45
|
end
|
40
|
-
|
46
|
+
|
41
47
|
breadcrumbs.last[:li_html_options][:class] = 'active'
|
42
48
|
end
|
43
49
|
end
|
@@ -1,34 +1,41 @@
|
|
1
|
-
require 'ransack' if Itsf::Backend.features?(:ransack)
|
2
|
-
require 'kaminari' if Itsf::Backend.features?(:kaminari)
|
3
|
-
|
4
1
|
module Itsf::Backend
|
5
2
|
class Resource::BaseController < Configuration.resource_base_controller.constantize
|
6
|
-
if Itsf::Backend.features?(:pundit)
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
else
|
13
|
-
|
14
|
-
end
|
15
|
-
include Controller::ResourceUrlsConcern
|
16
|
-
include Controller::ResourceInflectionsConcern
|
17
|
-
prepend Controller::RansackConcern if Itsf::Backend.features?(:ransack)
|
18
|
-
prepend Controller::PaginationConcern if Itsf::Backend.features?(:kaminari)
|
19
|
-
include Controller::JsonApiConcern
|
3
|
+
# if Itsf::Backend.features?(:pundit)
|
4
|
+
# include Controller::RestActionsConcernWithPundit
|
5
|
+
# include Pundit
|
6
|
+
# prepend Controller::PunditNamespacedAuthorizeConcern
|
7
|
+
# include Controller::PunditAuthorizationFailureHandlingConcern
|
8
|
+
# helper_method :engine_policy
|
9
|
+
# else
|
10
|
+
# include Controller::RestActionsConcern
|
11
|
+
# end
|
12
|
+
# include Controller::ResourceUrlsConcern
|
13
|
+
# include Controller::ResourceInflectionsConcern
|
14
|
+
# prepend Controller::RansackConcern if Itsf::Backend.features?(:ransack)
|
15
|
+
# prepend Controller::PaginationConcern if Itsf::Backend.features?(:kaminari)
|
16
|
+
# include Controller::JsonApiConcern
|
20
17
|
include Controller::FeatureFlagsConcern
|
21
18
|
include Controller::ResourceLinksConcern
|
22
19
|
include Controller::CollectionLinksConcern
|
23
|
-
include Controller::CurrentEngineConcern
|
20
|
+
# include Controller::CurrentEngineConcern
|
24
21
|
include Controller::BreadcrumbsConcern
|
25
22
|
helper Itsf::Backend::ApplicationHelper
|
26
23
|
helper Itsf::Backend::BootstrapHelper
|
27
|
-
helper MultiClientHelper if Itsf::Backend.features?(:multi_client)
|
24
|
+
# helper MultiClientHelper if Itsf::Backend.features?(:multi_client)
|
28
25
|
|
29
|
-
helper_method :resource_class
|
26
|
+
# helper_method :resource_class
|
27
|
+
|
28
|
+
include ResourcesController::Resources
|
29
|
+
include ResourcesController::ResourceInflections
|
30
|
+
include ResourcesController::RestResourceUrls
|
31
|
+
include ResourcesController::RestActions
|
32
|
+
include ResourcesController::LocationHistory
|
33
|
+
include ResourcesController::Kaminari if Itsf::Backend.features?(:kaminari)
|
34
|
+
include ResourcesController::WillPaginate if Itsf::Backend.features?(:will_paginate)
|
30
35
|
|
31
36
|
helper ResourceRenderer::ViewHelper
|
37
|
+
helper Rails::AddOns::TableHelper
|
38
|
+
helper Twitter::Bootstrap::Components::Rails::V3::ComponentsHelper
|
32
39
|
|
33
40
|
layout 'itsf/backend/base'
|
34
41
|
|
@@ -49,13 +56,17 @@ module Itsf::Backend
|
|
49
56
|
def after_create_location
|
50
57
|
return edit_resource_path(@resource) if params.has_key?(:commit_and_continue_with_edit) && @resource.persisted?
|
51
58
|
return new_resource_path if params.has_key?(:commit_and_continue_with_new) && @resource.persisted?
|
52
|
-
@resource
|
59
|
+
resource_path(@resource)
|
53
60
|
end
|
54
61
|
|
55
62
|
def after_update_location
|
56
63
|
return edit_resource_path(@resource) if params.has_key?(:commit_and_continue_with_edit) && !@resource.changed?
|
57
64
|
return new_resource_path if params.has_key?(:commit_and_continue_with_new) && !@resource.changed?
|
58
|
-
@resource
|
65
|
+
resource_path(@resource)
|
66
|
+
end
|
67
|
+
|
68
|
+
def after_destroy_location
|
69
|
+
collection_path
|
59
70
|
end
|
60
71
|
end
|
61
72
|
end
|
@@ -9,10 +9,12 @@ module Itsf::Backend
|
|
9
9
|
include Controller::PunditAuthorizationFailureHandlingConcern
|
10
10
|
end
|
11
11
|
|
12
|
-
include
|
13
|
-
include
|
14
|
-
include
|
15
|
-
include
|
12
|
+
include ServiceController::Service
|
13
|
+
include ServiceController::ServiceInflections
|
14
|
+
include ServiceController::RestServiceUrls
|
15
|
+
include ServiceController::RestActions
|
16
|
+
include ServiceController::LocationHistory
|
17
|
+
# include Controller::JsonApiConcern
|
16
18
|
include Controller::FeatureFlagsConcern
|
17
19
|
include Controller::CurrentEngineConcern
|
18
20
|
include Controller::BreadcrumbsConcern
|
@@ -21,15 +23,5 @@ module Itsf::Backend
|
|
21
23
|
helper Itsf::Backend::BootstrapHelper
|
22
24
|
|
23
25
|
layout 'itsf/backend/base'
|
24
|
-
|
25
|
-
helper_method :service_class
|
26
|
-
|
27
|
-
def self.service_class
|
28
|
-
name.gsub('Controller', '').constantize
|
29
|
-
end
|
30
|
-
|
31
|
-
def service_class
|
32
|
-
self.class.service_class
|
33
|
-
end
|
34
26
|
end
|
35
27
|
end
|
@@ -40,9 +40,6 @@
|
|
40
40
|
%th.col-md-3= t("classes.#{kontroller.service_class.name.underscore}")
|
41
41
|
%td.text-right
|
42
42
|
.btn-group
|
43
|
-
= link_to({ controller: kontroller.name.underscore.gsub('_controller', ''), action: '
|
43
|
+
= link_to({ controller: kontroller.name.underscore.gsub('_controller', ''), action: 'new' }, { id: "link-to-#{kontroller.name.underscore.gsub('_controller', '').gsub(/[\/_]/, '-')}-invoke", class: 'btn btn-success btn-xs btn-responsive' }) do
|
44
44
|
%span.glyphicon.glyphicon-play-circle
|
45
|
-
%span.btn-text= t('.
|
46
|
-
= link_to({ controller: kontroller.name.underscore.gsub('_controller', '') }, { id: "link-to-#{kontroller.name.underscore.gsub('_controller', '').gsub(/[\/_]/, '-')}-index", class: 'btn btn-primary btn-xs btn-responsive' }) do
|
47
|
-
%span.glyphicon.glyphicon-eye-open
|
48
|
-
%span.btn-text= t('.view')
|
45
|
+
%span.btn-text= t('.service.new')
|
File without changes
|
@@ -1,21 +1,22 @@
|
|
1
1
|
= table.column(:actions) do |resource|
|
2
|
-
-
|
3
|
-
|
4
|
-
-
|
5
|
-
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
2
|
+
- capture_haml do
|
3
|
+
- id_base = "link-to-#{controller.class.name.underscore.gsub('_controller', '').gsub(/[\/_]/, '-')}-#{resource.to_param}"
|
4
|
+
.btn-group
|
5
|
+
- if !features?(:pundit) || policy(resource).show?
|
6
|
+
- begin
|
7
|
+
= link_to(resource_path(resource), id: "#{id_base}-show", class: 'btn btn-xs btn-responsive btn-default') do
|
8
|
+
%span.glyphicon.glyphicon-eye-open
|
9
|
+
%span.btn-text= t('.show')
|
10
|
+
- rescue ActionController::UrlGenerationError
|
11
|
+
- if !features?(:pundit) || policy(resource).edit?
|
12
|
+
- begin
|
13
|
+
= link_to(edit_resource_path(resource), id: "#{id_base}-edit", class: 'btn btn-xs btn-responsive btn-default') do
|
14
|
+
%span.glyphicon.glyphicon-pencil
|
15
|
+
%span.btn-text= t('.edit')
|
16
|
+
- rescue ActionController::UrlGenerationError
|
17
|
+
- if !features?(:pundit) || policy(resource).destroy?
|
18
|
+
- begin
|
19
|
+
= link_to(resource_path(resource), id: "#{id_base}-destroy", 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('.delete')
|
22
|
+
- rescue ActionController::UrlGenerationError
|
@@ -17,6 +17,9 @@
|
|
17
17
|
#collection-pages-naviation.bottom-margin-1
|
18
18
|
= render 'collection_pages_navigation', collection: @collection
|
19
19
|
|
20
|
+
#before-index-table.bottom-margin-1
|
21
|
+
= render 'before_index_table', collection: @collection
|
22
|
+
|
20
23
|
.panel.panel-default.panel-with-actions
|
21
24
|
.panel-heading
|
22
25
|
.pull-right.form-inline
|
@@ -38,11 +41,11 @@
|
|
38
41
|
= link_to t('ransack.reset'), {},class: 'btn btn-danger'
|
39
42
|
- else
|
40
43
|
= f.submit
|
41
|
-
|
44
|
+
|
42
45
|
.table-responsive
|
43
46
|
- table_classes = %w(table table-responsive table-condensed table-striped table-hover)
|
44
47
|
- table_classes << 'dragtable' if features?(:dragtable)
|
45
|
-
=
|
48
|
+
= collection_table(collection: @collection, resource_class: resource_class) do |table|
|
46
49
|
= render 'table', table: table
|
47
50
|
= render 'table_actions', table: table
|
48
51
|
|
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
.panel.panel-default.panel-with-actions
|
18
18
|
%table.table.table-striped.table-condensed.table-hover
|
19
|
-
=
|
19
|
+
= resource_table(resource: @resource) do |table|
|
20
20
|
= render 'show', table: table
|
21
21
|
|
22
22
|
.panel-footer
|
File without changes
|
@@ -1,6 +1,6 @@
|
|
1
|
-
- if
|
1
|
+
- if result.errors.any?
|
2
2
|
.error-explanation.alert.alert-danger
|
3
|
-
.error-heading= t('errors.template.header', count:
|
3
|
+
.error-heading= t('errors.template.header', count: result.errors.count, model: result.model_name.human)
|
4
4
|
%ul
|
5
|
-
-
|
5
|
+
- result.errors.full_messages.each do |msg|
|
6
6
|
%li= msg
|
@@ -0,0 +1,16 @@
|
|
1
|
+
%div.panel.panel-default
|
2
|
+
%div.panel-heading
|
3
|
+
%h1= t('.title', inflections)
|
4
|
+
|
5
|
+
%div.panel-body
|
6
|
+
= render partial: 'messages', locals: { messages: @result.messages }
|
7
|
+
|
8
|
+
%div.panel-footer
|
9
|
+
|
10
|
+
= render 'create_extras', result: @result
|
11
|
+
|
12
|
+
.well.well-sm
|
13
|
+
.btn-container-right
|
14
|
+
= link_to new_service_path, class: 'btn btn-default btn-responsive' do
|
15
|
+
%span.glyphicon.glyphicon-arrow-left
|
16
|
+
%span.btn-text= t('.back')
|
@@ -0,0 +1,16 @@
|
|
1
|
+
%div.panel.panel-default
|
2
|
+
%div.panel-heading
|
3
|
+
%h1= t('.title', inflections)
|
4
|
+
|
5
|
+
%div.panel-body
|
6
|
+
= simple_form_for(@service, url: create_service_path) do |f|
|
7
|
+
= render partial: 'form_errors', locals: { result: @result || f.object }
|
8
|
+
= render 'form', form: f
|
9
|
+
= f.button :submit, t("itsf.backend.service.base.submit", model: f.object.class.model_name.human), class: 'btn btn-success'
|
10
|
+
|
11
|
+
%div.panel-footer
|
12
|
+
.well.well-sm
|
13
|
+
.btn-container-right
|
14
|
+
= link_to root_path, class: 'btn btn-default btn-responsive' do
|
15
|
+
%span.glyphicon.glyphicon-arrow-left
|
16
|
+
%span.btn-text= t('.back')
|
@@ -1 +0,0 @@
|
|
1
|
-
%p © Company 2015
|
data/config/locales/de.yml
CHANGED
@@ -4,11 +4,6 @@ de:
|
|
4
4
|
all: Alle
|
5
5
|
published: Veröffentlicht
|
6
6
|
unpublished: Unveröffentlicht
|
7
|
-
acts_as_list:
|
8
|
-
inserted_after: "%{inserted_resource} nach %{target_resource} eingefügt"
|
9
|
-
inserted_before: "%{inserted_resource} vor %{target_resource} eingefügt"
|
10
|
-
awesome_nested_set:
|
11
|
-
inserted_after: "%{inserted_resource} nach %{target_resource} eingefügt"
|
12
7
|
attributes:
|
13
8
|
actions: 'Aktionen'
|
14
9
|
acts_as_list_actions: 'Liste'
|
@@ -26,14 +21,17 @@ de:
|
|
26
21
|
delete: "Sind Sie sicher?"
|
27
22
|
controller:
|
28
23
|
breadcrumbs_concern:
|
29
|
-
call: 'Ausführen'
|
30
|
-
create: 'Anlegen'
|
31
|
-
edit: 'Bearbeiten'
|
32
|
-
update: 'Bearbeiten'
|
33
24
|
home: 'Backend'
|
34
|
-
invoke: 'Ausführen'
|
35
|
-
new: 'Anlegen'
|
36
25
|
page: 'Seite %{page_number}'
|
26
|
+
actions:
|
27
|
+
default:
|
28
|
+
create: 'Anlegen'
|
29
|
+
edit: 'Bearbeiten'
|
30
|
+
update: 'Bearbeiten'
|
31
|
+
new: 'Anlegen'
|
32
|
+
service:
|
33
|
+
new: 'Ausführen'
|
34
|
+
create: 'Ausführen'
|
37
35
|
classes:
|
38
36
|
i18n: 'Sprache'
|
39
37
|
flash:
|
@@ -52,7 +50,6 @@ de:
|
|
52
50
|
notice: "%{resource_name} zurückgezogen."
|
53
51
|
helpers:
|
54
52
|
submit:
|
55
|
-
call: "%{model} ausführen"
|
56
53
|
create_and_continue_with_edit: "%{resource_name} erstellen und weiter bearbeiten"
|
57
54
|
create_and_continue_with_new: "%{resource_name} erstellen und neu"
|
58
55
|
update_and_continue_with_edit: "%{resource_name} aktualisieren und weiter bearbeiten"
|
@@ -68,6 +65,8 @@ de:
|
|
68
65
|
resources: 'Resourcen'
|
69
66
|
services: 'Dienste'
|
70
67
|
view: 'Anzeigen'
|
68
|
+
service:
|
69
|
+
new: 'Ausführen'
|
71
70
|
index:
|
72
71
|
back: "Zurück"
|
73
72
|
title: "Willkommen im Modul für %{engine_name}"
|
@@ -104,14 +103,12 @@ de:
|
|
104
103
|
title: "Aktionen"
|
105
104
|
service:
|
106
105
|
base:
|
107
|
-
|
106
|
+
submit: '%{model} ausführen'
|
107
|
+
new:
|
108
108
|
back: 'Zurück'
|
109
109
|
invoke: "Ausführen"
|
110
|
-
title: "%{service_name}"
|
111
|
-
invoke:
|
112
|
-
back: 'Zurück'
|
113
110
|
title: "%{service_name} ausführen"
|
114
|
-
|
111
|
+
create:
|
115
112
|
back: 'Zurück'
|
116
113
|
title: "%{service_name} ausgeführt"
|
117
114
|
layouts:
|
data/config/routes.rb
CHANGED
@@ -17,6 +17,10 @@ module Itsf
|
|
17
17
|
def generate_controller
|
18
18
|
copy_file 'backend_controller.rb', 'app/controllers/backend_controller.rb'
|
19
19
|
end
|
20
|
+
|
21
|
+
def generate_route_translator_initializer
|
22
|
+
copy_file 'route_translator.rb', 'config/route_translator.rb'
|
23
|
+
end
|
20
24
|
end
|
21
25
|
end
|
22
26
|
end
|
@@ -6,6 +6,12 @@ Itsf::Backend.configure do |config|
|
|
6
6
|
# Default: config.enabled_features: []
|
7
7
|
#
|
8
8
|
config.enabled_features = [:kaminari]
|
9
|
+
|
10
|
+
# Set the base controller the application controller
|
11
|
+
#
|
12
|
+
# Default: config.application_base_controller = 'BackendController'
|
13
|
+
#
|
14
|
+
config.application_base_controller = 'BackendController'
|
9
15
|
|
10
16
|
# Set the base controller the backend dashboards
|
11
17
|
#
|
@@ -1,9 +1,4 @@
|
|
1
1
|
|
2
2
|
localized do
|
3
|
-
Itsf::Backend::
|
4
|
-
# mount Itsf::Backend::Engine => '/backend'
|
5
|
-
|
6
|
-
Itsf::Backend::Configuration.backend_engines.each do |engine|
|
7
|
-
Itsf::Backend::Configuration.engine_mount_point.call(self, engine)
|
8
|
-
end
|
3
|
+
mount Itsf::Backend::Engine, at: '/'
|
9
4
|
end
|
@@ -9,6 +9,7 @@ module Itsf
|
|
9
9
|
end
|
10
10
|
|
11
11
|
mattr_accessor(:backend_engines) { [] }
|
12
|
+
mattr_accessor(:application_base_controller) { '::ApplicationController' }
|
12
13
|
mattr_accessor(:resource_base_controller) { '::ApplicationController' }
|
13
14
|
mattr_accessor(:service_base_controller) { '::ApplicationController' }
|
14
15
|
mattr_accessor(:dashboard_base_controller) { '::ApplicationController' }
|
data/lib/itsf/backend/version.rb
CHANGED
data/lib/itsf_backend.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itsf_backend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.0.0.pre
|
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:
|
11
|
+
date: 2019-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -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: rails-add_ons
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
185
|
- - ">="
|
@@ -487,14 +487,10 @@ files:
|
|
487
487
|
- app/concerns/enumerable/acts_as_resource_concern.rb
|
488
488
|
- app/concerns/routing/itsf_backend_resource_concern.rb
|
489
489
|
- app/concerns/routing/service_concern.rb
|
490
|
-
- app/controllers/concerns/controller/acts_as_list_concern.rb
|
491
|
-
- app/controllers/concerns/controller/acts_as_published_concern.rb
|
492
|
-
- app/controllers/concerns/controller/awesome_nested_set_concern.rb
|
493
490
|
- app/controllers/concerns/controller/breadcrumbs_concern.rb
|
494
491
|
- app/controllers/concerns/controller/collection_links_concern.rb
|
495
492
|
- app/controllers/concerns/controller/current_engine_concern.rb
|
496
493
|
- app/controllers/concerns/controller/feature_flags_concern.rb
|
497
|
-
- app/controllers/concerns/controller/friendly_id_concern.rb
|
498
494
|
- app/controllers/concerns/controller/pagination_concern.rb
|
499
495
|
- app/controllers/concerns/controller/pundit_authorization_failure_handling_concern.rb
|
500
496
|
- app/controllers/concerns/controller/pundit_namespaced_authorize_concern.rb
|
@@ -543,6 +539,7 @@ files:
|
|
543
539
|
- app/views/itsf/backend/i18n/_navigation.html.haml
|
544
540
|
- app/views/itsf/backend/resource/base/_additional_collection_tabs.html.haml
|
545
541
|
- app/views/itsf/backend/resource/base/_additional_resource_tabs.html.haml
|
542
|
+
- app/views/itsf/backend/resource/base/_before_index_table.html.haml
|
546
543
|
- app/views/itsf/backend/resource/base/_collection_pages_navigation.html.haml
|
547
544
|
- app/views/itsf/backend/resource/base/_form.html.haml
|
548
545
|
- app/views/itsf/backend/resource/base/_form_buttons.haml
|
@@ -561,14 +558,13 @@ files:
|
|
561
558
|
- app/views/itsf/backend/resource/base/index.html.haml
|
562
559
|
- app/views/itsf/backend/resource/base/new.html.haml
|
563
560
|
- app/views/itsf/backend/resource/base/show.html.haml
|
561
|
+
- app/views/itsf/backend/service/base/_create_extras.html.haml
|
564
562
|
- app/views/itsf/backend/service/base/_form.html.haml
|
565
563
|
- app/views/itsf/backend/service/base/_form_errors.html.haml
|
566
564
|
- app/views/itsf/backend/service/base/_head_extras.html.haml
|
567
565
|
- app/views/itsf/backend/service/base/_messages.html.erb
|
568
|
-
- app/views/itsf/backend/service/base/
|
569
|
-
- app/views/itsf/backend/service/base/
|
570
|
-
- app/views/itsf/backend/service/base/invoke.html.haml
|
571
|
-
- app/views/itsf/backend/service/base/success.html.haml
|
566
|
+
- app/views/itsf/backend/service/base/create.html.haml
|
567
|
+
- app/views/itsf/backend/service/base/new.html.haml
|
572
568
|
- app/views/layouts/itsf/backend/_auxiliary_navigation.haml
|
573
569
|
- app/views/layouts/itsf/backend/_breadcrumbs.html.haml
|
574
570
|
- app/views/layouts/itsf/backend/_engine_navigation.html.haml
|
@@ -595,6 +591,7 @@ files:
|
|
595
591
|
- lib/generators/itsf/backend/install/install_generator.rb
|
596
592
|
- lib/generators/itsf/backend/install/templates/backend_controller.rb
|
597
593
|
- lib/generators/itsf/backend/install/templates/initializer.rb
|
594
|
+
- lib/generators/itsf/backend/install/templates/route_translator.rb
|
598
595
|
- lib/generators/itsf/backend/install/templates/routes.source
|
599
596
|
- lib/generators/itsf/backend/resource/resource_generator.rb
|
600
597
|
- lib/generators/itsf/backend/resource/templates/controller.rb
|
@@ -3204,12 +3201,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
3204
3201
|
version: '0'
|
3205
3202
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
3206
3203
|
requirements:
|
3207
|
-
- - "
|
3204
|
+
- - ">"
|
3208
3205
|
- !ruby/object:Gem::Version
|
3209
|
-
version:
|
3206
|
+
version: 1.3.1
|
3210
3207
|
requirements: []
|
3211
3208
|
rubyforge_project:
|
3212
|
-
rubygems_version: 2.
|
3209
|
+
rubygems_version: 2.6.11
|
3213
3210
|
signing_key:
|
3214
3211
|
specification_version: 4
|
3215
3212
|
summary: ITSF Backend Module.
|
@@ -1,13 +0,0 @@
|
|
1
|
-
module Controller
|
2
|
-
module ActsAsListConcern
|
3
|
-
extend ActiveSupport::Concern
|
4
|
-
|
5
|
-
def reposition
|
6
|
-
@resource = load_resource
|
7
|
-
@dropped_resource = load_scope.find(params[:dropped_id])
|
8
|
-
@dropped_resource.set_list_position(@resource.position)
|
9
|
-
position = @dropped_resource.position < @resource.position ? :before : :after
|
10
|
-
redirect_to collection_path, notice: I18n.t("acts_as_list.inserted_#{position}", target_resource: @resource.try_all(*Itsf::Backend::Configuration.resource_title_methods), inserted_resource: @dropped_resource.try_all(*Itsf::Backend::Configuration.resource_title_methods))
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module Controller
|
2
|
-
module ActsAsPublishedConcern
|
3
|
-
extend ActiveSupport::Concern
|
4
|
-
|
5
|
-
def toggle_published
|
6
|
-
@resource = load_resource
|
7
|
-
@resource.toggle_published!
|
8
|
-
|
9
|
-
action_taken = @resource.published? ? 'published' : 'unpublished'
|
10
|
-
resource_label = @resource.try_all(*Itsf::Backend::Configuration.resource_title_methods)
|
11
|
-
if Rails.version < '5.0.0'
|
12
|
-
redirect_to :back, notice: I18n.t("acts_as_published.notices.#{action_taken}", name: resource_label)
|
13
|
-
else
|
14
|
-
flash[:notice] = I18n.t("acts_as_published.notices.#{action_taken}", name: resource_label)
|
15
|
-
redirect_back(fallback_location: main_app.root_path)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
module Controller
|
2
|
-
module AwesomeNestedSetConcern
|
3
|
-
extend ActiveSupport::Concern
|
4
|
-
|
5
|
-
def reposition
|
6
|
-
@resource = load_resource
|
7
|
-
@dropped_resource = resource_class.find(params[:dropped_id])
|
8
|
-
@dropped_resource.move_to_right_of(@resource)
|
9
|
-
redirect_to collection_path, notice: I18n.t("awesome_nested_set.inserted_after", target_resource: @resource.try_all(*Itsf::Backend::Configuration.resource_title_methods), inserted_resource: @dropped_resource.try_all(*Itsf::Backend::Configuration.resource_title_methods))
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
#page-title.bottom-margin-1
|
2
|
-
.row
|
3
|
-
.col-xs-8
|
4
|
-
%h1
|
5
|
-
= t('.title', inflections)
|
6
|
-
.col-xs-4
|
7
|
-
#page-actions.btn-container-right
|
8
|
-
.btn-group
|
9
|
-
- if !features?(:pundit) || policy(service_class).invoke?
|
10
|
-
= link_to invoke_service_path, id: "link-to-#{controller.class.name.underscore.gsub('_controller', '').gsub(/[\/_]/, '-')}-new", class: 'btn btn-success btn-responsive' do
|
11
|
-
%span.glyphicon.glyphicon-play-circle
|
12
|
-
%span.btn-text= t('.invoke', inflections)
|
13
|
-
|
14
|
-
.well.well-sm
|
15
|
-
.btn-container-right
|
16
|
-
= link_to root_path, class: 'btn btn-default btn-responsive' do
|
17
|
-
%span.glyphicon.glyphicon-arrow-left
|
18
|
-
%span.btn-text= t('.back')
|
@@ -1,16 +0,0 @@
|
|
1
|
-
%div.panel.panel-default
|
2
|
-
%div.panel-heading
|
3
|
-
%h1= t('.title', inflections)
|
4
|
-
|
5
|
-
%div.panel-body
|
6
|
-
= simple_form_for(@service, url: call_service_path) do |f|
|
7
|
-
= render partial: 'form_errors', locals: { response: @response || f.object }
|
8
|
-
= render 'form', form: f
|
9
|
-
= f.button :submit, t("helpers.submit.call", model: f.object.class.model_name.human), class: 'btn btn-success'
|
10
|
-
|
11
|
-
%div.panel-footer
|
12
|
-
.well.well-sm
|
13
|
-
.btn-container-right
|
14
|
-
= link_to collection_path, class: 'btn btn-default btn-responsive' do
|
15
|
-
%span.glyphicon.glyphicon-arrow-left
|
16
|
-
%span.btn-text= t('.back')
|
@@ -1,16 +0,0 @@
|
|
1
|
-
%div.panel.panel-default
|
2
|
-
%div.panel-heading
|
3
|
-
%h1= t('.title', inflections)
|
4
|
-
|
5
|
-
%div.panel-body
|
6
|
-
= render partial: 'messages', locals: { messages: @response.messages }
|
7
|
-
|
8
|
-
%div.panel-footer
|
9
|
-
|
10
|
-
= render 'success_extras', service_response: @response
|
11
|
-
|
12
|
-
.well.well-sm
|
13
|
-
.btn-container-right
|
14
|
-
= link_to collection_path, class: 'btn btn-default btn-responsive' do
|
15
|
-
%span.glyphicon.glyphicon-arrow-left
|
16
|
-
%span.btn-text= t('.back')
|