itsf_backend 1.2.8 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 515f0fcc7d64e11489b1d5d214ea2a49784b9185
4
- data.tar.gz: 5bc34a220ef1eae1345fba9e1eb2db50da5377d0
3
+ metadata.gz: 019a51321bbee59c9a01ce51fb0a4a58e933ff05
4
+ data.tar.gz: 8fa9512986c16a9b74a19c690d88620d09c99a6c
5
5
  SHA512:
6
- metadata.gz: 908f354a25de4f8e050b9e932ba3d63e6fcb5a552dae01f886ee8a6e7b943d9833eb106867cebd2b11ed26562ff6b72eeb283378d7c49f21ddd4fecd2ffbe92c
7
- data.tar.gz: 1d9e99aa1eccef7752b8c5e138d1f8475d6df1d5ed977cb79b5b9d4f13a100c68cef6654eeea43e555682f96f5ac08461297c1e2748ea28d442f49f832c7531d
6
+ metadata.gz: 1e789759ef5cb655bb68c8578c01051931d59854176cc7b843b69b8f9f51806f2ff9d86b045d7756e1abaaa226ff222a1cea721062c79f43c0b757b3c5796341
7
+ data.tar.gz: a25823778781c884f793c41acd59c08f45000d9adc61a21fe5f60a867bb2d2425c11ea264e4516cdf8aa7c0ee66a8354b5acb49615c0cfff3d7795173a392c2c
@@ -12,6 +12,7 @@
12
12
  */
13
13
  @import "bootstrap_and_overrides.css.less";
14
14
  @import "application/ace.css.less";
15
+ @import "application/auxiliary-navigation.css.less";
15
16
  @import "application/basic-page.css.less";
16
17
  @import "application/bootstrap-vertical-navigation.css.less";
17
18
  @import "application/bottom-margin-extension.css.less";
@@ -27,6 +28,7 @@
27
28
  @import "application/navigation-logo.css.less";
28
29
  @import "application/panel-footer-pagination.css.less";
29
30
  @import "application/panel-with-actions.css.less";
31
+ @import "application/sidebar.css.less";
30
32
  @import "application/table-actions.css.less";
31
33
  @import "application/table-responsive.css.less";
32
34
  @import "application/tab-with-nav.css.less";
@@ -0,0 +1,3 @@
1
+ #auxiliary-navigation {
2
+ background-color: #f5f5f5;
3
+ }
@@ -49,6 +49,7 @@
49
49
 
50
50
  .label a, .badge a { color: white; }
51
51
 
52
+ .p-t-0 { padding-top: 0ch; }
52
53
  .p-t-1 { padding-top: 1ch; }
53
54
  .p-t-2 { padding-top: 2ch; }
54
55
  .p-t-3 { padding-top: 3ch; }
@@ -72,8 +72,8 @@
72
72
  background-color: unset;
73
73
  }
74
74
 
75
- .sidebar-nav .pull-right {
76
- float: unset !important;
75
+ .sidebar-nav .pull-right, .sidebar-nav .navbar-brand {
76
+ float: none !important;
77
77
  }
78
78
 
79
79
  .sidebar-nav .navbar-form {
@@ -0,0 +1,159 @@
1
+ /*!
2
+ * Start Bootstrap - Simple Sidebar HTML Template (http://startbootstrap.com)
3
+ * Code licensed under the Apache License v2.0.
4
+ * For details, see http://www.apache.org/licenses/LICENSE-2.0.
5
+ */
6
+
7
+ /* Toggle Styles */
8
+
9
+ #wrapper {
10
+ padding-left: 0;
11
+ -webkit-transition: all 0.5s ease;
12
+ -moz-transition: all 0.5s ease;
13
+ -o-transition: all 0.5s ease;
14
+ transition: all 0.5s ease;
15
+ }
16
+
17
+ #wrapper.toggled {
18
+ padding-left: 250px;
19
+ }
20
+
21
+ #sidebar-wrapper {
22
+ z-index: 1000;
23
+ position: fixed;
24
+ left: 250px;
25
+ width: 0;
26
+ height: 100%;
27
+ margin-left: -250px;
28
+ overflow-y: auto;
29
+ /*background: #000;*/
30
+ -webkit-transition: all 0.5s ease;
31
+ -moz-transition: all 0.5s ease;
32
+ -o-transition: all 0.5s ease;
33
+ transition: all 0.5s ease;
34
+ }
35
+
36
+ #wrapper.toggled #sidebar-wrapper {
37
+ width: 250px;
38
+ }
39
+
40
+ #page-content-wrapper {
41
+ width: 100%;
42
+ position: absolute;
43
+ padding: 15px;
44
+ }
45
+
46
+ #wrapper.toggled #page-content-wrapper {
47
+ position: absolute;
48
+ margin-right: -250px;
49
+ }
50
+
51
+ /* Sidebar Styles */
52
+
53
+ #sidebar-wrapper {
54
+ padding: 20px;
55
+
56
+ .panel {
57
+ margin-top: 0px;
58
+
59
+ .list-group {
60
+ margin-bottom: 0px;
61
+ }
62
+
63
+ .list-group-item {
64
+ border-left: none;
65
+ border-right: none;
66
+ border-radius: 0px;
67
+ }
68
+
69
+ .list-group-item:last-child {
70
+ border-bottom: none;
71
+ }
72
+ }
73
+
74
+ .panel:not(:first-child) {
75
+ border-top-left-radius: 0px;
76
+ border-top-right-radius: 0px;
77
+ }
78
+
79
+ .panel:not(:last-child) {
80
+ border-bottom-left-radius: 0px;
81
+ border-bottom-right-radius: 0px;
82
+ border-bottom: 0px;
83
+ }
84
+ }
85
+
86
+ /*
87
+ .sidebar-nav {
88
+ position: absolute;
89
+ top: 0;
90
+ width: 250px;
91
+ margin: 0;
92
+ padding: 0;
93
+ list-style: none;
94
+ }
95
+
96
+ .sidebar-nav li {
97
+ text-indent: 20px;
98
+ line-height: 40px;
99
+ }
100
+
101
+ .sidebar-nav li a {
102
+ display: block;
103
+ text-decoration: none;
104
+ color: #999999;
105
+ }
106
+
107
+ .sidebar-nav li a:hover {
108
+ text-decoration: none;
109
+ color: #fff;
110
+ background: rgba(255,255,255,0.2);
111
+ }
112
+
113
+ .sidebar-nav li a:active,
114
+ .sidebar-nav li a:focus {
115
+ text-decoration: none;
116
+ }
117
+
118
+ .sidebar-nav > .sidebar-brand {
119
+ height: 65px;
120
+ font-size: 18px;
121
+ line-height: 60px;
122
+ }
123
+
124
+ .sidebar-nav > .sidebar-brand a {
125
+ color: #999999;
126
+ }
127
+
128
+ .sidebar-nav > .sidebar-brand a:hover {
129
+ color: #fff;
130
+ background: none;
131
+ }
132
+ */
133
+ @media(min-width:768px) {
134
+ #wrapper {
135
+ padding-left: 250px;
136
+ }
137
+
138
+ #wrapper.toggled {
139
+ padding-left: 0;
140
+ }
141
+
142
+ #sidebar-wrapper {
143
+ width: 250px;
144
+ }
145
+
146
+ #wrapper.toggled #sidebar-wrapper {
147
+ width: 0;
148
+ }
149
+
150
+ #page-content-wrapper {
151
+ padding: 20px;
152
+ position: relative;
153
+ }
154
+
155
+ #wrapper.toggled #page-content-wrapper {
156
+ position: relative;
157
+ margin-right: 0;
158
+ }
159
+ }
@@ -13,9 +13,13 @@ module Controller
13
13
  collection_name = exception.record.respond_to?(:model_name) ? exception.record.model_name.human(count: :other) : exception.record
14
14
  flash[:error] = I18n.t("pundit.not_authorized.#{action_name}", collection_name: collection_name,resource_name: resource_name)
15
15
  respond_to do |format|
16
- format.html { redirect_to main_app.root_path }
16
+ format.html { redirect_to after_authorization_failure_path }
17
17
  format.json { render json: { error: 'not authorized' }, status: 403 }
