Fix link in structure when the item is a link

Add internal links creation
This commit is contained in:
chris committed 2013-07-30 11:49:28 +08:00
1 parent c85629d3b3
commit 74b2bbf4b7
3 files changed
+55 -4

No files matched your search

+5 -1
View File
@@ -11,7 +11,11 @@
<% end %>
<div class="item-title">
<%= content_tag(:em, node.url, class: "muted") if node.class.to_s.eql?('Link') %>
<%= link_to node.title, "/" + node.path %>
<% if node.class.to_s.eql?('Page') %>
<%= link_to node.title, "/" + node.path %>
<% else %>
<%= link_to node.title, node.url %>
<% end %>
<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) %>