This commit is contained in:
Administrator 2013-08-15 18:50:44 +08:00
parent 90885a4eb5
commit 78c8e2a20d
7 changed files with 45 additions and 28 deletions

View File

@ -10,7 +10,7 @@ class BidsController < ApplicationController
def index def index
# Modified by nie # Modified by nie
# @requirement_title = "4" # @requirement_title = "4"
@offset, @limit = api_offset_and_limit({:limit => 5}) @offset, @limit = api_offset_and_limit({:limit => 10})
@bids = Bid.visible @bids = Bid.visible
@bids = @bids.like(params[:name]) if params[:name].present? @bids = @bids.like(params[:name]) if params[:name].present?
@bid_count = @bids.count @bid_count = @bids.count

View File

@ -10,7 +10,7 @@
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #+
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@ -50,10 +50,12 @@ class MyController < ApplicationController
def account def account
@user = User.current @user = User.current
@pref = @user.pref @pref = @user.pref
if request.post? if request.post?
@user.safe_attributes = params[:user] @user.safe_attributes = params[:user]
@user.pref.attributes = params[:pref] @user.pref.attributes = params[:pref]
@user.pref[:no_self_notified] = (params[:no_self_notified] == '1') @user.pref[:no_self_notified] = (params[:no_self_notified] == '1')
if @user.save if @user.save
@user.pref.save @user.pref.save
@user.notified_project_ids = (@user.mail_notification == 'selected' ? params[:notified_project_ids] : []) @user.notified_project_ids = (@user.mail_notification == 'selected' ? params[:notified_project_ids] : [])
@ -85,7 +87,9 @@ class MyController < ApplicationController
# Manage user's password # Manage user's password
def password def password
@root_path="/home/pdl/redmine-2.3.2-0/apache2/"
@user = User.current @user = User.current
@middle = "^"+@user.login.to_s+":"
unless @user.change_password_allowed? unless @user.change_password_allowed?
flash[:error] = l(:notice_can_t_change_password) flash[:error] = l(:notice_can_t_change_password)
redirect_to my_account_path redirect_to my_account_path
@ -94,6 +98,9 @@ class MyController < ApplicationController
if request.post? if request.post?
if @user.check_password?(params[:password]) if @user.check_password?(params[:password])
@user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation] @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:"+ system "echo -e '\n"+@user.login.to_s+"-write:"+
" "+@user.login.to_s+"' >> "+@root_path+"group.passwd" " "+@user.login.to_s+"' >> "+@root_path+"group.passwd"
system "mkdir "+@root_path+"htdocs/"+@user.login.to_s system "mkdir "+@root_path+"htdocs/"+@user.login.to_s

View File

@ -21,9 +21,16 @@
</tr> </tr>
<tr> <tr>
<td align="left"><span class="font_lighter"> <%= format_time journal.created_on %></span></td> <td align="left"><span class="font_lighter"> <%= format_time journal.created_on %></span></td>
<td width="200" align="right" class="a"><%= link_to(image_tag('comment.png'), {:controller => 'words', :action => 'new', :id => user, :journal_id => journal}, :remote => true, <td width="200" align="right" class="a">
<% 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}, :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 %></td> :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 %>
</td>
</tr> </tr>
</table></td> </table></td>
</tr> </tr>

View File

@ -2,8 +2,7 @@
require ::File.expand_path('../config/environment', __FILE__) require ::File.expand_path('../config/environment', __FILE__)
#run RedmineApp::Application map ActionController::Base.config.try(:relative_url_root) || "/" do
map ActionController::Base.config.relative_url_root || "/" do
run RedmineApp::Application run RedmineApp::Application
end end

View File

@ -23,7 +23,7 @@
# email_delivery: # email_delivery:
# delivery_method: :smtp # delivery_method: :smtp
# smtp_settings: # smtp_settings:
# address: "localhost" # address: smtp.163.com
# port: 25 # port: 25
# #
# ==== SMTP server at example.com using LOGIN authentication and checking HELO for foo.com # ==== SMTP server at example.com using LOGIN authentication and checking HELO for foo.com
@ -32,12 +32,12 @@
# email_delivery: # email_delivery:
# delivery_method: :smtp # delivery_method: :smtp
# smtp_settings: # smtp_settings:
# address: "example.com" # address: smtp.gmail.com
# port: 25 # port: 587
# authentication: :login # authentication: :login
# domain: 'foo.com' # domain: 'foo.com'
# user_name: 'myaccount' # user_name: senluowanxiangt@gmail.com
# password: 'password' # password: 1913TXBja
# #
# ==== SMTP server at example.com using PLAIN authentication # ==== SMTP server at example.com using PLAIN authentication
# #
@ -45,12 +45,12 @@
# email_delivery: # email_delivery:
# delivery_method: :smtp # delivery_method: :smtp
# smtp_settings: # smtp_settings:
# address: "example.com" # address: smtp.gmail.com
# port: 25 # port: 587
# authentication: :plain # authentication: :plain
# domain: 'example.com' # domain: 'example.com'
# user_name: 'myaccount' # user_name: senluowanxiangt@gmail.com
# password: 'password' # password: 1913TXBja
# #
# ==== SMTP server at using TLS (GMail) # ==== SMTP server at using TLS (GMail)
# #
@ -62,12 +62,12 @@
# delivery_method: :smtp # delivery_method: :smtp
# smtp_settings: # smtp_settings:
# enable_starttls_auto: true # enable_starttls_auto: true
# address: "smtp.gmail.com" # address: smtp.gmail.com
# port: 587 # port: 587
# domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps # domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps
# authentication: :plain # authentication: :plain
# user_name: "your_email@gmail.com" # user_name: senluowanxiangt@gmail.com
# password: "your_password" # password: 1913TXBja
# #
# #
# === More configuration options # === More configuration options
@ -84,12 +84,13 @@ default:
email_delivery: email_delivery:
delivery_method: :smtp delivery_method: :smtp
smtp_settings: smtp_settings:
address: smtp.example.net
address: smtp.163.com
port: 25 port: 25
domain: example.net domain: smtp.163.com
authentication: :login authentication: :login
user_name: "redmine@example.net" user_name: trustie2@163.com
password: "redmine" password: PDLtrustie2
# Absolute path to the directory where attachments are stored. # Absolute path to the directory where attachments are stored.
# The default is the 'files' directory in your Redmine instance. # 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 # Absolute path (e.g. /usr/bin/convert, c:/im/convert.exe) to
# the ImageMagick's `convert` binary. Used to generate attachment thumbnails. # 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. # Configuration of RMagcik font.
# #

View File

@ -70,7 +70,7 @@ wiki_compression:
default_language: default_language:
default: zh default: zh
host_name: host_name:
default: localhost:3000 default: forge.trustie.net
protocol: protocol:
default: http default: http
feeds_limit: feeds_limit:
@ -231,6 +231,9 @@ non_working_week_days:
- '6' - '6'
- '7' - '7'
#### added by liuping #### added by liuping
show_tags_length:
format: int
default: 5
show_tags_length: show_tags_length:
format: int format: int
default: 5 default: 5

Binary file not shown.

Before

Width:  |  Height:  |  Size: 826 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB