Adjustments to other views to use the new yield :submenu and yield :actions

This commit is contained in:
TFG 2011-04-27 13:18:02 +08:00 committed by Ruxton
parent 89dd1e1c39
commit 324ed57f63
17 changed files with 80 additions and 45 deletions

View File

@ -7,6 +7,9 @@
- content_for :submenu do
= render 'admin/shared/menu/assets'
- content_for :actions do
= render 'admin/shared/actions/assets'
%p!= t('.help')
- content_for :buttons do

View File

@ -3,6 +3,9 @@
- content_for :submenu do
= render 'admin/shared/menu/assets'
- content_for :actions do
= render 'admin/shared/actions/assets'
%p!= t('.help')
%p.no-items!= t('.no_items', :url => new_admin_asset_collection_url)

View File

@ -6,6 +6,9 @@
- content_for :submenu do
= render 'admin/shared/menu/assets'
- content_for :actions do
= render 'admin/shared/actions/assets'
%p!= t('.help')
= semantic_form_for @asset_collection, :url => admin_asset_collections_url do |f|

View File

@ -3,6 +3,9 @@
- content_for :submenu do
= render 'admin/shared/menu/assets'
- content_for :actions do
= render 'admin/shared/actions/assets'
- content_for :buttons do
= admin_button_tag t('admin.asset_collections.edit.add_asset'), new_admin_asset_url(@asset_collection), :class => 'new'

View File

@ -3,6 +3,9 @@
- content_for :submenu do
= render 'admin/shared/menu/assets'
- content_for :actions do
= render 'admin/shared/actions/assets'
%p!= t('.help')
= semantic_form_for @asset, :url => admin_assets_url(@asset_collection), :html => { :multipart => true } do |form|

View File

@ -3,6 +3,9 @@
- content_for :submenu do
= render 'admin/shared/menu/contents'
- content_for :actions do
= render 'admin/shared/actions/contents'
- content_for :buttons do
= admin_button_tag :show_items, admin_contents_url(@content_type.slug), :class => 'show'
= admin_button_tag :new_item, new_admin_content_url(@content_type.slug), :class => 'new'

View File

@ -3,6 +3,9 @@
- content_for :submenu do
= render 'admin/shared/menu/contents'
- content_for :actions do
= render 'admin/shared/actions/contents'
%p!= t('.help')
= semantic_form_for @content_type, :url => admin_content_types_url do |f|

View File

@ -3,6 +3,9 @@
- content_for :submenu do
= render 'admin/shared/menu/contents'
- content_for :actions do
= render 'admin/shared/actions/contents'
- content_for :buttons do
= admin_button_tag t('admin.contents.index.edit'), edit_admin_content_type_url(@content_type), :class => 'edit'
= admin_button_tag t('admin.contents.index.new'), new_admin_content_url(@content_type.slug), :class => 'new'

View File

@ -1,8 +1,11 @@
- title t('.title', :type => @content_type.name.capitalize)
- title t('.title', :type => @content_type.name.capitalize) q
- content_for :submenu do
= render 'admin/shared/menu/contents'
- content_for :actions do
= render 'admin/shared/actions/contents'
- content_for :head do
= include_javascripts :contents

View File

@ -3,6 +3,9 @@
- content_for :submenu do
= render 'admin/shared/menu/contents'
- content_for :actions do
= render 'admin/shared/actions/contents'
- content_for :buttons do
= admin_button_tag t('admin.contents.index.edit'), edit_admin_content_type_url(@content_type), :class => 'edit'

View File

@ -11,8 +11,13 @@
= render 'admin/shared/menu'
#submenu
%ul
= yield :submenu
- if content_for? :actions
.action
= yield :actions
#content
.inner
%h2!= title

View File

@ -3,6 +3,9 @@
- content_for :submenu do
= render 'admin/shared/menu/contents'
- content_for :actions do
= render 'admin/shared/actions/contents'
- content_for :buttons do
= admin_button_tag :show, "/#{@page.fullpath}", :class => 'show'

View File

@ -6,6 +6,9 @@
- content_for :submenu do
= render 'admin/shared/menu/contents'
- content_for :actions do
= render 'admin/shared/actions/contents'
- content_for :buttons do
= admin_button_tag :new, new_admin_page_url, :class => 'new'

View File

@ -3,6 +3,9 @@
- content_for :submenu do
= render 'admin/shared/menu/contents'
- content_for :actions do
= render 'admin/shared/actions/contents'
%p!= t('.help')
= semantic_form_for @page, :url => admin_pages_url do |form|

View File

@ -1,7 +1,3 @@
%ul
- @asset_collections.each do |c|
%li
= link_to content_tag(:span, truncate(c.name, :length => 20)), edit_admin_asset_collection_url(c), :class => "#{'on' if @asset_collection.id == c.id}"
.action
= link_to content_tag(:span, t('admin.asset_collections.index.new')), new_admin_asset_collection_url

View File

@ -1,4 +1,3 @@
%ul
= admin_submenu_item 'pages', admin_pages_url do
.header
%p= link_to t('admin.pages.index.new'), new_admin_page_url
@ -27,6 +26,3 @@
- content_types.each do |content_type|
%li
= link_to truncate(content_type.name, :length => 20), admin_contents_url(content_type.slug)
.action
= link_to content_tag(:em) + content_tag(:span, t('admin.content_types.index.new')), new_admin_content_type_url

View File

@ -1,4 +1,3 @@
%ul
= admin_submenu_item 'site', edit_admin_current_site_url
/ = admin_submenu_item 'snippets', admin_snippets_url
= admin_submenu_item 'theme_assets', admin_theme_assets_url