Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove publication templates #3370

Merged
merged 14 commits into from
Aug 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/assets/stylesheets/frontend/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@
@import "views/_operational-field";
@import "views/_organisations";
@import "views/_people";
@import "views/_publications";
@import "views/_search";
@import "views/_site-index";
@import "views/_topic";
Expand Down
23 changes: 0 additions & 23 deletions app/assets/stylesheets/frontend/views/_publications.scss

This file was deleted.

9 changes: 0 additions & 9 deletions app/controllers/publications_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ def index
end
end

def show
@related_policies = document_related_policies
set_meta_description(@document.summary)
end

private
def expire_cache_when_next_publication_published
expire_on_next_scheduled_publication(Publicationesque.scheduled.order("scheduled_publication asc"))
Expand All @@ -54,8 +49,4 @@ def redirect_statistics_documents
redirect_to public_document_path(@document), status: :moved_permanently
end
end

def document_class
Publication
end
end
9 changes: 0 additions & 9 deletions app/controllers/statistics_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ def index
end
end

def show
set_meta_description(@document.summary)
end

private

def inject_statistics_publication_filter_option_param
Expand All @@ -45,9 +41,4 @@ def inject_statistics_publication_filter_option_param
def expire_cache_when_next_publication_published
expire_on_next_scheduled_publication(Publicationesque.scheduled.order("scheduled_publication asc"))
end

def document_class
Publication
end

end
26 changes: 0 additions & 26 deletions app/views/documents/_attachment_full_width.html.erb

This file was deleted.

51 changes: 0 additions & 51 deletions app/views/publications/show.html.erb

This file was deleted.

51 changes: 0 additions & 51 deletions app/views/statistics/show.html.erb

This file was deleted.

4 changes: 2 additions & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def external_redirect(path_prefix, target)
get "/latest" => 'latest#index', as: 'latest'

get '/publications(.:locale)', as: 'publications', to: 'publications#index', constraints: { locale: VALID_LOCALES_REGEX }
get '/publications/:id(.:locale)', as: 'publication', to: 'publications#show', constraints: { locale: VALID_LOCALES_REGEX }
get '/publications/:id(.:locale)', as: 'publication', to: '_#_', constraints: { locale: VALID_LOCALES_REGEX }
get "/publications/:publication_id/:id" => 'html_attachments#show', as: 'publication_html_attachment'

# TODO: Remove when paths can be generated without a routes entry
Expand All @@ -116,7 +116,7 @@ def external_redirect(path_prefix, target)
# TODO: Remove `:show` when stats announcement paths can be otherwise generated
resources :statistics_announcements, path: 'statistics/announcements', only: [:index, :show]
get '/statistics(.:locale)', as: 'statistics', to: 'statistics#index', constraints: { locale: VALID_LOCALES_REGEX }
get '/statistics/:id(.:locale)', as: 'statistic', to: 'statistics#show', constraints: { locale: VALID_LOCALES_REGEX }
get '/statistics/:id(.:locale)', as: 'statistic', to: '_#_', constraints: { locale: VALID_LOCALES_REGEX }
get '/world-location-news(.:locale)', as: 'world_location_news_articles', to: 'world_location_news_articles#index', constraints: { locale: VALID_LOCALES_REGEX }
get '/world-location-news/:id(.:locale)', as: 'world_location_news_article', to: 'world_location_news_articles#show', constraints: { locale: VALID_LOCALES_REGEX }

Expand Down
11 changes: 11 additions & 0 deletions features/admin-excluded-nations.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Feature: Marking a publication with excluded nations
As a departmental content editor
In order to increase the relevancy of content to users
I want to be able to exclude content from one or more nation

Scenario: Creating a new draft publication that applies to multiple nations
Given I am a writer
When I draft a new publication "something" that does not apply to the nations:
| Scotland | Wales |
Then the publication should be excluded from these nations:
| Scotland | Wales |
10 changes: 10 additions & 0 deletions features/admin-statistical-data-sets.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Feature: Adding stastical data set references to a publication
As a departmental content editor
In order to reference relevant stastics
I want to be able to add those references to a publication

Scenario: Creating a new draft publication that references statistical data sets
Given I am an editor
And a published statistical data set "Historical Beard Lengths"
When I draft a new publication "Beard Lengths 2012" referencing the data set "Historical Beard Lengths"
Then the publication should reference the "Historical Beard Lengths" data set
10 changes: 10 additions & 0 deletions features/admin-world-locations.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Feature: Tagging world locations to publications
As a departmental content editor
In order to show which location a publication is about
I want to be able to tag world locations to publications

Scenario: The publication is about a country
Given I am an editor
And a world location "British Antarctic Territory" exists
When I draft a new publication "Penguins have rights too" about the world location "British Antarctic Territory"
Then the publication should be about the "British Antarctic Territory" world location
5 changes: 0 additions & 5 deletions features/document-collections.feature
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ Feature: Grouping documents into a collection
When I redraft the document collection and remove "May 2012 Update" from it
Then I can see in the admin that "May 2012 Update" does not appear

Scenario: Documents should link back to their collection
Given a published publication called "May 2012 Update" in the document collection "Monthly Updates"
When I visit the publication "May 2012 Update"
Then I should see links back to the collection

Scenario: Legacy document series urls are redirected to the new document collection urls
Given a published document collection "Rail statistics" exists
When I visit the old document series url "/government/organisations/government-department/series/rail-statistics"
Expand Down
15 changes: 2 additions & 13 deletions features/edition-attachments.feature
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ Feature: Managing attachments on editions
And the attachment has been virus-checked
When I replace the data file of the attachment in a new draft of the publication
And the attachment has been virus-checked
Then the new data file should not be public
Then the new data file should not have replaced the old data file
When I published the draft edition
And I log out
Then the new data file should be public
And the old data file should redirect to the new data file

Scenario: Adding attachments on consultation responses
Expand All @@ -41,14 +40,6 @@ Feature: Managing attachments on editions
And I upload a file attachment with the title "Beard Length Statistics 2014" and the file "dft_statistical_data_set_sample.csv"
Then the outcome for the consultation should have the attachment "Beard Length Statistics 2014"

Scenario: Previewing HTML attachments on draft publication
Given I am a writer
And a draft publication "Standard Beard Lengths" exists
And the publication "Standard Beard Lengths" has an html attachment "Beard Length Graphs 2012" with the body "Example Govspeak body"
When I preview "Standard Beard Lengths"
And I preview the attachment "Beard Length Graphs 2012"
Then I should see the html attachment body "Example Govspeak body"

Scenario: Attempting to save attachment after validation failure
Given I am a writer
And a draft publication "Standards on Beard Grooming" exists
Expand All @@ -61,6 +52,4 @@ Feature: Managing attachments on editions
When I start editing the attachments from the publication page
And I upload an html attachment with the title "Beard Length Graphs 2012" and the isbn "9781474127783" and the web isbn "978-1-78246-569-0" and the contact address "Address 1"
And I publish the draft edition for publication "Standard Beard Lengths"
And I preview "Standard Beard Lengths"
Then previewing the html attachment "Beard Length Graphs 2012" in print mode includes the contact address "Address 1" and the isbn "9781474127783" and the web isbn "978-1-78246-569-0"

Then the html attachment "Beard Length Graphs 2012" includes the contact address "Address 1" and the isbn "9781474127783" and the web isbn "978-1-78246-569-0"
9 changes: 0 additions & 9 deletions features/history-mode.feature

This file was deleted.

3 changes: 1 addition & 2 deletions features/organisations.feature
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ Scenario: Defining the order of featured news on an organisation page
Scenario: Requesting publications in alternative format
And I set the alternative format contact email of "Ministry of Pop" to "alternative.format@ministry-of-pop.gov.uk"
And a published publication "Charleston styles today" with a PDF attachment and alternative format provider "Ministry of Pop"
When I visit the publication "Charleston styles today"
Then I should see a mailto link for the alternative format contact email "alternative.format@ministry-of-pop.gov.uk"
Then the alternative format contact email is "alternative.format@ministry-of-pop.gov.uk"

Scenario: Adding featured links
Given I am a GDS editor in the organisation "Ministry of Pop"
Expand Down
13 changes: 0 additions & 13 deletions features/preview-unpublished-editions.feature
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
Feature: Previewing unpublished editions

Scenario: Unpublished editions can be previewed
Given a draft publication "Beard Length Review" exists
And I am an editor
When I preview "Beard Length Review"
Then I should see the summary of the draft publication "Beard Length Review"

Scenario: Unpublished editions link to preview
Given I am an editor
When I draft a new publication "Test publication"
Then I should see a link to the preview version of the publication "Test publication"

@use_real_sso
Scenario: Unpublished editions are protected from visitors
Given a draft publication "Beard Length Review" exists
And I am a visitor
When I preview "Beard Length Review"
Then I should get a "404" error
26 changes: 1 addition & 25 deletions features/publications.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,7 @@ Scenario: Creating a new draft publication

Scenario: Creating a new draft publication related to multiple policies
When I draft a new publication "Healthy Eating" relating it to the policies "Policy 1" and "Policy 2"
Then I should see in the preview that "Healthy Eating" should related to "Policy 1" and "Policy 2" policies

Scenario: Creating a new draft publication that applies to multiple nations
Given I draft a new publication "Standard Beard Lengths" that does not apply to the nations:
| Scotland | Wales |
Then I should see in the preview that "Standard Beard Lengths" does not apply to the nations:
| Scotland | Wales |

Scenario: Creating a new draft publication that references statistical data sets
Given I am an editor
Given a published statistical data set "Historical Beard Lengths"
When I draft a new publication "Beard Lengths 2012" referencing the data set "Historical Beard Lengths"
Then I should see in the preview that "Beard Lengths 2012" is taken from the live data in "Historical Beard Lengths"
Then the publication should be related to "Policy 1" and "Policy 2" policies

Scenario: Submitting a draft publication to a second pair of eyes
Given a draft publication "Standard Beard Lengths" exists
Expand Down Expand Up @@ -76,15 +64,3 @@ Scenario: Viewing published publications
When I visit the list of publications
Then I should see the publication "Lamb chops on baker's faces"
And I should see the summary of the publication "Lamb chops on baker's faces"

Scenario: Publishing a publication that has a PDF attachment
Given a published publication "Standard Beard Lengths" with a PDF attachment
When I visit the publication "Standard Beard Lengths"
Then I should see a link to the PDF attachment
And I should see a thumbnail of the first page of the PDF

Scenario: The publication is about a country
Given a world location "British Antarctic Territory" exists
And a published publication "Penguins have rights too" exists that is about "British Antarctic Territory"
When I visit the publication "Penguins have rights too"
Then I should see that the publication is about "British Antarctic Territory"
5 changes: 0 additions & 5 deletions features/specialist-sectors.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,3 @@ Feature: Tagging content with specialist sectors
And there are some specialist sectors
When I start editing a draft document
Then I can tag it to some specialist sectors

Scenario: sectors are shown on tagged content
Given there is a document tagged to specialist sectors
When I view the document
Then I should see the specialist sub-sector and its parent sector
Loading