64 lines
1.8 KiB
Plaintext
64 lines
1.8 KiB
Plaintext
-@ancestor_1 = @menu_item.ancestors.reverse[1] if @menu_item
|
|
-@ancestor_1 = @original_menu_item if @original_menu_item
|
|
|
|
-if @menu_item.image_file
|
|
-@img_url = @menu_item.image_file.file.large.url
|
|
-@facebook_img = @menu_item.image_file.file.large.medium.url
|
|
|
|
-if @lang_page.without_text_image_file
|
|
-@facebook_img = @lang_page.without_text_image_file.file.large.medium.url
|
|
|
|
|
|
|
|
-@twitter_title = @lang_page.twitter_title if @lang_page.twitter_title?
|
|
|
|
|
|
|
|
-@sidebar = false
|
|
|
|
|
|
-if true or @menu_item_lang.permalink == "index"
|
|
.render_block.home_render_block
|
|
=render :partial => "public/blocks/block", :locals => {:block => @menu_item.menu_content.blocks.find_by_lang_site_id(@lang.id)}
|
|
|
|
-if current_admin
|
|
.admin_panel
|
|
=link_to i(:pencil), edit_admin_menu_item_path(:id => @menu_item.menu_content.menu_item.id, :lang => @lang.slug), :class => "btn btn-primary"
|
|
|
|
|
|
-else
|
|
%h1=@lang_page.title
|
|
|
|
.menu_content_inner{:class => @menu_item_lang.slug}
|
|
.inner
|
|
.menu_item_content
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.render_block
|
|
=render :partial => "public/blocks/block", :locals => {:block => @menu_item.menu_content.blocks.find_by_lang_site_id(@lang.id)}
|
|
.bottom_space
|
|
|
|
|
|
|
|
=render :partial => "public/menu_items/bottom"
|
|
|
|
-if current_admin
|
|
.admin_panel
|
|
=link_to i(:pencil), edit_admin_menu_item_path(:id => @menu_item.menu_content.menu_item.id, :lang => @lang.slug), :class => "btn btn-primary"
|
|
|
|
|
|
|
|
-if @sidebar
|
|
:coffeescript
|
|
resize_menu_content_inner = ->
|
|
$('.menu_content_inner').css
|
|
"width" : ($(".widther").outerWidth() - $(".side_menu").outerWidth())+"px"
|
|
"float" : "left"
|
|
resize_menu_content_inner()
|
|
$(window).bind "resize", ->
|
|
resize_menu_content_inner()
|