carnival 0.2.8 → 0.3.0
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 +7 -0
- data/app/assets/javascripts/carnival/vizir_admin.js.erb +7 -3
- data/app/controllers/carnival/base_admin_controller.rb +2 -7
- data/app/helpers/carnival/base_admin_helper.rb +1 -4
- data/app/helpers/carnival/field_renderers/field_renderer.rb +11 -1
- data/app/helpers/carnival/field_renderers/many_relation_renderer.rb +0 -7
- data/app/helpers/carnival/field_renderers/single_relation_renderer.rb +5 -8
- data/app/models/carnival/field.rb +4 -0
- data/app/presenters/carnival/base_admin_presenter.rb +55 -38
- data/app/presenters/carnival/dsl.rb +1 -1
- data/lib/carnival/version.rb +1 -1
- metadata +218 -382
- data/spec/dummy/README.rdoc +0 -28
- data/spec/dummy/Rakefile +0 -6
- data/spec/dummy/app/assets/javascripts/application.js +0 -13
- data/spec/dummy/app/assets/stylesheets/application.css +0 -15
- data/spec/dummy/app/controllers/admin/todo_lists_controller.rb +0 -7
- data/spec/dummy/app/controllers/admin/todos_controller.rb +0 -7
- data/spec/dummy/app/controllers/application_controller.rb +0 -5
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/models/todo.rb +0 -7
- data/spec/dummy/app/models/todo_list.rb +0 -4
- data/spec/dummy/app/presenters/admin/todo_list_presenter.rb +0 -13
- data/spec/dummy/app/presenters/admin/todo_presenter.rb +0 -32
- data/spec/dummy/app/views/layouts/application.html.erb +0 -14
- data/spec/dummy/bin/bundle +0 -3
- data/spec/dummy/bin/rails +0 -4
- data/spec/dummy/bin/rake +0 -4
- data/spec/dummy/bin/setup +0 -29
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/config/application.rb +0 -15
- data/spec/dummy/config/boot.rb +0 -5
- data/spec/dummy/config/database.yml +0 -25
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -43
- data/spec/dummy/config/environments/production.rb +0 -79
- data/spec/dummy/config/environments/test.rb +0 -42
- data/spec/dummy/config/initializers/assets.rb +0 -11
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/carnival_initializer.rb +0 -25
- data/spec/dummy/config/initializers/cookies_serializer.rb +0 -3
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy/config/initializers/inflections.rb +0 -16
- data/spec/dummy/config/initializers/mime_types.rb +0 -4
- data/spec/dummy/config/initializers/session_store.rb +0 -3
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/carnival.en.yml +0 -28
- data/spec/dummy/config/locales/carnival.pt-br.yml +0 -259
- data/spec/dummy/config/locales/en.yml +0 -23
- data/spec/dummy/config/routes.rb +0 -11
- data/spec/dummy/config/secrets.yml +0 -22
- data/spec/dummy/db/migrate/20150316021645_create_todos.rb +0 -10
- data/spec/dummy/db/migrate/20150408165317_create_todo_lists.rb +0 -8
- data/spec/dummy/db/migrate/20150408165333_add_todo_list_relation_to_todos.rb +0 -5
- data/spec/dummy/db/schema.rb +0 -32
- data/spec/dummy/public/404.html +0 -67
- data/spec/dummy/public/422.html +0 -67
- data/spec/dummy/public/500.html +0 -66
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/factories/todo_lists_factory.rb +0 -5
- data/spec/factories/todos_factory.rb +0 -18
- data/spec/features/create_spec.rb +0 -28
- data/spec/features/destroy_spec.rb +0 -11
- data/spec/features/index/basic_index_spec.rb +0 -14
- data/spec/features/index/pagination_spec.rb +0 -19
- data/spec/features/index/scope_spec.rb +0 -29
- data/spec/features/index/search_spec.rb +0 -28
- data/spec/features/show_spec.rb +0 -15
- data/spec/features/update_spec.rb +0 -26
- data/spec/rails_helper.rb +0 -33
- data/spec/spec_helper.rb +0 -9
- data/spec/support/features/index_helpers.rb +0 -15
@@ -1,11 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Version of your assets, change this if you want to expire all your assets.
|
4
|
-
Rails.application.config.assets.version = '1.0'
|
5
|
-
|
6
|
-
# Add additional assets to the asset load path
|
7
|
-
# Rails.application.config.assets.paths << Emoji.images_path
|
8
|
-
|
9
|
-
# Precompile additional assets.
|
10
|
-
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
11
|
-
# Rails.application.config.assets.precompile += %w( search.js )
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
-
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
-
|
6
|
-
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
-
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -1,25 +0,0 @@
|
|
1
|
-
Carnival.configure do |config|
|
2
|
-
Rails.application.config.assets.precompile += %w( carnival/* )
|
3
|
-
config.menu = {
|
4
|
-
administration: {
|
5
|
-
label: 'administration',
|
6
|
-
link: '/admin/customers',
|
7
|
-
class: 'administracao',
|
8
|
-
subs: [{
|
9
|
-
label: 'posts',
|
10
|
-
link: '/admin/posts'
|
11
|
-
}]
|
12
|
-
}
|
13
|
-
}
|
14
|
-
|
15
|
-
# Custom CSS Files
|
16
|
-
# config.custom_css_files = ["samplefile.css"]
|
17
|
-
|
18
|
-
# Custom Javascript Files
|
19
|
-
# config.custom_javascript_files = ["samplefile.js"]
|
20
|
-
|
21
|
-
# Determine root action
|
22
|
-
# config.root_action = 'carnival/admin_users#index'
|
23
|
-
|
24
|
-
config.use_full_model_name = false
|
25
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Add new inflection rules using the following format. Inflections
|
4
|
-
# are locale specific, and you may define rules for as many different
|
5
|
-
# locales as you wish. All of these examples are active by default:
|
6
|
-
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
-
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
-
# inflect.singular /^(ox)en/i, '\1'
|
9
|
-
# inflect.irregular 'person', 'people'
|
10
|
-
# inflect.uncountable %w( fish sheep )
|
11
|
-
# end
|
12
|
-
|
13
|
-
# These inflection rules are supported but not enabled by default:
|
14
|
-
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
-
# inflect.acronym 'RESTful'
|
16
|
-
# end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
-
# is enabled by default.
|
5
|
-
|
6
|
-
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
-
ActiveSupport.on_load(:action_controller) do
|
8
|
-
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
9
|
-
end
|
10
|
-
|
11
|
-
# To enable root element in JSON for ActiveRecord objects.
|
12
|
-
# ActiveSupport.on_load(:active_record) do
|
13
|
-
# self.include_root_in_json = true
|
14
|
-
# end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
en:
|
2
|
-
|
3
|
-
carnival:
|
4
|
-
show: View
|
5
|
-
new: New
|
6
|
-
edit: Edit
|
7
|
-
destroy: Delete
|
8
|
-
errors:
|
9
|
-
invalid_field: "The actions '%{actions}' are invalid for field '%{field}' for presenter '%{presenter}'"
|
10
|
-
|
11
|
-
menu:
|
12
|
-
posts: Posts
|
13
|
-
|
14
|
-
nested_form:
|
15
|
-
open: Open
|
16
|
-
close: Close
|
17
|
-
new: Create New
|
18
|
-
add_option: Add
|
19
|
-
new_subtitle: New
|
20
|
-
existing_option: Existing Options
|
21
|
-
existing_option_title: Options
|
22
|
-
choose_an_option: Choose an option
|
23
|
-
minimize: Minimize
|
24
|
-
paginate_first: First
|
25
|
-
paginate_previous: « Previous
|
26
|
-
paginate_next: Next »
|
27
|
-
paginate_last: Last
|
28
|
-
paginate_total: Total
|
@@ -1,259 +0,0 @@
|
|
1
|
-
pt-BR:
|
2
|
-
|
3
|
-
carnival:
|
4
|
-
show: Visualizar
|
5
|
-
new: Novo
|
6
|
-
edit: Editar
|
7
|
-
destroy: Apagar
|
8
|
-
errors:
|
9
|
-
invalid_field: "As actions '%{actions}' não são válidas para o campo '%{field}' do presenter '%{presenter}'"
|
10
|
-
|
11
|
-
nested_form:
|
12
|
-
open: Abrir
|
13
|
-
close: Fechar
|
14
|
-
new: Criar Novo
|
15
|
-
add_option: Adicionar
|
16
|
-
new_subtitle: Novos
|
17
|
-
existing_option: Opções Existentes
|
18
|
-
existing_option_title: Opções
|
19
|
-
choose_an_option: Escolha uma opção
|
20
|
-
|
21
|
-
menu:
|
22
|
-
dashboard: Dashboard
|
23
|
-
admin_user: Usuários administradores
|
24
|
-
messages:
|
25
|
-
created: Criado com sucesso!
|
26
|
-
updated: Alterado com sucesso!
|
27
|
-
select: Selecione
|
28
|
-
minimize: Minimizar
|
29
|
-
sort_by: Ordenar por
|
30
|
-
download_as_csv: Baixar como CSV
|
31
|
-
no_results: Não foram encontrados resultados
|
32
|
-
advanced_search: Busca
|
33
|
-
select_an_option: Selecione uma opção
|
34
|
-
without_country: Sem país
|
35
|
-
without_state: Sem estado
|
36
|
-
without_city: Sem cidade
|
37
|
-
search: Busca
|
38
|
-
clear: Limpar
|
39
|
-
login: Entrar
|
40
|
-
logout: Sair
|
41
|
-
edit: Editar
|
42
|
-
send: Enviar
|
43
|
-
create: Criar
|
44
|
-
delete: Apagar
|
45
|
-
remove: Remover
|
46
|
-
destroy: Apagar
|
47
|
-
details: Detalhes
|
48
|
-
view: Ver
|
49
|
-
please_wait: Aguarde...
|
50
|
-
are_you_sure: Você tem certeza que deseja apagar?
|
51
|
-
are_you_sure_block: Você tem certeza que deseja bloquear?
|
52
|
-
are_you_sure_unblock: Você tem certeza que deseja desbloquear?
|
53
|
-
select: Selecione
|
54
|
-
search: Buscar
|
55
|
-
previous: Anterior
|
56
|
-
next: Próxima
|
57
|
-
update: Atualizar
|
58
|
-
new: Adicionar
|
59
|
-
back: Voltar
|
60
|
-
save: Salvar
|
61
|
-
yyes: Sim
|
62
|
-
nno: Não
|
63
|
-
from: De
|
64
|
-
to: Até
|
65
|
-
master_user: SafeGuard Admin
|
66
|
-
blocked: Bloqueado
|
67
|
-
unblocked: Desbloqueado
|
68
|
-
was: foi
|
69
|
-
of: de
|
70
|
-
by: por
|
71
|
-
at: às
|
72
|
-
new_support: Abrir solicitação de suporte
|
73
|
-
batch_actions: Operações em Lote
|
74
|
-
paginate_first: Primeira
|
75
|
-
paginate_previous: « Anterior
|
76
|
-
paginate_next: Próxima »
|
77
|
-
paginate_last: Última
|
78
|
-
paginate_total: Total
|
79
|
-
data_tables:
|
80
|
-
first: Primeira
|
81
|
-
last: Última
|
82
|
-
next: Próxima
|
83
|
-
previous: Anterior
|
84
|
-
row_counter: Mostrando _START_ a _END_ de _TOTAL_ entradas
|
85
|
-
row_counter_empty: Mostrando de 0 até 0 de 0 registros
|
86
|
-
table_empty: Não há registros para exibir
|
87
|
-
rows_filtered: (filtrando de _MAX_)
|
88
|
-
rows_postfix:
|
89
|
-
rows_per_page: Exibir _MENU_ registros
|
90
|
-
processing: Processando
|
91
|
-
search:
|
92
|
-
zero_records: Não há registros para exibir
|
93
|
-
date_filter:
|
94
|
-
today: Hoje
|
95
|
-
yesterday: Ontem
|
96
|
-
this_week: Esta semana
|
97
|
-
last_week: Semana passada
|
98
|
-
this_month: Este mês
|
99
|
-
last_month: Mês passado
|
100
|
-
this_year: Este ano
|
101
|
-
last_year: Ano passado
|
102
|
-
|
103
|
-
|
104
|
-
# formatos de data e hora
|
105
|
-
date:
|
106
|
-
formats:
|
107
|
-
default: "%d/%m/%Y"
|
108
|
-
short: "%d de %B"
|
109
|
-
long: "%d de %B de %Y"
|
110
|
-
only_day: "%d"
|
111
|
-
|
112
|
-
day_names: [Domingo, Segunda, Terça, Quarta, Quinta, Sexta, Sábado]
|
113
|
-
abbr_day_names: [Dom, Seg, Ter, Qua, Qui, Sex, Sáb]
|
114
|
-
month_names: [~, Janeiro, Fevereiro, Março, Abril, Maio, Junho, Julho, Agosto, Setembro, Outubro, Novembro, Dezembro]
|
115
|
-
abbr_month_names: [~, Jan, Fev, Mar, Abr, Mai, Jun, Jul, Ago, Set, Out, Nov, Dez]
|
116
|
-
order:
|
117
|
-
- :day
|
118
|
-
- :month
|
119
|
-
- :year
|
120
|
-
|
121
|
-
time:
|
122
|
-
formats:
|
123
|
-
default: "%A, %d de %B de %Y, %H:%M hs"
|
124
|
-
time: "%H:%M hs"
|
125
|
-
short: "%d/%m, %H:%M hs"
|
126
|
-
long: "%A, %d de %B de %Y, %H:%M hs"
|
127
|
-
only_second: "%S"
|
128
|
-
datetime:
|
129
|
-
formats:
|
130
|
-
default: "%Y-%m-%dT%H:%M:%S%Z"
|
131
|
-
am: ''
|
132
|
-
pm: ''
|
133
|
-
|
134
|
-
# date helper distanci em palavras
|
135
|
-
datetime:
|
136
|
-
distance_in_words:
|
137
|
-
half_a_minute: 'meio minuto'
|
138
|
-
less_than_x_seconds:
|
139
|
-
one: 'menos de 1 segundo'
|
140
|
-
other: 'menos de %{count} segundos'
|
141
|
-
|
142
|
-
x_seconds:
|
143
|
-
one: '1 segundo'
|
144
|
-
other: '%{count} segundos'
|
145
|
-
|
146
|
-
less_than_x_minutes:
|
147
|
-
one: 'menos de um minuto'
|
148
|
-
other: 'menos de %{count} minutos'
|
149
|
-
|
150
|
-
x_minutes:
|
151
|
-
one: '1 minuto'
|
152
|
-
other: '%{count} minutos'
|
153
|
-
|
154
|
-
about_x_hours:
|
155
|
-
one: 'aproximadamente 1 hora'
|
156
|
-
other: 'aproximadamente %{count} horas'
|
157
|
-
|
158
|
-
x_days:
|
159
|
-
one: '1 dia'
|
160
|
-
other: '%{count} dias'
|
161
|
-
|
162
|
-
about_x_months:
|
163
|
-
one: 'aproximadamente 1 mês'
|
164
|
-
other: 'aproximadamente %{count} meses'
|
165
|
-
|
166
|
-
x_months:
|
167
|
-
one: '1 mês'
|
168
|
-
other: '%{count} meses'
|
169
|
-
|
170
|
-
about_x_years:
|
171
|
-
one: 'aproximadamente 1 ano'
|
172
|
-
other: 'aproximadamente %{count} anos'
|
173
|
-
|
174
|
-
over_x_years:
|
175
|
-
one: 'mais de 1 ano'
|
176
|
-
other: 'mais de %{count} anos'
|
177
|
-
|
178
|
-
# numeros
|
179
|
-
number:
|
180
|
-
format:
|
181
|
-
precision: 3
|
182
|
-
separator: ','
|
183
|
-
delimiter: '.'
|
184
|
-
currency:
|
185
|
-
format:
|
186
|
-
unit: 'R$'
|
187
|
-
precision: 2
|
188
|
-
format: '%u %n'
|
189
|
-
separator: ','
|
190
|
-
delimiter: '.'
|
191
|
-
percentage:
|
192
|
-
format:
|
193
|
-
delimiter: '.'
|
194
|
-
precision:
|
195
|
-
format:
|
196
|
-
delimiter: '.'
|
197
|
-
human:
|
198
|
-
format:
|
199
|
-
precision: 1
|
200
|
-
delimiter: '.'
|
201
|
-
support:
|
202
|
-
array:
|
203
|
-
sentence_connector: "e"
|
204
|
-
skip_last_comma: true
|
205
|
-
|
206
|
-
default_columns: &default_columns
|
207
|
-
created_at: Criado em
|
208
|
-
updated_at: Atualizado em
|
209
|
-
id: ID
|
210
|
-
|
211
|
-
admin_user:
|
212
|
-
name: Nome
|
213
|
-
lista: Usuários administradores
|
214
|
-
admin: Administrador
|
215
|
-
account_name: Contaform
|
216
|
-
notification: Notificação
|
217
|
-
<<: *default_columns
|
218
|
-
|
219
|
-
# Active Record
|
220
|
-
activerecord:
|
221
|
-
attributes:
|
222
|
-
carnival/admin_user:
|
223
|
-
avatar: Foto
|
224
|
-
current_sign_in_at: Acesso atual em
|
225
|
-
email: E-mail
|
226
|
-
id: Código
|
227
|
-
last_sign_in_at: Último acesso em
|
228
|
-
name: Nome
|
229
|
-
photo: Foto
|
230
|
-
sign_in_count: Total de acessos
|
231
|
-
errors:
|
232
|
-
template:
|
233
|
-
header:
|
234
|
-
one: "Não pôde ser salvo: 1 erro"
|
235
|
-
other: "Não pôde ser salvo: %{count} erros."
|
236
|
-
body: "Por favor, cheque os seguintes campos:"
|
237
|
-
messages:
|
238
|
-
inclusion: "não está incluso na lista"
|
239
|
-
exclusion: "não está disponível"
|
240
|
-
invalid: "não é válido"
|
241
|
-
confirmation: "não bate com a confirmação"
|
242
|
-
accepted: "precisa ser aceito"
|
243
|
-
empty: "não pode ser vazio"
|
244
|
-
blank: "não pode ser vazio"
|
245
|
-
too_long: "é muito longo (não mais do que %{count} caracteres)"
|
246
|
-
too_short: "é muito curto (não menos do que %{count} caracteres)"
|
247
|
-
wrong_length: "não é do tamanho correto (precisa ter %{count} caracteres)"
|
248
|
-
taken: "não está disponível"
|
249
|
-
not_a_number: "não é um número"
|
250
|
-
greater_than: "precisa ser maior do que %{count}"
|
251
|
-
greater_than_or_equal_to: "precisa ser maior ou igual a %{count}"
|
252
|
-
equal_to: "precisa ser igual a %{count}"
|
253
|
-
less_than: "precisa ser menor do que %{count}"
|
254
|
-
less_than_or_equal_to: "precisa ser menor ou igual a %{count}"
|
255
|
-
odd: "precisa ser ímpar"
|
256
|
-
even: "precisa ser par"
|
257
|
-
models:
|
258
|
-
admin_user: Usuário Administrador
|
259
|
-
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# Files in the config/locales directory are used for internationalization
|
2
|
-
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
-
# than English, add the necessary files in this directory.
|
4
|
-
#
|
5
|
-
# To use the locales, use `I18n.t`:
|
6
|
-
#
|
7
|
-
# I18n.t 'hello'
|
8
|
-
#
|
9
|
-
# In views, this is aliased to just `t`:
|
10
|
-
#
|
11
|
-
# <%= t('hello') %>
|
12
|
-
#
|
13
|
-
# To use a different locale, set it with `I18n.locale`:
|
14
|
-
#
|
15
|
-
# I18n.locale = :es
|
16
|
-
#
|
17
|
-
# This would use the information in config/locales/es.yml.
|
18
|
-
#
|
19
|
-
# To learn more, please read the Rails Internationalization guide
|
20
|
-
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
-
|
22
|
-
en:
|
23
|
-
hello: "Hello world"
|
data/spec/dummy/config/routes.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
-
# If you change this key, all old signed cookies will become invalid!
|
5
|
-
|
6
|
-
# Make sure the secret is at least 30 characters and all random,
|
7
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
-
# You can use `rake secret` to generate a secure secret key.
|
9
|
-
|
10
|
-
# Make sure the secrets in this file are kept private
|
11
|
-
# if you're sharing your code publicly.
|
12
|
-
|
13
|
-
development:
|
14
|
-
secret_key_base: 9acec9a53d7ffcce442d179cdbe4be95a92f31efb6d16644b172c2902e55ebe0b2475656c328b67ed32db1bd422dafc5fce9f9c9f5c9f813d5850b9e9d812b48
|
15
|
-
|
16
|
-
test:
|
17
|
-
secret_key_base: 3c8da8a6c6f2e2788d56e829603d46557dd2ac18e476765173940e2ff2a6e28b460b6c3d801d40fef1865dcd22387e42ec05b0398d35b1f6ef3e40a87e4ff5cf
|
18
|
-
|
19
|
-
# Do not keep production secrets in the repository,
|
20
|
-
# instead read values from the environment.
|
21
|
-
production:
|
22
|
-
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|