Browse Source

Add page titles (#135)

* Add page titles and lint

* Make github use Node 14

(cherry picked from commit 86baa53972aa87676bb720a9f772620afa9a1be9)

Co-authored-by: baarkerlounger <db@slothlife.xyz>
pull/137/head
kosiakkatrina 3 years ago committed by GitHub
parent
commit
4b67e20f64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      .github/workflows/pipeline.yml
  2. 1
      app/views/case_logs/edit.html.erb
  3. 1
      app/views/case_logs/index.html.erb
  4. 1
      app/views/devise/sessions/new.html.erb
  5. 1
      app/views/form/check_answers.html.erb
  6. 2
      app/views/form/page.html.erb
  7. 2
      app/views/layouts/application.html.erb
  8. 1
      app/views/organisations/show.html.erb
  9. 1
      app/views/organisations/users.html.erb
  10. 1
      app/views/users/account/index.html.erb
  11. 4
      config/routes.rb

4
.github/workflows/pipeline.yml

@ -57,6 +57,10 @@ jobs:
with: with:
# runs 'bundle install' and caches installed gems automatically # runs 'bundle install' and caches installed gems automatically
bundler-cache: true bundler-cache: true
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Create DB - name: Create DB
run: | run: |

1
app/views/case_logs/edit.html.erb

@ -1,3 +1,4 @@
<% content_for :title, "Case log #{@case_log.id} – #{t('service_name')} - GOV.UK" %>
<%= turbo_frame_tag "case_log_form", target: "_top" do %> <%= turbo_frame_tag "case_log_form", target: "_top" do %>
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds-from-desktop"> <div class="govuk-grid-column-two-thirds-from-desktop">

1
app/views/case_logs/index.html.erb

@ -1,3 +1,4 @@
<% content_for :title, "Case logs – #{t('service_name')} - GOV.UK" %>
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-full"> <div class="govuk-grid-column-full">
<h1 class="govuk-heading-l">Your logs</h1> <h1 class="govuk-heading-l">Your logs</h1>

1
app/views/devise/sessions/new.html.erb

@ -1,3 +1,4 @@
<% content_for :title, "Sign in – #{t('service_name')} - GOV.UK" %>
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds"> <div class="govuk-grid-column-two-thirds">

1
app/views/form/check_answers.html.erb

@ -1,3 +1,4 @@
<% content_for :title, "Check answers – #{t('service_name')} - GOV.UK" %>
<%= turbo_frame_tag "case_log_form", target: "_top" do %> <%= turbo_frame_tag "case_log_form", target: "_top" do %>
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-three-quarters-from-desktop"> <div class="govuk-grid-column-three-quarters-from-desktop">

2
app/views/form/page.html.erb

@ -1,3 +1,5 @@
<% content_for :title, "#{subsection} – #{t('service_name')} - GOV.UK" %>
<% content_for :before_content do %> <% content_for :before_content do %>
<%= govuk_back_link( <%= govuk_back_link(
text: 'Back', text: 'Back',

2
app/views/layouts/application.html.erb

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" class="govuk-template"> <html lang="en" class="govuk-template">
<head> <head>
<title>DLUHC CORE Data Collection</title> <title><%= yield(:title).present? ? yield(:title) : t('service_name') %></title>
<%= csrf_meta_tags %> <%= csrf_meta_tags %>
<%= csp_meta_tag %> <%= csp_meta_tag %>
<%= tag :meta, name: 'viewport', content: 'width=device-width, initial-scale=1' %> <%= tag :meta, name: 'viewport', content: 'width=device-width, initial-scale=1' %>

1
app/views/organisations/show.html.erb

@ -1,3 +1,4 @@
<% content_for :title, "Your organisation (Details) – #{t('service_name')} - GOV.UK" %>
<% content_for :tab_title do %> <% content_for :tab_title do %>
<%= "Details" %> <%= "Details" %>
<% end %> <% end %>

1
app/views/organisations/users.html.erb

@ -1,3 +1,4 @@
<% content_for :title, "Your organisation (Users) – #{t('service_name')} - GOV.UK" %>
<% content_for :tab_title do %> <% content_for :tab_title do %>
<%= "Users" %> <%= "Users" %>
<% end %> <% end %>

1
app/views/users/account/index.html.erb

@ -1,3 +1,4 @@
<% content_for :title, "Your account – #{t('service_name')} - GOV.UK" %>
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds"> <div class="govuk-grid-column-two-thirds">
<h1 class="govuk-heading-l"> <h1 class="govuk-heading-l">

4
config/routes.rb

@ -1,6 +1,6 @@
Rails.application.routes.draw do Rails.application.routes.draw do
devise_for :admin_users, ActiveAdmin::Devise.config devise_for :admin_users, ActiveAdmin::Devise.config
devise_for :users, controllers: { passwords: "users/passwords", sessions: "users/sessions" }, path_names: { sign_in: 'sign-in', sign_out: 'sign-out' }, skip: [:registrations] devise_for :users, controllers: { passwords: "users/passwords", sessions: "users/sessions" }, path_names: { sign_in: "sign-in", sign_out: "sign-out" }, skip: [:registrations]
devise_scope :user do devise_scope :user do
get "confirmations/reset", to: "users/passwords#reset_confirmation" get "confirmations/reset", to: "users/passwords#reset_confirmation"
get "users/edit" => "devise/registrations#edit", :as => "edit_user_registration" get "users/edit" => "devise/registrations#edit", :as => "edit_user_registration"
@ -30,7 +30,7 @@ Rails.application.routes.draw do
end end
end end
resources :case_logs, :path => '/case-logs' do resources :case_logs, path: "/case-logs" do
collection do collection do
post "/bulk-upload", to: "bulk_upload#bulk_upload" post "/bulk-upload", to: "bulk_upload#bulk_upload"
get "/bulk-upload", to: "bulk_upload#show" get "/bulk-upload", to: "bulk_upload#show"

Loading…
Cancel
Save