Compare commits

...

1 Commits
master ... thu

Author SHA1 Message Date
chris dc895b84c1 Changes for THU 2013-01-07 10:45:27 +08:00
10 changed files with 58 additions and 28 deletions

View File

@ -1,5 +1,5 @@
source 'http://rubygems.org'
gem 'rails'
gem 'rails', "~> 3.2"
gem "brakeman"
gem 'mime-types'
@ -21,7 +21,7 @@ gem 'kaminari', :git => 'git://github.com/amatsuda/kaminari.git'
gem 'mini_magick'
gem 'mongoid', '> 2.1', '< 3.0.0'
gem 'mongoid-tree', :require => 'mongoid/tree'
gem "mongo_session_store-rails3"
gem "mongo_session_store-rails3", "~> 3.0"
gem 'nokogiri'

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

@ -1,18 +1,39 @@
<div class="vp">
<div class="s_title hh3">Password Managment</div>
<%= form_for(resource, :as => resource_name, :url => users_passwd_path(resource_name), :html => { :method => :put, "form-type"=>"ajax_form" ,"callback-method"=>"passwordUpdate" }) do |f| %>
<ul class="s_form">
<li><%= f.label :current_password %>
<%= f.password_field :current_password %></li>
<li><%= f.label :password %>
<%= f.password_field :password %></li>
<li><%= f.label :password_confirmation %>
<%= f.password_field :password_confirmation %></li>
</ul>
<div class="s_action"><%= f.submit "Update", :class => "setting_btn thmc1 thmtxt w1 hh2 hp" %></div>
<% end %>
<h1 class="login-logo"><%= t(:ruling_site) %></h1>
<div id="signin-header">
<h3><%= t(:password_change) %></h3>
</div>
<div id="container" class="sign-in">
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :class => 'user_new form-horizontal' }) do |f| %>
<div class="content">
<% unless f.error_messages.blank? %>
<div class="modal alert alert-error hide" id="myModal">
<p type="button" class="close" data-dismiss="modal">×</p>
<%= f.error_messages %>
</div>
<script>
$('#myModal').modal('show')
</script>
<% end -%>
<div class="main">
<div class="control-group clear">
<%= f.label :password, t(:password)%>
<%= f.text_field :password, :placeholder => t(:password), :style => "width: 330px;" %>
</div>
<div class="control-group clear">
<%= f.label :password_confirmation, t(:password_confirmation)%>
<%= f.text_field :password_confirmation, :placeholder => t(:password_confirmation), :style => "width: 330px;" %>
</div>
<div class="control-group clear">
<%= f.label :current_password, t(:password_current)%>
<%= f.text_field :current_password, :placeholder => t(:password_current), :style => "width: 330px;" %>
</div>
</div>
</div>
<div class="form-actions clear">
<%= link_to t(:back), :back, :class => 'btn' %>
<%= content_tag :button, t(:update), :type => :submit, :class => 'btn btn-primary pull-right' %>
</div>
<% end %>
</div>

View File

@ -21,7 +21,7 @@
<% end %>
</ul>
</li>
<li class="search clear" title="<%= t :search_google %>">
<li class="search clear" title="<%= t :search_thu %>">
<a class="orbit-bar-search" href="#" data-icon="search"></a>
<form class="navbar-search" method="get" action="http://www.google.com/custom">
<input type="hidden" name="client" value="pub-&amp" />
@ -30,7 +30,7 @@
<input type="hidden" name="cof" id="cof" value="AH:center;AWFID:03de271f1940eea3;" />
<input type='hidden' name='domains' value='<%= @site.search["domains"] rescue ''%>'>
<input type='hidden' name='sitesearch' value='<%= @site.search["sitesearch"] rescue '' %>'>
<%= text_field_tag 'q','',{:class => "search-query span3",:placeholder=> t(:search_google) ,:disabled=> ((@site.search["sitesearch"] || @site.search["domains"] ).blank? rescue true)}%>
<%= text_field_tag 'q','',{:class => "search-query span3",:placeholder=> t(:search_thu) ,:disabled=> ((@site.search["sitesearch"] || @site.search["domains"] ).blank? rescue true)}%>
</form>
</li>
<% if user_signed_in? %>
@ -41,6 +41,7 @@
<span class="member-name"><%= current_user.name %></span>
</a>
<ul class="dropdown-menu account-menu">
<li><%= link_to content_tag(:i, nil, :class => 'icons-tools') + ' ' + t(:password_change), edit_user_registration_path %></li>
<!-- <li><%= link_to content_tag(:i, nil, :class => 'icons-tools') + ' ' + t(:account_setting), desktop_path+"#settings-account" %></li> -->
<!-- <li><%= link_to content_tag(:i, nil, :class => 'icons-desktop') + ' ' + t(:desktop), desktop_path %></li> -->
<li><%= link_to content_tag(:i, nil, :class => 'icons-outlog') + ' ' + t(:logout), destroy_user_session_path %></li>
@ -64,7 +65,7 @@
<li>
<div class="input-prepend">
<span class="add-on"><i class="icon-user"></i></span>
<%= f.text_field :email, :class => 'span2', :placeholder => t(:email), :size => 16 %>
<%= f.text_field :email, :class => 'span2', :placeholder => t(:thu_account), :size => 16 %>
</div>
</li>
<li>

View File

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<%= page_title(@item).html_safe %>
<link rel="shortcut icon" href="<%= asset_path "ncculogo.ico" %>">
<link rel="shortcut icon" href="<%= asset_path "favicon.ico" %>">
<%= page_metas(@item).html_safe %>
<!--[if lt IE 9]>
<%= javascript_include_tag "html5" %>

View File

@ -70,9 +70,9 @@ module Orbit
#config.time_zone = 'Taipei'
ENV['TZ'] = 'Asia/Taipei'
config.to_prepare do
Devise::RegistrationsController.layout false
end
# config.to_prepare do
# Devise::RegistrationsController.layout false
# end
end
end
Orbit_Apps = []

View File

@ -0,0 +1,4 @@
en:
search_thu: Search THU
thu_account: THU Account

View File

@ -0,0 +1,4 @@
zh_tw:
search_thu: 搜尋東海
thu_account: THU Account

View File

@ -8,10 +8,10 @@ defaults: &defaults
development:
<<: *defaults
database: demo_site_development
database: thu_development
test:
<<: *defaults
database: demo_site_test
database: thu_test
# set these environment variables on your prod server
production:
@ -21,4 +21,4 @@ production:
# password: <%= ENV['MONGOID_PASSWORD'] %>
# database: <%= ENV['MONGOID_DATABASE'] %>
<<: *defaults
database: demo_site_production
database: thu_development