Skip to content

Commit

Permalink
Merge pull request #22 from co-cddo/tidy-up-record-show
Browse files Browse the repository at this point in the history
#Tidy up records#show view
  • Loading branch information
RobNicholsGDS authored Dec 3, 2024
2 parents 653defb + 0fee8fa commit d9fb440
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
<div class="govuk-grid-row">
<div class="govuk-grid-column-three-quarters">
&nbsp;
<%= content_tag(:p, notice, class: 'notice', style: "color: green") if notice.present? %>
<%= content_tag(:p, alert, class: 'alert', style: "color: red") if alert.present? %>
<%= govuk_notification_banner(title_text: 'Notice', text: notice, success: true) if notice.present? %>
<%= govuk_notification_banner(title_text: 'Alert', text: alert) if alert.present? %>
</div>
<div class="govuk-grid-column-one-quarter govuk-!-text-align-right">
<%= user_signed_in? ? logout_button : login_button %>
Expand Down
12 changes: 6 additions & 6 deletions app/views/records/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@
</pre>


<div class="govuk-!-padding-bottom-2">
<div class="govuk-!-padding-bottom-4">
<%= govuk_link_to "Edit this record", edit_record_path(@record) %>
</div>

<div class="govuk-!-padding-bottom-2">
<% if @record.published? %>
<p class="govuk-body">Any edits to the record will be pushed to the Data Marketplace</p>

<%= govuk_button_to "Remove this record from the Data Marketplace", unpublish_record_path(@record), warning: true %>
<% else %>
<%= govuk_button_to "Publish this record on the Data Marketplace", publish_record_path(@record), warning: true %>
<%= govuk_button_to "Publish this record on the Data Marketplace", publish_record_path(@record) %>
<% end %>
</div>

Expand All @@ -24,7 +26,7 @@
<h2 class=govuk-heading-m>Record within Data Marketplace</h2>

<p class="govuk-body">
This record be accessed
This record can be viewed
<%= link_to(
"here",
"https://test.datamarketplace.gov.uk/catalogdata/getcddodataasset?dataAssetId=#{@record.remote_id}"
Expand All @@ -39,6 +41,4 @@
</pre>

<% end %>

<%= govuk_link_to "Back to records", records_path %>
</div>

0 comments on commit d9fb440

Please sign in to comment.