Add Item, Page, Component, Link inheritanced models
This commit is contained in:
1 parent
cd21cadfe7
commit
e1440a79d8
38 files changed
+417
-175
No files matched your search
@@ -0,0 +1,12 @@
|
||||
<tr>
|
||||
<td><%= item.class %></td>
|
||||
<td><%= link_to item.name, admin_items_path(:parent_item_name => item.name) %></td>
|
||||
<td><%=h item.title %>
|
||||
<td><%= item.position %></td>
|
||||
<td><%= item.is_published.to_s %></td>
|
||||
<td>
|
||||
<%= link_to t(:show), admin_component_path(item.name) %> |
|
||||
<%= link_to t(:edit), edit_admin_component_path(item) %> |
|
||||
<%= link_to t(:delete), admin_component_path(item), :confirm => 'Are you sure?', :method => :delete %>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -0,0 +1,12 @@
|
||||
<tr>
|
||||
<td><%= item.class %></td>
|
||||
<td><%= link_to item.name, admin_items_path(:parent_item_name => item.name) %></td>
|
||||
<td><%=h item.title %>
|
||||
<td><%= item.position %></td>
|
||||
<td><%= item.is_published.to_s %></td>
|
||||
<td>
|
||||
<%= link_to t(:show), admin_link_path(item.name) %> |
|
||||
<%= link_to t(:edit), edit_admin_link_path(item) %> |
|
||||
<%= link_to t(:delete), admin_link_path(item), :confirm => 'Are you sure?', :method => :delete %>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -0,0 +1,12 @@
|
||||
<tr>
|
||||
<td><%= item.class %></td>
|
||||
<td><%= link_to item.name, admin_items_path(:parent_item_name => item.name) %></td>
|
||||
<td><%=h item.title %>
|
||||
<td><%= item.position %></td>
|
||||
<td><%= item.is_published.to_s %></td>
|
||||
<td>
|
||||
<%= link_to t(:show), admin_page_path(item.name) %> |
|
||||
<%= link_to t(:edit), edit_admin_page_path(item) %> |
|
||||
<%= link_to t(:delete), admin_page_path(item), :confirm => 'Are you sure?', :method => :delete %>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -0,0 +1,15 @@
|
||||
<h1>Listing snippets</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
</tr>
|
||||
|
||||
<% snippets.each do |snippet| %>
|
||||
<tr>
|
||||
<td><%= snippet.name %></td>
|
||||
<td><%= link_to t(:show), admin_snippet_path(snippet) %>
|
||||
<td><%= link_to t(:edit), edit_admin_snippet_path(snippet) %></td>
|
||||
<td><%= link_to t(:delete), admin_snippet_path(snippet), :confirm => 'Are you sure?', :method => :delete %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
@@ -0,0 +1,28 @@
|
||||
<% content_for :secondary do %>
|
||||
<ul class="list">
|
||||
<li><%= link_to t(:new_page, :scope => :admin), new_admin_page_path( :parent_item_name => @parent_item.name ), :class => 'button positive' %></li>
|
||||
<li><%= link_to t(:new_component, :scope => :admin), new_admin_component_path( :parent_item_name => @parent_item.name ) %>
|
||||
<li><%= link_to t(:new_link, :scope => :admin), new_admin_link_path( :parent_item_name => @parent_item.name ) %>
|
||||
<li><%= link_to t(:new_snippet, :scope => :admin ), new_admin_snippet_path( :parent_item_name => @parent_item.name ), :class => 'button positive' %></li>
|
||||
</ul>
|
||||
<% end -%>
|
||||
|
||||
<h1>Listing items: <%= @parent_item.name %>/</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Class</th>
|
||||
<th>Name</th>
|
||||
<th>Title</th>
|
||||
<th>Position</th>
|
||||
<th>Published?</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
|
||||
<% @items.each do |item| %>
|
||||
<%= render :partial => item.class.to_s.downcase, :locals => { :item => item } %>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
|
||||
<%= render :partial => "snippets", :locals => { :snippets => @snippets } %>
|
||||
Reference in new issue
Block a user