fixes in sitemap, site preference
This commit is contained in:
parent
ae66e7257f
commit
4120be6f8e
3
Gemfile
3
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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -114,10 +114,10 @@
|
|||
<!-- Openness -->
|
||||
<div id="openness" class="tab-pane fade">
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= I18n.t('site.frontend_closed')%></label>
|
||||
<label class="control-label muted"><%= I18n.t('site.frontend_open')%></label>
|
||||
<div class="controls">
|
||||
<%= f.check_box :frontend_closed , :class=>"toggle-check"%>
|
||||
<span class="help-block">Only can be viewed by users logged in</span>
|
||||
<%= f.check_box :frontend_open , :class=>"toggle-check"%>
|
||||
<span class="help-block">If Checked, the frontend will be open for all users.</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
|
|
|
@ -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 %>
|
||||
|
||||
<section>
|
||||
<h3>Sitemap</h3>
|
||||
<div>
|
||||
|
||||
<div id="sitemap">
|
||||
|
||||
<ul id="map-tree-language" class="nav nav-pills">
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<li <%= ( i == 0 ) ? " class=active" : '' %>><a data-toggle="tab" href="#<%= locale %>"><%= I18nVariable.from_locale(locale) %></a>
|
||||
<li <%= ( i == 0 ) ? "class=active" : '' %>>
|
||||
<a data-toggle="tab" href="#<%= locale %>">
|
||||
<%= I18nVariable.from_locale(locale) %>
|
||||
</a>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content map-tree-content">
|
||||
<div class="line"></div>
|
||||
|
||||
<% @site_valid_locales.each_with_index do |temp_locale, i| %>
|
||||
<ul id="<%= temp_locale %>" class="map-tree tab-pane fade in active">
|
||||
<ul id="<%= temp_locale %>" class="map-tree tab-pane fade in <%= ( i == 0 ) ? "in active" : '' %>">
|
||||
<%= render :partial => 'sitemap_block', :collection => @items, :locals => {:temp_locale => temp_locale} %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<% content_for :page_specific_javascript do %>
|
||||
<script>
|
||||
|
|
|
@ -390,6 +390,7 @@ en:
|
|||
footer: Site footer
|
||||
footer_help: Footer Guide
|
||||
frontend_closed: Frontend Closed
|
||||
frontend_open: Frontend Open
|
||||
header: Site header
|
||||
info: Site information
|
||||
keywords: Site keywords
|
||||
|
|
|
@ -385,6 +385,7 @@ zh_tw:
|
|||
thumbnail: 縮圖
|
||||
site:
|
||||
frontend_closed: 前台關閉?
|
||||
frontend_open: 前台關閉 ?
|
||||
backend_openness_on: 開啟開放式後台(訪客可遊覽)
|
||||
default_image: 預設圖像
|
||||
description: 網站描述
|
||||
|
|
Loading…
Reference in New Issue