-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move metadata functionality to new design system
Add success message on update
- Loading branch information
1 parent
87c2595
commit 6c49914
Showing
9 changed files
with
125 additions
and
17 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
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<%= render "govuk_publishing_components/components/heading", { | ||
text: "Metadata", | ||
heading_level: 2, | ||
margin_bottom: 5, | ||
} %> | ||
|
||
<% if Edition::PUBLISHING_API_DRAFT_STATES.include? publication.state %> | ||
<%= form_for(@artefact, :html => { :class => "artefact", :id => "edit_artefact" }) do |f| %> | ||
<%= f.hidden_field :id, value: @artefact.id %> | ||
|
||
<%= render "govuk_publishing_components/components/input", { | ||
label: { | ||
text: "Slug", | ||
}, | ||
hint: "If you change the slug of a published page, the old slug will automatically redirect to the new one.", | ||
name: "artefact[slug]", | ||
value: publication.slug, | ||
heading_level: 2, | ||
heading_size: "m", | ||
} %> | ||
|
||
<%= render "govuk_publishing_components/components/radio", { | ||
heading: "Language", | ||
name: "artefact[language]", | ||
inline: true, | ||
items: [ | ||
{ | ||
value: "en", | ||
text: "English", | ||
checked: publication.artefact.language == "en" ? true : false, | ||
}, | ||
{ | ||
value: "cy", | ||
text: "Welsh", | ||
checked: publication.artefact.language == "cy" ? true : false, | ||
}, | ||
], | ||
} %> | ||
<%= render "govuk_publishing_components/components/button", { | ||
text: "Update", | ||
} %> | ||
<% end %> | ||
<% else %> | ||
<% 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<h3>Work in progress</h3> |
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