fullstack-cms 0.2.21 → 0.2.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. data/Gemfile +1 -1
  2. data/Gemfile.lock +8 -7
  3. data/VERSION +1 -1
  4. data/fullstack-cms.gemspec +16 -5
  5. data/lib/generators/fullstack/cms/install_generator.rb +20 -0
  6. data/lib/generators/fullstack/cms/templates/rails/app/controllers/site/site_controller.rb +45 -1
  7. data/lib/generators/fullstack/cms/templates/rails/app/views/layouts/application.html.erb +22 -6
  8. data/lib/generators/fullstack/cms/templates/rails/app/views/site/_footer.html.erb +17 -7
  9. data/lib/generators/fullstack/cms/templates/rails/app/views/site/_head.html.erb +20 -2
  10. data/lib/generators/fullstack/cms/templates/rails/app/views/site/_header.html.erb +12 -15
  11. data/lib/generators/fullstack/cms/templates/rails/app/views/site/_javascripts.html.erb +1 -1
  12. data/lib/generators/fullstack/cms/templates/rails/app/views/site/_nav.html.erb +17 -15
  13. data/lib/generators/fullstack/cms/templates/rails/app/views/site/site/blog.html.erb +51 -0
  14. data/lib/generators/fullstack/cms/templates/rails/app/views/site/site/contacts.html.erb +42 -0
  15. data/lib/generators/fullstack/cms/templates/rails/app/views/site/site/dish.html.erb +38 -0
  16. data/lib/generators/fullstack/cms/templates/rails/app/views/site/site/home.html.erb +133 -1
  17. data/lib/generators/fullstack/cms/templates/rails/app/views/site/site/line.html.erb +51 -0
  18. data/lib/generators/fullstack/cms/templates/rails/app/views/site/site/post.html.erb +20 -0
  19. data/lib/generators/fullstack/cms/templates/rails/app/views/site/site/product.html.erb +56 -0
  20. data/lib/generators/fullstack/cms/templates/rails/app/views/site/site/recipe.html.erb +37 -0
  21. data/lib/generators/fullstack/cms/templates/rails/app/views/site/site/recipes.html.erb +36 -0
  22. data/lib/generators/fullstack/cms/templates/rails/app/views/site/site/sales_channel.html.erb +41 -0
  23. data/lib/generators/fullstack/cms/templates/rails/app/views/site/site/text.html.erb +22 -0
  24. data/lib/generators/fullstack/cms/templates/rails/app/views/site/site/video.html.erb +3 -0
  25. data/lib/generators/fullstack/cms/templates/rails/config/fullstack.rb +1 -3
  26. metadata +16 -5
data/Gemfile CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  source "http://rubygems.org"
6
6
 
7
- gem "fullstack-admin", '~> 0.1.46'
7
+ gem "fullstack-admin", '~> 0.1.47'
8
8
 
9
9
  gem "ars-permalink"
10
10
  gem "has-attached", '~> 0.2.3'
data/Gemfile.lock CHANGED
@@ -83,7 +83,7 @@ GEM
83
83
  orm_adapter (~> 0.1)
84
84
  railties (~> 3.1)
85
85
  warden (~> 1.2.1)
86
- devise-i18n (0.5.6)
86
+ devise-i18n (0.5.7)
87
87
  devise-i18n-views (0.2.2)
88
88
  erubis (2.7.0)
89
89
  execjs (1.4.0)
@@ -99,7 +99,7 @@ GEM
99
99
  formtastic (~> 2.2)
100
100
  formtastic-bootstrap
101
101
  friendly_id (4.0.8)
102
- fullstack (0.1.25)
102
+ fullstack (0.1.26)
103
103
  active_record_schema
104
104
  auto_strip_attributes
105
105
  checkin
@@ -111,7 +111,7 @@ GEM
111
111
  has_partial
112
112
  htmlentities
113
113
  jquery-rails
114
- kaminari
114
+ kaminari (= 0.13.0)
115
115
  kaminari-i18n
116
116
  meta-tags-helpers
117
117
  mobile-fu (~> 1.1.0)
@@ -126,7 +126,7 @@ GEM
126
126
  remotipart
127
127
  resource-presentation-helpers
128
128
  squeel
129
- fullstack-admin (0.1.46)
129
+ fullstack-admin (0.1.47)
130
130
  bootstrap-datepicker-rails
131
131
  bootstrap-helpers
132
132
  bootstrap-wysihtml5-rails
@@ -134,7 +134,7 @@ GEM
134
134
  ckeditor
135
135
  facebox-rails
136
136
  formtastic-bootstrap
137
- fullstack (~> 0.1.25)
137
+ fullstack (~> 0.1.26)
138
138
  less-rails-bootstrap
139
139
  meta_search
140
140
  plupload-rails
@@ -165,9 +165,10 @@ GEM
165
165
  railties (>= 3.1.0, < 5.0)
166
166
  thor (~> 0.14)
167
167
  json (1.7.4)
168
- kaminari (0.14.1)
168
+ kaminari (0.13.0)
169
169
  actionpack (>= 3.0.0)
170
170
  activesupport (>= 3.0.0)
171
+ railties (>= 3.0.0)
171
172
  kaminari-i18n (0.1.3)
172
173
  rails
173
174
  less (2.2.2)
@@ -289,7 +290,7 @@ DEPENDENCIES
289
290
  ars-permalink
290
291
  awesome_nested_set
291
292
  bluecloth
292
- fullstack-admin (~> 0.1.46)
293
+ fullstack-admin (~> 0.1.47)
293
294
  has-attached (~> 0.2.3)
294
295
  jeweler
295
296
  rails_i18n_gettext
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.21
1
+ 0.2.22
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "fullstack-cms"
8
- s.version = "0.2.21"
8
+ s.version = "0.2.22"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["mcasimir"]
12
- s.date = "2012-09-15"
12
+ s.date = "2012-09-17"
13
13
  s.description = "CMS system built on fullstack"
14
14
  s.email = "maurizio.cas@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -102,7 +102,18 @@ Gem::Specification.new do |s|
102
102
  "lib/generators/fullstack/cms/templates/rails/app/views/site/_map.html.erb",
103
103
  "lib/generators/fullstack/cms/templates/rails/app/views/site/_nav.html.erb",
104
104
  "lib/generators/fullstack/cms/templates/rails/app/views/site/_share_buttons_big.html.erb",
105
+ "lib/generators/fullstack/cms/templates/rails/app/views/site/site/blog.html.erb",
106
+ "lib/generators/fullstack/cms/templates/rails/app/views/site/site/contacts.html.erb",
107
+ "lib/generators/fullstack/cms/templates/rails/app/views/site/site/dish.html.erb",
105
108
  "lib/generators/fullstack/cms/templates/rails/app/views/site/site/home.html.erb",
109
+ "lib/generators/fullstack/cms/templates/rails/app/views/site/site/line.html.erb",
110
+ "lib/generators/fullstack/cms/templates/rails/app/views/site/site/post.html.erb",
111
+ "lib/generators/fullstack/cms/templates/rails/app/views/site/site/product.html.erb",
112
+ "lib/generators/fullstack/cms/templates/rails/app/views/site/site/recipe.html.erb",
113
+ "lib/generators/fullstack/cms/templates/rails/app/views/site/site/recipes.html.erb",
114
+ "lib/generators/fullstack/cms/templates/rails/app/views/site/site/sales_channel.html.erb",
115
+ "lib/generators/fullstack/cms/templates/rails/app/views/site/site/text.html.erb",
116
+ "lib/generators/fullstack/cms/templates/rails/app/views/site/site/video.html.erb",
106
117
  "lib/generators/fullstack/cms/templates/rails/config/fullstack.rb",
107
118
  "lib/generators/fullstack/cms/templates/rails/config/initializers/ckeditor_controller.rb",
108
119
  "lib/generators/fullstack/cms/templates/rails/config/initializers/devise_controller.rb",
@@ -135,7 +146,7 @@ Gem::Specification.new do |s|
135
146
  s.specification_version = 3
136
147
 
137
148
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
138
- s.add_runtime_dependency(%q<fullstack-admin>, ["~> 0.1.46"])
149
+ s.add_runtime_dependency(%q<fullstack-admin>, ["~> 0.1.47"])
139
150
  s.add_runtime_dependency(%q<ars-permalink>, [">= 0"])
140
151
  s.add_runtime_dependency(%q<has-attached>, ["~> 0.2.3"])
141
152
  s.add_runtime_dependency(%q<acts-as-taggable-on>, [">= 0"])
@@ -148,7 +159,7 @@ Gem::Specification.new do |s|
148
159
  s.add_runtime_dependency(%q<bluecloth>, [">= 0"])
149
160
  s.add_development_dependency(%q<jeweler>, [">= 0"])
150
161
  else
151
- s.add_dependency(%q<fullstack-admin>, ["~> 0.1.46"])
162
+ s.add_dependency(%q<fullstack-admin>, ["~> 0.1.47"])
152
163
  s.add_dependency(%q<ars-permalink>, [">= 0"])
153
164
  s.add_dependency(%q<has-attached>, ["~> 0.2.3"])
154
165
  s.add_dependency(%q<acts-as-taggable-on>, [">= 0"])
@@ -162,7 +173,7 @@ Gem::Specification.new do |s|
162
173
  s.add_dependency(%q<jeweler>, [">= 0"])
163
174
  end
164
175
  else
165
- s.add_dependency(%q<fullstack-admin>, ["~> 0.1.46"])
176
+ s.add_dependency(%q<fullstack-admin>, ["~> 0.1.47"])
166
177
  s.add_dependency(%q<ars-permalink>, [">= 0"])
167
178
  s.add_dependency(%q<has-attached>, ["~> 0.2.3"])
168
179
  s.add_dependency(%q<acts-as-taggable-on>, [">= 0"])
@@ -7,6 +7,7 @@ module Fullstack
7
7
  class_option :user, :default => "ror"
8
8
  class_option :title, :default => "title"
9
9
  class_option :slogan, :default => "slogan"
10
+ class_option :localize, :type => :boolean, :default => true
10
11
 
11
12
  def install_fullstack_admin
12
13
  generate "fullstack:admin:install --host='#{host}' --user='#{user}' --title='#{title}' --slogan='#{slogan}'"
@@ -35,6 +36,7 @@ module Fullstack
35
36
  def assets
36
37
  append_to_file "config/assets.yml" do
37
38
  <<-eos
39
+
38
40
  - site/site.css
39
41
  - site/site.js
40
42
  eos
@@ -60,6 +62,20 @@ eos
60
62
  '''
61
63
  end
62
64
 
65
+ def set_localization
66
+ if !localize
67
+ inject_into_file "config/fullstack.rb", :after => "Fullstack::Cms.configure do |config|" do
68
+ %q{
69
+
70
+ config.localized = false
71
+
72
+ }
73
+ end
74
+
75
+
76
+ end
77
+ end
78
+
63
79
  def install_migrations
64
80
  generate "migration:from link menu page_part page redirect setting attachment photo text_page_part text_with_title_page_part"
65
81
  end
@@ -77,6 +93,10 @@ eos
77
93
  def domain
78
94
  host
79
95
  end
96
+
97
+ def localize
98
+ options[:localize]
99
+ end
80
100
 
81
101
  def user
82
102
  options[:user]
@@ -2,12 +2,56 @@ class Site::SiteController < ApplicationController
2
2
  include Pageable
3
3
  rescue_from ActiveRecord::RecordNotFound, :with => :render_404
4
4
  authorize :scope => "site", :resourceful => false
5
+ prepend_before_filter(:set_locale) if Fullstack::Cms.localized?
6
+
7
+ # =========
8
+ # = Pages =
9
+ # =========
5
10
 
6
11
  page :home, "/" do
7
-
8
12
  end
9
13
 
14
+ # ===========
15
+ # = Helpers =
16
+ # ===========
17
+
18
+ helper_method :current_locale
19
+
20
+ protected
21
+
22
+ def current_locale
23
+ I18n.locale.to_s
24
+ end
25
+
26
+ # ===================
27
+ # = Private Methods =
28
+ # ===================
29
+
10
30
  private
31
+
32
+ def set_locale
33
+ I18n.locale = "#{params[:locale]}".to_sym if params[:locale]
34
+ render_404 if I18n.locale.nil? || !I18n.available_locales.include?(I18n.locale.to_sym)
35
+ end
36
+
37
+ def instantiate_resource_by_slug!(resource)
38
+ res = resource.find_by_slug!(params[:slug])
39
+ instance_variable_set("@#{resource.name.underscore}", res)
40
+ @object = res
41
+ res
42
+ end
43
+
44
+ alias :resource_by_slug! :instantiate_resource_by_slug!
45
+
46
+ def instantiate_resource_by_slug_and_locale!(resource)
47
+ res = resource.find_by_slug_and_locale!(params[:slug], current_locale)
48
+ instance_variable_set("@#{resource.name.underscore}", res)
49
+ @object = res
50
+ res
51
+ end
52
+
53
+ alias :resource_by_slug_and_locale! :instantiate_resource_by_slug_and_locale!
54
+
11
55
  def render_404
12
56
  render :file => Rails.root.join("public", "404.html"), :layout => false, :status => :not_found
13
57
  end
@@ -2,24 +2,40 @@
2
2
  <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
3
3
  <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
4
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]-->
5
+ <!--[if gt IE 8]><!--> <html class="no-js" lang="<%= I18n.locale %>"> <!--<![endif]-->
6
6
  <%= render :partial => "site/head" %>
7
- <body>
7
+ <body<%= home_page? ? ' class="home"' : '' %>>
8
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
9
  <div id="fb-root">
10
10
  </div>
11
+
12
+
13
+ <%= render :partial => "site/nav" %>
14
+
11
15
  <header class="container header">
12
16
  <%= render :partial => "site/header" %>
13
17
  </header>
14
18
  <div class="container">
15
- <div class="main<%= home? ? ' home' : '' %>" role="main">
19
+ <div class="main<%= home_page? ? ' home' : '' %>" role="main">
16
20
  <%= yield %>
17
21
  </div>
18
22
 
19
23
  </div>
20
- <footer class="container footer">
21
- <%= render :partial => "site/footer" %>
22
- </footer>
24
+
25
+ <% if content_for? :prefooter %>
26
+ <div class="prefooter-wrapper">
27
+ <div class="container">
28
+ <%= yield :prefooter %>
29
+ </div>
30
+ </div>
31
+ <% end %>
32
+
33
+ <div class="footer-wrapper">
34
+ <div class="container">
35
+ <%= render :partial => "site/footer" %>
36
+ </div>
37
+
38
+ </div>
23
39
 
24
40
  <%= render :partial => "site/javascripts" %>
25
41
  <%= render :partial => "site/google_analytics" %>
@@ -1,10 +1,20 @@
1
1
  <footer class="footer">
2
- <address>
3
- <strong><%= setting(:title) %></strong>
4
- <p><%= simple_format setting("contacts/address") %></p>
5
- <p><%= link_to setting("contacts/email"), "mailto:#{setting("contacts/email")}"%><br/>
6
- <%= setting("contacts/phone") %>
7
- </p>
2
+ <%= row do %>
3
+ <%= span(6) do %>
4
+ <div class="footer-logo">
5
+ <%= image_tag "/img/logo-footer.png" %>
6
+ </div>
7
+ <% end %>
8
+ <%= span(6) do %>
9
+ <address>
10
+ <strong><%= setting(:title).try(:titleize) %></strong>
11
+ <p><%= simple_format setting("contacts/address") %></p>
12
+ <p><%= link_to setting("contacts/email"), "mailto:#{setting("contacts/email")}"%><br/>
13
+ <%= setting("contacts/phone") %>
14
+ </p>
8
15
 
9
- </address>
16
+ </address>
17
+
18
+ <% end %>
19
+ <% end %>
10
20
  </footer>
@@ -4,16 +4,34 @@
4
4
  <% else %>
5
5
  <%
6
6
  site_title = get_setting(:title, Settings.app.title)
7
+ site_slogan = get_setting(:slogan, Settings.app.slogan)
7
8
  site_description = get_setting(:description, Settings.app.slogan)
8
9
  %>
9
10
 
10
- <% if home? %>
11
+ <% if home_page? %>
11
12
  <%= meta_tags(
12
13
  :title => "#{site_title} - #{site_slogan}",
13
14
  :description => site_description,
14
15
  :og => {:type => "website"}
15
16
  )
16
17
  %>
18
+ <% elsif @object %>
19
+ <%= meta_tags(
20
+ :title => "#{meta_title || title_for(@object)} | #{site_title}",
21
+ :description => meta_description || description_for(@object),
22
+ :og => {:image => (meta_image || image_for(@object)), :type => (meta_type || "article")}
23
+ )
24
+ %>
25
+
26
+
27
+ <% elsif current_page %>
28
+ <%= meta_tags(
29
+ :title => "#{meta_title || current_page.title} | #{site_title}",
30
+ :description => (meta_description || current_page.description) ? (meta_description || current_page.description) : nil,
31
+ :og => {:image => meta_image, :type => (meta_type || "article")}
32
+ )
33
+ %>
34
+
17
35
  <% elsif meta_title %>
18
36
  <%= meta_tags(
19
37
  :title => "#{meta_title} | #{site_title}",
@@ -24,7 +42,7 @@
24
42
  <% end %>
25
43
  <% end %>
26
44
 
27
-
45
+ <link rel="shortcut icon" href="/favicon.ico?v=2" />
28
46
  <%= stylesheet_link_tag 'site/site' %>
29
47
  <%= yield :stylesheets %>
30
48
 
@@ -1,15 +1,12 @@
1
- <div class="row">
2
- <div class="span12">
3
- <div id="logo">
4
- <h1>
5
- <a href="/"><%= get_setting(:site_title, Settings.app.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>
1
+ <div class="row">
2
+ <div class="span12">
3
+
4
+ <div id="logo">
5
+ <h1>
6
+ <a href="/" rel="home" class="clearfix main-logo"><%= image_tag "/img/logo.png", :title => get_setting(:title, Settings.app.title) %></a>
7
+ </h1>
8
+ </div>
9
+ <div class="tagline"><%= get_setting(:slogan, Settings.app.slogan) %></div>
10
+
11
+ </div>
12
+ </div>
@@ -8,7 +8,7 @@
8
8
  var js, fjs = d.getElementsByTagName(s)[0];
9
9
  if (d.getElementById(id)) return;
10
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) %>";
11
+ js.src = "//connect.facebook.net/it_IT/all.js#xfbml=1&appId=<%= get_setting(:facebook_app_id, :locale => false) %>";
12
12
  fjs.parentNode.insertBefore(js, fjs);
13
13
  }(document, 'script', 'facebook-jssdk'));</script>
14
14
 
@@ -1,15 +1,17 @@
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>
1
+ <div class="navbar navbar-centered">
2
+ <div class="navbar-inner">
3
+ <div class="container">
4
+
5
+ <nav class=" main-menu">
6
+ <ul class="nav nav-top nav-pills">
7
+ <%= nav_item t("site.home", :default => "Home"), (Fullstack::Cms.localized? ? [:site, :home, I18n.locale] : "/") %>
8
+ <%= menu("main", :wrap => false) %>
9
+ </ul>
10
+ </nav>
11
+
12
+ </div>
13
+ </div>
14
+ </div>
15
+
16
+
17
+
@@ -0,0 +1,51 @@
1
+ <%= row do %>
2
+ <%= span(12) do %>
3
+ <section>
4
+ <h1 class="section-title">
5
+ <%= current_page.title %>
6
+ </h1>
7
+ </section>
8
+ <% end %>
9
+ <% end %>
10
+
11
+
12
+ <%= row do %>
13
+
14
+ <%= span(12) do %>
15
+
16
+
17
+ <% if @posts.any? %>
18
+ <ul class="unstyled index">
19
+ <% @posts.each do |post| %>
20
+
21
+ <li id="<%= post.slug %>" class="index-item">
22
+ <%= index_item(
23
+ :title => post.title,
24
+ :pubdate => post.created_at,
25
+ :excerpt => post.excerpt,
26
+ :link_url => page_path_for(post),
27
+ :link_label => t('continue_reading', :scope => 'site', :default => "Continue Reading"),
28
+ :image => post.image.url) %>
29
+ </li>
30
+
31
+ <% end %>
32
+ </ul>
33
+ <% end %>
34
+
35
+
36
+ <% end %>
37
+
38
+
39
+
40
+
41
+
42
+ <% end %>
43
+
44
+ <%= row do %>
45
+ <%= span(12) do %>
46
+ <%= paginate(@posts) %>
47
+
48
+ <% end %>
49
+ <% end %>
50
+
51
+
@@ -0,0 +1,42 @@
1
+ <%= row do %>
2
+ <%= span(12) do %>
3
+ <section>
4
+ <div class="section-title">
5
+ <%= t('site.contacts', :default => "Contacts") %>
6
+ </div>
7
+ </section>
8
+ <% end %>
9
+ <% end %>
10
+
11
+ <%= row do %>
12
+ <%= span(5) do %>
13
+ <% unless params[:success] %>
14
+
15
+ <%= semantic_form_for(Contact.new(:locale => I18n.locale), :url => { :controller => "site/site", :action => "contact" }, :builder => FormtasticBootstrap::FormBuilder) do |f| %>
16
+
17
+ <%= f.input :locale, :as => :hidden %>
18
+ <%= f.inputs do %>
19
+ <%= f.input :first_name, :input_html => {:class => "span5"} %>
20
+ <%= f.input :second_name, :input_html => {:class => "span5"} %>
21
+ <%= f.input :email, :input_html => {:class => "span5"} %>
22
+ <%= f.input :text, :input_html => {:class => "span5"} %>
23
+ <%= f.input :agreed_to_privacy %>
24
+ <% end %>
25
+ <div>
26
+ <input name="commit" type="submit" value="<%= t("send", :scope => :site, :default => "Send") %>" class="contact-submit">
27
+ </div>
28
+
29
+ <% end %>
30
+ <% else %>
31
+ <div class="alert">
32
+ <%= t("contacts.success", :default => "") %>
33
+ </div>
34
+ <% end %>
35
+ <% end %>
36
+
37
+ <%= span(7) do %>
38
+ <%= part("embed", :schema => :text) do |p| %>
39
+ <%= raw p.text %>
40
+ <% end %>
41
+ <% end %>
42
+ <% end %>
@@ -0,0 +1,38 @@
1
+ <%= row do %>
2
+ <%= span(12) do %>
3
+ <section>
4
+ <h1 class="section-title">
5
+ <%= @dish.title %>
6
+ </h1>
7
+ </section>
8
+ <% end %>
9
+ <% end %>
10
+
11
+
12
+ <%= row do %>
13
+
14
+ <%= span(12) do %>
15
+
16
+
17
+ <% if @dish.recipes.any? %>
18
+ <ul class="unstyled index">
19
+ <% @dish.recipes.order(:title).each do |recipe| %>
20
+
21
+ <li id="<%= recipe.slug %>" class="index-item">
22
+ <%= index_item(
23
+ :title => recipe.title,
24
+ :excerpt => recipe.excerpt,
25
+ :link_url => page_path_for(recipe),
26
+ :time => recipe.time,
27
+ :difficulty => recipe.difficulty,
28
+ :link_label => t('continue_reading', :scope => 'site', :default => "Continue Reading"),
29
+ :image => recipe.image.url) %>
30
+ </li>
31
+
32
+ <% end %>
33
+ </ul>
34
+ <% end %>
35
+
36
+
37
+ <% end %>
38
+ <% end %>
@@ -1 +1,133 @@
1
- <h1 class="page-header">Homepage</h1>
1
+ <section class="section section-home-channels">
2
+ <%= row do %>
3
+
4
+ <%= span(4) do %>
5
+ <%= part("sales_channel_1", :schema => 'channel_frame') do |part| %>
6
+
7
+
8
+ <%= channel_frame :image => part.image.url,
9
+ :can => part.can.url,
10
+ :title => part.title,
11
+ :excerpt => part.excerpt,
12
+ :link_label => part.link.try(:label),
13
+ :link_url => menu_link_url(part.link)
14
+ %>
15
+
16
+
17
+
18
+ <% end %>
19
+ <% end %>
20
+
21
+ <%= span(4) do %>
22
+ <%= part("sales_channel_2", :schema => 'channel_frame') do |part| %>
23
+
24
+
25
+ <%= channel_frame :image => part.image.url,
26
+ :can => part.can.url,
27
+ :title => part.title,
28
+ :excerpt => part.excerpt,
29
+ :link_label => part.link.try(:label),
30
+ :link_url => menu_link_url(part.link)
31
+ %>
32
+
33
+ <% end %>
34
+ <% end %>
35
+
36
+ <%= span(4) do %>
37
+ <%= part("sales_channel_3", :schema => 'channel_frame') do |part| %>
38
+
39
+
40
+ <%= channel_frame :image => part.image.url,
41
+ :can => part.can.url,
42
+ :title => part.title,
43
+ :excerpt => part.excerpt,
44
+ :link_label => part.link.try(:label),
45
+ :link_url => menu_link_url(part.link)
46
+ %>
47
+
48
+ <% end %>
49
+ <% end %>
50
+
51
+ <% end %>
52
+ </section>
53
+
54
+ <section class="section section-home-description">
55
+ <%= row do %>
56
+
57
+ <%= part("quote", :schema => 'quote') do |part| %>
58
+ <%= span(2) do %>
59
+ <%= image_tag part.image.url %>
60
+ <% end %>
61
+ <%= span(10) do %>
62
+ <%= part.excerpt %> &nbsp;
63
+ <%= link_to part.link.try(:label), menu_link_url(part.link), :class => "btn btn-go" %>
64
+ <% end %>
65
+ <% end %>
66
+
67
+
68
+
69
+ <% end %>
70
+ </section>
71
+
72
+ <section class="section section-home-bottom">
73
+
74
+ <%= row do %>
75
+
76
+ <%= span(4) do %>
77
+ <%= part("index_box_1", :schema => :index_box) do |part| %>
78
+ <%= index_box(:images => part.photos.map {|p| p.url(:box)},
79
+ :title => part.title,
80
+ :excerpt => part.excerpt,
81
+ :link_label => part.link.try(:label),
82
+ :link_url => menu_link_url(part.link), :video => part.video) %>
83
+
84
+ <% end %>
85
+ <% end %>
86
+
87
+ <%= span(4) do %>
88
+ <%= part("index_box_2", :schema => :index_box) do |part| %>
89
+ <%= index_box(:images => (part.photos || []).map {|p| p.url(:box)},
90
+ :title => part.title,
91
+ :excerpt => part.excerpt,
92
+ :link_label => part.link.try(:label),
93
+ :link_url => menu_link_url(part.link), :video => part.video) %>
94
+
95
+ <% end %>
96
+ <% end %>
97
+
98
+ <%= span(4) do %>
99
+ <%= part("index_box_3", :schema => :index_box) do |part| %>
100
+ <%= index_box(:images => (part.photos || []).map {|p| p.url(:box)},
101
+ :title => part.title,
102
+ :excerpt => part.excerpt,
103
+ :link_label => part.link.try(:label),
104
+ :link_url => menu_link_url(part.link), :video => part.video) %>
105
+
106
+ <% end %>
107
+ <% end %>
108
+
109
+
110
+
111
+
112
+ <% end %>
113
+ </section>
114
+
115
+
116
+ <% content_for :prefooter do -%>
117
+
118
+ <%
119
+ social_links = (links("social") || []).to(3)
120
+ %>
121
+
122
+ <% if social_links.any? %>
123
+ <% colspan = (12 / social_links.size) %>
124
+ <%= row do %>
125
+ <% social_links.each do |link| %>
126
+ <%= span(colspan) do %>
127
+ <%= link_to image_tag(link.icon.url(:i48)), menu_link_url(link), :rel => "tooltip", :title => link.label %>
128
+ <% end %>
129
+ <% end %>
130
+ <% end %>
131
+ <% end %>
132
+
133
+ <% end %>
@@ -0,0 +1,51 @@
1
+ <%= row do %>
2
+ <%= span(12) do %>
3
+ <section>
4
+ <h1 class="section-title">
5
+ <%= @line.title %>
6
+ </h1>
7
+ </section>
8
+
9
+ <% if @line.products.any? %>
10
+
11
+ <section class="clearfix shelf-wrapper" data-offset-top="20">
12
+ <div class="shelf">
13
+ <ul class="hl clearfix">
14
+ <% @line.products.order('position').each do |product| %>
15
+ <li class="can">
16
+ <%= link_to "##{product.slug}", :title => product.title, :rel => 'tooltip' do %>
17
+ <%= image_tag product.can.url %>
18
+ <% end %>
19
+ </li>
20
+ <% end %>
21
+ </ul>
22
+
23
+ </div>
24
+
25
+ </section>
26
+
27
+ <% end %>
28
+ <section>
29
+ <div>
30
+ <%= raw @line.text %>
31
+ </div>
32
+ </section>
33
+ <% end %>
34
+ <% end %>
35
+
36
+ <% if @line.products.any? %>
37
+ <ul class="unstyled index">
38
+ <% @line.products.order('position').each do |product| %>
39
+
40
+ <li id="<%= product.slug %>" class="index-item">
41
+ <%= index_item(
42
+ :title => product.title,
43
+ :excerpt => product.excerpt,
44
+ :link_url => page_path_for(product),
45
+ :link_label => t('continue_reading', :scope => 'site', :default => "Continue Reading"),
46
+ :image => product.index_photo.url) %>
47
+ </li>
48
+
49
+ <% end %>
50
+ </ul>
51
+ <% end %>
@@ -0,0 +1,20 @@
1
+ <%= row do %>
2
+ <%= span(3) do %>
3
+ <div class="mb1">
4
+ <%= image_tag @post.image %>
5
+ </div>
6
+ <div class="clearfix">
7
+ <%= render :partial => "site/share_buttons_big" %>
8
+ </div>
9
+ <% end %>
10
+ <%= span(9) do %>
11
+ <h1>
12
+ <%= @post.title %>
13
+ </h1>
14
+ <section>
15
+ <%= l(@post.created_at, :format => :pubdate) %>
16
+ </section>
17
+
18
+ <%= raw @post.text %>
19
+ <% end %>
20
+ <% end %>
@@ -0,0 +1,56 @@
1
+ <%= row do %>
2
+ <%= span(12) do %>
3
+ <section>
4
+ <h1 class="section-title">
5
+ <%= @product.title %>
6
+ </h1>
7
+ </section>
8
+ <% end %>
9
+ <% end %>
10
+ <%= row do %>
11
+ <%= span(4) do %>
12
+ <section>
13
+ <%= image_tag @product.photo.url %>
14
+ </section>
15
+ <h3><%= t(:other_products, :scope => "site", :default => "Other products") %></h3>
16
+ <ul class="thumbnails">
17
+ <% (@product.line.products - [@product]).each do |product| %>
18
+ <li>
19
+ <%= link_to page_url_for(product), :title => product.title, :rel => 'tooltip', :class => "thumbnail" do %>
20
+ <%= image_tag product.index_photo.url(:icon), :height => "60", :width => "60" %>
21
+ <% end %>
22
+ </li>
23
+
24
+ <% end %>
25
+
26
+ </ul>
27
+ <% end %>
28
+ <%= span(8) do %>
29
+ <section>
30
+ <div>
31
+ <%= raw @product.text %>
32
+ </div>
33
+ </section>
34
+ <section>
35
+ <h3><%= t(:recipes_with, :scope => "site", :default => "Recipes with") %> <%= @product.title %></h3>
36
+ <% @product.recipes.in_groups_of(4, false).each do |recipes| %>
37
+ <section>
38
+ <%= row do %>
39
+
40
+ <% recipes.each do |recipe| %>
41
+ <%= span(4) do %>
42
+ <%= link_to page_url_for(recipe), :title => recipe.title, :rel => 'tooltip', :class => "image-link" do %>
43
+ <%= image_tag recipe.image.url(:thumb) %>
44
+ <% end %>
45
+ <% end %>
46
+ <% end %>
47
+
48
+ <% end %>
49
+
50
+ </section>
51
+
52
+ <% end %>
53
+
54
+ </section>
55
+ <% end %>
56
+ <% end %>
@@ -0,0 +1,37 @@
1
+ <%= row do %>
2
+ <%= span(12) do %>
3
+ <section class="section-title">
4
+ <%= current_page.title %>
5
+
6
+ </section>
7
+ <% end %>
8
+ <% end %>
9
+
10
+ <%= row do %>
11
+ <%= span(3) do %>
12
+ <div class="mb1">
13
+ <%= image_tag @recipe.image %>
14
+ </div>
15
+ <div class="clearfix">
16
+ <%= render :partial => "site/share_buttons_big" %>
17
+ </div>
18
+ <% end %>
19
+ <%= span(9) do %>
20
+ <h1>
21
+ <%= @recipe.title %>
22
+ </h1>
23
+ <div class="mb1">
24
+ <ul class="unstyled">
25
+ <li>
26
+ <i class="icon icon-time"></i> <%= t("time", :scope => "site", :default => "Time") %>: <%= @recipe.time %> <%= t("site.mins", :default => "mins." ) %>
27
+ </li>
28
+ <li>
29
+ <i class="icon icon-star"></i> <%= t("difficulty", :scope => "site", :default => "Difficulty") %>: <%= @recipe.difficulty %>
30
+ </li>
31
+ </ul>
32
+
33
+ </div>
34
+
35
+ <%= raw @recipe.text %>
36
+ <% end %>
37
+ <% end %>
@@ -0,0 +1,36 @@
1
+ <%= row do %>
2
+ <%= span(12) do %>
3
+ <section>
4
+ <div class="section-title">
5
+ <%= current_page.title %>
6
+ </div>
7
+ </section>
8
+ <% end %>
9
+ <% end %>
10
+
11
+
12
+ <% @dishes.in_groups_of(3, false).each do |dishes| %>
13
+ <section>
14
+ <%= row do %>
15
+
16
+ <% dishes.each do |dish| %>
17
+
18
+
19
+ <%= span(4) do %>
20
+ <%= index_box(:images => [dish.image.url],
21
+ :title => dish.title,
22
+ :excerpt => dish.excerpt,
23
+ :link_label => dish.title,
24
+ :link_url => page_path_for(dish)) %>
25
+ <% end %>
26
+
27
+ <% end %>
28
+
29
+ <% end %>
30
+ </section>
31
+
32
+ <% end %>
33
+
34
+
35
+
36
+
@@ -0,0 +1,41 @@
1
+ <div class="mb1">
2
+ <%= row do %>
3
+ <%= span(12) do %>
4
+ <section>
5
+ <div class="section-title">
6
+ <%= @sales_channel.title %>
7
+ </div>
8
+ </section>
9
+ <section>
10
+ <div>
11
+ <%= raw @sales_channel.text %>
12
+ </div>
13
+ </section>
14
+ <% end %>
15
+ <% end %>
16
+
17
+ </div>
18
+
19
+ <% @sales_channel.lines.in_groups_of(3, false).each do |lines| %>
20
+ <section>
21
+ <%= row do %>
22
+
23
+ <% lines.each do |line| %>
24
+
25
+
26
+ <%= span(4) do %>
27
+ <%= index_box(:images => [line.image.url],
28
+ :title => line.title,
29
+ :excerpt => line.excerpt,
30
+ :link_label => line.label,
31
+ :link_url => page_path_for(line)) %>
32
+ <% end %>
33
+
34
+ <% end %>
35
+
36
+ <% end %>
37
+ </section>
38
+
39
+ <% end %>
40
+
41
+
@@ -0,0 +1,22 @@
1
+ <%= row do %>
2
+ <%= span(4) do %>
3
+ <% @text.photos.each do |photo| %>
4
+ <%= link_to(photo.url, :rel => "facebox", :class => "thumbnail-vertical") do %>
5
+ <%= image_tag photo.url(:box), :class => :desaturate %>
6
+ <% end %>
7
+ <% end %>
8
+ <% end %>
9
+ <%= span(8) do %>
10
+ <section>
11
+ <div class="section-title">
12
+ <%= @text.section %>
13
+ </div>
14
+ </section>
15
+ <section>
16
+ <h1 class='title'><%= @text.title %></h1>
17
+ <div>
18
+ <%= raw @text.text %>
19
+ </div>
20
+ </section>
21
+ <% end %>
22
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <div class="video-thumbnail">
2
+ <iframe src='<%= video_embed(params[:url]) %>' width="600" height="400"></iframe>
3
+ </div>
@@ -12,8 +12,6 @@ Fullstack::Cms.configure do |config|
12
12
  end
13
13
 
14
14
  admin.group :contents do |g|
15
- g.resource :texts
16
- g.resource :prices
17
15
  end
18
16
 
19
17
  admin.group :users do |g|
@@ -25,7 +23,7 @@ Fullstack::Cms.configure do |config|
25
23
  # = Linkables =
26
24
  # =============
27
25
 
28
- config.linkables = %w(pages texts)
26
+ config.linkables = %w(pages)
29
27
 
30
28
  # =========
31
29
  # = Menus =
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fullstack-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.21
4
+ version: 0.2.22
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-15 00:00:00.000000000 Z
12
+ date: 2012-09-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fullstack-admin
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 0.1.46
21
+ version: 0.1.47
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
- version: 0.1.46
29
+ version: 0.1.47
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: ars-permalink
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -296,7 +296,18 @@ files:
296
296
  - lib/generators/fullstack/cms/templates/rails/app/views/site/_map.html.erb
297
297
  - lib/generators/fullstack/cms/templates/rails/app/views/site/_nav.html.erb
298
298
  - lib/generators/fullstack/cms/templates/rails/app/views/site/_share_buttons_big.html.erb
299
+ - lib/generators/fullstack/cms/templates/rails/app/views/site/site/blog.html.erb
300
+ - lib/generators/fullstack/cms/templates/rails/app/views/site/site/contacts.html.erb
301
+ - lib/generators/fullstack/cms/templates/rails/app/views/site/site/dish.html.erb
299
302
  - lib/generators/fullstack/cms/templates/rails/app/views/site/site/home.html.erb
303
+ - lib/generators/fullstack/cms/templates/rails/app/views/site/site/line.html.erb
304
+ - lib/generators/fullstack/cms/templates/rails/app/views/site/site/post.html.erb
305
+ - lib/generators/fullstack/cms/templates/rails/app/views/site/site/product.html.erb
306
+ - lib/generators/fullstack/cms/templates/rails/app/views/site/site/recipe.html.erb
307
+ - lib/generators/fullstack/cms/templates/rails/app/views/site/site/recipes.html.erb
308
+ - lib/generators/fullstack/cms/templates/rails/app/views/site/site/sales_channel.html.erb
309
+ - lib/generators/fullstack/cms/templates/rails/app/views/site/site/text.html.erb
310
+ - lib/generators/fullstack/cms/templates/rails/app/views/site/site/video.html.erb
300
311
  - lib/generators/fullstack/cms/templates/rails/config/fullstack.rb
301
312
  - lib/generators/fullstack/cms/templates/rails/config/initializers/ckeditor_controller.rb
302
313
  - lib/generators/fullstack/cms/templates/rails/config/initializers/devise_controller.rb
@@ -333,7 +344,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
333
344
  version: '0'
334
345
  segments:
335
346
  - 0
336
- hash: 1952764940348626948
347
+ hash: -2772436411612712480
337
348
  required_rubygems_version: !ruby/object:Gem::Requirement
338
349
  none: false
339
350
  requirements: