Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions app/assets/stylesheets/application.bootstrap.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
@import 'bootstrap/scss/bootstrap';
@import 'bootstrap-icons/font/bootstrap-icons';


.hr-gradient {
border: 0;
height: 1px;
background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0), rgba(0, 0, 0, 0));
}
1 change: 1 addition & 0 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
// Imports only!
@use "rails_bootstrap_forms";
@import "application.bootstrap.scss";
19 changes: 0 additions & 19 deletions app/assets_old/stylesheets/styles/footer.scss

This file was deleted.

4 changes: 2 additions & 2 deletions app/helpers/lines_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ def current_line_display

# If multiple lines, link to the switcher
if Line.count > 1
return content_tag :li do
return content_tag :li, class: 'nav-item' do
link_to t('navigation.current_line.helper') + ": #{current_line.name}",
new_line_path,
class: 'nav-link navbar-text-alt'
end
end

# Otherwise just display the content
content_tag :li do
content_tag :li, class: 'nav-item' do
content_tag :span, t('navigation.current_line.helper') + ": #{current_line.name}",
class: 'nav-link navbar-text-alt'
end
Expand Down
4 changes: 2 additions & 2 deletions app/helpers/navbar_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ def cm_resources_link
# redundant UriService just for fallbackhelp
url = UriService.new(maybe_url).uri

content_tag :li do
content_tag :li, class: 'nav-item' do
link_to t('navigation.cm_resources.label'), url.to_s, target: '_blank', class: 'nav-link'
end if url.present?
end

def spanish_or_english_link
content_tag :li do
content_tag :li, class: 'nav-item' do
if I18n.locale == I18n.default_locale
link_to "Español", { locale: 'es' }, class: 'nav-link'
else
Expand Down
10 changes: 5 additions & 5 deletions app/views/layouts/_footer.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<hr class="hr_gradient">
<hr class="hr-gradient">

<div class="row">
<div class="col text-center">
Expand All @@ -13,9 +13,9 @@

<div class="row mb-3">
<div id="app_footer" class="col text-center">
<a href="http://<%= current_tenant.site_domain %>/"><%= current_tenant.full_name %></a> -- <a href="tel:<%= current_tenant.phone %>"><i class="fas fa-phone-alt fa-sm" aria-hidden="true"></i> <%= current_tenant.phone %></a><br>
<a href="http://<%= current_tenant.site_domain %>/"><%= current_tenant.full_name %></a> -- <a href="tel:<%= current_tenant.phone %>"><i class="bi bi-telephone-fill" aria-hidden="true"></i> <%= current_tenant.phone %></a><br>

<%= link_to t('navigation.footer.national_abortion_federation'), 'https://prochoice.org' %> -- <a href="tel:800-772-9100"><i class="fas fa-phone-alt fa-sm" aria-hidden="true"></i> 800-772-9100</a><br>
<%= link_to t('navigation.footer.national_abortion_federation'), 'https://prochoice.org' %> -- <a href="tel:800-772-9100"><i class="bi bi-telephone-fill" aria-hidden="true"></i> 800-772-9100</a><br>

<%= fax_service %>
</div>
Expand All @@ -24,11 +24,11 @@
<div class="row">
<div class="col text-center">
<%= link_to 'https://dariaservices.org', target: :_blank do %>
<%= image_tag('daria_services_logo.png', class: 'logo', alt: 'DARIA Services Logo') %>
<%= image_tag('daria_services_logo.png', class: 'logo img', size: 45, alt: 'DARIA Services Logo') %>
<% end %>

<%= link_to 'https://www.civictechdc.org', target: :_blank do %>
<%= image_tag('c4dc-logo-master.svg', class: 'logo', alt: 'Civic Tech DC Logo') %>
<%= image_tag('c4dc-logo-master.svg', class: 'logo img', height: 45, alt: 'Civic Tech DC Logo') %>
<% end %>
</div>
</div>
47 changes: 41 additions & 6 deletions app/views/layouts/_navigation.html.erb
Original file line number Diff line number Diff line change
@@ -1,13 +1,48 @@
<nav class="navbar navbar-inverse fixed-top navbar-expand-lg">
<div class="navbar-header">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<%= link_to "DARIA - #{current_tenant.full_name}#{' - Development' if Rails.env.development?}", root_path, class: 'navbar-brand' %>

<button type="button" class="navbar-toggler" data-toggle="collapse" data-target=".navbar-collapse" aria-label="Toggle navigation" aria-controls="navbar-collapse" aria-expanded="false">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar-supported-content" aria-controls="navbar-supported-content" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

</div>
<div class="collapse navbar-collapse">
<%= render 'layouts/navigation_links' %>
<div class="collapse navbar-collapse" id="navbar-supported-content">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<ul class="navbar-nav mr-auto">
<% if current_user %>
<%= current_line_display %>
<%= cm_resources_link %>
<%= spanish_or_english_link %>
<% end %>
</ul>
</ul>

<ul class="navbar-nav mb-2 mb-lg-0">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbar-dropdown-admin" role="button" data-bs-toggle="dropdown" aria-expanded="false">
<%= t('navigation.admin_tools.label') %>
</a>
<ul class="dropdown-menu" aria-labelledby="navbar-dropdown-admin">
<% if current_user.admin? %>
<%= link_to t('navigation.admin_tools.user_management'), users_path, class: 'dropdown-item' %>
<%= link_to t('navigation.admin_tools.clinic_management'), clinics_path, class: 'dropdown-item' %>
<%= link_to t('navigation.admin_tools.config_management'), configs_path, class: 'dropdown-item' %>
<% end %>
<%= link_to t('navigation.admin_tools.accounting'), accountants_path, class: 'dropdown-item' %>
<%= link_to t('navigation.admin_tools.export'), patients_path(format: :csv), class: 'dropdown-item' %>
</ul>
</li>

<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbar-dropdown-user" role="button" data-bs-toggle="dropdown" aria-expanded="false">
<%= current_user.name %>
</a>
<ul class="dropdown-menu" aria-labelledby="navbar-dropdown-user">
<%= link_to t('navigation.user_tools.profile'), edit_user_registration_path, class: 'dropdown-item' %>
<%= link_to t('navigation.user_tools.sign_out'), destroy_user_session_path, method: 'delete', class: 'dropdown-item' %>
</ul>
</li>
</ul>
</div>
</div>
</nav>
37 changes: 0 additions & 37 deletions app/views/layouts/_navigation_links.html.erb

This file was deleted.

8 changes: 2 additions & 6 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@

<body>
<% if current_user.present? %>
<header>
<%= render 'layouts/navigation' %>
</header>
<%= render 'layouts/navigation' %>
<% end %>

<main class="container" role="main">
Expand All @@ -57,9 +55,7 @@
<% end %>

<% if current_user.present? %>
<footer>
<%= render 'layouts/footer' %>
</footer>
<%= render 'layouts/footer' %>
<% end %>
</main>
</body>
Expand Down