diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb
index 6e72a9602..f22adb2a1 100644
--- a/app/controllers/pages_controller.rb
+++ b/app/controllers/pages_controller.rb
@@ -17,7 +17,8 @@ class PagesController < ApplicationController
impressionist(@item)
render_page
else
- render :text => t(:need_home)
+ redirect_to '/admin/dashboards',:notice=>t(:need_home)
+ # render :text => t(:need_home)
end
end
diff --git a/app/views/admin/designs/index.html.erb b/app/views/admin/designs/index.html.erb
index 6facd66b5..e12402fed 100644
--- a/app/views/admin/designs/index.html.erb
+++ b/app/views/admin/designs/index.html.erb
@@ -9,4 +9,5 @@
\ No newline at end of file
diff --git a/app/views/admin/designs/upload_package.html.erb b/app/views/admin/designs/upload_package.html.erb
index 9dc0efa97..671f81ab4 100644
--- a/app/views/admin/designs/upload_package.html.erb
+++ b/app/views/admin/designs/upload_package.html.erb
@@ -1,7 +1,8 @@
<% content_for :side_bar do %>
- <%= render 'admin/sites/side_bar' %>
+ <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_site_info_path(@site), :side_bar_content => 'admin/sites/side_bar'} %>
<% end %>
+
<%= form_tag '',:multipart => true,:action=>"post" do |f| %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index f1e1097d0..2bafb863b 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -461,6 +461,7 @@ en:
success_: Successfully updated
update_: Update
update_at: Update at
+ upload: Upload
url: URL
use_status: Use Statue
user: User
diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml
index 223e69a0c..96aa7c439 100644
--- a/config/locales/zh_tw.yml
+++ b/config/locales/zh_tw.yml
@@ -462,6 +462,7 @@ zh_tw:
success_: 使用者已更新成功
update_: 更新
update_at: 最後更新時間
+ upload: 上傳
url: 網址
use_status: 使用狀態
user: 使用者
diff --git a/lib/tasks/site.rake b/lib/tasks/site.rake
index 8186c1ebe..fcce06dc1 100644
--- a/lib/tasks/site.rake
+++ b/lib/tasks/site.rake
@@ -3,15 +3,14 @@
namespace :site do
task :build => :environment do
-
Site.destroy_all
Purchase.destroy_all
-
+
Site.create( :school => 'RulingDigital University', :department => 'Computer Science', :valid_locales => [ 'en', 'zh_tw' ], :in_use_locales => [ 'zh_tw', 'en' ])
User.create!(:email=>'chris@rulingcom.com',:admin=>true,:user_id=>'chris',:password=>'password')
-
- put "Run ensureIndex on chunks before you upload something. If You start DB from nothing."
- puts 'Please upload design package and run rake site:necessary_data'
+ `mongo #{Mongoid.config.database.name} --eval "db.fs.chunks.ensureIndex({files_id: 1, n: 1})"`
+ puts "Congres you can now login within url"
+ puts 'Please upload design package (/admin/designs/upload_package ) and run rake site:necessary_data'
end
task :necessary_data => :environment do