diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss
index caf81b40b..f08d14fda 100644
--- a/app/assets/stylesheets/admin.scss
+++ b/app/assets/stylesheets/admin.scss
@@ -284,10 +284,6 @@ $sidebar-active: #f4fcd0;
.proposal-form {
padding-top: 0;
}
-
- .proposal-show {
- padding-top: rem-calc(54);
- }
}
.is-featured {
diff --git a/app/views/admin/proposals/show.html.erb b/app/views/admin/proposals/show.html.erb
index e69de29bb..55eaebfef 100644
--- a/app/views/admin/proposals/show.html.erb
+++ b/app/views/admin/proposals/show.html.erb
@@ -0,0 +1,9 @@
+<% provide :title do %>
+ <%= t("admin.header.title") %> - <%= t("admin.menu.proposals") %> - <%= @proposal.title %>
+<% end %>
+
+
+
<%= @proposal.title %>
+
+ <%= render "proposals/info", proposal: @proposal %>
+
diff --git a/app/views/proposals/_info.html.erb b/app/views/proposals/_info.html.erb
new file mode 100644
index 000000000..44d5b76f3
--- /dev/null
+++ b/app/views/proposals/_info.html.erb
@@ -0,0 +1,84 @@
+
+ <%= render '/shared/author_info', resource: @proposal %>
+
+ •
+ <%= l @proposal.created_at.to_date %>
+ •
+
+ <%= link_to t("proposals.show.comments", count: @proposal.comments_count), "#comments" %>
+
+ <% if current_user %>
+ •
+
+ <%= render 'proposals/flag_actions', proposal: @proposal %>
+
+ <% end %>
+
+
+
+<%= render_image(@proposal.image, :large, true) if @proposal.image.present? %>
+
+
+
+ <%= t("proposals.show.code") %>
+ <%= @proposal.code %>
+
+
+<%= @proposal.summary %>
+
+<% if @proposal.video_url.present? %>
+
+<% end %>
+
+<%= safe_html_with_links @proposal.description %>
+
+<% if feature?(:map) && map_location_available?(@proposal.map_location) %>
+
+ <%= render_map(@proposal.map_location, "proposal", false, nil) %>
+
+<% end %>
+
+<% if @proposal.external_url.present? %>
+
+
+
+ <%= t('proposals.show.title_external_url') %>
+
+ <%= text_with_links @proposal.external_url %>
+
+<% end %>
+
+<% if @proposal.video_url.present? %>
+
+
+
+ <%= t('proposals.show.title_video_url') %>
+
+ <%= text_with_links @proposal.video_url %>
+
+
+<% end %>
+
+<%= @proposal.question %>
+
+<% if @proposal.retired? %>
+
+
+ <%= t("proposals.show.retired") %>:
+ <%= t("proposals.retire_options.#{@proposal.retired_reason}") unless @proposal.retired_reason == 'other' %>
+
+ <%= simple_format text_with_links(@proposal.retired_explanation), {}, sanitize: false %>
+
+<% end %>
+
+<% if feature?(:allow_attached_documents) %>
+ <%= render 'documents/documents',
+ documents: @proposal.documents,
+ max_documents_allowed: Proposal.max_documents_allowed %>
+<% end %>
+
+<%= render 'shared/tags', taggable: @proposal %>
diff --git a/app/views/proposals/show.html.erb b/app/views/proposals/show.html.erb
index 2c40a7075..dab5996fb 100644
--- a/app/views/proposals/show.html.erb
+++ b/app/views/proposals/show.html.erb
@@ -37,93 +37,8 @@
<% end %>
-
- <%= render '/shared/author_info', resource: @proposal %>
-
- •
- <%= l @proposal.created_at.to_date %>
- •
-
- <%= link_to t("proposals.show.comments", count: @proposal.comments_count), "#comments" %>
-
- <% if current_user %>
- •
-
- <%= render 'proposals/flag_actions', proposal: @proposal %>
-
- <% end %>
-
-
-
- <%= render_image(@proposal.image, :large, true) if @proposal.image.present? %>
-
-
-
- <%= t("proposals.show.code") %>
- <%= @proposal.code %>
-
-
- <%= @proposal.summary %>
-
- <% if @proposal.video_url.present? %>
-
- <% end %>
-
- <%= safe_html_with_links @proposal.description %>
-
- <% if feature?(:map) && map_location_available?(@proposal.map_location) %>
-
- <%= render_map(@proposal.map_location, "proposal", false, nil) %>
-
- <% end %>
-
- <% if @proposal.external_url.present? %>
-
-
-
- <%= t('proposals.show.title_external_url') %>
-
- <%= text_with_links @proposal.external_url %>
-
- <% end %>
-
- <% if @proposal.video_url.present? %>
-
-
-
- <%= t('proposals.show.title_video_url') %>
-
- <%= text_with_links @proposal.video_url %>
-
-
- <% end %>
-
- <%= @proposal.question %>
-
- <% if @proposal.retired? %>
-
-
- <%= t("proposals.show.retired") %>:
- <%= t("proposals.retire_options.#{@proposal.retired_reason}") unless @proposal.retired_reason == 'other' %>
-
- <%= simple_format text_with_links(@proposal.retired_explanation), {}, sanitize: false %>
-
- <% end %>
-
- <% if feature?(:allow_attached_documents) %>
- <%= render 'documents/documents',
- documents: @proposal.documents,
- max_documents_allowed: Proposal.max_documents_allowed %>
- <% end %>
-
- <%= render 'shared/tags', taggable: @proposal %>
-
+ <%= render "info", proposal: @proposal %>
<%= render 'shared/geozone', geozonable: @proposal %>
-
<%= render 'relationable/related_content', relationable: @proposal %>
diff --git a/spec/features/admin/proposals_spec.rb b/spec/features/admin/proposals_spec.rb
index 1e12c7132..04e382348 100644
--- a/spec/features/admin/proposals_spec.rb
+++ b/spec/features/admin/proposals_spec.rb
@@ -23,4 +23,13 @@ feature "Admin proposals" do
expect(page).not_to have_content "Build a monument"
end
end
+
+ scenario "Show" do
+ create(:proposal, title: "Create a chaotic future", summary: "Chaos isn't controlled")
+
+ visit admin_proposals_path
+ click_link "Create a chaotic future"
+
+ expect(page).to have_content "Chaos isn't controlled"
+ end
end