[issue #428] Fixed attaching projects to advisory.

This commit is contained in:
George Vinogradov 2012-07-04 21:38:45 +04:00
parent 8c9cca39ef
commit 1c4c91df5c
4 changed files with 4 additions and 1 deletions

View File

@ -186,6 +186,7 @@ class Projects::BuildListsController < Projects::BaseController
redirect_to :back, :notice => t('layout.build_lists.publish_fail') and return redirect_to :back, :notice => t('layout.build_lists.publish_fail') and return
end end
a.platforms << @build_list.save_to_platform unless a.platforms.include? @build_list.save_to_platform a.platforms << @build_list.save_to_platform unless a.platforms.include? @build_list.save_to_platform
a.projects << @build_list.project unless a.projects.include? @build_list.project
@build_list.advisory = a @build_list.advisory = a
unless a.save unless a.save
redirect_to :back, :notice => t('layout.build_lists.publish_fail') and return redirect_to :back, :notice => t('layout.build_lists.publish_fail') and return

View File

@ -3,7 +3,7 @@
%h3= "#{t("activerecord.models.advisory")} #{@advisory.advisory_id}".html_safe %h3= "#{t("activerecord.models.advisory")} #{@advisory.advisory_id}".html_safe
.leftlist= "#{t("layout.advisories.project_name")}:".html_safe .leftlist= "#{t("layout.advisories.project_names")}:".html_safe
.rightlist .rightlist
- @advisory.projects.each do |project| - @advisory.projects.each do |project|
= link_to project.name, project_path(project) = link_to project.name, project_path(project)

View File

@ -5,6 +5,7 @@ en:
list_header: Advisories list_header: Advisories
form_header: New advisory form_header: New advisory
project_name: Project project_name: Project
project_names: Projects
affected_versions: Affected versions affected_versions: Affected versions
affected_in: Affected in affected_in: Affected in
ref_comment: Add links one by row ref_comment: Add links one by row

View File

@ -5,6 +5,7 @@ ru:
list_header: Бюллетени list_header: Бюллетени
form_header: Новый бюллетень form_header: Новый бюллетень
project_name: Проект project_name: Проект
project_names: Проекты
affected_versions: Применен в версиях affected_versions: Применен в версиях
affected_in: Применен в affected_in: Применен в
ref_comment: Вставляйте ссылки по одной на строку ref_comment: Вставляйте ссылки по одной на строку