-
Notifications
You must be signed in to change notification settings - Fork 43
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
Add delete to admin tab #2416
Add delete to admin tab #2416
Conversation
2aee9b7
to
9a4acc4
Compare
<%= render "govuk_publishing_components/components/button", { | ||
text: "Skip fact check", | ||
} %> | ||
<div class="govuk-button-group"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should use the govuk-button-group
class here and then over-ride it with a custom style. I think this class is designed to display multiple buttons and links horizontally so if that isn't what we want to do we should probably display those items as list items, the same as we do for the options sidebar on the edit page.
def destroyable_edition? | ||
return if @resource.can_destroy? | ||
|
||
flash[:danger] = "Cannot delete a #{description(@resource).downcase} that has ever been published." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any way that we can re-word this? Just worried that we could display something grammatically incorrect such as:
"Cannot delete a answer that has ever been published"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been copied from existing error message and I think we have decided not to change error messages for now.
I have made the note of this to be added to the doc where we are maintaining list of all error messages to be reviewed.
08e9e99
to
1ea08e7
Compare
<% end %> | ||
</div> | ||
</div> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there's an extra closing </div>
tag here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good spot, a carry over from confirm unpublish, have updated both files now
1ea08e7
to
058a9f2
Compare
058a9f2
to
eb7d05b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Trello
Add delete addition functionality to admin page.
Draft edition
fact check edition
confirm delete page
delete success message
Follow these steps if you are doing a Rails upgrade.