创建版本库控制层及国际化
This commit is contained in:
parent
a45722b0f5
commit
9399063886
|
@ -46,16 +46,21 @@ class RepositoriesController < ApplicationController
|
|||
|
||||
rescue_from Redmine::Scm::Adapters::CommandFailed, :with => :show_error_command_failed
|
||||
def new
|
||||
scm = params[:repository_scm] || (Redmine::Scm::Base.all & Setting.enabled_scm).first
|
||||
@repository = Repository.factory(scm)
|
||||
@repository.is_default = @project.repository.nil?
|
||||
@repository.project = @project
|
||||
@course_tag = params[:course]
|
||||
if @course_tag == 1
|
||||
render :layout => 'base_courses'
|
||||
if @project.repositories.count == 0
|
||||
scm = params[:repository_scm] || (Redmine::Scm::Base.all & Setting.enabled_scm).first
|
||||
@repository = Repository.factory(scm)
|
||||
@repository.is_default = @project.repository.nil?
|
||||
@repository.project = @project
|
||||
@course_tag = params[:course]
|
||||
if @course_tag == 1
|
||||
render :layout => 'base_courses'
|
||||
else
|
||||
render :layout => 'base_projects'
|
||||
end
|
||||
else
|
||||
render :layout => 'base_projects'
|
||||
render_403
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -199,7 +199,8 @@ zh:
|
|||
label_descripition_blank: 描述不能为空
|
||||
label_subject_empty: 主题不能为空
|
||||
|
||||
label_no_data: 没有任何数据可供显示
|
||||
label_no_data: 没有任何数据可供显示
|
||||
label_repository_no_data: 您还没有创建版本库,每个项目只允许创建一个版本库!
|
||||
# 项目、课程、用户公用
|
||||
label_settings: 配置
|
||||
label_information_plural: 信息
|
||||
|
|
Loading…
Reference in New Issue