81 lines
3.3 KiB
Plaintext
81 lines
3.3 KiB
Plaintext
<head>
|
|
<%= stylesheet_link_tag "lib/wrap-nav"%>
|
|
<%= stylesheet_link_tag "lib/filter"%>
|
|
<%= stylesheet_link_tag "lib/sitemap"%>
|
|
<%= stylesheet_link_tag "lib/togglebox"%>
|
|
|
|
<%= javascript_include_tag 'lib/sitemap' %>
|
|
<%= javascript_include_tag 'lib/masonry.pkgd.min' %>
|
|
</head>
|
|
|
|
|
|
<% 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>
|
|
<% 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">
|
|
<%= render :partial => 'sitemap_block', :collection => @items, :locals => {:temp_locale => temp_locale} %>
|
|
</ul>
|
|
<% end %>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<% content_for :page_specific_javascript do %>
|
|
<script>
|
|
$(document).ready(function(){
|
|
$('.site-map').masonry({
|
|
itemSelector: '.map-block',
|
|
columnWidth: 260
|
|
});
|
|
$('a[data-toggle="tab"]').on('shown', function (e) {
|
|
$('.site-map').masonry({
|
|
itemSelector: '.map-block',
|
|
columnWidth: 260
|
|
});
|
|
})
|
|
});
|
|
$(document).on('click', 'li .onoff', function () {
|
|
$(this).parents("li").toggleClass("disabled");
|
|
if($(this).parents("li").attr("class").indexOf("disabled") > 0){
|
|
$(this).text("<%= t('off_upcase') %>")
|
|
} else {
|
|
$(this).text("<%= t('on_upcase') %>")
|
|
}
|
|
$.getScript('<%= admin_sites_path %>' + '/' + $(this).attr('id') + '/sitemap_toggle?temp_locale=' + $(this).attr('temp_locale'));
|
|
});
|
|
$(document).on('click', 'h4 .onoff', function () {
|
|
$(this).parents(".map-block").toggleClass("disabled");
|
|
if($(this).parents("h4").parents("li").attr("class").indexOf("disabled") > 0){
|
|
$(this).text("<%= t('off_upcase') %>")
|
|
$(this).parents(".map-block").find('li').addClass('disabled')
|
|
$(this).parents(".map-block").find('button').text("<%= t('off_upcase') %>")
|
|
$(this).parents(".map-block").find('li button').attr('disabled', 'disabled')
|
|
} else {
|
|
$(this).text("<%= t('on_upcase') %>")
|
|
$(this).parents(".map-block").find('li').removeClass('disabled')
|
|
$(this).parents(".map-block").find('button').text("<%= t('on_upcase') %>")
|
|
$(this).parents(".map-block").find('li button').removeAttr("disabled")
|
|
}
|
|
$.getScript('<%= admin_sites_path %>' + '/' + $(this).attr('id') + '/sitemap_toggle?parent=true&temp_locale=' + $(this).attr('temp_locale'));
|
|
});
|
|
</script>
|
|
<% end %>
|