Skip to content

Commit f6f963b

Browse files
Rename flex to strata: controllers (#194)
## Changes Rename flex module to strata for controllers only. Views were also moved to their new folders.
1 parent 40fb394 commit f6f963b

27 files changed

Lines changed: 301 additions & 23 deletions
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module Flex
1+
module Strata
22
class ApplicationController < ::ApplicationController
33
end
44
end

app/controllers/flex/staff_controller.rb renamed to app/controllers/strata/staff_controller.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
module Flex
1+
module Strata
22
# Base controller for all staff-related functionality.
3-
# Sets the layout to the flex/staff layout
3+
# Sets the layout to the strata/staff layout
44
class StaffController < ApplicationController
5-
layout "flex/staff"
5+
layout "strata/staff"
66

77
before_action :set_header_cases_links
88

app/controllers/flex/tasks_controller.rb renamed to app/controllers/strata/tasks_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module Flex
1+
module Strata
22
# Controller for managing Flex::Task records. Handles listing, filtering, showing, and updating tasks.
33
# This controller helps a parent application manage tasks by not forcing the parent application to implement the same functionality.
44
class TasksController < ::StaffController
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module Flex
1+
module Strata
22
# DateHelper provides view helpers for formatting and manipulating dates.
33
# This module is used in views to display dates in consistent formats.
44
#

app/previews/flex/staff/header_preview.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ def default
1717
# Mock the request object in order to simulate the current path
1818
request = Request.new("/passport_cases/closed")
1919

20-
# render template: "flex/previews/empty", locals: {
21-
render template: "flex/staff/_header", locals: {
20+
# render template: "strata/previews/empty", locals: {
21+
render template: "strata/staff/_header", locals: {
2222
cases_links: [
2323
{ name: "Passport Cases", path: "/staff/passport_cases" }
2424
],

app/views/flex/shared/name_form.html.erb

Whitespace-only changes.

app/views/flex/tasks/show.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
}
3030
]
3131
%>
32-
<%= render partial: "flex/shared/breadcrumbs", locals: { breadcrumbs: } %>
32+
<%= render partial: "strata/shared/breadcrumbs", locals: { breadcrumbs: } %>
3333

3434
<h1 class="section-heading-h1"><%= t("tasks.types.#{task.type.underscore}") %></h1>
3535
<div class="border-bottom-1px margin-bottom-1 padding-bottom-1">
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</head>
1111
<body>
1212
<div class="display-flex flex-column minh-viewport">
13-
<%= render partial: 'flex/staff/header' %>
13+
<%= render partial: 'strata/staff/header' %>
1414

1515
<main id="main-content" class="grid-col-fill display-flex flex-column">
1616
<div class="grid-col-fill <%= yield :main_col_class %>">
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<%= link_to name, path, class: class_names(
2+
"text-no-underline padding-y-1 padding-x-2 font-sans-md",
3+
{
4+
"text-bold border-bottom-05 border-primary text-primary" => active,
5+
"text-ink" => !active
6+
}
7+
) %>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<% if content_for?(:breadcrumbs) %>
2+
<%= yield :breadcrumbs %>
3+
<% else %>
4+
<nav class="usa-breadcrumb" aria-label="Breadcrumbs">
5+
<ol class="usa-breadcrumb__list">
6+
<% breadcrumbs[0...-1].each do |breadcrumb| %>
7+
<li class="usa-breadcrumb__list-item">
8+
<%= link_to breadcrumb[:text], breadcrumb[:link], class: "usa-breadcrumb__link" %>
9+
</li>
10+
<% end %>
11+
<% if breadcrumbs.last %>
12+
<li class="usa-breadcrumb__list-item usa-current" aria-current="page">
13+
<span><%= breadcrumbs.last[:text] %></span>
14+
</li>
15+
<% end %>
16+
</ol>
17+
</nav>
18+
<% end %>

0 commit comments

Comments
 (0)