fixes in sitemap, site preference

This commit is contained in:
saurabhbhatia 2013-10-14 16:47:34 +08:00
parent ae66e7257f
commit 4120be6f8e
7 changed files with 21 additions and 21 deletions

View File

@ -97,7 +97,8 @@ group :test, :development do
gem "watchr" gem "watchr"
gem "spork" gem "spork"
gem "capybara" gem "capybara"
gem 'rack-mini-profiler' #gem 'rack-mini-profiler'
gem "better_errors"
# gem 'yard' # gem 'yard'
# gem "bluecloth" # gem "bluecloth"
end end

View File

@ -114,7 +114,7 @@ class PagesController < ApplicationController
end end
def check_frontend_open 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' redirect_to '/admin/dashboards'
end end
end end

View File

@ -12,7 +12,7 @@ class Site
field :private_key, :type => Binary field :private_key, :type => Binary
field :public_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 :backend_openness_on, :type => Boolean, :default => false
field :desktop_closed, :type => Boolean, :default => false field :desktop_closed, :type => Boolean, :default => false
field :sitemap_menu_in_header, :type => Boolean, :default => false field :sitemap_menu_in_header, :type => Boolean, :default => false

View File

@ -114,10 +114,10 @@
<!-- Openness --> <!-- Openness -->
<div id="openness" class="tab-pane fade"> <div id="openness" class="tab-pane fade">
<div class="control-group"> <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"> <div class="controls">
<%= f.check_box :frontend_closed , :class=>"toggle-check"%> <%= f.check_box :frontend_open , :class=>"toggle-check"%>
<span class="help-block">Only can be viewed by users logged in</span> <span class="help-block">If Checked, the frontend will be open for all users.</span>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">

View File

@ -12,32 +12,29 @@
<% content_for :side_bar do %> <% 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'} %> <%= 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 %> <% end %>
<section>
<h3>Sitemap</h3> <h3>Sitemap</h3>
<div>
<div id="sitemap"> <div id="sitemap">
<ul id="map-tree-language" class="nav nav-pills"> <ul id="map-tree-language" class="nav nav-pills">
<% @site_valid_locales.each_with_index do |locale, i| %> <% @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> </li>
<% end %> <% end %>
</ul> </ul>
<div class="tab-content map-tree-content"> <div class="tab-content map-tree-content">
<div class="line"></div> <div class="line"></div>
<% @site_valid_locales.each_with_index do |temp_locale, i| %> <% @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} %> <%= render :partial => 'sitemap_block', :collection => @items, :locals => {:temp_locale => temp_locale} %>
</ul> </ul>
<% end %> <% end %>
</div> </div>
</div> </div>
</div>
</section>
<% content_for :page_specific_javascript do %> <% content_for :page_specific_javascript do %>
<script> <script>

View File

@ -390,6 +390,7 @@ en:
footer: Site footer footer: Site footer
footer_help: Footer Guide footer_help: Footer Guide
frontend_closed: Frontend Closed frontend_closed: Frontend Closed
frontend_open: Frontend Open
header: Site header header: Site header
info: Site information info: Site information
keywords: Site keywords keywords: Site keywords

View File

@ -385,6 +385,7 @@ zh_tw:
thumbnail: 縮圖 thumbnail: 縮圖
site: site:
frontend_closed: 前台關閉? frontend_closed: 前台關閉?
frontend_open: 前台關閉 ?
backend_openness_on: 開啟開放式後台(訪客可遊覽) backend_openness_on: 開啟開放式後台(訪客可遊覽)
default_image: 預設圖像 default_image: 預設圖像
description: 網站描述 description: 網站描述