tida_template 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +38 -0
- data/lib/generators/tida_template/install_generator.rb +60 -0
- data/lib/generators/tida_template/templates/app/views/devise/sessions/new.html.erb +19 -0
- data/lib/generators/tida_template/templates/app/views/layouts/application.html.erb +49 -0
- data/lib/generators/tida_template/templates/app/views/layouts/single.html.erb +27 -0
- data/lib/generators/tida_template/templates/app/views/shared/components/_article_title.html.erb +10 -0
- data/lib/generators/tida_template/templates/app/views/shared/components/_date_jumper.html.erb +20 -0
- data/lib/generators/tida_template/templates/app/views/shared/components/_modal.html.erb +7 -0
- data/lib/generators/tida_template/templates/app/views/shared/components/_notification.html.erb +12 -0
- data/lib/generators/tida_template/templates/app/views/shared/components/_page_menu.html.erb +29 -0
- data/lib/generators/tida_template/templates/app/views/shared/components/_page_title.html.erb +10 -0
- data/lib/generators/tida_template/templates/app/views/shared/components/_toolbar.html.erb +5 -0
- data/lib/generators/tida_template/templates/config/application.yml +13 -0
- data/lib/generators/tida_template/templates/config/initializers/navigation_renderers.rb +2 -0
- data/lib/generators/tida_template/templates/config/initializers/quiet_assets.rb +13 -0
- data/lib/generators/tida_template/templates/config/locales/devise.zh-CN.yml +65 -0
- data/lib/generators/tida_template/templates/config/locales/simple_form.zh-CN.yml +27 -0
- data/lib/generators/tida_template/templates/config/locales/zh-CN.yml +150 -0
- data/lib/generators/tida_template/templates/paperclip/attachment_access_token.rb +24 -0
- data/lib/generators/tida_template/templates/rails_templates/erb/scaffold/_form.html.erb +16 -0
- data/lib/generators/tida_template/templates/rails_templates/erb/scaffold/edit.html.erb +8 -0
- data/lib/generators/tida_template/templates/rails_templates/erb/scaffold/index.html.erb +23 -0
- data/lib/generators/tida_template/templates/rails_templates/erb/scaffold/new.html.erb +8 -0
- data/lib/generators/tida_template/templates/rails_templates/erb/scaffold/show.html.erb +35 -0
- data/lib/generators/tida_template/templates/rails_templates/rails/scaffold_controller/controller.rb +89 -0
- data/lib/generators/tida_template/templates/renderers/sub_navigation_bar_renderer.rb +72 -0
- data/lib/generators/tida_template/templates/renderers/top_navigation_bar_renderer.rb +37 -0
- data/lib/generators/tida_template/templates/settingslogic/settings.rb +5 -0
- data/lib/tasks/tida_template_tasks.rake +4 -0
- data/lib/tida_template.rb +4 -0
- data/lib/tida_template/engine.rb +7 -0
- data/lib/tida_template/version.rb +3 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +58 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/test_helper.rb +15 -0
- data/test/tida_template_test.rb +7 -0
- metadata +401 -0
data/MIT-LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Copyright 2013 YOURNAME
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the
|
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be
|
|
12
|
+
included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
data/Rakefile
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env rake
|
|
2
|
+
begin
|
|
3
|
+
require 'bundler/setup'
|
|
4
|
+
rescue LoadError
|
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
|
6
|
+
end
|
|
7
|
+
begin
|
|
8
|
+
require 'rdoc/task'
|
|
9
|
+
rescue LoadError
|
|
10
|
+
require 'rdoc/rdoc'
|
|
11
|
+
require 'rake/rdoctask'
|
|
12
|
+
RDoc::Task = Rake::RDocTask
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
|
16
|
+
rdoc.rdoc_dir = 'rdoc'
|
|
17
|
+
rdoc.title = 'TidaTemplate'
|
|
18
|
+
rdoc.options << '--line-numbers'
|
|
19
|
+
rdoc.rdoc_files.include('README.rdoc')
|
|
20
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
Bundler::GemHelper.install_tasks
|
|
27
|
+
|
|
28
|
+
require 'rake/testtask'
|
|
29
|
+
|
|
30
|
+
Rake::TestTask.new(:test) do |t|
|
|
31
|
+
t.libs << 'lib'
|
|
32
|
+
t.libs << 'test'
|
|
33
|
+
t.pattern = 'test/**/*_test.rb'
|
|
34
|
+
t.verbose = false
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
task :default => :test
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
module TidaTemplate #:nodoc:
|
|
2
|
+
module Generators #:nodoc:
|
|
3
|
+
class InstallGenerator < Rails::Generators::Base #:nodoc:
|
|
4
|
+
|
|
5
|
+
source_root File.expand_path('../templates', __FILE__)
|
|
6
|
+
|
|
7
|
+
def copy_stuff #:nodoc:
|
|
8
|
+
# copy layouts
|
|
9
|
+
copy_file 'app/views/layouts/single.html.erb', 'app/views/layouts/single.html.erb'
|
|
10
|
+
copy_file 'app/views/layouts/application.html.erb', 'app/views/layouts/application.html.erb'
|
|
11
|
+
|
|
12
|
+
# copy shared
|
|
13
|
+
copy_file 'app/views/shared/components/_article_title.html.erb', 'app/views/shared/components/_article_title.html.erb'
|
|
14
|
+
copy_file 'app/views/shared/components/_date_jumper.html.erb', 'app/views/shared/components/_date_jumper.html.erb'
|
|
15
|
+
copy_file 'app/views/shared/components/_modal.html.erb', 'app/views/shared/components/_modal.html.erb'
|
|
16
|
+
copy_file 'app/views/shared/components/_notification.html.erb', 'app/views/shared/components/_notification.html.erb'
|
|
17
|
+
copy_file 'app/views/shared/components/_page_menu.html.erb', 'app/views/shared/components/_page_menu.html.erb'
|
|
18
|
+
copy_file 'app/views/shared/components/_page_title.html.erb', 'app/views/shared/components/_page_title.html.erb'
|
|
19
|
+
copy_file 'app/views/shared/components/_toolbar.html.erb', 'app/views/shared/components/_toolbar.html.erb'
|
|
20
|
+
|
|
21
|
+
# copy rails template files
|
|
22
|
+
copy_file 'rails_templates/erb/scaffold/_form.html.erb', 'lib/templates/erb/_form.html.erb'
|
|
23
|
+
copy_file 'rails_templates/erb/scaffold/index.html.erb', 'lib/templates/erb/index.html.erb'
|
|
24
|
+
copy_file 'rails_templates/erb/scaffold/new.html.erb', 'lib/templates/erb/new.html.erb'
|
|
25
|
+
copy_file 'rails_templates/erb/scaffold/edit.html.erb', 'lib/templates/erb/edit.html.erb'
|
|
26
|
+
copy_file 'rails_templates/erb/scaffold/show.html.erb', 'lib/templates/erb/show.html.erb'
|
|
27
|
+
copy_file 'rails_templates/rails/scaffold_controller/controller.rb', 'lib/templates/rails/scaffold_controller/controller.rb'
|
|
28
|
+
|
|
29
|
+
# copy renders
|
|
30
|
+
copy_file 'renderers/sub_navigation_bar_renderer.rb', 'lib/tida/renderers/sub_navigation_bar_renderer.rb'
|
|
31
|
+
copy_file 'renderers/top_navigation_bar_renderer.rb', 'lib/tida/renderers/top_navigation_bar_renderer.rb'
|
|
32
|
+
|
|
33
|
+
# copy paperclip attachment access token
|
|
34
|
+
copy_file 'paperclip/attachment_access_token.rb', 'lib/tida/paperclip/attachment_access_token.rb'
|
|
35
|
+
|
|
36
|
+
# copy initializers
|
|
37
|
+
copy_file 'config/initializers/navigation_renderers.rb', 'config/initializers/navigation_renderers.rb'
|
|
38
|
+
copy_file 'config/initializers/quiet_assets.rb', 'config/initializers/quiet_assets.rb'
|
|
39
|
+
|
|
40
|
+
# copy locales
|
|
41
|
+
copy_file 'config/locales/devise.zh-CN.yml', 'config/locales/devise.zh-CN.yml'
|
|
42
|
+
copy_file 'config/locales/simple_form.zh-CN.yml', 'config/locales/simple_form.zh-CN.yml'
|
|
43
|
+
copy_file 'config/locales/zh-CN.yml', 'config/locales/zh-CN.yml'
|
|
44
|
+
|
|
45
|
+
#copy other configurations
|
|
46
|
+
copy_file 'config/application.yml', 'config/application.yml'
|
|
47
|
+
copy_file 'settingslogic/settings.rb', 'lib/settings.rb'
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def run_other_generators
|
|
51
|
+
generate 'devise:install'
|
|
52
|
+
generate 'devise user'
|
|
53
|
+
generate 'simple_form:install --bootstrap'
|
|
54
|
+
generate 'wice_grid:install'
|
|
55
|
+
generate 'navigation_config'
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<%= simple_form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
|
|
2
|
+
|
|
3
|
+
<%- if alert %>
|
|
4
|
+
<div id="alert-box">
|
|
5
|
+
<%= alert %><span class="caret"></span>
|
|
6
|
+
</div>
|
|
7
|
+
<% end -%>
|
|
8
|
+
|
|
9
|
+
<%= f.input :email, autofocus: true, label: false, placeholder: 'email' %>
|
|
10
|
+
<%= f.input :password, label: false, placeholder: 'password' %>
|
|
11
|
+
<div class="clearfix">
|
|
12
|
+
<%= f.button :submit, t("buttons.sign_in"), :class => 'button button-logo' %>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
<% end %>
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title><%= Settings.app.name %></title>
|
|
5
|
+
<link rel="shortcut icon" href="/assets/favicon.ico" />
|
|
6
|
+
<%= stylesheet_link_tag "application", :media => "all" %>
|
|
7
|
+
<%= javascript_include_tag "application" %>
|
|
8
|
+
<%= yield :js %>
|
|
9
|
+
<%= csrf_meta_tags %>
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div id="main-container">
|
|
13
|
+
<header>
|
|
14
|
+
<div id="logo" class="pull-left"></div>
|
|
15
|
+
<ul id="user-menu-panel" class="pull-right clearfix">
|
|
16
|
+
<%- if user_signed_in? %>
|
|
17
|
+
<li class="dropdown">
|
|
18
|
+
<a href="javascript:void(0);" class="dropdown-toggle"><%= t("labels.welcome")%>, <strong><%= current_user.email %></strong> <b class="caret"></b></a>
|
|
19
|
+
<ul class="dropdown-menu">
|
|
20
|
+
<li>
|
|
21
|
+
<%= link_to(t("buttons.sign_out"), destroy_user_session_path, :method=>'delete') %>
|
|
22
|
+
</li>
|
|
23
|
+
</ul>
|
|
24
|
+
</li>
|
|
25
|
+
<% else %>
|
|
26
|
+
<li><%= link_to t("buttons.sign_in"), :user_session %></li>
|
|
27
|
+
<% end -%>
|
|
28
|
+
</ul>
|
|
29
|
+
</header>
|
|
30
|
+
<div id="main-content">
|
|
31
|
+
<%= render_navigation renderer: :top_navigation_bar %>
|
|
32
|
+
<div id="main" class="clearfix">
|
|
33
|
+
<%= render_navigation renderer: :sub_navigation_bar, expand_all: true %>
|
|
34
|
+
<div class="content">
|
|
35
|
+
<%= render partial: 'shared/components/notification' %>
|
|
36
|
+
<%= yield %>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<footer>
|
|
42
|
+
<span class="copyright">tida © 2013 All Rights Reserved.</span>
|
|
43
|
+
</footer>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<%= yield :anything_else %>
|
|
47
|
+
<%= stylesheet_link_tag "retina", :media => "all" %>
|
|
48
|
+
</body>
|
|
49
|
+
</html>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title><%= Settings.app.name %></title>
|
|
5
|
+
<link rel="shortcut icon" href="/assets/favicon.ico" />
|
|
6
|
+
<%= stylesheet_link_tag :single, :media => "all" %>
|
|
7
|
+
<%= yield :js %>
|
|
8
|
+
<%= csrf_meta_tags %>
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div id="main-container">
|
|
12
|
+
<header>
|
|
13
|
+
<h1></h1>
|
|
14
|
+
<div id="logo"></div>
|
|
15
|
+
</header>
|
|
16
|
+
|
|
17
|
+
<div id="main-content" class="clearfix">
|
|
18
|
+
<div class="content">
|
|
19
|
+
<%= yield %>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<footer>
|
|
23
|
+
tida © 2013 All Rights Reserved. <br><a href="http://www.miit.gov.cn/" target="blank">苏ICP备13009122号-1</a>
|
|
24
|
+
</footer>
|
|
25
|
+
</div>
|
|
26
|
+
</body>
|
|
27
|
+
</html>
|
data/lib/generators/tida_template/templates/app/views/shared/components/_article_title.html.erb
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<header class="article-title grid">
|
|
2
|
+
<div class="grid-row">
|
|
3
|
+
<div class="cell6">
|
|
4
|
+
<h4 class="<%= article_title[:class] %>"><%= article_title[:title] %></h4>
|
|
5
|
+
</div>
|
|
6
|
+
<div class="cell6">
|
|
7
|
+
<%= render partial: 'shared/components/toolbar', object: article_title[:toolbar] if article_title[:toolbar] %>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
</header>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<div class="padding grid">
|
|
2
|
+
<div class="grid-row">
|
|
3
|
+
<div class="cell6">
|
|
4
|
+
<a href="#" class="button button-primary" id="change-date-button" data-date-format="yyyy-mm-dd" data-date="<%= date_jumper[:current_date] %>">选择日期</a>
|
|
5
|
+
</div>
|
|
6
|
+
<div class="cell6">
|
|
7
|
+
<h4 class="pull-right"><%= date_jumper[:current_date] %></h4>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<script language="javascript">
|
|
13
|
+
$(document).ready(function() {
|
|
14
|
+
$('#change-date-button').datepicker().on('changeDate', function(ev){
|
|
15
|
+
var selected_date = new Date(ev.date);
|
|
16
|
+
var date_string = selected_date.getFullYear() + '-' + ('0' + (selected_date.getMonth()+1)).slice(-2) + '-' + ('0' + selected_date.getDate()).slice(-2);
|
|
17
|
+
window.location.href = "<%= brand_launch_type_path(brand_id: @brand.id, type: @launch_type) %>" + "?date=" + date_string;
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
</script>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<div id="<%= modal[:name] %>" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="<%= modal[:name] %>-title" aria-hidden="true">
|
|
2
|
+
<div class="modal-header">
|
|
3
|
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
4
|
+
<h4 id="<%= modal[:name] %>-title"><%= modal[:title] %></h4>
|
|
5
|
+
</div>
|
|
6
|
+
<%= render partial: modal[:inner_partial] %>
|
|
7
|
+
</div>
|
data/lib/generators/tida_template/templates/app/views/shared/components/_notification.html.erb
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<%- if alert %>
|
|
2
|
+
<div class="alert alert-error notification">
|
|
3
|
+
<button type="button" class="close" data-dismiss="alert">×</button>
|
|
4
|
+
<i class="icon-frown"></i> <%= alert %>
|
|
5
|
+
</div>
|
|
6
|
+
<% end -%>
|
|
7
|
+
<%- if notice %>
|
|
8
|
+
<div class="alert alert-success notification">
|
|
9
|
+
<button type="button" class="close" data-dismiss="alert">×</button>
|
|
10
|
+
<i class="icon-smile"></i> <%= notice %>
|
|
11
|
+
</div>
|
|
12
|
+
<% end -%>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<div class="header">
|
|
2
|
+
<h3><%= page_menu[:name] %></h3>
|
|
3
|
+
</div>
|
|
4
|
+
<div class="accordion" id="page-menu-body">
|
|
5
|
+
<% if page_menu[:items] %>
|
|
6
|
+
<% page_menu[:items].each_with_index do |item, index| %>
|
|
7
|
+
<div class="accordion-group">
|
|
8
|
+
<div class="accordion-heading">
|
|
9
|
+
<% if item[:children] %>
|
|
10
|
+
<a class="accordion-toggle" data-toggle="collapse" data-parent="#page-menu-body" href="#item_<%= index + 1 %>">
|
|
11
|
+
<%= item[:name] %>
|
|
12
|
+
</a>
|
|
13
|
+
<% else %>
|
|
14
|
+
<%= link_to item[:name], item[:url], class: item[:classes] %>
|
|
15
|
+
<% end %>
|
|
16
|
+
</div>
|
|
17
|
+
<% if item[:children] %>
|
|
18
|
+
<% item[:children].each do |child| %>
|
|
19
|
+
<div id="item_<%= index + 1 %>" class="accordion-body collapse">
|
|
20
|
+
<div class="accordion-inner">
|
|
21
|
+
<%= link_to child[:name], child[:url], class: child[:classes] %>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<% end %>
|
|
25
|
+
<% end %>
|
|
26
|
+
</div>
|
|
27
|
+
<% end %>
|
|
28
|
+
<% end %>
|
|
29
|
+
</div>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<div class="page-title grid">
|
|
2
|
+
<div class="grid-row">
|
|
3
|
+
<div class="cell6">
|
|
4
|
+
<h3><%= page_title[:title] %></h3>
|
|
5
|
+
</div>
|
|
6
|
+
<div class="cell6">
|
|
7
|
+
<%= render partial: 'shared/components/toolbar', object: page_title[:toolbar] if page_title[:toolbar] %>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
if Rails.env.development?
|
|
2
|
+
Rails.application.assets.logger = Logger.new('/dev/null')
|
|
3
|
+
Rails::Rack::Logger.class_eval do
|
|
4
|
+
def call_with_quiet_assets(env)
|
|
5
|
+
previous_level = Rails.logger.level
|
|
6
|
+
Rails.logger.level = Logger::ERROR if env['PATH_INFO'] =~ %r{^/assets/}
|
|
7
|
+
call_without_quiet_assets(env)
|
|
8
|
+
ensure
|
|
9
|
+
Rails.logger.level = previous_level
|
|
10
|
+
end
|
|
11
|
+
alias_method_chain :call, :quiet_assets
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Chinese (China) translations for Devise 2.0
|
|
2
|
+
# by HungYuhei (https://github.com/HungYuHei)
|
|
3
|
+
# forked from https://gist.github.com/1319590
|
|
4
|
+
|
|
5
|
+
zh-CN:
|
|
6
|
+
errors:
|
|
7
|
+
messages:
|
|
8
|
+
expired: "您已过期,请重新申请"
|
|
9
|
+
not_found: "没有找到"
|
|
10
|
+
already_confirmed: "已经激活,请重新登录."
|
|
11
|
+
not_locked: "未锁定"
|
|
12
|
+
not_saved:
|
|
13
|
+
one: "因为 1 个错误导致此 %{resource}保存失败:"
|
|
14
|
+
other: "因为 %{count}个错误导致此 %{resource}保存失败:"
|
|
15
|
+
devise:
|
|
16
|
+
elements:
|
|
17
|
+
sign_in: '登录'
|
|
18
|
+
sign_up: '注册'
|
|
19
|
+
sign_out: '注销'
|
|
20
|
+
forgot_password: '忘记密码?'
|
|
21
|
+
failure:
|
|
22
|
+
already_authenticated: '您已经登录.'
|
|
23
|
+
unauthenticated: '继续操作前请注册或者登录.'
|
|
24
|
+
unconfirmed: '继续操作前请先激活您的帐号.'
|
|
25
|
+
locked: '您的帐号已被锁定.'
|
|
26
|
+
invalid: '邮箱或密码错误'
|
|
27
|
+
invalid_token: '认证码无效.'
|
|
28
|
+
timeout: '您已登录超时,请重新登录.'
|
|
29
|
+
inactive: '您还没有激活帐户.'
|
|
30
|
+
user:
|
|
31
|
+
not_found_in_database: 没有找到此用户
|
|
32
|
+
sessions:
|
|
33
|
+
signed_in: '登录成功.'
|
|
34
|
+
signed_out: '退出成功.'
|
|
35
|
+
passwords:
|
|
36
|
+
send_instructions: '稍后你将收到帐号激活的电子邮件'
|
|
37
|
+
updated: '您的密码已修改成功,您现在已登录.'
|
|
38
|
+
updated_not_active: '您的密码已修改成功.'
|
|
39
|
+
send_paranoid_instructions: '如果您的邮箱存在于我们的数据库中,您将收到一封找回密码的邮件.'
|
|
40
|
+
confirmations:
|
|
41
|
+
send_instructions: '稍后你将收到帐号激活的电子邮件'
|
|
42
|
+
confirmed: '您的帐号已经激活,您现在已登录.'
|
|
43
|
+
send_paranoid_instructions: '如果您的邮箱存在于我们的数据库中,您将收到一封激活账号的邮件.'
|
|
44
|
+
registrations:
|
|
45
|
+
signed_up: '欢迎您!您已注册成功.'
|
|
46
|
+
updated: '帐号资料更新成功.'
|
|
47
|
+
update_needs_confirmation: '您更改了邮箱地址,我们需要验证您的新邮箱地址,请查看您的邮箱,点击激活链接来验证您的新邮箱地址.'
|
|
48
|
+
destroyed: '再见!您的帐户已成功注销。我们希望很快可以再见到您.'
|
|
49
|
+
signed_up_but_unconfirmed: '带有激活链接的信息已经发送到你的邮箱。请打开此链接来激活你的帐号'
|
|
50
|
+
signed_up_but_inactive: '虽然您已经注册成功,但因为你的帐号还未激活,所以你暂时无法登录'
|
|
51
|
+
signed_up_but_locked: '虽然您已经注册成功,但因为你的帐号已被锁定,所以你暂时无法登录'
|
|
52
|
+
unlocks:
|
|
53
|
+
send_instructions: '稍后你将收到帐号激活的电子邮件'
|
|
54
|
+
unlocked: '您的帐号已成功解锁,您现在已登录.'
|
|
55
|
+
send_paranoid_instructions: '如果您的邮箱存在于我们的数据库中,您将收到一封解锁账号的邮件.'
|
|
56
|
+
omniauth_callbacks:
|
|
57
|
+
success: '成功地从 %{kind}获得授权.'
|
|
58
|
+
failure: '因为 %{reason},所以您无法从 %{kind}获得授权.'
|
|
59
|
+
mailer:
|
|
60
|
+
confirmation_instructions:
|
|
61
|
+
subject: '激活信息'
|
|
62
|
+
reset_password_instructions:
|
|
63
|
+
subject: '重置密码信息'
|
|
64
|
+
unlock_instructions:
|
|
65
|
+
subject: '解锁信息'
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
zh-CN:
|
|
2
|
+
simple_form:
|
|
3
|
+
"yes": '是的'
|
|
4
|
+
"no": '不用'
|
|
5
|
+
required:
|
|
6
|
+
text: '带星号的为必填项'
|
|
7
|
+
mark: '*'
|
|
8
|
+
# You can uncomment the line below if you need to overwrite the whole required html.
|
|
9
|
+
# When using html, text and mark won't be used.
|
|
10
|
+
# html: '<abbr title="required">*</abbr>'
|
|
11
|
+
error_notification:
|
|
12
|
+
default_message: "请查看下面的错误提示:"
|
|
13
|
+
|
|
14
|
+
# Labels and hints examples
|
|
15
|
+
# labels:
|
|
16
|
+
# defaults:
|
|
17
|
+
# password: 'Password'
|
|
18
|
+
# user:
|
|
19
|
+
# new:
|
|
20
|
+
# email: 'E-mail to sign in.'
|
|
21
|
+
# edit:
|
|
22
|
+
# email: 'E-mail.'
|
|
23
|
+
# hints:
|
|
24
|
+
# defaults:
|
|
25
|
+
# username: 'User name to sign in.'
|
|
26
|
+
# password: 'No special characters, please.'
|
|
27
|
+
|