trusty-cms 2.0.2.pre.beta → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +5 -13
  2. data/.gitignore +2 -0
  3. data/CONTRIBUTORS.md +3 -1
  4. data/Gemfile +6 -1
  5. data/Gemfile.lock +100 -80
  6. data/INSTALL.md +7 -6
  7. data/README.md +3 -1
  8. data/Rakefile +24 -4
  9. data/app/assets/javascripts/admin/jquery-ui.js +3787 -2339
  10. data/app/assets/javascripts/admin/page-edit.js +3 -3
  11. data/app/assets/javascripts/admin/tabcontrol.js.erb +16 -16
  12. data/app/assets/javascripts/admin/treetable.js +4 -2
  13. data/app/assets/stylesheets/admin/_base.scss +4 -4
  14. data/app/assets/stylesheets/admin/modules/_links.scss +1 -1
  15. data/app/assets/stylesheets/admin/partials/_content.scss +9 -2
  16. data/app/assets/stylesheets/admin/partials/_forms.scss +97 -29
  17. data/app/assets/stylesheets/admin/partials/_header.scss +2 -3
  18. data/app/assets/stylesheets/admin/partials/_index.scss +9 -6
  19. data/app/assets/stylesheets/admin/partials/_layout.scss +1 -2
  20. data/app/assets/stylesheets/admin/partials/_popup.scss +0 -11
  21. data/app/assets/stylesheets/admin/partials/_tabcontrol.scss +4 -4
  22. data/app/assets/stylesheets/admin/partials/_typography.scss +4 -0
  23. data/app/controllers/admin/pages_controller.rb +9 -1
  24. data/app/controllers/admin/references_controller.rb +8 -1
  25. data/app/controllers/admin/users_controller.rb +1 -1
  26. data/app/controllers/admin/welcome_controller.rb +3 -3
  27. data/app/controllers/site_controller.rb +1 -1
  28. data/app/helpers/admin/node_helper.rb +4 -4
  29. data/app/models/trusty_cms/config.rb +2 -1
  30. data/app/views/admin/configuration/edit.html.haml +2 -2
  31. data/app/views/admin/configuration/show.html.haml +1 -1
  32. data/app/views/admin/layouts/_form.html.haml +1 -1
  33. data/app/views/admin/layouts/remove.html.haml +1 -1
  34. data/app/views/admin/pages/_fields.html.haml +1 -1
  35. data/app/views/admin/pages/_node.html.haml +2 -2
  36. data/app/views/admin/pages/edit.html.haml +1 -1
  37. data/app/views/admin/pages/remove.html.haml +2 -2
  38. data/app/views/admin/preferences/edit.html.haml +36 -36
  39. data/app/views/admin/users/_form.html.haml +1 -1
  40. data/app/views/admin/users/_password_fields.html.haml +1 -1
  41. data/app/views/admin/users/remove.html.haml +1 -1
  42. data/app/views/admin/welcome/login.html.haml +1 -1
  43. data/app/views/layouts/application.html.haml +18 -16
  44. data/config/application.rb +2 -1
  45. data/config/boot.rb +0 -1
  46. data/config/database.mysql.yml +3 -3
  47. data/config/environments/development.rb +1 -0
  48. data/config/environments/test.rb +2 -4
  49. data/config/initializers/trusty_cms_config.rb +1 -0
  50. data/config/routes.rb +1 -0
  51. data/db/migrate/001_create_radiant_tables.rb +2 -1
  52. data/db/migrate/20100805155020_convert_page_metas.rb +0 -13
  53. data/db/migrate/20110902203823_add_allowed_children_cache_to_pages.rb +0 -4
  54. data/db/migrate/20120209231801_change_pages_allowed_children_cache_to_text.rb +0 -1
  55. data/lib/generators/instance/templates/databases/mysql.yml +3 -3
  56. data/lib/generators/instance/templates/instance_gemfile +2 -2
  57. data/lib/generators/trusty_cms/templates/database.yml.erb +4 -4
  58. data/lib/generators/trusty_cms/templates/routes.rb.erb +0 -1
  59. data/lib/login_system.rb +1 -1
  60. data/lib/tasks/database.rake +1 -3
  61. data/lib/tasks/framework.rake +1 -1
  62. data/lib/trusty_cms.rb +1 -1
  63. data/lib/trusty_cms/admin_ui.rb +2 -0
  64. data/lib/trusty_cms/extension_migrator.rb +1 -2
  65. data/lib/trusty_cms/initializer.rb +1 -1
  66. data/lib/trusty_cms/setup.rb +1 -1
  67. data/spec/ci/database.mysql.yml +1 -1
  68. data/spec/dummy/README.rdoc +28 -0
  69. data/spec/dummy/Rakefile +5 -0
  70. data/spec/dummy/bin/bundle +3 -0
  71. data/spec/dummy/bin/rails +4 -0
  72. data/spec/dummy/bin/rake +4 -0
  73. data/spec/dummy/bin/setup +29 -0
  74. data/spec/dummy/config.ru +4 -0
  75. data/spec/dummy/config/application.rb +152 -0
  76. data/spec/dummy/config/boot.rb +6 -0
  77. data/spec/dummy/config/database.yml +28 -0
  78. data/spec/dummy/config/environment.rb +5 -0
  79. data/spec/dummy/config/environments/development.rb +49 -0
  80. data/spec/dummy/config/environments/production.rb +79 -0
  81. data/spec/dummy/config/environments/test.rb +42 -0
  82. data/spec/dummy/config/initializers/assets.rb +11 -0
  83. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  84. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  85. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  86. data/spec/dummy/config/initializers/inflections.rb +16 -0
  87. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  88. data/spec/dummy/config/initializers/session_store.rb +3 -0
  89. data/spec/dummy/config/initializers/trusty_cms_config.rb +20 -0
  90. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  91. data/spec/dummy/config/locales/en.yml +23 -0
  92. data/spec/dummy/config/routes.rb +0 -0
  93. data/spec/dummy/config/secrets.yml +22 -0
  94. data/spec/dummy/db/schema.rb +122 -0
  95. data/spec/dummy/public/404.html +67 -0
  96. data/spec/dummy/public/422.html +67 -0
  97. data/spec/dummy/public/500.html +66 -0
  98. data/spec/dummy/public/favicon.ico +0 -0
  99. data/spec/features/pages_spec.rb +2 -2
  100. data/spec/rails_helper.rb +3 -4
  101. data/spec/spec_helper.rb +13 -77
  102. data/spec/support/custom_actions.rb +1 -0
  103. data/trusty_cms.gemspec +4 -2
  104. metadata +171 -182
  105. data/db/migrate/003_rename_behavior_column.rb +0 -9
  106. data/db/migrate/010_merge_behaviors_and_pages.rb +0 -57
  107. data/db/migrate/011_rename_type_column_on_page_to_class_name.rb +0 -9
  108. data/db/migrate/019_add_salt_to_users.rb +0 -11
  109. data/spec/helpers/regions_helper_spec.rb +0 -16
