<% unless node.root? %> <% if node.page_type == "page" %> <% name, icon_name = get_item_module_infos(node) %> <% else %> <% end %> <% end %>
<%= content_tag(:em, node.url, class: "muted") if node.class.to_s.eql?('Link') %> <% link_url = nil %> <% if node.page_type.eql?('page') %> <% if @prefix_url.present? %> <% link_url = "#{@prefix_url}#{node.url}" %> <% else %> <% link_url = (node.url == "/" ? "/?locale=#{I18n.locale}" : ("/" + I18n.locale.to_s + node.url)) %> <% end %> <% else %> <%= node.external_url %> <% link_url = node.external_url %> <% end %> <%= link_to node.name, link_url %>
<%= link_to content_tag(:i, nil, class: "icon-eye-open"), (link_url.split('/').last.include?("?") ? "#{link_url}&editmode=on" : "#{link_url}?editmode=on" ), class: "view-page open-slide tip", title: t("structure.view"), data: {title: node.name} if node.page_type.eql?('page') %> <%#= link_to content_tag(:i, nil, class: "icons-mobile"), (node.root? ? "/?editmode=on&mobile=1" : "/" + I18n.locale.to_s + node.url + "?editmode=on&mobile=1"), class: "view-page open-slide tip mobile-view-btn", title: "Edit Mobile Page", data: {title: "Edit Mobile Page"} if node.page_type.eql?("page") && current_site.mobile_on && node.enabled_for_mobile %> <% unless name.eql? "sitemap" %> <%= link_to content_tag(:i, nil, class: "icon-edit"), edit_page_path(node.id,:type => node.page_type), class: "open-slide tip page edit", title: t("structure.edit_#{node.page_type}"), data: {title: t("structure.edit_#{node.page_type}")} if node.class.to_s.downcase.eql?("page") && !(node.root?) %> <%= link_to content_tag(:i, nil, class: "icons-link"), new_page_path(:parent_page => node.id.to_s,:type => "link"), class: "open-slide tip link", title: t("structure.add_link"), data: {title: t("structure.add_link"), id: 'new', parent: node.id.to_s} if node.class.to_s.eql?('Page') && level < 3 %> <%= link_to content_tag(:i, nil, class: "icons-newspaper"), new_page_path(:parent_page => node.id.to_s,:type => "page"), class: "open-slide tip page", title: t("structure.add_page"), data: {title: t("structure.add_page"), id: 'new', parent: node.id.to_s} if node.class.to_s.eql?('Page') && level < 3 %> <%= link_to content_tag(:i, nil, class: "icons-retweet"), "/pages/#{node.id}/import_widgets",:method => :post, :remote => true, "data-confirm" => "This will override your current widgets and widget settings. Do you wish to continue?.", class: "import-widgets tip", title: t("structure.import_widgets"), data: {title: t("structure.import_widgets")} if level > 1 && node.page_type != "link" %> <%= link_to content_tag(:i, nil, class: "icon-trash"), page_path(node.id),:method => :delete,:remote => true, "data-confirm" => "Are you sure ?", class: "delete tip", title: t("structure.delete"), data: {title: t("structure.delete")} unless node.root? %> <% end %>
<% if node.access_level != "none" && !node.access_level.nil? %> | <% end %> <% I18n.available_locales.each do |valid_locale| %> <% if node.enabled_for.include?(valid_locale.to_s) %> <% if node.menu_enabled_for.include?(valid_locale.to_s) %> <% end %> <%= t(valid_locale.to_s) %> | <% end %> <% end %>