app/views/admin/pages/_page.html.erb in beef-pages-0.3.5 vs app/views/admin/pages/_page.html.erb in beef-pages-0.3.6

- old
+ new

@@ -5,11 +5,12 @@ <td><%= page.author %><br />(<%= page.created_at.to_formatted_s(:short) %>)</td> <td><%= page.editor %><%= "<br />(#{page.updated_at.to_formatted_s(:short)})" unless page.updated_at.nil? %></td> <td class="date"><%= page.published_at.to_formatted_s(:short) unless page.published_at.nil? %></td> <td class="date"><%= page.published_to.to_formatted_s(:short) unless page.published_to.nil? %></td> <td class="action"><%= link_to 'Show', page_path(page.permalink), :class => 'show' if page.published? %></td> - <td class="action"><%= link_to 'Add page', new_admin_page_page_path(page), :class => 'add', :title => "Add a sub-page under #{page.title}" %></td> + <td class="action"><%= link_to 'Add page', new_admin_page_page_path(page), :class => 'add', :title => "Add a sub-page under #{page.title}" unless page.lock_level >= Page::LOCK_LEVEL_SUBPAGE %></td> + <% logger.debug Page::LOCK_LEVEL_SUBPAGE.inspect %> <td class="action"><%= link_to 'Edit', [:admin, page], :class => 'edit' %></td> - <td class="action"><%= link_to('Destroy', admin_page_path(page), :confirm => 'Are you sure?', :method => :delete, :class => 'delete') unless page.lock_level >=1 || !current_user.admin? %></td> - <td class="action"><%= link_to 'up', move_up_admin_page_path(page), { :class => "page_up" } if current_user.admin? && !page.first? %></td> - <td class="action"><%= link_to 'down', move_down_admin_page_path(page), { :class => 'page_down' } if current_user.admin? && !page.last? %></td> + <td class="action"><%= link_to('Destroy', admin_page_path(page), :confirm => 'Are you sure?', :method => :delete, :class => 'delete') unless page.lock_level >= Page::LOCK_LEVEL_DELETE %></td> + <td class="action"><%= link_to 'up', move_up_admin_page_path(page), { :class => "page_up" } unless page.first? %></td> + <td class="action"><%= link_to 'down', move_down_admin_page_path(page), { :class => 'page_down' } unless page.last? %></td> </tr> \ No newline at end of file