diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2012-10-22 17:28:03 +1100 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2012-10-22 18:54:12 +1100 |
commit | ea9bf6994f73aa2a8e98c246303c5cdebe666917 (patch) | |
tree | d353aa43c157754aca47f155e4e975467a947416 | |
parent | b703f2aaa338e3837561676e4ba90f6c99745c54 (diff) |
Show disclosure log link if available
-rw-r--r-- | app/views/public_body/show.rhtml | 3 | ||||
-rw-r--r-- | spec/fixtures/public_body_translations.yml | 7 | ||||
-rw-r--r-- | spec/views/public_body/show.rhtml_spec.rb | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/app/views/public_body/show.rhtml b/app/views/public_body/show.rhtml index b56556d5d..e13f9d1c0 100644 --- a/app/views/public_body/show.rhtml +++ b/app/views/public_body/show.rhtml @@ -14,6 +14,9 @@ <% if !@public_body.publication_scheme.empty? %> <%= link_to _('Publication scheme'), @public_body.publication_scheme %><br> <% end %> + <% unless @public_body.disclosure_log.empty? %> + <%= link_to _('Disclosure log'), @public_body.disclosure_log %><br> + <% end %> <% if @public_body.has_tag?("charity") %> <% for tag_value in @public_body.get_tag_values("charity") %> <% if tag_value.match(/^SC/) %> diff --git a/spec/fixtures/public_body_translations.yml b/spec/fixtures/public_body_translations.yml index f3453e853..24b14c470 100644 --- a/spec/fixtures/public_body_translations.yml +++ b/spec/fixtures/public_body_translations.yml @@ -9,6 +9,7 @@ geraldine_es_public_body_translation: locale: es notes: "" publication_scheme: "" + disclosure_log: "" geraldine_en_public_body_translation: name: Geraldine Quango @@ -21,6 +22,7 @@ geraldine_en_public_body_translation: locale: en notes: "" publication_scheme: "" + disclosure_log: "" humpadink_es_public_body_translation: name: "El Department for Humpadinking" @@ -33,6 +35,7 @@ humpadink_es_public_body_translation: locale: es notes: Baguette publication_scheme: "" + disclosure_log: "" humpadink_en_public_body_translation: name: "Department for Humpadinking" @@ -45,6 +48,7 @@ humpadink_en_public_body_translation: locale: en notes: An albatross told me!!! publication_scheme: "" + disclosure_log: "" forlorn_en_public_body_translation: name: "Department of Loneliness" @@ -57,6 +61,7 @@ forlorn_en_public_body_translation: locale: en notes: A very lonely public body that no one has corresponded with publication_scheme: "" + disclosure_log: "" silly_walks_en_public_body_translation: id: 6 @@ -69,6 +74,7 @@ silly_walks_en_public_body_translation: url_name: msw notes: You know the one. publication_scheme: "" + disclosure_log: "" sensible_walks_en_public_body_translation: id: 7 @@ -81,3 +87,4 @@ sensible_walks_en_public_body_translation: url_name: sensible_walks notes: I bet you’ve never heard of it. publication_scheme: "" + disclosure_log: "" diff --git a/spec/views/public_body/show.rhtml_spec.rb b/spec/views/public_body/show.rhtml_spec.rb index a42516d72..b68b3f43b 100644 --- a/spec/views/public_body/show.rhtml_spec.rb +++ b/spec/views/public_body/show.rhtml_spec.rb @@ -11,6 +11,7 @@ describe "when viewing a body" do :eir_only? => nil, :info_requests => [1, 2, 3, 4], # out of sync with Xapian :publication_scheme => '', + :disclosure_log => '', :calculated_home_page => '') @pb.stub!(:override_request_email).and_return(nil) @pb.stub!(:is_requestable?).and_return(true) |