Browse Source
* added empty feature for viewing user specific organisation * refactored contexts in features * correctly failing feature * code to have user link * spec to test we are at correct sub menu for Users * added view for users view * edited text to pass remaining tests * fixed hidde3n field view * removed hidden field in the table * correct context * added extra field to test hidden content * test TabNavHelper with correct property * fixed tab highlights * spec for sub nav logs * spec for all sub menus * testing users inside org * better test for listing users * all test for search inside org users * pressing button * passing feature * better test with multiple orgs * almost done * fixed failing test * rubocop * expanded tests * typo * selecting subset due to null present in the list as well Co-authored-by: Ted <ted.booton@madetech.com>pull/634/head
J G
3 years ago
committed by
GitHub
14 changed files with 363 additions and 37 deletions
@ -0,0 +1,27 @@
|
||||
<% item_label = @pagy.count > 1 ? "users" : "user" %> |
||||
<% if @searched.present? %> |
||||
<% title = "Your organisation (#{@pagy.count} #{item_label} matching ‘#{@searched}’ of #{@total_count} total users)" %> |
||||
<% else %> |
||||
<% title = "Your organisation (User)" %> |
||||
<% end %> |
||||
|
||||
<% content_for :title, title %> |
||||
|
||||
<% content_for :tab_title do %> |
||||
<%= "Users" %> |
||||
<% end %> |
||||
|
||||
<%= render SubNavigationComponent.new( |
||||
items: secondary_items(request.path, @organisation.id), |
||||
) %> |
||||
|
||||
<% if current_user.data_coordinator? || current_user.support? %> |
||||
<%= govuk_button_link_to "Invite user", new_user_path(organisation_id: @organisation.id), html: { method: :get } %> |
||||
<% end %> |
||||
|
||||
<%= render SearchComponent.new(current_user:, search_label: "Search by name or email address", value: @searched) %> |
||||
|
||||
<hr class="govuk-section-break govuk-section-break--visible govuk-section-break--m"> |
||||
|
||||
<%= render partial: "users/user_list", locals: { users: @users, title:, pagy: @pagy, searched: @searched, item_label:, total_count: @total_count } %> |
||||
<%== render partial: "pagy/nav", locals: { pagy: @pagy, item_name: "users" } %> |
Loading…
Reference in new issue