Orbit/app/views/admin/items/_node.html.erb

33 lines
2.0 KiB
Plaintext
Raw Normal View History

<div class="navbar">
<div class="navbar-inner">
<span class="brand"><i class="<%= node.root? ? 'icons-house' : 'icons-list-2' %>"></i></span>
<% if node.class.to_s.eql?('Page') %>
<% unless node.root? %>
<% name, icon_name = get_item_module_infos(node) %>
<span title="<%= name %>" class="item-type page tip"><i class="<%= icon_name %>"></i></span>
<% end %>
<% else %>
<span title="<%= t(:link) %>" class="item-type link tip"><i class="icon-link"></i></span>
<% end %>
<div class="item-title">
<%= link_to node.title, "/"+node.path %>
<div class="item-menu">
<%= link_to content_tag(:i, nil, class: "icon-eye-open"), eval("admin_#{node.class.to_s.downcase}_path(node)"), class: "view-page open-slide tip", title: t(:view) if node.class.to_s.eql?('Page') %>
<%= link_to content_tag(:i, nil, class: "icon-edit"), eval("edit_admin_#{node.class.to_s.downcase}_path(node)"), class: "open-slide tip", title: t(:edit) %>
<%= link_to content_tag(:i, nil, class: "icons-newspaper"), new_admin_page_path(:parent_id => node.id), class: "open-slide tip", title: t(:add_page) if node.class.to_s.eql?('Page') %>
<%= link_to content_tag(:i, nil, class: "icon-link"), new_admin_link_path(:parent_id => node.id), class: "open-slide tip", title: t(:add_link) if node.class.to_s.eql?('Page') %>
<%= link_to content_tag(:i, nil, class: "icon-trash"), nil, rel: eval("admin_#{node.class.to_s.downcase}_path(node)"), class: "delete tip", title: t(:delete_) unless node.root? %>
</div>
<%= content_tag(:em, node.url, class: "muted") if node.class.to_s.eql?('Link') %>
</div>
<div class="item-info pull-right">
<% @site_valid_locales.each do |valid_locale| %>
<% if node.menu_enabled_for.include?(valid_locale) %>
<span class="label label-warning"><%= I18nVariable.from_locale(valid_locale) %></span>
<% end %>
<% end %>
<span class="badge <%= 'badge-inverse' if node.root? %>"></span>
</div>
</div>
</div>