<% get_memo %>
<%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %>
- <%= f.text_area :subject, :class => "opnionText", :placeholder => l(:label_feedback_tips) %>
- <%= f.hidden_field :content, :required => true , :value => l(:label_feedback_value) %>
+ <%= f.hidden_field :subject,:required => true , :value => l(:label_feedback_value) %>
+ <%= f.text_area :content,:class => "opnionText" , :placeholder => l(:label_feedback_tips) %>
<%= l(:label_submit)%>
diff --git a/config/additional_environment.rb b/config/additional_environment.rb
deleted file mode 100644
index 6654da90f..000000000
--- a/config/additional_environment.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copy this file to additional_environment.rb and add any statements
-# that need to be passed to the Rails::Initializer. `config` is
-# available in this context.
-#
-# Example:
-#
-# config.log_level = :debug
-# ...
-#
-#config.relative_url_root = '/socialforge'
diff --git a/config/application.rb b/config/application.rb
index 487223584..57ae436cb 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -1,77 +1,75 @@
-require File.expand_path('../boot', __FILE__)
-
-require 'rails/all'
-require 'sprockets/railtie'
-
-if defined?(Bundler)
- # If you precompile assets before deploying to production, use this line
- Bundler.require(*Rails.groups(:assets => %w(development test)))
- # If you want your assets lazily compiled in production, use this line
- # Bundler.require(:default, :assets, Rails.env)
-end
-
-module RedmineApp
- class Application < Rails::Application
- # Settings in config/environments/* take precedence over those specified here.
- # Application configuration should go into files in config/initializers
- # -- all .rb files in that directory are automatically loaded.
-
- #verifier if email is real
-
-
- config.generators do |g|
- g.test_framework :rspec,
- fixtures: true,
- view_specs: false,
- helper_specs: false,
- routing_specs: false,
- controller_specs: true,
- request_specs: false
- g.fixture_replacement :factory_girl, dir: "spec/factories"
- end
- # Custom directories with classes and modules you want to be autoloadable.
- config.autoload_paths += %W(#{config.root}/lib)
-
- # Only load the plugins named here, in the order given (default is alphabetical).
- # :all can be used as a placeholder for all plugins not explicitly named.
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
-
- # Activate observers that should always be running.
- config.active_record.observers = :journals_for_message_observer, :issue_observer, :journal_observer, :wiki_content_observer
-
- config.active_record.store_full_sti_class = true
- config.active_record.default_timezone = :local
-
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
- # config.time_zone = 'Central Time (US & Canada)'
-
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
- # config.i18n.default_locale = :de
-
- # Configure the default encoding used in templates for Ruby 1.9.
- config.encoding = "utf-8"
-
- # Configure sensitive parameters which will be filtered from the log file.
- config.filter_parameters += [:password]
-
- # Enable the asset pipeline
- config.assets.enabled = false
-
- # Version of your assets, change this if you want to expire all your assets
- config.assets.version = '1.0'
-
- config.action_mailer.perform_deliveries = false
-
- # Do not include all helpers
- config.action_controller.include_all_helpers = false
-
- config.session_store :cookie_store, :key => '_redmine_session'
-
- if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
- instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
- end
-
- end
-end
+require File.expand_path('../boot', __FILE__)
+
+require 'rails/all'
+require 'sprockets/railtie'
+
+if defined?(Bundler)
+ # If you precompile assets before deploying to production, use this line
+ Bundler.require(*Rails.groups(:assets => %w(development test)))
+ # If you want your assets lazily compiled in production, use this line
+ # Bundler.require(:default, :assets, Rails.env)
+end
+
+module RedmineApp
+ class Application < Rails::Application
+ # Settings in config/environments/* take precedence over those specified here.
+ # Application configuration should go into files in config/initializers
+ # -- all .rb files in that directory are automatically loaded.
+
+ #verifier if email is real
+
+
+ config.generators do |g|
+ g.test_framework :rspec,
+ fixtures: true,
+ view_specs: false,
+ helper_specs: false,
+ routing_specs: false,
+ controller_specs: true,
+ request_specs: false
+ g.fixture_replacement :factory_girl, dir: "spec/factories"
+ end
+ # Custom directories with classes and modules you want to be autoloadable.
+ config.autoload_paths += %W(#{config.root}/lib)
+
+ # Only load the plugins named here, in the order given (default is alphabetical).
+ # :all can be used as a placeholder for all plugins not explicitly named.
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
+
+ # Activate observers that should always be running.
+ config.active_record.observers = :journals_for_message_observer, :issue_observer, :journal_observer, :wiki_content_observer
+
+ config.active_record.store_full_sti_class = true
+ config.active_record.default_timezone = :local
+
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
+ # config.time_zone = 'Central Time (US & Canada)'
+
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
+ # config.i18n.default_locale = :de
+
+ # Configure the default encoding used in templates for Ruby 1.9.
+ config.encoding = "utf-8"
+
+ # Configure sensitive parameters which will be filtered from the log file.
+ config.filter_parameters += [:password]
+
+ # Enable the asset pipeline
+ config.assets.enabled = false
+
+ # Version of your assets, change this if you want to expire all your assets
+ config.assets.version = '1.0'
+
+ config.action_mailer.perform_deliveries = false
+
+ # Do not include all helpers
+ config.action_controller.include_all_helpers = false
+
+ if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
+ instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
+ end
+
+ end
+end
diff --git a/config/environments/production.rb b/config/environments/production.rb
index 160e0b8b0..63931fa33 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -19,7 +19,12 @@ RedmineApp::Application.configure do
# Full error reports are disabled and caching is turned on
config.logger = Logger.new('log/production.log', 'daily',1048576) # daily, weekly or monthly
config.action_controller.perform_caching = true
- config.cache_store = :file_store, "#{Rails.root }/files/cache_store/"
+
+ # to additional_environment.rb
+ # config.cache_store = :file_store, "#{Rails.root }/files/cache_store/"
+ # config.cache_store = :redis_store, 'redis://localhost:6379/0/cache', { expires_in: 90.minutes }
+ #
+
# Enable serving of images, stylesheets, and javascripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"
diff --git a/config/locales/commons/en.yml b/config/locales/commons/en.yml
index 3c2c63654..5eb92f07e 100644
--- a/config/locales/commons/en.yml
+++ b/config/locales/commons/en.yml
@@ -347,7 +347,7 @@ en:
label_feedback_tips: "Anything you want to say, roar it here ~~"
label_technical_support: "Support: "
label_feedback_success: "Your comments have been sent to the public bar in the home page, thanks for your support!"
- label_feedback_value: "The post comes from user feedback box!"
+ label_feedback_value: "User feedback"
#
#
diff --git a/config/locales/commons/zh.yml b/config/locales/commons/zh.yml
index 75c8b687a..b506ce14b 100644
--- a/config/locales/commons/zh.yml
+++ b/config/locales/commons/zh.yml
@@ -354,7 +354,7 @@ zh:
label_feedback_tips: "有什么想说的,尽管来咆哮吧~~"
label_technical_support: "技术支持:"
label_feedback_success: "您的意见已经反馈到公共贴吧的新手讨论吧,我们会第一时间解决您的问题,谢谢支持!"
- label_feedback_value: "该贴来自用户反馈!"
+ label_feedback_value: "用户意见反馈"
diff --git a/public/javascripts/feedback.js b/public/javascripts/feedback.js
index 7ed063b75..a3707b312 100644
--- a/public/javascripts/feedback.js
+++ b/public/javascripts/feedback.js
@@ -82,5 +82,8 @@ $(function(){
function f_submit()
{
+ var subject = $("#memo_subject").val();
+ var content = $("#memo_content").val();
+ $("#memo_subject").val(subject+":"+ content.substr(0,18));
$("#new_memo").submit();
}
\ No newline at end of file