2013-08-28 10:29:21 +00:00
|
|
|
<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>
|
|
|
|
|
|
|
|
|
2012-07-25 07:10:15 +00:00
|
|
|
<% content_for :side_bar do %>
|
2012-10-29 08:10:07 +00:00
|
|
|
<%= 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'} %>
|
2012-07-25 07:10:15 +00:00
|
|
|
<% end %>
|
2013-08-28 10:29:21 +00:00
|
|
|
<div id="sitemap">
|
2013-10-04 11:42:35 +00:00
|
|
|
<ul id="map-tree-language" class="nav nav-pills">
|
2013-10-14 08:47:34 +00:00
|
|
|
<% @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>
|
|
|
|
|
2013-10-04 11:42:35 +00:00
|
|
|
<div class="tab-content map-tree-content">
|
2013-08-28 10:29:21 +00:00
|
|
|
<div class="line"></div>
|
|
|
|
<% @site_valid_locales.each_with_index do |temp_locale, i| %>
|
2013-10-14 08:47:34 +00:00
|
|
|
<ul id="<%= temp_locale %>" class="map-tree tab-pane fade in <%= ( i == 0 ) ? "in active" : '' %>">
|
2013-08-28 10:29:21 +00:00
|
|
|
<%= render :partial => 'sitemap_block', :collection => @items, :locals => {:temp_locale => temp_locale} %>
|
2013-10-11 13:08:22 +00:00
|
|
|
</ul>
|
2013-08-28 10:29:21 +00:00
|
|
|
<% end %>
|
2013-10-14 08:47:34 +00:00
|
|
|
</div>
|
2013-08-28 10:29:21 +00:00
|
|
|
|
2013-10-14 08:47:34 +00:00
|
|
|
</div>
|
2013-10-09 09:05:29 +00:00
|
|
|
|
|
|
|
<% 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'));
|
|
|
|
});
|
2013-10-11 13:08:22 +00:00
|
|
|
$(document).on('click', 'h6 .onoff', function () {
|
2013-10-09 09:05:29 +00:00
|
|
|
$(this).parents(".map-block").toggleClass("disabled");
|
2013-10-11 13:08:22 +00:00
|
|
|
if($(this).parents("h6").parents("li").attr("class").indexOf("disabled") > 0){
|
2013-10-09 09:05:29 +00:00
|
|
|
$(this).text("<%= t('off_upcase') %>")
|
|
|
|
$(this).parents(".map-block").find('li').addClass('disabled')
|
2013-10-11 13:08:22 +00:00
|
|
|
$(this).parents(".map-block").find('checkbox').text("<%= t('off_upcase') %>")
|
|
|
|
// $(this).parents(".map-block").find('li checkbox').attr('disabled', 'disabled')
|
2013-10-09 09:05:29 +00:00
|
|
|
} else {
|
|
|
|
$(this).text("<%= t('on_upcase') %>")
|
|
|
|
$(this).parents(".map-block").find('li').removeClass('disabled')
|
2013-10-11 13:08:22 +00:00
|
|
|
$(this).parents(".map-block").find('checkbox').text("<%= t('on_upcase') %>")
|
|
|
|
// $(this).parents(".map-block").find('li checkbox').removeAttr("disabled")
|
2013-10-09 09:05:29 +00:00
|
|
|
}
|
|
|
|
$.getScript('<%= admin_sites_path %>' + '/' + $(this).attr('id') + '/sitemap_toggle?parent=true&temp_locale=' + $(this).attr('temp_locale'));
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<% end %>
|