@ -423,7 +423,7 @@ module ApplicationHelper
else
else
s = link_to text , issue_path ( issue ) , :class = > " c_blue " , :title = > title
s = link_to text , issue_path ( issue ) , :class = > " c_blue " , :title = > title
end
end
s << h ( " : #{ subject } ") if subject
s << h ( " <span style='width:450px;display:inline-block;' class='hidden'> : #{ subject } </span> ". html_safe ) if subject
s = h ( " #{ issue . project } - " ) + s if options [ :project ]
s = h ( " #{ issue . project } - " ) + s if options [ :project ]
s
s
end
end
@ -652,7 +652,7 @@ module ApplicationHelper
s << watcher_link ( @project , User . current ) #, ['whiteButton'])
s << watcher_link ( @project , User . current ) #, ['whiteButton'])
s << " </span> "
s << " </span> "
end
end
s << ( render :partial = > 'projects/ project', :locals = > { :project = > project } ) . to_s
s << ( render :partial = > 'projects/ tracker_ project', :locals = > { :project = > project } ) . to_s
else
else
s << ( render :partial = > 'projects/course' , :locals = > { :project = > project } ) . to_s
s << ( render :partial = > 'projects/course' , :locals = > { :project = > project } ) . to_s
end
end
@ -832,7 +832,13 @@ module ApplicationHelper
atts . count > 0 ? true :false
atts . count > 0 ? true :false
end
end
# 必须是项目成,项目必须提交过代码
# 如果Pull Request数量为0就显示在更多中
def allow_show_pull_request project
g = Gitlab . client
count = g . merge_requests ( project . gpid ) . count
end
# 必须是项目成员,项目必须提交过代码
def allow_pull_request project
def allow_pull_request project
return false if project . gpid . nil?
return false if project . gpid . nil?
g = Gitlab . client
g = Gitlab . client