From b68f5e11e50e330e2f9474f6429d2da989b3ad6d Mon Sep 17 00:00:00 2001 From: chris2tof Date: Tue, 22 Nov 2011 18:54:10 +0800 Subject: [PATCH] Final modifications for the presentation --- app/assets/stylesheets/admin.css.erb | 3 ++- app/views/admin/users/_form.html.erb | 2 +- lib/parser.rb | 3 ++- lib/tasks/site.rake | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/admin.css.erb b/app/assets/stylesheets/admin.css.erb index bbd6c92d..8b5531aa 100644 --- a/app/assets/stylesheets/admin.css.erb +++ b/app/assets/stylesheets/admin.css.erb @@ -324,7 +324,7 @@ p{ float:left; margin: 0 10px 0 0; } -.buy_btn a{ +.main table td .buy_btn a{ background: url("/assets/buy_btn.png") no-repeat scroll 0 0 transparent; color: #000000; display: block; @@ -335,6 +335,7 @@ p{ text-decoration: none; text-shadow: 0 1px 0 #FFFFFF; width: 170px; + padding: 0px; } .buy_btn a:hover{ background-position:0 bottom; diff --git a/app/views/admin/users/_form.html.erb b/app/views/admin/users/_form.html.erb index 0e2c4e73..ada41c1f 100644 --- a/app/views/admin/users/_form.html.erb +++ b/app/views/admin/users/_form.html.erb @@ -7,7 +7,7 @@ <%#= file_field_tag 'file' %> <%#= hidden_field_tag :avatar_cache %> <%= t('admin.choose_file') %> - <%= f.text_field :email, :onfocus => "this.value='';", :onblur => "if(this.value==''){this.value=#{t('admin.email')};}", :value => t('admin.email'), :class => 'user_mail' %> + <%= f.text_field :email, :onfocus => "this.value='';", :onblur => "if(this.value==''){this.value=#{t('admin.email')};}", :value => (@user.email.blank? ? t('admin.email') : @user.email), :class => 'user_mail' %> diff --git a/lib/parser.rb b/lib/parser.rb index f895bfac..62f063d6 100644 --- a/lib/parser.rb +++ b/lib/parser.rb @@ -192,7 +192,8 @@ module Parser page.design.javascripts.each do |js| res << "" end - + res << "" + res << "" res end c.define_tag 'layout_part' do |tag| diff --git a/lib/tasks/site.rake b/lib/tasks/site.rake index da450a49..74deba29 100644 --- a/lib/tasks/site.rake +++ b/lib/tasks/site.rake @@ -5,8 +5,9 @@ namespace :site do task :build => :environment do Site.delete_all + Purchase.delete_all - Site.create( :school => 'The Best School', :department => 'Awesome', :valid_locales => [ 'en', 'zh_tw' ], :in_use_locales => [ 'zh_tw', 'en' ]) + Site.create( :school => 'RulingDigital University', :department => 'Computer Science', :valid_locales => [ 'en', 'zh_tw' ], :in_use_locales => [ 'zh_tw', 'en' ]) end