Orbit/app/views/admin/sites/sitemap.html.erb

93 lines
3.9 KiB
Plaintext
Raw Normal View History

2013-08-28 10:29:21 +00:00
<head>
<!-- Meta -->
<!--#include virtual="/orbit_4.0.1/include/meta.html"-->
<!-- Basic CSS -->
<!--#include virtual="/orbit_4.0.1/include/basic_css.html"-->
<%= 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 %>
Merge branch 'various_bugs' into nccu_master Conflicts: Gemfile.lock app/assets/javascripts/ajax_form.js.erb app/assets/stylesheets/style.css.erb app/controllers/application_controller.rb app/controllers/sessions_controller.rb app/helpers/admin/web_link_helper.rb app/views/admin/attributes/_attribute_field.html.erb app/views/admin/designs/_form.html.erb app/views/admin/pages/_form.html.erb app/views/admin/sites/_side_bar.html.erb app/views/layouts/_orbit_bar.html.erb app/views/layouts/_side_bar.html.erb config/locales/en.yml config/locales/zh_tw.yml config/mongoid.yml vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb vendor/built_in_modules/announcement/app/controllers/panel/announcement/front_end/bulletins_controller.rb vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter.html.erb vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/index.html.erb vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/_index.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter_status.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_news_bulletin.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/index.html.erb vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/index.html.erb
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 %>
<% content_for :page_specific_javascript do %>
<%= javascript_include_tag "lib/jquery.masonry.min.js" %>
<script>
$(document).ready(function(){
$('.site-map').masonry({
itemSelector: '.map-block',
columnWidth: 260
2012-07-25 07:10:15 +00:00
});
$('a[data-toggle="tab"]').on('shown', function (e) {
$('.site-map').masonry({
itemSelector: '.map-block',
columnWidth: 260
});
})
2012-07-25 07:10:15 +00:00
});
2012-07-26 07:37:29 +00:00
$(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'));
2012-07-26 07:37:29 +00:00
});
$(document).on('click', 'h4 .onoff', function () {
$(this).parents(".map-block").toggleClass("disabled");
if($(this).parents("h4").parents("div").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') %>")
2012-07-27 04:05:17 +00:00
$(this).parents(".map-block").find('li button').attr('disabled', 'disabled')
2012-07-26 07:37:29 +00:00
} else {
$(this).text("<%= t('on_upcase') %>")
$(this).parents(".map-block").find('li').removeClass('disabled')
$(this).parents(".map-block").find('button').text("<%= t('on_upcase') %>")
2012-07-27 04:05:17 +00:00
$(this).parents(".map-block").find('li button').removeAttr("disabled")
2012-07-26 07:37:29 +00:00
}
$.getScript('<%= admin_sites_path %>' + '/' + $(this).attr('id') + '/sitemap_toggle?parent=true&temp_locale=' + $(this).attr('temp_locale'));
2012-07-25 07:10:15 +00:00
});
</script>
2013-08-28 10:29:21 +00:00
<% end %>
<section id="main-wrap">
<div class="wrap-inner">
<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>
<% @site_valid_locales.each_with_index do |temp_locale, i| %>
<div class="tab-content map-tree-content">
<div class="line"></div>
<ul id="<%= temp_locale %>" class="map-tree tab-pane fade <%= ( i == 0 ) ? "in active" : '' %>">
<%= render :partial => 'sitemap_block', :collection => @items, :locals => {:temp_locale => temp_locale} %>
</ul>
<% end %>
<br/><br/><br/>
<% @site_valid_locales.each_with_index do |temp_locale, i| %>
<div class="tab-pane site-map <%= temp_locale %> fade tab-pane <%= ( i == 0 ) ? "in active" : '' %>">
<%= render :partial => 'sitemap_block', :collection => @items, :locals => {:temp_locale => temp_locale} %>
</div>
<% end %>
</div>
</div>
</div>
</section>