diff --git a/app/controllers/facilitators_controller.rb b/app/controllers/facilitators_controller.rb index dd9736da5..2a6f27987 100644 --- a/app/controllers/facilitators_controller.rb +++ b/app/controllers/facilitators_controller.rb @@ -15,7 +15,7 @@ def index .search_by_params(params.to_unsafe_h) .includes(:user).references(:user) .order(:first_name, :last_name) - @facilitators_count = facilitators.size + @count_display = facilitators.size @facilitators = facilitators.paginate(page: params[:page], per_page: per_page) end diff --git a/app/views/facilitators/index.html.erb b/app/views/facilitators/index.html.erb index b21af7f01..32f2876d0 100644 --- a/app/views/facilitators/index.html.erb +++ b/app/views/facilitators/index.html.erb @@ -1,111 +1,105 @@ -
-
-
-
- -
-

- <%= Facilitator.model_name.human.pluralize %> (<%= @facilitators_count %>) -

-
- <% if current_user.super_user? %> - <%= link_to "New #{Facilitator.model_name.human.downcase}", - new_facilitator_path, - class: "admin-only bg-blue-100 btn btn-primary-outline" %> - <% end %> -
-
+
+
+
+
+

Facilitators (<%= @count_display %>)

+
+
+ <% if current_user.super_user? %> + <%= link_to "New Facilitator", + new_facilitator_path, + class: "admin-only bg-blue-100 btn btn-primary-outline" %> + <% end %> +
+
- - <%= render "search_boxes" %> + <%= render "search_boxes" %> -
-
- - - - - - - - - <% if current_user.super_user? %> - - <% end %> - - +
+
+
NameFacilitator sinceSector(s)Affiliation(s)SocialsActions
+ + + + + + + + <% if current_user.super_user? %> + + <% end %> + + - - <% @facilitators.each do |facilitator| %> - <% facilitator = facilitator.decorate %> - - + + <% @facilitators.each do |facilitator| %> + <% facilitator = facilitator.decorate %> + + - + - - + + - - + + - - + + - - <% if current_user.super_user? %> - - <% end %> - + + <% if current_user.super_user? %> + <% end %> - -
NameFacilitator sinceSector(s)Affiliation(s)SocialsActions
- <%= facilitator_profile_button(facilitator) %> -
+ <%= facilitator_profile_button(facilitator) %> + - <%= facilitator.member_since_year %> - + <%= facilitator.member_since_year %> + -
- <% facilitator.sectorable_items.each do |si| %> - <% si_name = "#{ si.sector.name }#{ " (#{"leader"})" if si.is_leader? }" %> - - <%= link_to si_name, taggings_path(sector_names: si.sector.name) %> - - <% end %> -
-
+
+ <% facilitator.sectorable_items.each do |si| %> + <% si_name = "#{ si.sector.name }#{ " (#{"leader"})" if si.is_leader? }" %> + + <%= link_to si_name, taggings_path(sector_names: si.sector.name) %> + + <% end %> +
+
- <% if facilitator.user&.projects&.any? %> - <% user_project_names = facilitator.user.projects.map(&:name).join(", ") %> - - <%= truncate(user_project_names, length: 120) %> - - <% else %> - -- - <% end %> - + <% if facilitator.user&.projects&.any? %> + <% user_project_names = facilitator.user.projects.map(&:name).join(", ") %> + + <%= truncate(user_project_names, length: 120) %> + + <% else %> + -- + <% end %> + - <%= render "social_media_buttons", facilitator: facilitator %> - + <%= render "social_media_buttons", facilitator: facilitator %> + - <%= link_to "User", user_path(facilitator.user), - class: "admin-only bg-blue-100 btn btn-secondary-outline" if facilitator.user %> - <%= link_to "Edit", edit_facilitator_path(facilitator), - class: "admin-only bg-blue-100 btn btn-secondary-outline" %> -
+ <%= link_to "User", user_path(facilitator.user), + class: "admin-only bg-blue-100 btn btn-secondary-outline" if facilitator.user %> + <%= link_to "Edit", edit_facilitator_path(facilitator), + class: "admin-only bg-blue-100 btn btn-secondary-outline" %> +
-
-
- - - <% unless @facilitators.any? %> -

- No <%= Facilitator.model_name.human.pluralize %> found. -

+ <% end %> + + +
+
+ + + <% unless @facilitators.any? %> +

+ No <%= Facilitator.model_name.human.pluralize %> found. +

+ <% end %> - -
- -
+ +
+
diff --git a/app/views/stories/index.html.erb b/app/views/stories/index.html.erb index 4033b185d..c242134d4 100644 --- a/app/views/stories/index.html.erb +++ b/app/views/stories/index.html.erb @@ -1,24 +1,21 @@ -
-
-
- -
-
-
-

<%= Story.model_name.human.pluralize %> (<%= @count_display %>)

-
-
- <% if current_user.super_user? %> - <%= link_to "New Story", - new_story_path, - class: "admin-only bg-blue-100 btn btn-primary-outline" %> - <% end %> -
-
+
+
+
+
+

Stories (<%= @count_display %>)

+
+
+ <% if current_user.super_user? %> + <%= link_to "New Story", + new_story_path, + class: "admin-only bg-blue-100 btn btn-primary-outline" %> + <% end %> +
+
- <%= render "search_boxes" %> + <%= render "search_boxes" %> - <% if @stories.any? %> + <% if @stories.any? %>
@@ -109,8 +106,6 @@ <% end %> <% end %> - - + -