move constant to module, fixed some translate.
This commit is contained in:
parent
16611d8eff
commit
356a48caa8
|
@ -37,6 +37,9 @@ class RepositoriesController < ApplicationController
|
||||||
accept_rss_auth :revisions
|
accept_rss_auth :revisions
|
||||||
# hidden repositories filter // 隐藏代码过滤器
|
# hidden repositories filter // 隐藏代码过滤器
|
||||||
before_filter :check_hidden_repo, :only => [:show, :stats, :revisions, :revision, :diff ]
|
before_filter :check_hidden_repo, :only => [:show, :stats, :revisions, :revision, :diff ]
|
||||||
|
helper :repositories
|
||||||
|
include RepositoriesHelper
|
||||||
|
#@root_path = RepositoriesHelper::ROOT_PATH
|
||||||
|
|
||||||
|
|
||||||
rescue_from Redmine::Scm::Adapters::CommandFailed, :with => :show_error_command_failed
|
rescue_from Redmine::Scm::Adapters::CommandFailed, :with => :show_error_command_failed
|
||||||
|
@ -90,7 +93,7 @@ class RepositoriesController < ApplicationController
|
||||||
|
|
||||||
def create
|
def create
|
||||||
##xianbo
|
##xianbo
|
||||||
@root_path="/home/pdl/redmine-2.3.2-0/apache2/"
|
@root_path=RepositoriesHelper::ROOT_PATH
|
||||||
@repository_name=User.current.login.to_s+"/"+params[:repository][:identifier]+".git"
|
@repository_name=User.current.login.to_s+"/"+params[:repository][:identifier]+".git"
|
||||||
@project_path=@root_path+"htdocs/"+@repository_name
|
@project_path=@root_path+"htdocs/"+@repository_name
|
||||||
@repository_tag=params[:repository][:upassword]
|
@repository_tag=params[:repository][:upassword]
|
||||||
|
@ -189,7 +192,7 @@ class RepositoriesController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
@root_path="/home/pdl/redmine-2.3.2-0/apache2/"
|
@root_path=RepositoriesHelper::ROOT_PATH
|
||||||
@repo_name=User.current.login.to_s+"_"+@repository.identifier.to_s
|
@repo_name=User.current.login.to_s+"_"+@repository.identifier.to_s
|
||||||
@repository_name=User.current.login.to_s+"/"+@repository.identifier.to_s+".git"
|
@repository_name=User.current.login.to_s+"/"+@repository.identifier.to_s+".git"
|
||||||
@middle=User.current.login.to_s+"_"+@repository.identifier.to_s+"-write:"
|
@middle=User.current.login.to_s+"_"+@repository.identifier.to_s+"-write:"
|
||||||
|
@ -222,6 +225,10 @@ class RepositoriesController < ApplicationController
|
||||||
|
|
||||||
@entries = @repository.entries(@path, @rev)
|
@entries = @repository.entries(@path, @rev)
|
||||||
@changeset = @repository.find_changeset_by_name(@rev)
|
@changeset = @repository.find_changeset_by_name(@rev)
|
||||||
|
|
||||||
|
#@project_path_cut = RepositoriesHelper::PROJECT_PATH_CUT
|
||||||
|
#@ip = RepositoriesHelper::REPO_IP_ADDRESS
|
||||||
|
|
||||||
if request.xhr?
|
if request.xhr?
|
||||||
@entries ? render(:partial => 'dir_list_content') : render(:nothing => true)
|
@entries ? render(:partial => 'dir_list_content') : render(:nothing => true)
|
||||||
else
|
else
|
||||||
|
|
|
@ -18,6 +18,10 @@
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
module RepositoriesHelper
|
module RepositoriesHelper
|
||||||
|
ROOT_PATH="/home/pdl/redmine-2.3.2-0/apache2/"
|
||||||
|
PROJECT_PATH_CUT = 40
|
||||||
|
REPO_IP_ADDRESS = "repository.trustie.net"
|
||||||
|
|
||||||
def format_revision(revision)
|
def format_revision(revision)
|
||||||
if revision.respond_to? :format_identifier
|
if revision.respond_to? :format_identifier
|
||||||
revision.format_identifier
|
revision.format_identifier
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<% project_path_cut = 40 %>
|
<% project_path_cut = RepositoriesHelper::PROJECT_PATH_CUT %>
|
||||||
<% ip = "repository.trustie.net" %><!--Added by tanxianbo For formatting project's path-->
|
<% ip = RepositoriesHelper::REPO_IP_ADDRESS %><!--Added by tanxianbo For formatting project's path-->
|
||||||
<% if @project.repositories.any? %>
|
<% if @project.repositories.any? %>
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
<%= render :partial => 'navigation' %>
|
<%= render :partial => 'navigation' %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% project_path_cut = 40 %>
|
<% project_path_cut = RepositoriesHelper::PROJECT_PATH_CUT %>
|
||||||
<% ip = "repository.trustie.net" %><!--Added by young For formatting project's path-->
|
<% ip = RepositoriesHelper::REPO_IP_ADDRESS %><!--Added by young For formatting project's path-->
|
||||||
<h3>
|
<h3>
|
||||||
<%= render :partial => 'breadcrumbs',
|
<%= render :partial => 'breadcrumbs',
|
||||||
:locals => { :path => @path, :kind => 'dir', :revision => @rev } %>
|
:locals => { :path => @path, :kind => 'dir', :revision => @rev } %>
|
||||||
|
|
|
@ -1021,7 +1021,7 @@ en:
|
||||||
text_enumeration_destroy_question: "%{count} objects are assigned to this value."
|
text_enumeration_destroy_question: "%{count} objects are assigned to this value."
|
||||||
text_enumeration_category_reassign_to: 'Reassign them to this value:'
|
text_enumeration_category_reassign_to: 'Reassign them to this value:'
|
||||||
text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/configuration.yml and restart the application to enable them."
|
text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/configuration.yml and restart the application to enable them."
|
||||||
text_repository_usernames_mapping: "Select or update the Redmine user mapped to each username found in the repository log.\nUsers with the same Redmine and repository username or email are automatically mapped."
|
text_repository_usernames_mapping: "Select or update the Trustie user mapped to each username found in the repository log.\nUsers with the same Trustie and repository username or email are automatically mapped."
|
||||||
text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.'
|
text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.'
|
||||||
text_custom_field_possible_values_info: 'One line for each value'
|
text_custom_field_possible_values_info: 'One line for each value'
|
||||||
text_wiki_page_destroy_question: "This page has %{descendants} child page(s) and descendant(s). What do you want to do?"
|
text_wiki_page_destroy_question: "This page has %{descendants} child page(s) and descendant(s). What do you want to do?"
|
||||||
|
|
|
@ -1026,7 +1026,7 @@ zh:
|
||||||
text_enumeration_destroy_question: "%{count} 个对象被关联到了这个枚举值。"
|
text_enumeration_destroy_question: "%{count} 个对象被关联到了这个枚举值。"
|
||||||
text_enumeration_category_reassign_to: '将它们关联到新的枚举值:'
|
text_enumeration_category_reassign_to: '将它们关联到新的枚举值:'
|
||||||
text_email_delivery_not_configured: "邮件参数尚未配置,因此邮件通知功能已被禁用。\n请在config/configuration.yml中配置您的SMTP服务器信息并重新启动以使其生效。"
|
text_email_delivery_not_configured: "邮件参数尚未配置,因此邮件通知功能已被禁用。\n请在config/configuration.yml中配置您的SMTP服务器信息并重新启动以使其生效。"
|
||||||
text_repository_usernames_mapping: "选择或更新与版本库中的用户名对应的Redmine用户。\n版本库中与Redmine中的同名用户将被自动对应。"
|
text_repository_usernames_mapping: "选择或更新与版本库中的用户名对应的Trustie用户。\n版本库中与Trustie中的同名用户将被自动对应。"
|
||||||
text_diff_truncated: '... 差别内容超过了可显示的最大行数并已被截断'
|
text_diff_truncated: '... 差别内容超过了可显示的最大行数并已被截断'
|
||||||
text_custom_field_possible_values_info: '每项数值一行'
|
text_custom_field_possible_values_info: '每项数值一行'
|
||||||
text_wiki_page_destroy_question: 此页面有 %{descendants} 个子页面和下级页面。您想进行那种操作?
|
text_wiki_page_destroy_question: 此页面有 %{descendants} 个子页面和下级页面。您想进行那种操作?
|
||||||
|
|
Loading…
Reference in New Issue