18
18
  end
19
19
  end
20
+
21
+ def after_authorization_failure_path
22
+ main_app.root_path
23
+ end
20
24
  end
21
25
  end
@@ -0,0 +1,14 @@
1
+ %button.navbar-toggle(type="button" data-toggle="collapse" data-target=".navbar-responsive-collapse")
2
+ %span.icon-bar
3
+ %span.icon-bar
4
+ %span.icon-bar
5
+
6
+ .navbar-collapse.collapse.navbar-responsive-collapse
7
+ %ul.nav.navbar-nav.pull-right
8
+ = render_i18n_navigation
9
+ - if respond_to?(:render_user_navigation)
10
+ %ul.nav.navbar-nav.pull-right
11
+ = render_user_navigation(dropdown: true)
12
+ - if Itsf::Backend.features?(:multi_client)
13
+ %ul.nav.navbar-nav.pull-right
14
+ = render_client_navigation
@@ -0,0 +1,21 @@
1
+ #engine-navigations
2
+ #accordion.panel-group
3
+ - Itsf::Backend::Configuration.backend_engines.each do |engine|
4
+ - if !respond_to?(:engine_policy) || engine_policy(engine).access?
5
+ .panel.panel-default
6
+ .panel-heading
7
+ %h4.panel-title
8
+ %a{"data-parent" => "#accordion", "data-toggle" => "collapse", :href => "#collapse-#{engine.name.underscore.dasherize.gsub('/', '-')}"}
9
+ = t("classes.#{engine.name.underscore}")
10
+ .panel-collapse.collapse.in{ id: "collapse-#{engine.name.underscore.dasherize.gsub('/', '-')}" }
11
+ %div.list-group
12
+ = link_to(send(engine.engine_name).root_path, class: 'list-group-item') do
13
+ = t(".home")
14
+ - controllers = engine.to_s.gsub('::Engine', '::Configuration').constantize.registered_controllers.call
15
+ - controllers.each do |kontroller|
16
+ - resource_klass = kontroller.resource_class
17
+ - if !Itsf::Backend.features?(:pundit) || policy(resource_klass).index?
18
+ = link_to(send(engine.engine_name).url_for(controller: "/#{kontroller.controller_path}"), class: 'list-group-item') do
19
+ = resource_klass.model_name.human(count: :other)
20
+ %span.badge.badge-default= resource_klass.count
21
+
@@ -26,24 +26,20 @@
26
26
  = "<!-- CSS for #{engine} -->".html_safe
27
27
  = stylesheet_link_tag engine.name.underscore.gsub('/', '_').gsub('_engine', ''), media: "all"
28
28
 
29
- %body{ class: Itsf::Backend::Configuration.main_navigation_style.eql?(:vertical) ? 'p-t-2' : nil }
30
- - if Itsf::Backend::Configuration.main_navigation_style.eql? :horizontal
31
- #main-navigation.navbar.navbar-default.navbar-static-top
29
+ %body
30
+ #auxiliary-navigation
31
+ = render 'layouts/itsf/backend/auxiliary_navigation'
32
+ #wrapper
33
+ #sidebar-wrapper.brand-primary-background-color
34
+ = render 'layouts/itsf/backend/vertical_navigation'
35
+
36
+ #page-content-wrapper
32
37
  .container-fluid
33
- = render 'layouts/itsf/backend/main_navigation'
38
+ .row
39
+ .col-lg-12
40
+ = bootstrap_flash
41
+ = yield
42
+
34
43
 
35
- .container-fluid
36
- .row
37
- - if Itsf::Backend::Configuration.main_navigation_style.eql? :horizontal
38
- .col-md-12
39
- = bootstrap_flash
40
- = yield
41
- - else
42
- .col-md-3
43
- #main-navigation.sidebar-nav.navbar.navbar-default
44
- = render 'layouts/itsf/backend/main_navigation'
45
- .col-md-9
46
- = bootstrap_flash
47
- = yield
48
- %footer
49
- = render 'layouts/itsf/backend/footer'
44
+ %footer.footer-sticky
45
+ = render 'layouts/itsf/backend/footer'
@@ -106,6 +106,9 @@ de:
106
106
  title: "%{application_name}"
