diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index c4f350fc..6b8c0366 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -10,7 +10,7 @@ class BidsController < ApplicationController def index # Modified by nie # @requirement_title = "4" - @offset, @limit = api_offset_and_limit({:limit => 5}) + @offset, @limit = api_offset_and_limit({:limit => 10}) @bids = Bid.visible @bids = @bids.like(params[:name]) if params[:name].present? @bid_count = @bids.count diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index 6f822d2c..4fa51682 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -1,4 +1,4 @@ - # Redmine - project management software +# Redmine - project management software # Copyright (C) 2006-2013 Jean-Philippe Lang # # This program is free software; you can redistribute it and/or @@ -10,7 +10,7 @@ # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +#+ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -50,10 +50,12 @@ class MyController < ApplicationController def account @user = User.current @pref = @user.pref + if request.post? @user.safe_attributes = params[:user] @user.pref.attributes = params[:pref] @user.pref[:no_self_notified] = (params[:no_self_notified] == '1') + if @user.save @user.pref.save @user.notified_project_ids = (@user.mail_notification == 'selected' ? params[:notified_project_ids] : []) @@ -85,7 +87,9 @@ class MyController < ApplicationController # Manage user's password def password + @root_path="/home/pdl/redmine-2.3.2-0/apache2/" @user = User.current + @middle = "^"+@user.login.to_s+":" unless @user.change_password_allowed? flash[:error] = l(:notice_can_t_change_password) redirect_to my_account_path @@ -94,6 +98,9 @@ class MyController < ApplicationController if request.post? if @user.check_password?(params[:password]) @user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation] + @root_path="/home/pdl/redmine-2.3.2-0/apache2/" + system "sed -i /"+@middle+"/{d} "+@root_path+"user.passwd" + system "htpasswd -mb "+@root_path+"user.passwd "+@user.login.to_s+" "+params[:new_password] system "echo -e '\n"+@user.login.to_s+"-write:"+ " "+@user.login.to_s+"' >> "+@root_path+"group.passwd" system "mkdir "+@root_path+"htdocs/"+@user.login.to_s diff --git a/app/views/words/_message.html.erb b/app/views/words/_message.html.erb index 546f0730..7f311f4d 100644 --- a/app/views/words/_message.html.erb +++ b/app/views/words/_message.html.erb @@ -21,9 +21,16 @@ <%= format_time journal.created_on %> - <%= link_to(image_tag('comment.png'), {:controller => 'words', :action => 'new', :id => user, :journal_id => journal}, :remote => true, + + <% if @user == User.current%> + <%= link_to(image_tag('comment.png'), {:controller => 'words', :action => 'new', :id => user, :journal_id => journal}, :remote => true, :method => 'post', :title => l(:button_quote))%><%= link_to(image_tag('delete.png'), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => user}, - :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) if remove_allowed || journal.jour_id == User.current.id %> + :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) if remove_allowed || journal.jour_id == User.current.id %> + <% else %> + <%= link_to(image_tag('comment.png'), {:controller => 'words', :action => 'new', :id => user, :journal_id => journal}, :remote => true, + :method => 'post', :title => l(:button_quote))%> + <% end %> + diff --git a/config.ru b/config.ru index ca23714b..baeb4971 100644 --- a/config.ru +++ b/config.ru @@ -2,8 +2,7 @@ require ::File.expand_path('../config/environment', __FILE__) -#run RedmineApp::Application - -map ActionController::Base.config.relative_url_root || "/" do - run RedmineApp::Application +map ActionController::Base.config.try(:relative_url_root) || "/" do +run RedmineApp::Application end + diff --git a/config/configuration.yml b/config/configuration.yml index 27eb86f6..2bdb8883 100644 --- a/config/configuration.yml +++ b/config/configuration.yml @@ -23,7 +23,7 @@ # email_delivery: # delivery_method: :smtp # smtp_settings: -# address: "localhost" +# address: smtp.163.com # port: 25 # # ==== SMTP server at example.com using LOGIN authentication and checking HELO for foo.com @@ -32,12 +32,12 @@ # email_delivery: # delivery_method: :smtp # smtp_settings: -# address: "example.com" -# port: 25 +# address: smtp.gmail.com +# port: 587 # authentication: :login # domain: 'foo.com' -# user_name: 'myaccount' -# password: 'password' +# user_name: senluowanxiangt@gmail.com +# password: 1913TXBja # # ==== SMTP server at example.com using PLAIN authentication # @@ -45,12 +45,12 @@ # email_delivery: # delivery_method: :smtp # smtp_settings: -# address: "example.com" -# port: 25 +# address: smtp.gmail.com +# port: 587 # authentication: :plain # domain: 'example.com' -# user_name: 'myaccount' -# password: 'password' +# user_name: senluowanxiangt@gmail.com +# password: 1913TXBja # # ==== SMTP server at using TLS (GMail) # @@ -62,12 +62,12 @@ # delivery_method: :smtp # smtp_settings: # enable_starttls_auto: true -# address: "smtp.gmail.com" +# address: smtp.gmail.com # port: 587 # domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps # authentication: :plain -# user_name: "your_email@gmail.com" -# password: "your_password" +# user_name: senluowanxiangt@gmail.com +# password: 1913TXBja # # # === More configuration options @@ -84,12 +84,13 @@ default: email_delivery: delivery_method: :smtp smtp_settings: - address: smtp.example.net + + address: smtp.163.com port: 25 - domain: example.net + domain: smtp.163.com authentication: :login - user_name: "redmine@example.net" - password: "redmine" + user_name: trustie2@163.com + password: PDLtrustie2 # Absolute path to the directory where attachments are stored. # The default is the 'files' directory in your Redmine instance. @@ -170,7 +171,7 @@ default: # Absolute path (e.g. /usr/bin/convert, c:/im/convert.exe) to # the ImageMagick's `convert` binary. Used to generate attachment thumbnails. - #imagemagick_convert_command: + imagemagick_convert_command: '/opt/redmine-2.3.1-1/common/bin/convert' # Configuration of RMagcik font. # diff --git a/config/settings.yml b/config/settings.yml index ee78271d..06421a5f 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -70,7 +70,7 @@ wiki_compression: default_language: default: zh host_name: - default: localhost:3000 + default: forge.trustie.net protocol: default: http feeds_limit: @@ -234,9 +234,12 @@ non_working_week_days: show_tags_length: format: int default: 5 + show_tags_length: + format: int + default: 5 tags_min_length: format: int default: 1 tags_max_length: format: int - default: 25 + default: 25 \ No newline at end of file diff --git a/public/images/avatars/User/1 b/public/images/avatars/User/1 index 0b88c913..090de229 100644 Binary files a/public/images/avatars/User/1 and b/public/images/avatars/User/1 differ