make blank site working better
This commit is contained in:
		
							parent
							
								
									1096db79b6
								
							
						
					
					
						commit
						ef2c732d2e
					
				| 
						 | 
					@ -17,7 +17,8 @@ class PagesController < ApplicationController
 | 
				
			||||||
      impressionist(@item)
 | 
					      impressionist(@item)
 | 
				
			||||||
      render_page 
 | 
					      render_page 
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      render :text => t(:need_home)
 | 
					      redirect_to '/admin/dashboards',:notice=>t(:need_home)
 | 
				
			||||||
 | 
					      # render :text => t(:need_home)
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -9,4 +9,5 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<div class="form-actions form-fixed pagination-right">
 | 
					<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(: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>
 | 
					</div>
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,8 @@
 | 
				
			||||||
<% content_for :side_bar do %>
 | 
					<% 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 %>
 | 
					<% end %>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<div class="main2">
 | 
					<div class="main2">
 | 
				
			||||||
	<%= form_tag '',:multipart => true,:action=>"post" do |f| %>
 | 
						<%= form_tag '',:multipart => true,:action=>"post" do |f| %>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -461,6 +461,7 @@ en:
 | 
				
			||||||
    success_: Successfully updated
 | 
					    success_: Successfully updated
 | 
				
			||||||
  update_: Update
 | 
					  update_: Update
 | 
				
			||||||
  update_at: Update at
 | 
					  update_at: Update at
 | 
				
			||||||
 | 
					  upload: Upload
 | 
				
			||||||
  url: URL
 | 
					  url: URL
 | 
				
			||||||
  use_status: Use Statue
 | 
					  use_status: Use Statue
 | 
				
			||||||
  user: User
 | 
					  user: User
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -462,6 +462,7 @@ zh_tw:
 | 
				
			||||||
    success_: 使用者已更新成功
 | 
					    success_: 使用者已更新成功
 | 
				
			||||||
  update_: 更新
 | 
					  update_: 更新
 | 
				
			||||||
  update_at: 最後更新時間
 | 
					  update_at: 最後更新時間
 | 
				
			||||||
 | 
					  upload: 上傳
 | 
				
			||||||
  url: 網址
 | 
					  url: 網址
 | 
				
			||||||
  use_status: 使用狀態
 | 
					  use_status: 使用狀態
 | 
				
			||||||
  user: 使用者
 | 
					  user: 使用者
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,15 +3,14 @@
 | 
				
			||||||
namespace :site do
 | 
					namespace :site do
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  task :build => :environment do
 | 
					  task :build => :environment do
 | 
				
			||||||
  
 | 
					 | 
				
			||||||
    Site.destroy_all
 | 
					    Site.destroy_all
 | 
				
			||||||
    Purchase.destroy_all
 | 
					    Purchase.destroy_all
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    Site.create( :school => 'RulingDigital University', :department => 'Computer Science', :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' ]) 
 | 
				
			||||||
    User.create!(:email=>'chris@rulingcom.com',:admin=>true,:user_id=>'chris',:password=>'password')
 | 
					    User.create!(:email=>'chris@rulingcom.com',:admin=>true,:user_id=>'chris',:password=>'password')
 | 
				
			||||||
 | 
					    `mongo #{Mongoid.config.database.name} --eval "db.fs.chunks.ensureIndex({files_id: 1, n: 1})"`
 | 
				
			||||||
    put  "Run ensureIndex on chunks before you upload something. If You start DB from nothing."
 | 
					    puts  "Congres you can now login within url"
 | 
				
			||||||
    puts 'Please upload design package and run rake site:necessary_data'
 | 
					    puts 'Please upload design package (/admin/designs/upload_package ) and run rake site:necessary_data'
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  task :necessary_data => :environment do
 | 
					  task :necessary_data => :environment do
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue