mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-04 02:31:33 +00:00
Set sentence case tab names in Ruby instead of CSS
I chose .capitalize instead of .humanize, because the latter has extra features which may not be desired.
This commit is contained in:
committed by
Jean-Baptiste Bellet
parent
d6cb483f0d
commit
e2ba18f828
@@ -26,7 +26,7 @@ module Spree
|
||||
destination_url = options[:url] || spree.public_send("#{options[:route]}_path")
|
||||
titleized_label = Spree.t(options[:label],
|
||||
default: options[:label],
|
||||
scope: [:admin, :tab]).titleize
|
||||
scope: [:admin, :tab]).capitalize
|
||||
|
||||
css_classes = []
|
||||
|
||||
|
||||
@@ -77,10 +77,6 @@ nav.menu {
|
||||
display: block;
|
||||
padding: 25px 5px;
|
||||
color: $color-9 !important;
|
||||
text-transform: lowercase;
|
||||
&::first-letter {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
position: relative;
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
@@ -136,10 +132,6 @@ nav.menu {
|
||||
padding: 12px 20px;
|
||||
color: $color-9;
|
||||
text-align: center;
|
||||
text-transform: lowercase;
|
||||
&::first-letter {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
position: relative;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@@ -1195,8 +1195,8 @@ describe '
|
||||
|
||||
it "displays a Bulk Management Tab under the Orders item" do
|
||||
visit '/admin/orders'
|
||||
expect(page).to have_link "Bulk Order Management"
|
||||
click_link "Bulk Order Management"
|
||||
expect(page).to have_link "Bulk order management"
|
||||
click_link "Bulk order management"
|
||||
expect(page).to have_selector "h1.page-title", text: "Bulk Order Management"
|
||||
end
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ describe '
|
||||
name: 'Order Cycle 2' )
|
||||
|
||||
visit spree.admin_dashboard_path
|
||||
click_link "Order Cycles"
|
||||
click_link "Order cycles"
|
||||
|
||||
# I should see only the order cycle I am coordinating
|
||||
expect(page).to have_selector "tr.order-cycle-#{oc_user_coordinating.id}"
|
||||
|
||||
@@ -30,7 +30,7 @@ describe 'Schedules' do
|
||||
describe "Adding a new Schedule" do
|
||||
it "immediately shows the schedule in the order cycle list once created" do
|
||||
visit spree.admin_dashboard_path
|
||||
click_link 'Order Cycles'
|
||||
click_link 'Order cycles'
|
||||
expect(page).to have_selector ".order-cycle-#{oc1.id}"
|
||||
find('a', text: 'NEW SCHEDULE').click
|
||||
|
||||
|
||||
Reference in New Issue
Block a user