[issue #428] Added AdvisoriesController & show view.
This commit is contained in:
parent
1f07332892
commit
6fe0e5b530
|
@ -0,0 +1,18 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
class Platforms::AdvisoriesController < Platforms::BaseController
|
||||
before_filter :authenticate_user!
|
||||
before_filter :find_advisory, :only => [:show]
|
||||
load_and_authorize_resource
|
||||
|
||||
def index
|
||||
end
|
||||
|
||||
def show
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def find_advisory
|
||||
@advisory = Advisory.where(:advisory_id => params[:id]).limit(1).first if params[:id].present?
|
||||
end
|
||||
end
|
|
@ -0,0 +1,35 @@
|
|||
-#set_meta_tags :title => [title_object(@build_list.project), t('activerecord.models.build_list')]
|
||||
%h3= "#{t("activerecord.models.advisory")} #{@advisory.advisory_id}".html_safe
|
||||
|
||||
.leftlist= "#{t("layout.advisories.project_name")}:".html_safe
|
||||
.rightlist= @advisory.project.name
|
||||
.both
|
||||
|
||||
.leftlist= "#{t("layout.advisories.creation_date")}:".html_safe
|
||||
.rightlist= @advisory.created_at
|
||||
.both
|
||||
|
||||
.leftlist= "#{t("activerecord.attributes.advisory.advisory_id")}:".html_safe
|
||||
.rightlist= @advisory.advisory_id
|
||||
.both
|
||||
|
||||
.leftlist= "#{t("layout.advisories.affected_versions")}:".html_safe
|
||||
.rightlist
|
||||
- @advisory.platforms.each do |platform|
|
||||
= link_to platform.name, platform_path(platform)
|
||||
%br
|
||||
.both
|
||||
|
||||
.leftlist= "#{t("activerecord.attributes.advisory.description")}:".html_safe
|
||||
.rightlist= @advisory.description
|
||||
.both
|
||||
|
||||
.leftlist= "#{t("activerecord.attributes.advisories.references")}:".html_safe
|
||||
.rightlist
|
||||
- sanitize(@advisory.references).gsub("\r", '').split("\n").each do |ref|
|
||||
= link_to ref
|
||||
%br
|
||||
.both
|
||||
|
||||
:javascript
|
||||
$('article .all').addClass('bigpadding');
|
|
@ -57,7 +57,7 @@
|
|||
|
||||
- if @build_list.advisory.present?
|
||||
.leftlist= t("layout.build_lists.connected_advisory")
|
||||
.rightlist= @build_list.advisory.advisory_id
|
||||
.rightlist= link_to @build_list.advisory.advisory_id, advisory_path(@build_list.advisory)
|
||||
.both
|
||||
- if !@build_list.in_work? && @build_list.started_at
|
||||
%br
|
||||
|
|
|
@ -60,6 +60,7 @@ Rosa::Application.routes.draw do
|
|||
end
|
||||
match '/private/:platform_name/*file_path' => 'privates#show'
|
||||
|
||||
resources :advisories, :only => [:index, :show]
|
||||
resources :product_build_lists, :only => [:index]
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue