squeezer 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/{lib/app → app}/controllers/application_controller.rb +0 -0
- data/{lib/app → app}/controllers/blogs_controller.rb +0 -0
- data/{lib/app → app}/controllers/comments_controller.rb +0 -0
- data/{lib/app → app}/controllers/pages_controller.rb +0 -0
- data/{lib/app → app}/controllers/posts_controller.rb +0 -0
- data/{lib/app → app}/controllers/roles_controller.rb +0 -0
- data/{lib/app → app}/controllers/sites_controller.rb +0 -0
- data/{lib/app → app}/controllers/users_controller.rb +0 -0
- data/{lib/app → app}/helpers/squeezer_helper.rb +0 -0
- data/{lib/app → app}/models/ability.rb +0 -0
- data/{lib/app → app}/models/blog.rb +0 -0
- data/{lib/app → app}/models/comment.rb +0 -0
- data/{lib/app → app}/models/page.rb +0 -0
- data/{lib/app → app}/models/post.rb +0 -0
- data/{lib/app → app}/models/role.rb +0 -0
- data/{lib/app → app}/models/site.rb +0 -0
- data/{lib/app → app}/models/user.rb +0 -0
- data/{lib/app → app}/views/blogs/_entry.haml +0 -0
- data/{lib/app → app}/views/blogs/_form.html.haml +0 -0
- data/{lib/app → app}/views/blogs/edit.html.haml +0 -0
- data/{lib/app → app}/views/blogs/index.html.haml +0 -0
- data/{lib/app → app}/views/blogs/new.html.haml +0 -0
- data/{lib/app → app}/views/blogs/show.html.haml +0 -0
- data/{lib/app → app}/views/comments/_form.html.haml +0 -0
- data/{lib/app → app}/views/comments/_index.html.haml +0 -0
- data/{lib/app → app}/views/comments/_post.html.haml +0 -0
- data/{lib/app → app}/views/comments/show.js.erb +0 -0
- data/{lib/app → app}/views/layouts/_footer.html.haml +0 -0
- data/{lib/app → app}/views/layouts/_login.haml +0 -0
- data/{lib/app → app}/views/layouts/_menu.html.haml +0 -0
- data/{lib/app → app}/views/layouts/_msn.haml +0 -0
- data/{lib/app → app}/views/layouts/_sidebar.html.haml +0 -0
- data/{lib/app → app}/views/layouts/application.html.erb +0 -0
- data/{lib/app → app}/views/layouts/ice/squeezer/_ice.haml +0 -0
- data/{lib/app → app}/views/layouts/ice/squeezer/ice/_ice.haml +0 -0
- data/{lib/app → app}/views/layouts/ice/squeezer/ice/squeezer/_ice.haml +0 -0
- data/{lib/app → app}/views/layouts/ice/squeezer/ice/squeezer/ice/_ice.haml +0 -0
- data/{lib/app → app}/views/layouts/ice/squeezer/ice/squeezer/ice/squeezer/_ice.haml +0 -0
- data/{lib/app → app}/views/layouts/squeezer/ice/_ice.haml +0 -0
- data/{lib/app → app}/views/layouts/squeezer/ice/squeezer/_ice.haml +0 -0
- data/{lib/app → app}/views/layouts/squeezer/ice/squeezer/ice/_ice.haml +0 -0
- data/{lib/app → app}/views/layouts/squeezer/ice/squeezer/ice/squeezer/_ice.haml +0 -0
- data/{lib/app → app}/views/layouts/squeezer/squeezer.css +0 -0
- data/{lib/app → app}/views/pages/_form.html.haml +0 -0
- data/{lib/app → app}/views/pages/edit.html.haml +0 -0
- data/{lib/app → app}/views/pages/index.html.haml +0 -0
- data/{lib/app → app}/views/pages/new.html.haml +0 -0
- data/{lib/app → app}/views/pages/show.html.haml +0 -0
- data/{lib/app → app}/views/roles/_form.html.haml +0 -0
- data/{lib/app → app}/views/roles/edit.html.haml +0 -0
- data/{lib/app → app}/views/roles/index.html.haml +0 -0
- data/{lib/app → app}/views/roles/new.html.haml +0 -0
- data/{lib/app → app}/views/roles/show.html.haml +0 -0
- data/{lib/app → app}/views/sites/_form.html.haml +0 -0
- data/{lib/app → app}/views/sites/edit.html.haml +0 -0
- data/{lib/app → app}/views/sites/index.html.haml +0 -0
- data/{lib/app → app}/views/sites/new.html.haml +0 -0
- data/{lib/app → app}/views/sites/show.html.haml +0 -0
- data/{lib/app → app}/views/users/index.haml +0 -0
- data/{lib/app → app}/views/users/roles.haml +0 -0
- data/{lib/app → app}/views/users/show.haml +0 -0
- data/lib/generators/squeezer/Gemfile +37 -0
- data/lib/generators/squeezer/README +2 -0
- data/lib/generators/squeezer/USAGE +7 -0
- data/lib/generators/squeezer/squeezer_generator.rb +114 -0
- data/lib/generators/squeezer/templates/Gemfile +37 -0
- data/lib/generators/squeezer/templates/app/controllers/application_controller.rb +25 -0
- data/lib/{blogs_controller.rb → generators/squeezer/templates/app/controllers/blogs_controller.rb} +0 -0
- data/lib/generators/squeezer/templates/app/controllers/comments_controller.rb +37 -0
- data/lib/generators/squeezer/templates/app/controllers/forums_controller.rb +42 -0
- data/lib/generators/squeezer/templates/app/controllers/pages_controller.rb +3 -0
- data/lib/generators/squeezer/templates/app/controllers/posts_controller.rb +23 -0
- data/lib/generators/squeezer/templates/app/controllers/roles_controller.rb +3 -0
- data/lib/generators/squeezer/templates/app/controllers/sites_controller.rb +70 -0
- data/lib/generators/squeezer/templates/app/controllers/topics_controller.rb +46 -0
- data/lib/generators/squeezer/templates/app/controllers/users_controller.rb +22 -0
- data/lib/generators/squeezer/templates/app/helpers/application_helper.rb +66 -0
- data/lib/generators/squeezer/templates/app/helpers/blogs_helper.rb +2 -0
- data/lib/generators/squeezer/templates/app/helpers/layout_helper.rb +71 -0
- data/lib/generators/squeezer/templates/app/helpers/pages_helper.rb +2 -0
- data/lib/generators/squeezer/templates/app/models/ability.rb +17 -0
- data/lib/generators/squeezer/templates/app/models/blog.rb +6 -0
- data/lib/generators/squeezer/templates/app/models/comment.rb +4 -0
- data/lib/generators/squeezer/templates/app/models/forum.rb +5 -0
- data/lib/generators/squeezer/templates/app/models/isntall.rb +9 -0
- data/lib/generators/squeezer/templates/app/models/page.rb +3 -0
- data/lib/generators/squeezer/templates/app/models/post.rb +12 -0
- data/lib/generators/squeezer/templates/app/models/role.rb +3 -0
- data/lib/generators/squeezer/templates/app/models/site.rb +17 -0
- data/lib/generators/squeezer/templates/app/models/topic.rb +6 -0
- data/lib/generators/squeezer/templates/app/models/user.rb +35 -0
- data/lib/generators/squeezer/templates/app/views/blogs/_entry.haml +26 -0
- data/lib/generators/squeezer/templates/app/views/blogs/_form.html.haml +15 -0
- data/lib/generators/squeezer/templates/app/views/blogs/edit.html.haml +8 -0
- data/lib/generators/squeezer/templates/app/views/blogs/index.html.haml +8 -0
- data/lib/generators/squeezer/templates/app/views/blogs/new.html.haml +5 -0
- data/lib/generators/squeezer/templates/app/views/blogs/show.html.haml +4 -0
- data/lib/generators/squeezer/templates/app/views/comments/_form.html.erb +5 -0
- data/lib/generators/squeezer/templates/app/views/comments/_form.html.haml +19 -0
- data/lib/generators/squeezer/templates/app/views/comments/_index.html.haml +26 -0
- data/lib/generators/squeezer/templates/app/views/comments/_post.html.haml +19 -0
- data/lib/generators/squeezer/templates/app/views/comments/_post2.haml +14 -0
- data/lib/generators/squeezer/templates/app/views/comments/edit.haml +7 -0
- data/lib/generators/squeezer/templates/app/views/comments/show.js.erb +1 -0
- data/lib/generators/squeezer/templates/app/views/confirmations/new.html.erb +12 -0
- data/lib/generators/squeezer/templates/app/views/devise/confirmations/new.html.erb +12 -0
- data/lib/generators/squeezer/templates/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/lib/generators/squeezer/templates/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/lib/generators/squeezer/templates/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/lib/generators/squeezer/templates/app/views/devise/passwords/edit.html.erb +16 -0
- data/lib/generators/squeezer/templates/app/views/devise/passwords/new.html.erb +12 -0
- data/lib/generators/squeezer/templates/app/views/devise/registrations/edit.html.erb +28 -0
- data/lib/generators/squeezer/templates/app/views/devise/registrations/new.html.erb +21 -0
- data/lib/generators/squeezer/templates/app/views/devise/sessions/new.html.erb +17 -0
- data/lib/generators/squeezer/templates/app/views/devise/shared/_links.erb +19 -0
- data/lib/generators/squeezer/templates/app/views/devise/unlocks/new.html.erb +12 -0
- data/lib/generators/squeezer/templates/app/views/devise_mailer/confirmation_instructions.html.erb +5 -0
- data/lib/generators/squeezer/templates/app/views/devise_mailer/reset_password_instructions.html.erb +8 -0
- data/lib/generators/squeezer/templates/app/views/devise_mailer/unlock_instructions.html.erb +7 -0
- data/lib/generators/squeezer/templates/app/views/forums/_form.html.haml +14 -0
- data/lib/generators/squeezer/templates/app/views/forums/edit.html.haml +8 -0
- data/lib/generators/squeezer/templates/app/views/forums/index.html.haml +37 -0
- data/lib/generators/squeezer/templates/app/views/forums/new.html.haml +5 -0
- data/lib/generators/squeezer/templates/app/views/forums/show.html.haml +43 -0
- data/lib/generators/squeezer/templates/app/views/layouts/_footer.html.haml +5 -0
- data/lib/generators/squeezer/templates/app/views/layouts/_header.html.haml +10 -0
- data/lib/generators/squeezer/templates/app/views/layouts/_ice.haml +27 -0
- data/lib/generators/squeezer/templates/app/views/layouts/_latest.haml +15 -0
- data/lib/generators/squeezer/templates/app/views/layouts/_login.html.erb +9 -0
- data/lib/generators/squeezer/templates/app/views/layouts/_login.html.haml +12 -0
- data/lib/generators/squeezer/templates/app/views/layouts/_menu.html.haml +6 -0
- data/lib/generators/squeezer/templates/app/views/layouts/_msn.haml +12 -0
- data/lib/generators/squeezer/templates/app/views/layouts/_sidebar.html.haml +1 -0
- data/lib/generators/squeezer/templates/app/views/layouts/application.html.erb +14 -0
- data/lib/generators/squeezer/templates/app/views/layouts/application.html.haml +14 -0
- data/lib/generators/squeezer/templates/app/views/layouts/ice/squeezer/_ice.haml +27 -0
- data/lib/generators/squeezer/templates/app/views/pages/_form.html.haml +17 -0
- data/lib/generators/squeezer/templates/app/views/pages/edit.html.haml +8 -0
- data/lib/generators/squeezer/templates/app/views/pages/index.html.haml +22 -0
- data/lib/generators/squeezer/templates/app/views/pages/new.html.haml +5 -0
- data/lib/generators/squeezer/templates/app/views/pages/show.html.haml +12 -0
- data/lib/generators/squeezer/templates/app/views/passwords/edit.html.erb +16 -0
- data/lib/generators/squeezer/templates/app/views/passwords/new.html.erb +12 -0
- data/lib/generators/squeezer/templates/app/views/registrations/edit.html.erb +25 -0
- data/lib/generators/squeezer/templates/app/views/registrations/new.html.erb +17 -0
- data/lib/generators/squeezer/templates/app/views/roles/_form.html.haml +9 -0
- data/lib/generators/squeezer/templates/app/views/roles/edit.html.haml +7 -0
- data/lib/generators/squeezer/templates/app/views/roles/index.html.haml +19 -0
- data/lib/generators/squeezer/templates/app/views/roles/new.html.haml +5 -0
- data/lib/generators/squeezer/templates/app/views/roles/show.html.haml +13 -0
- data/lib/generators/squeezer/templates/app/views/roles/user.html.erb +14 -0
- data/lib/generators/squeezer/templates/app/views/sessions/new.html.erb +17 -0
- data/lib/generators/squeezer/templates/app/views/shared/_devise_links.erb +19 -0
- data/lib/generators/squeezer/templates/app/views/sites/_form.html.haml +42 -0
- data/lib/generators/squeezer/templates/app/views/sites/edit.html.haml +1 -0
- data/lib/generators/squeezer/templates/app/views/sites/index.html.haml +165 -0
- data/lib/generators/squeezer/templates/app/views/sites/new.html.haml +1 -0
- data/lib/generators/squeezer/templates/app/views/sites/show.html.haml +18 -0
- data/lib/generators/squeezer/templates/app/views/topics/_form.html.haml +16 -0
- data/lib/generators/squeezer/templates/app/views/topics/edit.html.erb +8 -0
- data/lib/generators/squeezer/templates/app/views/topics/index.html.haml +23 -0
- data/lib/generators/squeezer/templates/app/views/topics/new.html.erb +5 -0
- data/lib/generators/squeezer/templates/app/views/topics/show.html.haml +16 -0
- data/lib/generators/squeezer/templates/app/views/unlocks/new.html.erb +12 -0
- data/lib/generators/squeezer/templates/app/views/users/index.haml +5 -0
- data/lib/generators/squeezer/templates/app/views/users/roles.haml +14 -0
- data/lib/generators/squeezer/templates/config/devise.rb +142 -0
- data/lib/generators/squeezer/templates/db/migrate/add_username_user.rb +11 -0
- data/lib/generators/squeezer/templates/db/migrate/blogs.rb +15 -0
- data/lib/generators/squeezer/templates/db/migrate/comments.rb +15 -0
- data/lib/generators/squeezer/templates/db/migrate/create_blogs.rb +15 -0
- data/lib/generators/squeezer/templates/db/migrate/create_comments.rb +15 -0
- data/lib/generators/squeezer/templates/db/migrate/create_pages.rb +16 -0
- data/lib/generators/squeezer/templates/db/migrate/create_posts.rb +16 -0
- data/lib/generators/squeezer/templates/db/migrate/create_roles.rb +13 -0
- data/lib/generators/squeezer/templates/db/migrate/create_roles_users.rb +15 -0
- data/lib/generators/squeezer/templates/db/migrate/create_sites.rb +26 -0
- data/lib/generators/squeezer/templates/db/migrate/data.rb +7 -0
- data/lib/generators/squeezer/templates/db/migrate/page_data.rb +10 -0
- data/lib/generators/squeezer/templates/db/migrate/pages.rb +16 -0
- data/lib/generators/squeezer/templates/db/migrate/posts.rb +16 -0
- data/lib/generators/squeezer/templates/db/migrate/roles.rb +13 -0
- data/lib/generators/squeezer/templates/db/migrate/roles_users.rb +15 -0
- data/lib/generators/squeezer/templates/db/migrate/sites.rb +26 -0
- data/lib/generators/squeezer/templates/db/migrate/squeez_data.rb +7 -0
- data/lib/generators/squeezer/templates/doc/clases.png +0 -0
- data/lib/generators/squeezer/templates/ice/squeezer/ice/_ice.haml +6 -0
- data/lib/generators/squeezer/templates/ice/squeezer/ice/squeezer/_ice.haml +28 -0
- data/lib/generators/squeezer/templates/ice/squeezer/ice/squeezer/ice/_ice.haml +6 -0
- data/lib/generators/squeezer/templates/ice/squeezer/ice/squeezer/ice/squeezer/_ice.haml +7 -0
- data/lib/generators/squeezer/templates/ice/squeezer/squeezer.css +252 -0
- data/lib/generators/squeezer/templates/public/javascripts/application.js +53 -0
- data/lib/generators/squeezer/templates/public/javascripts/jquery-ui.js +11437 -0
- data/lib/generators/squeezer/templates/public/javascripts/jquery-ui.min.js +401 -0
- data/lib/generators/squeezer/templates/public/javascripts/jquery.cleditor.min.js +31 -0
- data/lib/generators/squeezer/templates/public/javascripts/jquery.js +6883 -0
- data/lib/generators/squeezer/templates/public/javascripts/jquery.layout.min-1.2.0.js +80 -0
- data/lib/generators/squeezer/templates/public/javascripts/jquery.min.js +166 -0
- data/lib/generators/squeezer/templates/public/javascripts/rails.js +146 -0
- data/lib/generators/squeezer/templates/public/stylesheets/CLEditor1_3_0/images/buttons.gif +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/CLEditor1_3_0/images/toolbar.gif +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/CLEditor1_3_0/jquery.cleditor.css +24 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ice/lagota/ice/_ice.haml +6 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ice/lagota/lagota.css +284 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ice/squeezer/ice/_ice.haml +6 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ice/squeezer/ice/squeezer/_ice.haml +27 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ice/squeezer/ice/squeezer/ice/_ice.haml +6 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ice/squeezer/ice/squeezer/ice/squeezer/_ice.haml +7 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ice/squeezer/squeezer.css +249 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/jquery-ui-1.8.5.custom.css +572 -0
- data/lib/squeezer.rb +1 -1
- data/pkg/squeezer-0.1.3.gem +0 -0
- data/pkg/squeezer-0.1.4.gem +0 -0
- data/squeezer.gemspec +227 -65
- metadata +229 -67
- data/lib/squeezer/engine.rb +0 -0
@@ -0,0 +1,165 @@
|
|
1
|
+
- content_for(:head) do
|
2
|
+
%script{:type=>"text/javascript", :src=>"javascripts/prototype.js"}
|
3
|
+
%script{:type=>"text/javascript", :src=>"javascripts/effects.js"}
|
4
|
+
|
5
|
+
%script{:type=>"text/javascript"}
|
6
|
+
function about() {
|
7
|
+
if (Element.empty('about-content')) {
|
8
|
+
new Ajax.Updater('about-content', 'rails/info/properties', {
|
9
|
+
method: 'get',
|
10
|
+
onFailure: function() {Element.classNames('about-content').add('failure')},
|
11
|
+
onComplete: function() {new Effect.BlindDown('about-content', {duration: 0.25})}
|
12
|
+
});
|
13
|
+
} else {
|
14
|
+
new Effect[Element.visible('about-content') ?
|
15
|
+
'BlindUp' : 'BlindDown']('about-content', {duration: 0.25});
|
16
|
+
}
|
17
|
+
}
|
18
|
+
|
19
|
+
window.onload = function() {
|
20
|
+
$('search-text').value = '';
|
21
|
+
$('search').onsubmit = function() {
|
22
|
+
$('search-text').value = 'site:rubyonrails.org ' + $F('search-text');
|
23
|
+
}
|
24
|
+
}
|
25
|
+
- content_for(:sidebar) do
|
26
|
+
%ul{:id=>'sidebar-items'}
|
27
|
+
%li
|
28
|
+
%form{:id=>"searchx",:action=>"http://www.google.com/search",:method=>"get"}
|
29
|
+
%input{:name=>"hl",:value=>"en",:type=>"hidden"}
|
30
|
+
%input{:id=>"search-text",:name=>"q",:value=>" ",:type=>"text"}
|
31
|
+
%input{:value=>"Search",:type=>"submit"}
|
32
|
+
the Rails site
|
33
|
+
%li
|
34
|
+
%h3 Join the community
|
35
|
+
%ul{:class=>"links"}
|
36
|
+
%li
|
37
|
+
%a{:href=>"http://www.rubyonrails.org/"} Ruby on Rails
|
38
|
+
%li
|
39
|
+
%a{:href=>"http://weblog.rubyonrails.org/"} Official weblog
|
40
|
+
%li
|
41
|
+
%a{:href=>"http://wiki.rubyonrails.org/"} Wiki
|
42
|
+
%li
|
43
|
+
%h3 Browse the documentation
|
44
|
+
%ul{:class=>"links"}
|
45
|
+
%li
|
46
|
+
%a{:href=>"http://stdlib.rubyonrails.org/"} Rails API
|
47
|
+
%li
|
48
|
+
%a{:href=>"http://corelib.rubyonrails.org/"} Ruby core
|
49
|
+
%li
|
50
|
+
%a{:href=>"http://guides.rubyonrails.org/"} Rails Guides
|
51
|
+
|
52
|
+
- content_for(:header) do
|
53
|
+
%h1 Squeezer!
|
54
|
+
%h3 A nadie le gusta exprimir, pero a todos les gusta la limonada
|
55
|
+
%div
|
56
|
+
#getting-started
|
57
|
+
#about
|
58
|
+
%h3
|
59
|
+
%a{:href => 'rails/info/properties', :onclick=> 'about(); return false'} Acerca de la aplicacion
|
60
|
+
#about-content{:style=>"display: none"}
|
61
|
+
%br
|
62
|
+
-if !site
|
63
|
+
= link_to 'Crea los datos para el sitio', new_site_path
|
64
|
+
-else
|
65
|
+
= link_to 'Modifica los datos del sitio', {:controller=>'sites',:action=>'edit',:id=>site.id}
|
66
|
+
%br
|
67
|
+
= link_to 'Crea Usuaior', new_user_registration_path
|
68
|
+
%br
|
69
|
+
= link_to 'Administra roles', roles_path
|
70
|
+
%br
|
71
|
+
%h3
|
72
|
+
Crea conteido para la aplicación
|
73
|
+
Podes crear nuevas paginas para tu sitio
|
74
|
+
=link_to 'Paginas', new_page_path
|
75
|
+
%br
|
76
|
+
O tambien información en el blog
|
77
|
+
=link_to 'Blog', new_blog_path
|
78
|
+
%div{:class=>'wikistyle'}
|
79
|
+
%h3 Modulos
|
80
|
+
%b Usuarios
|
81
|
+
%p
|
82
|
+
El modulo de Usuarios se crea con
|
83
|
+
=link_to 'Devise.','http://github.com/plataformatec/devise'
|
84
|
+
|
85
|
+
%b Permisos
|
86
|
+
%p
|
87
|
+
Los permisos los maneja la gema
|
88
|
+
=link_to 'Cancan,','http://github.com/ryanb/cancan'
|
89
|
+
para modificarlos hay que cambiar la clase ability. La clase se encuentra con los modelos
|
90
|
+
%br
|
91
|
+
|
92
|
+
%b Comentarios
|
93
|
+
%p
|
94
|
+
Los comentarios son modelos dentro de la app.
|
95
|
+
%br
|
96
|
+
Para agregar comentarios a una Entidad, en el modelo de pagina se agrega
|
97
|
+
%pre
|
98
|
+
has_one :comment, :as=>:commentable,:dependent => :destroy
|
99
|
+
%p
|
100
|
+
Y en el show de pagina
|
101
|
+
%pre
|
102
|
+
<%= render :partial => "comments/index", :locals=>{:table=>@pagina}%>
|
103
|
+
%b Estilos
|
104
|
+
%p
|
105
|
+
Los estilos se instalan en la carpeta
|
106
|
+
%pre
|
107
|
+
public/stylesheets/ice
|
108
|
+
Una vez instalados se pueden cambiar en
|
109
|
+
%pre
|
110
|
+
=link_to 'Editar sitio',{:controller=>'sites',:action=>'edit',:id=>1}
|
111
|
+
%h3 Gemas
|
112
|
+
|
113
|
+
%b Devise
|
114
|
+
%p
|
115
|
+
=link_to 'github','http://github.com/plataformatec/devise'
|
116
|
+
%br
|
117
|
+
%b Rails casts
|
118
|
+
%br
|
119
|
+
=link_to 'Railscasts 209','http://railscasts.com/episodes/209-introducing-devise'
|
120
|
+
%br
|
121
|
+
=link_to 'Railscasts 210','http://railscasts.com/episodes/210-customizing-devise'
|
122
|
+
%br
|
123
|
+
%b ASCIIcasts
|
124
|
+
%br
|
125
|
+
=link_to 'ASCIIcasts 209','http://asciicasts.com/episodes/209-introducing-devise'
|
126
|
+
%br
|
127
|
+
=link_to 'ASCIIcasts 210','http://asciicasts.com/episodes/210-customizing-devise'
|
128
|
+
|
129
|
+
%b Cancan
|
130
|
+
%p
|
131
|
+
=link_to 'github','http://github.com/ryanb/cancan'
|
132
|
+
%br
|
133
|
+
%b Rails casts
|
134
|
+
%br
|
135
|
+
=link_to 'Railscasts 192','http://railscasts.com/episodes/192-authorization-with-cancan'
|
136
|
+
%br
|
137
|
+
%b ASCIIcasts
|
138
|
+
%br
|
139
|
+
=link_to 'ASCIIcasts 192','http://asciicasts.com/episodes/192-authorization-with-cancan'
|
140
|
+
%b haml
|
141
|
+
%p
|
142
|
+
=link_to 'Home','http://haml-lang.com/'
|
143
|
+
|
144
|
+
%b nifty-generators
|
145
|
+
%p
|
146
|
+
=link_to 'Git','http://github.com/ryanb/nifty-generators'
|
147
|
+
%br
|
148
|
+
Ejemplo
|
149
|
+
%pre
|
150
|
+
$ rails g scaffold blog title:string
|
151
|
+
%p
|
152
|
+
Las vista se generan en haml, porque el aplication.rb fué cambiado y se le agregò esto.
|
153
|
+
%pre
|
154
|
+
config.generators do |g|
|
155
|
+
%br
|
156
|
+
g.haml true
|
157
|
+
%br
|
158
|
+
end
|
159
|
+
%p
|
160
|
+
De lo contrario hay que agregar --haml a cada sentencia.
|
161
|
+
|
162
|
+
|
163
|
+
%b paperclip
|
164
|
+
%p
|
165
|
+
=link_to 'Git','http://github.com/thoughtbot/paperclip'
|
@@ -0,0 +1 @@
|
|
1
|
+
= render :partial => 'form'
|
@@ -0,0 +1,16 @@
|
|
1
|
+
- form_for @topic do |f|
|
2
|
+
= f.error_messages
|
3
|
+
%p
|
4
|
+
= f.label :title
|
5
|
+
%br
|
6
|
+
= f.text_field :title
|
7
|
+
%br
|
8
|
+
= f.hidden_field :forum_id
|
9
|
+
|
10
|
+
-if action_name =='new'
|
11
|
+
- fields_for @post do |p|
|
12
|
+
= p.text_area :body
|
13
|
+
|
14
|
+
%p
|
15
|
+
= f.submit "Submit"
|
16
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
- title "Temas"
|
2
|
+
= javascript_include_tag 'pagination'
|
3
|
+
= will_paginate @topics
|
4
|
+
%table
|
5
|
+
%tr
|
6
|
+
%th Tema
|
7
|
+
|
8
|
+
- for topic in @topics
|
9
|
+
%tr
|
10
|
+
%td
|
11
|
+
%h3
|
12
|
+
=h topic.title
|
13
|
+
por
|
14
|
+
= link_to topic.comment.firts.post.user.username, topic.comment.firts.post.user
|
15
|
+
|
16
|
+
%td
|
17
|
+
= link_to "Show", topic
|
18
|
+
%td
|
19
|
+
= link_to "Edit", edit_topic_path(topic)
|
20
|
+
%td
|
21
|
+
= link_to "Destroy", topic, :confirm => 'Are you sure?', :method => :delete
|
22
|
+
%p
|
23
|
+
= link_permitted(new_topic_path,"Nuevo Tema")
|
@@ -0,0 +1,16 @@
|
|
1
|
+
- title 'Tema'
|
2
|
+
= @topic.title
|
3
|
+
%br
|
4
|
+
= link_to 'Foro', forums_path
|
5
|
+
|
|
6
|
+
= link_to @topic.forum.name, @topic.forum
|
7
|
+
= link_permitted "Editar",:edit,@topic,edit_topic_path(@topic)
|
8
|
+
= link_permitted "Borrar",:destroy,@topic,@topic
|
9
|
+
|
10
|
+
%br
|
11
|
+
|
12
|
+
=render :partial =>'comments/list',:locals=>{:table=>@posts}
|
13
|
+
=render :partial =>'comments/add',:locals=>{:table=>@topic}
|
14
|
+
|
15
|
+
|
16
|
+
%br
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<h2>Resend unlock instructions</h2>
|
2
|
+
|
3
|
+
<% form_for resource_name, resource, :url => unlock_path(resource_name) do |f| %>
|
4
|
+
<%= f.error_messages %>
|
5
|
+
|
6
|
+
<p><%= f.label :email %></p>
|
7
|
+
<p><%= f.text_field :email %></p>
|
8
|
+
|
9
|
+
<p><%= f.submit "Resend unlock instructions" %></p>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<%= render :partial => "shared/devise_links" %>
|
@@ -0,0 +1,142 @@
|
|
1
|
+
# Use this hook to configure devise mailer, warden hooks and so forth. The first
|
2
|
+
# four configuration values can also be set straight in your models.
|
3
|
+
Devise.setup do |config|
|
4
|
+
# ==> Mailer Configuration
|
5
|
+
# Configure the e-mail address which will be shown in DeviseMailer.
|
6
|
+
config.mailer_sender = "please-change-me@config-initializers-devise.com"
|
7
|
+
config.authentication_keys = [ :username ]
|
8
|
+
# Configure the class responsible to send e-mails.
|
9
|
+
# config.mailer = "Devise::Mailer"
|
10
|
+
|
11
|
+
# ==> ORM configuration
|
12
|
+
# Load and configure the ORM. Supports :active_record (default) and
|
13
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
14
|
+
# available as additional gems.
|
15
|
+
require 'devise/orm/active_record'
|
16
|
+
|
17
|
+
# ==> Configuration for any authentication mechanism
|
18
|
+
# Configure which keys are used when authenticating an user. By default is
|
19
|
+
# just :email. You can configure it to use [:username, :subdomain], so for
|
20
|
+
# authenticating an user, both parameters are required. Remember that those
|
21
|
+
# parameters are used only when authenticating and not when retrieving from
|
22
|
+
# session. If you need permissions, you should implement that in a before filter.
|
23
|
+
# config.authentication_keys = [ :email ]
|
24
|
+
|
25
|
+
# Tell if authentication through request.params is enabled. True by default.
|
26
|
+
# config.params_authenticatable = true
|
27
|
+
|
28
|
+
# Tell if authentication through HTTP Basic Auth is enabled. True by default.
|
29
|
+
# config.http_authenticatable = true
|
30
|
+
|
31
|
+
# Set this to true to use Basic Auth for AJAX requests. True by default.
|
32
|
+
# config.http_authenticatable_on_xhr = true
|
33
|
+
|
34
|
+
# The realm used in Http Basic Authentication
|
35
|
+
# config.http_authentication_realm = "Application"
|
36
|
+
|
37
|
+
# ==> Configuration for :database_authenticatable
|
38
|
+
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
|
39
|
+
# using other encryptors, it sets how many times you want the password re-encrypted.
|
40
|
+
config.stretches = 10
|
41
|
+
|
42
|
+
# Define which will be the encryption algorithm. Devise also supports encryptors
|
43
|
+
# from others authentication tools as :clearance_sha1, :authlogic_sha512 (then
|
44
|
+
# you should set stretches above to 20 for default behavior) and :restful_authentication_sha1
|
45
|
+
# (then you should set stretches to 10, and copy REST_AUTH_SITE_KEY to pepper)
|
46
|
+
config.encryptor = :bcrypt
|
47
|
+
|
48
|
+
# Setup a pepper to generate the encrypted password.
|
49
|
+
config.pepper = "affa30cbea5a12ebeeb12848a9e8f9ef6bbe8e48a627cd65023d28bac90975e0b103b8c66569d31d571d69a7804f95b6bce5ee809134a51647dd131a51e3d361"
|
50
|
+
|
51
|
+
# ==> Configuration for :confirmable
|
52
|
+
# The time you want to give your user to confirm his account. During this time
|
53
|
+
# he will be able to access your application without confirming. Default is nil.
|
54
|
+
# When confirm_within is zero, the user won't be able to sign in without confirming.
|
55
|
+
# You can use this to let your user access some features of your application
|
56
|
+
# without confirming the account, but blocking it after a certain period
|
57
|
+
# (ie 2 days).
|
58
|
+
# config.confirm_within = 2.days
|
59
|
+
|
60
|
+
# ==> Configuration for :rememberable
|
61
|
+
# The time the user will be remembered without asking for credentials again.
|
62
|
+
# config.remember_for = 2.weeks
|
63
|
+
|
64
|
+
# If true, a valid remember token can be re-used between multiple browsers.
|
65
|
+
# config.remember_across_browsers = true
|
66
|
+
|
67
|
+
# If true, extends the user's remember period when remembered via cookie.
|
68
|
+
# config.extend_remember_period = false
|
69
|
+
|
70
|
+
# ==> Configuration for :validatable
|
71
|
+
# Range for password length
|
72
|
+
# config.password_length = 6..20
|
73
|
+
|
74
|
+
# Regex to use to validate the email address
|
75
|
+
# config.email_regexp = /^([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})$/i
|
76
|
+
|
77
|
+
# ==> Configuration for :timeoutable
|
78
|
+
# The time you want to timeout the user session without activity. After this
|
79
|
+
# time the user will be asked for credentials again.
|
80
|
+
# config.timeout_in = 10.minutes
|
81
|
+
|
82
|
+
# ==> Configuration for :lockable
|
83
|
+
# Defines which strategy will be used to lock an account.
|
84
|
+
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
85
|
+
# :none = No lock strategy. You should handle locking by yourself.
|
86
|
+
# config.lock_strategy = :failed_attempts
|
87
|
+
|
88
|
+
# Defines which strategy will be used to unlock an account.
|
89
|
+
# :email = Sends an unlock link to the user email
|
90
|
+
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
91
|
+
# :both = Enables both strategies
|
92
|
+
# :none = No unlock strategy. You should handle unlocking by yourself.
|
93
|
+
# config.unlock_strategy = :both
|
94
|
+
|
95
|
+
# Number of authentication tries before locking an account if lock_strategy
|
96
|
+
# is failed attempts.
|
97
|
+
# config.maximum_attempts = 20
|
98
|
+
|
99
|
+
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
100
|
+
# config.unlock_in = 1.hour
|
101
|
+
|
102
|
+
# ==> Configuration for :token_authenticatable
|
103
|
+
# Defines name of the authentication token params key
|
104
|
+
# config.token_authentication_key = :auth_token
|
105
|
+
|
106
|
+
# ==> Scopes configuration
|
107
|
+
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
108
|
+
# "users/sessions/new". It's turned off by default because it's slower if you
|
109
|
+
# are using only default views.
|
110
|
+
# config.scoped_views = true
|
111
|
+
|
112
|
+
# Configure the default scope given to Warden. By default it's the first
|
113
|
+
# devise role declared in your routes.
|
114
|
+
# config.default_scope = :user
|
115
|
+
|
116
|
+
# Configure sign_out behavior.
|
117
|
+
# By default sign_out is scoped (i.e. /users/sign_out affects only :user scope).
|
118
|
+
# In case of sign_out_all_scopes set to true any logout action will sign out all active scopes.
|
119
|
+
# config.sign_out_all_scopes = false
|
120
|
+
|
121
|
+
# ==> Navigation configuration
|
122
|
+
# Lists the formats that should be treated as navigational. Formats like
|
123
|
+
# :html, should redirect to the sign in page when the user does not have
|
124
|
+
# access, but formats like :xml or :json, should return 401.
|
125
|
+
# If you have any extra navigational formats, like :iphone or :mobile, you
|
126
|
+
# should add them to the navigational formats lists. Default is [:html]
|
127
|
+
# config.navigational_formats = [:html, :iphone]
|
128
|
+
|
129
|
+
# ==> Warden configuration
|
130
|
+
# If you want to use other strategies, that are not (yet) supported by Devise,
|
131
|
+
# you can configure them inside the config.warden block. The example below
|
132
|
+
# allows you to setup OAuth, using http://github.com/roman/warden_oauth
|
133
|
+
#
|
134
|
+
# config.warden do |manager|
|
135
|
+
# manager.oauth(:twitter) do |twitter|
|
136
|
+
# twitter.consumer_secret = <YOUR CONSUMER SECRET>
|
137
|
+
# twitter.consumer_key = <YOUR CONSUMER KEY>
|
138
|
+
# twitter.options :site => 'http://twitter.com'
|
139
|
+
# end
|
140
|
+
# manager.default_strategies(:scope => :user).unshift :twitter_oauth
|
141
|
+
# end
|
142
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class CreateComments < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :comments do |t|
|
4
|
+
t.integer :commentable_id
|
5
|
+
t.string :commentable_type
|
6
|
+
t.boolean :open
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.down
|
13
|
+
drop_table :comments
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class CreateComments < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :comments do |t|
|
4
|
+
t.integer :commentable_id
|
5
|
+
t.string :commentable_type
|
6
|
+
t.boolean :open
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.down
|
13
|
+
drop_table :comments
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreatePosts < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :posts do |t|
|
4
|
+
t.integer :comment_id
|
5
|
+
t.text :body
|
6
|
+
t.string :name
|
7
|
+
t.integer :user_id
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.down
|
14
|
+
drop_table :posts
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
class CreateSites < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :sites do |t|
|
4
|
+
t.string :name
|
5
|
+
t.string :slogan
|
6
|
+
t.string :email
|
7
|
+
t.text :mision
|
8
|
+
t.text :footer
|
9
|
+
t.string :style
|
10
|
+
t.string :logo_file_name
|
11
|
+
t.string :logo_content_type
|
12
|
+
t.integer :logo_file_size
|
13
|
+
t.datetime :logo_updated_at
|
14
|
+
t.string :icon_file_name
|
15
|
+
t.string :icon_content_type
|
16
|
+
t.integer :icon_file_size
|
17
|
+
t.datetime :icon_updated_at
|
18
|
+
|
19
|
+
t.timestamps
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.down
|
24
|
+
drop_table :sites
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
class Data < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
Role.create :name=>'Admin',:desc=>'Es el Rol de administrador'
|
4
|
+
User.create :email=>'magicche@hotmail.com',:password=>'admin', :role_ids=>[1]
|
5
|
+
Site.create :name =>'Squeezer',:slogan=>'Porque a nadie le gusta exprimir pero a todos les gusta la limonada',:style=>'squeezer'
|
6
|
+
end
|
7
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
class PageData < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
Page.create :title=>"Home",:menu=>"Home",:user_id=>1,:body=>"Mauris vitae nisl nec metus placerat consectetuer. Donec ipsum. Proin imperdiet est. Sed lacus. Donec lectus. Nullam pretium nibh ut turpis. Nam bibendum. In nulla tortor, elementum vel, tempor at, varius non, purus. Mauris vitae nisl nec metus placerat consectetuer. Donec ipsum. Proin imperdiet est. Phasellus dapibus semper urna. Pellentesque ornare, orci in consectetuer hendrerit, urna elit eleifend nunc, ut consectetuer nisl felis ac diam. "
|
4
|
+
Page.create :title=>"Contacto",:menu=>"Contacto",:user_id=>1,:body=>"Sed lacus. Donec lectus. Nullam pretium nibh ut turpis. Nam bibendum. In nulla tortor, elementum vel, tempor at, varius non, purus. Mauris vitae nisl nec consectetuer. Donec ipsum. Proin imperdiet est. Phasellus dapibus semper urna. Pellentesque ornare, orci in consectetuer hendrerit, urna elit eleifend nunc, ut consectetuer nisl felis ac diam. Etiam non felis. Donec ut ante. In id eros."
|
5
|
+
Page.create :title=>"Quienes somos",:menu=>"Nosotros",:user_id=>1,:body=>"Sed lacus. Donec lectus. Nullam pretium nibh ut turpis. Nam bibendum. In nulla tortor, elementum ipsum. Proin imperdiet est. Phasellus dapibus semper urna. Pellentesque ornare, orci in felis. Donec ut ante. In id eros. Suspendisse lacus turpis, cursus egestas at sem.Sed lacus. "
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.down
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreatePosts < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :posts do |t|
|
4
|
+
t.integer :comment_id
|
5
|
+
t.text :body
|
6
|
+
t.string :name
|
7
|
+
t.integer :user_id
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.down
|
14
|
+
drop_table :posts
|
15
|
+
end
|
16
|
+
end
|