make blank site working better

This commit is contained in:
Matt K. Fu 2013-05-14 11:26:35 +08:00
parent 1096db79b6
commit ef2c732d2e
6 changed files with 11 additions and 7 deletions

View File

@ -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

View File

@ -9,4 +9,5 @@
<div class="form-actions form-fixed pagination-right">
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t(:add), new_admin_design_path, :class => 'btn btn-primary pull-right' %>
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t(:upload), upload_package_admin_designs_path, :class => 'btn btn-primary pull-right' %>
</div>

View File

@ -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 %>
<div class="main2">
<%= form_tag '',:multipart => true,:action=>"post" do |f| %>

View File

@ -461,6 +461,7 @@ en:
success_: Successfully updated
update_: Update
update_at: Update at
upload: Upload
url: URL
use_status: Use Statue
user: User

View File

@ -462,6 +462,7 @@ zh_tw:
success_: 使用者已更新成功
update_: 更新
update_at: 最後更新時間
upload: 上傳
url: 網址
use_status: 使用狀態
user: 使用者

View File

@ -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