sticutils 0.1.0 → 0.1.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.
- checksums.yaml +4 -4
- data/.gitignore +0 -0
- data/CODE_OF_CONDUCT.md +0 -0
- data/Gemfile +0 -0
- data/LICENSE.txt +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/app/models/intranet/admin_log.rb +0 -0
- data/app/models/intranet/admin_module.rb +0 -0
- data/app/models/intranet/admin_param.rb +0 -0
- data/app/models/intranet/admin_profile.rb +0 -0
- data/app/models/intranet/admin_profile_allowedprofile.rb +0 -0
- data/app/models/intranet/admin_profile_module.rb +0 -0
- data/app/models/intranet/admin_profile_role.rb +0 -0
- data/app/models/intranet/admin_role.rb +0 -0
- data/app/models/intranet/admin_user.rb +0 -0
- data/app/models/intranet/aproc_anexomalote.rb +0 -0
- data/app/models/intranet/aproc_anotacaomanifestacao.rb +0 -0
- data/app/models/intranet/aproc_assuntodemanifestacao.rb +0 -0
- data/app/models/intranet/aproc_destino.rb +0 -0
- data/app/models/intranet/aproc_habilitacaomalote.rb +0 -0
- data/app/models/intranet/aproc_habilitacaomalote_tipoespecifico.rb +0 -0
- data/app/models/intranet/aproc_manifestacao.rb +0 -0
- data/app/models/intranet/aproc_movimentacaomanifestacao.rb +0 -0
- data/app/models/intranet/aproc_movimentaomanifestacao_anexo.rb +0 -0
- data/app/models/intranet/aproc_relacaomanifestacao.rb +0 -0
- data/app/models/intranet/aproc_tipomanifestacao.rb +0 -0
- data/app/models/intranet/aproc_viewhabilitacao.rb +0 -0
- data/app/models/intranet/concursos_remocao.rb +0 -0
- data/app/models/intranet/concursos_remocao_concorrencium.rb +0 -0
- data/app/models/intranet/concursos_remocao_disponibilidade.rb +0 -0
- data/app/models/intranet/concursos_remocao_inscricao.rb +0 -0
- data/app/models/intranet/concursos_remocao_opacaolotacao.rb +0 -0
- data/app/models/intranet/ferias_feria.rb +0 -0
- data/app/models/intranet/ferias_fracao.rb +0 -0
- data/app/models/intranet/ferias_registromudancafraco.rb +0 -0
- data/app/models/intranet/ferias_temp.rb +0 -0
- data/app/models/intranet/ferias_terco.rb +0 -0
- data/app/models/intranet/global_banco.rb +0 -0
- data/app/models/intranet/global_categoriatipoorgao.rb +0 -0
- data/app/models/intranet/global_categoriatipoorgao_tipoorgao.rb +0 -0
- data/app/models/intranet/global_cidade.rb +0 -0
- data/app/models/intranet/global_contabancarium.rb +0 -0
- data/app/models/intranet/global_contato.rb +0 -0
- data/app/models/intranet/global_endereco.rb +0 -0
- data/app/models/intranet/global_estado.rb +0 -0
- data/app/models/intranet/global_estadosvizinho.rb +0 -0
- data/app/models/intranet/global_feriado.rb +0 -0
- data/app/models/intranet/global_local.rb +0 -0
- data/app/models/intranet/global_orgao.rb +0 -0
- data/app/models/intranet/global_orgao_contato.rb +0 -0
- data/app/models/intranet/global_pai.rb +0 -0
- data/app/models/intranet/global_pessoafisica.rb +3 -1
- data/app/models/intranet/global_pessoafisica_contasbancaria.rb +0 -0
- data/app/models/intranet/global_pessoafisica_contato.rb +0 -0
- data/app/models/intranet/global_predio.rb +0 -0
- data/app/models/intranet/global_prepessoafisica.rb +2 -2
- data/app/models/intranet/global_prepessoafisica_contasbancaria.rb +0 -0
- data/app/models/intranet/global_prepessoafisica_contato.rb +0 -0
- data/app/models/intranet/global_regiao.rb +0 -0
- data/app/models/intranet/global_tipoorgao.rb +0 -0
- data/app/models/intranet/global_unidadeorganizacional.rb +0 -0
- data/app/models/intranet/intranet_record.rb +0 -0
- data/app/models/intranet/legislacao_documentocomprobatorio.rb +0 -0
- data/app/models/intranet/legislacao_norma.rb +0 -0
- data/app/models/intranet/pesquisas_opcao.rb +0 -0
- data/app/models/intranet/pesquisas_pesquisa.rb +0 -0
- data/app/models/intranet/pesquisas_pesquisa_categoriasenvolvida.rb +0 -0
- data/app/models/intranet/pesquisas_questao.rb +0 -0
- data/app/models/intranet/pesquisas_respostum.rb +0 -0
- data/app/models/intranet/presenca_calculodiario.rb +0 -0
- data/app/models/intranet/presenca_debitoremanscentenegociavel.rb +0 -0
- data/app/models/intranet/presenca_diaexcepcional.rb +0 -0
- data/app/models/intranet/presenca_direito.rb +0 -0
- data/app/models/intranet/presenca_estacao_predio.rb +0 -0
- data/app/models/intranet/presenca_estacaoponto.rb +0 -0
- data/app/models/intranet/presenca_frequentador.rb +0 -0
- data/app/models/intranet/presenca_historicotarefa.rb +0 -0
- data/app/models/intranet/presenca_regime.rb +0 -0
- data/app/models/intranet/presenca_regimefrequentador.rb +0 -0
- data/app/models/intranet/presenca_registroestacaoponto.rb +0 -0
- data/app/models/intranet/presenca_registrofrequencium.rb +0 -0
- data/app/models/intranet/presenca_registromensalfrequencium.rb +0 -0
- data/app/models/intranet/presenca_relatoriofrequenciafinal.rb +0 -0
- data/app/models/intranet/presenca_relatoriofrequentador.rb +0 -0
- data/app/models/intranet/presenca_valorretroativo.rb +0 -0
- data/app/models/intranet/presenca_versaoestacaoponto.rb +0 -0
- data/app/models/intranet/sistema_acessosistema.rb +0 -0
- data/app/models/intranet/sistema_situacaoperfil.rb +0 -0
- data/app/models/intranet/sistema_usuario.rb +0 -0
- data/app/models/intranet/temp_contrachequelegado_cpfs_errado.rb +0 -0
- data/app/models/intranet/temp_magistrado_gestorh.rb +0 -0
- data/app/models/intranet/templates_template.rb +0 -0
- data/app/models/intranet/tips_tip.rb +0 -0
- data/app/models/intranet/tjpi_areacarreira.rb +0 -0
- data/app/models/intranet/tjpi_areaestagio.rb +0 -0
- data/app/models/intranet/tjpi_campodeclaracaoprevinculado.rb +0 -0
- data/app/models/intranet/tjpi_cargo.rb +0 -0
- data/app/models/intranet/tjpi_cargo_embasamento.rb +0 -0
- data/app/models/intranet/tjpi_carreira.rb +0 -0
- data/app/models/intranet/tjpi_categoriavinculoconfig.rb +0 -0
- data/app/models/intranet/tjpi_comarca.rb +0 -0
- data/app/models/intranet/tjpi_contrachequeagrupado.rb +0 -0
- data/app/models/intranet/tjpi_contrachequelegado.rb +0 -0
- data/app/models/intranet/tjpi_contratocargotemporario.rb +0 -0
- data/app/models/intranet/tjpi_controlearquivocadastral.rb +0 -0
- data/app/models/intranet/tjpi_declaracaoprevinculado.rb +0 -0
- data/app/models/intranet/tjpi_diaexcepcional.rb +0 -0
- data/app/models/intranet/tjpi_exerciciofuncao.rb +0 -0
- data/app/models/intranet/tjpi_exerciciolotacao.rb +0 -0
- data/app/models/intranet/tjpi_frequencia_excepcional.rb +0 -0
- data/app/models/intranet/tjpi_funcao.rb +0 -0
- data/app/models/intranet/tjpi_funcao_embasamento.rb +0 -0
- data/app/models/intranet/tjpi_gestorexcepcional.rb +0 -0
- data/app/models/intranet/tjpi_grupofuncional.rb +0 -0
- data/app/models/intranet/tjpi_habilitacaovinculado.rb +0 -0
- data/app/models/intranet/tjpi_importacao_folha.rb +0 -0
- data/app/models/intranet/tjpi_migracaoformhash.rb +0 -0
- data/app/models/intranet/tjpi_nivelprogressao.rb +0 -0
- data/app/models/intranet/tjpi_nivelreferencium.rb +0 -0
- data/app/models/intranet/tjpi_opcaolotacao.rb +0 -0
- data/app/models/intranet/tjpi_orgaoopcaoselecao.rb +0 -0
- data/app/models/intranet/tjpi_pae.rb +0 -0
- data/app/models/intranet/tjpi_pae_magistrado.rb +0 -0
- data/app/models/intranet/tjpi_pae_magistrado_pensionistum.rb +0 -0
- data/app/models/intranet/tjpi_pae_memoriacalculo.rb +0 -0
- data/app/models/intranet/tjpi_pae_parametro.rb +0 -0
- data/app/models/intranet/tjpi_palavrareservada.rb +0 -0
- data/app/models/intranet/tjpi_predependente.rb +0 -0
- data/app/models/intranet/tjpi_previnculado.rb +1 -1
- data/app/models/intranet/tjpi_previnculado_anexo.rb +0 -0
- data/app/models/intranet/tjpi_previnculado_declaraco.rb +0 -0
- data/app/models/intranet/tjpi_previnculado_manifestaco.rb +0 -0
- data/app/models/intranet/tjpi_previnculadointervencao.rb +0 -0
- data/app/models/intranet/tjpi_previnculadopendencium.rb +0 -0
- data/app/models/intranet/tjpi_progressaocarreira.rb +0 -0
- data/app/models/intranet/tjpi_propagacaoemfolha.rb +0 -0
- data/app/models/intranet/tjpi_rh_arquivodeclarcaoirpf.rb +0 -0
- data/app/models/intranet/tjpi_rh_calculoprogressaonivel.rb +0 -0
- data/app/models/intranet/tjpi_rh_declaracaoirpf.rb +0 -0
- data/app/models/intranet/tjpi_rh_intervalo_diarium.rb +0 -0
- data/app/models/intranet/tjpi_rh_pae.rb +0 -0
- data/app/models/intranet/tjpi_rh_pae_pagamento.rb +0 -0
- data/app/models/intranet/tjpi_rh_pae_recebedore.rb +0 -0
- data/app/models/intranet/tjpi_rh_registro_diarium.rb +0 -0
- data/app/models/intranet/tjpi_selecaoarea.rb +0 -0
- data/app/models/intranet/tjpi_selecaopolo.rb +0 -0
- data/app/models/intranet/tjpi_selecaopoloarea.rb +0 -0
- data/app/models/intranet/tjpi_selecaovinculado.rb +0 -0
- data/app/models/intranet/tjpi_selecionado.rb +0 -0
- data/app/models/intranet/tjpi_tabelasubsidiovigente.rb +0 -0
- data/app/models/intranet/tjpi_terceirizacao_contrato.rb +0 -0
- data/app/models/intranet/tjpi_terceirizacao_empresa.rb +0 -0
- data/app/models/intranet/tjpi_terceirizacao_postodetrabalho.rb +0 -0
- data/app/models/intranet/tjpi_tipoatualizacaocadastral.rb +0 -0
- data/app/models/intranet/tjpi_tipoatualizacaocadastral_categoria.rb +0 -0
- data/app/models/intranet/tjpi_tipofuncao.rb +0 -0
- data/app/models/intranet/tjpi_unidadeorganizacionalfuncao.rb +0 -0
- data/app/models/intranet/tjpi_viewhabilitacaovinculado.rb +0 -0
- data/app/models/intranet/tjpi_vinculado.rb +0 -0
- data/app/models/intranet/tjpi_vinculadoemfolha.rb +0 -0
- data/app/models/intranet/tjpi_vinculo.rb +0 -0
- data/app/models/intranet/tjpi_vinculo_documento.rb +0 -0
- data/app/models/intranet.rb +0 -0
- data/bin/console +0 -0
- data/bin/setup +0 -0
- data/lib/sticutils/engine.rb +0 -0
- data/lib/sticutils/version.rb +1 -1
- data/lib/sticutils.rb +0 -0
- data/sticutils.gemspec +0 -0
- metadata +2 -7
- data/app/views/sticutils/_action_links.html.erb +0 -30
- data/app/views/sticutils/_form.html.erb +0 -61
- data/app/views/sticutils/_index.html.erb +0 -68
- data/app/views/sticutils/_list.html.erb +0 -47
- data/app/views/sticutils/_show.html.erb +0 -80
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eae76911fe95aae7f737fccad46269da6d62f367e007574254ee343678ca7591
|
|
4
|
+
data.tar.gz: 220d273ca83d2e8acc779125214e01a714fb31cffb18dabbb8e30e27a58bf320
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 38aa66fac868d0e700043772afafae7349d544b0bf2afe773f113139b2ed9de098cd006416b5a37a22bcf81344a0e38779f01c57ac90dea47dfe8cb5bb93b681
|
|
7
|
+
data.tar.gz: e3d36ad8d4b93ea22f3f8f796e281d0140f2399c0efbdc15234ad2c7a39c2a70df113ca6b6823188ce464a505599cbdf93e1a64bd4c2a6d43a40d7777677d71c
|
data/.gitignore
CHANGED
|
File without changes
|
data/CODE_OF_CONDUCT.md
CHANGED
|
File without changes
|
data/Gemfile
CHANGED
|
File without changes
|
data/LICENSE.txt
CHANGED
|
File without changes
|
data/README.md
CHANGED
|
File without changes
|
data/Rakefile
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -4,11 +4,13 @@ class Intranet::GlobalPessoafisica < Intranet::IntranetRecord
|
|
|
4
4
|
has_many :global_orgaos, :class_name => 'GlobalOrgao'
|
|
5
5
|
has_many :global_orgaos, :class_name => 'GlobalOrgao'
|
|
6
6
|
has_many :global_orgaos, :class_name => 'GlobalOrgao'
|
|
7
|
-
belongs_to :
|
|
7
|
+
belongs_to :cidade_nascimento, :class_name => 'GlobalCidade', :foreign_key => :nascimentoCidade_id
|
|
8
8
|
belongs_to :global_endereco, :class_name => 'GlobalEndereco', :foreign_key => :endereco_id
|
|
9
9
|
belongs_to :admin_user, :class_name => 'AdminUser', :foreign_key => :user_login
|
|
10
10
|
belongs_to :global_cidade, :class_name => 'GlobalCidade', :foreign_key => :tituloEleitorCidade_id
|
|
11
11
|
belongs_to :global_estado, :class_name => 'GlobalEstado', :foreign_key => :rgOrgaoExpedidorUF_sigla
|
|
12
|
+
belongs_to :global_prepessoafisica, :class_name => 'GlobalPrepessoafisica', foreign_key: :cpf, primary_key: :cpf
|
|
13
|
+
|
|
12
14
|
has_many :global_pessoafisica_contasbancarias, :class_name => 'GlobalPessoafisicaContasbancaria'
|
|
13
15
|
has_many :global_pessoafisica_contatos, :class_name => 'GlobalPessoafisicaContato', foreign_key: :pessoaFisica_id
|
|
14
16
|
has_many :global_contatos, through: :global_pessoafisica_contatos
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
class Intranet::GlobalPrepessoafisica < Intranet::IntranetRecord
|
|
2
2
|
self.table_name = 'global_prepessoafisica'
|
|
3
3
|
|
|
4
|
-
belongs_to :
|
|
4
|
+
belongs_to :cidade_nascimento, :class_name => 'GlobalCidade', :foreign_key => :nascimentoCidade_id
|
|
5
5
|
belongs_to :global_endereco, :class_name => 'GlobalEndereco', :foreign_key => :endereco_id
|
|
6
6
|
belongs_to :global_cidade, :class_name => 'GlobalCidade', :foreign_key => :tituloEleitorCidade_id
|
|
7
7
|
belongs_to :global_estado, :class_name => 'GlobalEstado', :foreign_key => :rgOrgaoExpedidorUF_sigla
|
|
8
8
|
has_many :global_prepessoafisica_contasbancarias, :class_name => 'GlobalPrepessoafisicaContasbancaria'
|
|
9
9
|
has_many :global_prepessoafisica_contatos, :class_name => 'GlobalPrepessoafisicaContato'
|
|
10
|
-
has_many :tjpi_predependentes, :class_name => 'TjpiPredependente'
|
|
10
|
+
has_many :tjpi_predependentes, :class_name => 'TjpiPredependente', foreign_key: :prePessoaFisica_id
|
|
11
11
|
has_many :tjpi_previnculados, :class_name => 'TjpiPrevinculado'
|
|
12
12
|
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
class Intranet::TjpiPrevinculado < Intranet::IntranetRecord
|
|
2
2
|
self.table_name = 'tjpi_previnculado'
|
|
3
3
|
|
|
4
|
-
has_many :tjpi_predependentes, :class_name => 'TjpiPredependente'
|
|
4
|
+
has_many :tjpi_predependentes, :class_name => 'TjpiPredependente', foreign_key: :titular_id
|
|
5
5
|
belongs_to :tjpi_previnculadointervencao, :class_name => 'TjpiPrevinculadointervencao', :foreign_key => :intervencao_id
|
|
6
6
|
belongs_to :tjpi_tipoatualizacaocadastral, :class_name => 'TjpiTipoatualizacaocadastral', :foreign_key => :tipoAtualizacaoAtual_id
|
|
7
7
|
belongs_to :tjpi_vinculo, :class_name => 'TjpiVinculo', :foreign_key => :vinculoPrincipal_id
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/app/models/intranet.rb
CHANGED
|
File without changes
|
data/bin/console
CHANGED
|
File without changes
|
data/bin/setup
CHANGED
|
File without changes
|
data/lib/sticutils/engine.rb
CHANGED
|
File without changes
|
data/lib/sticutils/version.rb
CHANGED
data/lib/sticutils.rb
CHANGED
|
File without changes
|
data/sticutils.gemspec
CHANGED
|
File without changes
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sticutils
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ricardo Viana
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2019-02-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -222,11 +222,6 @@ files:
|
|
|
222
222
|
- app/models/intranet/tjpi_vinculadoemfolha.rb
|
|
223
223
|
- app/models/intranet/tjpi_vinculo.rb
|
|
224
224
|
- app/models/intranet/tjpi_vinculo_documento.rb
|
|
225
|
-
- app/views/sticutils/_action_links.html.erb
|
|
226
|
-
- app/views/sticutils/_form.html.erb
|
|
227
|
-
- app/views/sticutils/_index.html.erb
|
|
228
|
-
- app/views/sticutils/_list.html.erb
|
|
229
|
-
- app/views/sticutils/_show.html.erb
|
|
230
225
|
- bin/console
|
|
231
226
|
- bin/setup
|
|
232
227
|
- lib/sticutils.rb
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<div class="btn-group">
|
|
2
|
-
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
|
3
|
-
Ações
|
|
4
|
-
<span class="caret"></span>
|
|
5
|
-
<span class="sr-only">Toggle Dropdown</span>
|
|
6
|
-
</button>
|
|
7
|
-
<ul class="dropdown-menu" role="menu">
|
|
8
|
-
<li>
|
|
9
|
-
<%= link_to object, data: { toggle: 'tooltip', placement: 'top', title: 'Visualizar' } do %>
|
|
10
|
-
<i class="fa fa-eye"></i> Visualizar
|
|
11
|
-
<% end %>
|
|
12
|
-
</li>
|
|
13
|
-
<li>
|
|
14
|
-
<% if object.class == Array %>
|
|
15
|
-
<%= link_to eval_with_rescue("edit_#{[object].flatten.map{|x| x.class.to_s.underscore}.join("_")}_path(#{object[0].id}, #{object[1].id})"), data: { toggle: 'tooltip', placement: 'top', title: 'Editar' } do %>
|
|
16
|
-
<i class="fa fa-pencil"></i> Editar
|
|
17
|
-
<% end %>
|
|
18
|
-
<% else %>
|
|
19
|
-
<%= link_to eval_with_rescue("edit_#{[object].flatten.map{|x| x.class.to_s.underscore}.join("_")}_path(#{object.id})"), data: { toggle: 'tooltip', placement: 'top', title: 'Editar' } do %>
|
|
20
|
-
<i class="fa fa-pencil"></i> Editar
|
|
21
|
-
<% end %>
|
|
22
|
-
<% end %>
|
|
23
|
-
</li>
|
|
24
|
-
<li>
|
|
25
|
-
<%= link_to object, method: :delete, data: { confirm: 'Tem certeza?', toggle: 'tooltip', placement: 'top', title: 'Apagar' } do %>
|
|
26
|
-
<i class="fa fa-trash"></i> Apagar
|
|
27
|
-
<% end %>
|
|
28
|
-
</li>
|
|
29
|
-
</ul>
|
|
30
|
-
</div>
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
<% excluded_columns ||= [] %>
|
|
2
|
-
<% restricted_columns ||= {} %>
|
|
3
|
-
<% nested_resource ||= false %>
|
|
4
|
-
<% parent_resource ||= false %>
|
|
5
|
-
<% back_link ||= false %>
|
|
6
|
-
|
|
7
|
-
<% form_size_fields ||= (object.class.respond_to?('form_size_fields') ? object.class.form_size_fields : {}) %>
|
|
8
|
-
<% form_ordered_fields ||= (object.class.respond_to?('form_ordered_fields') ? object.class.form_ordered_fields : object.class.column_names) %>
|
|
9
|
-
|
|
10
|
-
<%= simple_form_for(nested_resource ? [parent_resource, object] : object) do |f| %>
|
|
11
|
-
<div class="box box-primary">
|
|
12
|
-
<div class="box-header with-border">
|
|
13
|
-
<h3 class="box-title">
|
|
14
|
-
Dados do <%=t object.class.model_name.human %>
|
|
15
|
-
<% if parent_resource %>
|
|
16
|
-
<%= link_to 'Cancelar', eval_with_rescue("#{parent_resource.class.model_name.to_s.downcase}_#{controller_name}_path(#{parent_resource.id})"), class: "btn btn-default btn-xs" %>
|
|
17
|
-
<% else %>
|
|
18
|
-
<%= link_to 'Cancelar', eval_with_rescue("#{controller_name}_path"), class: "btn btn-default btn-xs" %>
|
|
19
|
-
<% end %>
|
|
20
|
-
<%= f.submit 'Salvar', class: 'btn btn-primary btn-xs' %>
|
|
21
|
-
</h3>
|
|
22
|
-
</div>
|
|
23
|
-
<div class="box-body">
|
|
24
|
-
<div class="row">
|
|
25
|
-
<% (form_ordered_fields - ['id', 'created_at', 'updated_at', 'deleted_at'] - excluded_columns).each do |column| %>
|
|
26
|
-
<% wphtml = "col-md-#{form_size_fields[column.to_sym] || 12}" %>
|
|
27
|
-
<% if object.class.column_for_attribute(column).type == :text %>
|
|
28
|
-
<%= f.input column, input_html: { rows: 10, cols: 20 }, wrapper_html: { class: wphtml } %>
|
|
29
|
-
<% elsif [:date, :datetime].include?(object.class.column_for_attribute(column).type) %>
|
|
30
|
-
<%= f.input column, html5: true, wrapper_html: { class: wphtml } %>
|
|
31
|
-
<% elsif /_id$/ =~ column && object.respond_to?(column.split('_id')[0]) %>
|
|
32
|
-
<% if restricted_columns.keys.include?(column.to_sym) %>
|
|
33
|
-
<%= f.association column.split("_id")[0],
|
|
34
|
-
label: restricted_columns[column.to_sym][:label],
|
|
35
|
-
collection: restricted_columns[column.to_sym][:collection],
|
|
36
|
-
wrapper_html: { class: wphtml }
|
|
37
|
-
%>
|
|
38
|
-
<% else %>
|
|
39
|
-
<%= f.association column.split("_id")[0], wrapper_html: { class: wphtml } %>
|
|
40
|
-
<% end %>
|
|
41
|
-
<% else %>
|
|
42
|
-
<%= f.input column, wrapper_html: { class: wphtml } %>
|
|
43
|
-
<% end %>
|
|
44
|
-
<% end %>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
<div class="box-footer">
|
|
48
|
-
<% if back_link %>
|
|
49
|
-
<%= link_to 'Cancelar', "javascript:history.back()", class: "btn btn-default" %>
|
|
50
|
-
<% else %>
|
|
51
|
-
<% if parent_resource %>
|
|
52
|
-
<%= link_to 'Cancelar', eval_with_rescue("#{parent_resource.class.model_name.to_s.downcase}_#{controller_name}_path(#{parent_resource.id})"), class: "btn btn-default" %>
|
|
53
|
-
<% else %>
|
|
54
|
-
<%= link_to 'Cancelar', eval_with_rescue("#{controller_name}_path"), class: "btn btn-default" %>
|
|
55
|
-
<% end %>
|
|
56
|
-
<% end %>
|
|
57
|
-
|
|
58
|
-
<%= f.submit class: "btn btn-primary" %>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
<% end %>
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
<% exceptions ||= ['id', 'created_at', 'updated_at', 'deleted_at'] %>
|
|
2
|
-
<% search_fields ||= [] %>
|
|
3
|
-
<% nested_resource ||= false %>
|
|
4
|
-
<% excluded_columns ||= [] %>
|
|
5
|
-
|
|
6
|
-
<div class='box box-primary'>
|
|
7
|
-
<div class="box-header with-border">
|
|
8
|
-
<h3 class="box-title">
|
|
9
|
-
<%=t Kernel.const_get(controller_name.singularize.camelize).model_name.human.pluralize %>
|
|
10
|
-
</h3>
|
|
11
|
-
</div>
|
|
12
|
-
<div class="box-body">
|
|
13
|
-
<% unless search_fields.empty? %>
|
|
14
|
-
<div class="row">
|
|
15
|
-
<%= search_form_for @q, url: eval(nested_resource ? "#{parent_resource}_#{controller_name}_path" : "#{controller_name}_path") do |f| %>
|
|
16
|
-
<% search_fields.each do |sf| %>
|
|
17
|
-
<%= f.input sf[:field], label: sf[:label], required: false, as: sf[:as], collection: sf[:collection], wrapper_html: { class: 'col-md-3' } %>
|
|
18
|
-
<% end %>
|
|
19
|
-
<div class="col-md-4 top-25">
|
|
20
|
-
<%= f.submit "Pesquisar", class: 'btn btn-primary' %>
|
|
21
|
-
</div>
|
|
22
|
-
<% end %>
|
|
23
|
-
</div>
|
|
24
|
-
<hr>
|
|
25
|
-
<% end %>
|
|
26
|
-
<% if list.empty? %>
|
|
27
|
-
<table class="table table-striped datatables">
|
|
28
|
-
<tbody>
|
|
29
|
-
<tr>
|
|
30
|
-
<td>Nenhum registro encontrado</td>
|
|
31
|
-
</tr>
|
|
32
|
-
</tbody>
|
|
33
|
-
</table>
|
|
34
|
-
<% else %>
|
|
35
|
-
<%= render 'shared/list', list: list, exceptions: exceptions, excluded_columns: excluded_columns %>
|
|
36
|
-
<% if defined? list.total_pages %>
|
|
37
|
-
<div class='col-md-4'>
|
|
38
|
-
<%= page_entries_info list, entry_name: 'resultado(s)' %>
|
|
39
|
-
</div>
|
|
40
|
-
<div class='col-md-8 text-right hidden-xs'>
|
|
41
|
-
<%= paginate list, window: 4 %>
|
|
42
|
-
</div>
|
|
43
|
-
<div class='col-md-8 text-center visible-xs'>
|
|
44
|
-
<%= paginate list, window: 1 %>
|
|
45
|
-
</div>
|
|
46
|
-
<% end %>
|
|
47
|
-
<% end %>
|
|
48
|
-
</div>
|
|
49
|
-
|
|
50
|
-
<div class="box-footer">
|
|
51
|
-
<% unless controller_name == 'users' %>
|
|
52
|
-
<% if can? :new, controller_name.singularize %>
|
|
53
|
-
<% if nested_resource == true %>
|
|
54
|
-
<% if parent_resource %>
|
|
55
|
-
<%= link_to eval("new_#{parent_resource}_#{controller_name.singularize}_path"), class: "btn btn-primary" do %>
|
|
56
|
-
<%= t('.new', default: t("helpers.links.new")) %> <%= Kernel.const_get(controller_name.singularize.camelize).model_name.human %> <i class='fa fa-plus'></i>
|
|
57
|
-
<% end %>
|
|
58
|
-
<% end %>
|
|
59
|
-
<% else %>
|
|
60
|
-
<%= link_to eval("new_#{controller_name.singularize}_path"), class: "btn btn-primary" do %>
|
|
61
|
-
<%= t('.new', default: t("helpers.links.new")) %> <%= Kernel.const_get(controller_name.singularize.camelize).model_name.human %> <i class='fa fa-plus'></i>
|
|
62
|
-
<% end %>
|
|
63
|
-
<% end %>
|
|
64
|
-
<% end %>
|
|
65
|
-
<% end %>
|
|
66
|
-
</div>
|
|
67
|
-
|
|
68
|
-
</div>
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
<% exceptions ||= ['id', 'created_at', 'updated_at', 'deleted_at'] %>
|
|
2
|
-
<% excluded_columns ||= [] %>
|
|
3
|
-
<% hide_actions ||= false %>
|
|
4
|
-
|
|
5
|
-
<table class="table table-striped datatables">
|
|
6
|
-
<thead>
|
|
7
|
-
<tr>
|
|
8
|
-
<% unless list.empty? %>
|
|
9
|
-
<% (list.first.class.column_names - exceptions - excluded_columns).each do |column| %>
|
|
10
|
-
<% if /_id$/ =~ column %>
|
|
11
|
-
<th><%= list.first.class.human_attribute_name(column.split("_id")[0]) %></th>
|
|
12
|
-
<% else %>
|
|
13
|
-
<th><%= list.first.class.human_attribute_name(column) %></th>
|
|
14
|
-
<% end %>
|
|
15
|
-
<% end %>
|
|
16
|
-
<% unless hide_actions %>
|
|
17
|
-
<th>Ações</th>
|
|
18
|
-
<% end %>
|
|
19
|
-
<% end %>
|
|
20
|
-
</tr>
|
|
21
|
-
</thead>
|
|
22
|
-
<tbody>
|
|
23
|
-
<% list.each do |object| %>
|
|
24
|
-
<tr>
|
|
25
|
-
<% (list.first.class.column_names - exceptions - excluded_columns).each do |column| %>
|
|
26
|
-
<td>
|
|
27
|
-
<% if object.send(column).class == Date or
|
|
28
|
-
object.send(column).class == DateTime or
|
|
29
|
-
object.send(column).class == ActiveSupport::TimeWithZone or
|
|
30
|
-
object.send(column).class == Time %>
|
|
31
|
-
<%=l object.send(column) %>
|
|
32
|
-
<% elsif /_id$/ =~ column && object.respond_to?(column.split('_id')[0]) %>
|
|
33
|
-
<%= object.send(column.split("_id")[0]).name %>
|
|
34
|
-
<% else %>
|
|
35
|
-
<%= object.send(column) %>
|
|
36
|
-
<% end %>
|
|
37
|
-
</td>
|
|
38
|
-
<% end %>
|
|
39
|
-
<% unless hide_actions %>
|
|
40
|
-
<td>
|
|
41
|
-
<%= render 'shared/action_links', object: object %>
|
|
42
|
-
</td>
|
|
43
|
-
<% end %>
|
|
44
|
-
</tr>
|
|
45
|
-
<% end %>
|
|
46
|
-
</tbody>
|
|
47
|
-
</table>
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
<% excluded_columns ||= [] %>
|
|
2
|
-
<% nested_resource ||= false %>
|
|
3
|
-
<% relationships ||= {} %>
|
|
4
|
-
|
|
5
|
-
<div class="box box-primary">
|
|
6
|
-
<div class="box-header with-border">
|
|
7
|
-
<h3 class="box-title"><%=t object.class.model_name.human %></h3>
|
|
8
|
-
<% if can? :edit, object %> <!--verificando se o usuario esta logado-->
|
|
9
|
-
<%= link_to eval_with_rescue("edit_#{controller_name.singularize}_path(#{object.id})"), class: "btn btn-warning btn-xs", data: { toggle: 'tooltip', placement: 'top', title: 'Editar' } do %>
|
|
10
|
-
<i class="fa fa-pencil"></i> Editar
|
|
11
|
-
<% end %>
|
|
12
|
-
<% end %>
|
|
13
|
-
<% if nested_resource %>
|
|
14
|
-
<%= link_to 'Listagem', eval_with_rescue("#{parent_resource.class.model_name.to_s.downcase}_#{controller_name}_path(#{parent_resource.id})"), class: "btn btn-default btn-xs" %>
|
|
15
|
-
<% else %>
|
|
16
|
-
<%= link_to 'Listagem', eval_with_rescue("#{controller_name}_path"), class: "btn btn-default btn-xs" %>
|
|
17
|
-
<% end %>
|
|
18
|
-
</div>
|
|
19
|
-
<div class="box-body no-padding">
|
|
20
|
-
<table class="table table-bordered table-striped no-padding datatables">
|
|
21
|
-
<% (object.class.column_names - ['id', 'created_at', 'updated_at', 'deleted_at'] - excluded_columns).each do |column| %>
|
|
22
|
-
<tr>
|
|
23
|
-
<th width='15%'><%= object.class.human_attribute_name(column) %></th>
|
|
24
|
-
<td>
|
|
25
|
-
<% if object.send(column).class == Date or
|
|
26
|
-
object.send(column).class == DateTime or
|
|
27
|
-
object.send(column).class == ActiveSupport::TimeWithZone or
|
|
28
|
-
object.send(column).class == Time %>
|
|
29
|
-
<%=l object.send(column) %>
|
|
30
|
-
<% elsif /_id$/ =~ column && object.respond_to?(column.split('_id')[0]) %>
|
|
31
|
-
<%= object.send(column.split("_id")[0]).name %>
|
|
32
|
-
<% else %>
|
|
33
|
-
<%= object.send(column) %>
|
|
34
|
-
<% end %>
|
|
35
|
-
</td>
|
|
36
|
-
</tr>
|
|
37
|
-
<% end %>
|
|
38
|
-
</table>
|
|
39
|
-
<% if relationships.size > 0 %>
|
|
40
|
-
<% relationships.each do |key, value| %>
|
|
41
|
-
<table class="table table-bordered table-striped no-padding datatables">
|
|
42
|
-
<caption>
|
|
43
|
-
<strong>
|
|
44
|
-
<%=t Kernel.const_get(key.to_s.singularize.camelize).model_name.human.pluralize %>
|
|
45
|
-
</strong>
|
|
46
|
-
</caption>
|
|
47
|
-
<thead>
|
|
48
|
-
<tr>
|
|
49
|
-
<% value.each do |v| %>
|
|
50
|
-
<th><%= Kernel.const_get(key.to_s.singularize.camelize).human_attribute_name(v) %></th>
|
|
51
|
-
<% end %>
|
|
52
|
-
</tr>
|
|
53
|
-
</thead>
|
|
54
|
-
<tbody>
|
|
55
|
-
<% object.send(key.to_s).each do |r| %>
|
|
56
|
-
<tr>
|
|
57
|
-
<% value.each do |v| %>
|
|
58
|
-
<td><%= r.send(v) %></td>
|
|
59
|
-
<% end %>
|
|
60
|
-
</tr>
|
|
61
|
-
<% end %>
|
|
62
|
-
</tbody>
|
|
63
|
-
</table>
|
|
64
|
-
<% end %>
|
|
65
|
-
<% end %>
|
|
66
|
-
</div>
|
|
67
|
-
<div class="box-footer">
|
|
68
|
-
<% if can? :edit, object %> <!--verificando se o usuario esta logado-->
|
|
69
|
-
<%= link_to eval_with_rescue("edit_#{controller_name.singularize}_path(#{object.id})"), class: "btn btn-warning", data: { toggle: 'tooltip', placement: 'top', title: 'Editar' } do %>
|
|
70
|
-
<i class="fa fa-pencil"></i> Editar
|
|
71
|
-
<% end %>
|
|
72
|
-
<% end %>
|
|
73
|
-
|
|
74
|
-
<% if nested_resource %>
|
|
75
|
-
<%= link_to 'Listagem', eval_with_rescue("#{parent_resource.class.model_name.to_s.downcase}_#{controller_name}_path(#{parent_resource.id})"), class: "btn btn-default" %>
|
|
76
|
-
<% else %>
|
|
77
|
-
<%= link_to 'Listagem', eval_with_rescue("#{controller_name}_path"), class: "btn btn-default" %>
|
|
78
|
-
<% end %>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|