@@ -1,6 +1,5 @@
1
1
  body.reversed {
2
- background-color: #9e9e9e;
3
- color: white;
2
+ background-color: #737272;
4
3
  }
5
4
 
6
5
  body.single_form {
@@ -54,22 +54,11 @@ div.popup {
54
54
  }
55
55
  .buttons {
56
56
  border-top: 1px solid #e5e5e5;
57
- background: whitesmoke;
58
- font-size: 85%;
59
- margin: 1.5em -20px -10px;
60
- padding: 10px;
61
57
  text-align: right;
62
58
  input.button {
63
59
  font-size: 120%;
64
60
  }
65
61
  button {
66
- font-size: 110%;
67
- padding: 4px 15px 5px;
68
- background: whitesmoke;
69
- border: 1px solid #959595;
70
- @include border-radius(100px);
71
- @include single-box-shadow(white, 0, 2px, 0, inset);
72
- @include linear-gradient(color-stops(#dddddd 0%, #eeeeee 15%, white 100%));
73
62
  &.default {
74
63
  border: 1px solid #154ca6;
75
64
  @include single-box-shadow(#c7e0f6, 0, 2px, 1px, inset);
@@ -6,8 +6,8 @@
6
6
  width: 100%;
7
7
  margin-right: -4px;
8
8
  .tab {
9
- background-color: #cac8c0;
10
- color: #7f7f7f;
9
+ background-color: #e4e4e4;
10
+ color: black;
11
11
  display: inline-block;
12
12
  font-size: 90%;
13
13
  text-align: left;
@@ -18,11 +18,11 @@
18
18
  @include border-top-radius(6px);
19
19
  &.here {
20
20
  background-color: white;
21
- color: black;
21
+ color: #737272;
22
22
  font-weight: bold;
23
23
  }
24
24
  span:hover {
25
- color: black;
25
+ color: #737272;
26
26
  }
27
27
  .close {
28
28
  margin-top: -4px;
@@ -75,3 +75,7 @@ input.big {
75
75
  table {
76
76
  border-collapse: collapse;
77
77
  }
78
+
79
+ .fa{
80
+ color: #94BDC3;
81
+ }
@@ -47,7 +47,7 @@ class Admin::PagesController < Admin::ResourceController
47
47
 
48
48
  def model_class
49
49
  if Page.descendants.any? { |d| d.to_s == params[:page_class] }
50
- params[:page_class].constantize
50
+ verify_page_class(params[:page_class])
51
51
  elsif params[:page_id]
52
52
  Page.find(params[:page_id]).children
53
53
  else
@@ -89,4 +89,12 @@ class Admin::PagesController < Admin::ResourceController
89
89
  @meta << {:field => "slug", :type => "text_field", :args => [{:class => 'textbox', :maxlength => 100}]}
90
90
  @meta << {:field => "breadcrumb", :type => "text_field", :args => [{:class => 'textbox', :maxlength => 160}]}
91
91
  end
92
+
93
+ def verify_page_class(page_class)
94
+ if page_class.constantize.ancestors.include?(Page)
95
+ page_class.constantize
96
+ else
97
+ raise "I'm not allowed to constantize #{page_class}!"
98
+ end
99
+ end
92
100
  end
@@ -1,7 +1,14 @@
1
1
  class Admin::ReferencesController < ApplicationController
2
2
  def show
3
3
  respond_to do |format|
4
- format.any { render :action => params[:type], :content_type => "text/html", :layout => false }
4
+ render_allowed_type(params[:type])
5
+ format.any { render :action => @type, :content_type => "text/html", :layout => false }
5
6
  end
6
7
  end
8
+
9
+ private
10
+
11
+ def render_allowed_type(type)
12
+ @type = type
13
+ end
7
14
  end
@@ -24,7 +24,7 @@ class Admin::UsersController < Admin::ResourceController
24
24
  def ensure_deletable
25
25
  if current_user.id.to_s == params[:id].to_s
26
26
  announce_cannot_delete_self
27
- redirect_to admin_users_url
27
+ redirect_to admin_users_path
28
28
  end
29
29
  end
30
30
 
@@ -4,7 +4,7 @@ class Admin::WelcomeController < ApplicationController
4
4
  skip_before_filter :verify_authenticity_token
5
5
 
6
6
  def index
7
- redirect_to admin_pages_url
7
+ redirect_to admin_pages_path
8
8
  end
9
9
 
10
10
  def login
@@ -18,7 +18,7 @@ class Admin::WelcomeController < ApplicationController
18
18
  current_user.remember_me
19
19
  set_session_cookie
20
20
  end
21
- redirect_to(session[:return_to] || welcome_url)
21
+ redirect_to(session[:return_to] || welcome_path)
22
22
  session[:return_to] = nil
23
23
  end
24
24
  end
@@ -28,7 +28,7 @@ class Admin::WelcomeController < ApplicationController
28
28
  self.current_user.forget_me if self.current_user
29
29
  self.current_user = nil
30
30
  announce_logged_out
31
- redirect_to login_url
31
+ redirect_to login_path
32
32
  end
33
33
 
34
34
  private
@@ -34,7 +34,7 @@ class SiteController < ApplicationController
34
34
  render :template => 'site/not_found', :status => 404, layout: false
35
35
  end
36
36
  rescue Page::MissingRootPageError
37
- redirect_to welcome_url
37
+ redirect_to welcome_path
38
38
  end
39
39
 
40
40
  def cacheable_request?
@@ -1,18 +1,18 @@
1
1
  module Admin::NodeHelper
2
2
 
3
- def render_nodes(page, starting_index, parent_index = nil)
3
+ def render_nodes(page, starting_index, parent_index = nil, simple = false)
4
4
  @rendered_html = ""
5
- render_node page, starting_index, parent_index
5
+ render_node page, starting_index, parent_index, simple
6
6
  @rendered_html
7
7
  end
8
8
 
9
- def render_node(page, index, parent_index = nil)
9
+ def render_node(page, index, parent_index = nil, simple = false)
10
10
 
11
11
  @current_node = prepare_page(page)
12
12
 
13
13
  @rendered_html += (render :partial => 'admin/pages/node',
14
14
  :locals => {level: index, index: index, parent_index: parent_index,
15
- page: page, simple: false, branch: (page.children.count > 0) })
15
+ page: page, simple: simple, branch: (page.children.count > 0) })
16
16
  index
17
17
  end
18
18
 
@@ -71,6 +71,7 @@ module TrustyCms
71
71
  self.table_name = "config"
72
72
  after_save :update_cache
73
73
  attr_reader :definition
74
+ attr_accessible :key
74
75
 
75
76
  class ConfigError < RuntimeError; end
76
77
 
@@ -88,7 +89,7 @@ module TrustyCms
88
89
 
89
90
  def []=(key, value)
90
91
  if table_exists?
91
- setting = find_or_initialize_by(key: key)
92
+ setting = where(key: key).first_or_initialize
92
93
  setting.value = value
93
94
  end
94
95
  end
@@ -6,7 +6,7 @@
6
6
  %h1 Configuration
7
7
 
8
8
  - main.edit_form do
9
- = form_for :trusty_config, :url => admin_configuration_url, :html => {"data-onsubmit_status"=>"Saving changes&#8230;", :method => :put} do |f|
9
+ = form_for :trusty_config, :url => admin_configuration_path, :html => {"data-onsubmit_status"=>"Saving changes&#8230;", :method => :put} do |f|
10
10
  = render_region :form_top
11
11
  - render_region :form do |form|
12
12
  - form.edit_site do
@@ -35,4 +35,4 @@
35
35
  .buttons
36
36
  %input.button{:type=>"submit", :value=>"Save Changes"}/
37
37
  or
38
- = link_to "Cancel", admin_configuration_url
38
+ = link_to "Cancel", admin_configuration_path, class: 'alt'
@@ -39,7 +39,7 @@
39
39
  %h3
40
40
  - if admin?
41
41
  .actions
42
- = button_to t("edit_configuration"), edit_admin_configuration_url, :method => :get
42
+ = button_to t("edit_configuration"), edit_admin_configuration_path, :method => :get
43
43
  Configuration
44
44
  - TrustyCms.config.site_settings.each do |site_setting|
45
45
  %p.ruled
@@ -33,6 +33,6 @@
33
33
  = save_model_button @layout
34
34
  = save_model_and_continue_editing_button @layout
35
35
  = t('or')
36
- = link_to t('cancel'), admin_layouts_url
36
+ = link_to t('cancel'), admin_layouts_path, class: 'alt'
37
37
  - form_bottom.edit_timestamp do
38
38
  = updated_stamp @layout
@@ -13,4 +13,4 @@
13
13
  .buttons
14
14
  %input.button{:type => "submit", :value => t('delete_layout') }/
15
15
  = t('or')
16
- = link_to t('cancel'), admin_layouts_url
16
+ = link_to t('cancel'), admin_layouts_path, class: 'alt'
@@ -57,7 +57,7 @@
57
57
  = save_model_and_continue_editing_button(@page)
58
58
  = submit_tag(t('preview', :default => 'Preview'), :class => 'button', :id => 'show-preview')
59
59
  = t('or')
60
- = link_to t('cancel'), admin_pages_url
60
+ = link_to t('cancel'), admin_pages_url, class: 'alt'
61
61
  #preview_panel.fullcover.grey_out{:style => 'display: none;'}
62
62
  %iframe{:id => 'page-preview', :class => 'fullcover', :name => 'page-preview', :src => ActionController::Base.relative_url_root.to_s + '/loading-iframe.html', :frameborder => 0, :scrolling => "auto"}
63
63
  .preview_tools
@@ -7,7 +7,7 @@
7
7
  = icon
8
8
  = node_title
9
9
  - else
10
- = (link_to("#{icon} #{node_title}".html_safe, edit_admin_page_url(page), :title => page.path)).html_safe
10
+ = (link_to("#{icon} #{node_title}".html_safe, edit_admin_page_path(page), :title => page.path)).html_safe
11
11
  = page_type
12
12
  = spinner
13
13
  - node.status_column do
@@ -18,4 +18,4 @@
18
18
  - unless simple
19
19
  %td.actions
20
20
  = page.add_child_option
21
- = page.remove_option
21
+ = page.remove_option
@@ -2,7 +2,7 @@
2
2
 
3
3
  - render_region :main do |main|
4
4
  - main.edit_header do
5
- %h1= t('edit_page')
5
+ %h1= ''
6
6
  - main.edit_form do
7
7
  = form_for @page, :as => :page, :url => admin_page_path(@page), :html => {:method => :put, :multipart => true, :id => 'edit_page', 'data-onsubmit_status'=>t('saving_changes')} do |fields|
8
8
  = render :partial => "fields", :object => fields
@@ -9,11 +9,11 @@
9
9
  .inset
10
10
  %table.index#site_map
11
11
  %tbody
12
- - render_nodes @page, @page.id
12
+ - render_nodes @page, @page.id, nil, true
13
13
  = @rendered_html.html_safe
14
14
 
15
15
  = form_for [:admin, @page.becomes(Page)], :html => {:method => :delete, 'data-onsubmit_status'=>"Removing pages&#8230;"} do
16
16
  .buttons
17
17
  %input.button{:type=>"submit", :value => t('delete_pages', :pages => pages) }/
18
18
  = t('or')
19
- = link_to t('cancel'), admin_pages_url
19
+ = link_to t('cancel'), admin_pages_path, class: 'alt'
@@ -6,39 +6,39 @@
6
6
  %h1= t('personal_preferences')
7
7
 
8
8
  - main.edit_form do
9
- = form_for @user, :url => admin_preferences_url, :html => { :method => :put, 'data-onsubmit_status' => "#{t('saving_preferences')}&#8230;" } do |f|
10
-
11
- = render :partial => 'admin/users/avatar'
12
-
13
- = render_region :form_top, :locals => {:f => f}
14
-
15
- - render_region :form, :locals => {:f => f} do |form|
16
- - form.edit_name do
17
- %p
18
- = f.label :name, t("name")
19
- = f.text_field :name, :class => "textbox", :size => 32, :maxlength => 100
20
-
21
- - form.edit_email do
22
- %p
23
- = f.label :email, t("email_address"), :class => "optional"
24
- = f.text_field "email", :class => 'textbox', :size => 32, :maxlength => 255
25
-
26
- - form.edit_username do
27
- %p
28
- = f.label :login, t("username")
29
- = f.text_field "login", :class => "textbox", :size => 32, :maxlength => 40, :required => true
30
-
31
- - form.edit_password do
32
- = render "admin/users/password_fields", :f => f
33
-
34
- - form.edit_locale do
35
- %p
36
- = f.label :locale, t('language')
37
- = f.select "locale", available_locales_select
38
-
39
- - render_region :form_bottom, :locals => {:f => f} do |form_bottom|
40
- - form_bottom.edit_buttons do
41
- .buttons
42
- = save_model_button @user
43
- = t('or')
44
- = link_to t('cancel'), admin_url
9
+ = form_for @user, :url => admin_preferences_path, :html => { :method => :put, 'data-onsubmit_status' => "#{t('saving_preferences')}&#8230;" } do |f|
10
+ %fieldset
11
+ = render :partial => 'admin/users/avatar'
12
+
13
+ = render_region :form_top, :locals => {:f => f}
14
+
15
+ - render_region :form, :locals => {:f => f} do |form|
16
+ - form.edit_name do
17
+ %p
18
+ = f.label :name, t("name")
19
+ = f.text_field :name, :class => "textbox", :size => 32, :maxlength => 100
20
+
21
+ - form.edit_email do
22
+ %p
23
+ = f.label :email, t("email_address"), :class => "optional"
24
+ = f.text_field "email", :class => 'textbox', :size => 32, :maxlength => 255
25
+
26
+ - form.edit_username do
27
+ %p
28
+ = f.label :login, t("username")
29
+ = f.text_field "login", :class => "textbox", :size => 32, :maxlength => 40, :required => true
30
+
31
+ - form.edit_password do
32
+ = render "admin/users/password_fields", :f => f
33
+
34
+ - form.edit_locale do
35
+ %p
36
+ = f.label :locale, t('language')
37
+ = f.select "locale", available_locales_select
38
+
39
+ - render_region :form_bottom, :locals => {:f => f} do |form_bottom|
40
+ - form_bottom.edit_buttons do
41
+ .buttons
42
+ = save_model_button @user
43
+ = t('or')
44
+ = link_to t('cancel'), admin_url, class: 'alt'
@@ -48,6 +48,6 @@
48
48
  = save_model_button(@user)
49
49
  = save_model_and_continue_editing_button(@user)
50
50
  = t('or')
51
- = link_to t('cancel'), admin_users_path
51
+ = link_to t('cancel'), admin_users_path, class: 'alt'
52
52
  - form_bottom.edit_timestamp do
53
53
  = updated_stamp @user
@@ -13,6 +13,6 @@
13
13
  - unless @user.new_record?
14
14
  %span
15
15
  = t('or')
16
- %a{:href=>"#", :onclick=>" $('#display_password').show(); $('#change_password').hide()"}= t('cancel')
16
+ %a{:href=>"#", :class=>"warning", :onclick=>" $('#display_password').show(); $('#change_password').hide()"}= t('cancel', class: 'alt')
17
17
 
18
18
 
@@ -13,4 +13,4 @@
13
13
  .buttons
14
14
  %input.button{:type=>"submit", :value => t('delete_user')}/
15
15
  = t('or')
16
- = link_to t('cancel'), admin_users_path
16
+ = link_to t('cancel'), admin_users_path, class: 'alt'
@@ -3,7 +3,7 @@
3
3
  #single_form
4
4
  %h1= t('please_login')
5
5
 
6
- = form_tag login_url do
6
+ = form_tag login_path do
7
7
  %p
8
8
  %label{:for=>"username_or_email"}= t('username_or_email')
9
9
  = text_field_tag "username_or_email", @username_or_email, :class => 'textbox', :maxlength => 40, :size => 40
@@ -31,22 +31,24 @@
31
31
  #page
32
32
  #header
33
33
  - if logged_in?
34
- #site_links
35
- = %{#{t('logged_in_as')} #{link_to h(current_user.name), edit_admin_preferences_path} &nbsp; (#{link_to t('log_out'), logout_path})}.html_safe
36
- &nbsp;
37
- = link_to t('view_site'), root_path, :id=>"view_site"
38
- %ul#navigation
39
- - nav_tabs.each do |tab|
40
- - if tab.visible?(current_user)
41
- %li{:class=>('current ' if current_tab?(tab)).to_s}
42
- = link_to translate_with_default(tab.name), (tab.first.relative_url if tab.first)
43
- #toolbar
44
- - if @current_tab and @current_tab.size > 1
45
- %ul#secondary_navigation
46
- - @current_tab.each do |sub_item|
47
- - if sub_item.visible?(current_user)
48
- %li= link_to translate_with_default(sub_item.name), sub_item.relative_url, :class=>('current' if current_item?(sub_item))
49
- = yield :toolbar
34
+ = render_region :before_nav
35
+ - render_region :navigation do |navigation|
36
+ #site_links
37
+ = %{#{t('logged_in_as')} #{link_to h(current_user.name), edit_admin_preferences_path} &nbsp; (#{link_to t('log_out'), logout_path})}.html_safe
38
+ &nbsp;
39
+ = link_to t('view_site'), root_path, :id=>"view_site"
40
+ %ul#navigation
41
+ - nav_tabs.each do |tab|
42
+ - if tab.visible?(current_user)
43
+ %li{:class=>('current ' if current_tab?(tab)).to_s}
44
+ = link_to translate_with_default(tab.name), (tab.first.relative_url if tab.first)
45
+ #toolbar
46
+ - if @current_tab and @current_tab.size > 1
47
+ %ul#secondary_navigation
48
+ - @current_tab.each do |sub_item|
49
+ - if sub_item.visible?(current_user)
50
+ %li= link_to translate_with_default(sub_item.name), sub_item.relative_url, :class=>('current' if current_item?(sub_item))
51
+ = yield :toolbar
50
52
  #main
51
53
  - if flash[:notice]
52
54
  #notice
@@ -8,6 +8,8 @@ require 'trusty_cms/extension_loader'
8
8
  require 'trusty_cms/initializer'
9
9
  require 'compass'
10
10
  require 'rack/cache'
11
+ require 'trustygems'
12
+
11
13
 
12
14
  if defined?(Bundler)
13
15
  # If you precompile assets before deploying to production, use this line
@@ -117,7 +119,6 @@ module TrustyCms
117
119
  html
118
120
  end
119
121
  end
120
-
121
122
  config.after_initialize do
122
123
  extension_loader.load_extensions
123
124
  extension_loader.load_extension_initalizers