itsf_backend 1.1.10 → 1.1.11

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: f086ede6c64eade3c431465623bf8be18c07d7c0
4
- data.tar.gz: 0bbd05cf6bc1d409ac239030fecc06fcf4ef25f5
3
+ metadata.gz: e7c1de1b1f5e4126d71aba7ff8806ae9ebc59940
4
+ data.tar.gz: b5d0e5123dfd41cc3cb53ec6399418f3bbe97ef7
5
5
  SHA512:
6
- metadata.gz: 7337b70525a296ec7a1934ded45869063da52e3728d45632f7775bfb37b4e0baae30235f49cd0cba432faf2fb4644c7f8fc76e82b640dff44ce179e6d9728bdd
7
- data.tar.gz: 43a11116a0c2440ac7621a4b776e0b14c1c3891be06dbb7a932b462d0fc1929a4d18073e5968c4f74e9e2ed85288b9a2be38db74f2c4d33c4fcf82171225a380
6
+ metadata.gz: 7609a2dfe6fb95e99f56a3e1fabb8e147ef3d2443e613289a52ce1905d15463ef53eaf7f27bd9adf872240df6dbbe16f3b0e1017cc0a1f54f898f7e888ecd793
7
+ data.tar.gz: 4429a6054e7f9c5f077e3a92fd4d9f410d63862733785762860a61c5cd0276d20edc8913f6385ebacd9ffeccabc635509b6fe5783e162e1b6d07a3a06ded7776
@@ -4,26 +4,27 @@
4
4
  = t(".resources")
5
5
  %table.table.table-striped.table-hover.table-condensed
6
6
  - "#{engine.to_s.deconstantize}::Configuration".constantize.registered_controllers.call.each do |kontroller|
7
- %tr
8
- %th.col-md-3= kontroller.resource_class.model_name.human(count: :other)
9
- %td.text-left
10
- %span.label.label-default
11
- - if respond_to?(:current_user) && current_user.respond_to?(:last_sign_in_at) && kontroller.resource_class.respond_to?(:column_names) && kontroller.resource_class.column_names.include?('updated_at')
12
- = "#{kontroller.resource_class.where("updated_at > ?", current_user.last_sign_in_at).count}/#{kontroller.resource_class.count}"
13
- - else
14
- = kontroller.resource_class.count
15
- %td.text-right
16
- - begin
17
- = link_to({ controller: kontroller.name.underscore.gsub('_controller', ''), action: 'new' }, id: "link-to-#{kontroller.name.underscore.gsub('_controller', '').gsub(/[\/_]/, '-')}-new", class: 'btn btn-success btn-xs btn-responsive') do
18
- %span.glyphicon.glyphicon-plus
19
- %span.btn-text= t('.new')
20
- - rescue ActionController::UrlGenerationError
7
+ - if !Itsf::Backend.features?(:pundit) || policy(kontroller.resource_class).index?
8
+ %tr
9
+ %th.col-md-3= kontroller.resource_class.model_name.human(count: :other)
10
+ %td.text-left
11
+ %span.label.label-default
12
+ - if respond_to?(:current_user) && current_user.respond_to?(:last_sign_in_at) && kontroller.resource_class.respond_to?(:column_names) && kontroller.resource_class.column_names.include?('updated_at')
13
+ = "#{kontroller.resource_class.where("updated_at > ?", current_user.last_sign_in_at).count}/#{kontroller.resource_class.count}"
14
+ - else
15
+ = kontroller.resource_class.count
16
+ %td.text-right
17
+ - begin
18
+ = link_to({ controller: kontroller.name.underscore.gsub('_controller', ''), action: 'new' }, id: "link-to-#{kontroller.name.underscore.gsub('_controller', '').gsub(/[\/_]/, '-')}-new", class: 'btn btn-success btn-xs btn-responsive') do
19
+ %span.glyphicon.glyphicon-plus
20
+ %span.btn-text= t('.new')
21
+ - rescue ActionController::UrlGenerationError
21
22
 
22
- - begin
23
- = 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
24
- %span.glyphicon.glyphicon-eye-open
25
- %span.btn-text= t('.view')
26
- - rescue ActionController::UrlGenerationError
23
+ - begin
24
+ = 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
25
+ %span.glyphicon.glyphicon-eye-open
26
+ %span.btn-text= t('.view')
27
+ - rescue ActionController::UrlGenerationError
27
28
 
28
29
 
29
30
  .panel.panel-default
@@ -1,5 +1,5 @@
1
1
  module Itsf
2
2
  module Backend
3
- VERSION = '1.1.10'
3
+ VERSION = '1.1.11'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itsf_backend
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.10
4
+ version: 1.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel