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 consultation templates redux #3334

Merged
merged 2 commits into from
Jul 10, 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 @@ -92,7 +92,6 @@

#whitehall-wrapper {
@import "views/_biographical-page";
@import "views/_consultations";
@import "views/_corporate-information-pages-worldwide-organisation";
@import "views/_document-collection";
@import "views/_email-signup";
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/frontend/helpers/_browse.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.consultations-index, .publications-index {
.publications-index {

.block-3, .block-4 {
float: left;
Expand Down
134 changes: 0 additions & 134 deletions app/assets/stylesheets/frontend/views/_consultations.scss

This file was deleted.

12 changes: 0 additions & 12 deletions app/controllers/consultations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,4 @@ def index
filter_params = params.except(:controller, :action, :format, :_)
redirect_to publications_path(filter_params.merge(publication_filter_option: 'consultations'))
end

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

private

def document_class
Consultation
end
end
8 changes: 0 additions & 8 deletions app/helpers/cache_control_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ def expire_on_next_scheduled_publication(scheduled_editions)
end
end

def expire_on_open_state_change(consultation)
if consultation.opening_at.present? && consultation.opening_at >= Time.zone.now
expires_in max_age_for(consultation.opening_at), public: true
elsif consultation.closing_at.present? && consultation.closing_at >= Time.zone.now
expires_in max_age_for(consultation.closing_at), public: true
end
end

def max_age_for(scheduled_publication)
seconds_away = scheduled_publication - Time.zone.now
if seconds_away > cache_max_age
Expand Down
13 changes: 0 additions & 13 deletions app/helpers/consultations_helper.rb

This file was deleted.

5 changes: 1 addition & 4 deletions app/models/consultation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,7 @@ def process_associations_after_save(edition)
end

def rendering_app
# TODO rendered by Whitehall::RenderingApp::GOVERNMENT_FRONTEND
# but we need to return WHITEHALL_FRONTEND here to continue to use
# Whitehall for preview until draft links are implemented
Whitehall::RenderingApp::WHITEHALL_FRONTEND
Whitehall::RenderingApp::GOVERNMENT_FRONTEND
end

def allows_inline_attachments?
Expand Down
9 changes: 0 additions & 9 deletions app/views/consultations/_document_summary.html.erb

This file was deleted.

172 changes: 0 additions & 172 deletions app/views/consultations/show.html.erb

This file was deleted.

Loading