-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2155 from alphagov/consolidation-move-reorder-sec…
…tions-page-to-design-system Migrate the reorder sections page to the design system
- Loading branch information
Showing
6 changed files
with
79 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,48 @@ | ||
<% content_for :page_title, "Reorder sections" %> | ||
<% content_for :title, "Reorder sections" %> | ||
|
||
<% content_for :breadcrumbs do %> | ||
<li><%= link_to "Your manuals", manuals_path %></li> | ||
<li><%= link_to manual.title, manual_path(manual) %></li> | ||
<li class="active">Reorder sections</li> | ||
<%= render "govuk_publishing_components/components/breadcrumbs", { | ||
collapse_on_mobile: true, | ||
breadcrumbs: [ | ||
{ | ||
title: "Your manuals", | ||
url: manuals_path | ||
}, | ||
{ | ||
title: manual.title, | ||
url: manual_path(manual) | ||
}, | ||
{ | ||
title: "Reorder sections" | ||
}, | ||
] | ||
} %> | ||
<% end %> | ||
|
||
<h1 class="page-header"> | ||
Reorder sections | ||
</h1> | ||
<%= render "govuk_publishing_components/components/heading", { | ||
text: "Reorder sections", | ||
heading_level: 1, | ||
font_size: "xl", | ||
margin_bottom: 8 | ||
} %> | ||
|
||
<%= form_tag(update_order_manual_sections_path(manual), method: :post) do %> | ||
<div class="row"> | ||
<div class="col-md-8"> | ||
<ol class="reorderable-document-list"> | ||
<% sections.each do |section| %> | ||
<li> | ||
<input type="hidden" name="section_order[]" value="<%= section.uuid %>"> | ||
<%= section.title %> | ||
</li> | ||
<% end %> | ||
</ol> | ||
</div> | ||
</div> | ||
<%= render "govuk_publishing_components/components/reorderable_list", { | ||
input_name: "section_order", | ||
items: manual.sections.map do |section| | ||
{ | ||
id: section.uuid, | ||
title: section.title | ||
} | ||
end | ||
} %> | ||
|
||
<div class="govuk-button-group govuk-!-margin-bottom-6"> | ||
<%= render "govuk_publishing_components/components/button", { | ||
text: "Save section order", | ||
name: "submit", | ||
} %> | ||
|
||
<div class="actions"> | ||
<button name="submit" class="btn btn-primary">Save section order</button> | ||
<%= link_to "Back", manual_path(manual), class: "action-link" %> | ||
<%= link_to("Cancel", manual_path(manual), class: "govuk-link govuk-link--no-visited-state") %> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters