app/views/menu.rhtml in Pimki-1.5.092 vs app/views/menu.rhtml in Pimki-1.6.092

- old
+ new

@@ -1,16 +1,20 @@ <div id="Menu" width="150"> <p> <table> - <% begin %> + <% published = @action_name =~ /published/ + show_by = published ? '../published/' : '../show/' + begin %> <tr><th><%= @web.name %> Quick Links</th></tr> - <tr><td><a href='../edit_menu/' style="font-size: 9px;">Edit Menu Contents</a></td></tr> + <% unless published %> + <tr><td><a href='<%= "/#{web.address}/edit_menu/" %>' style="font-size: 9px;">Edit Menu Contents</a></td></tr> + <% end %> <tr><td>&nbsp;</td></tr> <% if @menu_pages.nil? %> <tr><td><%= @menu_content %></td></tr> <% else %> <% for page in @menu_pages %> - <tr><td><a href="../show/<%= page.name %>"><%= truncate(page.plain_name, 35) %></a></td></tr> + <tr><td><a href="<%= show_by + page.name %>"><%= truncate(page.plain_name, 35) %></a></td></tr> <% end %> <% end %> <% rescue Exception end %>