orbit4-5/app/views/admin/items/_node.html.erb

41 lines
3.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="navbar">
<div class="navbar-inner">
<span class="brand"><i class="<%= node.root? ? 'icons-house' : 'icons-list-2' %>"></i></span>
<% unless node.root? %>
<% if node.page_type == "page" %>
<% name, icon_name = get_item_module_infos(node) %>
<span title="<%= name %>" class="item-type page tip"><i class="<%= icon_name %>"></i></span>
<% else %>
<span title="<%= t(:link) %>" class="item-type link tip"><i class="icon-link"></i></span>
<% end %>
<% end %>
<div class="item-title">
<%= content_tag(:em, node.url, class: "muted") if node.class.to_s.eql?('Link') %>
<% if node.page_type.eql?('page') %>
<%= link_to node.name, "/" + I18n.locale.to_s + node.url %>
<% else %>
<em class="muted"><%= node.external_url %></em>
<%= link_to node.name, node.external_url %>
<% end %>
<div class="item-menu">
<%= link_to content_tag(:i, nil, class: "icon-eye-open"), (node.root? ? "/?editmode=on" : "/" + I18n.locale.to_s + node.url + "?editmode=on"), class: "view-page open-slide tip", title: "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: "Edit #{node.page_type.capitalize}", data: {title: "Edit #{node.page_type.capitalize}"} 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: "Add Link", data: {title: "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: "Add Page", data: {title: "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: "icon-trash"), page_path(node.id),:method => :delete,:remote => true, "data-confirm" => "Are you sure ?", class: "delete tip", title: "Delete", data: {title: "Delete"} unless node.root? %>
<% end %>
</div>
</div>
<div class="item-info pull-right">
<% I18n.available_locales.each do |valid_locale| %>
<% if node.enabled_for.include?(valid_locale.to_s) %>
<span class="label label-warning"><%= t(valid_locale.to_s) %></span>
<% end %>
<% end %>
<span class="badge <%= 'badge-inverse' if node.root? %>"></span>
</div>
</div>
</div>