Sitemap done for backend and fronted
This commit is contained in:
1 parent
934b515914
commit
a8cc581279
11 files changed
+54
-9
No files matched your search
@@ -5,7 +5,8 @@
|
||||
<span id='name_list'>
|
||||
<% if @r_tag.eql?('sub_menu') %>
|
||||
<%= f.hidden_field :public_r_tag_object_id, :value => @part.page.id %>
|
||||
<%#= f.select :public_r_tag_object_id, options_for_select([t(:horizontal), t(:vertical)], t(:horizontal)) %>
|
||||
<%#= f.select :public_r_tag_object_id, options_for_select([t(:horizontal), t(:vertical)], t(:horizontal)) %>
|
||||
<% elsif @r_tag.eql?('sitemap') %>
|
||||
<% else %>
|
||||
<%= f.select :public_r_tag_object_id, options_from_collection_for_select(@tag_objects, :id, :title, :selected => @part.public_r_tag_object_id) %>
|
||||
<% end %>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<%#= content_tag :li, link_to(t('admin.site_language'), admin_site_language_path(@site)), :class => active_for_action('sites', 'language') %>
|
||||
<%= content_tag :li, link_to(t('admin.mail_setting'), admin_site_mail_setting_path(@site)), :class => active_for_action('sites', 'mail_setting') %>
|
||||
<%#= content_tag :li, link_to(t('admin.ui_theme'), admin_site_ui_theme_path(@site)), :class => active_for_action('sites', 'ui_theme') %>
|
||||
<%= content_tag :li, link_to(t('site_map'), admin_site_sitemap_path(@site)), :class => active_for_action('sites', 'sitemap') %>
|
||||
<% end -%>
|
||||
|
||||
<% end -%>
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
<div class="map-block <%= 'disabled' if !sitemap_block.sitemap_enabled %>">
|
||||
<h4>
|
||||
<button id="<%= sitemap_block.id %>" class="onoff pull-right"><%= sitemap_block.sitemap_enabled ? t('on_upcase') : t('off_upcase') %></button>
|
||||
<span><%= sitemap_block.i18n_variable[I18n.locale] %></span>
|
||||
<span><%= sitemap_block_counter + 1 %> <%= sitemap_block.title %></span>
|
||||
</h4>
|
||||
<ul>
|
||||
<% sitemap_block.children.each do |child| %>
|
||||
<% sitemap_block.children.each_with_index do |child, i| %>
|
||||
<li class="clear <%= 'disabled' if !child.sitemap_enabled %>">
|
||||
<button id="<%= child.id %>" class="onoff pull-right" disabled="<%= 'disabled' if !sitemap_block.sitemap_enabled %>" ><%= child.sitemap_enabled ? t('on_upcase') : t('off_upcase') %></button>
|
||||
<span><%= child.i18n_variable[I18n.locale] %></span>
|
||||
<%= content_tag :button, :id => child.id, :class => "onoff pull-right", :disabled => !sitemap_block.sitemap_enabled do %>
|
||||
<%= child.sitemap_enabled ? t('on_upcase') : t('off_upcase') %>
|
||||
<% end %>
|
||||
<span><%= "#{sitemap_block_counter + 1}-#{i + 1}" %> <%= child.title %></span>
|
||||
</li>
|
||||
<% end if sitemap_block.children %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,23 @@
|
||||
<div class="site-map">
|
||||
<% @items.each_with_index do |item, i| %>
|
||||
<div class="map-block">
|
||||
<h4><%= i+1 %> <%= item.title %></h4>
|
||||
<ul>
|
||||
<% item.children.each_with_index do |child, ii| %>
|
||||
<li class="clear"><%= "#{i+1}-#{ii+1}" %> <%= child.title %></span></li>
|
||||
<% end if item.children %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= javascript_include_tag "lib/jquery.masonry.min.js" %>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('.site-map').masonry({
|
||||
itemSelector: '.map-block',
|
||||
columnWidth: 260,
|
||||
isAnimated: true
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in new issue
Block a user