flexi_generators 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +83 -70
- data/Rakefile +0 -22
- data/VERSION +1 -1
- data/flexi_generators.gemspec +75 -136
- data/init.rb +0 -1
- data/lib/flexi_generators.rb +2 -4
- data/lib/generators/flexi_auth/USAGE +5 -0
- data/lib/generators/flexi_auth/flexi_auth_generator.rb +117 -0
- data/{generators/flexi_authentication → lib/generators/flexi_auth}/templates/authentication.rb +2 -9
- data/{generators/flexi_authentication → lib/generators/flexi_auth}/templates/authlogic_session.rb +0 -0
- data/{generators/flexi_authentication → lib/generators/flexi_auth}/templates/fixtures.yml +0 -0
- data/lib/generators/flexi_auth/templates/migration.rb +16 -0
- data/lib/generators/flexi_auth/templates/sessions_controller.rb +25 -0
- data/{generators/flexi_authentication → lib/generators/flexi_auth}/templates/sessions_helper.rb +0 -0
- data/{generators/flexi_authentication → lib/generators/flexi_auth}/templates/tests/testunit/sessions_controller.rb +1 -17
- data/lib/generators/flexi_auth/templates/tests/testunit/user.rb +4 -0
- data/{generators/flexi_authentication → lib/generators/flexi_auth}/templates/tests/testunit/users_controller.rb +1 -1
- data/lib/generators/flexi_auth/templates/user.rb +3 -0
- data/lib/generators/flexi_auth/templates/users_controller.rb +42 -0
- data/{generators/flexi_authentication → lib/generators/flexi_auth}/templates/users_helper.rb +0 -0
- data/lib/generators/flexi_auth/templates/views/erb/_error_messages.html.erb +11 -0
- data/lib/generators/flexi_auth/templates/views/erb/edit.html.erb +24 -0
- data/lib/generators/flexi_auth/templates/views/erb/index.html.erb +27 -0
- data/lib/generators/flexi_auth/templates/views/erb/login.html.erb +22 -0
- data/lib/generators/flexi_auth/templates/views/erb/new.html.erb +24 -0
- data/lib/generators/flexi_auth/templates/views/erb/show.html.erb +16 -0
- data/lib/generators/flexi_prepare/USAGE +6 -0
- data/lib/generators/flexi_prepare/flexi_prepare_generator.rb +56 -0
- data/{generators/flexi_layout → lib/generators/flexi_prepare}/templates/add.png +0 -0
- data/{generators/flexi_layout → lib/generators/flexi_prepare}/templates/admin_home_controller.rb +0 -0
- data/{generators/flexi_layout → lib/generators/flexi_prepare}/templates/admin_home_index.html.erb +1 -1
- data/lib/generators/flexi_prepare/templates/application.css +278 -0
- data/lib/generators/flexi_prepare/templates/application.html.erb +57 -0
- data/lib/generators/flexi_prepare/templates/application_helper.rb +42 -0
- data/lib/generators/flexi_prepare/templates/back.png +0 -0
- data/lib/generators/flexi_prepare/templates/bg.png +0 -0
- data/lib/generators/flexi_prepare/templates/bg2.png +0 -0
- data/lib/generators/flexi_prepare/templates/boxheader.gif +0 -0
- data/lib/generators/flexi_prepare/templates/btn-bg-hover.png +0 -0
- data/lib/generators/flexi_prepare/templates/btn-bg.png +0 -0
- data/{generators/flexi_layout → lib/generators/flexi_prepare}/templates/custom_field_error.rb +1 -1
- data/lib/generators/flexi_prepare/templates/delete.png +0 -0
- data/lib/generators/flexi_prepare/templates/edit.png +0 -0
- data/lib/generators/flexi_prepare/templates/inflector_portuguese.rb +59 -0
- data/lib/generators/flexi_prepare/templates/login.css +142 -0
- data/lib/generators/flexi_prepare/templates/login.html.erb +26 -0
- data/lib/generators/flexi_prepare/templates/logo.png +0 -0
- data/lib/generators/flexi_prepare/templates/menu.png +0 -0
- data/lib/generators/flexi_prepare/templates/messages/Thumbs.db +0 -0
- data/lib/generators/flexi_prepare/templates/messages/error.png +0 -0
- data/lib/generators/flexi_prepare/templates/messages/info.png +0 -0
- data/lib/generators/flexi_prepare/templates/messages/success.png +0 -0
- data/lib/generators/flexi_prepare/templates/messages/tip.png +0 -0
- data/lib/generators/flexi_prepare/templates/messages/warning.png +0 -0
- data/lib/generators/flexi_prepare/templates/pt-BR.yml +204 -0
- data/lib/generators/flexi_prepare/templates/show.png +0 -0
- data/{generators/flexi_layout/templates/stylesheet_site.css → lib/generators/flexi_prepare/templates/site.css} +32 -23
- data/lib/generators/flexi_prepare/templates/site.html.erb +20 -0
- data/{generators/flexi_layout/templates/home_controller.rb → lib/generators/flexi_prepare/templates/site_controller.rb} +1 -1
- data/lib/generators/flexi_prepare/templates/site_helper.rb +2 -0
- data/lib/generators/flexi_prepare/templates/site_index.html.erb +27 -0
- data/{generators/flexi_layout → lib/generators/flexi_prepare}/templates/users.png +0 -0
- data/lib/generators/flexi_scaffold/USAGE +8 -0
- data/lib/generators/flexi_scaffold/flexi_scaffold_generator.rb +98 -0
- data/lib/generators/flexi_scaffold/templates/controller.rb +42 -0
- data/{generators → lib/generators}/flexi_scaffold/templates/fixtures.yml +3 -3
- data/{generators → lib/generators}/flexi_scaffold/templates/helper.rb +1 -1
- data/{generators → lib/generators}/flexi_scaffold/templates/migration.rb +3 -5
- data/lib/generators/flexi_scaffold/templates/model.rb +3 -0
- data/lib/generators/flexi_scaffold/templates/tests/controller.rb +50 -0
- data/lib/generators/flexi_scaffold/templates/tests/helper.rb +4 -0
- data/{test/flexi_generators_test.rb → lib/generators/flexi_scaffold/templates/tests/model.rb} +2 -2
- data/lib/generators/flexi_scaffold/templates/views/erb/_error_messages.html.erb +11 -0
- data/lib/generators/flexi_scaffold/templates/views/erb/_form.html.erb +13 -0
- data/lib/generators/flexi_scaffold/templates/views/erb/edit.html.erb +3 -0
- data/lib/generators/flexi_scaffold/templates/views/erb/index.html.erb +29 -0
- data/lib/generators/flexi_scaffold/templates/views/erb/new.html.erb +3 -0
- data/lib/generators/flexi_scaffold/templates/views/erb/show.html.erb +15 -0
- data/template.rb +6 -0
- metadata +79 -137
- data/flexi_template.rb +0 -28
- data/generators/flexi_authentication/USAGE +0 -50
- data/generators/flexi_authentication/flexi_authentication_generator.rb +0 -127
- data/generators/flexi_authentication/lib/insert_commands.rb +0 -74
- data/generators/flexi_authentication/templates/admin_users_controller.rb +0 -60
- data/generators/flexi_authentication/templates/migration.rb +0 -30
- data/generators/flexi_authentication/templates/sessions_controller.rb +0 -52
- data/generators/flexi_authentication/templates/tests/rspec/sessions_controller.rb +0 -39
- data/generators/flexi_authentication/templates/tests/rspec/user.rb +0 -83
- data/generators/flexi_authentication/templates/tests/rspec/users_controller.rb +0 -26
- data/generators/flexi_authentication/templates/tests/shoulda/sessions_controller.rb +0 -40
- data/generators/flexi_authentication/templates/tests/shoulda/user.rb +0 -85
- data/generators/flexi_authentication/templates/tests/shoulda/users_controller.rb +0 -27
- data/generators/flexi_authentication/templates/tests/testunit/user.rb +0 -88
- data/generators/flexi_authentication/templates/user.rb +0 -43
- data/generators/flexi_authentication/templates/views/erb/admin_user_edit.html.erb +0 -23
- data/generators/flexi_authentication/templates/views/erb/admin_user_index.html.erb +0 -33
- data/generators/flexi_authentication/templates/views/erb/admin_user_new.html.erb +0 -23
- data/generators/flexi_authentication/templates/views/erb/login.html.erb +0 -38
- data/generators/flexi_layout/USAGE +0 -18
- data/generators/flexi_layout/flexi_layout_generator.rb +0 -51
- data/generators/flexi_layout/lib/insert_commands.rb +0 -28
- data/generators/flexi_layout/templates/bg.png +0 -0
- data/generators/flexi_layout/templates/helper.rb +0 -19
- data/generators/flexi_layout/templates/home_helper.rb +0 -2
- data/generators/flexi_layout/templates/home_index.html.erb +0 -17
- data/generators/flexi_layout/templates/inflector_portuguese.rb +0 -62
- data/generators/flexi_layout/templates/layout.html.erb +0 -47
- data/generators/flexi_layout/templates/layout_login.html.erb +0 -27
- data/generators/flexi_layout/templates/layout_site.html.erb +0 -22
- data/generators/flexi_layout/templates/logo.png +0 -0
- data/generators/flexi_layout/templates/pt-BR.yml +0 -143
- data/generators/flexi_layout/templates/stylesheet.css +0 -132
- data/generators/flexi_layout/templates/stylesheet_login.css +0 -73
- data/generators/flexi_resource_scaffold/USAGE +0 -29
- data/generators/flexi_resource_scaffold/flexi_resource_scaffold_generator.rb +0 -179
- data/generators/flexi_resource_scaffold/templates/controller.rb +0 -29
- data/generators/flexi_resource_scaffold/templates/fixtures.yml +0 -10
- data/generators/flexi_resource_scaffold/templates/functional_test.rb +0 -57
- data/generators/flexi_resource_scaffold/templates/helper.rb +0 -2
- data/generators/flexi_resource_scaffold/templates/migration.rb +0 -15
- data/generators/flexi_resource_scaffold/templates/model.rb +0 -2
- data/generators/flexi_resource_scaffold/templates/old_migration.rb +0 -13
- data/generators/flexi_resource_scaffold/templates/rspec/functional_spec.rb +0 -255
- data/generators/flexi_resource_scaffold/templates/rspec/helper_spec.rb +0 -11
- data/generators/flexi_resource_scaffold/templates/rspec/routing_spec.rb +0 -61
- data/generators/flexi_resource_scaffold/templates/rspec/unit_spec.rb +0 -11
- data/generators/flexi_resource_scaffold/templates/rspec/views/edit_spec.rb +0 -28
- data/generators/flexi_resource_scaffold/templates/rspec/views/index_spec.rb +0 -26
- data/generators/flexi_resource_scaffold/templates/rspec/views/new_spec.rb +0 -30
- data/generators/flexi_resource_scaffold/templates/rspec/views/show_spec.rb +0 -25
- data/generators/flexi_resource_scaffold/templates/shoulda_functional_test.rb +0 -19
- data/generators/flexi_resource_scaffold/templates/unit_test.rb +0 -7
- data/generators/flexi_resource_scaffold/templates/view__form.erb +0 -6
- data/generators/flexi_resource_scaffold/templates/view__form.haml +0 -5
- data/generators/flexi_resource_scaffold/templates/view_edit.erb +0 -8
- data/generators/flexi_resource_scaffold/templates/view_edit.haml +0 -11
- data/generators/flexi_resource_scaffold/templates/view_index.erb +0 -27
- data/generators/flexi_resource_scaffold/templates/view_index.haml +0 -19
- data/generators/flexi_resource_scaffold/templates/view_new.erb +0 -9
- data/generators/flexi_resource_scaffold/templates/view_new.haml +0 -9
- data/generators/flexi_resource_scaffold/templates/view_show.erb +0 -10
- data/generators/flexi_resource_scaffold/templates/view_show.haml +0 -9
- data/generators/flexi_scaffold/USAGE +0 -51
- data/generators/flexi_scaffold/flexi_scaffold_generator.rb +0 -232
- data/generators/flexi_scaffold/templates/actions/create.rb +0 -9
- data/generators/flexi_scaffold/templates/actions/destroy.rb +0 -6
- data/generators/flexi_scaffold/templates/actions/edit.rb +0 -3
- data/generators/flexi_scaffold/templates/actions/index.rb +0 -4
- data/generators/flexi_scaffold/templates/actions/new.rb +0 -3
- data/generators/flexi_scaffold/templates/actions/show.rb +0 -3
- data/generators/flexi_scaffold/templates/actions/update.rb +0 -9
- data/generators/flexi_scaffold/templates/controller.rb +0 -5
- data/generators/flexi_scaffold/templates/model.rb +0 -3
- data/generators/flexi_scaffold/templates/tests/rspec/actions/create.rb +0 -11
- data/generators/flexi_scaffold/templates/tests/rspec/actions/destroy.rb +0 -6
- data/generators/flexi_scaffold/templates/tests/rspec/actions/edit.rb +0 -4
- data/generators/flexi_scaffold/templates/tests/rspec/actions/index.rb +0 -4
- data/generators/flexi_scaffold/templates/tests/rspec/actions/new.rb +0 -4
- data/generators/flexi_scaffold/templates/tests/rspec/actions/show.rb +0 -4
- data/generators/flexi_scaffold/templates/tests/rspec/actions/update.rb +0 -11
- data/generators/flexi_scaffold/templates/tests/rspec/controller.rb +0 -8
- data/generators/flexi_scaffold/templates/tests/rspec/model.rb +0 -7
- data/generators/flexi_scaffold/templates/tests/shoulda/actions/create.rb +0 -13
- data/generators/flexi_scaffold/templates/tests/shoulda/actions/destroy.rb +0 -8
- data/generators/flexi_scaffold/templates/tests/shoulda/actions/edit.rb +0 -6
- data/generators/flexi_scaffold/templates/tests/shoulda/actions/index.rb +0 -6
- data/generators/flexi_scaffold/templates/tests/shoulda/actions/new.rb +0 -6
- data/generators/flexi_scaffold/templates/tests/shoulda/actions/show.rb +0 -6
- data/generators/flexi_scaffold/templates/tests/shoulda/actions/update.rb +0 -13
- data/generators/flexi_scaffold/templates/tests/shoulda/controller.rb +0 -5
- data/generators/flexi_scaffold/templates/tests/shoulda/model.rb +0 -7
- data/generators/flexi_scaffold/templates/tests/testunit/actions/create.rb +0 -11
- data/generators/flexi_scaffold/templates/tests/testunit/actions/destroy.rb +0 -6
- data/generators/flexi_scaffold/templates/tests/testunit/actions/edit.rb +0 -4
- data/generators/flexi_scaffold/templates/tests/testunit/actions/index.rb +0 -4
- data/generators/flexi_scaffold/templates/tests/testunit/actions/new.rb +0 -4
- data/generators/flexi_scaffold/templates/tests/testunit/actions/show.rb +0 -4
- data/generators/flexi_scaffold/templates/tests/testunit/actions/update.rb +0 -11
- data/generators/flexi_scaffold/templates/tests/testunit/controller.rb +0 -5
- data/generators/flexi_scaffold/templates/tests/testunit/model.rb +0 -7
- data/generators/flexi_scaffold/templates/views/erb/_form.html.erb +0 -6
- data/generators/flexi_scaffold/templates/views/erb/edit.html.erb +0 -8
- data/generators/flexi_scaffold/templates/views/erb/index.html.erb +0 -41
- data/generators/flexi_scaffold/templates/views/erb/new.html.erb +0 -10
- data/generators/flexi_scaffold/templates/views/erb/show.html.erb +0 -19
- data/generators/flexi_scaffold/templates/views/haml/_form.html.haml +0 -10
- data/generators/flexi_scaffold/templates/views/haml/edit.html.haml +0 -14
- data/generators/flexi_scaffold/templates/views/haml/index.html.haml +0 -25
- data/generators/flexi_scaffold/templates/views/haml/new.html.haml +0 -7
- data/generators/flexi_scaffold/templates/views/haml/show.html.haml +0 -20
- data/test/test_helper.rb +0 -3
@@ -0,0 +1,42 @@
|
|
1
|
+
module ApplicationHelper
|
2
|
+
def title(page_title, show_title = true)
|
3
|
+
content_for(:title) { page_title.to_s }
|
4
|
+
@show_title = show_title
|
5
|
+
end
|
6
|
+
|
7
|
+
def show_title?
|
8
|
+
@show_title
|
9
|
+
end
|
10
|
+
|
11
|
+
def stylesheet(*args)
|
12
|
+
content_for(:head) { stylesheet_link_tag(*args) }
|
13
|
+
end
|
14
|
+
|
15
|
+
def javascript(*args)
|
16
|
+
content_for(:head) { javascript_include_tag(*args) }
|
17
|
+
end
|
18
|
+
|
19
|
+
def flash_messages
|
20
|
+
flash.collect do |key, value|
|
21
|
+
content_tag(:div, value, :class=>"flash_messages #{key}")
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def analytics(site_id)
|
26
|
+
html = <<-ANALYTICS
|
27
|
+
<script>
|
28
|
+
var _gaq = [['_setAccount', '#{site_id}'], ['_trackPageview']];
|
29
|
+
(function(d, t) {
|
30
|
+
var g = d.createElement(t),
|
31
|
+
s = d.getElementsByTagName(t)[0];
|
32
|
+
g.async = true;
|
33
|
+
g.src = '//www.google-analytics.com/ga.js';
|
34
|
+
s.parentNode.insertBefore(g, s);
|
35
|
+
})(document, 'script');
|
36
|
+
</script>
|
37
|
+
ANALYTICS
|
38
|
+
|
39
|
+
html.html_safe
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/{generators/flexi_layout → lib/generators/flexi_prepare}/templates/custom_field_error.rb
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
#Personalizando mensagens de erro
|
2
2
|
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
|
3
|
-
error_style = "background-color
|
3
|
+
error_style = "background-color:#FFEBEB;border-color:#E17984;"
|
4
4
|
if html_tag =~ /<(input|textarea|select)[^>]+style=/
|
5
5
|
style_attribute = html_tag =~ /style=['"]/
|
6
6
|
html_tag.insert(style_attribute + 7, "#{error_style}; ")
|
Binary file
|
Binary file
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# Infelizmente não é possível colocar todas as regras...
|
2
|
+
#
|
3
|
+
# http://pt.wikipedia.org/wiki/Plural e
|
4
|
+
# http://pt.wikipedia.org/wiki/Singular
|
5
|
+
|
6
|
+
ActiveSupport::Inflector.inflections do |inflect|
|
7
|
+
inflect.clear
|
8
|
+
inflect.plural(/$/, 's')
|
9
|
+
inflect.plural(/(s)$/i, '\1')
|
10
|
+
inflect.plural(/^(paí)s$/i, '\1ses')
|
11
|
+
#inflect.plural(/(z|r)$/i, '\1es')
|
12
|
+
inflect.plural(/al$/i, 'ais')
|
13
|
+
inflect.plural(/el$/i, 'eis')
|
14
|
+
inflect.plural(/ol$/i, 'ois')
|
15
|
+
inflect.plural(/ul$/i, 'uis')
|
16
|
+
inflect.plural(/([^aeou])il$/i, '\1is')
|
17
|
+
inflect.plural(/m$/i, 'ns')
|
18
|
+
inflect.plural(/^(japon|escoc|ingl|dinamarqu|fregu|portugu)ês$/i, '\1eses')
|
19
|
+
inflect.plural(/^(|g)ás$/i, '\1ases')
|
20
|
+
inflect.plural(/ão$/i, 'ões')
|
21
|
+
inflect.plural(/^(irm|m)ão$/i, '\1ãos')
|
22
|
+
inflect.plural(/^(alem|c|p)ão$/i, '\1ães')
|
23
|
+
inflect.plural(/or$/i, 'ores')
|
24
|
+
# Sem acentos...
|
25
|
+
inflect.plural(/ao$/i, 'oes')
|
26
|
+
inflect.plural(/^(irm|m)ao$/i, '\1aos')
|
27
|
+
inflect.plural(/^(alem|c|p)ao$/i, '\1aes')
|
28
|
+
|
29
|
+
inflect.singular(/ores$/i, 'or')
|
30
|
+
inflect.singular(/([^ê])s$/i, '\1')
|
31
|
+
inflect.singular(/^(á|gá|paí)s$/i, '\1s')
|
32
|
+
inflect.singular(/(r|z)es$/i, '\1')
|
33
|
+
inflect.singular(/([^p])ais$/i, '\1al')
|
34
|
+
inflect.singular(/eis$/i, 'el')
|
35
|
+
inflect.singular(/ois$/i, 'ol')
|
36
|
+
inflect.singular(/uis$/i, 'ul')
|
37
|
+
inflect.singular(/(r|t|f|v)is$/i, '\1il')
|
38
|
+
inflect.singular(/ns$/i, 'm')
|
39
|
+
inflect.singular(/sses$/i, 'sse')
|
40
|
+
inflect.singular(/^(.*[^s]s)es$/i, '\1')
|
41
|
+
inflect.singular(/ães$/i, 'ão')
|
42
|
+
inflect.singular(/aes$/i, 'ao')
|
43
|
+
inflect.singular(/ãos$/i, 'ão')
|
44
|
+
inflect.singular(/aos$/i, 'ao')
|
45
|
+
inflect.singular(/ões$/i, 'ão')
|
46
|
+
inflect.singular(/oes$/i, 'ao')
|
47
|
+
inflect.singular(/(japon|escoc|ingl|dinamarqu|fregu|portugu)eses$/i, '\1ês')
|
48
|
+
inflect.singular(/^(g|)ases$/i, '\1ás')
|
49
|
+
#irregulares
|
50
|
+
#irregulares = {'país' => 'paises'}
|
51
|
+
#
|
52
|
+
#
|
53
|
+
#irregulares.each do |key, value|
|
54
|
+
# inflect.plural(/^#{key.to_s}$/, value)
|
55
|
+
# inflect.singular(/^#{value}$/, key.to_s)
|
56
|
+
#end
|
57
|
+
inflect.uncountable %w( tórax tênis ônibus lápis fênix )
|
58
|
+
end
|
59
|
+
|
@@ -0,0 +1,142 @@
|
|
1
|
+
html { background: url('/images/bg.png');}
|
2
|
+
body {
|
3
|
+
margin:0;
|
4
|
+
padding:0;
|
5
|
+
background: url('/images/bg2.png') repeat-x top;
|
6
|
+
font-family: Arial,Helvetica,sans-serif;
|
7
|
+
font-size: 13px;
|
8
|
+
color: #333333;
|
9
|
+
}
|
10
|
+
a {text-decoration: none;}
|
11
|
+
a:hover {text-decoration: underline;}
|
12
|
+
input[type=text],input[type=password],input[type=file],select,textarea {
|
13
|
+
padding: 5px;
|
14
|
+
border-top: solid 1px #c4c4c4;
|
15
|
+
border-left: solid 1px #e9e9e9;
|
16
|
+
border-bottom: solid 1px #e9e9e9;
|
17
|
+
border-right: solid 1px #c4c4c4;
|
18
|
+
-moz-border-radius:5px;
|
19
|
+
width: 97%;
|
20
|
+
}
|
21
|
+
div#logo{ padding-top:40px; padding-bottom: 10px; text-align:center; }
|
22
|
+
div#control_box { padding:1px; text-align:center; }
|
23
|
+
div#title_box {
|
24
|
+
background-color:#F3F3F3;
|
25
|
+
border:1px solid #E5E5E5;
|
26
|
+
padding:1px;
|
27
|
+
text-align:center;
|
28
|
+
}
|
29
|
+
label { font-weight:bold;}
|
30
|
+
h1, h2 { padding:2px; margin:2px; }
|
31
|
+
a img { border: none; }
|
32
|
+
a { color: #0000FF; }
|
33
|
+
.clear { clear: both; height: 0; overflow: hidden; }
|
34
|
+
#main{
|
35
|
+
width: 633px;
|
36
|
+
float:right;
|
37
|
+
padding: 0 ;
|
38
|
+
margin:0;
|
39
|
+
}
|
40
|
+
#container {
|
41
|
+
width: 400px;
|
42
|
+
overflow: auto;
|
43
|
+
margin: 0 auto;
|
44
|
+
margin-top: 10px;
|
45
|
+
}
|
46
|
+
.login_box{padding-top:20px;padding-bottom:20px;}
|
47
|
+
|
48
|
+
/* Box */
|
49
|
+
.box {
|
50
|
+
background:#fff;
|
51
|
+
border:1px solid #c5c5c5;
|
52
|
+
margin-bottom:15px;
|
53
|
+
padding:15px;
|
54
|
+
border-top:0;
|
55
|
+
-moz-border-radius-bottomleft :5px;
|
56
|
+
-moz-border-radius-bottomright :5px;
|
57
|
+
-webkit-border-bottom-left-radius:5px;
|
58
|
+
-webkit-border-bottom-right-radius:5px;
|
59
|
+
}
|
60
|
+
.box-header {
|
61
|
+
border:1px solid #c5c5c5;
|
62
|
+
font-weight:bold;
|
63
|
+
font-size:14px;
|
64
|
+
text-align:center;
|
65
|
+
background:#e2e2e2 url('/images/boxheader.gif') repeat-x top;
|
66
|
+
padding:10px 15px;
|
67
|
+
color:#333333;
|
68
|
+
text-shadow:1px 1px 1px #FFFFFF;
|
69
|
+
-moz-border-radius-topleft:5px;
|
70
|
+
-webkit-border-top-left-radius:5px;
|
71
|
+
-moz-border-radius-topright:5px;
|
72
|
+
-webkit-border-top-right-radius:5px;
|
73
|
+
}
|
74
|
+
|
75
|
+
/* Buttons */
|
76
|
+
.button {
|
77
|
+
cursor:pointer;
|
78
|
+
display:inline-block;
|
79
|
+
font:14px/100% Arial, Helvetica, sans-serif;
|
80
|
+
font-weight:bold;
|
81
|
+
margin:0 5px;
|
82
|
+
outline:none;
|
83
|
+
padding:8px 20px;
|
84
|
+
width:auto;
|
85
|
+
text-align:center;
|
86
|
+
text-decoration:none;
|
87
|
+
vertical-align:baseline;
|
88
|
+
background:#202020 url('/images/btn-bg.png') repeat-x top;
|
89
|
+
color:#fff;
|
90
|
+
border:1px solid rgba(0, 0, 0, 0.25);
|
91
|
+
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
|
92
|
+
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
|
93
|
+
text-shadow:0 -1px 1px rgba(0, 0, 0, 0.25);
|
94
|
+
-moz-border-radius:5px;
|
95
|
+
-webkit-border-radius:5px;
|
96
|
+
}
|
97
|
+
.button:hover {
|
98
|
+
background-image: url('/images/btn-bg-hover.png');
|
99
|
+
text-decoration:none;
|
100
|
+
outline:none;
|
101
|
+
}
|
102
|
+
.button:active {
|
103
|
+
position:relative;
|
104
|
+
top:1px;
|
105
|
+
outline:none;
|
106
|
+
}
|
107
|
+
.button.blue { background-color:#398BD1; }
|
108
|
+
.button.green { background-color:#97d139; }
|
109
|
+
.button.red { background-color:#d13a39; }
|
110
|
+
.button.grey {
|
111
|
+
background-color:#eee;
|
112
|
+
color:#4d4d4d;
|
113
|
+
text-shadow:0 -1px 1px #fff;
|
114
|
+
}
|
115
|
+
.button.medium {
|
116
|
+
font-size:12px;
|
117
|
+
padding:5px 15px;
|
118
|
+
}
|
119
|
+
.button.small {
|
120
|
+
font-size:11px;
|
121
|
+
padding:3px 10px;
|
122
|
+
width:auto;
|
123
|
+
}
|
124
|
+
|
125
|
+
.flash_messages {
|
126
|
+
border-width:1px;
|
127
|
+
border-style:solid;
|
128
|
+
padding:17px 17px 17px 55px;
|
129
|
+
margin-bottom:10px;
|
130
|
+
-moz-border-radius:5px;
|
131
|
+
-webkit-border:5px;
|
132
|
+
border-radius:5px;
|
133
|
+
-moz-box-shadow:1px 1px rgba(255, 255, 255, 0.6) inset;
|
134
|
+
-webkit-box-shadow:1px 1px rgba(255, 255, 255, 0.6) inset;
|
135
|
+
font-weight:bold;
|
136
|
+
}
|
137
|
+
|
138
|
+
.flash_messages.error {
|
139
|
+
background:#fecdc6 url('/images/messages/error.png') no-repeat 10px 10px;
|
140
|
+
border-color:#E17984;
|
141
|
+
color:#9E0B0F;
|
142
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
5
|
+
<title><%%= "Área administrativa - #{ yield(:title) }" %></title>
|
6
|
+
<%%= stylesheet_link_tag 'login' %>
|
7
|
+
<%%= yield(:head) %>
|
8
|
+
<%%= csrf_meta_tag %>
|
9
|
+
</head>
|
10
|
+
<body>
|
11
|
+
<div id="logo">
|
12
|
+
<%%= image_tag("logo.png") %>
|
13
|
+
</div>
|
14
|
+
<div id="container">
|
15
|
+
<div class="box-header">
|
16
|
+
<%% if show_title? %>
|
17
|
+
<h2><%%= yield(:title) %></h2>
|
18
|
+
<%% end %>
|
19
|
+
</div>
|
20
|
+
<div class="box">
|
21
|
+
<%%= raw flash_messages %>
|
22
|
+
<%%= yield %>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,204 @@
|
|
1
|
+
pt-BR:
|
2
|
+
number:
|
3
|
+
format:
|
4
|
+
precision: 3
|
5
|
+
separator: ','
|
6
|
+
delimiter: '.'
|
7
|
+
significant: false
|
8
|
+
strip_insignificant_zeros: false
|
9
|
+
|
10
|
+
currency:
|
11
|
+
format:
|
12
|
+
format: '%u %n'
|
13
|
+
unit: 'R$'
|
14
|
+
separator: ','
|
15
|
+
delimiter: '.'
|
16
|
+
precision: 2
|
17
|
+
significant: false
|
18
|
+
strip_insignificant_zeros: false
|
19
|
+
|
20
|
+
percentage:
|
21
|
+
format:
|
22
|
+
delimiter: "."
|
23
|
+
|
24
|
+
precision:
|
25
|
+
format:
|
26
|
+
delimiter: "."
|
27
|
+
|
28
|
+
human:
|
29
|
+
format:
|
30
|
+
delimiter: ""
|
31
|
+
precision: 3
|
32
|
+
significant: true
|
33
|
+
strip_insignificant_zeros: true
|
34
|
+
|
35
|
+
storage_units:
|
36
|
+
format: "%n %u"
|
37
|
+
units:
|
38
|
+
byte:
|
39
|
+
one: "Byte"
|
40
|
+
other: "Bytes"
|
41
|
+
kb: "KB"
|
42
|
+
mb: "MB"
|
43
|
+
gb: "GB"
|
44
|
+
tb: "TB"
|
45
|
+
|
46
|
+
decimal_units:
|
47
|
+
format: "%n %u"
|
48
|
+
units:
|
49
|
+
unit: ""
|
50
|
+
thousand: "mil"
|
51
|
+
million:
|
52
|
+
one: milhão
|
53
|
+
other: milhões
|
54
|
+
billion:
|
55
|
+
one: bilhão
|
56
|
+
other: bilhões
|
57
|
+
trillion:
|
58
|
+
one: trilhão
|
59
|
+
other: trilhões
|
60
|
+
quadrillion:
|
61
|
+
one: quatrilhão
|
62
|
+
other: quatrilhões
|
63
|
+
|
64
|
+
date:
|
65
|
+
formats:
|
66
|
+
default: "%d/%m/%Y"
|
67
|
+
short: "%d de %B"
|
68
|
+
long: "%d de %B de %Y"
|
69
|
+
|
70
|
+
day_names: [Domingo, Segunda, Terça, Quarta, Quinta, Sexta, Sábado]
|
71
|
+
abbr_day_names: [Dom, Seg, Ter, Qua, Qui, Sex, Sáb]
|
72
|
+
|
73
|
+
month_names: [~, Janeiro, Fevereiro, Março, Abril, Maio, Junho, Julho, Agosto, Setembro, Outubro, Novembro, Dezembro]
|
74
|
+
abbr_month_names: [~, Jan, Fev, Mar, Abr, Mai, Jun, Jul, Ago, Set, Out, Nov, Dez]
|
75
|
+
|
76
|
+
order:
|
77
|
+
- :day
|
78
|
+
- :month
|
79
|
+
- :year
|
80
|
+
|
81
|
+
time:
|
82
|
+
formats:
|
83
|
+
default: "%A, %d de %B de %Y, %H:%M h"
|
84
|
+
short: "%d/%m, %H:%M h"
|
85
|
+
long: "%A, %d de %B de %Y, %H:%M h"
|
86
|
+
am: ""
|
87
|
+
pm: ""
|
88
|
+
|
89
|
+
datetime:
|
90
|
+
distance_in_words:
|
91
|
+
half_a_minute: 'meio minuto'
|
92
|
+
less_than_x_seconds:
|
93
|
+
one: 'menos de 1 segundo'
|
94
|
+
other: 'menos de %{count} segundos'
|
95
|
+
|
96
|
+
x_seconds:
|
97
|
+
one: '1 segundo'
|
98
|
+
other: '%{count} segundos'
|
99
|
+
|
100
|
+
less_than_x_minutes:
|
101
|
+
one: 'menos de um minuto'
|
102
|
+
other: 'menos de %{count} minutos'
|
103
|
+
|
104
|
+
x_minutes:
|
105
|
+
one: '1 minuto'
|
106
|
+
other: '%{count} minutos'
|
107
|
+
|
108
|
+
about_x_hours:
|
109
|
+
one: 'aproximadamente 1 hora'
|
110
|
+
other: 'aproximadamente %{count} horas'
|
111
|
+
|
112
|
+
x_days:
|
113
|
+
one: '1 dia'
|
114
|
+
other: '%{count} dias'
|
115
|
+
|
116
|
+
about_x_months:
|
117
|
+
one: 'aproximadamente 1 mês'
|
118
|
+
other: 'aproximadamente %{count} meses'
|
119
|
+
|
120
|
+
x_months:
|
121
|
+
one: '1 mês'
|
122
|
+
other: '%{count} meses'
|
123
|
+
|
124
|
+
about_x_years:
|
125
|
+
one: 'aproximadamente 1 ano'
|
126
|
+
other: 'aproximadamente %{count} anos'
|
127
|
+
|
128
|
+
over_x_years:
|
129
|
+
one: 'mais de 1 ano'
|
130
|
+
other: 'mais de %{count} anos'
|
131
|
+
|
132
|
+
almost_x_years:
|
133
|
+
one: 'quase 1 ano'
|
134
|
+
other: 'quase %{count} anos'
|
135
|
+
|
136
|
+
prompts:
|
137
|
+
year: "Ano"
|
138
|
+
month: "Mês"
|
139
|
+
day: "Dia"
|
140
|
+
hour: "Hora"
|
141
|
+
minute: "Minuto"
|
142
|
+
second: "Segundos"
|
143
|
+
|
144
|
+
support:
|
145
|
+
array:
|
146
|
+
words_connector: ", "
|
147
|
+
two_words_connector: " e "
|
148
|
+
last_word_connector: " e "
|
149
|
+
|
150
|
+
helpers:
|
151
|
+
select:
|
152
|
+
prompt: "Selecione"
|
153
|
+
|
154
|
+
submit:
|
155
|
+
create: 'Criar %{model}'
|
156
|
+
update: 'Alterar %{model}'
|
157
|
+
submit: 'Gravar %{model}'
|
158
|
+
|
159
|
+
errors:
|
160
|
+
format: "%{attribute} %{message}"
|
161
|
+
|
162
|
+
messages:
|
163
|
+
inclusion: "não está incluído na lista"
|
164
|
+
exclusion: "não está disponível"
|
165
|
+
invalid: "não é válido"
|
166
|
+
confirmation: "não está de acordo com a confirmação"
|
167
|
+
accepted: "deve ser aceito"
|
168
|
+
empty: "não pode ficar vazio"
|
169
|
+
blank: "não pode ficar em branco"
|
170
|
+
too_long: "é muito longo (máximo: %{count} caracteres)"
|
171
|
+
too_short: "é muito curto (mínimo: %{count} caracteres)"
|
172
|
+
wrong_length: "não possui o tamanho esperado (%{count} caracteres)"
|
173
|
+
not_a_number: "não é um número"
|
174
|
+
not_an_integer: "não é um número inteiro"
|
175
|
+
greater_than: "deve ser maior do que %{count}"
|
176
|
+
greater_than_or_equal_to: "deve ser maior ou igual a %{count}"
|
177
|
+
equal_to: "deve ser igual a %{count}"
|
178
|
+
less_than: "deve ser menor do que %{count}"
|
179
|
+
less_than_or_equal_to: "deve ser menor ou igual a %{count}"
|
180
|
+
odd: "deve ser ímpar"
|
181
|
+
even: "deve ser par"
|
182
|
+
|
183
|
+
attributes:
|
184
|
+
created_at: "Criado em"
|
185
|
+
updated_at: "Atulizado em"
|
186
|
+
|
187
|
+
activerecord:
|
188
|
+
errors:
|
189
|
+
messages:
|
190
|
+
taken: "já está em uso"
|
191
|
+
record_invalid: "A validação falhou: %{errors}"
|
192
|
+
models:
|
193
|
+
user: Usuários
|
194
|
+
attributes:
|
195
|
+
user:
|
196
|
+
username: Usuário
|
197
|
+
email: E-mail
|
198
|
+
password: Senha
|
199
|
+
password_confirmation: Confirmar Senha
|
200
|
+
|
201
|
+
authlogic:
|
202
|
+
error_messages:
|
203
|
+
email_invalid: endereço de e-mail invávildo
|
204
|
+
login_invalid: use somente letras, númeroe, espaços e .-_@
|
Binary file
|
@@ -1,34 +1,28 @@
|
|
1
|
-
|
2
|
-
a {text-decoration: none;}
|
3
|
-
a:hover {text-decoration: underline;}
|
4
|
-
|
1
|
+
html { background: url('/images/bg.png');}
|
5
2
|
body {
|
6
|
-
|
3
|
+
margin:0;
|
4
|
+
padding:0;
|
5
|
+
background: url('/images/bg2.png') repeat-x top;
|
7
6
|
font-family: Arial,Helvetica,sans-serif;
|
8
7
|
font-size: 13px;
|
9
8
|
color: #333333;
|
10
|
-
background-image:url(../images/bg.png);
|
11
|
-
background-repeat:repeat-x;
|
12
9
|
}
|
13
|
-
|
14
|
-
|
15
|
-
|
10
|
+
a {text-decoration: none;}
|
11
|
+
a:hover {text-decoration: underline;}
|
12
|
+
div#header{ width: 800px; margin: 0 auto; padding-top: 10px; }
|
16
13
|
div#control_box {
|
17
14
|
background-color:#F3F3F3;
|
18
15
|
border:1px solid #E5E5E5;
|
19
16
|
padding:1px;
|
20
17
|
text-align:center;
|
21
18
|
}
|
22
|
-
|
23
19
|
div#title_box {
|
24
20
|
background-color:#F3F3F3;
|
25
21
|
border:1px solid #E5E5E5;
|
26
22
|
padding:1px;
|
27
23
|
text-align:center;
|
28
24
|
}
|
29
|
-
|
30
25
|
div#new_box { padding:15px 5px 5px 5px; }
|
31
|
-
|
32
26
|
.edit{color:#C5A059;}
|
33
27
|
.delete{color:#A02B2B;}
|
34
28
|
.new{
|
@@ -39,25 +33,40 @@ div#new_box { padding:15px 5px 5px 5px; }
|
|
39
33
|
padding-left: 17px;
|
40
34
|
color: #55A34A
|
41
35
|
}
|
42
|
-
|
43
36
|
.pagination{ margin-top: 15px; text-align: center; }
|
44
|
-
|
45
37
|
label { font-weight:bold; }
|
46
|
-
|
47
38
|
h1, h2 { padding:2px; margin:2px; }
|
48
|
-
|
49
39
|
a img { border: none; }
|
50
|
-
|
51
40
|
a { color: #0000FF; }
|
52
|
-
|
53
41
|
.clear { clear: both; height: 0; overflow: hidden; }
|
54
|
-
|
55
42
|
#container {
|
56
43
|
width: 800px;
|
57
44
|
overflow: auto;
|
58
45
|
margin: 0 auto;
|
59
|
-
background-color: #FFF;
|
60
46
|
margin-top: 10px;
|
61
|
-
|
62
|
-
|
47
|
+
}
|
48
|
+
/* Box */
|
49
|
+
.box {
|
50
|
+
background:#fff;
|
51
|
+
border:1px solid #c5c5c5;
|
52
|
+
margin-bottom:15px;
|
53
|
+
padding:15px;
|
54
|
+
border-top:0;
|
55
|
+
-moz-border-radius-bottomleft :5px;
|
56
|
+
-moz-border-radius-bottomright :5px;
|
57
|
+
-webkit-border-bottom-left-radius:5px;
|
58
|
+
-webkit-border-bottom-right-radius:5px;
|
59
|
+
}
|
60
|
+
.box-header {
|
61
|
+
border:1px solid #c5c5c5;
|
62
|
+
font-weight:bold;
|
63
|
+
font-size:14px;
|
64
|
+
background:#e2e2e2 url('/images/boxheader.gif') repeat-x top;
|
65
|
+
padding:10px 15px;
|
66
|
+
color:#333333;
|
67
|
+
text-shadow:1px 1px 1px #FFFFFF;
|
68
|
+
-moz-border-radius-topleft:5px;
|
69
|
+
-webkit-border-top-left-radius:5px;
|
70
|
+
-moz-border-radius-topright:5px;
|
71
|
+
-webkit-border-top-right-radius:5px;
|
63
72
|
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
5
|
+
<title><%%= "Página inicial - #{ yield(:title) }" %></title>
|
6
|
+
<%%= stylesheet_link_tag 'site' %>
|
7
|
+
<%%= yield(:head) %>
|
8
|
+
<%%= csrf_meta_tag %>
|
9
|
+
</head>
|
10
|
+
<body>
|
11
|
+
<div id="header">
|
12
|
+
<%%= link_to image_tag("logo.png"), root_path %>
|
13
|
+
</div>
|
14
|
+
<div id="container">
|
15
|
+
<%%= raw flash_messages %>
|
16
|
+
<%%= yield %>
|
17
|
+
</div>
|
18
|
+
<%%= analytics "UA-XXXXX" %>
|
19
|
+
</body>
|
20
|
+
</html>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<%% title("Site#index") %>
|
2
|
+
<div class="box-header">
|
3
|
+
<h1>Primeiros passos</h1>
|
4
|
+
</div>
|
5
|
+
<div class="box">
|
6
|
+
<ul>
|
7
|
+
<li>
|
8
|
+
<h2>Edite este layout em app/views/layouts/site.html.erb</h2>
|
9
|
+
<p>Crie seu layout, altere o logo e estilos.</p>
|
10
|
+
</li>
|
11
|
+
<li>
|
12
|
+
<h2>Edite esta página em app/views/site/index.html.erb</h2>
|
13
|
+
<p>Crie sua página inicial.</p>
|
14
|
+
</li>
|
15
|
+
<li>
|
16
|
+
<h2>Gere o cadastro de usuários e autenticação</h2>
|
17
|
+
<p>rails g flexi_auth</p>
|
18
|
+
<p>rake db:migrate</p>
|
19
|
+
<p>rake db:seed</p>
|
20
|
+
</li>
|
21
|
+
<li>
|
22
|
+
<h2>Depois acesse a área administrativa <a href="/admin">aqui</a></h2>
|
23
|
+
<p>Usuário: admin</p>
|
24
|
+
<p>Senha: admin123</p>
|
25
|
+
</li>
|
26
|
+
</ul>
|
27
|
+
</div>
|
File without changes
|