diff --git a/Gemfile b/Gemfile index 38a92582..ceece7b6 100644 --- a/Gemfile +++ b/Gemfile @@ -97,7 +97,8 @@ group :test, :development do gem "watchr" gem "spork" gem "capybara" - gem 'rack-mini-profiler' + #gem 'rack-mini-profiler' + gem "better_errors" # gem 'yard' # gem "bluecloth" end diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 69a011d9..ec100871 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -114,7 +114,7 @@ class PagesController < ApplicationController end def check_frontend_open - if !Site.first.frontend_closed && current_user.nil? #Need to be change + if Site.first.frontend_open && current_user.nil? #Need to be change redirect_to '/admin/dashboards' end end diff --git a/app/models/site.rb b/app/models/site.rb index ccaab840..68fe40a4 100644 --- a/app/models/site.rb +++ b/app/models/site.rb @@ -12,7 +12,7 @@ class Site field :private_key, :type => Binary field :public_key, :type => Binary - field :frontend_closed, :type => Boolean, :default => false + field :frontend_open, :type => Boolean, :default => true field :backend_openness_on, :type => Boolean, :default => false field :desktop_closed, :type => Boolean, :default => false field :sitemap_menu_in_header, :type => Boolean, :default => false diff --git a/app/views/admin/sites/preference.html.erb b/app/views/admin/sites/preference.html.erb index 4115e2ec..61b802f8 100644 --- a/app/views/admin/sites/preference.html.erb +++ b/app/views/admin/sites/preference.html.erb @@ -114,10 +114,10 @@
- +
- <%= f.check_box :frontend_closed , :class=>"toggle-check"%> - Only can be viewed by users logged in + <%= f.check_box :frontend_open , :class=>"toggle-check"%> + If Checked, the frontend will be open for all users.
diff --git a/app/views/admin/sites/sitemap.html.erb b/app/views/admin/sites/sitemap.html.erb index 4adf90e0..98e87a47 100644 --- a/app/views/admin/sites/sitemap.html.erb +++ b/app/views/admin/sites/sitemap.html.erb @@ -12,32 +12,29 @@ <% content_for :side_bar do %> <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_site_info_path(@site), :icon => 'icons-cog', :side_bar_content => 'admin/sites/side_bar'} %> <% end %> - -

Sitemap

-
- + <% @site_valid_locales.each_with_index do |locale, i| %> +
  • > + + <%= I18nVariable.from_locale(locale) %> + +
  • + <% end %> + +
    - <% @site_valid_locales.each_with_index do |temp_locale, i| %> -
      +
        "> <%= render :partial => 'sitemap_block', :collection => @items, :locals => {:temp_locale => temp_locale} %>
      <% end %> -
    +
    -
    -
    - +
    <% content_for :page_specific_javascript do %>