fullstack-cms 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. data/Gemfile +17 -0
  2. data/Gemfile.lock +289 -0
  3. data/README.md +28 -0
  4. data/Rakefile +53 -0
  5. data/VERSION +1 -0
  6. data/app/controllers/links_controller.rb +59 -0
  7. data/app/controllers/menus_controller.rb +40 -0
  8. data/app/controllers/page_parts_controller.rb +16 -0
  9. data/app/controllers/pages_controller.rb +21 -0
  10. data/app/controllers/posts_controller.rb +39 -0
  11. data/app/controllers/settings_controller.rb +39 -0
  12. data/app/controllers/tags_controller.rb +22 -0
  13. data/app/controllers/users_controller.rb +39 -0
  14. data/app/helpers/menus_helper.rb +42 -0
  15. data/app/helpers/pages_helper.rb +14 -0
  16. data/app/helpers/settings_helper.rb +7 -0
  17. data/app/models/.gitkeep +0 -0
  18. data/app/models/link.rb +17 -0
  19. data/app/models/menu.rb +19 -0
  20. data/app/models/page.rb +16 -0
  21. data/app/models/page_part.rb +6 -0
  22. data/app/models/redirect.rb +4 -0
  23. data/app/models/setting.rb +64 -0
  24. data/app/views/admin/links/_filter.html.erb +14 -0
  25. data/app/views/admin/links/_form.html.erb +24 -0
  26. data/app/views/admin/links/_index.html.erb +9 -0
  27. data/app/views/admin/links/_links.html.erb +128 -0
  28. data/app/views/admin/links/_table_row.html.erb +9 -0
  29. data/app/views/admin/links/create.js.erb +12 -0
  30. data/app/views/admin/links/sort.js.coffee +6 -0
  31. data/app/views/admin/links/update.js.coffee +6 -0
  32. data/app/views/admin/menus/_filter.html.erb +12 -0
  33. data/app/views/admin/menus/_form.html.erb +34 -0
  34. data/app/views/admin/menus/_index.html.erb +9 -0
  35. data/app/views/admin/page_parts/_tabs.html.erb +21 -0
  36. data/app/views/admin/page_parts/destroy.js.coffee +12 -0
  37. data/app/views/admin/pages/_collection.html.erb +7 -0
  38. data/app/views/admin/pages/_form.html.erb +54 -0
  39. data/app/views/admin/settings/_filter.html.erb +10 -0
  40. data/app/views/admin/settings/_form.html.erb +25 -0
  41. data/app/views/admin/settings/_index.html.erb +8 -0
  42. data/fullstack-cms.gemspec +189 -0
  43. data/lib/fullstack-cms.rb +1 -0
  44. data/lib/fullstack/cms.rb +41 -0
  45. data/lib/fullstack/cms/engine.rb +9 -0
  46. data/lib/generators/fullstack/cms/install_generator.rb +88 -0
  47. data/lib/generators/fullstack/cms/locale_generator.rb +11 -0
  48. data/lib/generators/fullstack/cms/templates/rails/README.md +40 -0
  49. data/lib/generators/fullstack/cms/templates/rails/app/controllers/site/site_controller.rb +10 -0
  50. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/attachments/_attachments.html.erb +49 -0
  51. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/attachments/create.js.coffee +14 -0
  52. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/base/destroy.js.coffee +7 -0
  53. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/base/edit.html.erb +8 -0
  54. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/base/index.html.erb +54 -0
  55. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/base/new.html.erb +8 -0
  56. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/base/update.js.coffee +5 -0
  57. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/dashboard/show.html.erb +0 -0
  58. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/links/_filter.html.erb +14 -0
  59. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/links/_form.html.erb +24 -0
  60. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/links/_index.html.erb +9 -0
  61. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/links/_links.html.erb +128 -0
  62. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/links/_table_row.html.erb +9 -0
  63. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/links/create.js.erb +12 -0
  64. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/links/sort.js.coffee +6 -0
  65. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/links/update.js.coffee +6 -0
  66. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/menus/_filter.html.erb +12 -0
  67. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/menus/_form.html.erb +34 -0
  68. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/menus/_index.html.erb +9 -0
  69. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/page_parts/_tabs.html.erb +21 -0
  70. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/page_parts/destroy.js.coffee +12 -0
  71. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/pages/_filter.html.erb +12 -0
  72. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/pages/_form.html.erb +50 -0
  73. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/pages/_index.html.erb +14 -0
  74. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/photogalleries/_filter.html.erb +14 -0
  75. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/photogalleries/_form.html.erb +26 -0
  76. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/photogalleries/_index.html.erb +9 -0
  77. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/settings/_filter.html.erb +10 -0
  78. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/settings/_form.html.erb +25 -0
  79. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/settings/_index.html.erb +8 -0
  80. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/shared/_nav.html.erb +38 -0
  81. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/users/_filter.html.erb +12 -0
  82. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/users/_form.html.erb +53 -0
  83. data/lib/generators/fullstack/cms/templates/rails/app/views/admin/users/_index.html.erb +18 -0
  84. data/lib/generators/fullstack/cms/templates/rails/app/views/layouts/admin.html.erb +80 -0
  85. data/lib/generators/fullstack/cms/templates/rails/app/views/layouts/application.html.erb +28 -0
  86. data/lib/generators/fullstack/cms/templates/rails/app/views/layouts/email.html.erb +167 -0
  87. data/lib/generators/fullstack/cms/templates/rails/app/views/site/_footer.html.erb +3 -0
  88. data/lib/generators/fullstack/cms/templates/rails/app/views/site/_google_analytics.html.erb +6 -0
  89. data/lib/generators/fullstack/cms/templates/rails/app/views/site/_head.html.erb +33 -0
  90. data/lib/generators/fullstack/cms/templates/rails/app/views/site/_header.html.erb +15 -0
  91. data/lib/generators/fullstack/cms/templates/rails/app/views/site/_javascripts.html.erb +22 -0
  92. data/lib/generators/fullstack/cms/templates/rails/app/views/site/_map.html.erb +14 -0
  93. data/lib/generators/fullstack/cms/templates/rails/app/views/site/_nav.html.erb +15 -0
  94. data/lib/generators/fullstack/cms/templates/rails/app/views/site/_share_buttons_big.html.erb +15 -0
  95. data/lib/generators/fullstack/cms/templates/rails/app/views/site/site/home.html.erb +12 -0
  96. data/lib/generators/fullstack/cms/templates/rails/config/initializers/devise_controller.rb +29 -0
  97. data/lib/generators/fullstack/cms/templates/rails/config/schedule.rb +5 -0
  98. data/lib/generators/fullstack/cms/templates/rails/config/sitemap.rb.tt +28 -0
  99. data/lib/generators/fullstack/cms/templates/rails/config/styles.yml +47 -0
  100. data/lib/generators/fullstack/cms/templates/rails/db/migrate/20120416071459_acts_as_taggable_on_migration.rb +31 -0
  101. data/lib/generators/fullstack/cms/templates/rails/db/migrate/20120730184641_create_friendly_id_slugs.rb +18 -0
  102. data/lib/generators/fullstack/cms/templates/rails/db/migrate/20120730204729_create_ckeditor_assets.rb +26 -0
  103. data/lib/generators/fullstack/cms/templates/rails/db/seeds.rb.tt +11 -0
  104. data/lib/generators/fullstack/cms/templates/rails/lib/support/ckeditor/asset.rb +4 -0
  105. data/lib/generators/fullstack/cms/templates/rails/lib/support/ckeditor/attachment_file.rb +12 -0
  106. data/lib/generators/fullstack/cms/templates/rails/lib/support/ckeditor/picture.rb +13 -0
  107. data/lib/generators/fullstack/cms/templates/rails/lib/support/content.rb +16 -0
  108. data/lib/generators/fullstack/cms/templates/rails/lib/support/pageable.rb +37 -0
  109. data/lib/generators/fullstack/cms/templates/rails/lib/support/timestamped_content.rb +12 -0
  110. data/lib/generators/fullstack/cms/templates/rails/lib/support/user_subject.rb +40 -0
  111. data/lib/generators/fullstack/cms/templates/rails/lib/tasks/.gitkeep +0 -0
  112. data/lib/generators/fullstack/cms/templates/rails/lib/tasks/assets.rake +53 -0
  113. data/lib/generators/fullstack/cms/templates/rails/lib/tasks/cms.rake +23 -0
  114. data/lib/generators/fullstack/cms/templates/rails/lib/tasks/remote.rake +255 -0
  115. data/lib/generators/fullstack/cms/templates/rails/public/404.html +43 -0
  116. data/lib/generators/fullstack/cms/templates/rails/public/422.html +26 -0
  117. data/lib/generators/fullstack/cms/templates/rails/public/500.html +25 -0
  118. data/lib/generators/fullstack/cms/templates/rails/public/apple-touch-icon.png +0 -0
  119. data/lib/generators/fullstack/cms/templates/rails/public/crossdomain.xml +25 -0
  120. data/lib/generators/fullstack/cms/templates/rails/public/favicon.ico +0 -0
  121. data/lib/generators/fullstack/cms/templates/rails/public/img/.gitignore +0 -0
  122. data/lib/generators/fullstack/cms/templates/rails/public/img/glyphicons-halflings.png +0 -0
  123. data/lib/generators/fullstack/cms/templates/rails/public/js/modernizr-2.5.3.min.js +4 -0
  124. data/lib/generators/fullstack/cms/templates/rails/public/robots.txt +4 -0
  125. metadata +333 -0
@@ -0,0 +1,80 @@
1
+ <!DOCTYPE html>
2
+ <html lang="it">
3
+ <head>
4
+ <%= csrf_meta_tags %>
5
+ <%= meta :title => "#{@title}" + ( @title ? " - " : "" ) + Settings.site.title + ' Admin',
6
+ :description => Settings.site.slogan
7
+ %>
8
+ <%= stylesheet_link_tag 'admin/admin' %>
9
+ <%= yield :stylesheets %>
10
+ </head>
11
+
12
+ <body>
13
+ <%= render :partial => 'admin/shared/nav' %>
14
+
15
+ <% if devise_controller? %>
16
+ <%= navbar :fixed => :top do %>
17
+ <%= brand Settings.site.title + ' Admin', admin_root_path %>
18
+ <% end %>
19
+ <div class="container main">
20
+ <div class="row">
21
+ <%= yield %>
22
+ </div>
23
+ </div>
24
+ <% else %>
25
+
26
+ <% bootstrap_fluid! %>
27
+
28
+ <%= navbar :fixed => :top do %>
29
+ <%= brand Settings.site.title + ' Admin', admin_root_path %>
30
+ <%= yield :menu %>
31
+ <% end %>
32
+
33
+ <%= yield :crumbs %>
34
+ <div class="container-fluid main">
35
+ <div class="row-fluid">
36
+ <div id="left-aside" class="span2">
37
+ <%= yield :nav %>
38
+ </div>
39
+ <% if content_for?(:aside) -%>
40
+ <div class="span6" id="center">
41
+ <%= yield %>
42
+ </div>
43
+ <div id="right-aside" class="span4">
44
+ <%= yield :aside %>
45
+ </div>
46
+ <% else -%>
47
+ <div class="span10" id="center">
48
+ <%= yield %>
49
+ </div>
50
+ <% end -%>
51
+ </div>
52
+ </div>
53
+
54
+ <footer>
55
+
56
+ </footer>
57
+ <% end %>
58
+
59
+
60
+ <%= javascript_include_tag 'admin/admin' %>
61
+ <%= yield :javascripts %>
62
+
63
+
64
+ <% if flash[:notice].present? %>
65
+ <script type="text/javascript" charset="utf-8">$.notify.notice('<%= j "#{flash[:notice]}" %>');</script>
66
+ <% flash.discard(:notice) %>
67
+
68
+ <% elsif flash[:error].present? %>
69
+ <script type="text/javascript" charset="utf-8">$.notify.error('<%= j "#{flash[:error]}" %>');</script>
70
+ <% flash.discard(:error) %>
71
+
72
+ <% elsif flash[:alert].present? %>
73
+ <script type="text/javascript" charset="utf-8">$.notify.alert('<%= j "#{flash[:alert]}" %>');</script>
74
+ <% flash.discard(:alert) %>
75
+
76
+ <% end %>
77
+
78
+ </body>
79
+ </html>
80
+
@@ -0,0 +1,28 @@
1
+ <!doctype html>
2
+ <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
3
+ <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
4
+ <!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
5
+ <!--[if gt IE 8]><!--> <html class="no-js" lang="it"> <!--<![endif]-->
6
+ <%= render :partial => "site/head" %>
7
+ <body>
8
+ <!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->
9
+ <div id="fb-root">
10
+ </div>
11
+ <header class="container header">
12
+ <%= render :partial => "site/header" %>
13
+ </header>
14
+ <div class="container">
15
+ <div class="main<%= home? ? ' home' : '' %>" role="main">
16
+ <%= yield %>
17
+ </div>
18
+
19
+ </div>
20
+ <footer class="container footer">
21
+ <%= render :partial => "site/footer" %>
22
+ </footer>
23
+
24
+ <%= render :partial => "site/javascripts" %>
25
+ <%= render :partial => "site/google_analytics" %>
26
+
27
+ </body>
28
+ </html>
@@ -0,0 +1,167 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
6
+ <title>Your Message Subject or Title</title>
7
+ <style type="text/css">
8
+ /* Based on The MailChimp Reset INLINE: Yes. */
9
+ /* Client-specific Styles */
10
+ #outlook a {padding:0;} /* Force Outlook to provide a "view in browser" menu link. */
11
+ body{width:100% !important; -webkit-text-size-adjust:100%; -ms-text-size-adjust:100%; margin:0; padding:0;}
12
+ /* Prevent Webkit and Windows Mobile platforms from changing default font sizes.*/
13
+ .ExternalClass {width:100%;} /* Force Hotmail to display emails at full width */
14
+ .ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {line-height: 100%;}
15
+ /* Forces Hotmail to display normal line spacing. More on that: http://www.emailonacid.com/forum/viewthread/43/ */
16
+ #backgroundTable {margin:0; padding:0; width:100% !important; line-height: 100% !important;}
17
+ /* End reset */
18
+
19
+ /* Some sensible defaults for images
20
+ Bring inline: Yes. */
21
+ img {outline:none; text-decoration:none; -ms-interpolation-mode: bicubic;}
22
+ a img {border:none;}
23
+ .image_fix {display:block;}
24
+
25
+ /* Yahoo paragraph fix
26
+ Bring inline: Yes. */
27
+ p {margin: 1em 0;}
28
+
29
+ /* Hotmail header color reset
30
+ Bring inline: Yes. */
31
+ h1, h2, h3, h4, h5, h6 {color: black !important;}
32
+
33
+ h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {color: blue !important;}
34
+
35
+ h1 a:active, h2 a:active, h3 a:active, h4 a:active, h5 a:active, h6 a:active {
36
+ color: red !important; /* Preferably not the same color as the normal header link color. There is limited support for psuedo classes in email clients, this was added just for good measure. */
37
+ }
38
+
39
+ h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited {
40
+ color: purple !important; /* Preferably not the same color as the normal header link color. There is limited support for psuedo classes in email clients, this was added just for good measure. */
41
+ }
42
+
43
+ /* Outlook 07, 10 Padding issue fix
44
+ Bring inline: No.*/
45
+ table td {border-collapse: collapse;}
46
+
47
+ /* Remove spacing around Outlook 07, 10 tables
48
+ Bring inline: Yes */
49
+ table { border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt; }
50
+
51
+ /* Styling your links has become much simpler with the new Yahoo. In fact, it falls in line with the main credo of styling in email and make sure to bring your styles inline. Your link colors will be uniform across clients when brought inline.
52
+ Bring inline: Yes. */
53
+ a {color: orange;}
54
+
55
+
56
+ /***************************************************
57
+ ****************************************************
58
+ MOBILE TARGETING
59
+ ****************************************************
60
+ ***************************************************/
61
+ @media only screen and (max-device-width: 480px) {
62
+ /* Part one of controlling phone number linking for mobile. */
63
+ a[href^="tel"], a[href^="sms"] {
64
+ text-decoration: none;
65
+ color: blue; /* or whatever your want */
66
+ pointer-events: none;
67
+ cursor: default;
68
+ }
69
+
70
+ .mobile_link a[href^="tel"], .mobile_link a[href^="sms"] {
71
+ text-decoration: default;
72
+ color: orange !important;
73
+ pointer-events: auto;
74
+ cursor: default;
75
+ }
76
+
77
+ }
78
+
79
+ /* More Specific Targeting */
80
+
81
+ @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
82
+ /* You guessed it, ipad (tablets, smaller screens, etc) */
83
+ /* repeating for the ipad */
84
+ a[href^="tel"], a[href^="sms"] {
85
+ text-decoration: none;
86
+ color: blue; /* or whatever your want */
87
+ pointer-events: none;
88
+ cursor: default;
89
+ }
90
+
91
+ .mobile_link a[href^="tel"], .mobile_link a[href^="sms"] {
92
+ text-decoration: default;
93
+ color: orange !important;
94
+ pointer-events: auto;
95
+ cursor: default;
96
+ }
97
+ }
98
+
99
+ @media only screen and (-webkit-min-device-pixel-ratio: 2) {
100
+ /* Put your iPhone 4g styles in here */
101
+ }
102
+
103
+ /* Android targeting */
104
+ @media only screen and (-webkit-device-pixel-ratio:.75){
105
+ /* Put CSS for low density (ldpi) Android layouts in here */
106
+ }
107
+ @media only screen and (-webkit-device-pixel-ratio:1){
108
+ /* Put CSS for medium density (mdpi) Android layouts in here */
109
+ }
110
+ @media only screen and (-webkit-device-pixel-ratio:1.5){
111
+ /* Put CSS for high density (hdpi) Android layouts in here */
112
+ }
113
+ /* end Android targeting */
114
+
115
+ </style>
116
+
117
+ <!-- Targeting Windows Mobile -->
118
+ <!--[if IEMobile 7]>
119
+ <style type="text/css">
120
+
121
+ </style>
122
+ <![endif]-->
123
+
124
+ <!-- ***********************************************
125
+ ****************************************************
126
+ END MOBILE TARGETING
127
+ ****************************************************
128
+ ************************************************ -->
129
+
130
+ <!--[if gte mso 9]>
131
+ <style>
132
+ /* Target Outlook 2007 and 2010 */
133
+ </style>
134
+ <![endif]-->
135
+ </head>
136
+ <body>
137
+ <!-- Wrapper/Container Table: Use a wrapper table to control the width and the background color consistently of your email. Use this approach instead of setting attributes on the body tag. -->
138
+ <table cellpadding="0" cellspacing="0" border="0" id="backgroundTable">
139
+ <tr>
140
+ <td valign="top">
141
+ <!-- Tables are the most common way to format your email consistently. Set your table widths inside cells and in most cases reset cellpadding, cellspacing, and border to zero. Use nested tables as a way to space effectively in your message. -->
142
+ <table cellpadding="0" cellspacing="0" border="0" align="center">
143
+ <tr>
144
+ <td width="600" valign="top" id="header-title"><h1><%= Settings.site.title %></h1></td>
145
+ </tr>
146
+ <tr>
147
+ <td width="600" valign="top"><%= yield %></td>
148
+ </tr>
149
+ </table>
150
+ <!-- End example table -->
151
+
152
+ <!-- Yahoo Link color fix updated: Simply bring your link styling inline. -->
153
+ <a href="http://htmlemailboilerplate.com" target ="_blank" title="Styling Links" style="color: orange; text-decoration: none;">Coloring Links appropriately</a>
154
+
155
+ <!-- Gmail/Hotmail image display fix -->
156
+ <img class="image_fix" src="full path to image" alt="Your alt text" title="Your title text" width="x" height="x" />
157
+
158
+ <!-- Working with telephone numbers (including sms prompts). Use the "mobile" class to style appropriately in desktop clients
159
+ versus mobile clients. -->
160
+ <span class="mobile_link">123-456-7890</span>
161
+
162
+ </td>
163
+ </tr>
164
+ </table>
165
+ <!-- End of wrapper table -->
166
+ </body>
167
+ </html>
@@ -0,0 +1,3 @@
1
+ <footer class="footer">
2
+ <%= get_setting(:copyright) %>
3
+ </footer>
@@ -0,0 +1,6 @@
1
+ <script>
2
+ var _gaq=[['_setAccount','<%= get_setting("google_analytics_code", "UA-xxxxxx-x") %>'],['_trackPageview']];
3
+ (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
4
+ g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
5
+ s.parentNode.insertBefore(g,s)}(document,'script'));
6
+ </script>
@@ -0,0 +1,33 @@
1
+ <head>
2
+ <% if content_for?(:meta) %>
3
+ <%= yield :meta %>
4
+ <% else %>
5
+ <%
6
+ site_title = get_setting(:site_title) || Settings.site.title
7
+ site_description = get_setting(:site_description) || Settings.site.slogan
8
+ site_slogan = get_setting(:site_slogan) || Settings.site.slogan
9
+ %>
10
+
11
+ <% if home? %>
12
+ <%= meta_tags(
13
+ :title => "#{site_title} - #{site_slogan}",
14
+ :description => site_description,
15
+ :og => {:type => "website"}
16
+ )
17
+ %>
18
+ <% elsif title %>
19
+ <%= meta_tags(
20
+ :title => "#{title} | #{site_title}",
21
+ :description => description,
22
+ :og => {:image => image, :type => (type || "article")}
23
+ )
24
+ %>
25
+ <% end %>
26
+ <% end %>
27
+
28
+
29
+ <%= stylesheet_link_tag 'site/site' %>
30
+ <%= yield :stylesheets %>
31
+
32
+ <script src="/js/modernizr-2.5.3.min.js"></script>
33
+ </head>
@@ -0,0 +1,15 @@
1
+ <div class="row">
2
+ <div class="span12">
3
+ <div id="logo">
4
+ <h1>
5
+ <a href="/"><%= get_setting(:site_title, Settings.site.title) %></a>
6
+ </h1>
7
+ </div>
8
+ </div>
9
+ </div>
10
+
11
+ <div class="row">
12
+ <div class="span12">
13
+ <%= render :partial => "site/nav" %>
14
+ </div>
15
+ </div>
@@ -0,0 +1,22 @@
1
+ <%= javascript_include_tag 'site/site' %>
2
+
3
+ <% if @load_social_network_js %>
4
+ <script type="text/javascript" src="https://apis.google.com/js/plusone.js" async="true">
5
+ </script>
6
+
7
+ <script>(function(d, s, id) {
8
+ var js, fjs = d.getElementsByTagName(s)[0];
9
+ if (d.getElementById(id)) return;
10
+ js = d.createElement(s); js.id = id;
11
+ js.src = "//connect.facebook.net/it_IT/all.js#xfbml=1&appId=<%= get_setting(:facebook_app_id) %>";
12
+ fjs.parentNode.insertBefore(js, fjs);
13
+ }(document, 'script', 'facebook-jssdk'));</script>
14
+
15
+ <script type="text/javascript" src="http://platform.twitter.com/widgets.js" async="true">
16
+ </script>
17
+ <% end %>
18
+
19
+ <!-- script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true">
20
+ </script -->
21
+
22
+ <%= yield :javascripts %>
@@ -0,0 +1,14 @@
1
+ <%
2
+ # render :partial => "site/map", :locals => { :center => place, :markers => [ place ] }
3
+ zoom = defined?(zoom) ? zoom : 15,
4
+ height = defined?(height) ? height : 300
5
+ makers = defined?(makers) ? makers : []
6
+ %>
7
+
8
+ <div class="thumbnail">
9
+ <div class="gmap" data-center="<%= resource.lat %>,<%= resource.lng %>" data-zoom="<%= zoom %>" style="height:<%= height %>px">
10
+ <% markers.each do |marker| %>
11
+ <span class="marker" data-position="<%= marker.lat %>,<%= marker.lng %>" data-title="<%= title_for(marker) %>" />
12
+ <% end %>
13
+ </div>
14
+ </div>
@@ -0,0 +1,15 @@
1
+ <nav>
2
+ <ul class="nav nav-top nav-pills">
3
+ <%= nav_items_for("main_menu") %>
4
+ <% if subject.logged_in? %>
5
+ <%= dropdown_nav_item _("Account"), :icon => "user" do %>
6
+ <% if subject.administrator? %>
7
+ <%= nav_item _("Admin"), "/admin", :icon => "lock" %>
8
+ <% end %>
9
+ <%= nav_item _('Logout'), destroy_user_session_path, :method => :delete %>
10
+ <% end %>
11
+ <% else %>
12
+ <%= nav_item _("Accedi"), new_user_session_path, :icon => "user" %>
13
+ <% end %>
14
+ </ul>
15
+ </nav>
@@ -0,0 +1,15 @@
1
+ <ul class="horizontal hl clearfix share-buttons-big">
2
+ <li>
3
+ <fb:like href="" send="false" layout="box_count" width="72" show_faces="false" font="">
4
+ </fb:like>
5
+ </li>
6
+ <li style="margin-top:-1px">
7
+ <a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical">Tweet</a>
8
+
9
+ </li>
10
+ <li>
11
+ <div class="g-plusone" data-size="tall" data-count="true">
12
+ </div>
13
+ </li>
14
+ </ul>
15
+ <% @load_social_network_js = true %>
@@ -0,0 +1,12 @@
1
+ <h1 class="page-header">Homepage</h1>
2
+
3
+ <div class="row">
4
+ <div class="span4">
5
+ <div class="well">
6
+ <%= page_part("Column") %>
7
+ </div>
8
+ </div>
9
+ <div class="span8">
10
+ <%= page_part("Body") %>
11
+ </div>
12
+ </div>
@@ -0,0 +1,29 @@
1
+ DeviseController.class_eval do
2
+ authorize :scope => "site"
3
+ before_filter :set_page_title
4
+
5
+ protected
6
+
7
+ def set_page_title
8
+ @page_title = case "devise/#{controller_name}##{action_name}"
9
+ when "devise/sessions#new"
10
+ t('devise.sessions.new.sign_in', :default => "Sign in")
11
+
12
+ when "devise/confirmations#new"
13
+ t('devise.confirmations.new.resend_confirmation_instructions', :default => 'Resend confirmation instructions')
14
+
15
+ when "devise/registrations#new"
16
+ t('devise.registrations.new.sign_up', :default => "Sign up")
17
+
18
+ when "devise/registrations#edit"
19
+ t('devise.registrations.edit.title', :resource => resource_name.to_s.humanize , :default => 'Edit #{resource_name.to_s.humanize}')
20
+
21
+ when "devise/passwords#new"
22
+ t('devise.passwords.new.forgot_your_password', :default => 'Forgot your password?')
23
+
24
+ when "devise/passwords#edit"
25
+ t('devise.passwords.edit.change_your_password', :default => "Change your password")
26
+ end
27
+ end
28
+
29
+ end