Some checks failed
Lock Threads / action (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Publish Chatwoot EE docker images / merge (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Publish Chatwoot CE docker images / merge (push) Has been cancelled
Run Chatwoot CE spec / lint-backend (push) Has been cancelled
Run Chatwoot CE spec / lint-frontend (push) Has been cancelled
Run Chatwoot CE spec / frontend-tests (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (0, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (1, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (10, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (11, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (12, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (13, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (14, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (15, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (2, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (3, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (4, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (5, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (6, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (7, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (8, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (9, 16) (push) Has been cancelled
Run Linux nightly installer / nightly (push) Has been cancelled
- Add Logistics component with progress tracking - Add OrderDetail component for order information - Support data-driven steps and actions - Add blue color scale to widget SCSS - Fix node overflow and progress bar rendering issues - Add English translations for dashboard components Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
76 lines
2.2 KiB
Plaintext
76 lines
2.2 KiB
Plaintext
<%#
|
|
# Index
|
|
|
|
This view is the template for the index page.
|
|
It is responsible for rendering the search bar, header and pagination.
|
|
It renders the `_table` partial to display details about the resources.
|
|
|
|
## Local variables:
|
|
|
|
- `page`:
|
|
An instance of [Administrate::Page::Collection][1].
|
|
Contains helper methods to help display a table,
|
|
and knows which attributes should be displayed in the resource's table.
|
|
- `resources`:
|
|
An instance of `ActiveRecord::Relation` containing the resources
|
|
that match the user's search criteria.
|
|
By default, these resources are passed to the table partial to be displayed.
|
|
- `search_term`:
|
|
A string containing the term the user has searched for, if any.
|
|
- `show_search_bar`:
|
|
A boolean that determines if the search bar should be shown.
|
|
|
|
[1]: http://www.rubydoc.info/gems/administrate/Administrate/Page/Collection
|
|
%>
|
|
|
|
<% content_for(:title) do %>
|
|
<%= display_resource_name(page.resource_name) %>
|
|
<% end %>
|
|
|
|
<header class="main-content__header" role="banner">
|
|
<div class="flex items-center justify-between w-full">
|
|
<h1 class="main-content__page-title m-0 mr-6" id="page-title">
|
|
<%= content_for(:title) %>
|
|
</h1>
|
|
|
|
<div class="flex items-center">
|
|
<% if show_search_bar %>
|
|
<div class="flex items-center">
|
|
<%= render("filters", page: page) %>
|
|
<div class="ml-3">
|
|
<%= render(
|
|
"search",
|
|
search_term: search_term,
|
|
resource_name: display_resource_name(page.resource_name)
|
|
) %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div class="whitespace-nowrap ml-4">
|
|
<%= link_to(
|
|
t(
|
|
"administrate.actions.new_resource",
|
|
name: page.resource_name.titleize.downcase
|
|
),
|
|
[:new, namespace, page.resource_path.to_sym],
|
|
class: "button",
|
|
) if accessible_action?(new_resource, :new) %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<section class="main-content__body main-content__body--flush">
|
|
<%= render(
|
|
"collection",
|
|
collection_presenter: page,
|
|
collection_field_name: resource_name,
|
|
page: page,
|
|
resources: resources,
|
|
table_title: "page-title"
|
|
) %>
|
|
|
|
<%= paginate resources, param_name: '_page'%>
|
|
</section>
|