fix showing build list

This commit is contained in:
Alexander Machehin 2013-12-03 16:55:08 +06:00
parent bee08c01cf
commit a5d54d2694
3 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ var BuildList = function(atts, dictionary) {
if (self.save_to_platform) {
self.save_to_repository_name = self.save_to_platform.name + '/' + self.save_to_repository.name;
if (self.save_to_platform.personal) {
if (self.save_to_platform.personal && self.build_for_platform !== undefined) {
self.save_to_repository_name += ' (' + self.build_for_platform.name + ')'
}
self.save_to_repository_url = Routes.platform_repository_path(self.save_to_platform.name, self.save_to_repository.name);

View File

@ -117,7 +117,7 @@ module BuildListsHelper
def container_url(build_list = @build_list)
url = "#{APP_CONFIG['downloads_url']}/#{build_list.save_to_platform.name}/container/#{build_list.id}/"
url << "#{build_list.arch.name}/#{build_list.save_to_repository.name}/release/" if build_list.build_for_platform.distrib_type == 'mdv'
url << "#{build_list.arch.name}/#{build_list.save_to_repository.name}/release/" if build_list.build_for_platform.try(:distrib_type) == 'mdv'
url.html_safe
end

View File

@ -43,7 +43,7 @@
.rightlist= t("layout.#{@build_list.include_testing_subrepository?}_")
.both
.leftlist= t("activerecord.attributes.build_list.include_repos")
.rightlist= (@build_list.include_repos||[]).map{|r| Repository.find(r).name}.join(', ')
.rightlist= (@build_list.include_repos||[]).map{|r| Repository.where(:id => r).first.try(:name)}.join(', ')
.both
.leftlist= t("activerecord.attributes.build_list.update_type")
.rightlist