From 928c642840fac93a8a2a15de979b8b5c8e8cb4a5 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Fri, 23 Mar 2012 11:18:29 +0800 Subject: [PATCH] change layout from old admin to new_admin. not complete code --- .../admin/ad_banners_controller.rb | 2 +- app/views/admin/ad_banners/index.html.erb | 50 ++++++++----------- 2 files changed, 23 insertions(+), 29 deletions(-) diff --git a/app/controllers/admin/ad_banners_controller.rb b/app/controllers/admin/ad_banners_controller.rb index 19d81057..614a75fa 100644 --- a/app/controllers/admin/ad_banners_controller.rb +++ b/app/controllers/admin/ad_banners_controller.rb @@ -1,5 +1,5 @@ class Admin::AdBannersController < ApplicationController - layout "admin" + layout "new_admin" before_filter :authenticate_user! before_filter :is_admin? diff --git a/app/views/admin/ad_banners/index.html.erb b/app/views/admin/ad_banners/index.html.erb index e109830e..f16f01a9 100644 --- a/app/views/admin/ad_banners/index.html.erb +++ b/app/views/admin/ad_banners/index.html.erb @@ -1,47 +1,41 @@ -<% content_for :secondary do %> -
-

<%= t('admin.setup_ad_banners') %>

- -
-<% end -%> <%= flash_messages %> -
-

<%= t('admin.list_ad_banners') %>

- + + + +
- - - - - - - + + + + + + + <% @ad_banners.each do |ad_banner| %> - + + + - - - - + <% end %>
<%= t('admin.title') %><%= t('admin.picture_position') %><%= t('admin.post_date') %><%= t('admin.unpost_date') %><%= t('admin.context') %><%= t('admin.direct_to_after_click') %><%= t('admin.now_display?') %><%= t('admin.location') %><%= t('admin.title') %> <%= t('admin.title') %><%= t('admin.start_date')%><%= t('admin.end_date') %><%= t('admin.style') %>
<%= ad_banner.title %> <%= ad_banner.picture_position %><%= link_to ad_banner.title,edit_admin_ad_banner_path(ad_banner) %> <%= ad_banner.post_date %> <%= ad_banner.unpost_date.nil?? t('form.date_unlimited'): ad_banner.unpost_date %><%= ad_banner.context %><%= ad_banner.direct_to_after_click %><%= ad_banner.display? %> - <%= link_to t(:show), admin_ad_banner_path(ad_banner), :class => 'show' %> - <%= link_to t(:edit), edit_admin_ad_banner_path(ad_banner), :class => 'edit' %> - <%= link_to t(:delete), admin_ad_banner_path(ad_banner), :confirm => t('sure?'), :method => :delete, :class => 'delete' %> - <%= ad_banner.ad_fx %>
-
<%= link_to t('admin.new_ad_banner'), new_admin_ad_banner_path, :class => 'new' %>