107
107
  main_navigation:
108
108
  title: "%{application_name}"
109
+ vertical_navigation:
110
+ home: "Home"
111
+ title: "%{application_name}"
109
112
  locales:
110
113
  de: Deutsch
111
114
  ransack:
data/config/rbac.yml CHANGED
@@ -1,7 +1,6 @@
1
1
  defaults:
2
2
  permissions:
3
3
  - itsf/backend/dashboard
4
-
5
4
  roles:
6
5
  itsf/backend/administrator:
7
6
  - itsf/backend/dashboard
@@ -100,13 +100,4 @@ Itsf::Backend.configure do |config|
100
100
  # Default config.default_pagination_size = 15
101
101
  #
102
102
  config.default_pagination_size = 15
103
-
104
- # Sets the main navigation style. By default, there are two styles:
105
- #
106
- # * horizontal
107
- # * vertical
108
- #
109
- # Default: config.main_navigation_style = :horizontal
110
- #
111
- config.main_navigation_style = :vertical
112
103
  end
@@ -21,7 +21,6 @@ module Itsf
21
21
  { index: [], show: [], edit: [] }
22
22
  end
23
23
  mattr_accessor(:default_pagination_size) { 15 }
24
- mattr_accessor(:main_navigation_style) { :horizontal }
25
24
 
26
25
  def registered_controllers
27
26
  backend_engines.call.collect do |engine|
@@ -1,5 +1,5 @@
1
1
  module Itsf
2
2
  module Backend
3
- VERSION = '1.2.8'
3
+ VERSION = '2.0.1'
4
4
  end
5
5
  end
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: 1.2.8
4
+ version: 2.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: 2016-05-01 00:00:00.000000000 Z
11
+ date: 2016-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -471,6 +471,7 @@ files:
471
471
  - app/assets/javascripts/itsf_backend.js
472
472
  - app/assets/stylesheets/itsf/backend/application.css.less
473
473
  - app/assets/stylesheets/itsf/backend/application/ace.css.less
474
+ - app/assets/stylesheets/itsf/backend/application/auxiliary-navigation.css.less
474
475
  - app/assets/stylesheets/itsf/backend/application/basic-page.css.less
475
476
  - app/assets/stylesheets/itsf/backend/application/bootstrap-extensions.css.less
476
477
  - app/assets/stylesheets/itsf/backend/application/bootstrap-vertical-navigation.css.less
@@ -487,6 +488,7 @@ files:
487
488
  - app/assets/stylesheets/itsf/backend/application/navigation-logo.css.less
488
489
  - app/assets/stylesheets/itsf/backend/application/panel-footer-pagination.css.less
489
490
  - app/assets/stylesheets/itsf/backend/application/panel-with-actions.css.less
491
+ - app/assets/stylesheets/itsf/backend/application/sidebar.css.less
490
492
  - app/assets/stylesheets/itsf/backend/application/tab-with-nav.css.less
491
493
  - app/assets/stylesheets/itsf/backend/application/table-actions.css.less
492
494
  - app/assets/stylesheets/itsf/backend/application/table-responsive.css.less
@@ -565,11 +567,13 @@ files:
565
567
  - app/views/itsf/backend/service/base/index.html.haml
566
568
  - app/views/itsf/backend/service/base/invoke.html.haml
567
569
  - app/views/itsf/backend/service/base/success.html.haml
570
+ - app/views/layouts/itsf/backend/_auxiliary_navigation.haml
568
571
  - app/views/layouts/itsf/backend/_engine_navigation.html.haml
569
572
  - app/views/layouts/itsf/backend/_engine_navigation_drop_down.html.haml
570
573
  - app/views/layouts/itsf/backend/_footer.html.haml
571
574
  - app/views/layouts/itsf/backend/_logo.html.haml
572
575
  - app/views/layouts/itsf/backend/_main_navigation.haml
576
+ - app/views/layouts/itsf/backend/_vertical_navigation.haml
573
577
  - app/views/layouts/itsf/backend/base.html.haml
574
578
  - config/initializers/assets.rb
575
579
  - config/initializers/extend_object.rb