Skip to content

Commit

Permalink
Make content and style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtrussler committed Sep 28, 2023
1 parent f9b01d1 commit c2e0233
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
.app-view-document-collection-document-search-results__table {
.govuk-table__cell:nth-child(2) {
white-space: nowrap;
}

.govuk-table__cell,
.govuk-table__cell > * {
.govuk-table__cell * {
vertical-align: middle;
}

Expand All @@ -9,7 +13,6 @@

.govuk-button--secondary {
margin-left: govuk-spacing(3);
vertical-align: middle;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
},
{
value: "title-or-slug",
text: "Search via title or slug",
hint_text: "This only applies to documents made in Whitehall publisher",
text: "Search via title",
},
]
%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<%= render "govuk_publishing_components/components/search", {
name: "query",
value: params[:query],
label_text: "Search by title or slug",
label_text: "Search by title",
label_size: "l",
} %>
<% end %>
Expand All @@ -27,7 +27,7 @@
<hr class="govuk-section-break govuk-section-break--m govuk-section-break--visible">

<% if @results.empty? %>
<p class="govuk-body app-view-document-collection-document-search-results__no_documents">No documents found</p>
<p class="govuk-body app-view-document-collection-document-search-results__no_documents">No results found. Search again using the <%= link_to "full URL", "#", class: "govuk-link govuk-link--no-visited-state" %>.</p>
<% else %>
<div class="govuk-table--with-actions app-view-document-collection-document-search-results__table">
<%= render "govuk_publishing_components/components/table",
Expand Down
6 changes: 3 additions & 3 deletions features/document-collections.feature
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ Feature: Grouping documents into a collection
Then I can see that the heading has been updated to "Interesting new heading"

@design-system-only
Scenario: Adding a document to a group via slug
Scenario: Adding a document to a group via title
Given a document collection "Collection" exists
And the document collection "Collection" has a group with the heading "Group"
And a published document "Document 1" exists
When I select to add a new document to the collection group through "Search via title or slug"
And I search by "title or slug" for "Document 1"
When I select to add a new document to the collection group through "Search via title"
And I search by "title" for "Document 1"
And I add "Document 1" to the document collection
Then I should see "Document 1" in the list for the collection group "Group"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class Admin::DocumentCollectionGroupDocumentSearchControllerTest < ActionControl
@request_params[:query] = "Something "
get :search_title_slug, params: @request_params
assert_template "document_collection_group_document_search/search_title_slug"
assert_select ".govuk-body", text: /No documents found/
assert_select ".govuk-body", text: /No results found. Search again using the full URL./
end

view_test "GET #search_title_slug with an empty query string shows an alert flash" do
Expand Down

0 comments on commit c2e0233

Please sign in to comment.