1.fix parent page 2.add page title
This commit is contained in:
1 parent
38e365e4b5
commit
9f1ba2ae66
9 files changed
+61
-48
No files matched your search
@@ -3,6 +3,22 @@
|
||||
<%= f.text_field :name, :class => 'text' %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= f.label :title, "Title en" %>
|
||||
<%= f.text_field :title_en, :class => 'text' %>
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
<%= f.label :title, "Title zh_tw" %>
|
||||
<%= f.text_field :title_zh_tw, :class => 'text' %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= f.label :parent_page_name, "Parent Page Name" %>
|
||||
<%= f.text_field :parent_page_name, :class => 'text' %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= f.label :layout_name, "Layout Name" %>
|
||||
<%= f.text_field :layout_name, :class => 'text' %>
|
||||
@@ -22,18 +38,18 @@
|
||||
|
||||
<p>
|
||||
<%= f.label :is_published, "Is Published" %>
|
||||
<%= f.radio_button :is_published, 1 %>Yes <%= f.radio_button :is_published, 0 %> No
|
||||
<%= f.radio_button :is_published, true %>Yes <%= f.radio_button :is_published, false %> No
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= f.label :is_component, "Is component" %>
|
||||
<%= f.radio_button :is_component, true %>Yes <%= f.radio_button :is_component, false %> No
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= f.label :external_link, "External Link" %>
|
||||
<%= f.text_field :external_link %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= f.label :use_engine, "Use Engine" %>
|
||||
<%= f.text_field :use_engine %>
|
||||
<p>
|
||||
|
||||
<% content_for :page_specific_javascript do %>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<% content_for :secondary do %>
|
||||
<ul>
|
||||
<ul class="list">
|
||||
<li><%= link_to 'New pages', new_admin_page_path, :class => 'button positive' %></li>
|
||||
<li><%= link_to 'New component entry', '#' %>
|
||||
<li><%= link_to 'New root menu snippets', new_admin_snippet_path( :menu => 'root' ), :class => 'button positive' %></li>
|
||||
</ul>
|
||||
<% end -%>
|
||||
|
||||
<h1>Listing pages</h1>
|
||||
<h1>Listing pages: <%= params[:parent] || "root" %></h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Children</th>
|
||||
<th>Title</th>
|
||||
<th>Layout</th>
|
||||
<th>Parent</th>
|
||||
<th>Position</th>
|
||||
<th>Published?</th>
|
||||
<th>Action</th>
|
||||
@@ -20,22 +20,16 @@
|
||||
|
||||
<% @pages.each do |page| %>
|
||||
<tr>
|
||||
<td><%= link_to page.name, admin_page_path(page) %></td>
|
||||
<td>
|
||||
<ul>
|
||||
<% page.children.each do |child| %>
|
||||
<li><%= child.name %></li>
|
||||
<% end -%>
|
||||
</ul>
|
||||
</td>
|
||||
<td><%= link_to page.name, admin_pages_path(:parent => page.name) %></td>
|
||||
<td><%=h page.title %>
|
||||
<td><%= page.layout_name %></th>
|
||||
<td><%= page.parent_page_id %></td>
|
||||
<td><%= page.position %></td>
|
||||
<td><%= page.is_published.to_s %></td>
|
||||
<td>
|
||||
<%= link_to 'Edit', edit_admin_page_path(page) %> |
|
||||
<%= link_to 'Add Child', new_admin_page_path( :parent_page_id => page.id ) %> |
|
||||
<%= link_to 'Destroy', admin_page_path(page), :confirm => 'Are you sure?', :method => :delete %>
|
||||
<%= link_to t(:show), page_path(page.name) %> |
|
||||
<%= link_to t(:edit), edit_admin_page_path(page) %> |
|
||||
<%= link_to t(:add_chile_page, :scope => :admin), new_admin_page_path( :parent_page_name => page.name ) %> |
|
||||
<%= link_to t(:delete), admin_page_path(page), :confirm => 'Are you sure?', :method => :delete %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<% form_for :page, :url => admin_pages_path do |f| %>
|
||||
<%= f.error_messages %>
|
||||
<%= f.hidden_field :parent_page_id %>
|
||||
<%= f.hidden_field :parent_page_name %>
|
||||
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
|
||||
|
||||
Reference in new issue
Block a user